/* ============================================================
   AGENTIC FINANCE GRAPH — design system v0.2
   Drop-in replacement for /styles.css
   Fixes: ticker seam, mobile nav, contrast, skip-link, CLS, print
   ============================================================ */

:root {
  --ink-0: #060d0a;
  --ink-1: #0a1410;
  --ink-2: #0e1a14;
  --ink-3: #12211a;
  --line: rgba(126, 205, 165, 0.09);
  --line-strong: rgba(126, 205, 165, 0.22);
  --platinum: #eae7de;
  --platinum-2: #c9ccc2;
  --muted: #9aa59a;          /* was #8f9a8f — WCAG contrast on forest */
  --emerald: #37a97b;
  --emerald-bright: #52d698;
  --emerald-deep: #1d5c44;
  --down: #d96a5b;
  --serif: "Playfair Display", "Georgia", serif;
  --sans: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "Consolas", monospace;
  --maxw: 1180px;
  --radius: 4px;
  --header-h: 58px;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

body {
  margin: 0;
  background-color: var(--ink-0);
  background-image:
    radial-gradient(1200px 700px at 85% -10%, rgba(55, 169, 123, 0.07), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(55, 169, 123, 0.05), transparent 55%),
    linear-gradient(rgba(126, 205, 165, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 205, 165, 0.045) 1px, transparent 1px);
  background-size: auto, auto, 72px 72px, 72px 72px;
  background-attachment: fixed, fixed, scroll, scroll;
  color: var(--platinum-2);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--emerald); color: var(--ink-0); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-0); }
::-webkit-scrollbar-thumb { background: #1c2f25; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--emerald-deep); }

img { max-width: 100%; height: auto; }
a { color: var(--platinum); text-decoration: none; }
p a, li a, td a { border-bottom: 1px solid var(--line-strong); transition: border-color .18s, color .18s; }
p a:hover, li a:hover, td a:hover { color: var(--emerald-bright); border-color: var(--emerald); }
:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--platinum); line-height: 1.12; margin: 0 0 .5em; letter-spacing: .002em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
h1 em, h2 em, h3 em { font-style: normal; color: var(--emerald); }
h1 .dot { color: var(--emerald); }

strong { color: var(--platinum); font-weight: 600; }
code { font-family: var(--mono); font-size: .86em; background: var(--ink-2); border: 1px solid var(--line); padding: .12em .38em; border-radius: 3px; color: var(--platinum-2); }
pre { background: var(--ink-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; overflow-x: auto; font-family: var(--mono); font-size: .82rem; line-height: 1.7; color: var(--platinum-2); }
pre code { background: none; border: 0; padding: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.5rem); }

/* skip link */
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--emerald); color: #04120b;
  font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .6rem 1rem; border-radius: var(--radius);
}
.skip:focus { top: .6rem; }

/* ---------- ticker ---------- */
.ticker {
  border-bottom: 1px solid var(--line);
  background: rgba(6, 13, 10, 0.94);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .02em;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  padding: .5rem 0;
  animation: tick 56s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }
.ticker span.pair {
  display: inline-flex;
  align-items: baseline;
  gap: .45em;
  margin: 0 1.5rem 0 0;
  flex-shrink: 0;
}
.ticker b { color: var(--platinum-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.ticker .up { color: var(--emerald-bright); }
.ticker .down { color: var(--down); }
.ticker .dia { color: var(--emerald-deep); margin-right: 1.5rem; flex-shrink: 0; }
/* reserve width so live % does not desync the -50% loop */
.ticker [data-live$=".chg"] {
  display: inline-block;
  min-width: 4.8em;
  font-variant-numeric: tabular-nums;
}

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 13, 10, 0.88);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 1.6rem; padding: .8rem clamp(1.1rem, 4vw, 2.5rem); max-width: var(--maxw); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: .7rem; margin-right: auto; flex-shrink: 0; }
.brand img { width: 34px; height: 34px; }
.brand .name { font-family: var(--serif); font-size: 1.06rem; color: var(--platinum); white-space: nowrap; }
.brand .name em { font-style: normal; color: var(--emerald); }
nav.links { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
nav.links a { color: var(--muted); padding: .25rem 0; position: relative; white-space: nowrap; }
nav.links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px; background: var(--emerald); transition: width .22s ease; }
nav.links a:hover { color: var(--platinum); }
nav.links a:hover::after, nav.links a[aria-current="page"]::after { width: 100%; }
nav.links a[aria-current="page"] { color: var(--emerald-bright); }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(3.2rem, 8vw, 6.4rem) 0 clamp(2.6rem, 5vw, 4.4rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 2rem; align-items: center; }
.hero .eyebrow { margin-bottom: 1.6rem; }
.hero p.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--platinum-2); max-width: 34em; margin: 1.4rem 0 0; text-wrap: pretty; }
.hero p.lede strong { color: var(--platinum); }
.hero-mark { position: relative; display: flex; justify-content: center; }
.hero-mark img { width: min(340px, 70%); filter: drop-shadow(0 0 60px rgba(55, 169, 123, 0.25)); }
.hero-mark::before {
  content: ""; position: absolute; inset: -18%;
  background:
    radial-gradient(closest-side, rgba(55,169,123,.10), transparent 70%),
    repeating-radial-gradient(circle at 50% 50%, transparent 0 54px, rgba(126,205,165,.06) 54px 55px);
  border-radius: 50%;
  pointer-events: none;
}
.cta-row { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.1rem; }
.btn { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; padding: .82rem 1.5rem; border-radius: var(--radius); border: 1px solid var(--emerald); transition: background .2s, color .2s, transform .2s, box-shadow .2s; display: inline-block; }
.btn.solid { background: var(--emerald); color: #04120b; font-weight: 500; }
.btn.solid:hover { background: var(--emerald-bright); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(55,169,123,.25); }
.btn.ghost { color: var(--emerald-bright); }
.btn.ghost:hover { background: rgba(55,169,123,.1); transform: translateY(-2px); }

/* ---------- structure ---------- */
section.band { padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--line); }
section.band.tint { background: rgba(10, 20, 16, 0.55); }
.eyebrow { font-family: var(--mono); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--emerald); display: flex; align-items: center; gap: .8rem; }
.eyebrow::after { content: ""; height: 1px; width: 68px; background: linear-gradient(90deg, var(--emerald), transparent); }
.band .eyebrow { margin-bottom: 1.15rem; }
.band h2 { max-width: 18em; }
.band .sub { color: var(--muted); max-width: 46em; margin-top: .35rem; }
.cols-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(1.4rem, 3vw, 2.8rem); align-items: start; }

.quote {
  font-family: var(--serif); font-size: clamp(1.35rem, 2.6vw, 1.95rem); font-weight: 500; font-style: italic;
  color: var(--platinum); line-height: 1.5; max-width: 30em;
  border-left: 2px solid var(--emerald); padding-left: clamp(1.2rem, 3vw, 2.2rem); margin: 0;
}
.quote em { color: var(--emerald); font-style: italic; }
.quote-src { font-family: var(--mono); font-size: .72rem; color: var(--muted); letter-spacing: .06em; margin-top: 1.1rem; display: block; }

/* ---------- stat tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 2.4rem; }
.tile { background: var(--ink-1); padding: 1.4rem 1.5rem 1.25rem; transition: background .22s; position: relative; }
.tile:hover { background: var(--ink-2); }
.tile .k { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: .6rem; }
.tile .v { font-family: var(--mono); font-size: clamp(1.7rem, 2.8vw, 2.3rem); font-weight: 500; color: var(--platinum); margin: .55rem 0 .3rem; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.tile .v .unit { font-size: .55em; color: var(--muted); font-weight: 400; }
.tile .v.up { color: var(--emerald-bright); }
.tile .d { font-size: .78rem; color: var(--muted); line-height: 1.5; }
.tile .d a { color: var(--muted); border-bottom: 1px dotted var(--line-strong); }
.tile .d a:hover { color: var(--emerald-bright); }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--emerald-bright); box-shadow: 0 0 8px var(--emerald-bright); vertical-align: 1px; }
.badge-live, .badge-cited { font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; padding: .18em .5em; border-radius: 2px; white-space: nowrap; }
.badge-live { color: var(--emerald-bright); border: 1px solid rgba(82, 214, 152, .35); }
.badge-cited { color: var(--muted); border: 1px solid var(--line-strong); }

/* ---------- data tables ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 2rem; background: var(--ink-1); -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .87rem; min-width: 640px; }
table.data caption { text-align: left; font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 1rem 1.25rem .4rem; }
table.data th { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; text-align: left; padding: .8rem 1.25rem; border-bottom: 1px solid var(--line-strong); }
table.data td { padding: .78rem 1.25rem; border-bottom: 1px solid var(--line); color: var(--platinum-2); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: rgba(55,169,123,.04); }
table.data td.num, table.data th.num { font-family: var(--mono); text-align: right; white-space: nowrap; }
table.data .up { color: var(--emerald-bright); } table.data .down { color: var(--down); }
table.data td .src { display: block; font-size: .72rem; color: var(--muted); margin-top: .15rem; }

/* ---------- liveness ladder ---------- */
.ladder { margin-top: 2.4rem; display: grid; gap: 6px; }
.rung { display: grid; grid-template-columns: 3.4rem minmax(7.5rem, 12rem) 1fr; gap: 1rem; align-items: center; }
.rung .lvl { font-family: var(--mono); font-size: .78rem; color: var(--emerald); }
.rung .lbl { font-size: .84rem; color: var(--platinum-2); }
.rung .bar { height: 22px; background: linear-gradient(90deg, var(--emerald-deep), var(--emerald)); border-radius: 2px; position: relative; min-width: 2px; transform-origin: left; animation: grow 1s cubic-bezier(.2,.7,.2,1) both; }
.rung:nth-child(2) .bar { animation-delay: .06s; } .rung:nth-child(3) .bar { animation-delay: .12s; }
.rung:nth-child(4) .bar { animation-delay: .18s; } .rung:nth-child(5) .bar { animation-delay: .24s; }
.rung:nth-child(6) .bar { animation-delay: .3s; } .rung:nth-child(7) .bar { animation-delay: .36s; }
@keyframes grow { from { transform: scaleX(0); } }
.rung .bar .pct { position: absolute; left: calc(100% + .6rem); top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: .74rem; color: var(--muted); white-space: nowrap; }
.rung.rank .bar { background: var(--emerald-bright); box-shadow: 0 0 18px rgba(82,214,152,.35); }
.ladder-note { font-size: .78rem; color: var(--muted); margin-top: 1rem; max-width: 52em; }

/* ---------- rails ---------- */
.rails { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 2.4rem; }
.rail { background: var(--ink-1); padding: 1.7rem 1.6rem 1.5rem; transition: background .22s; }
.rail:hover { background: var(--ink-2); }
.rail .fn { font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.rail .std { font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 1.9rem); color: var(--platinum); margin: .5rem 0 .55rem; }
.rail p { font-size: .82rem; color: var(--muted); margin: 0; line-height: 1.6; }
.rail a.more { display: inline-block; margin-top: .8rem; font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--emerald); }
.rail a.more:hover { color: var(--emerald-bright); }

/* ---------- cards / lists ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; margin-top: 2.4rem; }
.card { background: var(--ink-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.6rem 1.45rem; transition: border-color .25s, transform .25s, background .25s; }
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); background: var(--ink-2); }
.card .n { font-family: var(--mono); font-size: .72rem; color: var(--emerald); letter-spacing: .1em; }
.card h3 { margin: .55rem 0 .5rem; }
.card p { font-size: .88rem; color: var(--muted); margin: 0; }
.card p + p { margin-top: .6rem; }
ul.ticks { list-style: none; padding: 0; margin: 1.2rem 0 0; }
ul.ticks li { padding: .5rem 0 .5rem 1.7rem; position: relative; border-bottom: 1px solid var(--line); font-size: .93rem; }
ul.ticks li:last-child { border-bottom: 0; }
ul.ticks li::before { content: "◆"; position: absolute; left: .1rem; top: .55rem; color: var(--emerald); font-size: .68rem; }

/* ---------- FAQ ---------- */
.faq { margin-top: 2rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.15rem .2rem; font-family: var(--serif); font-size: 1.14rem; color: var(--platinum); display: flex; justify-content: space-between; align-items: center; gap: 1rem; transition: color .2s; }
.faq summary:hover { color: var(--emerald-bright); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--emerald); font-size: 1.15rem; transition: transform .25s; flex-shrink: 0; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 .2rem 1.3rem; color: var(--platinum-2); max-width: 60em; font-size: .95rem; }
.faq .a p { margin: 0 0 .7em; } .faq .a p:last-child { margin-bottom: 0; }

/* ---------- article pages ---------- */
.article-head { padding: clamp(3.4rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); }
.article-head .crumbs { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.6rem; }
.article-head .crumbs a { color: var(--muted); } .article-head .crumbs a:hover { color: var(--emerald-bright); }
.article-head .crumbs .sep { color: var(--emerald-deep); margin: 0 .5rem; }
.article-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 17em; }
.article-head .standfirst { font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: var(--platinum-2); max-width: 40em; margin-top: 1.2rem; }
.article-head .meta { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 1.5rem; }
.article-head .meta b { color: var(--emerald); font-weight: 500; }
article.body { padding-bottom: clamp(3rem, 7vw, 5rem); }
article.body > .wrap > * { max-width: 760px; }
article.body > .wrap > .tablewrap, article.body > .wrap > .tiles, article.body > .wrap > .ladder, article.body > .wrap > .cards, article.body > .wrap > .rails { max-width: none; }
article.body h2 { margin-top: 2.6em; font-size: clamp(1.55rem, 2.6vw, 2.1rem); }
article.body h3 { margin-top: 1.9em; }
article.body .eyebrow { margin: 3.2em 0 .8em; }
.answer-box { background: var(--ink-1); border: 1px solid var(--line-strong); border-left: 2px solid var(--emerald); border-radius: var(--radius); padding: 1.35rem 1.6rem; margin: 1.8rem 0; font-size: 1.02rem; color: var(--platinum); }
.answer-box .tag { font-family: var(--mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--emerald); display: block; margin-bottom: .55rem; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 3rem 0 0; }
.pager a { background: var(--ink-1); padding: 1.3rem 1.5rem; transition: background .2s; }
.pager a:hover { background: var(--ink-2); }
.pager .dir { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: .35rem; }
.pager .t { font-family: var(--serif); font-size: 1.08rem; color: var(--platinum); }
.pager a:hover .t { color: var(--emerald-bright); }
.pager a.next { text-align: right; }

/* ---------- footer ---------- */
footer.site { border-top: 1px solid var(--line); background: rgba(6,13,10,.75); position: relative; overflow: hidden; }
footer.site .glyph { position: absolute; right: -60px; bottom: -80px; width: 380px; opacity: .05; pointer-events: none; }
.foot { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(140px, 1fr)); gap: 2.2rem; padding: 3.4rem 0 2.6rem; }
.foot .brandline { font-family: var(--serif); font-size: 1.35rem; color: var(--platinum); }
.foot .brandline em { font-style: normal; color: var(--emerald); }
.foot p.tag { font-size: .85rem; color: var(--muted); max-width: 26em; margin: .8rem 0 0; }
.foot h4 { font-family: var(--mono); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--emerald); font-weight: 500; margin: 0 0 1rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: .55rem; }
.foot li a { font-size: .86rem; color: var(--platinum-2); }
.foot li a:hover { color: var(--emerald-bright); }
.legal { border-top: 1px solid var(--line); padding: 1.3rem 0 1.6rem; font-family: var(--mono); font-size: .68rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; letter-spacing: .03em; }
.legal a { color: var(--muted); } .legal a:hover { color: var(--emerald-bright); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal .7s cubic-bezier(.2,.65,.25,1) forwards; }
.reveal.d1 { animation-delay: .08s; } .reveal.d2 { animation-delay: .16s; }
.reveal.d3 { animation-delay: .24s; } .reveal.d4 { animation-delay: .34s; }
@keyframes reveal { to { opacity: 1; transform: none; } }

.tile { position: relative; }
.tile::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--emerald), transparent 72%); opacity: .18; transition: opacity .3s; }
.tile:hover::before { opacity: .85; }
.tile:has(.v.up),
.tile:has(.v[data-live="stables.total"]),
.tile:has(.v[data-live="ixs.v"]) {
  background: linear-gradient(180deg, rgba(55, 169, 123, .09), var(--ink-1) 58%);
}
.tile:has(.v.up)::before,
.tile:has(.v[data-live="stables.total"])::before,
.tile:has(.v[data-live="ixs.v"])::before { opacity: .9; }
.tile:has(.v[data-live="stables.total"]) .v,
.tile:has(.v[data-live="ixs.v"]) .v { color: var(--emerald-bright); text-shadow: 0 0 26px rgba(82, 214, 152, .22); }
.stagger .tile { opacity: 0; transform: translateY(16px); transition: opacity .55s cubic-bezier(.2, .65, .25, 1), transform .55s cubic-bezier(.2, .65, .25, 1), background .22s; }
.stagger .tile.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .stagger .tile { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero { padding-top: 2.4rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mark { order: -1; margin-bottom: .2rem; }
  .hero-mark img { width: 128px; }
  .hero-mark::before { inset: -8%; }
  .foot { grid-template-columns: 1fr 1fr; }
  .rung { grid-template-columns: 2.6rem minmax(6rem, 8rem) 1fr; gap: .7rem; }
  .rung .bar .pct { font-size: .64rem; }
  nav.links {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, #000 86%, transparent);
    padding-bottom: .15rem;
    scrollbar-width: none;
  }
  nav.links::-webkit-scrollbar { display: none; }
}
@media (max-width: 560px) {
  .nav { flex-wrap: wrap; gap: .55rem 1rem; padding-top: .7rem; padding-bottom: .7rem; }
  .brand { width: auto; margin-right: auto; }
  .pager { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; gap: 1.8rem; }
  .ticker { font-size: .66rem; }
}

/* print — research pages should survive a PDF save */
@media print {
  .ticker, header.site, .cta-row, footer.site .glyph { display: none !important; }
  body { background: #fff; color: #111; font-size: 12pt; }
  h1, h2, h3, .quote, .brandline { color: #111; }
  a { color: #111; }
  .tile, .rail, .card, .tablewrap { break-inside: avoid; border-color: #ddd; background: #fff; }
}

/* desk pack strip — optional, used when /desk exists */
.commerce {
  display: flex; flex-wrap: wrap; gap: .8rem 1.6rem; align-items: baseline;
  margin-top: 1.6rem; font-family: var(--mono); font-size: .78rem; letter-spacing: .04em;
}
.commerce a { color: var(--emerald-bright); border-bottom: 1px solid var(--emerald-deep); }
.commerce a:hover { color: var(--platinum); }
.commerce .note { color: var(--muted); }

/* ============================================================
   v0.3 — glass, iridescence, node-graph hero, mobile-first, desk wall
   ============================================================ */
:root {
  --iri-1: #bfe9d3;
  --iri-2: #e4dff3;
  --iri-3: #f0d9c7;
  --glass: rgba(13, 24, 19, .58);
  --glass-line: rgba(180, 230, 205, .14);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
body {
  background-image:
    radial-gradient(1200px 700px at 85% -10%, rgba(55, 169, 123, 0.08), transparent 60%),
    radial-gradient(700px 520px at 68% 18%, rgba(150, 125, 225, 0.055), transparent 62%),
    radial-gradient(900px 600px at -10% 110%, rgba(55, 169, 123, 0.06), transparent 55%),
    linear-gradient(rgba(126, 205, 165, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 205, 165, 0.045) 1px, transparent 1px);
  background-size: auto, auto, auto, 72px 72px, 72px 72px;
  background-attachment: fixed, fixed, fixed, scroll, scroll;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* iridescent display text */
.iri {
  background: linear-gradient(100deg, var(--platinum) 0%, var(--iri-1) 38%, var(--iri-2) 64%, var(--iri-3) 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* glass panels */
.tile, .card, .rail, .answer-box, .tablewrap, .pager a, pre {
  background: linear-gradient(160deg, rgba(255,255,255,.04), rgba(255,255,255,0) 42%), var(--glass);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.tiles, .rails, .pager { background: var(--glass-line); border-color: var(--glass-line); border-radius: 12px; }
.card, .answer-box, .tablewrap, pre { border-radius: 12px; border-color: var(--glass-line); }
.tile:hover, .card:hover, .rail:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 12px 44px rgba(55,169,123,.10); }
.tile:has(.v.up), .tile:has(.v[data-live="stables.total"]), .tile:has(.v[data-live="ixs.v"]) {
  background: linear-gradient(160deg, rgba(82,214,152,.13), rgba(150,125,225,.05) 60%, var(--glass) 100%);
}

/* header register button */
.btn.reg {
  padding: .55rem 1rem; font-size: .7rem; flex-shrink: 0;
  background: linear-gradient(120deg, var(--emerald-bright), var(--emerald)); color: #04120b; font-weight: 600;
  border-color: transparent; border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(82,214,152,.35), 0 6px 24px rgba(55,169,123,.22);
}
.btn.reg:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(82,214,152,.6), 0 10px 30px rgba(55,169,123,.35); }

/* hero node graph */
.hero-graph { position: relative; width: 100%; max-width: 470px; margin: 0 auto; aspect-ratio: 1; }
.hero-graph svg { width: 100%; height: 100%; overflow: visible; display: block; }
.hg-edge { fill: none; stroke: url(#hgEdge); stroke-width: 1.3; stroke-linecap: round; opacity: .75; }
.hg-edge.flow { stroke: var(--emerald-bright); stroke-dasharray: 5 13; opacity: .9; animation: hgflow 3.4s linear infinite; }
@keyframes hgflow { to { stroke-dashoffset: -36; } }
.hg-node rect { fill: rgba(12,24,18,.82); stroke: rgba(180,230,205,.3); stroke-width: 1; rx: 14; filter: drop-shadow(0 0 16px rgba(55,169,123,.22)); transition: stroke .25s; }
.hg-node text { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; fill: var(--platinum-2); text-anchor: middle; }
.hg-node .t2 { font-family: var(--serif); font-size: 14px; letter-spacing: .02em; text-transform: none; fill: var(--emerald-bright); }
.hg-node.center rect { stroke: rgba(82,214,152,.55); filter: drop-shadow(0 0 28px rgba(82,214,152,.3)); }
.hg-node.center text { fill: var(--platinum); font-size: 11.5px; }
a.hg-node:hover rect, a.hg-node:focus-visible rect { stroke: var(--emerald-bright); }
a.hg-node { outline: none; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .hg-edge.flow { animation: none; } }

/* mobile bottom action bar (hidden on desktop) */
.mbar { display: none; }

/* desk wall (dialog + page) */
dialog.desk { border: 0; padding: 0; background: transparent; max-width: none; width: 100%; height: 100%; max-height: none; margin: 0; overflow: auto; }
dialog.desk::backdrop { background: rgba(4,10,7,.84); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.desk-inner { min-height: 100%; display: grid; place-items: center; padding: 1.2rem; }
.desk-card {
  width: min(540px, 100%); text-align: center; position: relative; margin: 0;
  background: linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,0) 45%), rgba(10,20,16,.92);
  border: 1px solid var(--glass-line); border-radius: 20px;
  padding: clamp(2.2rem, 6vw, 3.4rem) clamp(1.3rem, 5vw, 2.8rem) clamp(1.8rem, 4vw, 2.4rem);
  box-shadow: 0 30px 90px rgba(0,0,0,.55), 0 0 70px rgba(55,169,123,.12);
}
.desk-card .x { position: absolute; top: .7rem; right: .8rem; background: none; border: 0; color: var(--muted); font-family: var(--mono); font-size: 1.05rem; cursor: pointer; padding: .5rem .7rem; line-height: 1; }
.desk-card .x:hover { color: var(--platinum); }
.desk-card .eyebrow { justify-content: center; margin: 0; }
.desk-card .eyebrow::after { display: none; }
.desk-card h2 { font-size: clamp(1.75rem, 5.2vw, 2.4rem); margin: .8rem 0 .3rem; }
.desk-form { display: flex; gap: .55rem; margin: 1.5rem 0 .6rem; }
.desk-form input[type="email"] {
  flex: 1; min-width: 0; font: 1.02rem var(--sans); padding: 1rem 1.1rem; border-radius: 12px;
  border: 1px solid var(--glass-line); background: rgba(6,13,10,.85); color: var(--platinum); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.desk-form input[type="email"]::placeholder { color: var(--muted); }
.desk-form input[type="email"]:focus { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(55,169,123,.2); }
.desk-form button {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  padding: 0 1.35rem; border-radius: 12px; border: 0; cursor: pointer; color: #04120b;
  background: linear-gradient(120deg, var(--emerald-bright), var(--emerald)); transition: transform .2s, box-shadow .2s;
}
.desk-form button:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(55,169,123,.3); }
.desk-form button:disabled { opacity: .6; cursor: wait; transform: none; }
.desk-card .err { color: var(--down); font-size: .82rem; min-height: 1.3em; margin: 0 0 .6rem; }
.desk-card .why { font-family: var(--serif); font-style: italic; font-size: clamp(1rem, 2.4vw, 1.12rem); color: var(--platinum-2); margin: 0; line-height: 1.55; }
.desk-card .ok { display: none; font-family: var(--serif); font-size: 1.15rem; color: var(--platinum); margin: 1.2rem 0 0; }
.desk-card .fine { font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 1.4rem 0 0; }
.desk-card.done .desk-form, .desk-card.done .why, .desk-card.done .err { display: none; }
.desk-card.done .ok { display: block; }
.hp { position: absolute; left: -9999px; top: 0; opacity: 0; height: 0; width: 0; }
.desk-page { min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 2.5rem 0 4.5rem; }

/* article index cards (research hub) */
.article-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-top: 2rem; }
.article-list a.card { display: block; }
.article-list a.card h3 { font-size: 1.2rem; }
.article-list a.card .n { display: block; margin-bottom: .2rem; }

/* ---------- mobile-first tightening ---------- */
@media (max-width: 880px) {
  .hero-graph { order: -1; max-width: 320px; margin-bottom: .4rem; }
  .hg-node text { font-size: 13px; }
  .hg-node .t2 { font-size: 16px; }
  .hg-node.center text { font-size: 14px; }
  .mbar {
    display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: 1px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(6,13,10,.9); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border-top: 1px solid var(--glass-line); padding-bottom: var(--safe-b);
  }
  .mbar a { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--platinum-2); padding: 1rem .5rem; text-align: center; }
  .mbar a.go { background: linear-gradient(120deg, var(--emerald-bright), var(--emerald)); color: #04120b; font-weight: 600; }
  body { padding-bottom: calc(3.5rem + var(--safe-b)); }
  header.site .btn.reg { display: none; }
  .hero { padding-top: 1.6rem; padding-bottom: 2rem; }
  h1 { font-size: clamp(2.3rem, 11vw, 3.2rem); }
  .hero p.lede { font-size: 1.02rem; }
  .cta-row { gap: .6rem; } .cta-row .btn { flex: 1 1 auto; text-align: center; }
  section.band { padding: 2.4rem 0; }
  .tiles { grid-template-columns: 1fr; margin-top: 1.5rem; }
  .tile { padding: 1.05rem 1.15rem .95rem; }
  .tile .v { font-size: 1.85rem; margin: .4rem 0 .25rem; }
  .cards { grid-template-columns: 1fr; gap: .8rem; margin-top: 1.5rem; }
  .card { padding: 1.2rem 1.2rem 1.1rem; }
  .rails { grid-template-columns: 1fr 1fr; margin-top: 1.5rem; }
  .rail { padding: 1.2rem 1.1rem 1.1rem; }
  .rail .std { font-size: 1.35rem; }
  .cols-2 { gap: 1.4rem; }
  .quote { font-size: 1.3rem; }
  .ladder-note, .band .sub { font-size: .9rem; }
  .foot { padding: 2.4rem 0 1.8rem; }
  .article-head h1 { font-size: clamp(1.9rem, 8.5vw, 2.6rem); }
}
@media (max-width: 420px) {
  .rails { grid-template-columns: 1fr; }
  .desk-form { flex-direction: column; }
  .desk-form button { padding: .95rem; }
}
