@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/geist-1.5.1.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/geist-mono-1.5.1.woff2') format('woff2');
}

:root {
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
  --t1: 12px; --t2: 13px; --t3: 14px; --t4: 16px; --t5: 20px; --t6: 24px; --t7: 28px; --t8: 36px; --t9: 48px;
  --lh1: 1.15; --lh2: 1.4; --lh3: 1.6;
  --track: -.02em; --track-hero: -.03em;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --r1: 4px; --r2: 8px; --r3: 12px; --pill: 999px;
  --h1: 20px; --h2: 28px; --h3: 32px; --h4: 40px;
  --w-page: 1080px; --w-read: 720px; --w-aside: 300px; --w-connect: 470px;
  --d0: .1s; --d1: .15s; --d2: .2s; --ease: cubic-bezier(.32,.72,0,1);
  --bg: #0B0D12; --surface: #12151C; --surface2: #1A1E28; --hover: #161A23; --line: #232834; --line2: #5A6378; --ctl: #6B7386;
  --ink: #ECEEF2; --soft: #B0B6C4; --hint: #8D94A6;
  --accent: #D4FF3A; --accent-text: #D4FF3A; --accent-soft: rgba(212,255,58,.12); --accent-edge: rgba(212,255,58,0);
  --seg-partial: #6B7386; --seg-failed: #3A4152;
  --bar: #0E1118; --term: #07080C; --term-surface: #10141C;
  --ring: rgba(255,255,255,.05); --pop: 0 8px 24px rgba(0,0,0,.5); --rail-shadow: rgba(236,238,242,.24); color-scheme: dark;
  --bar-ink: #E9EBF0; --bar-soft: #9AA1B1; --bar-line: #232834; --bar-fill: rgba(255,255,255,.07);
  --term-ink: #E9EBF0; --term-soft: #8E96A8; --term-line: #2A3040;
  --on-accent: #0B0D12; --scrim: rgba(5,6,10,.6);
  /* Old token names, kept so pages that are not migrated yet follow the new theme. Verdict colours are neutral:
     meaning always comes from the icon and the word, never from colour alone. */
  --paper: var(--surface); --bench: var(--bg); --signal: var(--accent); --graphite: var(--hint); --text2: var(--soft);
  --chip: var(--surface2); --link: var(--accent-text); --line3: color-mix(in srgb, var(--line2) 55%, var(--line));
  --dark2: var(--term-surface); --dark-line: var(--term-line); --on-dark: var(--term-ink); --on-dark2: var(--term-soft);
  --tested-bg: var(--surface2); --tested: var(--soft); --tested-bar: var(--seg-partial);
  --verified-bg: var(--accent-soft); --verified: var(--accent-text); --verified-bar: var(--accent);
  --platform-bg: var(--surface2); --platform: var(--ink); --platform-bar: var(--hint);
  --comment-bg: var(--surface2);
  --partly-bg: var(--surface2); --partly: var(--soft); --failed-bg: var(--surface2); --failed: var(--ink);
  --risk-bg: var(--surface2); --risk-line: var(--line2); --risk: var(--soft);
  --pick: var(--accent-soft);
}
/* Dark is the default. The system light setting switches to light; [data-theme] pins either one. */
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --bg: #F6F7F9; --surface: #FFFFFF; --surface2: #EFF1F4; --hover: #F2F4F7; --line: #E1E4E9; --line2: #CDD2DA; --ctl: #7A808E;
  --ink: #0B0D12; --soft: #454B5A; --hint: #666C7C;
  --accent-text: #3A6200; --accent-soft: #EAF8BD; --accent-edge: rgba(11,13,18,.22);
  --seg-partial: #9AA1B1; --seg-failed: #454B5A;
  --bar: #0B0D12; --term: #0B0D12; --term-surface: #151A24;
  --ring: rgba(11,13,18,.06); --pop: 0 8px 24px rgba(0,0,0,.14); --rail-shadow: rgba(0,0,0,.28); color-scheme: light; } }
:root[data-theme="light"] { --bg: #F6F7F9; --surface: #FFFFFF; --surface2: #EFF1F4; --hover: #F2F4F7; --line: #E1E4E9; --line2: #CDD2DA; --ctl: #7A808E;
  --ink: #0B0D12; --soft: #454B5A; --hint: #666C7C;
  --accent-text: #3A6200; --accent-soft: #EAF8BD; --accent-edge: rgba(11,13,18,.22);
  --seg-partial: #9AA1B1; --seg-failed: #454B5A;
  --bar: #0B0D12; --term: #0B0D12; --term-surface: #151A24;
  --ring: rgba(11,13,18,.06); --pop: 0 8px 24px rgba(0,0,0,.14); --rail-shadow: rgba(0,0,0,.28); color-scheme: light; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t3)/var(--lh2) var(--sans); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; }
/* The HTML source has the content first and the header after it; the flex order puts them back where they were. */
body > .site-header { order: -2; }
body > .sim-band { order: -1; }
body > .site-footer { order: 1; }
body > .wrap, body > main, body > section { width: 100%; }
.skip-link { position: absolute; left: 8px; top: -64px; z-index: 100; padding: 10px 14px; border-radius: var(--r2); background: var(--ink); color: var(--bg); font: 600 var(--t3) var(--sans); text-decoration: none; }
.skip-link:focus { top: 8px; outline: 2px solid var(--accent-text); outline-offset: 2px; }
.skip-link + .skip-link:focus { left: 8px; }
main:focus { outline: 0; }
a { color: var(--ink); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: var(--r1); }
.site-header :focus-visible, .cx :focus-visible { outline-color: var(--accent); }
img, svg { max-width: 100%; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 600; line-height: var(--lh1); letter-spacing: var(--track); }
p { margin: 0; text-wrap: pretty; }
.mono { font-family: var(--mono); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--hint); }
.soft { color: var(--soft); }
.wrap { max-width: calc(var(--w-page) + var(--s5) * 2); margin: 0 auto; padding-inline: var(--s5); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.eyebrow { font-size: var(--t1); font-weight: 500; color: var(--hint); }
.label { font-size: var(--t1); color: var(--hint); font-weight: 500; }
.link { text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; transition: text-decoration-color var(--d1); }
.link:hover { text-decoration-color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@keyframes ww-fill { from { transform: scaleX(0) } to { transform: scaleX(1) } }
@keyframes ww-pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }

/* Header and footer: the bar is ink in both themes */
.site-header { background: var(--bar); color: var(--bar-ink); border-bottom: 1px solid var(--bar-line); position: relative; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: var(--s2); text-decoration: none; color: var(--ink); }
.site-header .brand { color: var(--bar-ink); }
.brand-mark { width: 24px; height: 24px; border-radius: var(--r1); background: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.brand-mark svg { stroke: var(--on-accent); width: 14px; height: 14px; }
.brand-name { font-size: var(--t4); font-weight: 600; letter-spacing: var(--track); }
.main-nav { display: flex; gap: var(--s1); flex-wrap: wrap; font-size: var(--t3); font-weight: 500; flex: 1 1 auto; margin-left: var(--s2); }
.main-nav a { text-decoration: none; color: var(--bar-soft); display: inline-flex; align-items: center; min-height: 56px; padding: 0 var(--s2); transition: color var(--d1), background var(--d1); }
.main-nav a:hover { color: var(--bar-ink); background: var(--bar-fill); }
.main-nav a[aria-current="page"] { color: var(--bar-ink); box-shadow: inset 0 -2px 0 var(--accent); }
.search-trigger { font: inherit; font-size: var(--t2); color: var(--bar-soft); display: inline-flex; align-items: center; gap: var(--s2); height: var(--h3); padding: 0 var(--s2); border-radius: var(--r2); border: 1px solid var(--ctl); background: var(--bar-fill); cursor: pointer; min-width: 200px; text-decoration: none; transition: color var(--d1), border-color var(--d1); }
.search-trigger:hover { color: var(--bar-ink); border-color: var(--bar-soft); }
.search-trigger span { flex: 1; text-align: left; }
kbd { font-family: var(--mono); font-size: var(--t1); padding: 1px 6px; border-radius: var(--r1); border: 1px solid var(--line); background: var(--surface2); color: var(--soft); }
.search-trigger kbd { background: none; border-color: var(--bar-line); color: var(--bar-soft); }
.btn { font: 500 var(--t2)/var(--lh2) var(--sans); min-height: 36px; padding: 6px var(--s3); border-radius: var(--r2); border: 1px solid var(--ctl); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: var(--s1); cursor: pointer; text-decoration: none; text-align: center; transition: background var(--d1), border-color var(--d1), transform var(--d0); }
.btn:hover { color: var(--ink); background: var(--surface2); }
.btn:active { transform: scale(.98); }
.btn-ink { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-ink:hover { background: var(--ink); color: var(--bg); opacity: .9; }
.btn-cta { background: var(--accent); color: var(--on-accent); border-color: var(--accent-edge); font-weight: 600; }
.btn-cta:hover { background: var(--accent); color: var(--on-accent); filter: brightness(.95); }
.btn-sm { min-height: 32px; padding: 4px var(--s3); }
@media (pointer: coarse) { .btn { min-height: 44px; } .btn-sm { min-height: 40px; } }
.site-footer { background: none; color: var(--hint); border-top: 1px solid var(--line); margin-top: var(--s6); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: var(--s2) var(--s4); flex-wrap: wrap; align-items: center; padding-block: var(--s5) var(--s7); font-size: var(--t2); }
.site-footer .brand-mark { width: 20px; height: 20px; }
.site-footer .brand-mark svg { width: 12px; height: 12px; }
.site-footer .brand-name { font-size: var(--t3); }
.site-footer nav { display: flex; gap: var(--s2) var(--s4); flex-wrap: wrap; font-size: var(--t2); }
.site-footer nav a { color: var(--soft); text-decoration: none; }
.site-footer nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-note { font-size: var(--t2); color: var(--hint); }

/* Surfaces */
.bench { background: none; border-bottom: 1px solid var(--line); position: relative; }
.crosshair { display: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); }
.card-ink { background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r3); overflow: hidden; }
.dark { background: var(--term); color: var(--term-ink); }
.mark { background: var(--accent); padding: 0 .15em; border-radius: var(--r1); box-decoration-break: clone; -webkit-box-decoration-break: clone; color: var(--on-accent); font-style: normal; }
.live { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t1); font-weight: 600; color: var(--ink); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); animation: ww-pulse 2s ease-in-out infinite; }
.h-hero { font-size: var(--t9); line-height: var(--lh1); letter-spacing: var(--track-hero); overflow-wrap: anywhere; }
.h-page { font-size: clamp(var(--t6), 3.4vw, var(--t7)); line-height: var(--lh1); letter-spacing: var(--track); overflow-wrap: anywhere; }
.h-section { font-size: var(--t5); letter-spacing: var(--track); line-height: var(--lh1); }
.h-sub { font-size: var(--t5); letter-spacing: var(--track); }
.lead { font-size: var(--t4); line-height: var(--lh3); color: var(--soft); }
.section { padding-block: var(--s8); display: flex; flex-direction: column; gap: var(--s5); }
.cmd { display: flex; align-items: center; gap: var(--s2); background: var(--term); border: 1px solid var(--term-line); border-radius: var(--r2); padding: 6px 6px 6px var(--s4); font-family: var(--mono); font-size: var(--t2); color: var(--term-ink); }
.cmd code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd .prompt { color: var(--term-soft); }
.copy { flex: none; width: 40px; height: 40px; border-radius: var(--r2); border: 1px solid var(--term-line); background: var(--term-surface); color: var(--term-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.copy.light { border-color: var(--ctl); background: var(--surface); color: var(--ink); width: 44px; height: auto; align-self: stretch; }
.copy[data-copied] { color: var(--accent-text); }
.codeblock { flex: 1; min-width: 0; background: var(--term); color: var(--term-ink); border: 1px solid var(--term-line); border-radius: var(--r2); padding: var(--s3) var(--s4); font-family: var(--mono); font-size: var(--t2); line-height: var(--lh3); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }

/* Search box */
.askbox { display: flex; align-items: center; gap: var(--s2); background: var(--surface); border: 1px solid var(--ctl); border-radius: var(--r3); padding: 0 var(--s1) 0 var(--s3); min-height: var(--h4); box-shadow: 0 0 0 4px var(--ring); color: var(--hint); transition: border-color var(--d1); }
.askbox:focus-within { border-color: var(--accent-text); }
.askbox input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: var(--t3); color: var(--ink); min-height: 38px; }
.askbox input::placeholder { color: var(--hint); }
.askbox button { font: 500 var(--t2) var(--sans); min-height: var(--h3); padding: 0 var(--s3); border: 0; border-radius: var(--r2); background: var(--ink); color: var(--bg); cursor: pointer; }
.chip { display: inline-flex; align-items: center; gap: var(--s1); min-height: var(--h1); padding: 0 var(--s2); border-radius: var(--pill); background: var(--surface2); font-size: var(--t1); font-weight: 500; color: var(--soft); white-space: nowrap; }
.chip.mono { font-family: var(--mono); font-weight: 400; }
.chip.dash { background: none; border: 1px dashed var(--line2); color: var(--hint); }
.pill { text-decoration: none; display: inline-flex; align-items: center; gap: var(--s1); min-height: var(--h2); padding: 0 var(--s3); border-radius: var(--r2); border: 1px solid var(--ctl); background: var(--surface); font-size: var(--t2); color: var(--soft); transition: border-color var(--d1), background var(--d1); }
.pill:hover { color: var(--ink); border-color: var(--soft); }

/* Evidence, outcomes, risk */
.ev { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t1); font-weight: 600; padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.ev.tested { background: var(--tested-bg); color: var(--tested); }
.ev.verified { background: var(--verified-bg); color: var(--verified); }
.ev.platform { background: var(--platform-bg); color: var(--platform); }
.ev.comment { background: var(--comment-bg); color: var(--text2); }
.ev.plain { background: transparent; padding: 0; }
.outcome { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.outcome.worked { background: var(--accent); color: var(--on-accent); }
.outcome.partial { background: var(--surface2); color: var(--soft); border: 1px solid var(--line2); }
.outcome.failed { background: var(--surface2); color: var(--ink); border: 1px solid var(--ctl); }
.outcome.couldnt-try { background: transparent; color: var(--text2); border: 1px dashed var(--hint); padding: 3px 9px; }
.couldnt-line { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--text2); text-decoration: underline; text-decoration-color: var(--line3); text-underline-offset: 3px; }
.couldnt-line:hover { color: var(--link); text-decoration-color: currentColor; }
.risk { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; font-weight: 500; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--risk-line); background: var(--risk-bg); color: var(--risk); white-space: nowrap; }
.risk.none { border-color: var(--line); background: var(--paper); color: var(--text2); }
.risks { display: flex; gap: 6px; flex-wrap: wrap; }

/* Rates */
.rate { display: flex; flex-direction: column; gap: 6px; }
.rate-line { display: flex; align-items: baseline; gap: 8px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.rate-big { font-size: 20px; font-weight: 600; letter-spacing: var(--track); }
.track { height: 6px; border-radius: 99px; background: var(--line2); overflow: hidden; }
.track.few { background: repeating-linear-gradient(90deg, var(--line3) 0 6px, transparent 6px 10px); }
.track i { display: block; height: 6px; transform-origin: left; animation: ww-fill 700ms var(--ease) both; }
.track i.tested { background: var(--tested-bar); } .track i.verified { background: var(--verified-bar); } .track i.platform { background: var(--platform-bar); }
.heat { border-collapse: separate; border-spacing: 4px; font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; width: 100%; }
.heat th { text-align: left; font-weight: 500; font-size: 11px; color: var(--graphite); padding: 6px 8px; }
.heat th[scope="row"] { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink); white-space: nowrap; padding: 0 8px; }
.heat td { padding: 10px 12px; border-radius: 6px; min-width: 96px; border: 1px solid var(--line2); background: var(--paper); color: var(--graphite); }
.heat td b { display: block; font-size: 15px; font-weight: 600; }
.heat td small { display: block; font-size: 11px; opacity: .8; }
.heat td.r85 { background: var(--accent); color: var(--on-accent); border-color: var(--accent-edge); }
.heat td.r75 { background: var(--surface2); color: var(--ink); border-color: var(--ctl); }
.heat td.rlow { background: var(--surface2); color: var(--soft); border-color: var(--line2); }
.heat td.few { background: repeating-linear-gradient(45deg, var(--line2) 0 4px, var(--paper) 4px 8px); color: var(--text2); border-color: var(--line); }
.heat td.mine { outline: 2px solid var(--ink); outline-offset: -2px; }
.scroll-x { overflow-x: auto; position: relative; }

/* Tables and lists */
.board { width: 100%; min-width: 920px; border-collapse: collapse; font-size: 14px; }
.board thead th { text-align: left; font-size: var(--t1); color: var(--graphite); font-weight: 500; padding: 12px 8px; }
.board thead th:first-child, .board td:first-child { padding-left: 20px; }
.board thead th:last-child, .board td:last-child { padding-right: 20px; }
.board td { padding: 14px 8px; vertical-align: top; border-top: 1px solid var(--line2); }
.board .pkg-name { font-size: 16px; font-weight: 600; letter-spacing: -.015em; text-decoration: none; }
.kind { font-family: var(--mono); font-size: var(--t1); color: var(--hint); }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--chip); border-radius: 10px; flex-wrap: wrap; }
.tabs a { font-size: 13px; font-weight: 500; min-height: 36px; padding: 0 14px; border-radius: 7px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text2); transition: background-color 150ms var(--ease); }
.tabs a[aria-current="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent-text); }
.underline-tabs { display: flex; gap: 4px; overflow-x: auto; font-size: 14px; font-weight: 500; }
.underline-tabs a, .underline-tabs button { font: inherit; text-decoration: none; padding: 14px 12px 12px; color: var(--text2); white-space: nowrap; border: 0; background: transparent; border-bottom: 2px solid transparent; cursor: pointer; min-height: 44px; }
.underline-tabs [aria-current="true"], .underline-tabs [aria-current="page"], .underline-tabs [aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent-text); }
.board-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface2); font-size: 13px; color: var(--text2); }
.compare { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line2); vertical-align: top; }
.compare thead th { border-bottom: 1px solid var(--line); padding-block: 18px; }
.compare tbody { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.compare tbody th { font-family: var(--sans); font-weight: 500; padding-left: 20px; }
.compare .pick { background: var(--pick); }
.compare thead .pick { border-top: 2px solid var(--accent-text); }
.letter { font-family: var(--mono); font-size: 13px; font-weight: 600; width: 24px; height: 24px; border-radius: 6px; background: var(--chip); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.letter.on { background: var(--signal); outline: 1px solid var(--line2); }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); background: var(--paper); border: 1px solid var(--line2); border-radius: 12px; }
.stat-strip > div { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); }
.stat-strip > div:last-child { border-right: 0; }
.stat-big { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 36px; font-weight: 600; letter-spacing: var(--track); line-height: 1; }
.stat-mid { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.stat-note { font-family: var(--mono); font-size: 12px; color: var(--text2); }
.banner { background: var(--surface2); border-bottom: 1px solid var(--line2); color: var(--ink); font-size: 14px; }
.banner .wrap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-block: 10px; }
.layout-2 { display: flex; gap: 32px; flex-wrap: wrap; align-items: flex-start; padding-block: 32px 96px; }
.layout-2 > .main-col { flex: 999 1 660px; min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.layout-2 > aside { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.report { display: flex; flex-wrap: wrap; overflow: hidden; }
.report .body { flex: 999 1 360px; min-width: 0; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.report .meta { flex: 1 1 220px; background: var(--surface2); border-left: 1px solid var(--line2); padding: 20px; display: flex; flex-direction: column; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--text2); }
.report blockquote { margin: 0; font-size: 16px; line-height: 1.55; }
.consensus { border-radius: 12px; padding: 26px 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.consensus .full { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }
.consensus .cell { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--dark-line); padding-top: 14px; }
.consensus .label { color: var(--on-dark2); }
dl.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13px; }
dl.facts dt { color: var(--graphite); }
dl.facts dd { margin: 0; font-family: var(--mono); overflow-wrap: anywhere; }
.list-card { text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; justify-content: space-between; gap: 12px; }
.list-card:hover { border-color: var(--ink); color: var(--ink); }
.fresh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); border-top: 1px solid var(--line2); }
.fresh-grid > div { padding: 20px 24px 8px 0; display: flex; flex-direction: column; gap: 18px; }
.fresh-grid > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.fresh-item { text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.fresh-item b { font-size: 17px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.qrow { display: flex; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.qrow:last-child { border-bottom: 0; }
.counter { width: 56px; padding: 6px 0; display: flex; flex-direction: column; text-align: center; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.counter b { font-size: 16px; font-weight: 600; }
.counter small { font-size: 10px; color: var(--graphite); }
.counter.ink { background: var(--ink); color: var(--bg); border-radius: 8px; }
.counter.ink small { color: inherit; opacity: .7; }
.status { display: inline-flex; gap: 5px; align-items: center; padding: 3px 8px; border-radius: 6px; font-weight: 600; font-size: var(--t1); }
.status.open { border: 1px dashed var(--hint); color: var(--text2); }
.ladder { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ladder li { padding: 24px; display: flex; flex-direction: column; gap: 12px; border-right: 1px solid var(--line); }
.ladder li:last-child { border-right: 0; }
.agents-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--dark-line); }
.agents-list li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--dark-line); }
.agents-list .k { font-family: var(--mono); font-size: 12px; color: var(--signal); width: 92px; flex: none; padding-top: 2px; }
.agents-list .v { font-size: 15px; line-height: 1.5; color: var(--on-dark); }
.json { margin: 0; padding: 18px 20px; color: var(--on-dark); overflow-x: auto; white-space: pre; font-family: var(--mono); font-size: 13px; line-height: 1.65; }
.json .k { color: var(--term-soft); }
.filters fieldset { border: 0; margin: 0; padding: 0 0 20px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.filters legend { padding: 0 0 8px; }
.filters label { display: flex; gap: 10px; align-items: center; font-size: 14px; min-height: 32px; cursor: pointer; }
.filters label .n { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--graphite); }
.filters input { width: 16px; height: 16px; accent-color: var(--ink); }
/* Search: the two columns (240px filters + 660px results + 32px gap + 48px padding) fit from 1000px (J-438 rail breakpoint). Below that the
   results come first and the filters fold into one "Filters" button (<details>); from 1000px the summary is hidden
   and the content always shown, so the sidebar is unchanged. Browsers without ::details-content keep the button. */
.layout-search > aside.filters { flex: 1 1 240px; max-width: 300px; }
.filters-mobile > summary { list-style: none; min-height: 44px; }
.filters-mobile > summary::-webkit-details-marker { display: none; }
.filters-mobile > summary::after { content: "▾"; font-size: 11px; }
.filters-mobile[open] > summary::after { content: "▴"; }
.filters-mobile[open] > summary { margin-bottom: 20px; }
@media (max-width: 999px) {
  .layout-search { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 24px; }
  .layout-search > aside.filters { flex: none; max-width: none; }
  .layout-search > .main-col { flex: none; }
  .filters-mobile > summary { width: fit-content; }
}
@media (min-width: 1000px) {
  .layout-search { flex-wrap: nowrap; }
  @supports selector(::details-content) {
    .filters-mobile > summary { display: none; }
    .filters-mobile::details-content { content-visibility: visible; display: block; }
  }
}
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.topic-card { text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
.topic-card:hover { border-color: var(--ink); color: var(--ink); }
.topic-card h3 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.topic-card p { font-size: 14px; line-height: 1.5; margin: 0; }
.topic-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line2); display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.topic-foot .rate { flex: 1 1 160px; min-width: 0; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pill.on { background: var(--accent); border-color: var(--accent-edge); color: var(--on-accent); font-weight: 500; }
a.chip { text-decoration: none; }
a.chip:hover { color: var(--ink); }
.chip.on { background: var(--accent); color: var(--on-accent); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 0; border-top: 1px solid var(--line2); }
.steps li { display: flex; flex-direction: column; gap: 10px; padding: 24px 24px 8px 0; font-size: 15px; line-height: 1.55; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.steps b { font-size: 20px; letter-spacing: -.02em; font-weight: 600; }
.step-n { font-family: var(--mono); font-size: 12px; font-weight: 600; width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 720px) { .steps li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); } }
.opt-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.opt-card { text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 12px; transition: border-color 150ms var(--ease); }
.opt-card:hover { border-color: var(--ink); color: var(--ink); }
.opt-card.best { border-color: var(--ink); }
mark { background: var(--accent); color: var(--on-accent); padding: 0 2px; border-radius: 3px; }
.avatar { width: 40px; height: 40px; border-radius: 10px; background: var(--surface2); color: var(--ink); border: 1px solid var(--line2); display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 600; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 72px; height: 72px; border-radius: 12px; font-size: 22px; }
.empty { border: 1px dashed var(--hint); border-radius: 12px; padding: 20px; color: var(--text2); background: var(--paper); }
.prose { max-width: 70ch; display: flex; flex-direction: column; gap: 14px; font-size: 16px; line-height: 1.6; }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.lead code, .clamp-2 code { font-family: var(--mono); font-size: .9em; background: var(--chip); padding: 1px 4px; border-radius: 4px; overflow-wrap: anywhere; }
.prose code { font-family: var(--mono); font-size: .92em; background: var(--chip); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.prose pre { margin: 0; max-width: 100%; overflow-x: auto; }
.prose .table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.prose table { border-collapse: collapse; font-size: 14px; line-height: 1.45; min-width: 100%; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--line2); min-width: 120px; }
.prose th { font-weight: 600; border-bottom: 1px solid var(--line3); white-space: nowrap; }
.prose blockquote { margin: 0; padding: 10px 14px; border-left: 3px solid var(--line3); color: var(--text2); background: var(--paper); border-radius: 0 8px 8px 0; }

/* /connect page (views/static.ts): one column, no tabs */
.connect-page { max-width: 720px; }
.cn-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 28px; }
.cn-steps > li { display: flex; gap: 16px; align-items: flex-start; }
.cn-n { flex: none; font-size: 12px; font-weight: 600; width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; }
.cn-h { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: var(--track); }
.cn-sub { margin: 0; font-size: 15px; font-weight: 600; }
.cn-others { list-style: none; margin: 0; padding: 0; }
.cn-others > li { padding: 18px 0; border-top: 1px solid var(--line); }
.url-box { display: flex; align-items: center; gap: 8px; min-width: 0; background: var(--paper); border: 1px solid var(--line2); border-radius: 12px; padding: 6px 6px 6px 14px; }
.url-text { flex: 1; min-width: 0; font-size: clamp(12px, 3.6vw, 15px); white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.url-text::-webkit-scrollbar { display: none; }
/* J-438: the 480px stacked-step rule moved into design.ts (number beside the heading on phones). */

/* Thread header: short "Try it" for phones, right under "For your agent" (the full panel sits further down) */
.try-short { display: none; }
@media (max-width: 767px) { .try-short { display: flex; flex-direction: column; gap: 6px; max-width: 680px; } .try-short a { font-size: 13px; font-weight: 500; }
  /* Phones: keep the short Try it panel inside the first 860px (same order, tighter spacing). */
  .thread-hero { padding-block: 20px 24px !important; gap: 14px !important; }
  .thread-head { gap: 10px !important; }
  .thread-head .h-page { font-size: 30px; line-height: 1.08; letter-spacing: var(--track); }
  .thread-head .lead { font-size: 16px; line-height: 1.45; }
  .thread-head .agent-line { gap: 4px; }
  .thread-head .agent-line p { font-size: 12px !important; line-height: 1.45 !important; }
}

/* Connect dialog (ui.ts connectDialog): one message to paste into any agent */

/* Command palette */
.palette { position: fixed; inset: 0; z-index: 50; display: none; }
.palette[data-open] { display: block; }
.palette .scrim { position: absolute; inset: 0; background: var(--scrim); }
.palette .panel { position: absolute; left: 50%; top: 72px; transform: translateX(-50%); width: min(680px, calc(100vw - 32px)); background: var(--surface); border-radius: var(--r3); border: 1px solid var(--line2); box-shadow: var(--pop); overflow: hidden; }
.palette .input { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s4); border-bottom: 1px solid var(--line); color: var(--hint); }
.palette input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: var(--t4); min-height: 56px; background: transparent; color: var(--ink); }
.palette .results { padding: var(--s2); display: flex; flex-direction: column; gap: 2px; max-height: min(470px, 60vh); overflow-y: auto; }
.palette .group { font-size: var(--t1); font-weight: 500; color: var(--hint); padding: var(--s3) var(--s3) var(--s1); }
.palette .item { font: inherit; text-align: left; display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); min-height: 48px; border: 0; border-radius: var(--r2); cursor: pointer; background: transparent; color: var(--ink); text-decoration: none; transition: background var(--d1); }
.palette .item[aria-selected="true"] { background: var(--surface2); box-shadow: inset 2px 0 0 var(--accent-text); }
.palette .item .ic { width: 28px; height: 28px; flex: none; border-radius: var(--r1); display: inline-flex; align-items: center; justify-content: center; font: 600 var(--t1) var(--mono); background: var(--surface2); color: var(--ink); }
.palette .item[aria-selected="true"] .ic { background: var(--accent); color: var(--on-accent); }
.palette .item .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.palette .item .t b { font-size: var(--t3); font-weight: 500; }
.palette .item .t small { font-size: var(--t1); color: var(--soft); }
.palette .item .m { font-family: var(--mono); font-size: var(--t1); color: var(--hint); }
.palette .foot { display: flex; gap: var(--s4); align-items: center; padding: var(--s2) var(--s4); border-top: 1px solid var(--line); background: var(--surface2); font-size: var(--t1); color: var(--soft); flex-wrap: wrap; }

@media (max-width: 720px) {
  .wrap { padding-inline: 16px; }
  .search-trigger { min-width: 0; flex: 1; }
  .main-nav { order: 3; width: 100%; gap: 16px; overflow-x: auto; flex-wrap: nowrap; }
  .askbox { flex-wrap: wrap; padding: 8px 8px 8px 14px; }
  .askbox .ctx { display: none; }
  .stat-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .fresh-grid > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .ladder li { border-right: 0; border-bottom: 1px solid var(--line); }
  .report .meta { border-left: 0; border-top: 1px solid var(--line2); }
  .section { padding-block: 48px; }
}

/* v3: shared components (ui.ts). Mobile-first; nothing may overflow at 375px. */
.btn-lg { min-height: 44px; padding: 0 var(--s4); font-size: var(--t3); }
.btn-outline { border-color: var(--soft); }
.accent { color: var(--accent-text); }
.btn-ink .accent { color: inherit; }
html:has(dialog[open]) { overflow: hidden; }

/* Mobile header (≤ 640px): logo, search icon, menu button; the rest moves into the sheet */
.hdr-mobile { display: none; margin-left: auto; gap: 4px; align-items: center; }
.hdr-icon { width: 44px; height: 44px; border-radius: var(--r2); border: 0; background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; flex: none; }
.hdr-icon:hover { background: var(--surface2); color: var(--ink); }
.site-header .hdr-icon { color: var(--bar-ink); }
.site-header .hdr-icon:hover { background: var(--bar-fill); color: var(--bar-ink); }
.ww-sheet { margin: 0; padding: 0; border: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; background: var(--surface); color: var(--ink); }
.ww-sheet[open] { display: flex; flex-direction: column; }
.ww-sheet::backdrop { background: var(--scrim); }
.sheet-head { height: 56px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px 0 16px; border-bottom: 1px solid var(--line); }
.sheet-head .hdr-icon { background: var(--surface2); }
.sheet-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.sheet-search { display: flex; align-items: center; gap: var(--s3); background: var(--surface); border: 1px solid var(--ctl); border-radius: var(--r3); padding: 0 var(--s3); min-height: 48px; color: var(--hint); }
.sheet-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: var(--t4); color: var(--ink); min-height: 46px; }
.sheet-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.sheet-rows a { display: flex; justify-content: space-between; align-items: center; min-height: 56px; text-decoration: none; font-size: var(--t5); font-weight: 600; letter-spacing: var(--track); border-bottom: 1px solid var(--line); }
.sheet-rows a svg { color: var(--hint); }
.sheet-rows a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }
.sheet-links { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 16px; font-size: var(--t2); }
.sheet-links a { color: var(--soft); }
.sheet-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 640px) {
  .site-header .wrap { height: 56px; padding-block: 0; padding-right: 6px; flex-wrap: nowrap; gap: 8px; }
  .site-header .main-nav, .site-header .search-trigger, .site-header .hdr-account, .site-header .hdr-sim { display: none; }
  .hdr-mobile { display: inline-flex; }
}
@media (min-width: 641px) { .ww-sheet[open] { display: none; } }
@media (pointer: coarse) { .askbox input, .sheet-search input { font-size: var(--t4); } }
@media (max-width: 960px) { .search-trigger { min-width: 0; } .search-trigger kbd { display: none; } .main-nav a { padding: 0 6px; } .site-header .wrap { gap: var(--s3); } }

/* Dialogs */
.ww-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line2); border-radius: var(--r3); background: var(--surface); color: var(--ink); box-shadow: var(--pop); overflow: auto; }
.ww-dialog.wide { width: min(820px, calc(100vw - 32px)); }
.ww-dialog::backdrop { background: var(--scrim); }
.ww-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s4); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface2); z-index: 1; }
.ww-dialog-head h2 { font-size: var(--t2); font-weight: 600; letter-spacing: 0; }
.ww-dialog-close { width: 32px; height: 32px; flex: none; border-radius: var(--r2); border: 1px solid var(--ctl); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ww-dialog-close:hover { background: var(--bg); }
.ww-dialog-body { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); font-size: var(--t3); line-height: 1.55; }
@media (pointer: coarse) { .ww-dialog-close { width: 44px; height: 44px; } }
@media (max-width: 640px) {
  .ww-dialog, .ww-dialog.wide { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: var(--r3) var(--r3) 0 0; max-height: 92dvh; border-bottom: 0; }
}

/* Package files dialog (views/topic.ts filesDialog; JS: data-files) */
.pf { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pf-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; min-width: 0; }
.pf-side, .pf-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.pf-main { align-items: stretch; }
.pf-list { list-style: none; margin: 0; padding: 0; width: 100%; max-height: 380px; overflow: auto; border: 1px solid var(--line3); border-radius: 10px; }
.pf-list li + li { border-top: 1px solid var(--line2); }
.pf-list button { width: 100%; text-align: left; border: 0; background: var(--paper); padding: 8px 10px; font: 12.5px/1.35 var(--mono); color: var(--ink); cursor: pointer; display: block; overflow-wrap: anywhere; }
.pf-list button:hover { background: var(--bench); }
.pf-list button[aria-current="true"] { background: var(--pick); box-shadow: inset 3px 0 0 var(--ink); }
.pf-list small { display: block; color: var(--graphite); font-family: var(--sans); font-size: 11px; }
.pf-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; }
.pf-name { font: 600 13px/1.4 var(--mono); overflow-wrap: anywhere; }
.pf-raw { margin-left: auto; font-size: 12px; }
.pf-pre { margin: 0; padding: 12px; background: var(--bench); border: 1px solid var(--line3); border-radius: 10px; font: 12.5px/1.5 var(--mono); white-space: pre; overflow: auto; max-height: 52dvh; min-height: 120px; tab-size: 2; }
.pf-note { margin: 0; font-size: 12px; }
@media (max-width: 640px) {
  .pf-grid { grid-template-columns: minmax(0, 1fr); }
  .pf-list { max-height: 150px; }
  .pf-pre { max-height: 40dvh; }
}

/* "Or ask your agent" */
.agent-line { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.agent-line-box { display: flex; align-items: stretch; gap: 6px; min-width: 0; }
.inline-cmd { font-family: var(--mono); font-size: 12px; background: var(--chip); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.agent-line-box code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line3); background: var(--bench); color: var(--ink); overflow-wrap: anywhere; }

/* Evidence (decision 20): verdict, outcome strip, founding-tester invite */
.evidence { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.verdict { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.verdict svg { flex: none; }
.verdict-works { color: var(--verified); }
.verdict-mixed { color: var(--partly); }
.verdict-rarely { color: var(--failed); }
.verdict-stale { color: var(--graphite); }
.strip { display: flex; width: 100%; height: 6px; border-radius: 99px; background: var(--line2); overflow: hidden; gap: 2px; }
.strip i { display: block; height: 100%; min-width: 3px; transform-origin: left; animation: ww-fill 700ms var(--ease) both; }
.strip .s-worked { background: var(--accent); } .strip .s-partial { background: var(--seg-partial); } .strip .s-failed { background: var(--seg-failed); }
.strip.stale i { background: var(--hint); }
.ev-line { font-family: var(--mono); font-size: 12px; color: var(--text2); font-variant-numeric: tabular-nums; }
.ev-line .pct { font-size: 11px; color: var(--hint); }
.is-stale .ev-line { color: var(--partly); font-family: var(--sans); font-size: 13px; }
.ev-sm { gap: 4px; } .ev-sm .verdict { font-size: 14px; } .ev-sm .strip { height: 4px; }
.ev-lg { gap: 10px; } .ev-lg .verdict { font-size: 28px; letter-spacing: var(--track); gap: 8px; } .ev-lg .strip { height: 8px; } .ev-lg .ev-line { font-size: 13px; }
.invite { gap: 6px; }
.invite-title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.ev-lg .invite-title { font-size: 22px; letter-spacing: var(--track); }
.invite-note { font-size: 12px; line-height: 1.4; color: var(--text2); }
.avatars { display: flex; align-items: center; padding-left: 6px; }
.av { width: 26px; height: 26px; border-radius: 99px; background: var(--surface2); color: var(--soft); border: 2px solid var(--paper); margin-left: -6px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 9px; font-weight: 600; flex: none; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av-you { width: auto; min-width: 26px; padding: 0 7px; background: var(--paper); color: var(--text2); border: 1px dashed var(--hint); font-size: 10px; white-space: nowrap; margin-left: 2px; }
.ev-sm .av { width: 22px; height: 22px; }
.ev-sm .av-you { width: auto; min-width: 22px; }

/* Founding testers (decision 21) */
.founders { display: flex; flex-direction: column; gap: 10px; }
.founders-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.founder-badge { font-size: var(--t1); font-weight: 600; padding: 2px 8px; border-radius: var(--pill); background: var(--accent); color: var(--on-accent); }
.founders-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.founder-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 99px; background: var(--chip); font-size: 13px; text-decoration: none; color: var(--ink); max-width: 100%; }
.founder-chip .av { margin: 0; border: 0; width: 22px; height: 22px; }
.founder-n { font-family: var(--mono); font-size: 11px; color: var(--graphite); }
.founder-more { padding-left: 10px; color: var(--text2); }
.founder-open { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 99px; border: 1px dashed var(--hint); font-size: 13px; color: var(--text2); }
.founders-note { font-size: 12px; line-height: 1.5; color: var(--graphite); }

/* Find rows: rank · main · 260px evidence · 140px action */
.find-rows { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.find-row { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px 14px; padding: 16px; border-top: 1px solid var(--line2); align-items: start; }
.find-row:first-child { border-top: 0; }
.find-rank { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--graphite); padding-top: 2px; font-variant-numeric: tabular-nums; }
.find-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.find-main .t { font-size: 17px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; text-decoration: none; }
.find-main p, .find-main .m { font-size: 14px; line-height: 1.5; color: var(--text2); }
.find-ev, .find-act { grid-column: 2; min-width: 0; }
.find-act { display: flex; }
.find-act .btn { width: 100%; }
@media (min-width: 900px) {
  .find-row { grid-template-columns: 40px minmax(0, 1fr) 260px 140px; gap: 20px; padding: 18px 20px; align-items: center; }
  .find-ev, .find-act { grid-column: auto; }
  .find-act { justify-content: flex-end; }
}

/* Finds directory: numbered dense table, scrolls inside its box on narrow screens */
.find-table { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.find-table table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; }
.find-table th { text-align: left; font-size: var(--t1); color: var(--graphite); font-weight: 500; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.find-table td { padding: 10px; border-top: 1px solid var(--line2); vertical-align: middle; }
.find-table tr:first-child td { border-top: 0; }
.find-table th:first-child, .find-table td:first-child { padding-left: 16px; }
.find-table th:last-child, .find-table td:last-child { padding-right: 16px; }
.find-table .n { width: 44px; font-family: var(--mono); font-size: 12px; color: var(--graphite); font-variant-numeric: tabular-nums; }
.find-table .t a { font-weight: 600; text-decoration: none; letter-spacing: -.01em; }
.find-table .ev-col { width: 220px; }
.find-table tbody tr:hover { background: var(--surface2); }

/* Underline tabs made of links; aria-current="page" marks the active one */
.tabs-links { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 500; scrollbar-width: none; }
.tabs-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 12px 12px 10px; white-space: nowrap; text-decoration: none; color: var(--text2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs-links a:hover { color: var(--ink); }
.tabs-links a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent-text); }
.tabs-links .tab-n { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--chip); color: var(--graphite); }

/* Reports: cards (with notes) and compact rows (without), plus a pager */
.report-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.report-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.report-card blockquote { margin: 0; font-size: 15px; line-height: 1.55; }
.report-card .meta { font-family: var(--mono); font-size: 12px; color: var(--text2); display: flex; gap: 6px 12px; flex-wrap: wrap; }
/* Option A: version-level Watt results, outside community evidence. */
.watt-av { display: inline-flex; flex: none; vertical-align: middle; }
.watt-av svg { display: block; width: 100%; height: 100%; }
.lab-avatars { display: inline-flex; }
.lab-avatars .watt-av + .watt-av { margin-left: -6px; }
.lab-badges { display: inline-flex; align-items: center; gap: 6px; }
.lab-agent-badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border: 1px solid var(--line2); border-radius: 999px; font: 600 11px var(--sans); color: var(--ink); white-space: nowrap; cursor: help; }
.lab-chip { border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font: 500 11px var(--mono); color: var(--hint); }
.lab-option th, .lab-option td { background: var(--accent-soft); }
.lab-run-rows { list-style: none; margin: 0; padding: 0; }
.lab-run-rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.lab-run-rows li:first-child { border-top: 0; }
.lab-run-rows .who { font-weight: 600; }
.lab-run-rows .m, .lab-run-rows time { font: 12px var(--mono); color: var(--hint); overflow-wrap: anywhere; }
.lab-run-rows time, .lab-comment time { margin-left: auto; }
.lab-comment blockquote { white-space: pre-wrap; overflow-wrap: anywhere; }
.lab-raw { border-top: 1px solid var(--line); padding-top: 8px; }
.lab-raw summary { cursor: pointer; font-size: 12px; color: var(--hint); }
.lab-raw pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 var(--mono); color: var(--soft); }
.report-rows { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.report-rows > li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 16px; border-top: 1px solid var(--line2); font-size: 13px; min-width: 0; }
.report-rows > li:first-child { border-top: 0; }
.report-rows .who { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.report-rows .m { font-family: var(--mono); font-size: 12px; color: var(--text2); }
.report-rows .when { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--graphite); white-space: nowrap; }
@media (min-width: 760px) {
  .report-rows > li { display: grid; grid-template-columns: 132px minmax(0, 1.2fr) minmax(0, 1fr) 110px 80px; gap: 12px; flex-wrap: nowrap; }
  .report-rows .when { margin-left: 0; text-align: right; }
}
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; color: var(--text2); }
.pager .pages { display: flex; gap: 4px; flex-wrap: wrap; }
.pager a, .pager span[aria-current], .pager span[aria-disabled] { min-width: 40px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--ctl); background: var(--paper); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--ink); }
.pager [aria-current="page"] { background: var(--accent); border-color: var(--accent-edge); color: var(--on-accent); font-weight: 600; }
.pager [aria-disabled="true"] { color: var(--hint); border-style: dashed; }

/* Settle it: three action cards */
.settle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.settle-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.settle-card.primary { border-color: var(--ink); }
.settle-card h3 { font-size: 18px; letter-spacing: -.02em; line-height: 1.25; }
.settle-card p { font-size: 14px; line-height: 1.5; color: var(--text2); }
.settle-card .actions { margin-top: auto; padding-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Community feed: vote column · type chip, title, meta · evidence slot */
.vote { width: 48px; min-height: 52px; flex: none; border-radius: 10px; border: 1px solid var(--ctl); background: var(--paper); color: var(--ink); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; font-family: var(--mono); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }
.vote::before { content: ""; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 6px solid currentColor; }
.vote:hover { border-color: var(--ink); color: var(--ink); }
.vote[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent-edge); }
.feed { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.feed-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px 14px; padding: 16px; border-top: 1px solid var(--line2); align-items: start; }
.feed-row:first-child { border-top: 0; }
.feed-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.feed-type { align-self: flex-start; font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 6px; background: var(--chip); color: var(--text2); }
.feed-type.question { background: var(--tested-bg); color: var(--tested); }
.feed-type.request { background: var(--signal); color: var(--ink); }
.feed-type.report { background: var(--verified-bg); color: var(--verified); }
.feed-type.news { background: var(--platform-bg); color: var(--platform); }
.feed-title { font-size: 16px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.feed-meta { font-family: var(--mono); font-size: 12px; color: var(--graphite); display: flex; gap: 4px 10px; flex-wrap: wrap; }
.feed-meta .chip { max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.feed-ev { grid-column: 2; min-width: 0; }
@media (min-width: 900px) {
  .feed-row { grid-template-columns: 48px minmax(0, 1fr) 220px; gap: 18px; padding: 16px 20px; }
  .feed-ev { grid-column: auto; }
}

/* Up next: requests with vote buttons */
.up-next { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line2); }
.up-next li { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line2); min-width: 0; }
.up-next .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.up-next .t b, .up-next .t a { font-size: 15px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; overflow-wrap: anywhere; }
.up-next .t small { font-family: var(--mono); font-size: 12px; color: var(--graphite); }

/* Empty states */
.empty-state { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; padding: 40px 20px; border: 1px dashed var(--hint); border-radius: 12px; background: var(--paper); }
.empty-state h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.02; letter-spacing: var(--track); max-width: 20ch; }
.empty-state .lead { max-width: 56ch; }
.empty-state .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.empty-state .agent-line { width: 100%; max-width: 560px; }
@media (min-width: 641px) { .empty-state { padding: 56px 48px; } }

/* Connect panel (ui.ts connectPanel): terminal-dark in both themes. Open on the home page, in a dialog elsewhere. */
.cx { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); color: var(--term-ink); }
.connect { background: var(--term); border: 1px solid var(--term-line); border-radius: var(--r3); box-shadow: 0 0 0 5px var(--ring); }
.cx-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.cx-title { margin: 0; display: flex; align-items: center; gap: var(--s2); font-size: var(--t3); font-weight: 600; letter-spacing: 0; color: var(--term-ink); }
.cx-tag { display: inline-flex; align-items: center; min-height: var(--h1); padding: 0 var(--s2); border-radius: var(--pill); border: 1px solid var(--term-line); background: var(--term-surface); color: var(--term-soft); font: 400 var(--t1) var(--mono); }
.cx-close { flex: none; width: 32px; height: 32px; margin-right: calc(var(--s2) * -1); border: 0; border-radius: var(--r2); background: transparent; color: var(--term-soft); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background var(--d1), color var(--d1); }
.cx-close:hover { background: var(--term-line); color: var(--term-ink); }
.cx-sec { display: flex; flex-direction: column; gap: var(--s1); }
.cx-label { margin: 0; font-size: var(--t1); font-weight: 400; letter-spacing: 0; color: var(--term-soft); }
.cx-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); align-items: start; background: var(--term-surface); border: 1px solid var(--term-line); border-radius: var(--r2); padding: var(--s3); }
.cx-msg { margin: 0; font: 400 var(--t2)/var(--lh3) var(--mono); color: var(--term-ink); overflow-wrap: anywhere; }
.cx-msg code { font: inherit; font-weight: 600; }
.cx-cmds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.cx-cmd { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: var(--s2); align-items: start; padding: var(--s2) var(--s2) var(--s2) var(--s3); border: 1px solid var(--term-line); border-radius: var(--r2); background: var(--term-surface); }
.cx-cmd-name { font-size: var(--t1); color: var(--term-soft); padding-top: 1px; }
.cx-cmd-text { font: 400 var(--t1)/var(--lh3) var(--mono); overflow-wrap: anywhere; color: var(--term-ink); }
.cx-cmd-text span { color: var(--term-soft); }
.cx-icon-btn { flex: none; width: var(--h2); height: var(--h2); border: 1px solid var(--term-line); border-radius: var(--r2); background: transparent; color: var(--term-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background var(--d1), transform var(--d0); }
.cx-icon-btn:hover { background: var(--term-line); }
.cx-icon-btn:active { transform: scale(.96); }
.cx-icon-btn[data-copied] { color: var(--accent); }
@media (pointer: coarse) { .cx-icon-btn { width: 40px; height: 40px; } }
.cx-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.cx-more { font-size: var(--t2); color: var(--term-soft); text-decoration: underline; text-decoration-color: var(--term-line); text-underline-offset: 3px; }
.cx-more:hover { color: var(--term-ink); }
.cx-ico { display: inline-flex; }
.cx-done, [data-copied] .cx-idle { display: none; }
[data-copied] .cx-done { display: inline-flex; }
.connect-dialog { width: min(520px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); overflow: auto; padding: 0; border: 1px solid var(--term-line); border-radius: var(--r3); background: var(--term); color: var(--term-ink); box-shadow: var(--pop); }
.connect-dialog::backdrop { background: var(--scrim); }
@media (max-width: 640px) {
  .connect .cx-msg { max-height: 6.4em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
  .cx-cmd { grid-template-columns: minmax(0, 1fr) auto; }
  .cx-cmd-name { grid-column: 1 / -1; }
}
/* Home (views/home.ts): hero with the open Connect panel, then at most two boxes of three rows */
.hero { padding: var(--s8) 0 var(--s7); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) var(--w-connect); gap: var(--s7); align-items: center; }
.hero .lead { margin-top: var(--s4); max-width: 460px; }
.hero .askbox { margin-top: var(--s5); max-width: 460px; }
.tries { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); align-items: center; margin-top: var(--s3); max-width: 520px; font-size: var(--t2); color: var(--hint); }
.tries .link { color: var(--soft); }
.stream { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); align-items: start; padding-bottom: var(--s5); }
@media (min-width: 900px) { .stream { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); } .stream.one { grid-template-columns: minmax(0, 1fr); } }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); overflow: hidden; min-width: 0; }
.box-h { display: flex; align-items: baseline; gap: var(--s3); padding: var(--s2) var(--s4); background: var(--surface2); border-bottom: 1px solid var(--line); }
.box-h h2 { display: flex; align-items: center; gap: var(--s2); font-size: var(--t2); font-weight: 600; letter-spacing: 0; }
.box-h h2::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 0 1px var(--accent-edge); flex: none; align-self: center; }
.box-h .hint { margin-right: auto; font-size: var(--t1); color: var(--hint); }
.box-h h2 + a { margin-left: auto; }
.box-h a { font-size: var(--t2); color: var(--soft); text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.box-h a:hover { color: var(--ink); text-decoration-color: var(--ink); }
.lv-list { list-style: none; margin: 0; padding: 0; }
.lv-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: var(--s1) var(--s5); padding: var(--s3) var(--s4); border-top: 1px solid var(--line); transition: background var(--d1); }
@media (min-width: 900px) { .stream .lv-row { grid-template-columns: minmax(0, 1fr) 128px; gap: var(--s1) var(--s3); } .stream.one .lv-row { grid-template-columns: minmax(0, 1fr) 190px; gap: var(--s1) var(--s5); } }
.lv-row:first-child { border-top: 0; }
.lv-row:hover, .lv-row:focus-within { background: var(--hover); }
.lv-row::before { content: ""; position: absolute; left: 6px; top: 19px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent-text); opacity: 0; transition: opacity var(--d1); }
.lv-row:hover::before, .lv-row:focus-within::before { opacity: 1; }
.lv-row.is-accepted { box-shadow: inset 2px 0 0 var(--accent-text); }
.lv-main { min-width: 0; }
.lv-title { display: block; font-size: var(--t3); font-weight: 500; line-height: var(--lh2); text-decoration: none; overflow-wrap: anywhere; }
.lv-title:hover { text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.lv-excerpt { margin-top: var(--s1); font-size: var(--t2); line-height: 1.5; color: var(--soft); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.lv-by { margin-top: var(--s2); display: flex; gap: var(--s1) var(--s4); flex-wrap: wrap; font-size: var(--t1); color: var(--hint); }
.lv-by a { color: inherit; text-decoration: none; }
.lv-by a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.lv-side { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s1); font-size: var(--t1); color: var(--hint); text-align: right; padding-top: 1px; }
.lv-chips { display: flex; gap: var(--s1); flex-wrap: wrap; justify-content: flex-end; }
.vchip { display: inline-flex; align-items: center; gap: var(--s1); min-height: var(--h1); padding: 0 var(--s2); border-radius: var(--pill); border: 1px solid var(--line2); color: var(--soft); font-size: var(--t1); font-weight: 600; white-space: nowrap; }
.vchip svg { width: 12px; height: 12px; }
.vchip.works { background: var(--accent); color: var(--on-accent); border-color: var(--accent-edge); }
.vchip.forming { border-style: dashed; color: var(--hint); font-weight: 500; }
.chip-accepted { background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent-edge); font-weight: 600; }
.chip-backed { background: var(--accent-soft); color: var(--accent-text); }
.lv-invite { margin-bottom: var(--s5); display: flex; flex-direction: column; gap: var(--s3); padding: var(--s5); border: 1px dashed var(--line2); border-radius: var(--r3); background: var(--surface); }
.lv-invite p { font-size: var(--t4); font-weight: 500; }
.lv-invite .agent-line { max-width: 560px; }
.box-h h2:has(.live)::before { display: none; }
@media (max-width: 860px) { .hero-in { grid-template-columns: minmax(0, 1fr); gap: var(--s5); } }
@media (max-width: 640px) {
  .hero { padding: var(--s5) 0; }
  .h-hero { font-size: var(--t8); }
  .hero-ask { display: none; }
  .box-h .hint { display: none; }
  .lv-row { grid-template-columns: minmax(0, 1fr); padding: var(--s3); }
  .lv-side { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; text-align: left; gap: var(--s1) var(--s2); order: 3; }
  .lv-chips { justify-content: flex-start; }
  .stream { padding-bottom: var(--s4); }
}
.vote.vote-none::before { margin: 0; }
.vote-spacer { width: 48px; flex: none; }
.feed-excerpt { font-size: 14px; line-height: 1.45; color: var(--text2); margin: 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.feed-meta .feed-type { align-self: auto; }
.feed-ev { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.feed-row { padding-block: 12px; }
.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line2); }
.mini-list li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line2); min-width: 0; }
.mini-list a.t { font-size: 15px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; overflow-wrap: anywhere; }
.mini-list small { font-family: var(--mono); font-size: 12px; color: var(--graphite); }
/* Staging-only simulation switch and band */
.sim-switch { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px; border: 1px solid var(--ctl); border-radius: 999px; background: var(--surface); color: var(--soft); font: 500 12px var(--sans); cursor: pointer; }
.sim-switch i { width: 22px; height: 12px; border-radius: 99px; background: var(--hint); position: relative; flex: none; transition: background var(--d1); }
.sim-switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 8px; height: 8px; border-radius: 99px; background: var(--surface); transition: transform var(--d1); }
.sim-switch[aria-checked="true"] { color: var(--ink); border-color: var(--accent-text); }
.sim-switch[aria-checked="true"] i { background: var(--accent-text); }
.sim-switch[aria-checked="true"] i::after { transform: translateX(10px); }
.site-header .sim-switch { background: var(--bar-fill); border-color: var(--ctl); color: var(--bar-soft); }
.site-header .sim-switch i { background: var(--bar-soft); }
.site-header .sim-switch i::after { background: var(--bar); }
.site-header .sim-switch[aria-checked="true"] { color: var(--bar-ink); border-color: var(--accent); }
.site-header .sim-switch[aria-checked="true"] i { background: var(--accent); }
.site-header .hdr-sim { margin-left: auto; }
.sim-band { background: var(--accent); color: var(--on-accent); border-bottom: 1px solid var(--bar-line); font-size: 13px; }
.sim-band .wrap { display: flex; gap: 12px; align-items: center; padding-block: 6px; }
.sim-band button { font: inherit; font-size: 12px; text-decoration: underline; background: none; border: 0; padding: 4px 0; color: inherit; cursor: pointer; }
.sheet-sim { align-self: flex-start; }
/* --- thread page --- (views/topic.ts; tokens only) */
.tp-hero { border-bottom: 1px solid var(--line); }
.tp-hero > .wrap { padding-block: var(--s5) var(--s6); display: flex; flex-direction: column; gap: var(--s4); }
.tp-crumbs { display: flex; flex-wrap: wrap; gap: var(--s2); font-size: var(--t2); color: var(--hint); }
.tp-crumbs a { color: var(--hint); text-decoration: none; }
.tp-crumbs a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.tp-top { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s6); align-items: flex-start; justify-content: space-between; }
.tp-head { flex: 1 1 560px; min-width: 0; max-width: calc(var(--w-read) + var(--s5)); display: flex; flex-direction: column; gap: var(--s3); }
.tp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.tp-meta:empty { display: none; }
.tp-side { flex: 0 1 var(--w-aside); min-width: 0; display: flex; flex-direction: column; gap: var(--s4); align-items: stretch; }
.tp-acts { display: flex; gap: var(--s2); flex-wrap: wrap; justify-content: flex-end; }
.tp-trydesk .agent-line-box code { font-size: var(--t2); padding: var(--s2) var(--s3); }
.tp-sub { font-size: var(--t4); line-height: var(--lh3); color: var(--soft); max-width: 68ch; }
.tp-sub code { font-family: var(--mono); font-size: .9em; background: var(--surface2); padding: 1px var(--s1); border-radius: var(--r1); color: var(--ink); overflow-wrap: anywhere; }
.tp-nl { font-weight: 600; color: var(--hint); margin-right: var(--s1); }
.tp-use { font-size: var(--t1); font-weight: 600; color: var(--accent-text); margin-right: var(--s1); }
.tp-pub { display: flex; flex-wrap: wrap; gap: var(--s1) 0; font-size: var(--t1); color: var(--hint); margin-left: var(--s2); }
.tp-pub span + span { margin-left: var(--s3); padding-left: var(--s3); border-left: 1px solid var(--line2); }
.tp-agent { max-width: var(--w-read); gap: var(--s2); }
.tp-note { font-size: var(--t2); line-height: var(--lh3); color: var(--soft); }
.tp-note a, a.tp-note { color: var(--soft); text-decoration-color: var(--line2); text-underline-offset: 3px; }
.tp-note a:hover, a.tp-note:hover { color: var(--ink); text-decoration-color: var(--ink); }
.try-short a { color: var(--soft); }

/* panels (prototype .panel / .panel-h) */
.tp-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); overflow: hidden; }
.tp-ph { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s4); min-height: var(--h4); background: var(--surface2); border-bottom: 1px solid var(--line); }
.tp-ph::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--accent-text); flex: none; }
.tp-ph h2 { font-size: var(--t2); font-weight: 600; letter-spacing: 0; line-height: var(--lh2); }
.tp-more-btn { margin-left: auto; font: 400 var(--t1) var(--sans); color: var(--hint); background: none; border: 0; padding: var(--s1) 0; min-height: var(--h2); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.tp-more-btn:hover { color: var(--ink); text-decoration-color: var(--ink); }
.tp-pb { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.tp-verdict { margin-top: var(--s2); }
.tp-vgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: var(--s4) var(--s5); }
.tp-vc { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.tp-vm { font-size: var(--t5); font-weight: 600; letter-spacing: var(--track); line-height: var(--lh1); }
.tp-vn { font-size: var(--t1); color: var(--hint); line-height: var(--lh2); overflow-wrap: anywhere; }
.tp-vn a { color: var(--soft); }
.tp-vc .evidence { gap: var(--s2); }
.tp-vc .verdict { font-size: var(--t5); }
.tp-vc .invite-title { font-size: var(--t4); }
.tp-found { display: flex; flex-direction: column; gap: var(--s2); border-top: 1px solid var(--line); padding-top: var(--s3); }
.tp-cons { font-size: var(--t4); line-height: var(--lh3); color: var(--soft); max-width: 72ch; }
.tp-cons.has { color: var(--ink); border-left: 2px solid var(--accent-text); padding-left: var(--s3); }
.tp-mono { font: 400 var(--t2)/var(--lh3) var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.tp-issue { font-size: var(--t3); line-height: var(--lh3); color: var(--soft); }

/* tabs bar */
.tp-tabs { scroll-margin-top: var(--s4); background: none; border-bottom: 1px solid var(--line); min-width: 0; }
.tp-tabs .tabs-links { border-bottom: 0; gap: var(--s2); font-size: var(--t3); min-width: 0; overflow-x: auto; }
.tp-tabs .tabs-links a { color: var(--soft); padding-inline: var(--s2); }
.tp-tabs .tabs-links a[aria-current="page"] { color: var(--ink); }
.tp-tabs .tab-n { background: var(--surface2); color: var(--soft); }

/* layout */
.layout-2.tp-layout { padding-block: var(--s6) var(--s9); gap: var(--s6); }
.layout-2.tp-layout > .main-col { flex: 999 1 560px; gap: var(--s6); }
.layout-2.tp-layout > aside { flex: 1 1 var(--w-aside); gap: var(--s4); }
.tp-sec { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.tp-sec .prose { max-width: var(--w-read); font-size: var(--t3); line-height: var(--lh3); color: var(--soft); gap: var(--s3); }
.tp-sec .prose h2, .tp-sec .prose h3 { color: var(--ink); margin-top: var(--s3); }
.tp-sec .prose h2 { font-size: var(--t5); }
.tp-sec .prose h3 { font-size: var(--t4); }
.tp-sec .prose strong { color: var(--ink); font-weight: 600; }
.tp-sec .prose code { font-size: var(--t2); background: var(--surface2); }
.tp-sec .prose th, .tp-sec .prose td { border-bottom-color: var(--line); }
.tp-sec .prose th { background: var(--surface2); font-size: var(--t1); font-weight: 500; color: var(--hint); }
.tp-sec .prose blockquote { background: var(--surface2); border-left-color: var(--line2); }
.tp-sec .steps { border-top-color: var(--line); }
.tp-sec .steps li { font-size: var(--t3); padding: var(--s4) var(--s4) var(--s2) 0; gap: var(--s2); color: var(--soft); }
.tp-sec .steps li + li { padding-left: var(--s4); }

/* options table */
.tp-opts .compare { min-width: 600px; font-size: var(--t2); }
.tp-opts .compare th, .tp-opts .compare td { border-bottom: 1px solid var(--line); padding: var(--s3) var(--s4); overflow-wrap: anywhere; }
.tp-opts .compare thead th { background: var(--surface2); padding-block: var(--s3); }
.tp-opts .compare thead .stack { min-width: 0; max-width: var(--w-aside); }
.tp-opts .scroll-x { overflow-x: auto; }
.tp-opts .compare tbody { font-family: var(--sans); font-size: var(--t2); }
.tp-opts .compare tbody th { color: var(--hint); font-weight: 500; padding-left: var(--s4); }
.tp-opts .compare tbody tr:last-child th, .tp-opts .compare tbody tr:last-child td { border-bottom: 0; }
.tp-opts .compare .pick { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.tp-opts .compare thead .pick { border-top: 2px solid var(--accent-text); }
.tp-opts .opt-cards { display: none; }
@media (max-width: 559px) {
  .tp-opts > .tp-panel.scroll-x { display: none; }
  .tp-opts .opt-cards { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .tp-opts .option-card { min-width: 0; overflow-wrap: anywhere; font-size: var(--t2); }
  .tp-opts .option-card-head { padding: var(--s3) var(--s4); background: var(--surface2); border-bottom: 1px solid var(--line); min-width: 0; }
  .tp-opts .option-card.pick { border-color: var(--accent-text); }
  .tp-opts .pick .option-card-head { background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface2)); border-top: 2px solid var(--accent-text); }
  .tp-opts .option-card dl { margin: 0; }
  .tp-opts .option-card dl > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
  .tp-opts .option-card dl > div:last-child { border-bottom: 0; }
  .tp-opts .option-card dt, .tp-opts .option-card dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
  .tp-opts .option-card dt { color: var(--hint); font-weight: 500; }
  .tp-opts .option-card .lab-option { background: var(--accent-soft); }
  .tp-opts .option-card .stack, .tp-opts .option-card .row { min-width: 0; }
  .tp-opts .option-card a, .tp-opts .option-card button { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; max-width: 100%; white-space: normal; }
}
/* T1 recipe strip (variant A): quiet bordered strip under the options table; neutral chips, lime stays off. */
.rc-strip { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; border: 1px solid var(--line2); border-radius: var(--r3); padding: var(--s3) var(--s4); }
.rc-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.rc-t { font-size: var(--t3); font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.rc-v { color: var(--hint); }
.rc-risk { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.rc-risk li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.rc-strip .risk { border-color: var(--ctl); background: var(--surface2); color: var(--ink); }
.rc-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); min-height: 28px; }
.rc-more > summary::-webkit-details-marker { display: none; }
.rc-car { display: inline-block; transition: transform .15s; }
.rc-more[open] .rc-car { transform: rotate(90deg); }
.rc-more:not([open]) .rc-open, .rc-more[open] .rc-closed { display: none; }
.rc-body { display: flex; flex-direction: column; gap: var(--s4); margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); min-width: 0; }
.rc-sec { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rc-sec p, .rc-sec li { margin: 0; font-size: 14px; line-height: 1.5; color: var(--soft); overflow-wrap: anywhere; }
.rc-ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.rc-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.rc-steps li { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rc-cmd { margin: 0; background: var(--term); color: var(--term-ink); border: 1px solid var(--term-line); border-radius: var(--r2); padding: 8px 12px; font: 400 12.5px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .rc-car { transition: none; } }
.tp-opts .letter { border-radius: var(--r1); background: var(--surface); border: 1px solid var(--line2); }
.tp-opts .letter.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent-edge); outline: 0; }

/* Try it */
.tp-try { scroll-margin-top: var(--s4); }
.tp-ut { padding: 0 var(--s2); gap: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tp-ut::-webkit-scrollbar { display: none; }
.tp-clients { font-size: var(--t2); }
.tp-cmdbox { padding-bottom: 0; gap: var(--s2); }
.tp-cmdrow { display: flex; gap: var(--s2); align-items: stretch; min-width: 0; }
.tp-nomcp { padding-bottom: 0; }
.tp-tail { gap: var(--s3); }
.tp-risk { gap: var(--s2); }
.tp-risk .chip.bad { border: 1px solid var(--ctl); color: var(--ink); }
.tp-founders { display: flex; flex-direction: column; gap: var(--s2); border-top: 1px solid var(--line); padding-top: var(--s3); }

/* aside lists */
.tp-rel { display: flex; flex-direction: column; }
.tp-rel a { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; overflow-wrap: anywhere; padding: var(--s3) var(--s4); border-top: 1px solid var(--line); text-decoration: none; font-size: var(--t3); font-weight: 500; line-height: var(--lh2); }
.tp-rel a:first-child { border-top: 0; }
.tp-rel a:hover { background: var(--hover); }
.tp-rel small { font-size: var(--t1); font-weight: 400; color: var(--hint); }
.tp-subj { flex-direction: row; flex-wrap: wrap; gap: var(--s2); }

@media (max-width: 767px) {
  .tp-trydesk { display: none; }
  .tp-side { flex: none; }
  .tp-acts { justify-content: flex-start; }
  .tp-hero > .wrap { padding-block: var(--s4) var(--s5); gap: var(--s3); }
  .tp-head { gap: var(--s2); flex: none; max-width: none; }
  .tp-head .h-page { font-size: var(--t6); line-height: var(--lh1); }
  .tp-sub { font-size: var(--t3); line-height: var(--lh2); }
  .tp-more { display: none; }
  .tp-agent { gap: var(--s1); }
  .tp-pub { margin-left: 0; flex-basis: 100%; }
  .tp-top { display: contents; }
  .tp-verdict { margin-top: 0; order: 1; }
  .tp-side { order: 2; }
  .tp-verdict .tp-found { order: -1; border-top: 0; padding-top: 0; border-bottom: 1px solid var(--line); padding-bottom: var(--s3); }
  .tp-cons { font-size: var(--t3); line-height: var(--lh2); }
  .layout-2.tp-layout { padding-block: var(--s5) var(--s8); gap: var(--s5); }
  .tp-sec .steps li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* --- threads page --- */
.th-page { padding-block: var(--s7) var(--s8); }
.th-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s3) var(--s5); flex-wrap: wrap; margin-bottom: var(--s5); }
.th-head .lead { margin-top: var(--s2); font-size: var(--t3); max-width: 60ch; }
.th-alt { font-size: var(--t2); color: var(--soft); }
.th-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s4); flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.th-tabs { display: flex; gap: var(--s4); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.th-tabs::-webkit-scrollbar { display: none; }
.th-tabs a { flex: none; display: inline-flex; align-items: center; height: var(--h4); padding: 0 var(--s1); margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: var(--t2); font-weight: 500; color: var(--hint); text-decoration: none; white-space: nowrap; transition: color var(--d1), border-color var(--d1); }
.th-tabs a:hover { color: var(--ink); }
.th-tabs a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent-text); }
.th-ask { width: 280px; min-height: var(--h3); margin-bottom: var(--s2); border-radius: var(--r2); box-shadow: none; }
@media (min-width: 641px) { .th-ask { display: none; } }
@media (max-width: 640px) { body:has(.th-ask) .site-header .hdr-icon[data-open-palette] { display: none; } }
.th-ask input { min-height: 28px; }
.th-ask button { min-height: var(--h2); }
.th-tools { display: flex; justify-content: space-between; align-items: center; gap: var(--s2) var(--s5); flex-wrap: wrap; margin: var(--s4) 0 var(--s2); }
.th-areas { position: relative; display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; min-width: 0; }
.th-areas .label, .th-sorts .label { margin-right: var(--s1); }
.th-more { position: relative; }
.th-more summary { cursor: pointer; list-style: none; }
.th-more summary::-webkit-details-marker { display: none; }
.th-more summary svg { transform: rotate(90deg); }
.th-more[open] summary { border-color: var(--accent-text); color: var(--ink); }
.th-more[open] summary svg { transform: rotate(-90deg); }
.th-menu { position: absolute; z-index: 5; top: calc(100% + var(--s1)); left: 0; width: 240px; max-height: 320px; overflow: auto; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); padding: var(--s2); background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r2); box-shadow: var(--pop); }
.th-sorts { display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; }
.th-sorts a { display: inline-flex; align-items: center; height: var(--h2); padding: 0 var(--s2); border-radius: var(--r2); font-size: var(--t2); color: var(--hint); text-decoration: none; transition: color var(--d1), background var(--d1); }
.th-sorts a:hover { color: var(--ink); }
.th-sorts a[aria-current="true"] { color: var(--ink); background: var(--surface2); font-weight: 500; box-shadow: inset 0 -2px 0 var(--accent-text); }
.box-h .th-sorts { margin-left: auto; }
.th-hint { margin: 0 0 var(--s4); font-size: var(--t2); }
.th-hint a { gap: var(--s1); align-items: center; text-decoration: none; }
.th-rows { list-style: none; margin: 0; padding: 0; }
.th-row { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr) 190px; gap: var(--s1) var(--s5); padding: var(--s3) var(--s4); border-top: 1px solid var(--line); transition: background var(--d1); }
.th-row:first-child { border-top: 0; }
.th-row:hover, .th-row:focus-within { background: var(--hover); }
.th-row::before { content: ""; position: absolute; left: 6px; top: 19px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent-text); opacity: 0; transition: opacity var(--d1); }
.th-row:hover::before, .th-row:focus-within::before { opacity: 1; }
.th-kind { font: 400 var(--t1)/var(--lh2) var(--mono); color: var(--hint); padding-top: 2px; }
.th-main { min-width: 0; }
.th-title { display: block; font-size: var(--t3); font-weight: 500; line-height: var(--lh2); text-decoration: none; overflow-wrap: anywhere; }
.th-title:hover { text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.th-sum { margin: var(--s1) 0 0; font-size: var(--t2); line-height: 1.5; color: var(--soft); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.th-sum code { font-family: var(--mono); font-size: .92em; background: var(--surface2); padding: 1px var(--s1); border-radius: var(--r1); }
.th-meta { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s1); font-size: var(--t1); color: var(--hint); text-align: right; padding-top: 1px; }
.th-chips { display: flex; gap: var(--s1); flex-wrap: wrap; justify-content: flex-end; }
.th-empty { padding: var(--s7) var(--s4); text-align: center; color: var(--soft); border: 1px dashed var(--line2); border-radius: var(--r3); margin: 0; }
.th-more-wrap { display: flex; justify-content: center; margin-top: var(--s5); }
.th-foot { margin: var(--s5) 0 0; font-size: var(--t2); color: var(--hint); }
.th-foot a { color: var(--soft); }
.th-board th, .th-board td { border-color: var(--line); }
.th-matrix { display: flex; flex-wrap: wrap; gap: var(--s7); align-items: flex-start; padding-block: 0 var(--s8); }
.th-legend { display: flex; flex-direction: column; gap: var(--s2); font: 400 var(--t1) var(--mono); color: var(--soft); }
.th-legend div { display: flex; align-items: center; gap: var(--s2); }
.th-legend .sw { width: 28px; height: 14px; border-radius: var(--r1); border: 1px solid var(--line2); flex: none; }
.th-legend .sw.works { background: var(--accent); border-color: var(--accent-edge); }
.th-legend .sw.mixed { background: var(--surface2); border-color: var(--ctl); }
.th-legend .sw.low { background: var(--surface2); }
.th-legend .sw.early { background: repeating-linear-gradient(45deg, var(--line2) 0 4px, var(--surface) 4px 8px); border-color: var(--line); }
@media (max-width: 640px) {
  .th-page { padding-block: var(--s5) var(--s7); }
  .th-head { margin-bottom: var(--s4); }
  .th-bar { flex-direction: column; align-items: stretch; gap: var(--s2); }
  .th-ask { width: 100%; order: -1; margin-bottom: 0; }
  .th-more { position: static; }
  .th-menu { left: 0; right: 0; width: auto; }
  .th-row { grid-template-columns: minmax(0, 1fr); padding: var(--s3); }
  .th-kind { padding: 0; }
  .th-meta { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; text-align: left; gap: var(--s1) var(--s2); }
  .th-chips { justify-content: flex-start; }
  .box-h .th-sorts { flex-basis: 100%; margin-left: 0; }
  .box-h { flex-wrap: wrap; }
  .th-matrix { gap: var(--s5); }
}

/* --- question page v3 (views/post.ts; canvas Thread.dc "question v3"). Canvas colours are the light theme; dark maps them to the site tokens. --- */
.post-layout { --pv-line: var(--line); --pv-ctl: var(--line2); --pv-sec: var(--hint); --pv-green: var(--accent-text); --pv-green-bg: var(--accent-soft); --pv-blue: #9DB8FF; --pv-blue-bg: rgba(110,150,255,.14); --pv-chip: var(--surface2); --pv-body: var(--soft); --pv-card: var(--surface); --pv-dark: var(--term); --pv-dark-ink: var(--term-ink); --pv-dark-mute: var(--term-soft); --pv-dark-line: var(--term-line); --pv-pill-bg: var(--accent); --pv-pill-fg: var(--on-accent); --pv-edge: var(--ink); --pv-accent: var(--accent); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .post-layout { --pv-line: #E3E5EA; --pv-ctl: #DCDFE5; --pv-sec: #5B6170; --pv-green: #116B37; --pv-green-bg: #DDF5E6; --pv-blue: #1D4ED8; --pv-blue-bg: #E6EEFF; --pv-chip: #F1F2F5; --pv-body: #3A3F4B; --pv-card: #FFFFFF; --pv-dark: #0B0D12; --pv-dark-ink: #E8EAEE; --pv-dark-mute: #8D93A1; --pv-dark-line: #0B0D12; --pv-pill-bg: #0B0D12; --pv-pill-fg: #D4FF3A; --pv-edge: #0B0D12; } }
:root[data-theme="light"] .post-layout { --pv-line: #E3E5EA; --pv-ctl: #DCDFE5; --pv-sec: #5B6170; --pv-green: #116B37; --pv-green-bg: #DDF5E6; --pv-blue: #1D4ED8; --pv-blue-bg: #E6EEFF; --pv-chip: #F1F2F5; --pv-body: #3A3F4B; --pv-card: #FFFFFF; --pv-dark: #0B0D12; --pv-dark-ink: #E8EAEE; --pv-dark-mute: #8D93A1; --pv-dark-line: #0B0D12; --pv-pill-bg: #0B0D12; --pv-pill-fg: #D4FF3A; --pv-edge: #0B0D12; }
.layout-2.post-layout { padding-block: 32px 96px; gap: 32px; }
.layout-2.post-layout > .main-col { flex: 999 1 680px; gap: 22px; }
.layout-2.post-layout > .post-aside { flex: 1 1 300px; gap: 14px; }
.mono-s { font-family: var(--mono); }
.post-crumb { display: flex; gap: 8px; font: 400 12px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--pv-sec); }
.post-crumb a { color: var(--pv-sec); text-decoration: none; }
.post-crumb a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.post-q { display: flex; gap: 16px; min-width: 0; }
.post-q-votes { display: flex; flex-direction: column; align-items: center; width: 48px; flex: none; padding-top: 6px; }
.post-up { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 40px; border-radius: 10px; border: 1px solid var(--pv-ctl); background: var(--pv-card); color: var(--ink); }
.post-q-votes b { font: 600 16px var(--mono); margin-top: 4px; color: var(--ink); }
.post-q-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.post-meta-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font: 400 11px var(--mono); min-width: 0; }
.post-type { font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; background: var(--pv-blue-bg); color: var(--pv-blue); }
.post-thread-chip { padding: 3px 7px; border-radius: 5px; background: var(--pv-card); border: 1px solid var(--pv-line); text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.post-thread-chip:hover { text-decoration: underline; text-underline-offset: 3px; }
.post-byline { color: var(--pv-sec); overflow-wrap: anywhere; }
.post-byline a { color: var(--pv-sec); }
.post-title { margin: 0; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.05; letter-spacing: -.05em; font-weight: 600; max-width: none; overflow-wrap: anywhere; }
.post-layout .post-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.post-layout .post-body .prose { max-width: none; font-size: 16px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.post-tags { gap: 6px; }
.post-acts { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; align-items: center; }
.post-acts form { margin: 0; display: contents; }
.post-act { font: 400 13px var(--sans); display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--pv-ctl); background: var(--pv-card); color: var(--ink); cursor: pointer; text-decoration: none; }
.post-act:hover { border-color: var(--ink); }
.post-act.on, .post-act[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-text); }
.post-agent > summary { cursor: pointer; font: 400 12px var(--mono); color: var(--pv-sec); min-height: 28px; display: flex; align-items: center; }
.post-agent[open] > summary { margin-bottom: 8px; }
.post-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--soft); min-width: 0; }
.post-hint code { flex: 1 1 260px; min-width: 0; font: 400 12px var(--mono); padding: 6px 10px; border-radius: 8px; border: 1px dashed var(--line3); background: var(--bench); color: var(--ink); overflow-wrap: anywhere; }
.post-best { background: var(--pv-dark); color: var(--pv-dark-ink); border: 1px solid var(--pv-dark-line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.post-best h2 { margin: 0; font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--pv-accent); }
.post-best-t { margin: 0; font-size: 16px; line-height: 1.5; color: #FFFFFF; overflow-wrap: anywhere; }
.post-best-from { font: 400 12px var(--mono); color: var(--pv-dark-mute); text-decoration: none; overflow-wrap: anywhere; }
.post-best-from:hover { color: var(--pv-dark-ink); text-decoration: underline; }
.post-answers { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.post-answers-h { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; border-top: 1px solid var(--ink); padding-top: 16px; }
.post-answers-h h2 { margin: 0; font-size: 24px; letter-spacing: -.04em; font-weight: 600; }
.post-answers-h span { font: 400 12px var(--mono); color: var(--pv-sec); }
.post-group { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.post-group + .post-group { margin-top: 8px; }
.post-group-h { margin: 0; font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--pv-sec); }
.post-group[data-group="backed"] .post-group-h, .post-group[data-group="experience"] .post-group-h { color: var(--pv-green); }
.post-answer { display: flex; gap: 14px; background: var(--pv-card); border: 1px solid var(--pv-line); border-radius: 14px; padding: 18px; min-width: 0; scroll-margin-top: 24px; }
.post-answer[data-group="opinion"] { padding: 16px 18px; }
.post-answer.is-accepted { border: 2px solid var(--pv-edge); background: var(--pv-card); box-shadow: none; }
.post-answer:target { box-shadow: 0 0 0 2px var(--accent-text); }
#answers, #answer { scroll-margin-top: 24px; }
.post-votes { display: flex; flex-direction: column; align-items: center; width: 40px; flex: none; }
.post-votes .post-up { width: 36px; height: 32px; border: 0; border-radius: 7px; background: var(--pv-chip); }
.post-votes b { font: 600 14px var(--mono); color: var(--ink); }
.post-answer-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.post-answer[data-group="opinion"] .post-answer-main { gap: 8px; }
.post-answer-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; min-width: 0; }
.post-handle { font-weight: 600; overflow-wrap: anywhere; }
.post-meta, .post-meta a { color: var(--pv-sec); font-size: 12px; }
.post-pill { font: 600 10px var(--mono); padding: 2px 6px; border-radius: 5px; background: var(--pv-pill-bg); color: var(--pv-pill-fg); text-transform: uppercase; }
.post-layout .post-answer-body { max-width: none; gap: 10px; font-size: 15px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.post-answer[data-group="opinion"] .post-answer-body { color: var(--pv-body); }
.post-layout .prose pre { margin: 0; background: var(--pv-dark); color: var(--pv-dark-ink); border: 1px solid var(--pv-dark-line); border-radius: 10px; padding: 12px 14px; font: 400 12px/1.6 var(--mono); overflow-x: auto; max-width: 100%; }
.post-layout .prose pre code { background: none; padding: 0; font: inherit; color: inherit; white-space: pre; }
.post-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font: 400 11px var(--mono); }
.post-chips > span, .post-chips > a { padding: 3px 8px; border-radius: 6px; background: var(--pv-chip); }
.post-chips > .post-trials { background: var(--pv-green-bg); color: var(--pv-green); font-weight: 600; }
.post-chips > .post-try { margin-left: auto; background: none; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; }
.post-replies { border-left: 2px solid var(--pv-line); padding-left: 14px; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; min-width: 0; }
.post-reply { display: flex; flex-direction: column; gap: 4px; }
.post-reply > summary, .post-more > summary { list-style: none; cursor: pointer; }
.post-reply > summary::-webkit-details-marker, .post-more > summary::-webkit-details-marker { display: none; }
.post-reply > summary { display: flex; gap: 8px; align-items: center; font-size: 12px; min-height: 24px; }
.post-collapse { font: 400 11px var(--mono); width: 24px; height: 24px; border-radius: 5px; border: 1px solid var(--pv-ctl); background: var(--pv-card); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.post-collapse::before { content: "–"; }
.post-reply:not([open]) .post-collapse::before { content: "+"; }
.post-reply-who { font-weight: 700; }
.post-reply-who a { text-decoration: none; }
.post-layout .post-reply-body { max-width: none; font-size: 14px; line-height: 1.5; gap: 6px; color: var(--ink); overflow-wrap: anywhere; }
.post-more { display: flex; flex-direction: column; gap: 10px; }
.post-more > summary { align-self: flex-start; font: 600 12px var(--sans); min-height: 32px; padding: 0 10px; border-radius: 7px; border: 1px dashed #A9AEB8; display: inline-flex; align-items: center; }
.post-more[open] > summary { margin-bottom: 0; }
.post-fold { display: flex; flex-direction: column; gap: 14px; }
.post-fold > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--soft); min-height: 32px; display: flex; align-items: center; }
.post-inline-code { font: 400 12px var(--mono); background: var(--chip); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.post-answer-box { background: var(--pv-card); border: 1px solid var(--pv-edge); border-radius: 16px; box-shadow: 0 1px 0 var(--pv-edge); overflow: hidden; min-width: 0; }
.post-answer-box-h { padding: 12px 18px; border-bottom: 1px solid var(--pv-line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.post-answer-box-h h2 { margin: 0; font-size: 15px; font-weight: 600; }
.post-answer-box-h span { font: 400 11px var(--mono); padding: 2px 7px; border-radius: 5px; background: var(--pv-pill-bg); color: var(--pv-pill-fg); text-transform: uppercase; }
.post-answer-box-b { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.post-prompt { display: flex; flex-direction: column; gap: 8px; background: var(--term); border: 1px solid var(--term-line); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.post-prompt-l { font: 400 12px var(--mono); color: var(--term-soft); }
.post-prompt-box { display: flex; align-items: stretch; gap: 8px; min-width: 0; }
.post-prompt-box code { flex: 1; min-width: 0; font: 400 13px/1.55 var(--mono); color: var(--term-ink); overflow-wrap: anywhere; padding: 4px 0; }
.post-prompt-box .copy { align-self: center; }
.post-answer-foot { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--pv-sec); }
.post-answer-foot a { color: var(--pv-sec); }
.post-aside .post-card { background: var(--pv-card); border: 1px solid var(--pv-line); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.post-eyebrow { margin: 0; font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--pv-sec); }
.post-linked-title { font-size: 16px; font-weight: 600; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.post-linked-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.post-card .evidence { gap: 10px; }
.post-card .verdict { font-size: 18px; letter-spacing: -.02em; }
.post-card .strip { height: 8px; }
.post-card .ev-line { font-size: 12px; color: var(--pv-sec); }
.post-people { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.post-people li { padding: 0; border: 0; }
.post-people a, .post-people span { display: inline-block; padding: 4px 8px; border-radius: 99px; background: var(--pv-chip); text-decoration: none; overflow-wrap: anywhere; }
.box.post-side { gap: 0; }
.post-rel { display: flex; flex-direction: column; }
.post-rel-a { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: var(--s3) var(--s4); border-top: 1px solid var(--line); font-size: var(--t3); font-weight: 500; line-height: var(--lh2); text-decoration: none; overflow-wrap: anywhere; transition: background var(--d1); }
.post-rel-a:first-child { border-top: 0; }
.post-rel-a:hover { background: var(--hover); }
.post-rel-v { flex: none; font: 400 var(--t1) var(--mono); color: var(--hint); }
@media (max-width: 720px) {
  .layout-2.post-layout { padding-block: 24px 64px; }
  .post-q { gap: 10px; }
  .post-q-votes { width: 44px; }
  .post-answer { padding: 14px; gap: 10px; }
  .post-answer[data-group="opinion"] { padding: 14px; }
  .post-votes { width: 34px; }
  .post-chips > .post-try { margin-left: 0; }
}

/* --- other pages --- (search, subjects, community, profile, connect, methodology, privacy, terms, editor, 404; tokens only) */
/* lab-tested line (decision 34): calm, beside community numbers, never replaces them */
.lab { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s2); margin: var(--s2) 0 0; font-size: var(--t1); color: var(--hint); }
.lab-tag { font-weight: 600; color: var(--ink); }
.lab-tag::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.lab-what { color: var(--soft); }
/* account page */
.acct { gap: var(--s6); max-width: 860px; }
.acct-acts { gap: var(--s2); }
.acct-card { padding: var(--s5); gap: var(--s4); }
.acct-card h2 { font-size: var(--t5); letter-spacing: -.02em; }
.acct-danger { border-color: var(--failed); }
.acct-danger h2 { color: var(--failed); }
.acct-p { font-size: var(--t3); }
.acct-list { list-style: none; margin: 0; padding: 0; gap: 0; }
.acct-item { justify-content: space-between; border-top: 1px solid var(--line); padding-block: var(--s3); gap: var(--s3); }
.acct-what { gap: 2px; min-width: 0; }
.acct-meta { font-size: var(--t1); overflow-wrap: anywhere; }
.btn-danger { color: var(--failed); border-color: var(--failed); }
.acct-del { gap: var(--s2); }
.acct-input { font: inherit; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--ctl); background: var(--surface); color: var(--ink); min-width: min(240px, 100%); }
/* Page header: title block on the page ground with one hairline below. hero() (account) gets the same rhythm. */
.pg-head, .bench { border-bottom: 1px solid var(--line); }
.pg-head { padding: var(--s7) 0 var(--s6); }
.pg-head-in, .bench > .wrap { display: flex; flex-direction: column; gap: var(--s4); position: relative; }
.bench > .wrap[style] { padding-block: var(--s7) var(--s6) !important; gap: var(--s4) !important; }
.pg-head .lead, .bench .lead { max-width: 60ch; margin: 0; font-size: var(--t4); line-height: var(--lh2); color: var(--soft); }
.pg-head .h-page, .bench .h-page { font-size: var(--t7); line-height: var(--lh1); }
.pg-split { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4) var(--s6); flex-wrap: wrap; }
.pg-title { min-width: 0; gap: var(--s2); }
.pg-split > .pg-title { flex: 1 1 420px; }
.pg-acts { gap: var(--s2); }
.pg-chips { gap: var(--s2); }
.pg-chips .mono, .pg-count, .pg-note, .sm { font-size: var(--t1); }
.pg-note { font-size: var(--t2); color: var(--hint); }
.pg-search { gap: var(--s3); max-width: 720px; }
.pg-ctx { gap: var(--s2); font-size: var(--t2); }
.pg-count { margin-left: auto; }
.pg-agent { max-width: 560px; }
.crumbs { display: flex; gap: var(--s2); flex-wrap: wrap; font: 400 var(--t1) var(--mono); color: var(--hint); }
.crumbs a { color: var(--hint); }
.eyebrow { font-size: var(--t1); font-weight: 500; color: var(--hint); }
.label, .pg-label { font-size: var(--t1); font-weight: 500; color: var(--hint); }
.pg-label { color: var(--ink); font-weight: 600; font-size: var(--t2); }
.pg-label.lime { color: var(--accent); }
.tight { gap: var(--s2); }
.spread { justify-content: space-between; align-items: baseline; gap: var(--s3); }
.strong { color: var(--ink); font-weight: 600; }
.grow { flex: 1; min-width: 0; }
.dim { color: var(--term-soft); }
.sans { font-family: var(--sans); }
.mw520 { min-width: 520px; } .mw640 { min-width: 640px; } .mw680 { min-width: 680px; }
.w240 { width: 240px; }

/* Sections and layout */
.pg-main { gap: var(--s7); }
.pg-main.wide { gap: var(--s8); }
.pg-sec { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.pg-sec.tight { gap: var(--s3); }
.pg-sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2) var(--s3); flex-wrap: wrap; }
.pg-sec-h .mono, .pg-sec-h a { font-size: var(--t1); color: var(--hint); }
.pg-sec .h-sub, .pg-main .h-sub, .pg-layout .h-sub { font-size: var(--t5); }
.sec-intro { gap: var(--s1); }
.sec-intro .soft { font-size: var(--t2); }
.sec-n { font-size: var(--t2); margin-right: var(--s3); }
.layout-2.pg-layout { padding-block: var(--s6) var(--s9); gap: var(--s6); }
.layout-2.pg-layout > .main-col { flex: 999 1 560px; gap: var(--s6); }
.layout-2.pg-layout > aside { flex: 1 1 var(--w-aside); gap: var(--s5); }
.layout-search.pg-layout > aside.filters { flex: 1 1 240px; max-width: var(--w-aside); }
.layout-search .pg-main, .layout-search .pg-main.wide { gap: var(--s6); }
.pg-main.main-col { gap: var(--s6); }
.pg-cols { display: flex; gap: var(--s6); flex-wrap: wrap; align-items: flex-start; }
.pg-cols.ruled { border-top: 1px solid var(--line); padding-top: var(--s6); }
.pg-col { flex: 1 1 320px; min-width: 0; gap: var(--s3); }
.pg-wide { flex: 999 1 520px; min-width: 0; }
.pg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s3); }
.pg-grid.wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.pg-grid.flow { padding: 0; margin: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.info-card { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); border-radius: var(--r3); font-size: var(--t3); line-height: var(--lh2); min-width: 0; }
.info-card .soft { font-size: var(--t3); }
.dark.info-card { border: 1px solid var(--term-line); }
.plain-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--s2); font-size: var(--t3); }
.plain-list.lede { font-size: var(--t4); line-height: var(--lh2); gap: var(--s3); }
.dash-li { display: flex; gap: var(--s2); align-items: flex-start; }
.lede { font-size: var(--t4); line-height: var(--lh3); max-width: 70ch; }
.ruled-row { border-top: 1px solid var(--line); padding-top: var(--s2); }
.formula { gap: var(--s3); flex: 1 1 380px; padding: var(--s5); }
.formula-big { font-size: var(--t7); color: var(--term-ink); }
.formula dl.facts { color: var(--term-ink); }
.formula dl.facts dt { color: var(--term-soft); }
.pg-code { flex: 999 1 520px; min-width: 0; margin: 0; border-radius: var(--r3); border: 1px solid var(--term-line); padding: var(--s4); font: 400 var(--t2)/var(--lh3) var(--mono); overflow-x: auto; color: var(--term-ink); }
.toc { gap: var(--s2); font-size: var(--t2); }
.th-big { font-size: var(--t4); font-family: var(--sans); }
.side-card { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); min-width: 0; }
.side-card a { font-size: var(--t3); font-weight: 500; }
.by-tool { gap: var(--s2); }
.by-tool .mono { font-size: var(--t2); }
.agent-note { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s4); border-radius: var(--r3); border: 1px solid var(--term-line); font-size: var(--t2); line-height: var(--lh2); color: var(--term-ink); }
.an-h { font: 500 var(--t1) var(--mono); color: var(--accent); }
.dark { background: var(--term); color: var(--term-ink); }
.dark .label, .dark .pg-label { color: var(--term-soft); }
.dark .pg-label.lime { color: var(--accent); }

/* Boxes and rows reuse the shell's hairline language: no ink borders, tokens only */
.card, .card-ink { box-shadow: none; }
.list-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); padding: var(--s3) var(--s4); gap: var(--s3); align-items: baseline; transition: background var(--d1), border-color var(--d1); }
.list-card:hover { color: var(--ink); background: var(--hover); border-color: var(--line2); }
.list-card.col { flex-direction: column; gap: var(--s1); align-items: stretch; }
.list-card.helper { align-items: center; justify-content: flex-start; }
.lc-main { gap: var(--s1); min-width: 0; }
.lc-title { font-size: var(--t3); font-weight: 500; line-height: var(--lh2); color: var(--ink); overflow-wrap: anywhere; }
.lc-sub { font-size: var(--t1); color: var(--hint); }
.lc-end { font-size: var(--t2); white-space: nowrap; }
.pg-head .h-page.sj-title { font-size: clamp(var(--t6), 3.4vw, 72px); }
.sj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s3); }
.opt-cards { gap: var(--s3); }
.opt-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); padding: var(--s4); gap: var(--s2); transition: background var(--d1), border-color var(--d1); }
.opt-card:hover { color: var(--ink); background: var(--hover); border-color: var(--line2); }
.opt-card.best { border-color: var(--accent-text); }
.oc-top { gap: var(--s2); }
.oc-lead { font-size: var(--t1); font-weight: 600; color: var(--ink); }
.oc-top .kind { margin-left: auto; }
.oc-name { font-size: var(--t3); font-weight: 600; color: var(--ink); }
.oc-name.lg { font-size: var(--t4); letter-spacing: var(--track); line-height: var(--lh1); }
.oc-desc { font-size: var(--t2); line-height: var(--lh2); }
.oc-risk { color: var(--ink); font-weight: 500; }
.oc-foot { font-size: var(--t1); }
.letter { background: var(--surface2); border-radius: var(--r1); font-size: var(--t2); }
.letter.on { background: var(--accent); color: var(--on-accent); outline: 0; }

/* Search results */
.sr-card { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); min-width: 0; }
.sr-card.best { border-color: var(--accent-text); }
.sr-top { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; font-size: var(--t1); }
.sr-lead { font-weight: 600; color: var(--ink); }
.sr-card.best .sr-lead { color: var(--accent-text); }
.sr-state { margin-left: auto; }
.sr-title { font-size: var(--t4); font-weight: 600; letter-spacing: var(--track); line-height: var(--lh1); color: var(--ink); overflow-wrap: anywhere; }
.sr-sum { font-size: var(--t3); line-height: var(--lh2); color: var(--soft); margin: 0; }
.sr-card .opt-cards { margin-top: var(--s1); }
.pg-cta { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; padding: var(--s4); font-size: var(--t3); }
.pg-cta .stack { gap: var(--s1); }
.filters fieldset { border-bottom: 1px solid var(--line); padding-bottom: var(--s4); margin-bottom: var(--s4); gap: var(--s2); }
.filters label { font-size: var(--t3); }
.filters label .n { font-size: var(--t1); color: var(--hint); }
.filters input { accent-color: var(--accent-text); }
.filters-mobile > summary { font-size: var(--t2); }
.mark { padding: 0 .15em; }
mark { background: var(--accent-soft); color: var(--ink); padding: 0 2px; border-radius: var(--r1); }
.empty-state { gap: var(--s3); padding: var(--s6) var(--s5); border: 1px dashed var(--line2); border-radius: var(--r3); background: var(--surface); }
.empty-state h2 { font-size: var(--t6); line-height: var(--lh1); max-width: 28ch; }
.empty-state .lead { font-size: var(--t3); color: var(--soft); max-width: 56ch; }
.empty { border: 1px dashed var(--line2); border-radius: var(--r3); padding: var(--s4); font-size: var(--t3); color: var(--soft); background: var(--surface); }
@media (min-width: 641px) { .empty-state { padding: var(--s7) var(--s6); } }

/* Subject page */
.timeline { list-style: none; margin: 0 0 0 var(--s1); padding: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line2); }
.timeline li { position: relative; display: flex; flex-direction: column; gap: var(--s1); padding: 0 0 var(--s4) var(--s5); }
.tl-dot { position: absolute; left: -5px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.tl-title { font-size: var(--t4); font-weight: 600; letter-spacing: var(--track); }
.stat-strip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); overflow: hidden; }
.stat-strip > div { padding: var(--s4); gap: var(--s1); }
.stat-big { font-size: var(--t8); }
.stat-note { font-size: var(--t1); color: var(--hint); }
.board thead th { font-size: var(--t1); color: var(--hint); background: var(--surface2); }
.board td { border-top: 1px solid var(--line); font-size: var(--t2); }
.board .pkg-name { font-size: var(--t3); }

/* Community */
.cm-main { gap: var(--s4); }
.cm-bar { gap: var(--s3); }
.tabs-links { border-bottom: 1px solid var(--line); font-size: var(--t3); gap: var(--s2); }
.tabs-links a { color: var(--hint); padding-inline: var(--s2); }
.tabs-links a:hover { color: var(--ink); }
.tabs-links a[aria-current="page"] { color: var(--ink); font-weight: 500; border-bottom-color: var(--accent-text); }
.tabs-links .tab-n { background: var(--surface2); color: var(--hint); font-size: var(--t1); }
.pill { font-size: var(--t2); padding: 0 var(--s3); }
.pill.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent-edge); }
.feed { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); }
.feed-row { border-top: 1px solid var(--line); padding: var(--s3) var(--s4); gap: var(--s2) var(--s4); transition: background var(--d1); }
.feed-row:hover { background: var(--hover); }
.feed-row.solo { grid-template-columns: minmax(0, 1fr); }
.feed-title { font-size: var(--t3); font-weight: 500; line-height: var(--lh2); letter-spacing: 0; color: var(--ink); }
.feed-excerpt { font-size: var(--t2); color: var(--soft); }
.feed-meta { font-family: var(--sans); font-size: var(--t1); color: var(--hint); align-items: center; }
.feed-meta a { color: var(--hint); }
.feed-type { font-family: var(--mono); font-size: var(--t1); font-weight: 500; padding: 0 var(--s2); min-height: var(--h1); display: inline-flex; align-items: center; border-radius: var(--r1); background: var(--surface2); color: var(--soft); }
.feed-type.question, .feed-type.report, .feed-type.news { background: var(--surface2); color: var(--soft); }
.feed-type.request { background: var(--surface2); color: var(--ink); border: 1px solid var(--line2); }
.vote { border: 1px solid var(--ctl); background: var(--surface); border-radius: var(--r2); font-size: var(--t2); }
.vote:hover { color: var(--ink); border-color: var(--soft); }
.vote[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent-edge); }
.text-trigger { background: none; border: 0; padding: 0; margin: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.text-trigger.feed-title { font-weight: 500; }
.up-next, .mini-list { border-top: 1px solid var(--line); }
.up-next li, .mini-list li { border-bottom: 1px solid var(--line); }
.up-next .un-title, .mini-list a.t { font-size: var(--t3); font-weight: 500; letter-spacing: 0; text-decoration: none; overflow-wrap: anywhere; }
.up-next .t small, .mini-list small { font-family: var(--sans); font-size: var(--t1); color: var(--hint); }
.mini-act { align-self: flex-start; margin-top: var(--s2); }
.pager a, .pager span[aria-current], .pager span[aria-disabled] { border-radius: var(--r2); background: var(--surface); }
.pager [aria-disabled="true"] { border-color: var(--line); border-style: dashed; }

/* Profile */
.pf-id { gap: var(--s5); flex-wrap: wrap; align-items: center; }
.pf-name { gap: var(--s2); flex: 1 1 300px; min-width: 0; }
.pf-meta { gap: var(--s1) var(--s3); font-size: var(--t2); align-items: center; }
.pf-tabs { background: none; }
.pf-feed .feed-row { grid-template-columns: 48px minmax(0, 1fr); }
.pf-feed .feed-row.solo { grid-template-columns: minmax(0, 1fr); }
.pf-excerpt { margin: 0; font-size: var(--t2); line-height: var(--lh2); overflow-wrap: anywhere; }
.report-rows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); }
.report-rows > li { border-top: 1px solid var(--line); padding: var(--s3) var(--s4); font-size: var(--t2); }
.report-rows .m { font-weight: 400; color: var(--soft); font-size: var(--t1); }
.report-rows .when { color: var(--hint); font-size: var(--t1); }
.founder-chip { background: var(--surface2); padding: var(--s1) var(--s3); font-size: var(--t2); }
.founder-n { color: var(--hint); font-size: var(--t1); }
.founders-note { color: var(--hint); font-size: var(--t1); }
.avatar { border-radius: var(--r2); background: var(--surface2); border-color: var(--line); }
.avatar.lg { border-radius: var(--r3); }

/* Connect, methodology, static text */
.connect-page { max-width: 720px; gap: var(--s6); }
.cn-steps { gap: var(--s5); }
.cn-steps > li { gap: var(--s4); }
.cn-n { background: var(--accent); color: var(--on-accent); border-radius: var(--r2); width: var(--h2); height: var(--h2); font-size: var(--t2); }
.cn-body { flex: 1; min-width: 0; gap: var(--s3); }
.cn-other .soft, .connect-page > .soft { font-size: var(--t3); line-height: var(--lh2); }
.cn-body .soft { font-size: var(--t4); line-height: var(--lh3); }
.cn-h { font-size: var(--t5); letter-spacing: var(--track); }
.cn-sub { font-size: var(--t4); }
.cn-others > li { gap: var(--s2); padding: var(--s4) 0; border-top: 1px solid var(--line); }
.cmd-row { gap: var(--s2); align-items: stretch; flex-wrap: nowrap; }
.url-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); padding: var(--s1) var(--s1) var(--s1) var(--s3); }
.inline-cmd { background: var(--surface2); border-radius: var(--r1); font-size: var(--t1); }
.compare th, .compare td { border-bottom: 1px solid var(--line); }
.compare tbody { font-size: var(--t2); }
.compare thead th { background: var(--surface2); font-size: var(--t2); }
.compare .pick { background: var(--accent-soft); }
.compare thead .pick { border-top: 2px solid var(--accent-text); }
dl.facts { font-size: var(--t2); }
dl.facts dt { color: var(--hint); }
.banner { background: var(--surface2); border-bottom: 1px solid var(--line); font-size: var(--t2); }
.prose { font-size: var(--t3); line-height: var(--lh3); color: var(--soft); }
.prose strong, .prose h2 { color: var(--ink); }
.prose .h-sub { margin-top: var(--s3); }
.prose code { background: var(--surface2); font-size: var(--t2); }
.prose th, .prose td { border-bottom: 1px solid var(--line); }
.prose blockquote { background: var(--surface2); border-left: 2px solid var(--line2); }
.prose pre { background: var(--surface2); padding: 10px 12px; border-radius: 8px; min-width: 0; }
.prose pre code, .tp-sec .prose pre code { background: none; padding: 0; border-radius: 0; font-size: var(--t2); white-space: pre; overflow-wrap: normal; }
.section.pg-main { padding-block: var(--s7) var(--s9); }

/* Editor desk */
.ed-bar { gap: var(--s4); justify-content: space-between; align-items: flex-end; border-bottom: 1px solid var(--line); }
.ed-bar .th-tabs { border: 0; }
.ed-bar .th-tabs a { gap: var(--s1); }
.ed-bar form { margin-bottom: var(--s2); }
.ed-msg { padding: var(--s3) var(--s4); font-size: var(--t3); }
.ed-main { gap: var(--s4); }
.ed-list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.qrow { gap: var(--s3) var(--s4); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); align-items: center; }
.qrow.top { align-items: flex-start; }
.qr-main { flex: 1 1 360px; min-width: 0; gap: var(--s1); }
.qr-title { font-size: var(--t3); font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.qr-scan { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); font-size: var(--t2); color: var(--soft); }
.qrow .chip.strong { border: 1px solid var(--ctl); color: var(--ink); background: none; }

/* 404 */
.nf { flex: 1; }
.nf-in { display: flex; gap: var(--s7); flex-wrap: wrap; align-items: flex-start; padding-block: var(--s8) var(--s9); }
.nf-main { flex: 999 1 520px; min-width: 0; gap: var(--s4); }
.nf-form { max-width: 640px; width: 100%; }
.nf-path { font-size: .7em; letter-spacing: 0; background: var(--surface2); border: 1px solid var(--line); padding: 2px var(--s2); border-radius: var(--r2); overflow-wrap: anywhere; }
.nf-aside { flex: 1 1 280px; min-width: 0; gap: var(--s4); }
.nf .lead { font-size: var(--t4); color: var(--soft); max-width: 56ch; }

@media (max-width: 720px) {
  .pg-head { padding: var(--s5) 0 var(--s4); }
  .bench > .wrap[style] { padding-block: var(--s5) var(--s4) !important; }
  .pg-head .h-page, .bench .h-page { font-size: var(--t6); }
  .pg-head .lead, .bench .lead { font-size: var(--t3); }
  .pg-count { margin-left: 0; width: 100%; }
  .layout-2.pg-layout { padding-block: var(--s5) var(--s8); gap: var(--s5); }
  .section.pg-main { padding-block: var(--s5) var(--s8); }
  .pg-main.wide { gap: var(--s7); }
  .stat-big { font-size: var(--t7); }
  .formula { padding: var(--s4); }
  .formula-big { font-size: var(--t5); }
  .cmd-row { flex-wrap: wrap; }
  .nf-in { padding-block: var(--s6) var(--s8); gap: var(--s5); }
  .ed-bar { align-items: stretch; }
}

/* ---------- 1. Shared system ---------- */
/* Dark is the default theme (assets.ts); --mark is the 404 address highlight. */
:root { --w-prose: 640px; --w-nav: 224px; --w-aside: 320px; --mark: rgba(212,255,58,.3); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --mark: var(--accent); } }
:root[data-theme="light"] { --mark: var(--accent); }
body { min-height: 100dvh; }
body > main { flex: 1 0 auto; }

/* Type scale: two page-title sizes (48 display, 36 page) */
.h-hero { font-size: var(--t9); letter-spacing: var(--track-hero); }
.h-page { font-size: var(--t8); }
.h-display { font-size: var(--t9); line-height: var(--lh1); letter-spacing: var(--track-hero); overflow-wrap: anywhere; }
.lead { max-width: 60ch; }
@media (max-width: 720px) {
  .h-hero, .h-display { font-size: clamp(30px, 9.2vw, 36px); }
  .h-page { font-size: var(--t7); }
  .lead { font-size: var(--t4); }
}

/* Focus: 2 px ring; on dark surfaces the lime one; inside scrolling strips and row-covering links it is drawn inside */
.dark :focus-visible { outline-color: var(--accent); }
.askbox:focus-within { border-color: var(--ctl); }
.askbox:has(input:focus-visible), .sheet-search:has(input:focus-visible), .th-ask:has(input:focus-visible) { border-color: var(--accent-text); outline: 2px solid var(--accent-text); outline-offset: 2px; }
.tabs-links :focus-visible, .th-sorts :focus-visible, .th-scroll :focus-visible { outline-offset: -2px; }

/* Tab bar */
.tabs-links { gap: var(--s2); font-size: var(--t3); font-weight: 500; }
.tabs-links a { min-height: 44px; padding: 0 var(--s2); font-weight: 500; }
.tabs-links a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent-text); }
.tabs-links .tab-n, .tp-tabs .tab-n { font: 400 var(--t1) var(--sans); padding: 0; background: none; color: var(--hint); }
@media (max-width: 720px) {
  .tabs-links a { flex: none; min-width: 44px; justify-content: center; }
  .tabs-links, .th-sorts, .th-scroll, .th-railed .th-tabs, .rp-filters {
    /* 33, not 32: the last item's fractional width rounds into the end padding; one more pixel lets it clear the fade (J-459 N2) */
    margin-right: -16px; padding-right: 33px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  }
}

/* Chips: filled = a value; dashed = a suggestion, an open spot or something that does not exist yet */
.chip.dash, .vchip.forming, .av.av-you { border: 1px dashed var(--ctl); background: none; color: var(--soft); }
.chip-hit { display: inline-flex; align-items: center; text-decoration: none; }

/* Copy button: one icon button, 44x44 at every width, aligned to the top of its box */
.copy { width: 44px; height: 44px; align-self: flex-start; }
.copy.light { width: 44px; height: 44px; align-self: flex-start; }
.copy[data-copied] { color: var(--accent); }
.copy.light[data-copied] { color: var(--accent-text); }
.agent-line-box code, .tp-cmdrow .codeblock { min-height: 44px; }
.cx-icon-btn { width: 44px; height: 44px; }
@media (pointer: coarse) { .cx-icon-btn { width: 44px; height: 44px; } }

/* Header: on phones a "Connect agent" button (drawn 36, 44 px box) */
.hdr-connect { display: none; }
@media (max-width: 640px) {
  .site-header .brand { min-height: 44px; }
  .hdr-mobile .hdr-connect { display: inline-flex; min-height: 44px; padding-block: 0; border: 4px solid transparent; background-clip: padding-box; box-shadow: inset 0 0 0 1px var(--accent-edge); white-space: nowrap; }
  .hdr-mobile { gap: 0; }
}
@media (max-width: 374px) { .hdr-mobile .hdr-search { display: none; } }

/* Footer: 44 px links on phones */
@media (max-width: 720px) {
  .site-footer .wrap { padding-block: var(--s4) var(--s6); row-gap: 0; }
  .site-footer nav { gap: 0 var(--s4); }
  .site-footer nav a, .site-footer .brand { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Touch targets (phones and coarse pointers): every tapped box measures at least 44x44 */
.pill { min-height: 32px; }
@media (max-width: 720px), (pointer: coarse) {
  .btn, .btn-sm { min-height: 44px; }
  .pill { min-height: 44px; border: 4px solid transparent; background-clip: padding-box; box-shadow: inset 0 0 0 1px var(--ctl); }
  /* The selected pill keeps the same drawn size: the 4 px border stays transparent and unpainted (the assets .pill.on
     colours it and resets the clip), the edge is an inset shadow; sticky hover on touch must not colour it either. */
  .pill:hover { border-color: transparent; box-shadow: inset 0 0 0 1px var(--soft); }
  .pill.on, .pill.on:hover { border-color: transparent; background-clip: padding-box; box-shadow: inset 0 0 0 1px var(--accent-edge); }
  .askbox button { min-height: 44px; }
  .askbox { min-height: 48px; }
  .askbox input { font-size: var(--t4); }
  nav[aria-label="Breadcrumb"] a, .tp-crumbs a, .th-alt, .tp-more-btn, .cx-more, a.tp-note, .tp-vn a { display: inline-flex; align-items: center; min-height: 44px; }
  /* Same drawn size, 44 px box: a transparent border outside the visible edge (J-440, L2 / Y5) */
  .pill.rp-pill { min-height: 44px; }
  .founder-chip { border-block: 7px solid transparent; background-clip: padding-box; }
  .post-act { min-height: 44px; padding-inline: 9px; border: 4px solid transparent; background-clip: padding-box; box-shadow: inset 0 0 0 1px var(--pv-ctl); }
  .post-act:hover { border-color: transparent; box-shadow: inset 0 0 0 1px var(--ink); }
  .post-act.on, .post-act[aria-pressed="true"] { border-color: transparent; box-shadow: inset 0 0 0 1px var(--accent-text); }
}
.rp-pill { font-weight: 600; min-height: 36px; }
@media (max-width: 720px) { .wrap { padding-inline: var(--s4); } .askbox { padding-block: 1px; } .th-ask input { min-height: 44px; } }

/* Sticky rails (only rails that carry actions or navigation) */
@media (min-width: 1000px) and (min-height: 700px) {
  .rail-sticky { position: sticky; top: var(--s5); max-height: calc(100dvh - var(--s7)); overflow-y: auto; overscroll-behavior: contain; align-self: start; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
  /* The thread card scrolls inside itself when it is taller than the screen: a bottom shadow says so. The "local" cover
     moves with the content and hides the shadow once the end is reached; a card that fits shows neither.
     The shadow colour is a theme token (--rail-shadow): a dark shadow disappears on the dark card, so dark uses a light glow. */
  .tp-card.rail-sticky {
    overflow-y: auto;
    background:
      linear-gradient(rgba(0,0,0,0), var(--surface) 60%) center bottom / 100% 32px no-repeat local,
      radial-gradient(farthest-side at 50% 100%, var(--rail-shadow), rgba(0,0,0,0)) center bottom / 100% 14px no-repeat scroll,
      var(--surface);
  }
}

/* ---------- thread (views/topic.ts railPage) ---------- */
.tp-crumbs { align-items: center; }
.tp-page { display: grid; grid-template-columns: minmax(0, 1fr); padding-block: var(--s5) var(--s9); }
.tp-page > .tp-head { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.tp-page .tp-sub { max-width: var(--w-prose); }
.tp-use, .tp-nl { font-size: var(--t2); font-weight: 600; }
.tp-found-head { display: flex; flex-direction: column; gap: var(--s2); max-width: var(--w-prose); }
.tp-found-head .tp-cons { font-size: var(--t4); line-height: var(--lh3); }
.tp-rail { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.tp-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); overflow: hidden; min-width: 0; }
.tp-card .tp-try { border: 0; border-radius: 0; background: none; overflow: visible; }
.tp-card > * + * > .tp-ph:first-child, .tp-card > .tp-facts { border-top: 1px solid var(--line); }
.tp-vcells { gap: var(--s4); }
.tp-vcells .tp-vc + .tp-vc { border-top: 1px solid var(--line); padding-top: var(--s3); }
.tp-facts { margin: 0; }
.tp-facts > div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: var(--s3); padding: var(--s3) var(--s4); border-top: 1px solid var(--line); }
.tp-facts > div:first-child { border-top: 0; }
.tp-facts dt { font-size: var(--t1); font-weight: 500; color: var(--hint); }
.tp-facts dd { margin: 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: var(--t3); }
.tp-facts dd b { font-weight: 600; }
.tp-facts .none { font-weight: 500; color: var(--soft); }
.tp-ut button { padding-inline: 10px; }
.tp-meta .tp-pub, .tp-head > .tp-pub { margin-left: 0; }
.tp-tabs { border-bottom: 1px solid var(--line); margin-top: var(--s5); }
.tp-main { display: flex; flex-direction: column; gap: var(--s6); padding-top: var(--s6); min-width: 0; }
.tp-sec .prose { max-width: none; font-size: var(--t4); line-height: var(--lh3); gap: var(--s4); }
.tp-sec .prose > *, .doc .prose > * { max-width: var(--w-prose); }
.tp-sec .prose > pre, .tp-sec .prose > .table-wrap, .doc .prose > pre, .doc .prose > .table-wrap { max-width: 100%; }
.tp-sec .prose h2 { margin-top: var(--s4); }
.tp-sec .prose h3 { font-size: var(--t4); }
.tp-sec .prose code { font-size: .875em; }
.tp-sec .prose pre, .tp-sec .prose pre code { font-size: var(--t2); line-height: var(--lh3); font-variant-ligatures: none; }
/* A code block wider than the column scrolls inside itself: a right-edge shadow says so, gone at the end or when it fits
   (same local cover + scroll shadow as the rail card; review2 D2 6) */
.tp-sec .prose pre {
  background:
    linear-gradient(90deg, rgba(0,0,0,0), var(--surface2) 60%) right center / 32px 100% no-repeat local,
    radial-gradient(farthest-side at 100% 50%, var(--rail-shadow), rgba(0,0,0,0)) right center / 14px 100% no-repeat scroll,
    var(--surface2);
}
.tp-sec .steps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.tp-subjrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); border-top: 1px solid var(--line); padding-top: var(--s4); }
.tp-subjrow h2 { font-size: var(--t1); font-weight: 500; letter-spacing: 0; }
.tp-subj { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tp-page .try-short { display: none; }
@media (min-width: 1000px) {
  .tp-page { grid-template-columns: minmax(0, var(--w-read)) var(--w-aside); grid-template-rows: auto auto 1fr; justify-content: space-between; column-gap: var(--s6); align-items: start; }
  .tp-page > .tp-head, .tp-page > .tp-tabs, .tp-page > .tp-main { grid-column: 1; }
  .tp-page > .tp-rail { grid-area: 1 / 2 / span 3; align-self: stretch; }
  .tp-acts { justify-content: flex-end; }
}
@media (max-width: 999px) {
  .tp-page { display: flex; flex-direction: column; gap: var(--s4); padding-block: var(--s4) var(--s8); }
  .tp-page > .tp-head, .tp-rail, .tp-card { display: contents; }
  .tp-head > * { order: 0; }
  .tp-head > .tp-agent { order: 5; }
  .tp-verdict { order: 1; border: 1px solid var(--line); border-radius: var(--r3); overflow: hidden; background: var(--surface); }
  .tp-card:not(.is-empty) .tp-facts { order: 1; }
  .tp-acts { order: 2; justify-content: flex-start; }
  .tp-tabs { order: 3; margin-top: 0; }
  .tp-main { order: 4; padding-top: var(--s2); }
  .tp-card .tp-try { order: 6; border: 1px solid var(--line); border-radius: var(--r3); overflow: hidden; background: var(--surface); }
  .tp-facts { order: 7; border: 1px solid var(--line); border-radius: var(--r3); background: var(--surface); }
  .tp-card:not(.is-empty) .tp-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-card:not(.is-empty) .tp-facts > div { grid-template-columns: minmax(0, 1fr); gap: var(--s1); border-top: 0; }
  .tp-card:not(.is-empty) .tp-facts > div:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  /* A row left alone after the pairs ("What people found") takes the full width instead of half (review2 D2 3) */
  .tp-card:not(.is-empty) .tp-facts > div:nth-child(even):last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .tp-page .try-short { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: var(--s3); padding: 0 var(--s4); border-top: 1px solid var(--line); min-height: 44px; }
  .tp-page .try-short a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t2); font-weight: 500; color: var(--ink); }
  .is-empty .tp-verdict .invite-note { display: none; }
  .tp-verdict .tp-pb { padding-block: var(--s3); }
}
@media (max-width: 720px) {
  .tp-page .h-page { font-size: var(--t6); }
  .tp-page .tp-sub { font-size: var(--t4); line-height: 1.5; }
  .tp-head > .tp-pub, .tp-meta .tp-pub { margin-left: 0; flex-basis: 100%; }
  .tp-facts dd > .tp-vn:has(a) { margin-block: -12px; }
  .tp-sec .steps li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- home and the connect panel (views/home.ts, ui.ts connectPanel) ---------- */
.cx-copy { width: 100%; min-height: 44px; margin-top: var(--s2); gap: var(--s2); font-size: var(--t3); }
.cx-copy .cx-ico svg { stroke: currentColor; }
.cx-copy[data-copied] { color: var(--on-accent); }
.cx-term > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--s2); min-height: 32px; font-size: var(--t1); color: var(--term-soft); }
.cx-term > summary::-webkit-details-marker { display: none; }
.cx-term > summary svg { transition: transform var(--d1); flex: none; }
.cx-term[open] > summary svg { transform: rotate(90deg); }
.cx-term > summary:hover { color: var(--term-ink); }
.cx-term .cx-cmds { margin-top: var(--s2); }
.cx-cmd { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.cx-cmd-name { grid-column: 1; grid-row: 1; }
.cx-cmd-text { grid-column: 1; grid-row: 2; font-size: var(--t2); }
.cx-cmd .cx-icon-btn { grid-column: 2; grid-row: 1 / span 2; }
.cx-cmd-text .cx-prompt { color: var(--term-soft); }
.cx-cmd-text .nb { color: inherit; white-space: nowrap; }
.hero .askbox { margin-top: var(--s6); }
@media (max-width: 999px) { .hero-in { grid-template-columns: minmax(0, 1fr); gap: var(--s5); } }
.stream { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .stream { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); } .stream.one { grid-template-columns: minmax(0, 1fr); } }
.box-h { align-items: center; min-height: 40px; padding-block: 0; }
.box-h > a { margin-left: auto; }
.lv-title { font-size: var(--t4); font-weight: 500; }
.lv-row .lv-title::after { content: ""; position: absolute; inset: 0; }
.lv-row .lv-title:focus-visible { outline-offset: -2px; }
.lv-by a { position: relative; z-index: 1; }
.stream.one .lv-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.stream.one .lv-side { flex-direction: row; align-items: center; gap: var(--s3); }
.stream.one .lv-side > span:last-child { min-width: 48px; text-align: right; }
@media (max-width: 720px) {
  .connect .cx-msg { max-height: none; -webkit-mask-image: none; mask-image: none; overflow: visible; }
  .hero-ask { display: block; }
  .tries { display: none; }
  .hero .askbox { margin-top: var(--s5); }
  .hero { padding: var(--s4) 0; }
  .hero-in { gap: var(--s4); }
  .connect.cx { gap: var(--s2); }
  .cx-copy { min-height: 48px; }
  .cx-term > summary { min-height: 44px; }
  .box-h { min-height: 44px; }
  .box-h a { display: inline-flex; align-items: center; min-height: 44px; }
  .lv-row { padding: var(--s3); }
  .stream.one .lv-row { grid-template-columns: minmax(0, 1fr); }
  .stream.one .lv-side { justify-content: flex-start; }
}

/* ---------- page header (pages.ts pageHead) ---------- */
.pg-head .h-page, .bench .h-page { font-size: var(--t8); }
@media (max-width: 720px) { .pg-head .h-page, .bench .h-page { font-size: var(--t7); } .pg-head .lead, .bench .lead { font-size: var(--t4); } }

/* ---------- search (pages.ts searchView) ---------- */
.pg-head.flush { border-bottom: 0; padding: var(--s6) 0 0; }
.sr-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.sr-h .pg-count { margin-left: 0; text-align: right; }
.sr-h .h-page { flex: none; overflow-wrap: normal; }
.pg-search { max-width: var(--w-read); }
.pg-search .askbox { min-height: 44px; }
.pg-ctx { gap: var(--s1) var(--s2); }
.layout-search.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); padding-block: var(--s5) var(--s9); }
.sr-rail { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.layout-search > .sr-rail > aside.filters { flex: none; max-width: none; }
.sr-col { gap: var(--s6); }
.sr-row { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4) 0; border-top: 1px solid var(--line); min-width: 0; }
.sr-row.best { border-top: 2px solid var(--accent-text); }
.sr-row .sr-top { font-size: var(--t1); }
.sr-row .sr-lead { font-weight: 500; color: var(--hint); }
.sr-row.best .sr-lead { color: var(--accent-text); font-weight: 600; }
.sr-row .sr-top .mono { font-family: var(--mono); color: var(--hint); }
.sr-row .sr-title { text-decoration: none; font-size: var(--t4); font-weight: 600; line-height: 1.3; }
.sr-row .sr-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.sr-row .sr-sum { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.5; }
.sr-row mark, .sr-line mark { padding: 1px .15em; margin: 0 -.15em; background: var(--accent-soft); color: var(--ink); border-radius: var(--r1); }
.sr-opts { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r3); background: var(--surface); overflow: hidden; margin-top: var(--s1); }
.sr-opt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s1) var(--s4); align-items: center; padding: var(--s3) var(--s4); text-decoration: none; border-top: 1px solid var(--line); min-height: 44px; }
.sr-opt:first-child { border-top: 0; }
.sr-opt:hover { background: var(--hover); color: var(--ink); }
.sr-opt-main { display: flex; flex-direction: column; min-width: 0; }
.sr-opt .oc-name { font-size: var(--t3); font-weight: 600; }
.sr-opt .oc-desc { font-size: var(--t2); color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-opt .evidence.invite { flex-direction: row; align-items: center; gap: var(--s2); flex-wrap: nowrap; }
.sr-line.list-card { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: var(--s3) 0; }
.sr-line.list-card:hover { background: none; }
/* Ruled rows: the section gap would add 16 px under each row (13 above, 29 below); rows sit edge to edge (review2 D2 4) */
.pg-sec > .sr-line.list-card + .sr-line.list-card { margin-top: calc(-1 * var(--s4)); }
.sr-line .lc-title { font-size: var(--t3); font-weight: 500; }
.sr-empty.empty-state { border: 0; background: none; padding: var(--s5) 0 0; }
.sr-empty.empty-state h2 { font-size: var(--t7); line-height: 1.15; max-width: none; overflow-wrap: anywhere; }
.sr-empty .lead { font-size: var(--t4); }
.sr-empty .btn { min-height: 44px; }
.sr-empty .agent-line { max-width: 560px; }
@media (min-width: 1000px) {
  .layout-search.layout-2 { grid-template-columns: minmax(0, var(--w-read)) var(--w-aside); justify-content: space-between; column-gap: var(--s6); align-items: start; }
  .layout-search > .sr-rail { grid-column: 2; grid-row: 1; }
  .layout-search > .sr-col { grid-column: 1; grid-row: 1; }
}
@media (max-width: 999px) {
  .layout-search.layout-2 { display: flex; flex-direction: column; }
  .layout-search > .sr-rail { display: contents; }
  .layout-search .filters { order: 0; }
  .layout-search > .sr-col { order: 1; }
  .layout-search .pg-cta { order: 2; }
}
@media (max-width: 720px) {
  .pg-head.flush { padding-top: var(--s5); }
  .pg-search .askbox { min-height: 48px; }
  .chip-hit { min-height: 44px; }
  .chip-hit .chip { min-height: 28px; }
  .pg-ctx > a.link { display: inline-flex; align-items: center; min-height: 44px; }
  .sr-opt { grid-template-columns: minmax(0, 1fr); }
  .filters label, .filters-mobile > summary, .filters .btn { min-height: 44px; }
  .pg-cta .btn { min-height: 44px; width: 100%; }
}

/* ---------- threads (views/topics.ts, B_THREADS_RAIL) ---------- */
.th-railed { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); padding-block: var(--s6) var(--s9); }
.th-rail { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.th-rail .lead { font-size: var(--t3); }
.th-railed .th-tabs { display: flex; flex-direction: column; gap: 2px; overflow: visible; }
.th-railed .th-tabs a { height: 36px; justify-content: space-between; gap: var(--s2); padding: 0 var(--s3); margin: 0; border: 1px solid transparent; border-left-width: 2px; border-radius: var(--r2); font-size: var(--t3); color: var(--soft); }
.th-railed .th-tabs a[aria-current="true"] { color: var(--ink); font-weight: 600; background: var(--surface); border-color: var(--line); border-left-color: var(--accent-text); }
.th-railed .th-tabs .n { font: 400 var(--t1) var(--sans); color: var(--hint); }
.th-railed .th-areas { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.th-railed .th-areas > .label { flex-basis: 100%; margin: 0 0 var(--s1); }
.th-railed .th-scroll { display: contents; }
.th-railed .th-sorts .label, .th-railed .th-areas > .label { width: 40px; }
.th-list { display: flex; flex-direction: column; min-width: 0; }
.th-list .th-sorts { margin-bottom: var(--s2); }
.th-railed .th-ask { display: none; }
.th-railed .th-row { grid-template-columns: 76px minmax(0, 1fr) clamp(150px, 18vw, 216px); padding: var(--s4); }
.th-railed .th-title { font-size: var(--t4); font-weight: 500; line-height: 22px; }
.th-railed .th-title::after { content: ""; position: absolute; inset: 0; }
.th-railed .th-title:focus-visible { outline-offset: -2px; }
.th-railed .th-sum { font-size: var(--t3); }
.th-railed .th-meta { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: var(--s1) var(--s2); }
.th-railed .th-meta > span:last-child { min-width: 44px; text-align: right; }
.th-railed .th-chips:empty { display: none; }
.th-railed .th-chips .chip { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.th-railed .th-empty { padding: var(--s7) var(--s4); }
@media (min-width: 1000px) {
  .th-railed { grid-template-columns: var(--w-nav) minmax(0, 1fr); column-gap: var(--s7); align-items: start; }
  .th-railed .th-list { padding-top: 0; }
}
@media (max-width: 999px) {
  .th-rail > * { order: 5; }
  .th-rail > .h-page, .th-rail > .lead { order: 0; }
  .th-rail > .th-alt { order: 1; align-self: flex-start; }
  .th-rail > .th-ask { order: 2; }
  .th-rail > .th-tabs { order: 3; }
  .th-rail > .th-areas { order: 4; }
  .th-rail { gap: var(--s3); }
  .th-railed .th-tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); gap: var(--s2); }
  .th-railed .th-tabs a { height: 44px; flex: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 0 var(--s2); justify-content: flex-start; }
  .th-railed .th-tabs a[aria-current="true"] { background: none; border-bottom-color: var(--accent-text); }
  .th-railed .th-areas { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; flex-wrap: nowrap; gap: var(--s2); }
  .th-railed .th-areas > .label { flex-basis: auto; margin: 0; }
  .th-railed .th-scroll { display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; }
  .th-railed .th-scroll .pill { flex: none; }
  .th-railed .th-sorts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .th-railed .th-sorts a { flex: none; }
  .th-railed .th-more { position: static; }
  .th-railed .th-menu { left: auto; right: 0; }
}
@media (max-width: 720px) {
  .th-railed { padding-block: var(--s4) var(--s8); gap: var(--s2); }
  .th-rail { gap: var(--s2); }
  .th-list .th-sorts { margin-bottom: 0; }
  .th-railed .th-hint { margin-bottom: var(--s2); }
  .th-rail .lead { font-size: var(--t4); }
  .th-railed .th-ask { display: flex; width: 100%; margin: 0; }
  .th-railed .th-sorts a, .th-railed .th-tabs a, .th-alt { min-height: 44px; }
  .th-railed .th-sorts a { border: 4px solid transparent; background-clip: padding-box; }
  .th-railed .th-row { grid-template-columns: minmax(0, 1fr); padding: var(--s3); }
  .th-railed .th-meta { justify-content: flex-start; }
  .th-railed .th-meta > span:last-child { text-align: left; }
  .th-more-wrap .btn { min-height: 44px; display: inline-flex; align-items: center; }
}

/* ---------- subject (pages.ts subjectView_, B_SUBJECT_LIST) ---------- */
.sb-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s5); }
.sb-meta { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); }
.sb-meta > div { display: flex; align-items: baseline; gap: var(--s2); }
.sb-meta b { font: 600 var(--t7)/1 var(--mono); letter-spacing: -.02em; }
.sb-incl { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); padding-left: var(--s5); border-left: 1px solid var(--line2); }
.sb-layout.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
.sb-side { display: flex; flex-direction: column; gap: var(--s5); min-width: 0; }
.pk-card { overflow: hidden; }
.pk-inv { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: var(--s3) var(--s4); background: var(--surface2); border-bottom: 1px solid var(--line); }
.pk-inv .invite-title { font-size: var(--t3); }
.pk-inv .av-you { display: inline-flex; align-items: center; min-height: 22px; padding: 0 var(--s2); border-radius: var(--pill); font: 400 var(--t1) var(--mono); }
.pk-inv .ev { background: var(--surface); }
.pk-inv-n { margin-left: auto; font-size: var(--t2); }
.pk { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1px; column-rule: 1px solid var(--line); }
.pk li { position: relative; break-inside: avoid; display: flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s4); border-top: 1px solid var(--line); }
.pk li:hover { background: var(--hover); }
.pk a { flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: center; min-height: 44px; padding-block: var(--s1); font-size: var(--t3); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.pk a::after { content: ""; position: absolute; inset: 0; }
.pk a:focus-visible { outline-offset: -2px; }
.pk .kind { flex: none; font: 400 var(--t1) var(--mono); color: var(--hint); }
.sb-tl .pg-label { font-size: var(--t3); }
.sb-tl .tl-title { font-size: var(--t3); text-decoration: none; }
.sb-tl a.tl-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.sb-tl .tl-dot { width: 7px; height: 7px; left: -4px; }
.sb-tl .timeline li:last-child { padding-bottom: 0; }
.agent-note { overflow-wrap: anywhere; }
@media (min-width: 1000px) {
  .sb-layout.layout-2 { grid-template-columns: minmax(0, var(--w-read)) var(--w-aside); justify-content: space-between; column-gap: var(--s6); align-items: start; }
}
@media (max-width: 720px) {
  .pk { columns: 1; }
  .sb-incl { padding-left: 0; border-left: 0; flex-basis: 100%; }
  .sb-incl .label { flex-basis: 100%; }
  .crumbs a, .sb-tl .tl-title { display: inline-flex; align-items: center; min-height: 44px; }
  .sb-tl .tl-title { align-items: flex-start; }
  .crumbs { align-items: center; }
  /* The package table scrolls sideways on phones (its rebuild is a separate job): the right edge fades as the hint */
}
/* The package table on phones (J-450 P8, board-b): each package is a row card; nothing scrolls sideways. 721 and up unchanged. */
@media (max-width: 720px) {
  .sb-layout .card.scroll-x:has(> .board) { overflow: visible; }
  .sb-layout .board.mw680 { min-width: 0; }
  /* Hidden from sight only: the headers stay in the accessibility tree, so every cell keeps its column name (J-459 N1) */
  .sb-layout .board thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .sb-layout .board tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "p l" "e e" "c c"; gap: 12px; padding: 16px; }
  .sb-layout .board tbody tr + tr { border-top: 1px solid var(--line); }
  .sb-layout .board td { display: block; padding: 0; border: 0; }
  .sb-layout .board td[data-label="Package"] { grid-area: p; }
  .sb-layout .board td[data-label="Level"] { grid-area: l; }
  .sb-layout .board td[data-label="Evidence"] { grid-area: e; }
  .sb-layout .board td[data-label="Confirmed"] { grid-area: c; display: flex; gap: 8px; align-items: baseline; padding-top: 12px; border-top: 1px solid var(--line); }
  .sb-layout .board td[data-label="Confirmed"]::before { content: attr(data-label); font: 500 12px var(--sans); color: var(--hint); }
}

/* ---------- subjects (pages.ts subjectsView) ---------- */
.pg-head .h-page.sj-title { font-size: var(--t9); letter-spacing: var(--track-hero); }
.sj-toc { display: flex; flex-wrap: wrap; gap: var(--s2); }
.sj-toc a { display: inline-flex; align-items: center; gap: var(--s2); min-height: 36px; padding: 0 var(--s3); border: 1px solid var(--line2); border-radius: var(--r2); background: var(--surface); font-size: var(--t2); font-weight: 500; text-decoration: none; }
.sj-toc a:hover { border-color: var(--ctl); }
.sj-toc small, .sj-sec h2 small { font: 400 var(--t1) var(--mono); color: var(--hint); }
.sj-main.section { gap: var(--s8); }
.sj-sec.pg-sec { display: grid; grid-template-columns: 204px minmax(0, 1fr); gap: var(--s4); align-items: start; scroll-margin-top: var(--s4); }
.sj-sec h2 { position: sticky; top: 4px; align-self: start; display: block; scroll-margin-top: var(--s4); }
.sj-sec h2 small { margin-left: var(--s1); white-space: nowrap; }
.sj-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--s4); }
.sj-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name count" "desc desc"; gap: var(--s1) var(--s2); align-content: start; padding: var(--s3); border-top: 1px solid var(--line); text-decoration: none; transition: background var(--d1); }
.sj-row:hover, .sj-row:active { background: var(--surface); color: var(--ink); }
.sj-row:focus-visible { outline-offset: -2px; }
.sj-row .lc-title { grid-area: name; font-size: var(--t3); font-weight: 600; overflow-wrap: anywhere; }
.sj-row .lc-sub { grid-area: count; font-size: var(--t1); white-space: nowrap; }
.sj-row .oc-desc { grid-area: desc; font-size: var(--t2); line-height: 1.45; }
@media (max-width: 999px) {
  .sj-sec.pg-sec { grid-template-columns: 160px minmax(0, 1fr); }
  .sj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .pg-head .h-page.sj-title { font-size: clamp(30px, 9.2vw, 36px); }
  .sj-toc a { min-height: 44px; }
  .sj-main.section { gap: var(--s6); }
  .sj-sec.pg-sec { display: block; }
  .sj-sec.pg-sec > h2.h-sub { display: flex; align-items: baseline; top: 0; z-index: 2; font-size: var(--t4); justify-content: space-between; margin: 0 -16px; padding: var(--s3) var(--s4); background: var(--surface2); border-bottom: 1px solid var(--line); }
  .sj-grid { grid-template-columns: minmax(0, 1fr); }
  .sj-row .lc-title { font-size: var(--t4); }
  .sj-row .oc-desc { font-size: var(--t3); }
  .sj-row { padding-inline: 0; }
  .sj-sec .sj-grid .sj-row:first-child { border-top: 0; }
}

/* ---------- community (pages.ts communityPage, B_COMMUNITY_DOORS) ---------- */
.cm-main { gap: var(--s5); }
.cm-intro { display: flex; flex-direction: column; gap: var(--s2); }
.cm-intro h2 { font-size: var(--t6); }
.cm-intro p { font-size: var(--t3); line-height: var(--lh3); color: var(--soft); max-width: 60ch; }
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.door { display: grid; grid-template-rows: subgrid; grid-row: span 5; gap: var(--s3); padding: var(--s5); min-width: 0; }
@supports not (grid-template-rows: subgrid) { .door { display: flex; flex-direction: column; } .door .agent-line { margin-top: auto; } }
.door:first-child { border-color: var(--line2); }
.door h3 { font-size: var(--t5); }
.door p { font-size: var(--t3); line-height: var(--lh3); }
.door p.soft { font-size: var(--t2); line-height: var(--lh2); }
.door .agent-line { border-top: 1px solid var(--line); padding-top: var(--s5); }
.door .agent-line-box code { background: var(--bg); }
.cm-main .empty-state { gap: var(--s2); }
.cm-main .empty-state .agent-line { margin-top: var(--s4); }
@media (max-width: 720px) {
  .doors { grid-template-columns: minmax(0, 1fr); }
  .door { grid-template-rows: none; grid-row: auto; display: flex; flex-direction: column; padding: var(--s5) var(--s4); }
  .cm-main .empty-state { padding: 28px var(--s4); }
  .cm-sorts { gap: 0; }
  .pg-acts { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .pg-acts .btn { min-height: 44px; }
  /* Subject head (review2 D2 5): one button takes the row; next to "Website" the copy button gets the rest so its label stays on one line */
  .pg-acts > .btn:only-child { grid-column: 1 / -1; }
  .pg-acts:has(> [data-copy] + a.btn) { grid-template-columns: minmax(0, 1fr) auto; }
  .feed-row > .vote-spacer { display: none; }
  .feed-row:has(> .vote-spacer) { grid-template-columns: minmax(0, 1fr); }
}
.post-crumb { align-items: center; flex-wrap: wrap; }
/* Community feed (J-450 P4): on wide rows the chip sits at the right edge; the empty vote column stays so titles align */
@media (min-width: 900px) { .feed-ev { justify-content: flex-end; } }

/* ---------- question post (views/post.ts; J-450 P7, post-a): the shared 720 + 320 grid, 36 px title, thread-style crumb ---------- */
@media (min-width: 1000px) {
  .layout-2.post-layout { display: grid; grid-template-columns: minmax(0, var(--w-read)) var(--w-aside); justify-content: space-between; column-gap: var(--s6); align-items: start; padding-block: var(--s5) var(--s9); }
}
.post-title { font-size: var(--t8); line-height: var(--lh1); letter-spacing: -.03em; }
.post-crumb { font: 400 var(--t2) var(--sans); letter-spacing: 0; text-transform: none; color: var(--hint); }
.post-crumb a { color: var(--hint); text-decoration: none; }
.post-layout .post-body .prose { max-width: var(--w-prose); }
.post-aside .post-card { border-radius: var(--r3); padding: var(--s4); }
@media (max-width: 720px) { .post-title { font-size: var(--t7); } }

/* ---------- connect (views/static.ts connectView, B_CONNECT_PICKER) ---------- */
.connect-page { max-width: none; }
.connect-page > .pg-title { max-width: var(--w-read); }
.cn-apps { display: flex; flex-wrap: wrap; gap: var(--s2); }
.cn-apps label { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--s3); border: 1px solid var(--ctl); border-radius: var(--pill); background: var(--surface); color: var(--soft); font-size: var(--t2); font-weight: 500; cursor: pointer; }
.cn-apps label:hover { color: var(--ink); }
.cn-apps input:checked + label { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.cn-apps input:focus-visible + label { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.cn-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
.cn-panels { display: flex; flex-direction: column; gap: var(--s7); min-width: 0; }
.cn-app { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.cn-app > .cn-sub { font-size: var(--t5); letter-spacing: var(--track); margin-bottom: var(--s2); }
.cn-app > .soft { font-size: var(--t3); line-height: var(--lh3); }
.cn-app > .cmd-row + .soft { margin-top: var(--s2); }
@supports selector(:has(a)) {
  .cn-app { display: none; }
  .connect-page:has(#a0:checked) #p0, .connect-page:has(#a1:checked) #p1, .connect-page:has(#a2:checked) #p2, .connect-page:has(#a3:checked) #p3, .connect-page:has(#a4:checked) #p4, .connect-page:has(#a5:checked) #p5, .connect-page:has(#a6:checked) #p6, .connect-page:has(#a7:checked) #p7, .connect-page:has(#a8:checked) #p8, .connect-page:has(#a9:checked) #p9, .connect-page:has(#a10:checked) #p10, .connect-page:has(#a11:checked) #p11 { display: flex; }
}
.cn-tip { align-self: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); padding: 20px; }
.cn-tip .cn-tip-p { font-size: var(--t2); line-height: var(--lh3); }
.cn-tip strong { display: block; font-size: var(--t4); font-weight: 600; color: var(--ink); margin-bottom: var(--s2); }
.cn-tip .mono { display: inline-block; margin-top: var(--s2); padding-left: var(--s3); border-left: 2px solid var(--line2); font-size: var(--t2); color: var(--ink); }
.cn-tip br { display: none; }
.cn-body .soft code, .cn-app > .soft code { white-space: nowrap; }
.cn-steps { gap: var(--s6); }
.cn-steps > li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s4); }
.cn-body .label { font-size: var(--t2); color: var(--soft); margin-top: var(--s2); }
.connect-page .cmd-row { align-items: flex-start; }
.connect-page .codeblock { min-height: 44px; padding: 10px var(--s4); line-height: 22px; }
.connect-page .tok { display: inline-block; max-width: 100%; font-weight: inherit; }
.url-box .url-text { font-size: var(--t2); overflow-wrap: anywhere; min-width: 0; flex: 1; }
.url-box { align-items: center; }
.url-box .copy, .url-box .copy.light { align-self: stretch; width: 44px; height: auto; min-height: 44px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: none; }
@media (min-width: 721px) { .cn-body > .soft { padding-right: 52px; } }
@media (min-width: 1000px) {
  .cn-cols { grid-template-columns: minmax(0, var(--w-read)) var(--w-aside); justify-content: space-between; column-gap: var(--s6); }
}
@media (max-width: 720px) {
  .cn-apps label { min-height: 44px; }
  .cn-steps > li { gap: var(--s2) var(--s3); }
  .cn-body { display: contents; }
  .cn-body > :not(.cn-h) { grid-column: 1 / -1; }
  .compare.mw520 { min-width: 0; }
  .connect-page ~ * .compare th, .connect-page ~ * .compare td, .pg-wide .compare th, .pg-wide .compare td { padding: 12px 10px; }
}

/* ---------------------------------------------------------------- static: document shell (methodology, privacy, terms, support) */
.doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); padding-block: var(--s5) 64px; }
.doc-main { min-width: 0; }
.doc .prose { max-width: var(--w-prose); font-size: 16px; line-height: 1.6; }
.doc .prose > * { max-width: var(--w-prose); }
.doc-rail { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.doc-toc > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 var(--s3); border: 1px solid var(--ctl); border-radius: var(--r2); background: var(--surface); font: 500 var(--t2) var(--mono); color: var(--ink); cursor: pointer; }
.doc-toc > summary::-webkit-details-marker { display: none; }
.doc-toc > summary::after { content: "▾"; font-size: 11px; }
.doc-toc[open] > summary::after { content: "▴"; }
.doc-toc[open] > summary { margin-bottom: var(--s2); }
.doc .toc { display: flex; flex-direction: column; gap: 0; }
.doc .toc a { font: 400 13px/1.4 var(--mono); color: var(--soft); padding: 6px 12px; border-left: 2px solid var(--line); text-decoration: none; }
.doc .toc a:hover { color: var(--ink); border-left-color: var(--ink); }
.doc-cta { display: none; }
.doc section[id], .doc h2[id] { scroll-margin-top: 24px; }
.doc .sec-n { display: inline-block; padding: 0 6px; border-radius: var(--r1); }
.doc section:target .sec-n { background: var(--accent); color: var(--on-accent); }
.doc .plain-list.lede { line-height: 1.5; }
.doc-method .pg-grid.flow { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s5); }
.doc-method .flow > li { position: relative; }
.doc-method .flow > li + li::before { content: "→"; position: absolute; left: calc(var(--s5) / -2); top: 50%; translate: -50% -50%; color: var(--hint); font-size: 12px; }
.doc-method #rates { flex-direction: column; align-items: stretch; }
.doc-method #rates > * { flex: none; }
.doc-method #founding { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.doc-method #abuse .pg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.doc-method .pg-sec > p, .doc-method .pg-sec > ul, .doc-method .pg-col > p, .doc-method .pg-col > ul { max-width: var(--w-prose); }
@media (min-width: 720px) { .doc-method .compare.mw640 thead th:nth-last-child(-n+2), .doc-method .compare.mw640 td:last-child { white-space: nowrap; } }
@media (max-width: 999px) {
  .doc-rail { order: -1; }
  .doc .toc a { min-height: 44px; display: flex; align-items: center; }
  .doc-method .pg-grid.flow { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .doc-method .flow > li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); align-items: baseline; }
  .doc-method .flow > li + li::before { display: none; }
}
@media (min-width: 1000px) {
  .doc:not(.no-rail) { grid-template-columns: minmax(0, 1fr) var(--w-nav); column-gap: 48px; }
  .doc-cta { display: inline-flex; justify-content: center; }
  .doc-toc > summary { pointer-events: none; border: 0; background: none; padding: 0 12px; min-height: 0; color: var(--hint); font-size: var(--t1); }
  .doc-toc > summary::after { content: none; }
  @supports selector(::details-content) {
    .doc-toc::details-content { content-visibility: visible; display: block; }
  }
}
@media (max-width: 719px) {
  .doc-method #founding, .doc-method #abuse .pg-grid { grid-template-columns: minmax(0, 1fr); }
  .doc-method .card.scroll-x { overflow: visible; }
  .doc-method .compare.mw640 { min-width: 0; }
  .doc-method .compare thead { display: none; }
  .doc-method .compare tbody tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: var(--s3); border-bottom: 1px solid var(--line); }
  .doc-method .compare tbody tr:last-child { border-bottom: 0; }
  .doc-method .compare tbody th, .doc-method .compare tbody td { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: var(--s2); padding: 0; border: 0; }
  .doc-method .compare tbody th { grid-template-columns: minmax(0, 1fr); padding-bottom: 4px; }
  .doc-method .compare td::before { content: attr(data-label); color: var(--hint); font: 400 var(--t1) var(--sans); }
}

/* ---------------------------------------------------------------- 404 */
.nf { display: flex; flex-direction: column; justify-content: center; }
.wrap.nf-in { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: var(--s4); width: 100%; max-width: calc(720px + var(--s5) * 2); padding-block: var(--s6); }
.nf-h { margin: 0; display: flex; flex-direction: column; gap: var(--s1); }
.nf-at { font-size: 20px; font-weight: 500; color: var(--soft); }
.nf-h .nf-path { display: block; font-size: clamp(26px, 4.4vw, 44px); line-height: 1.25; font-weight: 600; letter-spacing: 0; color: var(--ink); background: none; border: 0; padding: 0; border-radius: 0; overflow-wrap: anywhere; }
.nf-h .nf-path.sm { font-size: clamp(20px, 3vw, 28px); }
.nf-path mark { color: inherit; background: linear-gradient(transparent 60%, var(--mark) 60% 94%, transparent 94%); }
.nf-path i { font-style: normal; font-weight: 400; color: var(--hint); }
.nf .lead { text-wrap: balance; }
.nf-form { max-width: none; }
.askbox.lg { min-height: 56px; }
.askbox.lg input { font-size: 16px; }
.askbox.lg button { min-height: 44px; }
.nf-dym { margin-top: var(--s2); }
.nf-ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); margin-top: var(--s2); }
.agent-line.dark { background: var(--term); border: 1px solid var(--term-line); border-radius: var(--r3); padding: var(--s4); }
.agent-line.dark .label { color: var(--term-soft); }
.agent-line.dark .agent-line-box code { background: transparent; border-color: var(--term-line); color: var(--term-ink); }
@media (max-width: 719px) {
  .nf { justify-content: flex-start; }
  .wrap.nf-in { padding-block: var(--s5); gap: var(--s3); }
  .nf-ways { grid-template-columns: minmax(0, 1fr); }
  .nf-ways .side-card a { min-height: 44px; display: flex; align-items: center; font-size: 16px; }
}

/* ---------------------------------------------------------------- polish round (J-450; docs/design/2026-11-25-polish/spec-polish.md) */
/* P1 pager: the current page is lime like a selected pill; the missing direction is dashed, quiet and unfilled */
.pager span[aria-current="page"] { background: var(--accent); border-color: var(--accent-edge); color: var(--on-accent); font-weight: 600; }
.pager span[aria-disabled="true"] { background: none; border: 1px dashed var(--line2); color: var(--hint); cursor: default; }
@media (max-width: 720px) { .pager a, .pager span[aria-current], .pager span[aria-disabled] { min-width: 44px; min-height: 44px; } }

/* P2 report rows: the chip is as wide as its label; on phones chip, badge and date share the first line */
@media (min-width: 760px) {
  .report-rows > li > .outcome { justify-self: start; }
  /* A "Couldn't try" row has no evidence badge: its date keeps the date column (J-459 N3) */
  .report-rows > li > .when { grid-column: 5; }
}
@media (max-width: 759px) {
  .report-rows > li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 6px 8px; }
  .report-rows > li > .outcome { grid-area: 1 / 1; justify-self: start; }
  .report-rows > li > .ev { grid-area: 1 / 2; }
  .report-rows .when { grid-area: 1 / 4; margin-left: 0; }
  .report-rows .who { grid-area: 2 / 1 / 3 / -1; }
  .report-rows > li > .m { grid-area: 3 / 1 / 4 / -1; }
}

/* P5 report filters: one strip that scrolls and fades on phones (the fade is in the tab-bar rule above) */
.rp-head { justify-content: space-between; align-items: baseline; }
.rp-filters { gap: 6px; font-size: 13px; }
@media (max-width: 720px) {
  .rp-head { flex-direction: column; align-items: stretch; gap: var(--s2); }
  .rp-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .rp-filters .pill { flex: none; }
}

/* P12 body text (thread and post): a long URL without a link or any unbroken string wraps inside the line instead of
   widening the page; code blocks and tables keep their own sideways scroll */
.prose { overflow-wrap: anywhere; }
.prose pre, .prose pre code, .prose table { overflow-wrap: normal; }

/* P9 setups matrix (matrix-a): smaller on phones; fits two packages, three and more scroll with the code-block edge shadow */
.tp-main .heat { min-width: calc(180px + var(--cols, 1) * 130px); }
@media (max-width: 720px) {
  .tp-main .heat { min-width: calc(104px + var(--cols, 1) * 104px); table-layout: fixed; }
  .tp-main .heat thead th:first-child { width: 104px; }
  .tp-main .heat th[scope="row"] { white-space: normal; overflow-wrap: anywhere; padding: 0 4px; line-height: 1.35; }
  .tp-main .heat td { min-width: 0; padding: 8px 10px; }
  .tp-main .scroll-x:has(> .heat) {
    background:
      linear-gradient(90deg, rgba(0,0,0,0), var(--bg) 60%) right center / 32px 100% no-repeat local,
      radial-gradient(farthest-side at 100% 50%, var(--rail-shadow), rgba(0,0,0,0)) right center / 14px 100% no-repeat scroll,
      var(--bg);
  }
}
