/* =====================================================================
   MarketKernel — style.css
   Static site for お名前.com レンタルサーバー (no build step)
   ---------------------------------------------------------------------
   Palette : ice (page) / graphite (panels) / cobalt (demand, links)
             / rust (supply). Cobalt and rust are data hues, not
             "good / bad" — the site never grades a market.
   Type    : Shippori Mincho B1 (display) / IBM Plex Sans JP (body)
             / IBM Plex Mono (data, labels)
   Signature: hatched band = the gap between two observed lines.
   ===================================================================== */

:root {
  --ice: #EEF1F3;
  --ice-2: #E3E8EC;
  --white: #FFFFFF;
  --graphite: #14181D;
  --graphite-2: #1C2229;
  --graphite-3: #262D35;
  --ink: #14181D;
  --ink-2: #3A434C;
  --muted: #66707A;
  --faint: #98A2AB;
  --line: #CBD3D9;
  --line-2: #DCE2E7;
  --cobalt: #2346D0;
  --cobalt-deep: #1A37A8;
  --cobalt-soft: #DDE4FB;
  --rust: #C95A18;
  --rust-deep: #A94A10;
  --rust-soft: #F7E1D2;
  --ok: #1F7A5C;
  --ok-soft: #D9EFE6;
  --grid: rgba(20, 24, 29, .09);
  --grid-dark: rgba(255, 255, 255, .09);

  --font-display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --font-body: "IBM Plex Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", "Meiryo", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;

  --maxw: 1200px;
  --gutter: 24px;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(20, 24, 29, .06), 0 10px 30px rgba(20, 24, 29, .06);
  --header-h: 64px;
}

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ice);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  font-feature-settings: "palt" 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--cobalt); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--cobalt-deep); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.4; font-weight: 700; }
p { margin: 0 0 1.2em; text-wrap: pretty; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin: .25em 0; }
strong { font-weight: 700; }
code, kbd, pre, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
code { font-size: .92em; background: var(--ice-2); padding: .1em .4em; border-radius: 3px; }
pre {
  margin: 0 0 1.4em; padding: 18px 20px;
  background: var(--graphite); color: #E8EDF1;
  border-radius: var(--radius); overflow-x: auto;
  font-size: 13px; line-height: 1.7;
}
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
blockquote {
  margin: 0 0 1.4em; padding: 14px 22px;
  border-left: 3px solid var(--cobalt); background: var(--white);
  font-family: var(--font-display); font-size: 17px; line-height: 1.8;
}
blockquote p:last-child { margin-bottom: 0; }

:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--cobalt-soft); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--graphite); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm);
  text-decoration: none; font-size: 14px;
}
.skip:focus { top: 12px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 840px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- signature: hatch ---------- */
.hatch {
  background-image: repeating-linear-gradient(
    -45deg, rgba(20, 24, 29, .18) 0 1px, transparent 1px 6px);
}
.hatch-cobalt {
  background-image: repeating-linear-gradient(
    -45deg, rgba(35, 70, 208, .35) 0 1px, transparent 1px 6px);
}

/* ---------- eyebrow / labels ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
  margin: 0 0 14px;
}
.eyebrow::after { content: ""; flex: 0 0 48px; height: 1px; background: var(--line); }
.eyebrow.on-dark { color: var(--faint); }
.eyebrow.on-dark::after { background: var(--graphite-3); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  font-weight: 600; line-height: 1; padding: 6px 9px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); color: var(--ink-2); background: var(--white);
  white-space: nowrap; vertical-align: middle;
}
.badge-sample { border-style: dashed; color: var(--ink-2); }
.badge-sample::before { content: ""; width: 10px; height: 10px; border-radius: 2px; }
.badge-registered { border-color: var(--cobalt); color: var(--cobalt-deep); background: var(--cobalt-soft); }
.badge-pending { border-color: var(--line); color: var(--ink-2); }
.badge-supported { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.badge-refuted { border-color: var(--rust); color: var(--rust-deep); background: var(--rust-soft); }
.badge-example { border-style: dashed; color: var(--muted); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(238, 241, 243, .86);
  -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line-2);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; transition: height .25s ease; }
.site-header.compact .container { height: calc(var(--header-h) - 8px); }
.site-header.compact .brand-tag { opacity: 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-mark { width: 30px; height: 30px; flex: 0 0 auto; }
.brand-mark rect { fill: var(--graphite); }
.brand-mark .m-band { fill: rgba(255,255,255,.22); }
.brand-mark .m-demand { stroke: #8FA7FF; }
.brand-mark .m-supply { stroke: #F5B88C; }
.brand-name { font-family: var(--font-body); font-weight: 700; font-size: 19px; letter-spacing: -.01em; white-space: nowrap; }
.brand-tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; color: var(--muted); white-space: nowrap; margin-left: 4px; padding-left: 12px; border-left: 1px solid var(--line); line-height: 1.2; transition: opacity .2s; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--ink-2); font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: var(--radius-sm); white-space: nowrap; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--ice-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--cobalt); border-radius: 0; }
.nav .nav-cta {
  margin-left: 8px; background: var(--graphite); color: #fff; padding: 9px 16px; border-radius: var(--radius);
}
.nav .nav-cta:hover { background: var(--graphite-2); color: #fff; }
.nav .nav-cta[aria-current="page"] { color: #fff; border-radius: var(--radius); box-shadow: inset 0 -3px 0 var(--cobalt); }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line); background: var(--white);
  border-radius: var(--radius-sm); cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 2px; background: var(--ink); position: relative;
  transition: transform .25s, opacity .25s;
}
.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; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- nav backdrop / toast / heading anchors ---------- */
.nav-backdrop { position: fixed; inset: 0; background: rgba(20,24,29,.35); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 90; }
.nav-backdrop.show { opacity: 1; pointer-events: auto; }
body.nav-open { overflow: hidden; }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px); z-index: 130;
  background: var(--graphite); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(20,24,29,.25); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.prose h2 { position: relative; }
.h-anchor {
  margin-left: 10px; font-family: var(--font-mono); font-size: 15px; font-weight: 500; color: var(--faint);
  text-decoration: none; opacity: 0; transition: opacity .15s, color .15s; vertical-align: middle;
}
.prose h2:hover .h-anchor, .h-anchor:focus-visible { opacity: 1; }
.h-anchor:hover { color: var(--cobalt); }
@media (hover: none) { .h-anchor { opacity: .6; } }
.copy-btn.done { border-color: var(--ok); color: var(--ok); }

.pre-copy { position: relative; margin: 0 0 1.4em; }
.pre-copy pre { margin: 0; padding-right: 84px; }
.pre-copy .copy-btn { position: absolute; top: 10px; right: 10px; margin: 0; background: var(--graphite-2); color: #DCE2E7; border-color: var(--graphite-3); }
.pre-copy .copy-btn:hover { border-color: #fff; color: #fff; }

/* ---------- breadcrumbs / related / glossary ---------- */
.crumbs { margin: 0 0 18px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--cobalt); }
.related { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.related .grid-2 { gap: 14px; }
.related .route h3 { font-family: var(--font-body); }
dl.terms { margin: 0 0 1.4em; display: grid; gap: 0; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--white); overflow: hidden; }
dl.terms dt { padding: 16px 20px 4px; font-family: var(--font-mono); font-weight: 600; font-size: 14.5px; color: var(--ink); scroll-margin-top: calc(var(--header-h) + 20px); }
dl.terms dt:not(:first-child) { border-top: 1px solid var(--line-2); }
dl.terms dd { margin: 0; padding: 0 20px 16px; font-size: 14.5px; color: var(--ink-2); }
dl.terms dt:target, dl.terms dt:target + dd { background: var(--cobalt-soft); }
#hero-chart { aspect-ratio: 640 / 300; }

/* ---------- price (JPY primary, USD secondary) ---------- */
.price { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.price .usd { font-size: .62em; font-weight: 400; color: var(--muted); letter-spacing: 0; }
td.num .price { align-items: flex-end; }
.datacard-grid .v .price, .dd-metrics .v .price, .metric-example .v .price { align-items: flex-start; }
.datacard-grid .v .price .usd { color: var(--faint); }
.metric-example .v .price .usd { color: var(--faint); font-size: .6em; }

/* ---------- pricing ---------- */
.price-lines { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 0; font-size: 14.5px; color: var(--ink-2); }
.price-lines strong { font-family: var(--font-mono); font-weight: 600; color: var(--ink); font-size: 16px; }
.section-head .price-lines { margin-top: 14px; }
.price-table td.name { font-family: var(--font-mono); font-weight: 600; }
.price-table td.num strong { font-family: var(--font-mono); font-size: 15px; }
.estimator { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 14px 0 12px; }
.est-group { border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--white); padding: 14px 16px 10px; margin: 0; min-width: 0; }
.est-group legend { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 0 4px; }
.est-opt { display: flex; align-items: flex-start; gap: 10px; padding: 8px 4px; cursor: pointer; font-size: 14px; border-radius: var(--radius-sm); }
.est-opt:hover { background: #FAFBFC; }
.est-opt input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--cobalt); flex: 0 0 auto; }
.est-opt span { display: flex; flex-direction: column; line-height: 1.4; }
.est-opt small { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 1px; }
.est-check { border-top: 1px dashed var(--line-2); margin-top: 4px; padding-top: 10px; }
.est-result { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "k cta" "v cta" "f cta"; align-items: center; gap: 4px 20px; background: var(--graphite); color: #EDF1F4; border-radius: var(--radius); padding: 18px 22px; }
.est-result .k { grid-area: k; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.est-result .v { grid-area: v; font-family: var(--font-mono); font-size: 32px; font-weight: 600; color: #fff; line-height: 1.2; transition: opacity .15s; }
.est-result .v small { font-size: 14px; color: #C6CFD7; margin-left: 4px; font-weight: 400; }
.est-result .f { grid-area: f; font-size: 12px; color: #B9C3CC; }
.est-result .btn { grid-area: cta; }
.est-result.bump .v { animation: bump .3s ease; }
@keyframes bump { 0% { transform: translateY(2px); opacity: .6; } 100% { transform: none; opacity: 1; } }
.founding { border: 1px solid var(--cobalt); border-radius: var(--radius); background: var(--white); padding: 22px 24px; box-shadow: var(--shadow); margin: 0 0 12px; }
.founding-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.founding-price { display: block; font-family: var(--font-mono); font-size: 30px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.founding-price small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.founding .marklist li { font-size: 14.5px; }
.founding .btn { margin-top: 6px; }
@media (max-width: 840px) {
  .estimator { grid-template-columns: 1fr; }
  .est-result { grid-template-columns: 1fr; grid-template-areas: "k" "v" "f" "cta"; }
  .est-result .btn { width: 100%; margin-top: 8px; }
}

/* ---------- demo ---------- */
.demo-banner { background: var(--graphite); color: #DCE2E7; font-size: 13.5px; }
.demo-banner .container { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding-top: 10px; padding-bottom: 10px; }
.demo-banner .badge { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.demo-banner a { color: #9FB4FF; margin-left: auto; text-decoration: none; font-weight: 600; }
.page-head.compact .container { padding-top: 36px; padding-bottom: 30px; }
.demo { padding: 28px 0 40px; }
.demo-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.demo-side { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 12px; }
.demo-panel { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px 16px; }
.demo-panel .eyebrow { margin-bottom: 8px; }
.demo-panel .eyebrow::after { display: none; }
.demo-panel .filters { margin: 0; gap: 6px; }
.demo-panel .chip { padding: 6px 11px; font-size: 12.5px; }
.demo-panel .search { max-width: none; }
.demo-panel .search input { min-height: 42px; padding: 9px 12px; font-size: 14px; }
.demo-panel-actions { display: grid; gap: 8px; background: transparent; border: 0; padding: 0; }
.demo-panel-actions .btn { width: 100%; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.seg-btn { border: 0; background: var(--white); padding: 9px 8px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn[aria-pressed="true"] { background: var(--graphite); color: #fff; }
input[type="range"][data-demo-conf] { width: 100%; accent-color: var(--cobalt); margin: 6px 0 4px; }
.range-out { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12.5px; }
.range-out .hint { color: var(--muted); font-size: 11.5px; }
.demo-main { min-width: 0; }
.demo-table tbody tr[data-cat] { cursor: pointer; }
.demo-table tbody tr[data-cat]:hover td { background: #F3F6FF; }
.demo-table tbody tr.is-selected td { background: var(--cobalt-soft); }
.demo-table tbody tr.is-selected td.name { box-shadow: inset 3px 0 0 var(--cobalt); }
.demo-table tr.na td { color: var(--muted); }
.demo-table .na-cell { font-size: 13px; }
.demo-table .unit { color: var(--muted); font-size: 11px; }
.demo-table td.name code { font-size: 11px; }
.demo-detail { margin-top: 18px; }
.demo-detail.open { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; animation: rise .4s ease both; }
.dd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.dd-head .eyebrow { margin-bottom: 4px; }
.dd-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.3; }
.dd-path { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; letter-spacing: .04em; }
.dd-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.dd-metrics { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.dd-metrics .dc { background: var(--white); padding: 10px 12px; min-width: 0; }
.dd-metrics .k { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.dd-metrics .k small { display: block; font-family: var(--font-mono); font-size: 9.5px; color: var(--faint); font-weight: 400; }
.dd-metrics .v { display: block; font-family: var(--font-mono); font-size: 22px; font-weight: 600; margin-top: 4px; color: var(--ink); white-space: nowrap; }
.dd-metrics .v .unit { font-size: 10px; color: var(--muted); margin-left: 3px; }
.dd-metrics .v.demand { color: var(--cobalt); } .dd-metrics .v.supply { color: var(--rust-deep); }
.dd-metrics .v .conf { font-size: 22px; }
.dd-json { margin: 0 0 16px; font-size: 12px; }
.dd-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; margin-bottom: 16px; }
.dd-block .eyebrow { margin-bottom: 8px; }
.dd-chart .chart-box svg { border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #FCFCFD; }
.dd-chart .legend { color: var(--ink-2); }
.dd-chart .legend .l-demand::before { background: var(--cobalt); } .dd-chart .legend .l-supply::before { background: var(--rust); }
.dd-chart .legend .l-gap::before { background: repeating-linear-gradient(-45deg, rgba(20,24,29,.45) 0 1px, transparent 1px 4px); }
.xm.light { background: var(--white); border-color: var(--line-2); }
.xm.light > div { border-bottom-color: var(--line-2); color: var(--ink); }
.xm.light .h { background: var(--ice); color: var(--muted); }
.xm.light .r { color: var(--ink); }
.xm.light .demand { color: var(--cobalt); } .xm.light .supply { color: var(--rust-deep); }
.xm-levels { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.readout.light { background: var(--line-2); border-color: var(--line-2); }
.readout.light div { background: var(--white); }
.readout.light .k { color: var(--muted); } .readout.light .k .d { color: var(--ink-2); }
.readout.light .v { color: var(--ink); font-size: 17px; }
.readout.light .v.demand { color: var(--cobalt); } .readout.light .v.supply { color: var(--rust-deep); }
.factors { display: grid; gap: 6px; }
.factor { display: grid; grid-template-columns: 130px 1fr 92px; gap: 10px; align-items: center; font-size: 12.5px; }
.factor .fk .mono { color: var(--faint); font-size: 11px; margin-left: 4px; }
.factor .fbar { height: 8px; background: var(--ice-2); border-radius: 2px; overflow: hidden; position: relative; }
.factor .fbar i { position: absolute; inset: 0; width: var(--w, 0%); background: var(--graphite); }
.factor .fv { text-align: right; font-size: 11.5px; color: var(--ink-2); }
.factor.total { border-top: 1px solid var(--line-2); padding-top: 6px; font-weight: 600; }
.audit { font-size: 12px; margin: 0; }
@media (max-width: 1100px) {
  .demo-layout { grid-template-columns: 1fr; }
  .demo-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-panel-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .dd-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dd-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .demo-side { grid-template-columns: 1fr; }
  .demo-panel-actions { grid-template-columns: 1fr; }
  .dd-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .factor { grid-template-columns: 110px 1fr 80px; }
  .demo-banner a { margin-left: 0; }
}

/* ---------- demo v0.9: reading guide, presets, gap visuals, hero cards ---------- */
.howto { background: var(--cobalt-soft); border-bottom: 1px solid #C9D4F7; font-size: 14px; color: var(--ink); }
.howto .container { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding-top: 12px; padding-bottom: 12px; }
.howto-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--cobalt-deep); font-weight: 600; flex: 0 0 auto; }
.howto strong { color: var(--cobalt-deep); }
.demo-panel .hint { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); }
.howto-line { font-size: 13.5px; color: var(--ink-2); margin: 0 0 12px; padding: 10px 14px; background: var(--cobalt-soft); border-radius: var(--radius-sm); }
.howto-line strong { color: var(--cobalt-deep); }
.howto-line .howto-k { color: var(--muted); }
.datacard .gaplabel { display: block; color: #C6CFD7; font-size: 11px; }
td.num .gaplabel { display: inline; }
.presets .chip[aria-pressed="true"] { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.cols-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin-left: auto; }
.cols-toggle input { accent-color: var(--cobalt); }
.demo-table .col-extra { display: none; }
.demo-table.cols-all .col-extra { display: table-cell; }
.demo-table th.col-gap { min-width: 168px; }
.gapcell { display: inline-flex; align-items: center; gap: 8px; }
.gapbar { display: inline-block; width: 64px; height: 8px; position: relative; background: var(--ice-2); border-radius: 2px; overflow: hidden; }
.gapbar::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--faint); }
.gapbar i { position: absolute; top: 0; bottom: 0; width: calc(var(--w) / 2); }
.gapbar i.pos { left: 50%; background: var(--cobalt); }
.gapbar i.neg { right: 50%; background: var(--rust); }
.gapnum { min-width: 34px; text-align: right; }
.gaplabel { font-family: var(--font-body); font-size: 10.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.dd-hero { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.dh { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px 16px 12px; background: var(--white); }
.dh .k { display: block; font-size: 13px; font-weight: 700; color: var(--ink); }
.dh .k small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 1px; }
.dh .v { display: block; font-family: var(--font-mono); font-size: 40px; font-weight: 600; line-height: 1.1; margin: 8px 0 8px; color: var(--ink); }
.dh .v .gaplabel { display: block; font-size: 12px; margin-top: 2px; }
.dh.demand .v { color: var(--cobalt); } .dh.supply .v { color: var(--rust-deep); }
.dh .bar { display: block; height: 8px; background: var(--ice-2); border-radius: 2px; overflow: hidden; position: relative; }
.dh .bar i { position: absolute; inset: 0; width: var(--w, 0%); }
.dh.demand .bar i { background: var(--cobalt); } .dh.supply .bar i { background: var(--rust); }
.dh.gap .gapbar { display: block; width: 100%; }
.dd-sentence { font-size: 15px; color: var(--ink); margin: 0 0 12px; }
.dd-sub { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.dd-sub > div { background: var(--white); padding: 10px 12px; }
.dd-sub .k { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.dd-sub .k small { display: block; font-size: 10px; color: var(--faint); font-weight: 400; }
.dd-sub .v { display: block; font-family: var(--font-mono); font-size: 18px; font-weight: 600; margin-top: 4px; color: var(--ink); }
@media (max-width: 840px) {
  .dd-hero { grid-template-columns: 1fr; }
  .dd-sub { grid-template-columns: 1fr 1fr; }
  .dh .v { font-size: 32px; }
  .cols-toggle { margin-left: 0; }
}
@media (max-width: 1100px) { .brand-tag { display: none; } }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 10px; margin: 0 0 1.6em; }
details.faq { border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
details.faq summary {
  cursor: pointer; padding: 16px 18px; font-size: 15px; font-weight: 600; list-style: none;
  display: flex; align-items: flex-start; gap: 12px; line-height: 1.6;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before {
  content: "＋"; flex: 0 0 auto; font-family: var(--font-mono); color: var(--cobalt); font-weight: 600; margin-top: 1px;
  transition: transform .2s;
}
details.faq[open] summary::before { content: "－"; }
details.faq summary:hover { background: #FAFBFC; border-radius: var(--radius); }
details.faq .faq-body { padding: 0 18px 16px 42px; font-size: 14.5px; color: var(--ink-2); }
details.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- reading progress / back to top ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: var(--cobalt); transition: width .1s linear; }
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 110; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--white); color: var(--ink); box-shadow: var(--shadow);
  cursor: pointer; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s;
  font-family: var(--font-mono); font-size: 16px; display: flex; align-items: center; justify-content: center;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--radius); text-decoration: none; font-weight: 600;
  font-size: 14.5px; line-height: 1.2; border: 1px solid transparent; cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, transform .18s;
  min-height: 46px;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-deep); color: #fff; }
.btn-dark { background: var(--graphite); color: #fff; }
.btn-dark:hover { background: var(--graphite-3); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost.on-dark { color: #fff; border-color: rgba(255,255,255,.28); }
.btn-ghost.on-dark:hover { border-color: #fff; color: #fff; }
.btn .arrow { font-family: var(--font-mono); display: inline-block; transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- hero ---------- */
.hero {
  background: var(--graphite); color: #EDF1F4; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-dark) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,.15) 60%, transparent);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,.15) 60%, transparent);
}
.hero .container { position: relative; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px; align-items: center; padding: 72px 0 64px;
}
.hero-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(29px, 3.6vw, 46px); line-height: 1.35; letter-spacing: .01em;
  margin: 0 0 22px; text-wrap: balance;
}
.hero-title em { font-style: normal; color: #fff; border-bottom: 2px solid var(--cobalt); }
.hero-lede { font-size: 16.5px; color: #B9C3CC; max-width: 46ch; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin: 26px 0 0; font-family: var(--font-mono); font-size: 12px; color: var(--faint); letter-spacing: .04em; }

/* instrument panel (chart) */
.panel {
  background: var(--graphite-2); border: 1px solid var(--graphite-3); border-radius: 12px;
  padding: 18px 18px 14px; box-shadow: 0 30px 60px rgba(0,0,0,.35);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.panel-title { font-family: var(--font-mono); font-size: 12px; color: #C6CFD7; letter-spacing: .04em; }
.panel-title small { color: var(--faint); display: block; font-size: 11px; margin-top: 2px; }
.panel .badge { background: transparent; color: #E2E8ED; border-color: rgba(255,255,255,.25); }
.strip-chart { width: 100%; height: auto; touch-action: pan-y; cursor: crosshair; }
.strip-chart .cursor { pointer-events: none; transition: opacity .15s; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-family: var(--font-mono); font-size: 11.5px; color: #B9C3CC; }
.legend span::before { content: ""; display: inline-block; width: 18px; height: 2px; vertical-align: middle; margin-right: 8px; }
.legend .l-demand::before { background: #6C8CFF; }
.legend .l-supply::before { background: #F0A26B; }
.legend .l-gap::before { height: 8px; background: repeating-linear-gradient(-45deg, rgba(255,255,255,.55) 0 1px, transparent 1px 4px); }
.readout { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--graphite-3); border: 1px solid var(--graphite-3); border-radius: var(--radius); overflow: hidden; margin-top: 14px; }
.readout div { background: var(--graphite-2); padding: 10px 12px; }
.readout .k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; color: var(--faint); text-transform: uppercase; display: block; }
.readout .v { font-family: var(--font-mono); font-size: 19px; font-weight: 600; color: #fff; display: block; line-height: 1.3; margin-top: 2px; font-variant-numeric: tabular-nums; transition: color .2s; }
.readout.hover .v { color: #fff; }
.readout .k .d { color: #C6CFD7; margin-left: 6px; text-transform: none; letter-spacing: .04em; }
.readout .v.demand { color: #8FA7FF; }
.readout .v.supply { color: #F5B88C; }

/* hero data card */
.datacard {
  background: var(--graphite-2); border: 1px solid var(--graphite-3); border-radius: 12px; padding: 20px 20px 16px;
  box-shadow: 0 30px 60px rgba(0,0,0,.35); animation: rise .8s cubic-bezier(.2,.7,.2,1) .3s both; color: #EDF1F4;
}
.datacard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.datacard-cat { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.3; color: #fff; }
.datacard-path { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; color: var(--faint); margin-top: 4px; }
.datacard .badge { background: transparent; color: #E2E8ED; border-color: rgba(255,255,255,.25); flex: 0 0 auto; }
.datacard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--graphite-3); border: 1px solid var(--graphite-3); border-radius: var(--radius); overflow: hidden; }
.datacard-grid .dc { background: var(--graphite-2); padding: 12px 14px 10px; }
.datacard-grid .k { display: block; font-size: 12.5px; font-weight: 600; color: #DCE2E7; line-height: 1.3; }
.datacard-grid .k small { display: block; font-size: 10.5px; font-weight: 400; color: var(--faint); margin-top: 2px; letter-spacing: .02em; }
.datacard-grid .v { display: block; font-family: var(--font-mono); font-size: 26px; font-weight: 600; color: #fff; line-height: 1.2; margin-top: 6px; font-variant-numeric: tabular-nums; }
.datacard-grid .v.demand { color: #8FA7FF; }
.datacard-grid .v.supply { color: #F5B88C; }
.conf.on-dark { color: #fff; }
.conf.on-dark i { background: rgba(255,255,255,.14); }
.conf.on-dark i::after { background: #fff; }
.datacard-grid .v .conf { font-size: 26px; gap: 10px; }
.datacard-grid .v .conf i { width: 40px; height: 6px; }
.datacard-spark { position: relative; margin-top: 14px; border-top: 1px solid var(--graphite-3); padding-top: 10px; }
.datacard-spark svg { width: 100%; height: 56px; display: block; margin-top: 16px; }
.spark-label { position: absolute; right: 0; top: 8px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; color: var(--faint); }
.datacard-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: #9FB4FF; text-decoration: none; }
.datacard-more .arrow { display: inline-block; font-family: var(--font-mono); transition: transform .2s; }
.datacard-more:hover { color: #fff; }
.datacard-more:hover .arrow { transform: translateX(4px); }

/* light panel (data page) */
.panel.light { background: var(--white); border-color: var(--line-2); box-shadow: var(--shadow); }
.panel.light .panel-title { color: var(--ink-2); }
.panel.light .panel-title small { color: var(--muted); }
.panel.light .badge { background: var(--white); color: var(--ink-2); border-color: var(--line); }
.panel.light .legend { color: var(--ink-2); }
.panel.light .legend .l-demand::before { background: var(--cobalt); }
.panel.light .legend .l-supply::before { background: var(--rust); }
.panel.light .legend .l-gap::before { background: repeating-linear-gradient(-45deg, rgba(20,24,29,.45) 0 1px, transparent 1px 4px); }
.panel.light .readout { background: var(--line-2); border-color: var(--line-2); }
.panel.light .readout div { background: var(--white); }
.panel.light .readout .k { color: var(--muted); }
.panel.light .readout .v { color: var(--ink); }
.panel.light .readout .v.demand { color: var(--cobalt); }
.panel.light .readout .v.supply { color: var(--rust-deep); }
.panel.light .readout .k .d { color: var(--ink-2); }
.h2-inline { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.5; margin: 0 0 12px; }
.read-grid .card p:last-child { font-size: 14.5px; }
.read-grid .card .eyebrow { flex-wrap: wrap; row-gap: 4px; }
.read-grid .card .eyebrow::after { display: none; }
.read-grid .card .eyebrow code { text-transform: none; letter-spacing: 0; font-size: 11px; }

/* plain-language column headers with key subtext */
th.sortable button small { display: block; font-size: 9.5px; letter-spacing: .04em; text-transform: none; color: var(--faint); font-weight: 500; margin-top: 2px; }

/* status strip under hero */
.status-strip { background: var(--graphite-2); border-top: 1px solid var(--graphite-3); border-bottom: 1px solid var(--line); }
.status-strip .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.status-cell { padding: 16px 18px 16px 0; border-right: 1px solid var(--graphite-3); margin-right: 18px; }
.status-cell:last-child { border-right: 0; margin-right: 0; }
.status-cell .k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); display: block; }
.status-cell .v { font-family: var(--font-mono); font-size: 16px; font-weight: 600; color: #fff; display: block; margin-top: 4px; overflow-wrap: anywhere; }
.status-cell .v small { font-size: 11px; color: #B9C3CC; font-weight: 400; margin-left: 6px; }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--ice-2); }
.section-dark { background: var(--graphite); color: #EDF1F4; }
.section-dark a { color: #9FB4FF; }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head h2 {
  font-family: var(--font-display); font-size: clamp(25px, 3vw, 34px); font-weight: 700;
  line-height: 1.45; letter-spacing: .01em; text-wrap: balance;
}
.section-head .sub { color: var(--muted); font-size: 15.5px; margin: 14px 0 0; }
.section-dark .section-head .sub { color: #B9C3CC; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }

.card {
  background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 26px 26px 22px; box-shadow: var(--shadow);
}
.card h3 { font-size: 17.5px; font-weight: 700; margin-bottom: 10px; line-height: 1.5; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .eyebrow { margin-bottom: 10px; }
.card { transition: transform .2s ease, box-shadow .2s ease; }
.card:has(a):hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(20,24,29,.06), 0 16px 36px rgba(20,24,29,.10); }
.card-dark { background: var(--graphite-2); border-color: var(--graphite-3); color: #E8EDF1; box-shadow: none; }
.card-dark h3 { color: #fff; }
.card-flat { box-shadow: none; }
.card-cobalt { border-top: 3px solid var(--cobalt); }
.card-graphite { border-top: 3px solid var(--graphite); }

.statement {
  font-family: var(--font-display); font-size: clamp(22px, 2.8vw, 32px); line-height: 1.6;
  font-weight: 700; letter-spacing: .01em; text-wrap: balance; max-width: 28ch;
}
.statement .thin { font-weight: 600; color: var(--muted); }

/* reader routes */
.routes { padding: 40px 0 8px; }
.route {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink);
  background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 22px 22px 18px;
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.route:hover { transform: translateY(-2px); border-color: var(--cobalt); box-shadow: 0 2px 4px rgba(20,24,29,.06), 0 16px 36px rgba(20,24,29,.10); color: var(--ink); }
.route .eyebrow { margin-bottom: 4px; }
.route h3 { font-size: 16.5px; font-weight: 700; line-height: 1.5; }
.route p { font-size: 14px; color: var(--ink-2); margin: 0; }
.route .go { margin-top: auto; padding-top: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--cobalt-deep); letter-spacing: .04em; }
.route .go .arrow { display: inline-block; transition: transform .2s; }
.route:hover .go .arrow { transform: translateX(4px); }

/* lists with marks */
.marklist { list-style: none; padding: 0; margin: 0; }
.marklist li { position: relative; padding-left: 30px; margin: 10px 0; }
.marklist li::before {
  position: absolute; left: 0; top: .1em; font-family: var(--font-mono); font-weight: 600;
  width: 20px; text-align: center; font-size: 14px;
}
.marklist.yes li::before { content: "＋"; color: var(--cobalt); }
.marklist.no li::before { content: "—"; color: var(--rust); }

/* ---------- three layers diagram ---------- */
.layers { display: grid; gap: 0; max-width: 720px; }
.layer {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: start;
}
.layer .name { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--cobalt-deep); font-weight: 600; padding-top: 3px; }
.layer .desc { font-size: 14.5px; color: var(--ink-2); }
.layer .desc strong { color: var(--ink); }
.layer-index { border-color: var(--graphite); background: var(--graphite); color: #EDF1F4; }
.layer-index .name { color: #9FB4FF; }
.layer-index .desc { color: #C6CFD7; }
.layer-index .desc strong { color: #fff; }
.layer-link {
  position: relative; display: flex; align-items: center; padding: 14px 22px 14px 44px; min-height: 44px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; color: var(--muted);
}
.layer-link::before { content: ""; position: absolute; left: 25px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.layer-link::after {
  content: ""; position: absolute; left: 22px; top: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--cobalt);
  animation: flow 1.8s cubic-bezier(.5,0,.5,1) infinite;
}
.layer-link:nth-of-type(2)::after { animation-delay: .9s; }
@keyframes flow { 0% { top: -4px; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: calc(100% - 4px); opacity: 0; } }

/* ---------- tables ---------- */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow); margin: 0 0 1.4em;
}
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; line-height: 1.65; }
thead th {
  background: var(--ice); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FAFBFC; }
tbody tr.fade { animation: rowIn .35s ease both; animation-delay: calc(var(--i, 0) * 22ms); }
@keyframes rowIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
td.num, th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
td.name { font-weight: 600; }
.table-wrap.dense th, .table-wrap.dense td { padding: 9px 12px; font-size: 13.5px; }
.table-note { font-size: 12.5px; color: var(--muted); margin: -.4em 0 1.6em; }

.scroll-hint { display: none; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); margin: 0 0 6px; }

/* sortable */
th.sortable { padding: 0; }
th.sortable button {
  all: unset; display: block; width: 100%; position: relative;
  padding: 12px 26px 12px 14px; cursor: pointer; font: inherit; color: inherit; letter-spacing: inherit;
  text-transform: inherit; box-sizing: border-box; line-height: 1.35;
}
th.sortable.num button { text-align: right; }
th.sortable button::after { content: "↕"; opacity: .45; font-family: var(--font-mono); font-size: 11px; position: absolute; right: 12px; top: 13px; }
th.sortable[aria-sort="ascending"] button::after { content: "↑"; opacity: 1; color: var(--cobalt); }
th.sortable[aria-sort="descending"] button::after { content: "↓"; opacity: 1; color: var(--cobalt); }
th.sortable button:hover { background: var(--ice-2); }
.sort-note { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.sort-note .badge { font-size: 10.5px; }

/* glossary */
details.glossary { margin: 12px 0 1.4em; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--white); }
details.glossary summary { cursor: pointer; padding: 12px 16px; font-size: 14px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 10px; }
details.glossary summary::-webkit-details-marker { display: none; }
details.glossary summary::before { content: "＋"; font-family: var(--font-mono); color: var(--cobalt); transition: transform .2s; }
details.glossary[open] summary::before { content: "－"; }
details.glossary dl { margin: 0; padding: 4px 16px 14px; display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13.5px; }
details.glossary dt { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
details.glossary dd { margin: 0; color: var(--ink-2); }
th.sortable button[title] { cursor: help; }

/* confidence cell */
.conf { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); }
.conf i { display: inline-block; width: 44px; height: 6px; background: var(--ice-2); border-radius: 2px; overflow: hidden; position: relative; }
.conf i::after { content: ""; position: absolute; inset: 0; width: var(--w, 0%); background: var(--graphite); }
.conf.low i::after { background: repeating-linear-gradient(-45deg, var(--graphite) 0 1px, transparent 1px 3px); }

/* ---------- metric example block ---------- */
.metric-example {
  background: var(--graphite); color: #E8EDF1; border-radius: var(--radius); padding: 22px 24px;
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.8; overflow-x: auto;
}
.metric-example .cat { color: #fff; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.metric-example .row { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.metric-example .k { color: var(--faint); }
.metric-example .v { color: #fff; font-weight: 600; }
.metric-example .v.demand { color: #8FA7FF; }
.metric-example .v.supply { color: #F5B88C; }
.metric-example .up::before { content: "↑ "; }
.metric-example .down::before { content: "↓ "; }
.metric-example .flat::before { content: "→ "; }

/* cross-market card */
.xm { display: grid; grid-template-columns: 60px 1fr 1fr; gap: 0; border: 1px solid var(--graphite-3); border-radius: var(--radius); overflow: hidden; background: var(--graphite-2); font-family: var(--font-mono); }
.xm > div { padding: 12px 14px; border-bottom: 1px solid var(--graphite-3); font-size: 13.5px; }
.xm .h { background: var(--graphite); color: var(--faint); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.xm .r { color: #fff; font-weight: 600; }
.xm .demand { color: #8FA7FF; } .xm .supply { color: #F5B88C; }

/* pillars */
.pillar { padding: 28px 0 0; border-top: 1px solid var(--graphite); }
.pillar .n { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; color: var(--muted); margin-bottom: 14px; display: block; }
.pillar h3 { font-family: var(--font-display); font-size: 21px; font-weight: 700; margin-bottom: 12px; line-height: 1.5; }
.pillar p { font-size: 15px; color: var(--ink-2); }

/* CTA band */
.cta-band { background: var(--graphite-2); color: #EDF1F4; border-bottom: 1px solid var(--graphite-3); }
.cta-band .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-top: 56px; padding-bottom: 56px; }
.cta-band h2 { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; line-height: 1.5; }
.cta-band p { color: #B9C3CC; margin: 8px 0 0; max-width: 56ch; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- footer ---------- */
.site-footer { background: var(--graphite); color: #B9C3CC; border-top: 1px solid var(--graphite-3); font-size: 13.5px; }
.site-footer .container { padding-top: 48px; padding-bottom: 36px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
.site-footer .brand { color: #fff; }
.site-footer .brand-mark rect { fill: var(--graphite-3); }
.site-footer .foot-lede { margin: 14px 0 0; max-width: 34ch; color: #98A2AB; font-size: 13px; }
.site-footer h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: #DCE2E7; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-meta {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--graphite-3);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); letter-spacing: .04em;
}

/* ---------- subpage head ---------- */
.page-head { background: var(--white); border-bottom: 1px solid var(--line); }
.page-head .container { padding-top: 56px; padding-bottom: 44px; }
.page-head h1 { font-family: var(--font-display); font-size: clamp(28px, 3.8vw, 42px); font-weight: 700; line-height: 1.4; letter-spacing: .01em; max-width: 20ch; text-wrap: balance; }
.page-head .lede { color: var(--ink-2); font-size: 16.5px; max-width: 60ch; margin: 18px 0 0; }
.page-head .meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: .04em; }

/* article layout with TOC */
.article-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; align-items: start; padding: 56px 0 96px; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); }
.toc h2 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.toc-toggle { display: none; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 0 6px 14px; text-decoration: none; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; border-left: 2px solid transparent; margin-left: -1px; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--cobalt-deep); border-left-color: var(--cobalt); font-weight: 600; }

.prose { max-width: 800px; min-width: 0; }
.toc { min-width: 0; }
.prose > section { margin-bottom: 64px; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h2 { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.5; margin: 0 0 18px; padding-top: 6px; }
.prose h2 .num { font-family: var(--font-mono); font-size: 13px; color: var(--muted); font-weight: 500; display: block; letter-spacing: .1em; margin-bottom: 6px; }
.prose h3 { font-size: 18px; font-weight: 700; margin: 34px 0 10px; }
.prose h4 { font-size: 15.5px; font-weight: 700; margin: 24px 0 8px; }
.prose p, .prose li { font-size: 15.5px; color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose .callout {
  border: 1px solid var(--line); border-left: 3px solid var(--cobalt); background: var(--white);
  border-radius: var(--radius); padding: 18px 22px; margin: 0 0 1.6em;
}
.prose .callout p:last-child { margin-bottom: 0; }
.prose .callout.warn { border-left-color: var(--rust); }
.prose .callout .eyebrow { margin-bottom: 8px; }
.prose figure { margin: 0 0 1.6em; }
.prose figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.prose .table-wrap { margin: 0 0 1.6em; }

/* key/value definition rows */
.kv { display: grid; grid-template-columns: 200px 1fr; gap: 0; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--white); margin: 0 0 1.6em; }
.kv > div { padding: 12px 16px; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }
.kv .k { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); background: var(--ice); }
.kv .v { color: var(--ink-2); }
.kv .v code { background: var(--ice-2); }

/* ---------- sources toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 4px 0 18px; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search input { width: 100%; font: inherit; font-size: 14.5px; padding: 11px 40px 11px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); min-height: 44px; }
.search input:focus { outline: 2px solid var(--cobalt); outline-offset: 0; border-color: var(--cobalt); }
.search .clear-q { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; cursor: pointer; font-size: 16px; color: var(--muted); width: 28px; height: 28px; border-radius: 50%; display: none; }
.search.has-value .clear-q { display: inline-flex; align-items: center; justify-content: center; }
.search .clear-q:hover { background: var(--ice-2); color: var(--ink); }
.summary { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.summary .badge { font-size: 10.5px; }
.link-btn { border: 0; background: none; color: var(--cobalt); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; font: inherit; font-size: 13px; padding: 0; }
.status-links { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--font-mono); font-size: 12px; margin-top: 8px; }
.status-links a { text-decoration: none; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.status-links a:hover { color: var(--cobalt-deep); border-bottom-color: var(--cobalt); }

/* ---------- validation log ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.chip {
  border: 1px solid var(--line); background: var(--white); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; cursor: pointer; color: var(--ink-2); line-height: 1.3;
}
.chip { transition: background .15s, color .15s, transform .1s; }
.chip:hover { border-color: var(--ink); }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { background: var(--graphite); color: #fff; border-color: var(--graphite); }
.chip .count { font-family: var(--font-mono); font-size: 11px; margin-left: 6px; opacity: .7; }
.log-list { display: grid; gap: 14px; }
.log-card { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; animation: rowIn .4s ease both; animation-delay: calc(var(--i, 0) * 60ms); }
.log-card .top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.log-card .id { font-family: var(--font-mono); font-weight: 600; font-size: 15px; }
.log-card .claim { font-size: 15.5px; color: var(--ink); margin: 0 0 14px; }
.log-card .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 20px; font-size: 13px; }
.log-card .grid .k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: block; }
.log-card .grid .v { color: var(--ink-2); display: block; overflow-wrap: anywhere; }
.log-card .result { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--ink-2); }
.empty {
  border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center;
  color: var(--muted); font-size: 14.5px; background: transparent;
}

/* ---------- sources ---------- */
.badge-src-observing { border-color: var(--cobalt); color: var(--cobalt-deep); background: var(--cobalt-soft); }
.badge-src-preparing { border-color: var(--graphite); color: var(--ink); background: var(--white); border-style: dashed; }
.badge-src-phase1 { border-color: var(--line); color: var(--ink-2); }
.badge-src-reading { border-color: var(--line); color: var(--muted); border-style: dashed; }
.badge-src-deferred { border-color: var(--line-2); color: var(--faint); }
.badge-src-excluded { border-color: var(--rust); color: var(--rust-deep); background: var(--rust-soft); }
.sig { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap; background: var(--ice-2); color: var(--ink-2); }
.sig-service { background: var(--cobalt-soft); color: var(--cobalt-deep); }
.sig-vertical { background: #E6F0FB; color: #1E4E8C; }
.sig-jobs { background: #EEE8F8; color: #4B3A86; }
.sig-microtask { background: #F5E9DD; color: #7A4A17; }
.sig-search { background: #E3F1EC; color: #1F5C46; }
.sig-community { background: #F7ECE3; color: #7A4A17; }
.sig-learning { background: #FBF1D6; color: #6B4E06; }
.sig-stats { background: var(--ice-2); color: var(--ink-2); }
[data-sources-table] td:nth-child(3) { white-space: nowrap; }
.src-name { display: block; font-weight: 600; }
.src-name a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.src-name a:hover { border-bottom-color: var(--ink); }
.src-note { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.6; max-width: 30ch; }
.checks { display: grid; gap: 2px; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
[data-sources-table] td.name { min-width: 230px; max-width: 320px; }
[data-sources-table] td:nth-child(2), [data-sources-table] td:nth-child(8) { white-space: nowrap; }
[data-sources-table] td:nth-child(6) { min-width: 150px; }
[data-sources-table] td:nth-child(4), [data-sources-table] td:nth-child(5) { min-width: 110px; }

/* ---------- chain ---------- */
.hash { font-family: var(--font-mono); font-size: 12.5px; overflow-wrap: anywhere; word-break: break-all; }
.hash.dim { color: var(--faint); }
.copy-btn {
  border: 1px solid var(--line); background: var(--white); border-radius: var(--radius-sm); padding: 4px 8px;
  font-family: var(--font-mono); font-size: 11px; cursor: pointer; color: var(--ink-2); margin-left: 8px; vertical-align: middle;
}
.copy-btn:hover { border-color: var(--ink); }
.chain-genesis { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* steps (verification) */
.steps { list-style: none; padding: 0; margin: 0 0 1.6em; counter-reset: step; display: grid; gap: 12px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 14px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 16px 18px; }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--font-mono); font-weight: 600; color: var(--cobalt-deep); font-size: 14px; padding-top: 2px; }
.steps li p { margin: 0; font-size: 14.5px; }
.steps li strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field label .req { color: var(--rust); font-family: var(--font-mono); font-size: 11px; margin-left: 6px; font-weight: 600; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 15px; width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--white); color: var(--ink); min-height: 48px;
}
.field textarea { min-height: 180px; resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--cobalt); outline-offset: 0; border-color: var(--cobalt); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--rust); }
.field.is-valid input, .field.is-valid select, .field.is-valid textarea { border-color: var(--ok); }
.field .counter { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); justify-self: end; }
.field .counter.over { color: var(--rust-deep); }
.form.sent .form-status.ok { animation: rise .4s ease both; }
.field .error { font-size: 12.5px; color: var(--rust-deep); display: none; }
.field.is-invalid .error { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 18px; height: 18px; margin-top: 4px; min-height: 0; }
.form-status { display: none; border-radius: var(--radius); padding: 14px 18px; font-size: 14.5px; }
.form-status.ok { display: block; background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok); }
.form-status.err { display: block; background: var(--rust-soft); color: var(--rust-deep); border: 1px solid var(--rust); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.hero-copy > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.hero-copy > :nth-child(1) { animation-delay: .05s; } .hero-copy > :nth-child(2) { animation-delay: .15s; }
.hero-copy > :nth-child(3) { animation-delay: .25s; } .hero-copy > :nth-child(4) { animation-delay: .35s; } .hero-copy > :nth-child(5) { animation-delay: .45s; }
.hero .panel { animation: rise .8s cubic-bezier(.2,.7,.2,1) .3s both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-copy > *, .hero .panel, tbody tr.fade, .log-card, .layer-link::after { animation: none; }
  .layer-link::after { top: 50%; opacity: 1; }
  .btn, .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after, .card, .route, .chip, .site-header .container { transition: none; }
  .progress { display: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) { .read-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; padding: 56px 0 48px; }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 32px; }
  .toc { position: static; border: 1px solid var(--line-2); background: var(--white); border-radius: var(--radius); padding: 0; }
  .toc h2 { display: none; }
  .toc-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 14px 18px; background: none; border: 0; font-weight: 600; font-size: 14.5px; cursor: pointer; text-align: left; }
  .toc-toggle::after { content: "＋"; font-family: var(--font-mono); color: var(--cobalt); }
  .toc.open .toc-toggle::after { content: "－"; }
  .toc ol { display: none; border-left: 0; padding: 0 18px 12px; }
  .toc.open ol { display: grid; gap: 2px; }
  .toc a { padding: 8px 0; border-left: 0; margin: 0; border-bottom: 1px solid var(--line-2); }
  .toc li:last-child a { border-bottom: 0; }
  .toc a.active { border-left: 0; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 840px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--ice); border-bottom: 1px solid var(--line); padding: 10px var(--gutter) 16px;
    box-shadow: 0 20px 40px rgba(20,24,29,.12);
  }
  .nav.open a { padding: 14px 12px; font-size: 16px; border-bottom: 1px solid var(--line-2); border-radius: 0; }
  .nav.open a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--cobalt); }
  .nav.open .nav-cta { margin: 12px 0 0; text-align: center; border-radius: 3px; border-bottom: 0; }
  .section { padding: 64px 0; }
  .grid-2 { grid-template-columns: minmax(0, 1fr) !important; }
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .table-wrap.wide table { min-width: 640px; }
  .scroll-hint { display: block; }
  .form-row { grid-template-columns: 1fr; }
  .layer { grid-template-columns: 1fr; gap: 6px; }
  .kv { grid-template-columns: 1fr; }
  .kv > div { border-bottom: 0; }
  .kv .k { padding-bottom: 2px; border-top: 1px solid var(--line-2); }
  .kv > div:first-child { border-top: 0; }
  .kv .v { padding-top: 4px; padding-bottom: 14px; }
  .status-cell { border-right: 0; margin-right: 0; padding: 12px 0; border-bottom: 1px solid var(--graphite-3); }
  .status-strip .container { grid-template-columns: 1fr 1fr; }
  .status-cell:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 560px) {
  :root { --gutter: 18px; --header-h: 58px; }
  body { font-size: 15.5px; }
  .brand-tag { display: none; }
  .eyebrow::after { display: none; }
  .readout { grid-template-columns: 1fr 1fr; }
  .datacard-grid { grid-template-columns: 1fr 1fr; }
  .datacard-grid .v { font-size: 22px; }
  .datacard-cat { font-size: 19px; }
  .read-grid { grid-template-columns: 1fr !important; }
  .xm { grid-template-columns: 44px 1fr 1fr; }
  .xm > div { padding: 10px 8px; font-size: 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .status-strip .container { grid-template-columns: 1fr; }
  .status-cell { border-bottom: 1px solid var(--graphite-3) !important; }
  .status-cell:last-child { border-bottom: 0 !important; }
  .hero-actions .btn { width: 100%; }
  .cta-band .actions { width: 100%; }
  .cta-band .actions .btn { flex: 1; }
  .layer-link { padding-left: 4px; }
  .card { padding: 22px 20px 18px; }
  .log-card { padding: 18px; }
  pre { font-size: 12px; padding: 14px 16px; }
}

/* print */
@media print {
  .site-header, .site-footer, .nav-toggle, .cta-band, .reveal { display: block; opacity: 1; transform: none; }
  .site-header, .site-footer, .cta-band { display: none; }
  body { background: #fff; }
}
