/* AlleyPulse v2. One stylesheet for www, app and legal pages.
   Every font size, spacing value, radius, colour and curve below resolves to a token in this block.
   Rules: landing-page-design skill, Part B. Checked by tools/skillcheck.py. */

/* ==========================================================================
   TOKENS
   ========================================================================== */
:root {
  /* Type scale: Tailwind steps, size + paired line height */
  --text-xs: 0.75rem;    --lh-xs: 1rem;
  --text-sm: 0.875rem;   --lh-sm: 1.25rem;
  --text-base: 1rem;     --lh-base: 1.5rem;
  --text-lg: 1.125rem;   --lh-lg: 1.75rem;
  --text-xl: 1.25rem;    --lh-xl: 1.75rem;
  --text-2xl: 1.5rem;    --lh-2xl: 2rem;
  --text-3xl: 1.875rem;  --lh-3xl: 2.25rem;
  --text-4xl: 2.25rem;   --lh-4xl: 2.5rem;
  --text-5xl: 3rem;      --lh-5xl: 1;
  --text-6xl: 3.75rem;   --lh-6xl: 1;
  --text-7xl: 4.5rem;    --lh-7xl: 1;
  --text-8xl: 6rem;      --lh-8xl: 1;
  --text-9xl: 8rem;      --lh-9xl: 1;

  /* Weights: 400, 500, 600, 700 only */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Spacing: the skill's table, nothing else for padding, margin or gap */
  --space-0: 0;
  --space-25: 2px;
  --space-50: 4px;
  --space-75: 8px;
  --space-100: 12px;
  --space-200: 16px;
  --space-300: 24px;
  --space-400: 32px;
  --space-500: 40px;
  --space-600: 48px;
  --space-700: 64px;
  --space-800: 80px;
  --space-900: 96px;

  /* Radius: Tailwind values only */
  --radius-sm: 2px;
  --radius: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* Surfaces: LIGHT theme, all flat. The owner chose light, so the skill's dark list does not apply (see README) */
  --surface-page: #FAF9F6;      /* page background, warm off white */
  --surface-panel: #FFFFFF;     /* panels, inputs, tables, the digest */
  --surface-sunken: #F4F2EC;    /* callouts, sidebar, secondary panels */
  --surface-raised: #F1EFE9;    /* hover and selected rows */
  --surface-selected: #E9E6DE;  /* pressed pills, active nav, skeletons */
  --surface-tint: #F4F2EC;      /* neutral emphasis surface (was amber tint; removed, v2 light r2) */
  --surface-nav: rgba(250, 249, 246, 0.78);   /* #FAF9F6, translucent, nav only */
  --surface-menu: rgba(250, 249, 246, 0.96);  /* #FAF9F6, high opacity, mobile menu only */

  /* Lines: 1px hairlines */
  --line: #E3E0D6;
  --line-strong: #D2CEC2;
  --line-mid: #A8A398;

  /* Text: ink and greys, AA on every surface above */
  --fg: #141412;
  --fg-body: #2B2A26;
  --fg-2: #55524A;
  --fg-3: #6F6B60;

  /* One accent: signal amber. Bright fill for the tier A badge and progress, deep amber for text, icons and outlines */
  --accent: #F2B84B;
  --accent-ink: #8A5A00;
  --on-accent: #141412;

  /* Primary button and focus ring use ink */
  --btn: #141412;
  --btn-hover: #34322D;
  --on-btn: #FFFFFF;
  --focus: #141412;

  /* Hero heading gradient (text only, the single gradient on the site), light variant */
  --hero-from: #000000;
  --hero-to: #666666;

  /* Fonts */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Motion (B7) */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-move: 500ms;
  --dur-hover: 300ms;
  --dur-reveal: 700ms;

  /* Layers */
  --z-base: 1;
  --z-menu: 30;
  --z-nav: 40;
  --z-tabbar: 40;
  --z-skip: 60;

  /* Fixed sizes (not spacing) */
  --container: 1200px;
  --measure: 680px;
  --tap: 40px;
}

/* ==========================================================================
   FONTS (local, swap)
   ========================================================================== */
@font-face { font-family: "Geist"; src: url("fonts/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/Geist-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/Geist-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

/* ==========================================================================
   BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--surface-page);
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-900);
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  font-weight: var(--weight-regular);
  font-style: normal;
  font-synthesis: none;
  color: var(--fg-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

em, i, cite, address, dfn, var, blockquote { font-style: normal; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--fg);
  font-weight: var(--weight-semibold);
  text-wrap: balance;
}

p, li, dd, td, th, figcaption, label, blockquote { text-wrap: pretty; }
p, dl, dd, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
strong, b { font-weight: var(--weight-semibold); color: var(--fg); }
small { font-size: var(--text-xs); line-height: var(--lh-xs); }
hr { border: 0; margin: 0; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button { cursor: pointer; background: transparent; border: 0; padding: 0; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius);
}

::selection { color: var(--on-accent); background: var(--accent); }

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

/* Icons: Phosphor regular, inline, 16/20/24 */
.i { width: 20px; height: 20px; flex: none; }
.i--16 { width: 16px; height: 16px; }
.i--24 { width: 24px; height: 24px; }

/* ==========================================================================
   TYPE UTILITIES (scale steps only)
   ========================================================================== */
.t-xs { font-size: var(--text-xs); line-height: var(--lh-xs); }
.t-sm { font-size: var(--text-sm); line-height: var(--lh-sm); }
.t-base { font-size: var(--text-base); line-height: var(--lh-base); }
.t-lg { font-size: var(--text-lg); line-height: var(--lh-lg); }
.t-xl { font-size: var(--text-xl); line-height: var(--lh-xl); }
.t-2xl { font-size: var(--text-2xl); line-height: var(--lh-2xl); }
.t-3xl { font-size: var(--text-3xl); line-height: var(--lh-3xl); }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--fg-2); }
.quiet { color: var(--fg-3); }
.white { color: var(--fg); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-75);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  line-height: var(--lh-xs);
  letter-spacing: 0.02em;
  color: var(--fg-3);
}
.eyebrow__dot {
  width: 6px; height: 6px; flex: none;
  border-radius: var(--radius-full);
  background: var(--accent-ink);
}

.label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  line-height: var(--lh-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.01em;
  color: var(--fg-3);
}

/* Section headings */
.h-section {
  font-size: var(--text-3xl);
  line-height: var(--lh-3xl);
  letter-spacing: -0.02em;
  max-width: 640px;
}
.h-sub {
  font-size: var(--text-xl);
  line-height: var(--lh-xl);
  letter-spacing: -0.01em;
}
.lede {
  font-size: var(--text-lg);
  line-height: var(--lh-lg);
  color: var(--fg-2);
  max-width: var(--measure);
}
.prose { max-width: 65ch; color: var(--fg-2); }
.prose p + p { margin-top: var(--space-200); }
.prose strong { color: var(--fg); }

@media (min-width: 960px) {
  .h-section { font-size: var(--text-4xl); line-height: var(--lh-4xl); letter-spacing: -0.025em; }
}

/* ==========================================================================
   LINKS AND BUTTONS
   ========================================================================== */
.link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-75);
  min-height: var(--tap);
  color: var(--fg);
  font-weight: var(--weight-medium);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: var(--line-mid);
  transition: text-decoration-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}
.link .i { transition: transform var(--dur-move) var(--ease); }
.link:hover { text-decoration-color: var(--fg); }
.link:hover .i { transform: translateX(4px); }
.link:active { transform: translateY(1px); }

.inline-link {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-mid);
  transition: text-decoration-color var(--dur-hover) var(--ease);
}
.inline-link:hover { text-decoration-color: var(--fg); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-75);
  min-height: var(--tap);
  padding: var(--space-75) var(--space-100);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition:
    background-color var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease),
    color var(--dur-hover) var(--ease),
    opacity var(--dur-hover) var(--ease),
    transform var(--dur-move) var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn .i { transition: transform var(--dur-move) var(--ease); }
.btn:hover .i--move { transform: translateX(4px); }

.btn--primary { background: var(--btn); color: var(--on-btn); border-color: var(--btn); }
.btn--primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); }

.btn--secondary { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn--secondary:hover { background: var(--surface-raised); border-color: var(--line-mid); }

.btn--quiet { background: transparent; color: var(--fg-2); }
.btn--quiet:hover { background: var(--surface-raised); color: var(--fg); }

.btn--sm { font-size: var(--text-sm); line-height: var(--lh-sm); }

.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }
.btn[disabled]:active { transform: none; }

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--space-300));
  margin: 0 auto;
  padding: 0 var(--space-300);
}
@media (min-width: 960px) {
  .container { max-width: calc(var(--container) + 2 * var(--space-500)); padding: 0 var(--space-500); }
}

.section { padding: var(--space-700) 0 var(--space-800); }
@media (min-width: 960px) { .section { padding: var(--space-900) 0; } }
.section--tight { padding: var(--space-600) 0; }

.rule { height: 0; border-top: 1px solid var(--line); }

.skip {
  position: absolute;
  top: var(--space-75);
  left: var(--space-75);
  z-index: var(--z-skip);
  padding: var(--space-75) var(--space-100);
  border-radius: var(--radius-lg);
  background: var(--surface-panel);
  color: var(--fg);
  border: 1px solid var(--fg);
  font-weight: var(--weight-semibold);
  transform: translateY(-200%);
  transition: transform var(--dur-move) var(--ease);
}
.skip:focus-visible { transform: none; }

/* ==========================================================================
   NAVIGATION (floating, translucent, sized to content)
   ========================================================================== */
.site-nav {
  position: fixed;
  top: var(--space-200);
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  display: flex;
  justify-content: center;
  padding: 0 var(--space-200);
  pointer-events: none;
}
.nav-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--space-50);
  max-width: 100%;
  padding: var(--space-50);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: var(--surface-nav);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-75);
  min-height: var(--tap);
  padding: 0 var(--space-100) 0 var(--space-75);
  border-radius: var(--radius-lg);
  color: var(--fg);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
  transition: background-color var(--dur-hover) var(--ease);
}
.nav-brand:hover { background: var(--surface-raised); }
.brand-mark { width: 20px; height: 20px; flex: none; color: var(--accent-ink); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-25);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a, .nav-signin {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--space-100);
  border-radius: var(--radius-lg); /* nested: 12 outer minus 4 gap */
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  font-weight: var(--weight-medium);
  color: var(--fg-2);
  white-space: nowrap;
  transition: background-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}
.nav-links a:hover, .nav-signin:hover { color: var(--fg); background: var(--surface-raised); }
.nav-links a:active, .nav-signin:active { transform: translateY(1px); }
.nav-links a[aria-current="page"] { color: var(--fg); background: var(--surface-selected); }
.nav-cta { margin-left: var(--space-50); }

.nav-toggle {
  display: none;
  position: relative;
  width: var(--tap);
  height: var(--tap);
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  color: var(--fg);
  transition: background-color var(--dur-hover) var(--ease);
}
.nav-toggle:hover { background: var(--surface-raised); }
.nav-toggle:active { transform: scale(0.98); }
.nav-toggle svg { width: 20px; height: 20px; overflow: visible; }
.nav-toggle line {
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform var(--dur-move) var(--ease);
}
.nav-toggle[aria-expanded="true"] .l1 { transform: translateY(3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .l2 { transform: translateY(-3px) rotate(-45deg); }

/* Mobile menu panel: full height, base surface at high opacity, strong blur */
.menu { display: none; }

@media (max-width: 959px) {
  .site-nav { top: var(--space-100); }
  .nav-bar { width: 100%; max-width: 560px; justify-content: space-between; }
  .nav-signin, .nav-cta { display: none; }

  .js .nav-links { display: none; }
  .js .nav-toggle { display: inline-flex; }

  .js .menu {
    position: fixed;
    inset: 0;
    z-index: var(--z-menu);
    display: flex;
    flex-direction: column;
    padding: var(--space-900) var(--space-300) var(--space-600);
    background: var(--surface-menu);
    -webkit-backdrop-filter: blur(32px);
    backdrop-filter: blur(32px);
    opacity: 0;
    pointer-events: none;
    overflow-y: auto;
    transition: opacity var(--dur-move) var(--ease);
  }
  .js .menu.is-open { opacity: 1; pointer-events: auto; }
  .menu ul { max-width: 560px; width: 100%; margin: 0 auto; }
  .menu li {
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--dur-move) var(--ease), transform var(--dur-move) var(--ease);
    transition-delay: 0ms;
  }
  .menu.is-open li {
    opacity: 1;
    transform: none;
    transition-delay: var(--d, 0ms);
  }
  .menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    font-size: var(--text-2xl);
    line-height: var(--lh-2xl);
    font-weight: var(--weight-semibold);
    letter-spacing: -0.02em;
    color: var(--fg-2);
    transition: color var(--dur-hover) var(--ease);
  }
  .menu a:hover, .menu a[aria-current="page"] { color: var(--fg); }
  .menu a[aria-current="page"]::after {
    content: "";
    width: 8px; height: 8px;
    border-radius: var(--radius-full);
    background: var(--accent-ink);
  }
  .menu__foot { max-width: 560px; width: 100%; margin: var(--space-400) auto 0; display: flex; flex-direction: column; gap: var(--space-100); }
  .menu__foot .btn { width: 100%; justify-content: center; font-size: var(--text-base); line-height: var(--lh-base); font-weight: var(--weight-medium); letter-spacing: 0; min-height: 48px; }
  .menu__foot .btn--primary, .menu__foot .btn--primary:hover { color: var(--on-btn); }
  .menu__foot .btn--secondary { color: var(--fg); }
}

@media (prefers-reduced-motion: reduce) {
  .menu li { transform: none; }
  .nav-toggle line { transition: opacity var(--dur-hover) var(--ease); }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { padding: var(--space-900) 0 var(--space-200); }
@media (min-width: 960px) { .hero { padding: var(--space-900) 0 var(--space-200); } .hero__grid { margin-top: var(--space-600); } }

.hero__grid { display: grid; gap: var(--space-600); }
@media (min-width: 1040px) {
  .hero__grid { grid-template-columns: minmax(0, var(--measure)) minmax(0, 1fr); gap: var(--space-700); align-items: end; }
}

.hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-300); }

.hero-title {
  max-width: var(--measure);
  padding-bottom: var(--space-75);
  font-size: var(--text-4xl);
  line-height: var(--lh-4xl);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.03em;
  color: var(--fg);
  background: linear-gradient(90deg, var(--hero-from) 0%, var(--hero-to) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@media (min-width: 640px) { .hero-title { font-size: var(--text-5xl); line-height: var(--lh-5xl); } }
@media (min-width: 960px) { .hero-title { font-size: var(--text-6xl); line-height: var(--lh-6xl); letter-spacing: -0.035em; } }

.hero__lede {
  max-width: var(--measure);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  color: var(--fg-2);
}
@media (min-width: 640px) { .hero__lede { font-size: var(--text-lg); line-height: var(--lh-lg); } }

.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-100) var(--space-300); padding-top: var(--space-75); }
.hero__note { font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-3); }

/* Spec ledger: frequency, radius, coverage, price in the first screen */
.spec { width: 100%; }
.spec__row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--space-200);
  padding: var(--space-100) 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
}
.spec__row:first-child { border-top: 1px solid var(--line); }
.spec dt { padding-top: var(--space-25); font-family: var(--font-sans); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }
.spec dd { color: var(--fg); }
.spec dd span { color: var(--fg-3); }

/* ==========================================================================
   EXAMPLE DATA, TIERS, CHIPS
   ========================================================================== */
.xdata {
  display: inline-flex;
  align-items: center;
  gap: var(--space-50);
  padding: var(--space-25) var(--space-75);
  border: 1px solid var(--line-mid);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  line-height: var(--lh-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  color: var(--fg);
  white-space: nowrap;
}

.tier { display: inline-flex; align-items: center; gap: var(--space-75); white-space: nowrap; }
.tier__box {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border: 1px solid var(--line-mid);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  line-height: var(--lh-xs);
  font-weight: var(--weight-medium);
  color: var(--fg-2);
}
.tier__label { font-size: var(--text-xs); line-height: var(--lh-xs); font-weight: var(--weight-medium); color: var(--fg-2); }
.tier--a .tier__box { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tier--a .tier__label { color: var(--fg); }
.tier--b .tier__box { border-color: var(--accent-ink); color: var(--accent-ink); }
.tier--c .tier__box { border-color: var(--line-mid); color: var(--fg-3); }

.chip {
  display: inline-flex;
  align-items: center;
  padding: var(--space-25) var(--space-75);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--lh-xs);
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  white-space: nowrap;
}
.cat { font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }

.readout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-50) var(--space-100);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--lh-xs);
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}
.readout b { font-weight: var(--weight-medium); color: var(--fg); }
.readout .i { color: var(--fg-2); }
.readout__sep { color: var(--line-mid); }

.counts { display: flex; flex-wrap: wrap; gap: var(--space-200); }
.counts .tier__label { font-family: var(--font-mono); }

/* ==========================================================================
   PRODUCT PANEL (hero digest, real UI)
   ========================================================================== */
.product { margin-top: var(--space-700); }
@media (min-width: 960px) { .product { margin-top: var(--space-800); } }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  background: var(--surface-panel);
  overflow: hidden;
}
.panel__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-100);
  padding: var(--space-100) var(--space-200);
  border-bottom: 1px solid var(--line);
}
.panel__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-75) var(--space-100); font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg); font-weight: var(--weight-medium); }
.panel__title .mono { color: var(--fg-3); font-size: var(--text-xs); line-height: var(--lh-xs); font-weight: var(--weight-regular); }
.panel__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-100) var(--space-300);
  padding: var(--space-200);
  border-bottom: 1px solid var(--line);
}
.panel__shop { font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg); font-weight: var(--weight-medium); }
.panel__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-75) var(--space-300);
  padding: var(--space-100) var(--space-200);
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  line-height: var(--lh-xs);
  color: var(--fg-3);
}
.panel__foot .link { min-height: var(--tap); font-size: var(--text-sm); line-height: var(--lh-sm); }

.dg { display: grid; }
@media (min-width: 960px) {
  .dg { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}
.dg__list { padding: var(--space-75); }
.dg__item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--space-50) var(--space-100);
  padding: var(--space-100);
  border-radius: var(--radius-lg); /* nested: 16 outer minus 8 gap */
  color: var(--fg-2);
  transition: background-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}
.dg__item:hover { background: var(--surface-raised); color: var(--fg); }
.dg__item:active { transform: translateY(1px); }
.dg__item[aria-current="true"] { background: var(--surface-selected); color: var(--fg); }
.dg__item > .tier { grid-row: span 2; align-self: start; }
.dg__item > .dg__headline, .dg__item > .dg__meta { grid-column: 2; }
.dg__headline { font-size: var(--text-sm); line-height: var(--lh-sm); font-weight: var(--weight-medium); }
.dg__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-75); }

.dg__detail { background: var(--surface-sunken); }
.dg__pane { padding: var(--space-300); }
.dg__pane + .dg__pane { padding-top: 0; }
.js .dg__pane { display: none; }
.js .dg__pane.is-active { display: block; animation: rise var(--dur-move) var(--ease); }
.js .dg__pane + .dg__pane { padding-top: var(--space-300); }
@media (min-width: 960px) { .dg__pane { padding: var(--space-400); } .js .dg__pane + .dg__pane { padding-top: var(--space-400); } }
.dg__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-75) var(--space-100); }
.dg__title {
  margin-top: var(--space-200);
  font-size: var(--text-xl);
  line-height: var(--lh-xl);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
  color: var(--fg);
  text-wrap: balance;
}

/* The five questions, as a ledger */
.five { margin-top: var(--space-300); }
.five__row {
  display: grid;
  gap: var(--space-50);
  padding: var(--space-100) 0;
  border-top: 1px solid var(--line-strong);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
}
.five__row dt { padding-top: var(--space-25); font-family: var(--font-sans); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }
.five__row dd { color: var(--fg-body); }
.five__row dd a { color: var(--fg); }
@media (min-width: 640px) {
  .five__row { grid-template-columns: 160px minmax(0, 1fr); gap: var(--space-200); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  @keyframes rise { from { opacity: 0; } to { opacity: 1; } }
}

/* ==========================================================================
   HONEST PROOF STRIP
   ========================================================================== */
.facts { display: grid; gap: var(--space-400) var(--space-300); }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.facts__cell { padding-top: var(--space-200); border-top: 1px solid var(--line-strong); }
.facts__cell dt { display: flex; align-items: center; gap: var(--space-75); font-size: var(--text-base); line-height: var(--lh-base); font-weight: var(--weight-semibold); color: var(--fg); }
.facts__cell dt .i { color: var(--fg-2); }
.facts__cell dd { margin-top: var(--space-50); font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-3); }
.sources-line { margin-top: var(--space-600); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-75) var(--space-200); font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-2); }
.sources-line ul { display: flex; flex-wrap: wrap; gap: var(--space-50) var(--space-200); }
.sources-line li { color: var(--fg); }

/* ==========================================================================
   SPLIT SECTIONS + ROWS
   ========================================================================== */
.split { display: grid; gap: var(--space-500); }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-700); }
  .split__aside { position: sticky; top: 120px; align-self: start; }
}
.split__aside { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-200); }
.split__aside p { color: var(--fg-2); max-width: 440px; }

.rows > li, .rows__row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--space-200);
  padding: var(--space-300) 0;
  border-bottom: 1px solid var(--line);
}
.rows > li:first-child { border-top: 1px solid var(--line); }
.rows .i { margin-top: var(--space-50); color: var(--fg-2); }
.rows h3 { font-size: var(--text-xl); line-height: var(--lh-xl); letter-spacing: -0.01em; }
.rows p { margin-top: var(--space-75); color: var(--fg-2); max-width: 60ch; }

/* Anatomy */
.anatomy { display: grid; gap: var(--space-600); margin-top: var(--space-600); }
@media (min-width: 960px) { .anatomy { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-700); } }
.specimen { padding: var(--space-300); border: 1px solid var(--line); border-radius: var(--radius-2xl); background: var(--surface-tint); }
@media (min-width: 960px) { .specimen { padding: var(--space-400); } }
.specimen .five { margin-top: var(--space-200); }
.legend > li {
  display: grid;
  gap: var(--space-75);
  padding: var(--space-300) 0;
  border-bottom: 1px solid var(--line);
}
.legend > li:first-child { border-top: 1px solid var(--line); }
.legend p { color: var(--fg-2); font-size: var(--text-sm); line-height: var(--lh-sm); }
.legend .tier__label { font-size: var(--text-sm); line-height: var(--lh-sm); }

/* How it works: numbered table list */
.steps { margin-top: var(--space-600); }
.steps > li {
  display: grid;
  gap: var(--space-100);
  padding: var(--space-300) 0;
  border-bottom: 1px solid var(--line);
}
.steps > li:first-child { border-top: 1px solid var(--line); }
.steps__n { font-family: var(--font-mono); font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-3); }
.steps h3 { font-size: var(--text-xl); line-height: var(--lh-xl); letter-spacing: -0.01em; }
.steps p { color: var(--fg-2); max-width: 56ch; }
.steps__when { font-family: var(--font-sans); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-2); }
@media (min-width: 960px) {
  .steps > li { grid-template-columns: 96px minmax(0, 4fr) minmax(0, 5fr) 160px; gap: var(--space-300); align-items: baseline; padding: var(--space-400) 0; }
  .steps__when { text-align: right; }
}
.footnote { margin-top: var(--space-300); display: flex; gap: var(--space-75); font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-3); max-width: 70ch; }
.footnote .i { margin-top: var(--space-25); }

/* ==========================================================================
   TAGLINE REVEAL (B11)
   ========================================================================== */
.tagline-section { padding: var(--space-900) 0; }
@media (min-width: 960px) { .tagline-section { padding: var(--space-900) 0; } .tagline-section .container { padding-top: var(--space-700); padding-bottom: var(--space-700); } }
.tagline {
  max-width: 720px;
  font-size: var(--text-4xl);
  line-height: var(--lh-4xl);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.025em;
  color: var(--fg);
  text-wrap: balance;
}
@media (min-width: 960px) { .tagline { font-size: var(--text-5xl); line-height: var(--lh-5xl); letter-spacing: -0.03em; } }
.tagline [data-w] { opacity: 0.3; transition: opacity var(--dur-move) var(--ease); }
.tagline [data-w].on { opacity: 1; }
.tagline-meta { margin-top: var(--space-400); }

/* ==========================================================================
   FIT: best for, included vs not included
   ========================================================================== */
.liftable {
  margin-top: var(--space-300);
  max-width: var(--measure);
  font-size: var(--text-2xl);
  line-height: var(--lh-2xl);
  font-weight: var(--weight-medium);
  letter-spacing: -0.015em;
  color: var(--fg);
}
.ledger { display: grid; gap: var(--space-400); margin-top: var(--space-600); }
@media (min-width: 960px) { .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-300); } }
.ledger__col { padding: var(--space-300); border: 1px solid var(--line); border-radius: var(--radius-2xl); }
@media (min-width: 960px) { .ledger__col { padding: var(--space-400); } }
.ledger__col--no, .ledger__col--fill { background: var(--surface-sunken); }
.ledger__col h3 { display: flex; align-items: center; justify-content: space-between; gap: var(--space-200); font-size: var(--text-lg); line-height: var(--lh-lg); }
.ledger__col ul { margin-top: var(--space-200); }
.ledger__col li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--space-100);
  padding: var(--space-100) 0;
  border-top: 1px solid var(--line);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  color: var(--fg-body);
}
.ledger__col li .i { color: var(--fg-2); margin-top: var(--space-0); }
.ledger__col--no li { color: var(--fg-2); }
.ledger__col--no li .i { color: var(--fg-3); }

/* ==========================================================================
   FORMS
   ========================================================================== */
.form-panel {
  padding: var(--space-300);
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  background: var(--surface-panel);
}
@media (min-width: 960px) { .form-panel { padding: var(--space-400); } }
.form-stack { display: grid; gap: var(--space-300); }
.field { display: grid; gap: var(--space-75); }
.field__label { font-size: var(--text-sm); line-height: var(--lh-sm); font-weight: var(--weight-medium); color: var(--fg); }
.field__hint { font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }
.input, .select {
  width: 100%;
  min-height: var(--tap);
  padding: var(--space-75) var(--space-100);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-panel);
  color: var(--fg);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  transition: border-color var(--dur-hover) var(--ease), background-color var(--dur-hover) var(--ease);
}
.input::placeholder { color: var(--fg-3); opacity: 1; }
.input:hover, .select:hover { border-color: var(--line-mid); }
.input:focus-visible, .select:focus-visible { border-color: var(--fg); outline-offset: 0; outline-width: 1px; }
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: var(--space-500);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%238C8C8C'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}
.select option { background: var(--surface-panel); color: var(--fg); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--accent-ink); }
.field-error {
  display: none;
  align-items: flex-start;
  gap: var(--space-75);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  color: var(--fg);
}
.field-error .i { color: var(--accent-ink); margin-top: var(--space-0); }
.field-error.is-shown { display: flex; animation: rise var(--dur-move) var(--ease); }

/* Segmented radio (radius choice) */
.seg {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  justify-self: start;
  padding: var(--space-25);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-panel);
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  min-width: 72px;
  padding: 0 var(--space-100);
  border-radius: var(--radius-md); /* nested: 8 minus 2 */
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  color: var(--fg-2);
  cursor: pointer;
  transition: background-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}
.seg label:hover { color: var(--fg); background: var(--surface-raised); }
.seg label:active { transform: scale(0.98); }
.seg input:checked + label { background: var(--surface-selected); color: var(--fg); }
.seg input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }

.form-note { display: flex; gap: var(--space-75); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }
.form-note .i { margin-top: var(--space-0); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-200); }

.status {
  display: none;
  gap: var(--space-100);
  padding: var(--space-200);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-panel);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  color: var(--fg-body);
}
.status.is-shown { display: flex; animation: rise var(--dur-move) var(--ease); }
.status .i { color: var(--fg); margin-top: var(--space-0); }
.status strong { display: block; }
.status--error .i { color: var(--accent-ink); }

/* ==========================================================================
   QUESTION BLOCKS AND FAQ
   ========================================================================== */
.qpair { display: grid; gap: var(--space-600); }
@media (min-width: 960px) { .qpair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-700); } }
.qpair h2 { font-size: var(--text-2xl); line-height: var(--lh-2xl); letter-spacing: -0.015em; }
.qpair p { margin-top: var(--space-100); color: var(--fg-2); max-width: 56ch; }
.qpair .link { margin-top: var(--space-100); }

.faq { margin-top: var(--space-500); }
.faq__item {
  display: grid;
  gap: var(--space-100);
  padding: var(--space-300) 0;
  border-bottom: 1px solid var(--line);
}
.faq__item:first-child { border-top: 1px solid var(--line); }
@media (min-width: 960px) {
  .faq__item { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-700); padding: var(--space-400) 0; }
}
.faq-q, .qa-q { font-size: var(--text-lg); line-height: var(--lh-lg); font-weight: var(--weight-semibold); letter-spacing: -0.01em; color: var(--fg); }
.faq-a, .qa-a { color: var(--fg-2); max-width: 62ch; }
.faq__more { margin-top: var(--space-300); }

/* ==========================================================================
   FINAL CTA
   ========================================================================== */
.cta-final { padding: var(--space-900) 0; }

.cta-final__inner { display: grid; gap: var(--space-400); }
@media (min-width: 960px) { .cta-final__inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; gap: var(--space-700); } }
.cta-final h2 { font-size: var(--text-4xl); line-height: var(--lh-4xl); letter-spacing: -0.03em; max-width: 640px; }
@media (min-width: 960px) { .cta-final h2 { font-size: var(--text-5xl); line-height: var(--lh-5xl); } }
.cta-final__act { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-200); }
.reassure { display: flex; flex-wrap: wrap; gap: var(--space-75) var(--space-200); font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-3); }
.reassure li { display: inline-flex; align-items: center; gap: var(--space-50); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-foot { padding: var(--space-600) 0 var(--space-500); border-top: 1px solid var(--line); }
.site-foot__top { display: grid; gap: var(--space-400); }
@media (min-width: 960px) { .site-foot__top { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-700); } }
.site-foot__brand { display: grid; gap: var(--space-100); align-content: start; }
.site-foot__brand p { font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-3); max-width: 320px; }
.foot-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-0) var(--space-300); }
@media (min-width: 640px) { .foot-links { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  color: var(--fg-2);
  transition: color var(--dur-hover) var(--ease);
}
.foot-links a:hover { color: var(--fg); }
.foot-links a:active { transform: translateY(1px); }
.site-foot__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-100) var(--space-400);
  margin-top: var(--space-500);
  font-size: var(--text-xs);
  line-height: var(--lh-xs);
  color: var(--fg-3);
}
.site-foot__base p { max-width: 720px; }

/* ==========================================================================
   INNER PAGE HEAD + DOCUMENT LAYOUT
   ========================================================================== */
.page-head { padding: var(--space-900) 0 var(--space-600); }
@media (min-width: 960px) { .page-head { padding: var(--space-900) 0 var(--space-700); } .page-head__inner { margin-top: var(--space-600); } }
.page-head__inner { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-300); }
.page-title {
  max-width: 840px;
  font-size: var(--text-3xl);
  line-height: var(--lh-3xl);
  letter-spacing: -0.025em;
}
@media (min-width: 640px) { .page-title { font-size: var(--text-4xl); line-height: var(--lh-4xl); } }
@media (min-width: 960px) { .page-title { font-size: var(--text-5xl); line-height: var(--lh-5xl); letter-spacing: -0.03em; } }

.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-75); font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-3); }
.crumbs a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--fg-2); transition: color var(--dur-hover) var(--ease); }
.crumbs a:hover { color: var(--fg); }
.crumbs li + li::before { content: "/"; margin-right: var(--space-75); color: var(--line-mid); }

.updated { font-family: var(--font-sans); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }

.doc { display: grid; gap: var(--space-500); }
@media (min-width: 960px) {
  .doc { grid-template-columns: 280px minmax(0, 1fr); gap: var(--space-700); }
  .doc__aside { position: sticky; top: 112px; align-self: start; }
}
.doc__aside { display: grid; gap: var(--space-300); align-content: start; }
.toc a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-100);
  min-height: var(--tap);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  color: var(--fg-2);
  transition: color var(--dur-hover) var(--ease);
}
.toc a:hover { color: var(--fg); }
.toc li { border-bottom: 1px solid var(--line); }
.toc li:first-child { border-top: 1px solid var(--line); }

.block + .block { margin-top: var(--space-800); }
.block > h2 { font-size: var(--text-2xl); line-height: var(--lh-2xl); letter-spacing: -0.015em; }
@media (min-width: 960px) { .block > h2 { font-size: var(--text-3xl); line-height: var(--lh-3xl); letter-spacing: -0.02em; } }
.block > h2 + * { margin-top: var(--space-300); }
.block > p { color: var(--fg-2); max-width: 65ch; }
.block > p + p { margin-top: var(--space-200); }

.bullets > li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--space-100);
  padding: var(--space-100) 0;
  border-bottom: 1px solid var(--line);
  color: var(--fg-body);
}
.bullets > li:first-child { border-top: 1px solid var(--line); }
.bullets .i { color: var(--fg-3); margin-top: var(--space-25); }
.bullets strong { color: var(--fg); }

.callout {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--space-100);
  padding: var(--space-300);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: var(--surface-sunken);
  color: var(--fg-body);
}
.callout .i { color: var(--fg); margin-top: var(--space-25); }
.callout p + p { margin-top: var(--space-75); }
.callout--warm { background: var(--surface-tint); }

.cta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-200) var(--space-400);
  padding: var(--space-400);
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  background: var(--surface-sunken);
}
.cta-strip h2 { font-size: var(--text-2xl); line-height: var(--lh-2xl); letter-spacing: -0.015em; }
.cta-strip p { margin-top: var(--space-75); color: var(--fg-2); }
.cta-strip__act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-100) var(--space-300); }

/* ==========================================================================
   TABLES
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  background: var(--surface-panel);
}
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); line-height: var(--lh-sm); font-variant-numeric: tabular-nums; }
.table caption { padding: var(--space-200) var(--space-300); text-align: left; font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-3); caption-side: bottom; }
.table th, .table td { padding: var(--space-200) var(--space-300); text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table thead th { font-family: var(--font-sans); font-size: var(--text-xs); line-height: var(--lh-xs); font-weight: var(--weight-medium); color: var(--fg-3); letter-spacing: 0.02em; white-space: nowrap; }
.table tbody th { font-weight: var(--weight-medium); color: var(--fg); }
.table td { color: var(--fg-2); }
.table tbody tr:last-child th, .table tbody tr:last-child td { border-bottom: 0; }
.table .col-us { background: var(--surface-tint); color: var(--fg-body); }
.table thead .col-us { color: var(--fg); }
.table--wide { min-width: 880px; }
.yes, .no, .part { display: inline-flex; align-items: center; gap: var(--space-50); font-weight: var(--weight-medium); }
.yes { color: var(--fg); }
.no { color: var(--fg-3); }
.part { color: var(--fg-2); }
.scroll-hint { display: flex; align-items: center; gap: var(--space-75); margin-top: var(--space-100); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }
@media (min-width: 960px) { .scroll-hint { display: none; } }

@media (max-width: 719px) {
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack th, .table--stack td { display: block; width: 100%; }
  .table--stack tr { padding: var(--space-200) var(--space-300); border-bottom: 1px solid var(--line); }
  .table--stack tbody tr:last-child { border-bottom: 0; }
  .table--stack th, .table--stack td { padding: var(--space-50) 0; border-bottom: 0; }
  .table--stack tbody th { padding-bottom: var(--space-75); font-size: var(--text-base); line-height: var(--lh-base); }
  .table--stack td { padding: var(--space-75) 0 0; }
  .table--stack td::before { content: attr(data-label); display: block; margin-bottom: var(--space-25); font-family: var(--font-sans); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }
  .table--stack .col-us { background: transparent; }
}

/* ==========================================================================
   SAMPLE REPORT ISSUE
   ========================================================================== */
.issue-meta { display: grid; gap: var(--space-200); }
.issue-meta__row { display: grid; gap: var(--space-25); padding-bottom: var(--space-200); border-bottom: 1px solid var(--line); }
.issue-meta__row:first-child { padding-top: var(--space-200); border-top: 1px solid var(--line); }
.issue-meta__row dd { font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg); }
.issue-meta__row dt { font-family: var(--font-sans); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }
.tier-jump a { display: flex; align-items: center; justify-content: space-between; gap: var(--space-100); min-height: var(--tap); color: var(--fg-2); transition: color var(--dur-hover) var(--ease); }
.tier-jump a:hover { color: var(--fg); }
.tier-jump a .mono { font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg); }

.summary {
  padding: var(--space-300);
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  background: var(--surface-sunken);
  font-size: var(--text-lg);
  line-height: var(--lh-lg);
  color: var(--fg-body);
}
.summary .label { display: block; margin-bottom: var(--space-75); }

.tier-group + .tier-group { margin-top: var(--space-700); }
.tier-group__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-100); margin-bottom: var(--space-200); }
.tier-group__head h2 { display: flex; align-items: center; gap: var(--space-100); font-size: var(--text-2xl); line-height: var(--lh-2xl); letter-spacing: -0.015em; }
.tier-group__head h2 .tier__box { width: 24px; height: 24px; font-size: var(--text-sm); line-height: var(--lh-sm); }

.issue-list { border: 1px solid var(--line); border-radius: var(--radius-2xl); overflow: hidden; }
.issue-row { padding: var(--space-300); border-bottom: 1px solid var(--line); background: var(--surface-panel); }
.issue-row:last-child { border-bottom: 0; }
.issue-row--a { background: var(--surface-tint); }
@media (min-width: 960px) { .issue-row { padding: var(--space-400); } }
.issue-row__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-75) var(--space-100); }
.issue-row h3 { margin-top: var(--space-200); font-size: var(--text-xl); line-height: var(--lh-xl); letter-spacing: -0.01em; max-width: 62ch; }

/* ==========================================================================
   PRICING
   ========================================================================== */
.plans { display: grid; gap: var(--space-300); grid-auto-rows: auto; }
@media (min-width: 960px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plan {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  row-gap: var(--space-300);
  padding: var(--space-300);
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  background: var(--surface-panel);
}
@media (min-width: 960px) { .plan { padding: var(--space-400); } }
.plan--now { background: var(--surface-sunken); border-color: var(--line-strong); }
.plan__top { display: grid; gap: var(--space-100); align-content: start; }
.plan__name { font-size: var(--text-xl); line-height: var(--lh-xl); }
.plan__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-75); }
.plan__price b { font-size: var(--text-5xl); line-height: var(--lh-5xl); font-weight: var(--weight-semibold); letter-spacing: -0.03em; color: var(--fg); font-variant-numeric: tabular-nums; }
.plan__price span { color: var(--fg-3); font-size: var(--text-sm); line-height: var(--lh-sm); }
.plan__desc { color: var(--fg-2); font-size: var(--text-sm); line-height: var(--lh-sm); }
.plan .bullets { align-self: start; }
.plan .bullets li { font-size: var(--text-sm); line-height: var(--lh-sm); }
.plan__act { align-self: end; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-200); }

/* ==========================================================================
   COVERAGE CHECK
   ========================================================================== */
.check { display: grid; gap: var(--space-400); }
@media (min-width: 960px) { .check { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--space-300); } }
.check__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-100); }
.check__head h2 { font-size: var(--text-xl); line-height: var(--lh-xl); }
.preview-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-100); }
.preview-bar .label { white-space: nowrap; }

.result {
  display: flex;
  flex-direction: column;
  gap: var(--space-300);
  min-height: 100%;
  padding: var(--space-300);
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  background: var(--surface-panel);
}
@media (min-width: 960px) { .result { padding: var(--space-400); } }
.result__state { display: none; flex-direction: column; gap: var(--space-200); }
.result__state.is-shown { display: flex; animation: rise var(--dur-move) var(--ease); }
.result__badge { display: inline-flex; align-items: center; gap: var(--space-75); font-weight: var(--weight-semibold); color: var(--fg); font-size: var(--text-lg); line-height: var(--lh-lg); }
.result__badge .i { color: var(--fg); }
.result__state--warn .result__badge .i, .result__state--no .result__badge .i { color: var(--accent-ink); }
.result__big { font-size: var(--text-5xl); line-height: var(--lh-5xl); font-weight: var(--weight-semibold); letter-spacing: -0.03em; color: var(--fg); font-family: var(--font-mono); }
.result p { color: var(--fg-2); font-size: var(--text-sm); line-height: var(--lh-sm); }
.no-js-only { display: block; }
.js .no-js-only { display: none; }

/* Skeletons: shaped like the real layout, no spinners */
.skel {
  display: block;
  height: 12px;
  border-radius: var(--radius);
  background: var(--surface-selected);
  animation: skel 1200ms var(--ease) infinite alternate;
}
.skel--title { height: 24px; width: 60%; }
.skel--big { height: 48px; width: 40%; }
.skel--line { width: 100%; }
.skel--short { width: 70%; }
.skel--box { width: 20px; height: 20px; flex: none; }
.skel--chip { width: 48px; height: 20px; }
@keyframes skel { from { opacity: 1; } to { opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* ==========================================================================
   404
   ========================================================================== */
.lost { min-height: 100dvh; display: grid; align-content: center; padding: var(--space-900) 0 var(--space-800); }
.lost__code { font-family: var(--font-sans); font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-3); }
.lost h1 { margin-top: var(--space-200); font-size: var(--text-4xl); line-height: var(--lh-4xl); letter-spacing: -0.03em; max-width: 640px; }
@media (min-width: 960px) { .lost h1 { font-size: var(--text-6xl); line-height: var(--lh-6xl); } }
.lost p { margin-top: var(--space-300); color: var(--fg-2); max-width: 56ch; }
.lost__links { margin-top: var(--space-500); max-width: 560px; }
.lost__links a { display: flex; align-items: center; justify-content: space-between; min-height: 56px; color: var(--fg); transition: color var(--dur-hover) var(--ease); }
.lost__links a .i { color: var(--fg-3); transition: transform var(--dur-move) var(--ease); }
.lost__links a:hover .i { transform: translateX(4px); }
.lost__links li { border-bottom: 1px solid var(--line); }
.lost__links li:first-child { border-top: 1px solid var(--line); }

/* ==========================================================================
   SCROLL REVEAL (only when JS runs; content is visible without it)
   ========================================================================== */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--dur-reveal) var(--ease), transform var(--dur-reveal) var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { transform: none; transition: opacity var(--dur-reveal) var(--ease); }
}

/* ==========================================================================
   APP SHELL
   ========================================================================== */
.app { min-height: 100dvh; }
.side { display: none; }
.app-top {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-100);
  padding: var(--space-75) var(--space-200);
  border-bottom: 1px solid var(--line);
  background: var(--surface-nav);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.app-top__shop { font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); text-align: right; }
.app-top__shop b { display: block; font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg); font-weight: var(--weight-medium); }

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-tabbar);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: var(--space-50) var(--space-75) var(--space-75);
  border-top: 1px solid var(--line);
  background: var(--surface-menu);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-25);
  min-height: 48px;
  border-radius: var(--radius-lg);
  font-size: var(--text-xs);
  line-height: var(--lh-xs);
  color: var(--fg-3);
  transition: color var(--dur-hover) var(--ease), background-color var(--dur-hover) var(--ease);
}
.tabbar a:hover { color: var(--fg); }
.tabbar a:active { transform: scale(0.98); }
.tabbar a[aria-current="page"] { color: var(--fg); background: var(--surface-raised); }

.app-main { padding: var(--space-300) var(--space-200) var(--space-900); }
.app-main__inner { max-width: 960px; }

@media (min-width: 960px) {
  .app { display: grid; grid-template-columns: 248px minmax(0, 1fr); padding: var(--space-75); gap: var(--space-75); }
  .app-top, .tabbar { display: none; }
  .side {
    position: sticky;
    top: var(--space-75);
    height: calc(100dvh - 2 * var(--space-75));
    display: flex;
    flex-direction: column;
    gap: var(--space-300);
    padding: var(--space-200) var(--space-100);
  }
  .app-main {
    min-height: calc(100dvh - 2 * var(--space-75));
    padding: var(--space-500) var(--space-600) var(--space-800);
    border: 1px solid var(--line);
    border-radius: var(--radius-2xl);
    background: var(--surface-panel);
  }
}
.side__brand { display: inline-flex; align-items: center; gap: var(--space-75); min-height: var(--tap); padding: 0 var(--space-75); border-radius: var(--radius-lg); font-weight: var(--weight-semibold); font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg); transition: background-color var(--dur-hover) var(--ease); }
.side__brand:hover { background: var(--surface-raised); }
.side__shop { display: grid; gap: var(--space-25); padding: var(--space-100); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.side__shop b { font-size: var(--text-sm); line-height: var(--lh-sm); font-weight: var(--weight-medium); color: var(--fg); }
.side__shop span { font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }
.side__nav { display: grid; gap: var(--space-25); }
.side__nav a, .side__foot a {
  display: flex;
  align-items: center;
  gap: var(--space-100);
  min-height: var(--tap);
  padding: 0 var(--space-75);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  font-weight: var(--weight-medium);
  color: var(--fg-2);
  transition: background-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}
.side__nav a:hover, .side__foot a:hover { background: var(--surface-raised); color: var(--fg); }
.side__nav a:active, .side__foot a:active { transform: translateY(1px); }
.side__nav a[aria-current="page"] { background: var(--surface-selected); color: var(--fg); }
.side__nav .count { margin-left: auto; font-family: var(--font-mono); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }
.side__foot { margin-top: auto; display: grid; gap: var(--space-25); }
.side__note { padding: 0 var(--space-75); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }

.app-head { display: grid; gap: var(--space-200); }
.app-head__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-100) var(--space-300); }
.app-title { font-size: var(--text-3xl); line-height: var(--lh-3xl); letter-spacing: -0.025em; }
@media (min-width: 960px) { .app-title { font-size: var(--text-4xl); line-height: var(--lh-4xl); } }
.app-sub { font-family: var(--font-mono); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }
.app-section + .app-section { margin-top: var(--space-500); }

/* Toolbar + segmented filter */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-200); margin-top: var(--space-400); }
.filter {
  display: inline-flex;
  flex-wrap: wrap;
  padding: var(--space-25);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-panel);
}
.filter button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-75);
  min-height: var(--tap);
  padding: 0 var(--space-100);
  border-radius: var(--radius-md); /* nested: 8 minus 2 */
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  font-weight: var(--weight-medium);
  color: var(--fg-2);
  transition: background-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}
.filter button:hover { color: var(--fg); background: var(--surface-raised); }
.filter button:active { transform: scale(0.98); }
.filter button[aria-pressed="true"] { background: var(--surface-selected); color: var(--fg); }
.filter .mono { font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }
.filter .tier__box { width: 16px; height: 16px; }

.progress { font-family: var(--font-mono); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-2); }

/* Digest list (app) */
.dlist { margin-top: var(--space-200); border: 1px solid var(--line); border-radius: var(--radius-2xl); overflow: hidden; background: var(--surface-panel); }
.ditem { border-bottom: 1px solid var(--line); }
.ditem:last-child { border-bottom: 0; }
.ditem[data-tier="a"] { background: var(--surface-tint); }
.ditem.is-hidden { display: none; }
.ditem__toggle {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: var(--space-50) var(--space-100);
  width: 100%;
  padding: var(--space-200);
  text-align: left;
  color: var(--fg);
  transition: background-color var(--dur-hover) var(--ease);
}
@media (min-width: 960px) { .ditem__toggle { padding: var(--space-200) var(--space-300); } }
.ditem__toggle:hover { background: var(--surface-raised); }
.ditem__toggle:active { transform: translateY(1px); }
.ditem__toggle .tier__box { margin-top: var(--space-0); }
.ditem__title { font-size: var(--text-base); line-height: var(--lh-base); font-weight: var(--weight-medium); transition: opacity var(--dur-hover) var(--ease); }
.ditem__meta { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-75); }
.ditem__caret { grid-row: 1; grid-column: 3; color: var(--fg-3); transition: transform var(--dur-move) var(--ease); }
.ditem.is-open .ditem__caret { transform: rotate(180deg); }
.ditem__body { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: var(--space-100); padding: 0 var(--space-200) var(--space-300); }
.ditem__body > * { grid-column: 2; }
@media (min-width: 960px) { .ditem__body { padding: 0 var(--space-300) var(--space-300); } }
.js .ditem:not(.is-open) .ditem__body { display: none; }
.js .ditem.is-open .ditem__body { animation: rise var(--dur-move) var(--ease); }
.ditem__body .five { margin-top: 0; }
.ditem__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-100); margin-top: var(--space-200); }
.ditem.is-done .ditem__title { opacity: 0.5; }
.done-btn[aria-pressed="true"] { color: var(--fg); border-color: var(--line-mid); background: var(--surface-raised); }
.done-tag { display: none; align-items: center; gap: var(--space-50); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-2); }
.ditem.is-done .done-tag { display: inline-flex; }

.state { display: none; }
.state.is-shown { display: block; animation: rise var(--dur-move) var(--ease); }

.skel-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) 48px; gap: var(--space-100); align-items: start; padding: var(--space-300); border-bottom: 1px solid var(--line); }
.skel-row:last-child { border-bottom: 0; }
.skel-row__lines { display: grid; gap: var(--space-75); }

.empty { padding: var(--space-400) var(--space-300); border: 1px solid var(--line); border-radius: var(--radius-2xl); background: var(--surface-panel); }
@media (min-width: 960px) { .empty { padding: var(--space-600); } }
.empty h2 { font-size: var(--text-2xl); line-height: var(--lh-2xl); letter-spacing: -0.015em; max-width: 520px; }
.empty > p { margin-top: var(--space-100); color: var(--fg-2); max-width: 56ch; }
.empty .steps { margin-top: var(--space-400); }
.empty .steps > li { padding: var(--space-200) 0; }
@media (min-width: 960px) { .empty .steps > li { grid-template-columns: 64px minmax(0, 1fr) 160px; padding: var(--space-200) 0; } }
.empty__act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-100) var(--space-300); margin-top: var(--space-400); }

.error-box {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--space-100);
  padding: var(--space-300);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2xl);
  background: var(--surface-panel);
}
.error-box .i { color: var(--accent-ink); margin-top: var(--space-25); }
.error-box h2 { font-size: var(--text-lg); line-height: var(--lh-lg); }
.error-box p { margin-top: var(--space-50); color: var(--fg-2); font-size: var(--text-sm); line-height: var(--lh-sm); max-width: 60ch; }
.error-box .form-actions { margin-top: var(--space-200); }

.demo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-100);
  margin-top: var(--space-300);
}

/* History */
.hist-link { display: inline-flex; align-items: center; gap: var(--space-50); min-height: var(--tap); color: var(--fg); font-weight: var(--weight-medium); transition: color var(--dur-hover) var(--ease); }
.hist-link:hover { color: var(--accent-ink); }
.base-tag { display: inline-flex; padding: var(--space-25) var(--space-75); border: 1px dashed var(--line-mid); border-radius: var(--radius); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-2); }

/* Settings */
.settings { display: grid; gap: var(--space-400); margin-top: var(--space-400); }
@media (min-width: 1200px) {
  .settings { grid-template-columns: 184px minmax(0, 1fr); gap: var(--space-500); }
  .settings__toc { position: sticky; top: var(--space-500); align-self: start; }
}
.settings__toc ul { display: flex; flex-wrap: wrap; gap: var(--space-25); }
@media (min-width: 1200px) { .settings__toc ul { flex-direction: column; } }
.settings__toc a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--space-100); border-radius: var(--radius-lg); font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-2); transition: background-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease); }
.settings__toc a:hover { background: var(--surface-raised); color: var(--fg); }
.set-group { border: 1px solid var(--line); border-radius: var(--radius-2xl); background: var(--surface-panel); }
.set-group + .set-group { margin-top: var(--space-300); }
.set-group__head { padding: var(--space-300) var(--space-300) 0; }
.set-group__head h2 { font-size: var(--text-lg); line-height: var(--lh-lg); }
.set-group__head p { margin-top: var(--space-50); font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-3); max-width: 60ch; }
.set-group__body { display: grid; gap: var(--space-300); padding: var(--space-300); }
.set-group__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-100) var(--space-200);
  padding: var(--space-200) var(--space-300);
  border-top: 1px solid var(--line);
}
.set-group__foot .field__hint { max-width: 48ch; }
.set-group--danger { background: var(--surface-tint); }
.two { display: grid; gap: var(--space-300); }
@media (min-width: 720px) { .two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.recips li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-100);
  min-height: 56px;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
}
.recips li:first-child { border-top: 1px solid var(--line); }
.recips .quiet { font-size: var(--text-xs); line-height: var(--lh-xs); }
.add-row { display: grid; gap: var(--space-100); }
@media (min-width: 720px) { .add-row { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } }
.billing { display: grid; gap: var(--space-200); }
@media (min-width: 720px) { .billing { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.billing div { display: grid; gap: var(--space-25); }
.billing dt { font-family: var(--font-sans); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }
.billing dd { font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg); }
.confirm { display: none; gap: var(--space-200); padding-top: var(--space-200); }
.confirm.is-shown { display: grid; animation: rise var(--dur-move) var(--ease); }

/* Onboarding */
.onb { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.onb__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-200); padding: var(--space-200) var(--space-300); }
.onb__main { width: 100%; max-width: 640px; margin: 0 auto; padding: var(--space-500) var(--space-300) var(--space-800); }
@media (min-width: 960px) { .onb__main { padding-top: var(--space-700); } }
.stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-75); }
.stepper li { display: grid; gap: var(--space-75); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }
.stepper li::before { content: ""; height: 2px; border-radius: var(--radius-sm); background: var(--surface-selected); transition: opacity var(--dur-hover) var(--ease); }
.stepper li.is-done, .stepper li[aria-current="step"] { color: var(--fg); }
.stepper li.is-done::before, .stepper li[aria-current="step"]::before { background: var(--accent); }
.onb h1 { margin-top: var(--space-500); font-size: var(--text-3xl); line-height: var(--lh-3xl); letter-spacing: -0.025em; }
.onb__lede { margin-top: var(--space-100); color: var(--fg-2); }
.onb-step { margin-top: var(--space-500); padding: 0; border: 0; min-width: 0; }
.onb-step + .onb-step { padding-top: var(--space-500); }
.js .onb-step + .onb-step { padding-top: 0; }
.js .onb-step:not(.is-current) { display: none; }
.js .onb-step.is-current { animation: rise var(--dur-move) var(--ease); }
.onb-step legend { padding: 0; font-size: var(--text-xl); line-height: var(--lh-xl); font-weight: var(--weight-semibold); color: var(--fg); }
.onb-step legend .label { display: block; margin-bottom: var(--space-75); }
.onb-step .form-stack { margin-top: var(--space-300); }
.choice { display: grid; gap: var(--space-75); }
@media (min-width: 640px) { .choice { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  display: flex;
  align-items: center;
  gap: var(--space-100);
  min-height: 48px;
  padding: var(--space-100);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  color: var(--fg-2);
  cursor: pointer;
  transition: border-color var(--dur-hover) var(--ease), background-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}
.choice label:hover { border-color: var(--line-mid); color: var(--fg); }
.choice label:active { transform: scale(0.98); }
.choice input:checked + label { border-color: var(--fg); color: var(--fg); background: var(--surface-raised); }
.choice input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.onb-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-200); margin-top: var(--space-500); }
.no-js-submit { margin-top: var(--space-500); }
.js .no-js-submit { display: none; }
.summary-list { margin-top: var(--space-300); }
.summary-list div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--space-200); padding: var(--space-100) 0; border-bottom: 1px solid var(--line); font-size: var(--text-sm); line-height: var(--lh-sm); }
.summary-list div:first-child { border-top: 1px solid var(--line); }
.summary-list dt { padding-top: var(--space-25); font-family: var(--font-sans); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }
.summary-list dd { color: var(--fg); }

/* Legal */
.legal { max-width: 720px; }
.legal h2 { margin-top: var(--space-600); font-size: var(--text-xl); line-height: var(--lh-xl); }
.legal h2 + p, .legal h2 + ul { margin-top: var(--space-100); }
.legal p, .legal li { color: var(--fg-2); }
.legal p + p { margin-top: var(--space-200); }
.legal .bullets { margin-top: var(--space-200); }

/* ==========================================================================
   UTILITIES (spacing tokens only)
   ========================================================================== */
html.menu-open { overflow: hidden; }
.mt-50 { margin-top: var(--space-50); }
.mt-75 { margin-top: var(--space-75); }
.mt-100 { margin-top: var(--space-100); }
.mt-200 { margin-top: var(--space-200); }
.mt-300 { margin-top: var(--space-300); }
.mt-400 { margin-top: var(--space-400); }
.mt-500 { margin-top: var(--space-500); }
.mt-600 { margin-top: var(--space-600); }
.mt-700 { margin-top: var(--space-700); }
.mt-800 { margin-top: var(--space-800); }
.page-end { padding-bottom: var(--space-900); }
.ml-auto { margin-left: auto; }
.fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.fieldset > legend { padding: 0; margin-bottom: var(--space-75); }
.field > .seg { justify-self: start; }
.select:invalid { color: var(--fg-3); }
.site-foot__brand .nav-brand { padding: 0; justify-self: start; }
.site-foot__brand .nav-brand:hover { background: transparent; }
@media (max-width: 479px) {
  .btn { white-space: normal; text-align: center; }
}

/* ==========================================================================
   DEVELOPERS, API AND MCP . Flat, token only, no syntax colours.
   ========================================================================== */
.vtag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-25) var(--space-75);
  border: 1px solid var(--line-mid);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--lh-xs);
  font-weight: var(--weight-medium);
  color: var(--fg-2);
  white-space: nowrap;
}

/* Inline code */
code {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  padding: var(--space-0) var(--space-50);
  border-radius: var(--radius);
  background: var(--surface-sunken);
  color: var(--fg);
  overflow-wrap: anywhere;
}
pre code { padding: var(--space-0); background: transparent; border-radius: var(--radius-sm); overflow-wrap: normal; }
.table code, .callout code { font-size: var(--text-sm); line-height: var(--lh-sm); }

/* Code block: flat sunken surface, mono, horizontal scroll, no colour theme */
.code {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: var(--surface-sunken);
  overflow: hidden;
  min-width: 0;
}
.code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-100);
  padding: var(--space-50) var(--space-50) var(--space-50) var(--space-200);
  border-bottom: 1px solid var(--line);
}
.code__name { font-family: var(--font-mono); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }
.code__tools { display: flex; align-items: center; gap: var(--space-75); }
.code pre {
  margin: 0;
  padding: var(--space-200);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  color: var(--fg);
  tab-size: 2;
  white-space: pre;
}
.code pre:focus-visible { outline-offset: -2px; }
.copy { min-width: 88px; }
.copy .i { transition: transform var(--dur-move) var(--ease); }
.copy[data-copied="true"] { color: var(--fg); }
.code + .code, .code + .callout, .callout + .code, .tabs + .code, .code + p, p + .code { margin-top: var(--space-200); }

/* Tabs: every panel is visible without JS; JS turns them into tabs */
.tabs__list {
  display: none;
  gap: var(--space-50);
  padding: var(--space-50);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: var(--surface-panel);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}
.js .tabs__list { display: flex; }
.tabs__tab {
  min-height: var(--tap);
  padding: var(--space-75) var(--space-100);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  font-weight: var(--weight-medium);
  color: var(--fg-2);
  white-space: nowrap;
  transition: color var(--dur-hover) var(--ease), background-color var(--dur-hover) var(--ease);
}
.tabs__tab:hover { color: var(--fg); background: var(--surface-raised); }
.tabs__tab:active { transform: scale(0.98); }
.tabs__tab[aria-selected="true"] { background: var(--surface-selected); color: var(--fg); }
.tabs__panel { margin-top: var(--space-300); }
.js .tabs__panel { margin-top: var(--space-200); }
.tabs__panel[hidden] { display: none; }
.tabs__title { font-size: var(--text-sm); line-height: var(--lh-sm); font-weight: var(--weight-semibold); color: var(--fg); margin-bottom: var(--space-100); }
.js .tabs__title { display: none; }
.tabs__note { margin-top: var(--space-100); font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-3); max-width: 65ch; }

/* HTTP method label */
.method {
  display: inline-block;
  padding: var(--space-0) var(--space-75);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--lh-xs);
  font-weight: var(--weight-medium);
  color: var(--fg-2);
  background: var(--surface-panel);
}
.method--post { color: var(--fg); border-color: var(--line-mid); }
.table td .method, .table th .method { margin-right: var(--space-75); }
.table--api td:first-child, .table--api th:first-child { white-space: nowrap; }

/* Quick facts on the developers page: ruled rows */
.devfacts { border: 1px solid var(--line-strong); border-radius: var(--radius-2xl); background: var(--surface-panel); overflow: hidden; }
.devfacts > div { display: grid; gap: var(--space-25); padding: var(--space-200) var(--space-300); border-bottom: 1px solid var(--line); min-width: 0; }
.devfacts > div:last-child { border-bottom: 0; }
.devfacts dt { font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }
.devfacts dd { font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg); overflow-wrap: anywhere; }
@media (min-width: 720px) { .devfacts > div { grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-300); align-items: baseline; } }

/* Example conversation: ruled rows, no chat bubbles */
.chat { border: 1px solid var(--line-strong); border-radius: var(--radius-2xl); background: var(--surface-panel); overflow: hidden; }
.chat__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-100); padding: var(--space-100) var(--space-300); border-bottom: 1px solid var(--line); }
.chat__msg { display: grid; gap: var(--space-50); padding: var(--space-200) var(--space-300); border-bottom: 1px solid var(--line); min-width: 0; }
.chat__msg:last-child { border-bottom: 0; }
.chat__msg--tool { background: var(--surface-sunken); }
.chat__role { font-size: var(--text-xs); line-height: var(--lh-xs); font-weight: var(--weight-medium); letter-spacing: 0.02em; color: var(--fg-3); }
.chat__msg p { color: var(--fg-body); }
.chat__msg p + p, .chat__msg p + ul, .chat__msg ul + p { margin-top: var(--space-100); }
.chat__msg ul { display: grid; gap: var(--space-75); }
.chat__msg li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--space-100); align-items: start; }
.chat__msg .tier__box { margin-top: var(--space-25); }

/* Homepage row: a short, honest pointer to the API */
.assist { display: grid; gap: var(--space-200); padding: var(--space-500) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.assist h2 { font-size: var(--text-2xl); line-height: var(--lh-2xl); letter-spacing: -0.015em; }
.assist p { color: var(--fg-2); max-width: 65ch; }
.assist__head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-100); }
.assist__body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-200); }
@media (min-width: 960px) { .assist { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-700); } }

/* Sample report: show the same issue as JSON */
.asjson { margin-top: var(--space-300); }
.asjson__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-100); }
.asjson__pane[hidden] { display: none; }

/* App: API keys and MCP connect */
.meter { display: grid; gap: var(--space-100); }
.meter__stats { display: grid; gap: var(--space-200); }
@media (min-width: 720px) { .meter__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.meter__stat dt { font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }
.meter__stat dd { margin-top: var(--space-25); font-family: var(--font-mono); font-size: var(--text-2xl); line-height: var(--lh-2xl); color: var(--fg); font-variant-numeric: tabular-nums; }
.meter__stat dd small { font-family: var(--font-sans); color: var(--fg-3); margin-left: var(--space-75); }
.meter__track { height: 8px; border-radius: var(--radius-full); background: var(--surface-selected); overflow: hidden; }
.meter__fill { display: block; width: 100%; height: 100%; border-radius: var(--radius-full); background: var(--btn); transform-origin: left center; transform: scaleX(0); transition: transform var(--dur-move) var(--ease); }
.meter__fill.is-38 { transform: scaleX(0.38); }
.meter__note { font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--fg-3); }

.keys { border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface-panel); overflow: hidden; }
.keyrow { display: grid; gap: var(--space-100); padding: var(--space-200); border-bottom: 1px solid var(--line); }
.keyrow:last-child { border-bottom: 0; }
.keyrow__main { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-75) var(--space-200); }
.keyrow__name { font-weight: var(--weight-semibold); color: var(--fg); }
.keyrow__meta { display: flex; flex-wrap: wrap; gap: var(--space-50) var(--space-200); font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-3); }
.keyrow__act { display: flex; flex-wrap: wrap; gap: var(--space-75); align-items: center; }
.keyrow.is-revoking .keyrow__act [data-revoke] { display: none; }
.keyrow.is-gone { display: none; }
.keyrow__confirm { display: none; align-items: center; flex-wrap: wrap; gap: var(--space-100); padding-top: var(--space-50); font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-2); }
.keyrow.is-revoking .keyrow__confirm { display: flex; animation: rise var(--dur-move) var(--ease); }
@media (min-width: 720px) { .keyrow { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: var(--space-200) var(--space-300); } .keyrow__confirm { grid-column: 1 / -1; } }

.secret { display: none; gap: var(--space-200); padding: var(--space-300); border: 1px solid var(--line-mid); border-radius: var(--radius-xl); background: var(--surface-tint); }
.secret.is-shown { display: grid; animation: rise var(--dur-move) var(--ease); }
.secret h3 { font-size: var(--text-lg); line-height: var(--lh-lg); }
.secret p { color: var(--fg-2); font-size: var(--text-sm); line-height: var(--lh-sm); }
.newkey { display: none; gap: var(--space-200); padding: var(--space-300); border: 1px solid var(--line-strong); border-radius: var(--radius-xl); background: var(--surface-sunken); }
.newkey.is-shown { display: grid; animation: rise var(--dur-move) var(--ease); }
.newkey h3 { font-size: var(--text-lg); line-height: var(--lh-lg); }
.checkrow { display: flex; align-items: flex-start; gap: var(--space-100); font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-2); }
.checkrow input { margin-top: var(--space-25); width: 16px; height: 16px; accent-color: var(--fg); }
.hooks { border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface-panel); overflow: hidden; }
.hook { display: grid; gap: var(--space-50); padding: var(--space-200); border-bottom: 1px solid var(--line); }
.hook:last-child { border-bottom: 0; }
.hook__url { font-family: var(--font-mono); font-size: var(--text-sm); line-height: var(--lh-sm); overflow-wrap: anywhere; color: var(--fg); }
.hook__meta { font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--fg-3); }
.hook.is-gone { display: none; }
.apiview { display: none; }
.apiview.is-shown { display: block; animation: rise var(--dur-move) var(--ease); }
.tagrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-100); }
.copy { display: none; }
.js .copy { display: inline-flex; }
.asjson__bar { display: none; padding-bottom: var(--space-300); }
.js .asjson__bar { display: flex; }
.asjson__bar { display: none; padding-bottom: var(--space-300); }
.js .asjson__bar { display: flex; }

/* Grid and flex children may shrink below their content so code blocks scroll inside themselves */
.doc > *, .set-group__body > *, .tabs, .tabs__panel, .code { min-width: 0; max-width: 100%; }
.code pre { overflow-x: auto; }
.table--api tbody th code, .table--api tbody td:first-child code { white-space: nowrap; }
.table--stack td:empty { display: none; }
#json { scroll-margin-top: var(--space-900); }

/* App only: the mobile shop switcher sits in the top bar next to the brand. */
.app-top__shop .select { max-width: 11rem; }
