/* ============================================
   Straddle Design System — Specimen Stylesheet
   Tokens from design.md applied directly.
   ============================================ */

[data-theme="dark"] {
  /* Background Surfaces */
  --bg-canvas: oklch(0.22 0.044 230.17);
  --bg-panel: oklch(0.25 0.038 228.21);
  --bg-surface: oklch(0.285 0.041 227.93);
  --bg-elevated: oklch(0.331 0.043 228.24);

  /* Solid surface equivalents (white at N% on canvas, sRGB composited) */
  --surface-02: oklch(0.239 0.042 230.62);
  --surface-03: oklch(0.248 0.042 230.43);
  --surface-05: oklch(0.267 0.041 229.61);

  /* Table header: canvas-default surface-03, always recedes from bg-surface */
  --th-bg: oklch(0.248 0.042 230.43);

  /* Text */
  --text-primary: oklch(0.978 0 0);
  --text-secondary: oklch(0.874 0.015 260.73);
  --text-tertiary: oklch(0.649 0.015 262.36);
  --text-quaternary: oklch(0.61 0.024 232.53);

  /* Brand & Accent */
  --accent-primary: oklch(0.825 0.237 148.37);
  --accent-functional: oklch(0.458 0.096 165.09);
  --accent-hover: oklch(0.625 0.173 149.92);
  --accent-text: oklch(0.825 0.237 148.37);

  /* Status */
  --status-success: oklch(0.825 0.237 148.37);
  --status-error: oklch(0.637 0.208 25.33);
  --status-warning: oklch(0.769 0.165 70.08);
  --status-info: oklch(0.62 0.228 259.59);

  /* Status badge backgrounds */
  --badge-success-bg: oklch(1 0 0 / 3%);
  --badge-error-bg: oklch(1 0 0 / 3%);
  --badge-warning-bg: oklch(1 0 0 / 3%);
  --badge-info-bg: oklch(1 0 0 / 3%);

  /* Links */
  --link-default: oklch(0.571 0.228 259.59);
  --link-hover: oklch(0.512 0.155 264.29);

  /* Border */
  --border-subtle: oklch(1 0 0 / 5%);
  --border-standard: oklch(1 0 0 / 8%);

  /* Shadow (teal-tinted, keep rgba for shadow compositing) */
  --shadow-tint: rgba(0,30,43,0.12);
  --shadow-card: rgba(0,30,43,0.04) 0px 1px 2px;
  --shadow-elevated: rgba(0,30,43,0.2) 0px 2px 4px;
  --shadow-forest: rgba(0,30,43,0.12) 0px 26px 44px, rgba(0,0,0,0.13) 0px 7px 13px;

  /* Overlay */
  --overlay-backdrop: oklch(0.22 0.044 230.17 / 85%);

  /* CTA button */
  --btn-primary-bg: oklch(0.458 0.096 165.09);
  --btn-primary-hover: oklch(0.625 0.173 149.92);

  /* Accent glow (dark only) */
  --accent-glow: 0 0 20px oklch(0.825 0.237 148.37 / 15%);
  --status-glow-success: 0 0 6px oklch(0.825 0.237 148.37);

  color-scheme: dark;
}

[data-theme="light"] {
  /* Background Surfaces — teal-tinted to match dark mode brand hue */
  --bg-canvas: oklch(0.975 0.005 228);
  --bg-panel: oklch(0.952 0.008 228);
  --bg-surface: oklch(0.993 0.003 228);
  --bg-elevated: oklch(0.988 0.004 228);

  /* Solid surface equivalents (forest-black at N% on canvas, sRGB composited) */
  --surface-02: oklch(0.962 0.006 227.66);
  --surface-03: oklch(0.955 0.006 227.52);
  --surface-05: oklch(0.942 0.007 227.28);

  /* Table header: canvas-default surface-03, always recedes from bg-surface */
  --th-bg: oklch(0.955 0.006 227.52);

  /* Text */
  --text-primary: oklch(0.22 0.044 230.17);
  --text-secondary: oklch(0.331 0.043 228.24);
  --text-tertiary: oklch(0.521 0.024 232.53);
  --text-quaternary: oklch(0.53 0.015 232);

  /* Brand & Accent */
  --accent-primary: oklch(0.825 0.237 148.37);
  --accent-functional: oklch(0.458 0.096 165.09);
  --accent-hover: oklch(0.625 0.173 149.92);
  --accent-text: oklch(0.458 0.096 165.09);

  /* Status */
  --status-success: oklch(0.458 0.096 165.09);
  --status-error: oklch(0.57 0.215 27.33);
  --status-warning: oklch(0.555 0.146 49);
  --status-info: oklch(0.473 0.168 257.02);

  /* Status badge backgrounds */
  --badge-success-bg: oklch(0.968 0.025 164.46);
  --badge-error-bg: oklch(0.971 0.013 17.38);
  --badge-warning-bg: oklch(0.987 0.021 95.28);
  --badge-info-bg: oklch(0.97 0.014 254.6);

  /* Links */
  --link-default: oklch(0.473 0.168 257.02);
  --link-hover: oklch(0.371 0.129 256.53);

  /* Border (teal-tinted, keep oklch alpha) */
  --border-subtle: oklch(0.22 0.044 230.17 / 6%);
  --border-standard: oklch(0.22 0.044 230.17 / 10%);

  /* Shadow (keep rgba for shadow compositing) */
  --shadow-tint: rgba(0,30,43,0.08);
  --shadow-card: rgba(0,30,43,0.04) 0px 1px 2px;
  --shadow-elevated: rgba(0,30,43,0.06) 0px 4px 12px;
  --shadow-forest: rgba(0,30,43,0.08) 0px 12px 32px, rgba(0,30,43,0.04) 0px 4px 8px;

  /* Overlay */
  --overlay-backdrop: oklch(0.22 0.044 230.17 / 50%);

  /* CTA button: forest-black, reveals green on hover */
  --btn-primary-bg: oklch(0.22 0.044 230.17);
  --btn-primary-hover: oklch(0.458 0.096 165.09);

  /* Accent glow (suppressed in light) */
  --accent-glow: none;
  --status-glow-success: none;

  color-scheme: light;
}

/* ── Surface token scoping ──
   Algorithm: overlay at N% alpha, sRGB composited on parent.
   Dark overlay: white rgba(255,255,255,N%).
   Light overlay: forest-black oklch(0.22 0.044 230.17 / N%).
   Default --surface-02/03/05 are computed on bg-canvas.
   Containers using bg-surface or bg-panel rescope for their parent. */

[data-theme="dark"] .bg-surface-ctx,
[data-theme="dark"] .table-wrap {
  --surface-02: oklch(0.301 0.04 227.39);
  --surface-03: oklch(0.31 0.04 227.16);
  --surface-05: oklch(0.326 0.039 226.77);
}
[data-theme="dark"] .bg-panel-ctx {
  --surface-02: oklch(0.268 0.037 227.49);
  --surface-03: oklch(0.276 0.037 227.2);
  --surface-05: oklch(0.294 0.036 226.71);
}

[data-theme="light"] .bg-surface-ctx,
[data-theme="light"] .table-wrap {
  --surface-02: oklch(0.979 0.004 227.47);
  --surface-03: oklch(0.972 0.004 227.27);
  --surface-05: oklch(0.959 0.005 226.96);
}
[data-theme="light"] .bg-panel-ctx {
  --surface-02: oklch(0.939 0.009 227.78);
  --surface-03: oklch(0.933 0.009 227.69);
  --surface-05: oklch(0.919 0.01 227.51);
}

:root {
  /* Fonts */
  --font-primary: 'Satoshi', 'SF Pro Display', -apple-system, system-ui, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  --font-mono: 'Source Code Pro', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-data: 'JetBrains Mono', 'Source Code Pro', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Motion */
  --duration-press: 100ms;
  --duration-state: 150ms;
  --duration-hover: 150ms;
  --duration-focus: 150ms;
  --duration-reveal: 200ms;
  --duration-panel: 300ms;
  --duration-mount: 400ms;
  --duration-data: 600ms;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-primary);
  background: var(--bg-canvas);
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.5;
}
/* Theme cross-fade */
body,
.nav,
.card-level,
.table-wrap,
.input-text,
.badge-status,
.badge-subtle,
.badge-neutral {
  transition:
    background-color var(--duration-panel) var(--ease-out),
    color var(--duration-panel) var(--ease-out),
    border-color var(--duration-panel) var(--ease-out);
}

a { color: var(--text-secondary); text-decoration: none; transition: color var(--duration-hover) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  a:hover { color: var(--text-primary); }
}

/* ── Motion: Base interactions ── */
button, [role="button"] {
  transition:
    background-color var(--duration-hover) var(--ease-out),
    color var(--duration-hover) var(--ease-out),
    border-color var(--duration-hover) var(--ease-out),
    transform var(--duration-press) var(--ease-out);
}
button:active:not(:disabled), [role="button"]:active:not(:disabled) {
  transform: scale(0.97);
}

/* Focus ring: accent double-ring, keyboard only */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg-canvas), 0 0 0 4px var(--accent-primary) !important;
}

/* Table row hover: pointer devices only */
@media (hover: hover) and (pointer: fine) {
  .tr {
    transition: background-color var(--duration-hover) var(--ease-out);
  }
}

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 32px;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 32px;
  height: 56px;
}
.nav-logo {
  font-family: var(--font-data);
  font-weight: 500; font-size: 16px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.nav-tabs {
  display: flex; gap: 2px;
  background: var(--surface-02);
  border: 1px solid var(--border-subtle);
  border-radius: 6px; padding: 2px;
}
.nav-tab {
  font-size: 12px; font-weight: 500;
  color: var(--text-tertiary);
  padding: 4px 12px; border-radius: 4px;
  transition: background-color var(--duration-hover) var(--ease-out), color var(--duration-hover) var(--ease-out);
}
.nav-tab.active {
  background: var(--surface-05);
  color: var(--text-primary);
}
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a {
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration-hover) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nav-tab:hover { color: var(--text-primary); }
  .nav-links a:hover { color: var(--text-primary); }
}

.nav-right { display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  position: relative; width: 32px; height: 32px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle-icon {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--text-tertiary);
  transition:
    background-color var(--duration-state) var(--ease-out),
    border-color var(--duration-state) var(--ease-out),
    box-shadow var(--duration-state) var(--ease-out);
}
[data-theme="dark"] .theme-toggle-icon {
  background: transparent;
  border-color: var(--text-tertiary);
}
[data-theme="light"] .theme-toggle-icon {
  background: var(--text-tertiary);
  border-color: var(--text-tertiary);
  box-shadow:
    0 0 0 1px transparent,
    4px 0 0 -1.5px var(--text-quaternary),
    -4px 0 0 -1.5px var(--text-quaternary),
    0 4px 0 -1.5px var(--text-quaternary),
    0 -4px 0 -1.5px var(--text-quaternary);
}

.theme-demo-cards { margin-top: 24px; display: flex; gap: 16px; }

/* ── Hero ── */
.hero {
  max-width: 1200px; margin: 0 auto;
  padding: 120px 32px 100px;
}
.display-xl {
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 500; line-height: 1.00;
  letter-spacing: -1.584px;
  color: var(--text-primary);
  margin-top: 20px;
}
.accent-underline {
  border-bottom: 2px solid var(--accent-primary);
  padding-bottom: 4px;
}
.hero-sub {
  font-size: 18px; font-weight: 400;
  line-height: 1.6; color: var(--text-tertiary);
  margin-top: 28px; max-width: 520px;
}
.hero-actions { display: flex; gap: 12px; margin-top: 40px; }

/* ── Code Label (Source Code Pro technical markers) ── */
.code-label {
  font-family: var(--font-mono);
  font-size: 14px; font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
}
.code-label.green { color: var(--accent-text); }

/* ── Buttons ── */
.btn-primary {
  font-family: var(--font-primary);
  background: var(--btn-primary-bg);
  color: #fff; font-size: 14px; font-weight: 500;
  padding: 8px 16px; border-radius: 6px;
  border: 1px solid var(--btn-primary-bg);
  box-shadow: var(--shadow-tint) 0px 1px 6px, var(--accent-glow);
  cursor: pointer;
  transition:
    background-color var(--duration-hover) var(--ease-out),
    color var(--duration-hover) var(--ease-out),
    border-color var(--duration-hover) var(--ease-out),
    box-shadow var(--duration-panel) var(--ease-out),
    transform var(--duration-press) var(--ease-out);
}
.btn-primary.btn-sm { font-size: 13px; padding: 6px 12px; }

.btn-ghost {
  font-family: var(--font-primary);
  background: var(--surface-02);
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  padding: 8px 16px; border-radius: 6px;
  border: 1px solid var(--border-standard);
  cursor: pointer;
}

.btn-subtle {
  font-family: var(--font-primary);
  background: var(--surface-02);
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  padding: 6px 12px; border-radius: 6px; border: none;
  cursor: pointer;
}

.btn-pill {
  font-family: var(--font-primary);
  background: transparent;
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  padding: 4px 12px; border-radius: 9999px;
  border: 1px solid var(--border-standard);
  cursor: pointer;
}

.btn-icon {
  font-family: var(--font-primary);
  background: var(--surface-02);
  color: var(--text-primary); font-size: 18px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border-standard);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  line-height: 1;
}

.btn-toolbar {
  font-family: var(--font-primary);
  background: var(--surface-05);
  color: var(--text-quaternary); font-size: 12px; font-weight: 500;
  padding: 4px 8px; border-radius: 2px;
  border: 1px solid var(--border-subtle);
  box-shadow: rgba(0,30,43,0.06) 0px 1.2px 0px 0px;
  cursor: pointer;
}

/* Hover states: pointer devices only (prevents sticky hover on touch) */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--btn-primary-hover); border-color: var(--btn-primary-hover); }
  .btn-ghost:hover { background: var(--surface-05); color: var(--text-primary); }
  .btn-subtle:hover { background: var(--surface-05); }
  .btn-pill:hover { background: var(--surface-02); }
  .btn-icon:hover { background: var(--surface-05); }
  .btn-toolbar:hover { color: var(--text-secondary); }
}

.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }

/* ── Sections ── */
.section {
  max-width: 1200px; margin: 0 auto;
  padding: 100px 32px 0;
}
.heading-1 {
  font-size: 32px; font-weight: 400;
  line-height: 1.13; letter-spacing: -0.704px;
  color: var(--text-primary); margin-top: 16px;
}
.heading-3 {
  font-size: 20px; font-weight: 700;
  line-height: 1.33; letter-spacing: -0.24px;
  color: var(--text-primary);
}
.body-secondary {
  font-size: 15px; font-weight: 400;
  line-height: 1.6; color: var(--text-tertiary);
  margin-top: 12px; max-width: 600px;
}

/* ── Color: Surface strip ── */
.surface-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin-top: 32px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border-standard);
}
.surface-swatch {
  padding: 40px 20px 20px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
}
.swatch-label {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-tertiary);
}
.swatch-hex {
  font-family: var(--font-data); font-size: 13px; font-weight: 400;
  color: var(--text-quaternary);
}

/* ── Color: Split section ── */
.color-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  margin-top: 48px;
}
.text-samples { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.text-sample { font-size: 16px; font-weight: 500; display: flex; align-items: baseline; gap: 12px; }
.mono-hex {
  font-family: var(--font-data); font-size: 12px; font-weight: 400;
  color: var(--text-quaternary);
}
.accent-grid { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.accent-chip {
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  display: flex; align-items: center; gap: 10px;
}
.accent-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* ── Typography: Specimens ── */
.type-specimen { margin-top: 40px; }
.type-row {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.type-row:first-child { border-top: 1px solid var(--border-subtle); }
.type-meta {
  font-family: var(--font-data); font-size: 11px; font-weight: 500;
  color: var(--text-quaternary); letter-spacing: 0.5px;
  text-transform: uppercase; display: block; margin-bottom: 8px;
}
.specimen { color: var(--text-primary); }

.type-mono-section {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  margin-top: 48px;
}

/* ── Data specimens (JetBrains Mono) ── */
.data-specimen {
  margin-top: 12px; display: flex; flex-direction: column; gap: 4px;
  font-variant-numeric: tabular-nums;
}
.data-amount-lg {
  font-family: var(--font-data); font-size: 24px; font-weight: 500;
  color: var(--text-primary); letter-spacing: -0.5px; line-height: 1.2;
}
.data-amount-body {
  font-family: var(--font-data); font-size: 16px; font-weight: 400;
  color: var(--text-primary); line-height: 1.4;
}
.data-currency {
  font-size: 0.7em; font-weight: 400;
  color: var(--text-tertiary); margin-right: 1px;
}

/* ── Elevation demo ── */
.elevation-demo {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: 32px;
}
.card-level {
  background: var(--bg-canvas);
  padding: 32px 20px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: 4px;
}
.card-level.level-2 {
  background: var(--surface-05);
  border-color: var(--border-standard);
}
.card-level.level-4 {
  background: var(--surface-05);
  border-color: var(--border-standard);
  box-shadow: var(--shadow-elevated);
}
.card-level.level-5 {
  background: var(--surface-05);
  border-color: var(--border-standard);
  box-shadow: var(--shadow-forest);
}
.card-level-label {
  font-family: var(--font-data); font-size: 11px; font-weight: 500;
  color: var(--text-quaternary); letter-spacing: 0.5px; text-transform: uppercase;
}
.card-level-desc {
  font-size: 15px; font-weight: 500; color: var(--text-secondary);
}

/* ── Badges ── */
.badge-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 24px;
}
.badge-success-pill {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--status-success);
  box-shadow: var(--status-glow-success);
}
.badge-neutral {
  font-size: 12px; font-weight: 500;
  color: var(--text-secondary); padding: 2px 10px;
  border-radius: 9999px;
  border: 1px solid var(--border-standard);
}
.badge-subtle {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  color: var(--text-primary); padding: 1px 7px;
  border-radius: 2px;
  background: var(--surface-05);
  border: 1px solid var(--border-subtle);
  letter-spacing: 0.5px; text-transform: uppercase;
}
.badge-status {
  font-family: var(--font-data); font-size: 11px; font-weight: 500;
  padding: 2px 8px; border-radius: 4px;
  border: 1px solid var(--border-subtle);
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}
.badge-status.success { color: var(--status-success); background: var(--badge-success-bg); }
.badge-status.error { color: var(--status-error); background: var(--badge-error-bg); }
.badge-status.warning { color: var(--status-warning); background: var(--badge-warning-bg); }
.badge-status.info { color: var(--status-info); background: var(--badge-info-bg); }

/* ── Inputs ── */
.input-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px;
  margin-top: 24px; max-width: 720px;
}
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-label {
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
}
.input-text {
  font-family: var(--font-primary);
  font-size: 14px; font-weight: 400;
  color: var(--text-secondary);
  background: var(--surface-02);
  border: 1px solid var(--border-standard);
  border-radius: 6px; padding: 10px 14px;
  outline: none; transition: border-color var(--duration-focus) var(--ease-out);
}
.input-text:focus { border-color: var(--accent-functional); }
.input-text::placeholder { color: var(--text-quaternary); }
.input-mono {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}

/* ── Data Table ── */
.table-wrap {
  margin-top: 32px; overflow-x: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-standard);
  border-radius: 8px;
}
.data-table { width: 100%; border-collapse: collapse; }
.th {
  font-size: 11px; font-weight: 500;
  color: var(--text-quaternary); text-transform: uppercase;
  letter-spacing: 0.5px; text-align: left;
  padding: 12px 16px;
  background: var(--th-bg);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-data);
}
.th-right { text-align: right; }
.tr { border-bottom: 1px solid var(--border-subtle); }
.tr:last-child { border-bottom: none; }
.tr:hover { background: var(--surface-02); }
.td { padding: 14px 16px; font-size: 14px; vertical-align: middle; }
.td-mono {
  font-family: var(--font-data); font-size: 13px;
  color: var(--text-tertiary);
}
.td-amount {
  font-family: var(--font-data); font-size: 14px; font-weight: 500;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.td-right { text-align: right; }
.td-muted { color: var(--text-quaternary); font-size: 13px; }

/* ── Radius demo ── */
.radius-row {
  display: flex; flex-wrap: wrap; gap: 16px;
  margin-top: 32px; align-items: end;
}
.radius-demo {
  width: 80px; height: 80px;
  background: var(--surface-05);
  border: 1px solid var(--border-standard);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  font-family: var(--font-data); font-size: 11px; font-weight: 500;
  color: var(--text-tertiary); letter-spacing: 0.3px;
}
.radius-circle { width: 80px; height: 80px; }
.radius-name {
  font-family: var(--font-primary); font-size: 10px;
  color: var(--text-quaternary); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* ── Token reference tables ── */
.token-table {
  width: 100%; border-collapse: collapse;
  margin-top: 24px;
  font-size: 13px;
}
.token-table th {
  font-family: var(--font-data); font-size: 11px; font-weight: 500;
  color: var(--text-quaternary); text-transform: uppercase;
  letter-spacing: 0.5px; text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-standard);
}
.token-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.token-table tr:last-child td { border-bottom: none; }
.token-var {
  font-family: var(--font-data); font-size: 12px;
  color: var(--text-primary);
}
.token-val {
  font-family: var(--font-data); font-size: 11px;
  color: var(--text-tertiary);
}
.token-swatch {
  width: 28px; height: 28px;
  border-radius: 4px;
  border: 1px solid var(--border-standard);
  display: inline-block; vertical-align: middle;
}
.token-role {
  font-size: 12px; color: var(--text-quaternary);
}
.token-section { margin-top: 64px; }
.token-section:first-child { margin-top: 0; }
.token-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  margin-top: 24px;
}

/* ── Spec page ── */
.spec-actions {
  display: flex; gap: 8px; margin-top: 24px;
}
.spec-content {
  margin-top: 32px;
  background: var(--surface-02);
  border: 1px solid var(--border-standard);
  border-radius: 8px;
  padding: 32px;
  max-height: 70vh;
  max-width: 80ch;
  overflow-y: auto;
  font-family: var(--font-data);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-wrap: break-word;
  tab-size: 2;
}
.spec-content::selection {
  background: oklch(0.825 0.237 148.37 / 20%);
}
.copy-feedback {
  font-size: 12px; font-weight: 500;
  color: var(--status-success);
  opacity: 0;
  transition: opacity var(--duration-state) var(--ease-out);
}
.copy-feedback.visible { opacity: 1; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border-subtle);
  margin-top: 120px; padding: 32px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-copy {
  font-size: 13px; font-weight: 400;
  color: var(--text-quaternary);
}

/* ── Light mode adjustments ── */
[data-theme="light"] .table-wrap { box-shadow: var(--shadow-card); }
[data-theme="light"] .input-text { background: var(--bg-surface); box-shadow: var(--shadow-card); }

/* ── Motion: Keyframes ── */
@keyframes mount {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Motion: Utilities ── */
.animate-mount {
  animation: mount var(--duration-mount) var(--ease-out) both;
}

.animate-shimmer {
  background: linear-gradient(
    90deg,
    transparent 25%,
    rgba(255,255,255,0.04) 50%,
    transparent 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.stagger-1 { animation-delay: 0ms; }
.stagger-2 { animation-delay: 60ms; }
.stagger-3 { animation-delay: 120ms; }
.stagger-4 { animation-delay: 180ms; }
.stagger-5 { animation-delay: 240ms; }

/* ── Motion: Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0ms !important;
    transition-duration: 0ms !important;
  }
  .animate-mount {
    animation: fadeIn 150ms ease both !important;
  }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { padding: 80px 20px 60px; }
  .display-xl { font-size: 40px; letter-spacing: -0.88px; }
  .section { padding: 64px 20px 0; }
  .surface-strip { grid-template-columns: repeat(2, 1fr); }
  .color-split { grid-template-columns: 1fr; gap: 40px; }
  .type-mono-section { grid-template-columns: 1fr; gap: 40px; }
  .elevation-demo { grid-template-columns: repeat(2, 1fr); }
  .input-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .token-grid { grid-template-columns: 1fr; gap: 40px; }
  .table-wrap { margin-left: -20px; margin-right: -20px; border-radius: 0; border-left: none; border-right: none; }
}
