/* ==========================================================
   Sentinel — Complete Stylesheet
   attestifyos.com/sentinel

   Design intent: dark, precise, audit-grade.
   Near-black surfaces + electric indigo accent.
   Reads as a trust layer, not a product dashboard.
   ========================================================== */

/* ── Design tokens ─────────────────────────────────────────── */

:root,
[data-theme="light"] {
  /* Surfaces */
  --color-bg:              #f5f5f7;
  --color-surface:         #ffffff;
  --color-surface-2:       #f8f8fa;
  --color-surface-offset:  #ededf0;
  --color-border:          oklch(0.2 0 0 / 0.1);
  --color-divider:         oklch(0.2 0 0 / 0.07);

  /* Text */
  --color-text:            #0d0d10;
  --color-text-muted:      #6b6b78;
  --color-text-faint:      #adadb8;
  --color-text-inverse:    #f5f5f7;

  /* Accent — Sentinel Indigo */
  --color-primary:         #4f46e5;
  --color-primary-hover:   #4338ca;
  --color-primary-active:  #3730a3;
  --color-primary-glow:    oklch(0.55 0.22 264 / 0.15);
  --color-primary-highlight: #e0e7ff;

  /* Status */
  --color-active:          #16a34a;
  --color-active-bg:       #dcfce7;
  --color-warning:         #d97706;
  --color-warning-bg:      #fef3c7;
  --color-error:           #dc2626;
  --color-error-bg:        #fee2e2;
  --color-pending:         #6b7280;
  --color-pending-bg:      #f3f4f6;

  /* Radius */
  --radius-sm:   0.25rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-full: 9999px;

  /* Spacing (4px base) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Type scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);

  /* Fonts */
  --font-body:    'Inter', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --font-display: 'Inter', 'Helvetica Neue', Arial, system-ui, sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0.2 0 0 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0 0 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0 0 / 0.12);

  /* Transitions */
  --transition: 160ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --content-default: 960px;
  --content-narrow:  640px;
  --content-wide:    1200px;

  /* Nav height */
  --nav-h: 60px;
}

/* ── Dark mode ─────────────────────────────────────────────── */

[data-theme="dark"] {
  --color-bg:              #0c0c0e;
  --color-surface:         #111114;
  --color-surface-2:       #18181c;
  --color-surface-offset:  #1f1f24;
  --color-border:          oklch(1 0 0 / 0.08);
  --color-divider:         oklch(1 0 0 / 0.05);

  --color-text:            #e8e8ed;
  --color-text-muted:      #8b8b98;
  --color-text-faint:      #4a4a55;
  --color-text-inverse:    #0c0c0e;

  --color-primary:         #818cf8;
  --color-primary-hover:   #6366f1;
  --color-primary-active:  #4f46e5;
  --color-primary-glow:    oklch(0.65 0.2 264 / 0.2);
  --color-primary-highlight: #1e1b4b;

  --color-active:          #4ade80;
  --color-active-bg:       #052e16;
  --color-warning:         #fbbf24;
  --color-warning-bg:      #1c1008;
  --color-error:           #f87171;
  --color-error-bg:        #1c0606;
  --color-pending:         #9ca3af;
  --color-pending-bg:      #1f2937;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:              #0c0c0e;
    --color-surface:         #111114;
    --color-surface-2:       #18181c;
    --color-surface-offset:  #1f1f24;
    --color-border:          oklch(1 0 0 / 0.08);
    --color-divider:         oklch(1 0 0 / 0.05);
    --color-text:            #e8e8ed;
    --color-text-muted:      #8b8b98;
    --color-text-faint:      #4a4a55;
    --color-text-inverse:    #0c0c0e;
    --color-primary:         #818cf8;
    --color-primary-hover:   #6366f1;
    --color-primary-active:  #4f46e5;
    --color-primary-glow:    oklch(0.65 0.2 264 / 0.2);
    --color-primary-highlight: #1e1b4b;
    --color-active:          #4ade80;
    --color-active-bg:       #052e16;
    --color-warning:         #fbbf24;
    --color-warning-bg:      #1c1008;
    --color-error:           #f87171;
    --color-error-bg:        #1c0606;
    --color-pending:         #9ca3af;
    --color-pending-bg:      #1f2937;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.5);
  }
}

/* ── Base reset ────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--transition), color var(--transition);
}

body.drawer-open {
  overflow: hidden;
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  line-height: 1.15;
}

p, li {
  text-wrap: pretty;
  max-width: 70ch;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-surface-offset);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.35em;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--color-primary-glow);
  color: var(--color-text);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Utility classes ───────────────────────────────────────── */

.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-muted { color: var(--color-text-muted); }
.text-faint { color: var(--color-text-faint); }

/* ── Skip link ─────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link:focus {
  position: fixed;
  top: var(--space-4);
  left: var(--space-4);
  z-index: 9999;
  width: auto;
  height: auto;
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  clip: auto;
  text-decoration: none;
}

/* ── Layout containers ─────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.container--narrow {
  width: 100%;
  max-width: var(--content-narrow);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 768px) {
  .container,
  .container--narrow {
    padding-inline: var(--space-8);
  }
}

/* ── Nav ───────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-divider);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: var(--space-4);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
}

.nav__brand:hover {
  color: var(--color-text);
  text-decoration: none;
}

.nav__logo-mark {
  color: var(--color-primary);
  flex-shrink: 0;
}

.nav__title {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--color-text);
}

.nav__subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.2;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Desktop CTA — primary button in nav */
.nav__cta {
  /* inherits btn-primary; no extra override needed */
}

/* Hamburger — hidden on desktop, shown on mobile */
.nav__hamburger {
  display: none;
}

@media (max-width: 640px) {
  .nav__hamburger {
    display: inline-flex;
  }
  /* Hide the desktop CTA on small screens — it's in the drawer */
  .nav__cta {
    display: none;
  }
}

/* ── Nav 375px breakpoint ──────────────────────────────────── */

@media (max-width: 375px) {
  .nav__subtitle {
    display: none;
  }
  .nav__actions {
    gap: var(--space-1);
  }
  .nav__actions .btn-ghost:not(.nav__hamburger) {
    display: none;
  }
  .nav__inner {
    gap: var(--space-2);
  }
}

/* ── Mobile nav drawer ─────────────────────────────────────── */

.nav__drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.nav__drawer[hidden] {
  display: none;
}

.nav__drawer-inner {
  position: relative;
  z-index: 1;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  animation: drawer-slide-down 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes drawer-slide-down {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.nav__drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
  margin-bottom: var(--space-2);
}

.nav__drawer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.nav__drawer-link {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background var(--transition);
}

.nav__drawer-link:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
  text-decoration: none;
}

.nav__drawer-link.btn-primary {
  text-align: center;
  justify-content: center;
  margin-top: var(--space-2);
}

.nav__overlay {
  flex: 1;
  background: oklch(0 0 0 / 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  cursor: pointer;
}

/* ── Buttons ───────────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.btn-primary:active {
  background: var(--color-primary-active);
  transform: translateY(1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn-ghost:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
  text-decoration: none;
  border-color: var(--color-border);
}

.btn--lg {
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
}

/* ── Chain badges ──────────────────────────────────────────── */
/* Small pill tags used in stats bar and contract fields        */

.chain-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1em 0.45em;
  border-radius: var(--radius-sm);
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 0.25em;
  vertical-align: middle;
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.chain-badge--base {
  background: #1652f01a;
  color: #1652f0;
  border-color: #1652f033;
}

[data-theme="dark"] .chain-badge--base {
  background: #1652f025;
  color: #6496f6;
  border-color: #1652f040;
}

.chain-badge--eth {
  background: #627eea1a;
  color: #627eea;
  border-color: #627eea33;
}

.chain-badge--robinhood {
  background: #00c8051a;
  color: #00a804;
  border-color: #00c80533;
}

[data-theme="dark"] .chain-badge--robinhood {
  background: #00c80525;
  color: #3ee042;
  border-color: #00c80540;
}

[data-theme="dark"] .chain-badge--eth {
  background: #627eea20;
  color: #8fa8f0;
  border-color: #627eea40;
}

.chain-badge--eas {
  background: #7c3aed1a;
  color: #7c3aed;
  border-color: #7c3aed33;
}

[data-theme="dark"] .chain-badge--eas {
  background: #7c3aed25;
  color: #a78bfa;
  border-color: #7c3aed40;
}

/* ── Status pills & dots ───────────────────────────────────── */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.status-pill--active {
  background: var(--color-active-bg);
  color: var(--color-active);
}

.status-pill--warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.status-pill--error {
  background: var(--color-error-bg);
  color: var(--color-error);
}

.status-pill--pending {
  background: var(--color-pending-bg);
  color: var(--color-pending);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: currentColor;
  flex-shrink: 0;
}

.status-dot--pulse {
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

/* ── Virtuals badge ────────────────────────────────────────── */
/* Partner/ecosystem callout used near hero eyebrow            */

.virtuals-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: linear-gradient(135deg, #7c3aed1a 0%, #4f46e51a 100%);
  border: 1px solid #7c3aed33;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-4);
}

[data-theme="dark"] .virtuals-badge {
  background: linear-gradient(135deg, #7c3aed25 0%, #818cf820 100%);
  border-color: #818cf840;
}

.virtuals-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ── Hero ──────────────────────────────────────────────────── */

.hero {
  padding-block: clamp(var(--space-12), 8vw, var(--space-20));
  border-bottom: 1px solid var(--color-divider);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-5);
}

.hero__title {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
  max-width: 22ch;
  margin-bottom: var(--space-5);
}

.hero__description {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.hero__cta-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.hero__meta-divider {
  color: var(--color-text-faint);
}

.hero__updated {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ── Stats bar ─────────────────────────────────────────────── */

.stats-bar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
  padding-block: var(--space-6);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4) var(--space-8);
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.stat__label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat__value {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.1em;
}

/* ── Section ───────────────────────────────────────────────── */

.section {
  padding-block: clamp(var(--space-10), 6vw, var(--space-16));
  border-bottom: 1px solid var(--color-divider);
}

.section--cta {
  background: var(--color-surface);
  border-bottom: none;
}

.section__header {
  margin-bottom: var(--space-8);
}

.section__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.section__title {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

/* ── Card ──────────────────────────────────────────────────── */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

/* ── Live feed ─────────────────────────────────────────────── */

.feed {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--color-divider);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feed-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: var(--space-4);
  align-items: center;
  background: var(--color-surface);
  padding: var(--space-4) var(--space-5);
  transition: background var(--transition);
}

.feed-item:hover {
  background: var(--color-surface-2);
}

.feed-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.feed-item__body {
  min-width: 0;
}

.feed-item__type {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.feed-item__hash {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-item__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Empty & skeleton */

.feed-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-16) var(--space-8);
  text-align: center;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.feed-empty__icon {
  font-size: 2rem;
  color: var(--color-text-faint);
}

.feed-empty__cta {
  margin-top: var(--space-2);
}

.feed-loading {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--color-divider);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.skeleton {
  height: 68px;
  background: linear-gradient(
    90deg,
    var(--color-surface-offset) 25%,
    var(--color-surface-2) 50%,
    var(--color-surface-offset) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* ── Contract grid ─────────────────────────────────────────── */

.contract-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .contract-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contract-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}

.contract-field:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contract-field__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contract-field__value {
  font-size: var(--text-sm);
  color: var(--color-text);
  overflow-wrap: break-word;
}

.contract-field__mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* Pending deploy state for contract address */
.contract-field__pending {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.contract-field__pending-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-family: var(--font-body);
  font-style: italic;
}

/* ── $SENTI token address box ─────────────────────────────────────────── */

.token-card {
  border-color: var(--color-primary);
}

.token-address-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, var(--radius-lg));
  padding: var(--space-3) var(--space-4);
}

.token-address-box code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  overflow-wrap: break-word;
}

.token-copy-btn {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
}

.token-copy-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.token-copy-btn--copied {
  color: var(--color-success, var(--color-primary));
}

/* ── Token policy (allowed / not allowed) ─────────────────────── */

.policy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .policy-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.policy-card--yes {
  border-color: var(--color-active);
}

.policy-card--no {
  border-color: var(--color-error);
}

.policy-card__heading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.policy-card--yes .policy-card__heading {
  color: var(--color-active);
}

.policy-card--no .policy-card__heading {
  color: var(--color-error);
}

.policy-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
}

.policy-list__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.5;
}

.policy-list__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  margin-top: 1px;
}

.policy-card--yes .policy-list__icon {
  background: var(--color-active-bg);
  color: var(--color-active);
}

.policy-card--no .policy-list__icon {
  background: var(--color-error-bg);
  color: var(--color-error);
}

/* ── Token section: subsection rhythm ─────────────────────────── */

.token-subsection {
  margin-top: var(--space-10);
}

.token-subsection__kicker {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.token-subsection__kicker::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-divider);
}

.token-subsection__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 700;
  flex-shrink: 0;
}

.token-subsection__title {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

/* ── Headline stat row ─────────────────────────────────────────── */

.token-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-divider);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--space-5) 0 var(--space-6);
}

.token-stat {
  background: var(--color-surface);
  padding: var(--space-4) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.token-stat__value {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.token-stat__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.3;
}

@media (max-width: 640px) {
  .token-stats {
    grid-template-columns: 1fr;
  }
}

/* ── Savings tables ────────────────────────────────────────── */

.savings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 900px) {
  .savings-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* ── Token address grid (one card per chain) ──────────────────── */
/* Same responsive shape as .savings-grid, but goes to 3 equal
   columns at a wider breakpoint now that Base/Robinhood/Solana all
   need a card -- .savings-grid's 2-column max would wrap the third
   card alone onto its own row. */
.token-address-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 640px) {
  .token-address-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1100px) {
  .token-address-grid {
    grid-template-columns: 1fr 1fr 1fr;
    align-items: start;
  }
}

/* Grid/flex items default to min-width:auto, which floors a column's
   width at its own content size -- a long unbroken address (Base,
   Robinhood) then balloons past its 1fr share while a short "Coming
   soon" placeholder (Solana) shrinks, breaking the equal-thirds
   layout. min-width:0 lets every column actually honor 1fr. */
.token-address-grid > .card {
  min-width: 0;
}

.token-address-box {
  min-width: 0;
}

.token-address-box code {
  min-width: 0;
  overflow-wrap: anywhere;
}

.savings-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.savings-card__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.savings-card__subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.savings-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.savings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  table-layout: fixed;
}

.savings-table th,
.savings-table td {
  padding: var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--color-divider);
  overflow-wrap: break-word;
}

.savings-table thead th {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
}

.savings-table tbody tr:last-child td {
  border-bottom: none;
}

.savings-table td.savings-table__mono {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

@media (max-width: 480px) {
  .savings-table {
    font-size: var(--text-xs);
  }
  .savings-table th,
  .savings-table td {
    padding: var(--space-2);
  }
}

.savings-table td.savings-table__highlight {
  color: var(--color-active);
  font-weight: 700;
}

.discount-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.6em;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}

.savings-table-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
}

/* ── Governance-in-numbers section ─────────────────────────────── */

.numbers-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--color-divider);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--space-5) 0 var(--space-6);
}

.numbers-stat {
  background: var(--color-surface);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.numbers-stat__value {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.numbers-stat--danger .numbers-stat__value {
  color: var(--color-error);
}

.numbers-stat__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.3;
}

@media (max-width: 640px) {
  .numbers-stats {
    grid-template-columns: 1fr;
  }
}

/* Service breakdown — horizontal bar list */
.service-breakdown {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.service-breakdown__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.service-breakdown__label {
  flex: 0 0 150px;
  font-size: var(--text-xs);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-breakdown__track {
  flex: 1;
  height: 8px;
  background: var(--color-surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.service-breakdown__bar {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.service-breakdown__count {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  min-width: 2ch;
  text-align: right;
}

.service-breakdown__empty {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--space-4) 0;
}

/* 30-day activity chart — plain CSS bar chart */
.daily-activity-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 90px;
}

.daily-activity-chart__bar {
  flex: 1;
  min-width: 2px;
  background: var(--color-primary);
  opacity: 0.35;
  border-radius: 2px 2px 0 0;
  transition: height 0.3s ease, opacity 0.15s ease;
}

.daily-activity-chart__bar--active {
  opacity: 0.9;
}

.daily-activity-chart__bar:hover {
  opacity: 1;
}

/* ── Timeline ──────────────────────────────────────────────── */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
}

.timeline__step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--space-4);
  position: relative;
  padding-bottom: var(--space-6);
}

.timeline__step::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--color-divider);
}

.timeline__step--last {
  padding-bottom: 0;
}

.timeline__step--last::before {
  display: none;
}

.timeline__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  flex-shrink: 0;
  z-index: 1;
}

.timeline__body {
  padding-top: var(--space-1);
}

.timeline__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.timeline__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: 40ch;
}

/* ── CTA card ──────────────────────────────────────────────── */

.cta-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-8), 5vw, var(--space-12));
  text-align: center;
  box-shadow: var(--shadow-md);
}

.cta-card__eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-5);
}

.cta-card__quote {
  margin-bottom: var(--space-8);
}

.cta-card__quote p {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.6;
  max-width: 52ch;
  margin-inline: auto;
  font-style: italic;
}

.cta-card__attribution {
  margin-top: var(--space-4);
}

.cta-card__attribution cite {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: normal;
}

.cta-card__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.cta-card__sub {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  max-width: 48ch;
  margin-inline: auto;
}

/* ── Footer ────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-8);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer__copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  max-width: none;
}

.footer__links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.footer__links a {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--color-text);
  text-decoration: none;
}

/* ── Mobile tweaks ─────────────────────────────────────────── */

@media (max-width: 480px) {
  .feed-item {
    grid-template-columns: 36px 1fr;
    gap: var(--space-3);
  }

  .feed-item__meta {
    display: none;
  }

  .hero__title {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .cta-card__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-card__actions .btn-primary,
  .cta-card__actions .btn-ghost {
    justify-content: center;
  }

  .hero__cta-group {
    flex-direction: column;
    align-items: flex-start;
  }
}
