/* =========================================================================
   Aging Benchmark — site styles
   Plain CSS, no build step. Tokens first, then layout, then components.
   Signature: the tick axis of the logo (reference → ideal) reused for the
   hero schematic, the scoring figure and the score bars.
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  /* palette */
  --bg: #F7F8FA;            /* page */
  --surface: #FFFFFF;       /* cards, tables */
  --surface-2: #FBFCFD;     /* table heads, quiet fills */
  --ink: #182338;           /* main text (deep navy) */
  --ink-2: #667085;         /* secondary text (slate) */
  --ink-3: #8A94A6;         /* faint labels */
  --line: #E5E9F0;          /* borders */
  --line-soft: #EEF1F5;     /* row rules */
  --indigo: #5366A8;        /* primary accent */
  --indigo-ink: #3E4F8E;    /* indigo for small text on light tints */
  --indigo-soft: #EEF1FA;
  --indigo-mid: #AEB8DC;
  --violet: #7663B5;
  --violet-soft: #F2EFFA;
  --teal: #4D9A9B;          /* biological accent */
  --teal-ink: #2F6F70;
  --teal-soft: #E8F3F3;
  --brand-navy: #1E2A44;    /* logo ink */
  --brand-coral: #D87963;   /* logo chart line (used only with the brand) */
  --axis: #D9DEE7;          /* logo axis */
  --tick: #9AA5B5;          /* logo ticks */
  --warn-bg: #FFF7EA; --warn-ink: #7A4B00; --warn-line: #F1DCB0;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --pad: 40px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-1: 0 1px 2px rgba(24, 35, 56, .04);
  --shadow-2: 0 1px 2px rgba(24, 35, 56, .04), 0 8px 24px rgba(24, 35, 56, .06);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (max-width: 720px) { :root { --pad: 20px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--font-sans); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh;
  display: flex; flex-direction: column;
}
main { flex: 1; outline: none; }
a { color: var(--indigo); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--indigo-ink); text-decoration-thickness: 2px; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 650; letter-spacing: -0.022em; line-height: 1.15; }
h1 { font-size: clamp(32px, 4vw, 44px); letter-spacing: -0.03em; }
h2 { font-size: clamp(24px, 2.8vw, 32px); }
h3 { font-size: clamp(18px, 1.8vw, 21px); letter-spacing: -0.015em; }
h4 { font-size: 15px; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num { white-space: nowrap; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 14px; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip-link:focus { left: 8px; color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
/* Full-width band inside the centered <main> container; content stays aligned with the container */
.bleed { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding-left: calc(50vw - 50%); padding-right: calc(50vw - 50%); }

/* Eyebrow labels echo the spaced capitals of the logo's subtitle */
.eyebrow {
  font: 600 12px/1.3 var(--font-sans); letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 12px;
}
.eyebrow b { color: var(--indigo); font-weight: 600; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--indigo); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(247, 248, 250, .86);
  backdrop-filter: saturate(1.3) blur(10px); -webkit-backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 32px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; flex: none; padding: 6px 4px 6px 0; border-radius: 6px; }
.brand img { display: block; height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  position: relative; color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 8px 14px; border-radius: 8px; white-space: nowrap; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--ink); background: rgba(24, 35, 56, .045); }
.nav a.active { color: var(--ink); }
.nav a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -15px; height: 2px; border-radius: 2px; background: var(--indigo);
}
.nav a[data-nav="submit"] { margin-left: 8px; border: 1px solid var(--line); background: var(--surface); }
.nav a[data-nav="submit"]:hover { border-color: var(--indigo-mid); }
.nav-toggle {
  display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 1.6px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s var(--ease), opacity .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.topbar.open .nav-toggle span { background: transparent; }
.topbar.open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.topbar.open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 900px) {
  .topbar-inner { min-height: 60px; flex-wrap: wrap; gap: 0; }
  .brand img { height: 34px; }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 6px 0 14px; }
  .topbar.open .nav { display: flex; }
  .nav a { padding: 12px 12px; font-size: 16px; }
  .nav a.active { background: var(--indigo-soft); color: var(--indigo-ink); }
  .nav a.active::after { display: none; }
  .nav a[data-nav="submit"] { margin-left: 0; }
}

/* ---------- Footer ---------- */
.footer { margin-top: 112px; background: var(--surface); border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); gap: 40px; padding-top: 48px; padding-bottom: 32px; }
.footer-brand img { display: block; height: 64px; width: auto; max-width: 100%; }
.footer-brand p { margin-top: 16px; max-width: 420px; }
.footer h4 { font: 600 12px/1.3 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer ul a { color: var(--ink-2); text-decoration: none; }
.footer ul a:hover { color: var(--indigo); }
.footer-meta { border-top: 1px solid var(--line-soft); padding-top: 18px; padding-bottom: 28px; font: 12px/1.6 var(--font-mono); color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
.proto-tag { display: inline-flex; align-items: center; gap: 6px; }
.proto-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } .footer-brand img { height: 52px; } }

/* ---------- Page scaffolding ---------- */
.page { padding-top: 0; }
.page-head {
  background: var(--surface); border-bottom: 1px solid var(--line); padding-top: 52px; padding-bottom: 36px; margin-bottom: 36px;
}
.page-head h1 { max-width: 900px; }
.page-head p { color: var(--ink-2); font-size: 18px; margin: 14px 0 0; max-width: 820px; line-height: 1.55; }
.section { margin-top: 88px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { color: var(--ink-2); margin: 10px 0 0; max-width: 760px; }
.section-head .more-link { font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.section-head .more-link:hover { text-decoration: underline; }
.empty { padding: 48px 0; color: var(--ink-2); }
.notice { max-width: 640px; margin: 80px auto; padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.notice code { font-family: var(--font-mono); font-size: 14px; background: var(--bg); padding: 1px 6px; border-radius: 4px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.hairline { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }

/* ---------- Buttons, chips, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font: 600 15px/1 var(--font-sans); padding: 13px 20px; border-radius: 10px;
  border: 1px solid var(--ink); background: var(--ink); color: #fff; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s var(--ease), box-shadow .15s;
}
.btn:hover { background: #263453; border-color: #263453; color: #fff; text-decoration: none; box-shadow: 0 6px 16px rgba(24, 35, 56, .16); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn .arr { transition: transform .15s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--indigo-mid); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-1); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; font: 500 12px/1 var(--font-sans); padding: 5px 9px; border-radius: 999px;
  white-space: nowrap; border: 1px solid transparent; vertical-align: middle;
}
.chip-fm { background: var(--indigo-soft); color: var(--indigo-ink); border-color: #DCE2F3; }
.chip-baseline { background: var(--surface); color: var(--ink-2); border-color: #CDD3DE; }
.chip-specialist { background: var(--teal-soft); color: var(--teal-ink); border-color: #CFE5E5; }
.chip-flag { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); font-family: var(--font-mono); font-size: 11px; border-radius: 6px; }
.chip-secondary { background: var(--bg); color: var(--ink-2); font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; padding: 3px 6px; margin-left: 6px; border-color: var(--line); border-radius: 5px; }
.chip-unit { background: var(--surface); border-color: var(--line); color: var(--ink-2); font-family: var(--font-mono); font-size: 11px; border-radius: 6px; white-space: normal; line-height: 1.35; max-width: 100%; }
.chip-metric { background: var(--bg); border-color: var(--line); color: var(--ink-2); font-size: 12px; border-radius: 6px; }

.input, .select {
  font: 15px/1.3 var(--font-sans); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%; max-width: 440px;
  transition: border-color .15s, box-shadow .15s;
}
.input:hover, .select:hover { border-color: #CDD3DE; }
.input:focus, .select:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(83, 102, 168, .16); outline: none; }
.search { max-width: 300px; padding-left: 36px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238A94A6' stroke-width='1.6'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E") no-repeat 12px 50%; }

/* Segmented filter (method family) */
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); gap: 2px; }
.seg button {
  font: 500 13px/1 var(--font-sans); color: var(--ink-2); background: transparent; border: 0; padding: 8px 12px; border-radius: 7px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s;
}
.seg button:hover { color: var(--ink); background: var(--bg); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg button .k { font: 500 11px/1 var(--font-mono); opacity: .7; }

/* FM identity dot */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 9px; vertical-align: 1px; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }

/* Metric help button + floating tooltip */
.tip {
  display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 5px;
  border-radius: 50%; border: 1px solid #CDD3DE; background: var(--surface); color: var(--ink-3);
  font: 600 10px/1 var(--font-mono); cursor: help; padding: 0; vertical-align: 1px; transition: color .15s, border-color .15s;
}
.tip:hover, .tip:focus-visible { color: var(--indigo); border-color: var(--indigo); }
.tooltip {
  position: fixed; z-index: 60; max-width: 320px; padding: 10px 12px; border-radius: 10px;
  background: var(--ink); color: #fff; font: 13px/1.5 var(--font-sans); box-shadow: 0 10px 30px rgba(24, 35, 56, .24);
  pointer-events: none;
}

/* Toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 10px 30px rgba(24, 35, 56, .25); animation: toast-in .2s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* =========================================================================
   Home
   ========================================================================= */
.hero-band {
  background:
    radial-gradient(60% 80% at 88% 30%, rgba(77, 154, 155, .10), transparent 70%),
    radial-gradient(50% 70% at 62% 90%, rgba(118, 99, 181, .08), transparent 70%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 56px; align-items: center; padding: 72px 0 80px; }
.hero h1 { font-size: clamp(38px, 4.6vw, 58px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; max-width: 640px; }
.hero h1 .accent { color: var(--indigo); }
.hero .lede { font-size: clamp(18px, 1.6vw, 20px); color: var(--ink-2); margin: 22px 0 32px; max-width: 560px; line-height: 1.55; }
.hero .meta-line { margin-top: 22px; font: 13px/1.5 var(--font-sans); color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px 16px; }
.hero .meta-line span { display: inline-flex; align-items: center; gap: 7px; }
.hero .meta-line span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.hero .meta-line span.sim::before { background: var(--violet); }
@media (max-width: 1000px) { .hero { grid-template-columns: 1fr; gap: 40px; padding: 48px 0 56px; } }

/* Hero schematic */
.hero-figure { margin: 0; padding: 18px 18px 14px; }
.hero-figure svg { display: block; width: 100%; height: auto; }
.hero-figure figcaption { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; display: flex; gap: 10px; align-items: baseline; }
.hero-figure figcaption b { font: 600 10.5px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--line); border-radius: 4px; padding: 3px 5px; }
.hf-panel { fill: var(--surface-2); stroke: var(--line); }
.hf-label { font: 600 10px var(--font-sans); letter-spacing: .14em; fill: var(--ink-2); text-transform: uppercase; }
.hf-small { font: 500 10.5px var(--font-mono); fill: var(--ink-3); }
.hf-dot { animation: hf-in .7s var(--ease) both; animation-delay: var(--d, 0ms); transform-box: fill-box; transform-origin: center; }
@keyframes hf-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.hf-traj { stroke-dasharray: 900; stroke-dashoffset: 900; animation: hf-draw 1.8s .5s var(--ease) forwards; }
.hf-traj.b { animation-delay: 1.3s; }
@keyframes hf-draw { to { stroke-dashoffset: 0; } }
.hf-pt { animation: hf-in .5s var(--ease) both; animation-delay: var(--d, 1.2s); transform-box: fill-box; transform-origin: center; }

/* A: metric strip */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: -40px; position: relative; z-index: 1; }
.stat { padding: 26px 24px 24px; position: relative; }
.stat + .stat { border-left: 1px solid var(--line-soft); }
.stat::before { /* tick, as on the logo's axis */
  content: ""; position: absolute; top: 0; left: 24px; width: 1.8px; height: 10px; background: var(--tick);
}
.stat .v { font: 650 clamp(28px, 2.8vw, 38px)/1.05 var(--font-sans); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.03em; color: var(--ink); }
.stat .l { color: var(--ink-2); font-size: 14px; margin-top: 8px; line-height: 1.4; }
@media (max-width: 1080px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stat:nth-child(4) { border-left: 0; } .stat:nth-child(n+4) { border-top: 1px solid var(--line-soft); } }
@media (max-width: 600px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -28px; } .stat { padding: 20px 16px; } .stat::before { left: 16px; } .stat:nth-child(odd) { border-left: 0; } .stat:nth-child(4) { border-left: 1px solid var(--line-soft); } .stat:nth-child(n+3) { border-top: 1px solid var(--line-soft); } }

/* B: task cards (3 + 2 on wide screens) */
.task-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.task-card {
  grid-column: span 2; display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: inherit; text-decoration: none; box-shadow: var(--shadow-1);
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.task-card:nth-child(4), .task-card:nth-child(5) { grid-column: span 3; }
.task-card:hover { border-color: var(--indigo-mid); box-shadow: var(--shadow-2); transform: translateY(-2px); color: inherit; text-decoration: none; }
.task-card .tc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.task-card .tn { font: 600 12px/1 var(--font-mono); color: var(--indigo); letter-spacing: .06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; }
.task-card .tn i { width: 22px; height: 22px; border-radius: 6px; background: var(--indigo-soft); color: var(--indigo-ink); display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; }
.task-card .nb { font: 12px/1 var(--font-mono); color: var(--ink-3); }
.task-card h3 { font-size: 20px; }
.task-card .q { color: var(--ink); font-size: 15px; margin: 0; line-height: 1.55; }
.task-card .ctx { font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.5; }
.task-card .ctx b { font: 600 10.5px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 4px; }
.task-card .aspects { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.task-card .go { font-size: 14px; font-weight: 600; color: var(--indigo); border-top: 1px solid var(--line-soft); padding-top: 14px; margin-top: 4px; display: flex; justify-content: space-between; align-items: center; }
.task-card .go .arr { transition: transform .2s var(--ease); }
.task-card:hover .go .arr { transform: translateX(4px); }
@media (max-width: 1000px) { .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .task-card, .task-card:nth-child(4), .task-card:nth-child(5) { grid-column: span 1; } .task-card:nth-child(5) { grid-column: 1 / -1; } }
@media (max-width: 640px) { .task-grid { grid-template-columns: 1fr; } .task-card:nth-child(5) { grid-column: auto; } }

/* C: scoring framework */
.score-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.score-col { display: grid; gap: 18px; }
@media (max-width: 1000px) { .score-grid { grid-template-columns: 1fr; } }
.score-fig { padding: 26px 26px 20px; }
.score-fig svg { display: block; width: 100%; height: auto; margin: 6px 0 4px; }
.sf-txt { font: 500 12px var(--font-sans); fill: var(--ink-2); }
.sf-num { font: 600 12px var(--font-mono); fill: var(--ink); }
.sf-cap { font: 600 10px var(--font-sans); letter-spacing: .14em; text-transform: uppercase; fill: var(--ink-3); }
.formulas { display: grid; gap: 8px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.formula { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 12px; font-size: 13.5px; color: var(--ink-2); align-items: baseline; }
.formula > span { white-space: nowrap; }
.formula code { font: 500 13px/1.4 var(--font-mono); color: var(--ink); background: var(--bg); border: 1px solid var(--line-soft); border-radius: 6px; padding: 4px 8px; justify-self: start; }
@media (max-width: 640px) { .formula { grid-template-columns: 1fr; gap: 4px; } }
.score-steps { padding: 26px; }
.score-steps ol { list-style: none; margin: 12px 0 0; padding: 0; counter-reset: s; display: grid; gap: 0; }
.score-steps li { counter-increment: s; position: relative; padding: 0 0 18px 38px; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.score-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--indigo-mid); color: var(--indigo-ink); font: 600 12px/22px var(--font-mono); text-align: center; background: var(--surface); }
.score-steps li::after { content: ""; position: absolute; left: 12px; top: 28px; bottom: 4px; border-left: 1px dashed var(--indigo-mid); }
.score-steps li:last-child { padding-bottom: 0; }
.score-steps li:last-child::after { display: none; }
.score-steps li b { color: var(--ink); font-weight: 600; }
.score-steps .note { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 13.5px; color: var(--ink-2); }
.score-steps .note p { margin: 0 0 6px; }

/* Per-task reference -> ideal rails (home scoring section) */
.scale-card { padding: 24px 26px 12px; }
.scale-card .eyebrow { margin-bottom: 6px; }
.scale-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px 16px; padding: 14px 0; border-top: 1px solid var(--line-soft); align-items: center; }
.scale-card .eyebrow + .scale-row { border-top: 0; }
.scale-row .scale-line { grid-column: 2; }
.scale-row .tnum { font: 600 12px/1 var(--font-mono); color: var(--indigo); letter-spacing: .04em; text-transform: uppercase; }
.scale-row .ttitle { font-weight: 600; font-size: 15px; }
.scale-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 16px; font-size: 13px; color: var(--ink-2); }
.scale-line .rail { grid-column: 1 / -1; grid-row: 1; position: relative; height: 12px; }
.scale-line .from { grid-row: 2; grid-column: 1; }
.scale-line .to { grid-row: 2; grid-column: 2; text-align: right; }
.scale-line .rail::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; border-top: 1.5px dashed var(--indigo-mid); }
.scale-line .rail::after { content: ""; position: absolute; right: 0; top: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--indigo); }
.scale-line .rail i { position: absolute; left: 0; top: 2px; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--indigo); background: var(--surface); }
@media (max-width: 600px) { .scale-row { grid-template-columns: 1fr; } .scale-row .scale-line { grid-column: 1; } }

/* D: key finding (editorial) */
.finding-band { background: var(--ink); color: #fff; padding-top: 72px; padding-bottom: 72px; margin-top: 96px; position: relative; overflow: hidden; }
.finding-band::after { /* the logo axis, large and quiet */
  content: ""; position: absolute; left: 0; right: 0; bottom: 36px; height: 14px;
  background:
    linear-gradient(rgba(255, 255, 255, .14), rgba(255, 255, 255, .14)) 0 6px / 100% 1.5px no-repeat,
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .22) 0 1.5px, transparent 1.5px 120px);
}
.finding { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
.finding .eyebrow { color: rgba(255, 255, 255, .62); margin: 8px 0 0; }
.finding .eyebrow b { color: #fff; display: block; font-size: 13px; margin-top: 6px; letter-spacing: .02em; text-transform: none; font-weight: 500; }
.finding .ftext p { font-size: clamp(20px, 2.1vw, 27px); line-height: 1.45; letter-spacing: -0.015em; margin: 0 0 16px; color: #fff; max-width: 900px; }
.finding .ftext p:last-child { margin-bottom: 0; }
.finding .ftext .first-sent { color: #fff; }
.finding .ftext .rest { color: rgba(255, 255, 255, .78); }
.finding .fcta { margin-top: 28px; }
.finding .fcta a { color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .4); padding-bottom: 2px; }
.finding .fcta a:hover { border-bottom-color: #fff; }
@media (max-width: 760px) { .finding { grid-template-columns: 1fr; gap: 12px; } .finding-band { padding-top: 52px; padding-bottom: 64px; } }

/* E: research transparency */
.links-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1000px) { .links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .links-grid { grid-template-columns: 1fr; } }
.link-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; color: inherit; text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
a.link-card:hover { border-color: var(--indigo-mid); box-shadow: var(--shadow-2); transform: translateY(-2px); color: inherit; text-decoration: none; }
.link-card .lk { font: 600 12px/1 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--indigo); }
.link-card h3 { font-size: 18px; }
.link-card p { font-size: 14px; color: var(--ink-2); margin: 0; flex: 1; }
.link-card .go { font-size: 14px; font-weight: 600; color: var(--indigo); }
.prov { display: grid; gap: 6px; font: 12px/1.45 var(--font-mono); color: var(--ink-2); margin: 0; }
.prov div { display: flex; justify-content: space-between; gap: 10px; border-top: 1px dashed var(--line); padding-top: 6px; }
.prov div:first-child { border-top: 0; padding-top: 0; }
.prov dt { color: var(--ink-3); }
.prov dd { margin: 0; color: var(--ink); text-align: right; word-break: break-all; }

/* =========================================================================
   Tasks
   ========================================================================= */
.task-list { display: grid; gap: 16px; }
.task-item {
  display: grid; grid-template-columns: 96px minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; padding: 28px; align-items: start;
  color: inherit; text-decoration: none; transition: border-color .2s, box-shadow .2s;
}
a.task-item:hover { border-color: var(--indigo-mid); box-shadow: var(--shadow-2); color: inherit; text-decoration: none; }
a.task-item:hover h3 { color: var(--indigo-ink); }
.task-item .tbig { font: 600 44px/1 var(--font-mono); color: var(--indigo); letter-spacing: -0.04em; }
.task-item .tbig small { display: block; font: 600 11px/1 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.task-item p { color: var(--ink-2); margin: 10px 0 0; }
.task-item .tdata { font-size: 14px; }
.task-item .facts { display: grid; gap: 12px; font-size: 13.5px; color: var(--ink-2); border-left: 1px solid var(--line-soft); padding-left: 24px; }
.task-item .facts .k { display: block; font: 600 10.5px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.task-item .facts .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.task-item .facts .meta { font: 13px/1.4 var(--font-mono); color: var(--ink); }
.task-item .cta { margin-top: 16px; font-weight: 600; font-size: 14px; color: var(--indigo); }
@media (max-width: 900px) { .task-item { grid-template-columns: 1fr; gap: 14px; padding: 22px; } .task-item .facts { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-soft); padding-top: 14px; } .task-item .tbig { font-size: 32px; } }

.task-switch { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 22px; }
.task-switch a { font: 500 13px/1 var(--font-sans); padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); text-decoration: none; }
.task-switch a:hover { border-color: var(--indigo-mid); color: var(--ink); }
.task-switch a.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.fact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fact-grid .fact { padding: 20px 22px; }
.fact-grid .fact.wide { grid-column: 1 / -1; }
.fact .k { font: 600 11px/1 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.fact .v { font-size: 15.5px; color: var(--ink); line-height: 1.55; }
.fact .v.mono { font-size: 14px; }
.fact .k .ring { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--indigo); }
.fact .k .full { width: 9px; height: 9px; border-radius: 50%; background: var(--indigo); }
@media (max-width: 860px) { .fact-grid { grid-template-columns: 1fr; } }

.dl { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 0; border-top: 1px solid var(--line); max-width: 980px; }
.dl dt, .dl dd { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
.dl dt { font: 600 11px/1.3 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); padding-top: 17px; }
@media (max-width: 640px) { .dl { grid-template-columns: 1fr; } .dl dt { border-bottom: 0; padding-bottom: 0; } }
.prose { max-width: 820px; }
.prose p { color: var(--ink-2); }
.sub-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sub-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }

/* ---------- Tables (shared) ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 11px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line-soft); }
thead th {
  position: sticky; top: 0; background: var(--surface-2); font-weight: 600; font-size: 12px; color: var(--ink-2);
  border-bottom: 1px solid var(--line); white-space: nowrap; letter-spacing: .01em; z-index: 1;
}
tbody tr:last-child > td { border-bottom: 0; }
td.r, th.r { text-align: right; }
td.c, th.c { text-align: center; }
.plain-table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

/* =========================================================================
   Leaderboard
   ========================================================================= */
.pills { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .pills { display: flex; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; } }
.pill {
  flex: none; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; min-width: 170px;
  transition: border-color .15s, box-shadow .15s; box-shadow: var(--shadow-1); position: relative;
}
.pill .pn { font: 600 11px/1 var(--font-mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.pill .pt { font-size: 14px; font-weight: 600; line-height: 1.3; }
.pill:hover { border-color: var(--indigo-mid); color: var(--ink); text-decoration: none; }
.pill.active { border-color: var(--indigo); box-shadow: 0 0 0 1px var(--indigo) inset, var(--shadow-1); }
.pill.active .pn { color: var(--indigo); }

.board-tabs { display: flex; flex-wrap: wrap; gap: 0; margin-top: 26px; border-bottom: 1px solid var(--line); }
@media (max-width: 860px) { .board-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; } }
.board-tab {
  flex: none; padding: 12px 16px; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s, border-color .15s;
}
.board-tab:hover { color: var(--ink); border-bottom-color: var(--line); text-decoration: none; }
.board-tab.active { color: var(--ink); border-bottom-color: var(--indigo); font-weight: 600; }

.board-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin: 30px 0 18px; }
.board-head h2 { font-size: clamp(22px, 2.4vw, 28px); }
.board-head p { color: var(--ink-2); margin: 10px 0 0; max-width: 860px; }
.board-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.board-facts b { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
.unit-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.units-more { margin-top: 12px; font-size: 13px; }
.units-more summary { cursor: pointer; color: var(--indigo); font-weight: 500; }

.info-box { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--indigo); border-radius: var(--radius-sm); padding: 14px 18px; margin: 0 0 20px; font-size: 14px; color: var(--ink-2); }
.info-box ul { margin: 0; padding-left: 18px; }
.info-box li + li { margin-top: 5px; }
.info-box .ib-title { font: 600 11px/1.3 var(--font-sans); text-transform: uppercase; letter-spacing: .14em; color: var(--indigo-ink); margin-bottom: 8px; }

/* Rank badge: prominent mono numeral; top 3 get a quiet indigo outline only */
.rank {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 28px; padding: 0 8px; border-radius: 8px;
  background: var(--bg); font: 600 13px/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink);
}
.rank.top { background: var(--indigo-soft); color: var(--indigo-ink); box-shadow: 0 0 0 1px #D3DAF0 inset; }

.lb td.method { min-width: 230px; }
.lb th:first-child, .lb td:first-child, .lb td:last-child, .lb th:last-child { width: 1%; white-space: nowrap; }
.lb tbody td { padding-top: 12px; padding-bottom: 12px; }
.mname { display: flex; align-items: center; font-weight: 600; color: var(--ink); }
.madapt { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; padding-left: 18px; }
.lb tr.row.x { cursor: pointer; }
.lb tr.row > td { transition: background .12s; }
.lb tr.row:hover > td { background: #F9FAFC; }
.lb tr.row.open > td { background: #F6F8FC; border-bottom-color: transparent; }
.lb .expander { border: 1px solid transparent; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 12px; width: 28px; height: 28px; border-radius: 8px; transition: transform .2s var(--ease), color .15s, border-color .15s; }
.lb .expander:hover { border-color: var(--line); color: var(--ink); }
.lb tr.row.open .expander { transform: rotate(90deg); color: var(--indigo); }
.lb td.score { min-width: 160px; }
.lb .board-rank { color: var(--ink-2); }

/* Score glyph: number + bar on the board's own axis, tick at 0 (the reference) */
.sc { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.sc .num { font-weight: 600; min-width: 54px; text-align: right; color: var(--ink); }
.bar { position: relative; width: 80px; height: 6px; border-radius: 3px; background: var(--line-soft); flex: none; }
.bar .fill { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, var(--indigo-mid), var(--indigo)); }
.bar .fill.neg { background: var(--tick); opacity: .75; }
.bar .zero { position: absolute; top: -4px; bottom: -4px; width: 1.8px; background: var(--tick); border-radius: 1px; }

/* Reference rows: score 0 by definition, dashed rules, raw values in the metric columns */
.lb tr.refrow > td { border-top: 1.5px dashed var(--indigo-mid); border-bottom: 1.5px dashed var(--indigo-mid); background: #F8F9FD; }
.lb tr.refrow + tr.refrow > td { border-top: 0; }
.lb tr.refrow .mname span:last-child { font: 500 12.5px/1.35 var(--font-mono); color: var(--indigo-ink); }
.lb tr.refrow .num { color: var(--ink-2); }
.rank.ref { background: var(--surface); border: 1.5px dashed var(--indigo-mid); color: var(--indigo-ink); font-weight: 500; box-shadow: none; }
.ref-ring { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--indigo); margin-right: 9px; flex: none; }
.chip-ref { background: var(--surface); color: var(--indigo-ink); border: 1px dashed var(--indigo-mid); }
/* Direction mark in column headers */
.dir { font-weight: 700; color: var(--indigo); margin-left: 1px; }
/* Score breakdown in an expanded row */
.breakdown { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 2px 0 10px; font-size: 12.5px; color: var(--ink-2); }
.breakdown b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.breakdown small { color: var(--ink-3); }
.breakdown i { font-style: normal; color: var(--ink-3); }

/* Expanded per-unit detail */
.lb tr.detail > td { background: #F6F8FC; padding: 6px 18px 22px 62px; border-bottom: 1px solid var(--line); }
.detail-inner { display: grid; gap: 12px; }
.detail-inner .adapt { font-size: 13px; color: var(--ink-2); }
.detail-inner .flags { display: flex; flex-wrap: wrap; gap: 6px; }
.mini { width: auto; min-width: 360px; font-size: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; border-collapse: separate; border-spacing: 0; }
.mini th, .mini td { padding: 7px 12px; }
.mini thead th { position: static; font-size: 11px; }
@media (max-width: 640px) { .lb tr.detail > td { padding-left: 14px; } .lb td.method { min-width: 180px; } .matrix th.fmh { min-width: 120px; } }

.lb-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 14px; flex-wrap: wrap; }
.lb-toolbar .tools { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; flex: 1; }
.lb-toolbar .count { font-size: 13px; color: var(--ink-3); font-family: var(--font-mono); }
@media (max-width: 760px) { .search { max-width: none; } .lb-toolbar .tools { flex-direction: column; align-items: stretch; } .seg { overflow-x: auto; } }

/* Partial / excluded / more */
.sub-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-top: 28px; }
.sub-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px 8px; box-shadow: var(--shadow-1); }
.sub-block h4 { margin-bottom: 4px; }
.sub-block > p { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.sub-item { padding: 12px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.sub-item .sm { font-weight: 600; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.sub-item .sr { color: var(--ink-2); margin-top: 4px; }
.sub-item ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }

details.more { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); }
details.more > summary { cursor: pointer; padding: 16px 20px; font-weight: 600; font-size: 15px; list-style: none; display: flex; align-items: center; gap: 10px; border-radius: var(--radius); }
details.more > summary:hover { background: var(--surface-2); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸"; color: var(--ink-3); transition: transform .2s var(--ease); }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more > summary span { font-weight: 400; color: var(--ink-3); font-size: 13px; }
.more-body { padding: 4px 20px 22px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.variant { padding: 12px 14px; background: var(--bg); border-radius: 10px; font-size: 13px; border: 1px solid var(--line-soft); }
.variant .vt { font: 600 18px/1.2 var(--font-mono); margin-top: 4px; }
.variant .vt.word { font: 500 13px/1.4 var(--font-sans); color: var(--ink-2); }

/* =========================================================================
   Side-by-side
   ========================================================================= */
.sbs-hint { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); margin-bottom: 12px; }
.sbs-hint button { font: 500 13px/1 var(--font-sans); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.sbs-hint button:hover { border-color: var(--indigo-mid); color: var(--ink); }
.matrix td, .matrix th { border-right: 1px solid var(--line-soft); }
.matrix td:last-child, .matrix th:last-child { border-right: 0; }
.matrix td { vertical-align: top; min-width: 176px; padding: 14px 16px; }
.matrix th.fmh { min-width: 170px; font-weight: 600; font-size: 14px; color: var(--ink); background: var(--surface); position: sticky; left: 0; z-index: 2; border-right: 1px solid var(--line); }
.matrix thead th.fmh { background: var(--surface-2); z-index: 3; }
.matrix thead th { white-space: normal; vertical-align: bottom; padding-top: 14px; padding-bottom: 14px; }
.matrix thead th .tl { display: block; font: 600 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--indigo); }
.matrix thead th .ct { display: block; font-weight: 600; font-size: 13px; color: var(--ink); margin-top: 6px; letter-spacing: 0; }
.matrix tbody tr { cursor: pointer; }
.matrix tbody tr:focus-visible { outline: 2px solid var(--indigo); outline-offset: -2px; }
.matrix tbody tr:hover > * { background: #F9FAFC; }
.matrix tbody tr.sel > * { background: var(--indigo-soft); }
.matrix tbody tr.sel th.fmh { box-shadow: inset 3px 0 0 var(--indigo); }
.cell-rank { font: 600 17px/1.2 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.cell-rank .lbl { font: 500 11px/1 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-right: 4px; }
.cell-rank .of { color: var(--ink-3); font-weight: 400; font-size: 14px; }
.cell-p { font: 12.5px/1.3 var(--font-mono); color: var(--ink-2); margin-top: 5px; }
.cell-m { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.4; }
.caption { font-size: 14px; color: var(--ink-2); margin-top: 16px; max-width: 860px; }

/* =========================================================================
   Submit (simulated)
   ========================================================================= */
.sim-banner {
  display: flex; gap: 16px; align-items: flex-start; padding: 16px 20px; border-radius: var(--radius);
  background: var(--violet-soft); border: 1px solid #DDD6F2; color: #4A3D80; font-size: 15px; margin-bottom: 32px;
}
.sim-banner b { font: 600 11px/1 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; padding: 6px 8px; border-radius: 6px; background: var(--violet); color: #fff; white-space: nowrap; margin-top: 1px; }
.submit-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 1000px) { .submit-grid { grid-template-columns: 1fr; } }
.form-card { padding: 30px 30px 8px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li { position: relative; padding: 0 0 30px 50px; counter-increment: step; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  font: 600 13px/1 var(--font-mono); color: var(--ink-2); background: var(--surface);
}
.steps > li.ok::before { content: "✓"; background: var(--indigo); border-color: var(--indigo); color: #fff; font-family: var(--font-sans); }
.steps > li::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 6px; border-left: 1px solid var(--line); }
.steps > li:last-child::after { display: none; }
.steps label.lab, .steps .lab { display: block; font-weight: 600; margin-bottom: 10px; padding-top: 4px; color: var(--ink); }
.steps .hint { font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.steps .hint.warn { color: #9A5B00; }

.track-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .track-toggle { grid-template-columns: 1fr; } }
.track-opt { position: relative; display: block; padding: 14px 16px 14px 42px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--ink-2); background: var(--surface); transition: border-color .15s, background .15s; }
.track-opt::before { content: ""; position: absolute; left: 16px; top: 17px; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #B8C0CE; background: var(--surface); }
.track-opt:hover { border-color: var(--indigo-mid); }
.track-opt input { position: absolute; opacity: 0; pointer-events: none; }
.track-opt strong { display: block; color: var(--ink); margin-bottom: 4px; }
.track-opt:has(input:checked), .track-opt.checked { border-color: var(--indigo); background: var(--indigo-soft); }
.track-opt:has(input:checked)::before, .track-opt.checked::before { border-color: var(--indigo); box-shadow: inset 0 0 0 3px var(--surface); background: var(--indigo); }
.track-opt:has(input:focus-visible) { outline: 2px solid var(--indigo); outline-offset: 2px; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  padding: 30px 20px; border: 1.5px dashed #C3CAD6; border-radius: var(--radius); background: var(--surface-2);
  color: var(--ink-2); cursor: pointer; font-size: 14px; transition: border-color .15s, background .15s;
}
.dropzone::before { content: ""; width: 36px; height: 36px; border-radius: 10px; background: var(--indigo-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%235366A8' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 12V3M5.5 6.5 9 3l3.5 3.5M3 12.5v2h12v-2'/%3E%3C/svg%3E") no-repeat center; }
.dropzone:hover, .dropzone.over { border-color: var(--indigo); background: var(--indigo-soft); }
.dz-text { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dropzone .dz-file { font-family: var(--font-mono); color: var(--ink); font-size: 14px; word-break: break-all; }
.format { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line-soft); font-size: 13px; color: var(--ink-2); white-space: pre-wrap; }
.format b { display: block; font: 600 10.5px/1.3 var(--font-sans); text-transform: uppercase; letter-spacing: .14em; color: var(--ink-3); margin-bottom: 6px; }

.side-panel { position: sticky; top: 96px; display: grid; gap: 16px; }
.status-card { padding: 22px 24px; }
.status-card h4 { margin-bottom: 4px; }
.status-card > p { font-size: 13px; color: var(--ink-3); margin: 0 0 14px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 15px; }
.checklist li .ic { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.checklist li.run { color: var(--ink); }
.checklist li.run .ic { border-color: var(--indigo); border-top-color: transparent; animation: spin .8s linear infinite; }
.checklist li.done { color: var(--ink); }
.checklist li.done .ic { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.checklist li.done .ic::before { content: "✓"; }
@keyframes spin { to { transform: rotate(360deg); } }

.result { padding: 24px; border-color: #D6CFF0; background: linear-gradient(180deg, var(--violet-soft), var(--surface) 60%); }
.result .badge { display: inline-block; font: 700 12px/1 var(--font-mono); letter-spacing: .2em; padding: 8px 12px; border-radius: 6px; border: 1.5px solid var(--violet); color: var(--violet); margin-bottom: 16px; background: var(--surface); }
.result .big { font: 600 48px/1 var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.result .rk { font-size: 16px; margin-top: 10px; }
.result .fine { font-size: 12px; color: var(--ink-2); margin-top: 14px; }
.history { font-size: 13px; }
.history h4 { margin-bottom: 8px; }
.history ol { margin: 0; padding-left: 20px; color: var(--ink-2); display: grid; gap: 6px; }

/* =========================================================================
   FAQ
   ========================================================================= */
.faq-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.faq-nav { position: sticky; top: 100px; display: grid; gap: 2px; }
.faq-nav a { font-size: 14px; color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 8px; border-left: 2px solid transparent; }
.faq-nav a:hover { color: var(--ink); background: var(--surface); }
@media (max-width: 860px) { .faq-layout { grid-template-columns: 1fr; } .faq-nav { position: static; display: flex; flex-wrap: wrap; gap: 6px; } .faq-nav a { border: 1px solid var(--line); background: var(--surface); } }
.faq-group + .faq-group { margin-top: 40px; }
.faq-group h2 { font-size: 20px; margin-bottom: 14px; }
.faq { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); }
.faq details { border-top: 1px solid var(--line-soft); }
.faq details:first-child { border-top: 0; }
.faq summary { cursor: pointer; padding: 18px 56px 18px 22px; font-weight: 600; font-size: 16px; list-style: none; position: relative; transition: background .15s; border-radius: var(--radius); }
.faq summary:hover { background: var(--surface-2); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); font: 400 16px/22px var(--font-mono); text-align: center; color: var(--ink-3); transition: transform .2s var(--ease), color .15s; }
.faq details[open] summary::after { content: "–"; color: var(--indigo); border-color: var(--indigo-mid); }
.faq .a { padding: 0 22px 20px; color: var(--ink-2); max-width: 780px; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
