/* Articles section. Uses the tokens from site.css. No inline styles anywhere (strict CSP):
   JS only sets custom properties through the CSSOM. */

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.eyebrow { font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.nav-links a[aria-current="page"] { color: var(--ink); }
.read-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); pointer-events: none; }
body:not(.is-article) .read-progress { display: none; }

.tagpill {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.01em;
}

/* ------------------------------------------------------------ Index */
.idx-hero { padding: clamp(40px, 7vw, 88px) 0 clamp(24px, 4vw, 40px); }
.idx-title { margin-top: 18px; font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.04; letter-spacing: -0.042em; font-weight: 600; text-wrap: balance; max-width: 15em; }
.idx-lede { margin-top: 20px; color: var(--muted); font-size: clamp(1.1rem, 1.6vw, 1.3rem); max-width: 36em; line-height: 1.55; }
.idx-stats { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--muted); font-size: 0.98rem; }
.idx-stats strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.idx-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip {
  appearance: none; font: inherit; font-size: 0.95rem; font-weight: 500; cursor: pointer;
  height: 42px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-ctl);
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}
.fchip span { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.fchip:active { transform: scale(0.97); }
.fchip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fchip.is-on span { color: color-mix(in srgb, var(--bg) 70%, transparent); }
@media (hover: hover) and (pointer: fine) { .fchip:not(.is-on):hover { border-color: var(--ink); } }

.search { position: relative; display: block; width: min(100%, 320px); }
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 42px; padding: 0 14px 0 40px; font: inherit; font-size: 0.97rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl);
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: transparent; }
.idx-count { margin-top: 20px; color: var(--muted); font-size: 0.92rem; }
.idx-empty { margin-top: 24px; padding: 32px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--r-box); }

.acards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.acards-lg { margin-top: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.acard {
  display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 3vw, 32px); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-box);
  transition: transform 220ms var(--ease-out), border-color 180ms ease, box-shadow 220ms ease;
}
.acard[hidden] { display: none; }
.acard-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.acard-min { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.acard-title { font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.18; letter-spacing: -0.025em; font-weight: 600; text-wrap: balance; }
.acard-desc { color: var(--muted); font-size: 1rem; flex: 1; }
.acard-go { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--accent); margin-top: 4px; }
.acard-go .ic { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .acard:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
  .acard:hover .acard-go .ic { transform: translateX(4px); }
}
.acard:active { transform: scale(0.99); }
.idx-list { padding-bottom: clamp(48px, 8vw, 96px); }

.idx-map { background: var(--surface); border-block: 1px solid var(--line); padding: clamp(56px, 8vw, 104px) 0; }
.map-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.map-legend { margin-top: 28px; display: grid; gap: 10px; color: var(--muted); font-size: 0.95rem; }
.map-legend li { display: flex; align-items: center; gap: 10px; }
.lg-node { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.lg-node.is-soon { background: transparent; border: 2px dashed var(--line-strong); }
.lg-edge { width: 22px; height: 2px; background: var(--line-strong); }
.map { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-box); padding: 8px; }
.map svg { display: block; width: 100%; height: auto; overflow: visible; }
.m-edge { stroke: var(--line-strong); stroke-width: 1.6; fill: none; transition: stroke 180ms ease, opacity 180ms ease, stroke-width 180ms ease; }
.m-edge.is-on { stroke: var(--accent); stroke-width: 2.6; }
.m-node { cursor: pointer; outline: none; }
.m-node.is-soon { cursor: default; }
.m-node circle { fill: var(--accent); stroke: var(--bg); stroke-width: 4; transition: r 180ms var(--ease-out); }
.m-node.is-soon circle { fill: var(--bg); stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 4 4; }
.m-node text { fill: var(--ink); font-size: 14px; font-weight: 600; font-family: inherit; paint-order: stroke; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round; }
.m-node .m-sub { fill: var(--muted); font-size: 11px; font-weight: 500; }
.m-node:focus-visible circle { stroke: var(--ink); }
.map svg.has-focus .m-edge:not(.is-on) { opacity: 0.18; }
.map svg.has-focus .m-node:not(.is-on) { opacity: 0.35; }
.map svg .m-node { transition: opacity 180ms ease; }

.cta-small { padding: clamp(56px, 8vw, 104px) 0; }
.cta-small .cta-title { font-size: clamp(1.9rem, 4vw, 3rem); }

/* ---------------------------------------------------------- Article */
.art-head { padding: clamp(28px, 5vw, 64px) 0 clamp(8px, 2vw, 24px); }
.crumbs a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: 0.95rem; }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: var(--ink); } }
.art-meta { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; color: var(--muted); font-size: 0.92rem; }
.art-title { margin-top: 18px; font-size: clamp(2.1rem, 4.4vw, 3.5rem); line-height: 1.05; letter-spacing: -0.04em; font-weight: 600; text-wrap: balance; max-width: 18em; }
.art-lede { margin-top: 20px; color: var(--muted); font-size: clamp(1.1rem, 1.5vw, 1.25rem); max-width: 38em; line-height: 1.55; }

.art-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); padding-block: clamp(24px, 4vw, 48px) clamp(56px, 8vw, 96px); align-items: start; }
.art-side { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 16px; max-height: calc(100dvh - var(--nav-h) - 48px); }
.toc { min-height: 0; display: flex; flex-direction: column; }
.toc summary { cursor: pointer; list-style: none; font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 4px 0 12px; display: flex; justify-content: space-between; }
.toc summary::-webkit-details-marker { display: none; }
.toc-count { font-variant-numeric: tabular-nums; }
.toc-list { display: grid; gap: 2px; overflow-y: auto; border-left: 1px solid var(--line); overscroll-behavior: contain; }
.toc-list a {
  display: grid; grid-template-columns: 26px 1fr; gap: 6px; padding: 7px 10px 7px 14px; margin-left: -1px; border-left: 2px solid transparent;
  text-decoration: none; color: var(--muted); font-size: 0.92rem; line-height: 1.35; transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}
.toc-n { font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.72rem; padding-top: 2px; opacity: 0.7; }
.toc-list a.is-on { color: var(--ink); border-left-color: var(--accent); background: linear-gradient(90deg, var(--accent-soft), transparent); font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .toc-list a:hover { color: var(--ink); } }
.chipbtn {
  appearance: none; font: inherit; font-size: 0.9rem; font-weight: 500; cursor: pointer; height: 38px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 8px; width: fit-content; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); transition: border-color 160ms ease, transform 160ms var(--ease-out);
}
.chipbtn:active { transform: scale(0.97); }
.chipbtn .ic { opacity: 0.5; }
.chipbtn.is-done .ic { opacity: 1; color: var(--ok); }
@media (hover: hover) and (pointer: fine) { .chipbtn:hover { border-color: var(--ink); } }

/* Prose */
.prose { min-width: 0; max-width: 46rem; font-size: 1.1875rem; line-height: 1.72; }
.prose > * + * { margin-top: 1.15em; }
.prose p { color: color-mix(in srgb, var(--ink) 88%, var(--bg)); text-wrap: pretty; }
.prose h2 { margin-top: 2.4em; font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.12; letter-spacing: -0.035em; font-weight: 600; text-wrap: balance; scroll-margin-top: calc(var(--nav-h) + 16px); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 2em; font-size: 1.3rem; line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; scroll-margin-top: calc(var(--nav-h) + 16px); }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.a-label { font-weight: 600; color: var(--ink) !important; margin-top: 1.6em !important; letter-spacing: -0.01em; }
.a-label + p { margin-top: 0.3em; }
.a-list, .a-olist { display: grid; gap: 8px; padding-left: 0; }
.a-list li { position: relative; padding-left: 26px; color: color-mix(in srgb, var(--ink) 88%, var(--bg)); }
.a-list li::before { content: ""; position: absolute; left: 4px; top: 0.72em; width: 8px; height: 8px; border-radius: 3px; background: var(--accent); }
.a-olist { counter-reset: n; }
.a-olist li { counter-increment: n; position: relative; padding-left: 40px; }
.a-olist li::before { content: counter(n); position: absolute; left: 0; top: 0.12em; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 0.8rem; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.a-quote { margin-inline: 0; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 4px var(--r-box) var(--r-box) 4px; }
.a-quote p { font-size: 1.1rem; font-style: normal; color: var(--ink); }
.a-questions { display: grid; gap: 8px; }
.a-questions li { padding: 12px 16px 12px 44px; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); font-size: 1.05rem; line-height: 1.45; }
.a-questions li::before { content: "?"; position: absolute; left: 14px; top: 50%; margin-top: -11px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.8rem; }
.a-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.a-chips li { padding: 6px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.98rem; line-height: 1.4; }

.a-record { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-box); overflow: hidden; box-shadow: var(--shadow); }
.a-record div { display: grid; grid-template-columns: minmax(110px, 0.4fr) 1fr; gap: 16px; padding: 12px 20px; font-size: 1.02rem; line-height: 1.4; }
.a-record div + div { border-top: 1px solid var(--line); }
.a-record dt { color: var(--muted); font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 3px; }
.a-record dd { margin: 0; font-weight: 600; }

.a-flow { display: grid; gap: 0; counter-reset: f; margin-block: 1.6em; }
.a-flow li { counter-increment: f; position: relative; display: flex; align-items: center; gap: 16px; padding: 4px 0 4px 0; }
.a-flow li span { flex: 1; padding: 13px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); font-size: 1.04rem; line-height: 1.4; font-weight: 500; opacity: 0; transform: translateY(10px); transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out), border-color 300ms ease; transition-delay: calc(var(--k, 0) * 70ms); }
.a-flow li::before { content: counter(f); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 0.82rem; font-weight: 700; position: relative; z-index: 1; }
.a-flow li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 38px; bottom: -8px; width: 2px; background: linear-gradient(var(--accent), var(--line-strong)); opacity: 0.5; }
.a-flow.in li span, html:not(.js) .a-flow li span { opacity: 1; transform: none; }
.a-inflow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; }
.a-inflow li { display: inline-flex; align-items: center; gap: 6px; }
.a-inflow li span { padding: 6px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-ctl); font-size: 0.97rem; line-height: 1.35; }
.a-inflow li:not(:last-child)::after { content: "\2192"; color: var(--accent); font-weight: 700; }

.a-xlink { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: center; padding: 16px 20px; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); transition: border-color 160ms ease, transform 200ms var(--ease-out); }
.a-xlink-k { grid-column: 1; font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.a-xlink-t { grid-column: 1; font-weight: 600; font-size: 1.05rem; line-height: 1.35; letter-spacing: -0.01em; }
.a-xlink .ic { grid-column: 2; grid-row: 1 / span 2; color: var(--accent); transition: transform 200ms var(--ease-out); }
.a-xlink.is-soon { background: transparent; border-style: dashed; border-color: var(--line-strong); }
.a-xlink.is-soon .a-xlink-k { color: var(--muted); }
.a-xlink.is-soon .a-xlink-t { color: var(--muted); }
@media (hover: hover) and (pointer: fine) { a.a-xlink:hover { border-color: var(--accent); transform: translateX(3px); } a.a-xlink:hover .ic { transform: translateX(3px); } }
.a-xlink + .a-xlink { margin-top: 10px; }

.a-cta { margin-top: 3em; padding: clamp(24px, 4vw, 40px); background: var(--accent); color: var(--accent-ink); border-radius: var(--r-box); }
.a-cta > * + * { margin-top: 1em; }
.a-cta h2 { margin-top: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--accent-ink); }
.a-cta p, .a-cta li { color: color-mix(in srgb, var(--accent-ink) 88%, transparent); }
.a-cta .a-list li::before { background: var(--accent-ink); }
.a-cta .btn-primary { background: var(--accent-ink); color: var(--accent); }
.a-cta-btn { margin-top: 1.4em; }

.more { padding-bottom: clamp(56px, 8vw, 104px); }
.more-title { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.03em; font-weight: 600; margin-bottom: 20px; }

/* ---------------------------------------------------------- Widgets */
.widget { margin: 2.2em 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-box); box-shadow: var(--shadow); overflow: hidden; font-size: 1rem; line-height: 1.5; }
.prose .widget { max-width: none; }
.w-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.w-kicker { font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); padding: 3px 8px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 6px; }
.w-title { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.015em; }
.w-body { padding: clamp(16px, 3vw, 26px) clamp(16px, 3vw, 24px); }
.w-note { padding: 0 clamp(16px, 3vw, 24px) 18px; color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.w-nojs { color: var(--muted); }
html.js .w-nojs { display: none; }
.w-hint { color: var(--muted); font-size: 0.9rem; margin-top: 12px; }
.widget button { font: inherit; color: inherit; }

/* step flow */
.sf-track { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.sf-step { scroll-snap-align: start; flex: 0 0 auto; appearance: none; cursor: pointer; text-align: left; display: grid; gap: 8px; width: 150px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-ctl); transition: border-color 160ms ease, background-color 200ms ease, transform 160ms var(--ease-out); }
.sf-step:active { transform: scale(0.97); }
.sf-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.8rem; background: var(--surface-2); color: var(--muted); transition: background-color 200ms ease, color 200ms ease; }
.sf-t { font-size: 0.88rem; line-height: 1.3; font-weight: 500; }
.sf-step.is-done .sf-n { background: var(--accent-soft); color: var(--accent); }
.sf-step.is-on { border-color: var(--accent); background: var(--accent-soft); }
.sf-step.is-on .sf-n { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .sf-step:hover { border-color: var(--accent); } }
.sf-bar { height: 6px; border-radius: 99px; background: var(--surface-2); margin-top: 8px; overflow: hidden; }
.sf-bar i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform 400ms var(--ease-out); }
.sf-status { margin-top: 10px; color: var(--muted); font-size: 0.92rem; font-variant-numeric: tabular-nums; }

/* sorter */
.so-pool, .so-col { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; min-height: 52px; }
.so-pool { padding: 12px; border: 1px dashed var(--line-strong); border-radius: var(--r-ctl); }
.so-cols { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.so-zone { padding: 14px; border-radius: var(--r-ctl); background: var(--bg); border: 1px solid var(--line); }
.so-zone h4 { margin: 0 0 10px; font-size: 0.78rem; font-family: "Geist Mono", ui-monospace, monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; display: flex; justify-content: space-between; }
.so-zone.is-launch { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.so-chip { appearance: none; cursor: pointer; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 0.95rem; font-weight: 500; transition: transform 200ms var(--ease-out), background-color 160ms ease, border-color 160ms ease; }
.so-chip:active { transform: scale(0.95); }
.so-chip.ok { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); border-color: var(--ok); }
.so-chip.no { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); border-color: var(--bad); }
.so-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-mini { appearance: none; cursor: pointer; height: 40px; padding: 0 16px; border-radius: var(--r-ctl); font-weight: 600; font-size: 0.95rem; border: 1px solid var(--line-strong); background: transparent; transition: transform 160ms var(--ease-out), border-color 160ms ease; }
.btn-mini:active { transform: scale(0.97); }
.btn-mini.pri { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-mini[disabled] { opacity: 0.45; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) { .btn-mini:not(.pri):not([disabled]):hover { border-color: var(--ink); } }
.so-result { margin-top: 14px; font-size: 0.97rem; color: var(--muted); }
.so-result ul { margin-top: 8px; display: grid; gap: 4px; }
.so-result b { color: var(--ink); }

/* bar rows (timeline, scope meter, versions) */
.tl { display: grid; gap: 6px; }
.tl-axis, .tl-row { display: grid; grid-template-columns: minmax(96px, 168px) 1fr; gap: 14px; align-items: center; }
.tl-axis .tl-scale { position: relative; height: 22px; font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-scale span { position: absolute; top: 0; transform: translateX(-50%); }
.tl-scale span:first-child { transform: none; }
.tl-scale span:last-child { transform: translateX(-100%); }
.tl-row { appearance: none; text-align: left; cursor: pointer; padding: 10px 12px; margin-inline: -12px; border: 1px solid transparent; border-radius: var(--r-ctl); background: transparent; transition: background-color 160ms ease, border-color 160ms ease; }
.tl-row.is-on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
@media (hover: hover) and (pointer: fine) { .tl-row:not(.is-on):hover { background: var(--surface-2); } }
.tl-name { display: grid; line-height: 1.25; }
.tl-name b { font-weight: 600; font-size: 0.97rem; }
.tl-name small { color: var(--muted); font-size: 0.8rem; }
.tl-track { position: relative; height: 30px; border-radius: 8px; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: calc(100% / var(--ticks, 8)) 100%; background-color: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.tl-bar { position: absolute; top: 4px; bottom: 4px; left: calc(var(--f) / var(--max) * 100%); width: calc((var(--t) - var(--f)) / var(--max) * 100%); border-radius: 6px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform 700ms var(--ease-out); transition-delay: calc(var(--k, 0) * 90ms); }
.widget.in .tl-bar { transform: scaleX(1); }
.tl-bar.is-open { background: linear-gradient(90deg, var(--accent) 55%, color-mix(in srgb, var(--accent) 0%, transparent)); border-radius: 6px 0 0 6px; }
.tl-detail { margin-top: 12px; padding: 16px 18px; border-radius: var(--r-ctl); background: var(--bg); border: 1px solid var(--line); }
.tl-detail p { color: var(--ink); font-size: 1rem; }
.tl-detail ul { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.tl-detail li { padding: 4px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 0.88rem; }

.sm-list { display: grid; gap: 8px; }
.sm-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--bg); cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease; line-height: 1.4; }
.sm-item:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.sm-item:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.sm-item input, .ch-opt input { appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border: 2px solid var(--line-strong); border-radius: 6px; background: var(--surface); display: grid; place-items: center; transition: background-color 150ms ease, border-color 150ms ease; }
.sm-item input:checked { background: var(--accent); border-color: var(--accent); }
.sm-item input:checked::after { content: ""; width: 5px; height: 10px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.sm-out { margin-top: 18px; padding: 18px; border-radius: var(--r-ctl); background: var(--bg); border: 1px solid var(--line); }
.sm-out-k { color: var(--muted); font-size: 0.85rem; }
.sm-out-v { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; margin-top: 2px; }
.sm-band { position: relative; margin-top: 18px; height: 12px; border-radius: 99px; display: flex; overflow: visible; background: var(--surface-2); }
.sm-band i { height: 100%; }
.sm-band i:nth-child(1) { background: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); border-radius: 99px 0 0 99px; }
.sm-band i:nth-child(2) { background: color-mix(in srgb, var(--accent) 42%, var(--surface-2)); }
.sm-band i:nth-child(3) { background: color-mix(in srgb, var(--accent) 68%, var(--surface-2)); }
.sm-band i:nth-child(4) { background: var(--accent); border-radius: 0 99px 99px 0; }
.sm-pin { position: absolute; top: -6px; left: calc(var(--at) / var(--max) * 100%); width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: var(--ink); border: 4px solid var(--surface); box-shadow: 0 2px 8px rgb(0 0 0 / .3); transition: left 600ms var(--ease-out); }
.sm-ticks { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.76rem; color: var(--muted); }

/* versions */
.ve-seg { display: inline-grid; grid-auto-flow: column; padding: 4px; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.ve-seg button { appearance: none; cursor: pointer; height: 38px; padding: 0 18px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; font-size: 0.95rem; color: var(--muted); transition: background-color 180ms ease, color 180ms ease, transform 160ms var(--ease-out); }
.ve-seg button:active { transform: scale(0.96); }
.ve-seg button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.ve-top { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.ve-num { font-size: clamp(2.6rem, 6vw, 3.6rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.ve-lbl { color: var(--muted); }
.ve-stack { margin-top: 14px; display: flex; height: 36px; gap: 3px; }
.ve-stack i { flex: var(--n) 1 0; min-width: 0; border-radius: 6px; background: var(--surface-2); transition: flex-grow 600ms var(--ease-out), background-color 300ms ease; display: block; }
.ve-stack i.is-on { background: color-mix(in srgb, var(--accent) 30%, var(--surface-2)); }
.ve-stack i.is-cur { background: var(--accent); }
.ve-chips { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.ve-chips li { padding: 6px 13px; border-radius: 999px; font-size: 0.92rem; background: var(--bg); border: 1px solid var(--line); animation: chip-in 380ms var(--ease-out) both; animation-delay: calc(var(--k, 0) * 30ms); }
.ve-chips li.is-new { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent); font-weight: 600; }
@keyframes chip-in { from { opacity: 0; transform: translateY(6px) scale(0.96); } }

/* matrix */
.fm-wrap { overflow-x: auto; margin-inline: -4px; padding: 0 4px; }
.fm { width: 100%; border-collapse: separate; border-spacing: 6px; min-width: 520px; }
.fm th { font-weight: 600; font-size: 0.95rem; text-align: center; padding: 8px 6px; line-height: 1.25; }
.fm th:first-child, .fm td:first-child { text-align: left; }
.fm tbody th { text-align: left; font-weight: 500; color: var(--muted); font-size: 0.92rem; padding-right: 10px; width: 28%; }
.fm td { padding: 0; }
.fm td span { display: block; text-align: center; padding: 12px 8px; border-radius: 10px; font-size: 0.9rem; font-weight: 500; line-height: 1.25; background: var(--surface-2); transition: transform 180ms var(--ease-out), box-shadow 180ms ease; }
.fm td[data-s="2"] span { background: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); }
.fm td[data-s="3"] span { background: color-mix(in srgb, var(--accent) 52%, var(--surface-2)); color: var(--ink); }
.fm col.is-hi, .fm td.is-hi span { box-shadow: 0 0 0 2px var(--accent); }
.fm th.is-hi { color: var(--accent); }
.fm-colbtn { appearance: none; background: none; border: 0; cursor: pointer; font-weight: 600; font-size: 0.95rem; padding: 4px 6px; border-radius: 8px; }
.fm-tip { margin-top: 14px; padding: 14px 16px; border-radius: var(--r-ctl); background: var(--bg); border: 1px solid var(--line); min-height: 3.4em; }

/* chooser */
.ch-grid { display: grid; gap: 14px; }
.ch-q { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--bg); }
.ch-q p { font-weight: 500; line-height: 1.4; }
.ch-opts { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.ch-opt { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 999px; font-weight: 500; font-size: 0.95rem; background: var(--surface); transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease; }
.ch-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ch-opt:has(input:checked) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ch-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.ch-res { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ch-card { padding: 14px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--bg); opacity: 0.55; transition: opacity 250ms ease, border-color 250ms ease, background-color 250ms ease, transform 250ms var(--ease-out); }
.ch-card b { display: block; font-size: 0.98rem; }
.ch-card small { color: var(--muted); font-size: 0.82rem; line-height: 1.35; display: block; margin-top: 4px; }
.ch-card.is-pick { opacity: 1; border-color: var(--accent); background: var(--accent-soft); transform: translateY(-3px); }
.ch-why { margin-top: 14px; padding: 14px 16px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--bg); }

/* extractor */
.ex-tabs, .qt-tabs { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; max-width: 100%; overflow-x: auto; }
.ex-tabs button, .qt-tabs button { appearance: none; cursor: pointer; height: 38px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; font-size: 0.93rem; color: var(--muted); white-space: nowrap; transition: background-color 180ms ease, color 180ms ease; }
.ex-tabs button[aria-selected="true"], .qt-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.ex-grid { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.wa { padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--accent-soft) 70%, var(--bg)); border: 1px solid var(--line); }
.wa-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 0.82rem; color: var(--muted); }
.wa-top i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.wa-msg { padding: 12px 14px; background: var(--surface); border-radius: 14px 14px 14px 4px; border: 1px solid var(--line); font-size: 1.02rem; line-height: 1.55; }
.wa-msg mark { background: transparent; color: inherit; padding: 1px 3px; margin: 0 -1px; border-radius: 5px; border-bottom: 2px solid var(--accent); cursor: pointer; transition: background-color 160ms ease; outline-offset: 2px; }
.wa-msg mark.is-hi { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.wa-next { margin-top: 10px; font-size: 0.88rem; color: var(--muted); line-height: 1.4; }
.card-fields { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.card-fields h4 { margin: 0; padding: 10px 16px; font-size: 0.72rem; font-family: "Geist Mono", ui-monospace, monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--surface-2); display: flex; justify-content: space-between; align-items: center; }
.cf { display: grid; grid-template-columns: minmax(96px, 0.5fr) 1fr; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 0.98rem; opacity: 0; transform: translateX(8px); transition: opacity 360ms var(--ease-out), transform 360ms var(--ease-out), background-color 160ms ease; transition-delay: calc(var(--k, 0) * 110ms); }
.cf.on { opacity: 1; transform: none; }
.cf.is-hi { background: var(--accent-soft); }
.cf dt { color: var(--muted); font-size: 0.82rem; padding-top: 2px; }
.cf dd { margin: 0; font-weight: 600; }

.qt-body { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.qt-fields { display: grid; gap: 8px; }
.qt-field { padding: 10px 14px; background: var(--bg); border: 1px dashed var(--line-strong); border-radius: var(--r-ctl); font-size: 0.97rem; animation: chip-in 360ms var(--ease-out) both; animation-delay: calc(var(--k, 0) * 50ms); }
.qt-field small { display: block; color: var(--muted); font-size: 0.75rem; font-family: "Geist Mono", ui-monospace, monospace; letter-spacing: 0.06em; text-transform: uppercase; }
.qt-card { padding: 18px; border-radius: 14px; background: var(--accent-soft); }
.qt-card b { display: block; font-size: 1.15rem; letter-spacing: -0.02em; }
.qt-card p { margin-top: 6px; color: var(--muted); font-size: 0.95rem; }
.qt-big { font-size: 2.2rem; font-weight: 600; letter-spacing: -0.04em; color: var(--accent); line-height: 1; margin-bottom: 6px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ Narrow */
@media (max-width: 1000px) {
  .art-grid { grid-template-columns: 1fr; gap: 8px; }
  .art-side { position: static; max-height: none; }
  .toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 4px 16px 4px; }
  .toc:not([open]) summary { padding-bottom: 8px; }
  .toc-list { max-height: 320px; margin-bottom: 12px; }
  .side-tools { display: none; }
  .map-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .acards-lg { grid-template-columns: 1fr; }
  .prose { font-size: 1.125rem; }
  .so-cols, .ex-grid, .qt-body { grid-template-columns: 1fr; }
  .ch-res { grid-template-columns: 1fr; }
  .tl-axis, .tl-row { grid-template-columns: 1fr; gap: 6px; }
  .tl-axis > :first-child { display: none; }
  .tl-row { padding: 10px 12px; }
  .a-record div { grid-template-columns: 1fr; gap: 2px; }
  .widget { margin-inline: calc(var(--gutter) * -0.5); border-radius: 14px; }
  .ve-seg button { padding: 0 14px; }
  .fm { min-width: 0; border-spacing: 4px; }
  .fm tbody th { width: 26%; font-size: 0.78rem; padding-right: 4px; }
  .fm th { font-size: 0.78rem; padding: 6px 2px; }
  .fm-colbtn { font-size: 0.78rem; padding: 2px; line-height: 1.2; }
  .fm td span { padding: 10px 4px; font-size: 0.78rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tl-bar, .a-flow li span, .cf, .ve-chips li, .qt-field, .sf-bar i, .sm-pin, .ve-stack i { transition: none !important; animation: none !important; transform: none; opacity: 1; }
  .tl-bar { transform: scaleX(1); }
}

/* Home page teaser */
.writing { padding-top: clamp(40px, 6vw, 72px); }
.writing-cards { margin-top: 36px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.writing-all { margin-top: 24px; }
@media (max-width: 900px) { .writing-cards { grid-template-columns: 1fr; } }

/* No-JS fallback: the text version of a chart */
.w-nojs table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-top: 10px; }
.w-nojs th, .w-nojs td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.w-nojs ul, .w-nojs ol { margin: 8px 0 0 1.2em; list-style: revert; }

/* Key takeaways box */
.tldr { margin-top: 32px; max-width: 50rem; padding: clamp(18px, 3vw, 28px) clamp(18px, 3vw, 30px); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); border-left: 5px solid var(--accent); border-radius: 6px var(--r-box) var(--r-box) 6px; }
.tldr-k { margin: 0 0 14px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.tldr ul { display: grid; gap: 10px; }
.tldr li { position: relative; padding-left: 22px; font-size: 1.04rem; line-height: 1.5; color: var(--ink); }
.tldr li::before { content: ""; position: absolute; left: 2px; top: 0.66em; width: 8px; height: 8px; border-radius: 3px; background: var(--accent); }
.tldr strong { font-weight: 650; }
.tldr-home { margin: 0 auto; }
.short { padding: clamp(8px, 2vw, 24px) 0 clamp(32px, 5vw, 56px); }
.short .tldr { margin-top: 0; }

/* Sourced data points */
.facts { margin: 2em 0; padding: clamp(18px, 3vw, 26px); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 4px var(--r-box) var(--r-box) 4px; }
.facts > * + * { margin-top: 0.7em; }
.facts-k { font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.prose .facts-claim { font-size: 1.2rem; line-height: 1.4; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.prose .facts p { font-size: 1rem; line-height: 1.6; }
.prose .facts-why { color: var(--muted); font-style: italic; }
.prose .facts-src { font-size: 0.9rem; color: var(--muted); }
.facts-src a { color: var(--accent); text-underline-offset: 3px; }
