/* AI Papers Daily
   Design plan: a research terminal, not a blog.
   - Full width with small gutters. Pages read like a dashboard you check every morning.
   - Geist Pixel for headlines, numbers and labels; Geist for reading; Geist Mono for arXiv IDs.
   - Warm paper grey and near-black ink. International orange marks what matters most
     (top pick, today, progress); highlighter yellow marks what the reader chose (highlights, notes).
   - Topic colours appear only as small dots, mini charts and bars. Colour means "which topic". */

@font-face { font-family: "Geist"; src: url(fonts/geist.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(fonts/geist-mono.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Geist Pixel"; src: url(fonts/geist-pixel-square.woff2) format("woff2"); font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --bg: #f2f0eb; --surface: #ffffff; --ink: #0e0e10; --muted: #5d5c63; --line: #dcd9d1; --line-2: #e8e5de;
  --accent: #ff4f00; --accent-ink: #c43c00; --accent-wash: #ffe9de; --on-accent: #ffffff;
  --s1: #ff4f00; --s2: #2a78d6; --s3: #eda100; --s4: #1baf7a; --s5: #6250d6; --s-rest: #d9d6ce;
  --cal-0: #ebe8e1; --cal-1: #ffe1cf; --cal-2: #ffb48c; --cal-3: #ff8549; --cal-4: #ff5a14; --cal-5: #b83500;
  --yellow: #ffd23f; --yellow-wash: #fff1b8; --blue: #2643ff; --good: #13995a; --bad: #d6402b;
  --ticker-bg: #0e0e10; --ticker-ink: #ff6a1f;
  --pixel: "Geist Pixel", "Geist Mono", ui-monospace, monospace;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 2.6vw, 40px); --r: 14px; --r-sm: 9px;
  --shadow: 0 1px 0 rgb(0 0 0 / .03), 0 8px 24px -12px rgb(0 0 0 / .12);
  --reader-scale: 1;
  --t-llms: #006ac0;
  --t-generative-ai: #7f4bb1;
  --t-computer-vision: #007ca1;
  --t-audio-speech: #008345;
  --t-alignment: #ac366a;
  --t-reasoning-agents: #467a00;
  --t-ml-theory: #795033;
  --t-ai-science: #7b6a00;
  --t-code-ai: #008478;
  --t-safety-privacy: #993f94;
  --t-efficient-ai: #9c5600;
  --t-multimodal: #575ac2;
  --t-other-ml: #596571;
}
:root[data-theme="dark"] {
  --bg: #0b0b0c; --surface: #141416; --ink: #f2f0ea; --muted: #9b99a1; --line: #29292e; --line-2: #1f1f23;
  --accent: #ff5a1f; --accent-ink: #ff7a45; --accent-wash: #2a160d; --on-accent: #0b0b0c;
  --s1: #d95926; --s2: #3987e5; --s3: #c98500; --s4: #199e70; --s5: #9085e9; --s-rest: #3a3a3f;
  --cal-0: #1f1f23; --cal-1: #3a2015; --cal-2: #6b2d12; --cal-3: #a63c0f; --cal-4: #e3540f; --cal-5: #ff9a63;
  --yellow: #ffd23f; --yellow-wash: #4a3d0c; --blue: #7d8cff; --good: #4ade80; --bad: #ff7a6a;
  --ticker-bg: #ff4f00; --ticker-ink: #0b0b0c; --shadow: 0 1px 0 rgb(255 255 255 / .03);
  --t-llms: #86c3ff;
  --t-generative-ai: #ceacf7;
  --t-computer-vision: #5cd0ea;
  --t-audio-speech: #7bd4a4;
  --t-alignment: #f7a0bf;
  --t-reasoning-agents: #a5cd81;
  --t-ml-theory: #ddb499;
  --t-ai-science: #cbc16a;
  --t-code-ai: #5bd5c9;
  --t-safety-privacy: #e6a4e0;
  --t-efficient-ai: #e7b369;
  --t-multimodal: #adb7ff;
  --t-other-ml: #acb9c7;
}
.t-llms { --c: var(--t-llms); }
.t-generative-ai { --c: var(--t-generative-ai); }
.t-computer-vision { --c: var(--t-computer-vision); }
.t-audio-speech { --c: var(--t-audio-speech); }
.t-alignment { --c: var(--t-alignment); }
.t-reasoning-agents { --c: var(--t-reasoning-agents); }
.t-ml-theory { --c: var(--t-ml-theory); }
.t-ai-science { --c: var(--t-ai-science); }
.t-code-ai { --c: var(--t-code-ai); }
.t-safety-privacy { --c: var(--t-safety-privacy); }
.t-efficient-ai { --c: var(--t-efficient-ai); }
.t-multimodal { --c: var(--t-multimodal); }
.t-other-ml { --c: var(--t-other-ml); }

/* ---------- Base ---------- */
*, *::before, *::after { 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 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--yellow); color: #111; }
.wrap { width: 100%; max-width: 1680px; margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; }
.mono { font-family: var(--mono); }
.label { display: block; font: 400 11px/1.2 var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dot { display: inline-block; flex: none; width: 7px; height: 7px; background: var(--c, var(--muted)); margin-right: 6px; }
.sep { display: inline-block; width: 3px; height: 3px; background: var(--muted); opacity: .5; margin: 0 8px; vertical-align: 3px; }
.meta-text { font-size: 13px; color: var(--muted); }

/* ---------- Ticker and header ---------- */
.ticker { background: var(--ticker-bg); color: var(--ticker-ink); font: 400 12px/1 var(--pixel); letter-spacing: .08em; text-transform: uppercase; }
.ticker-in { display: flex; gap: 32px; height: 30px; align-items: center; overflow: hidden; white-space: nowrap; }
.ticker-next { margin-left: auto; }
.ticker-next::after { content: " ▮"; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .15; } }
.site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { width: 22px; height: 22px; border-radius: 3px; background: conic-gradient(from 90deg, var(--accent) 0 25%, var(--ink) 0 50%, var(--accent) 0 75%, var(--ink) 0); }
.brand-name { font: 400 17px/1 var(--pixel); letter-spacing: .02em; white-space: nowrap; }
.brand-name em { font-style: normal; color: var(--accent); }
.nav { display: flex; gap: 2px; }
.nav a { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.nav-ic { flex: none; }
.nav a:hover { color: var(--ink); background: var(--line-2); }
.nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-wash); }
.nav-short { display: none; }
.nav-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 4px; background: var(--accent); color: var(--on-accent); font: 400 11px var(--pixel); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.cmdk { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 12px; width: min(400px, 30vw);
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 14px; }
.cmdk:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.cmdk kbd { margin-left: auto; font: 12px var(--mono); padding: 2px 7px; border: 1px solid var(--line); border-radius: 6px; }
.streak { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: 400 16px var(--pixel); }
.streak::before { content: "▲"; font-size: 11px; color: var(--accent); }
.icon-button { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-button:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.icon-sun { display: none; } :root[data-theme="dark"] .icon-sun { display: block; } :root[data-theme="dark"] .icon-moon { display: none; }
[data-tip] { position: relative; }
[data-tip]::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; padding: 4px 8px; border-radius: 6px;
  background: var(--ink); color: var(--bg); font: 500 12px/1.4 var(--sans); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; }

/* ---------- Buttons and fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border: 0; border-radius: var(--r-sm);
  font: 600 14px var(--sans); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--on-accent); }
.btn-outline { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-outline:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn-sm { height: 36px; padding: 0 12px; font-size: 13px; }
.btn[aria-pressed="true"] { background: var(--yellow); color: #111; box-shadow: none; }
.input, .select { height: 44px; width: 100%; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 15px; }
.input:focus, .select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b6b74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m7 15 5 5 5-5M7 9l5-5 5 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.select:disabled { opacity: .5; cursor: not-allowed; }
.input-wrap { position: relative; display: block; }
.input-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-wrap .input { padding-left: 38px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 14px; cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--accent); margin: 0; }
.toggle:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); color: var(--accent-ink); }

/* ---------- Cards and section heads ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: 20px; }
.block { padding: 24px 0; min-width: 0; }
.block-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 16px; padding-top: 14px; border-top: 1px solid var(--ink); }
.block-head h2 { margin: 0; font: 400 22px/1.1 var(--pixel); letter-spacing: .01em; }
.block-head .sub { font-size: 14px; color: var(--muted); }
.more { margin-left: auto; font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--accent); }
.page-head { padding: 40px 0 16px; }
.page-head h1 { margin: 0; font: 400 clamp(40px, 5.5vw, 80px)/.95 var(--pixel); letter-spacing: -.02em; }
.page-head p { margin: 16px 0 0; max-width: 64ch; font-size: 17px; color: var(--muted); }
.crumbs { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; font-size: 14px; font-weight: 500; color: var(--muted); }
.crumbs:hover { color: var(--ink); }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); gap: var(--gutter); align-items: end; padding: 36px 0 20px; }
.hero h1 { margin: 0; font: 400 clamp(40px, 5.6vw, 88px)/.92 var(--pixel); letter-spacing: -.02em; }
.lead { margin: 20px 0 0; max-width: 54ch; font-size: 18px; color: var(--muted); }
.daily { display: flex; gap: 20px; align-items: center; padding: 20px; }
.ring { --p: 0; flex: none; position: relative; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line-2) 0); transition: --p .6s; }
.ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface); }
.ring-n { position: relative; font: 400 24px var(--pixel); }
.daily-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 14px; color: var(--muted); }
.daily-copy strong { font-size: 20px; line-height: 1.2; color: var(--ink); font-weight: 600; letter-spacing: -.01em; }
.week { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.week i { width: 14px; height: 14px; background: var(--line-2); border: 1px solid var(--line); }
.week i.on { background: var(--accent); border-color: var(--accent); }
.week i.today { border-color: var(--accent); border-style: dashed; }
.week em { font-style: normal; margin-left: 8px; font-size: 13px; color: var(--ink); font-weight: 500; }
.picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
.pick { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 24px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.pick:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -20px rgb(0 0 0 / .25); }
.pick.is-first { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pick-top { display: flex; justify-content: space-between; gap: 12px; font: 400 13px/1 var(--pixel); letter-spacing: .06em; text-transform: uppercase; }
.pick-n { color: var(--accent-ink); }
.pick.is-first .pick-n { color: var(--accent); }
.pick-read { color: var(--good); }
.pick-top { align-items: center; }
.pick-why { margin-right: auto; font: 400 13px/1.2 var(--sans); letter-spacing: 0; text-transform: none; color: var(--muted); }
.pick.is-first .pick-why { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.pick[data-slot="trending"] .pick-n { padding: 4px 7px; border-radius: 4px; background: var(--yellow); color: #111; }
.pick h3 { margin: 0; font: 600 clamp(21px, 1.9vw, 29px)/1.15 var(--sans); letter-spacing: -.025em; text-wrap: balance; }
.pick h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }
.pick-blurb { margin: 0; font-size: 16px; line-height: 1.55; max-width: 62ch; }
.pick-blurb b { display: block; margin-bottom: 4px; font: 400 11px/1 var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.pick.is-first .pick-blurb { color: color-mix(in srgb, var(--bg) 88%, transparent); }
.pick.is-first .pick-blurb b { color: var(--accent); }
.pick-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 4px; font-size: 13px; color: var(--muted); position: relative; z-index: 1; }
.pick.is-first .pick-foot { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.pick-foot .mins { margin-left: auto; }
/* "Seen this paper before today?" sits above the card-wide link so its buttons stay clickable */
.seen { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }
.seen span { margin-right: auto; }
.seen .btn { height: 32px; }
.seen .btn:disabled { cursor: default; opacity: 1; }
.seen .btn:disabled:not([aria-pressed="true"]) { opacity: .45; }
.topic { display: inline-flex; align-items: center; font-weight: 500; }
.mins { font: 400 13px var(--pixel); }
.has-code { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); }
.level { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.level-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.level-bars i { display: block; width: 4px; background: var(--line); }
.level-bars i:nth-child(1) { height: 6px; } .level-bars i:nth-child(2) { height: 9px; } .level-bars i:nth-child(3) { height: 12px; }
.level-bars i.on { background: var(--accent); }
.pick.is-first .level-bars i:not(.on) { background: #3a3a40; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); gap: var(--gutter); }
.side { display: flex; flex-direction: column; }

/* Lists: the home table and every list of papers */
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.row { position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "date title badges" "date authors badges"; column-gap: 16px; row-gap: 2px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.row:last-child { border-bottom: 0; }
.row:hover { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.row-n, .row-date { grid-area: date; align-self: start; padding-top: 3px; font: 400 13px var(--pixel); color: var(--muted); }
.row-title { grid-area: title; font-weight: 500; line-height: 1.35; }
.row-title a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.row-authors { grid-area: authors; display: flex; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.row .badges { grid-area: badges; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 300px; }
.row.is-read .row-title a { color: var(--muted); }
.row.is-read .row-title::after { content: "Read"; margin-left: 8px; font: 400 11px var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--good); }
.list-home .row { grid-template-columns: 32px minmax(0, 1fr) 36px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--c, var(--muted)) 35%, transparent); background: color-mix(in srgb, var(--c, var(--muted)) 9%, transparent); color: var(--c, var(--muted)); }
.badge.topic::before { content: ""; width: 6px; height: 6px; background: var(--c); }
.badge-pick { --c: var(--accent-ink); }
.badge-hot { --c: #8a6a00; background: var(--yellow-wash); border-color: var(--yellow); }
:root[data-theme="dark"] .badge-hot { --c: var(--yellow); }
.quick-save { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 400 18px/1 var(--pixel); cursor: pointer; opacity: 0; transition: opacity .15s; }
.row:hover .quick-save, .quick-save:focus-visible, .quick-save[aria-pressed="true"] { opacity: 1; }
.quick-save[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: #111; }
@media (hover: none) { .quick-save { opacity: 1; } }
.skeleton { height: 72px; }
.skeleton span { display: block; height: 12px; border-radius: 3px; background: var(--line-2); grid-column: 2; }
.skeleton span:first-child { width: 60%; } .skeleton span + span { width: 30%; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 17px; }
.empty .btn { margin-top: 16px; }
.center { display: flex; justify-content: center; padding: 24px 0; }

/* Topic pulse */
.pulse { list-style: none; margin: 0; padding: 0; }
.pulse li { border-bottom: 1px solid var(--line-2); }
.pulse li:last-child { border: 0; }
.pulse a { display: grid; grid-template-columns: minmax(0, 1fr) 84px 44px 64px; gap: 12px; align-items: center; padding: 10px 0; font-size: 14px; }
.pulse li:first-child a { padding-top: 0; } .pulse li:last-child a { padding-bottom: 0; }
.pulse a:hover .pulse-name { text-decoration: underline; text-decoration-color: var(--c); text-underline-offset: 3px; }
.pulse-name { display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini { display: flex; align-items: flex-end; gap: 2px; height: 22px; }
.mini i { flex: 1; min-height: 2px; background: color-mix(in srgb, var(--c) 35%, transparent); }
.mini i:nth-last-child(-n+7) { background: var(--c); }
.pulse-n { font: 400 16px var(--pixel); text-align: right; }
.pulse-ch { font: 400 12px var(--pixel); text-align: right; white-space: nowrap; }
.pulse-ch.up { color: var(--good); } .pulse-ch.down { color: var(--bad); } .pulse-ch.flat { color: var(--muted); }
.pulse-note { margin: 14px 0 0; font-size: 12px; color: var(--muted); }

/* Daily volume chart */
.chart-card { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 24px; align-items: center; }
.vchart { width: 100%; height: auto; display: block; font: 400 10px var(--pixel); overflow: visible; }
.vchart-short { display: none; }
.vchart .grid line { stroke: var(--line-2); } .vchart .grid text, .vchart .xlab text { fill: var(--muted); }
.vbar .bar { fill: color-mix(in srgb, var(--ink) 18%, transparent); transition: fill .15s; }
.vbar.is-today .bar, .vbar:hover .bar, .vbar:focus .bar { fill: var(--accent); }
.vbar { outline: none; }
.vbar .hit { fill: transparent; }
.vbar .tip { opacity: 0; pointer-events: none; transition: opacity .1s; }
.vbar:hover .tip, .vbar:focus .tip { opacity: 1; }
.tip rect { fill: var(--ink); } .tip text { fill: var(--bg); font-size: 11px; }
.avg { fill: none; stroke: var(--blue); stroke-width: 2; stroke-dasharray: 4 3; }
.chart-key { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.chart-key span { display: inline-flex; align-items: center; gap: 6px; }
.chart-key i { display: inline-block; width: 12px; height: 8px; background: var(--accent); }
.chart-key i.k-avg { height: 0; border-top: 2px dashed var(--blue); }
.chart-facts { margin: 0; display: grid; gap: 16px; }
.chart-facts dt { font: 400 11px var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.chart-facts dd { margin: 2px 0 0; font: 400 32px/1 var(--pixel); }

/* ---------- Paper page ---------- */
.progress { position: sticky; top: 64px; z-index: 19; height: 3px; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.read-grid { display: grid; grid-template-columns: 200px minmax(0, 760px) minmax(260px, 340px); justify-content: space-between; gap: clamp(24px, 4vw, 64px); padding-top: 32px; }
.rail, .margin { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 20px; font-size: 14px; }
.rail-box { display: flex; flex-direction: column; gap: 8px; }
.pixbar { display: flex; gap: 3px; } .pixbar i { flex: 1; height: 8px; background: var(--line); } .pixbar i.on { background: var(--accent); }
.rail-small { font-size: 13px; color: var(--muted); }
.toc { display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.toc a { padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); }
.toc a:hover { color: var(--ink); }
.toc a.done { color: var(--ink); } .toc a.done::after { content: " ✓"; color: var(--good); }
.toc a.now { color: var(--ink); border-left-color: var(--accent); font-weight: 500; }
.rail-actions { display: flex; flex-direction: column; gap: 6px; }
.rail-actions .btn { justify-content: flex-start; width: 100%; }
.rail-actions kbd { margin-left: auto; font: 11px var(--mono); color: var(--muted); }
.text-size { display: flex; gap: 6px; }
.text-size button { flex: 1; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font-weight: 600; }
.text-size button:first-child { font-size: 12px; } .text-size button:last-child { font-size: 17px; }
.cite { position: relative; }
.cite summary { list-style: none; } .cite summary::-webkit-details-marker { display: none; }
.cite-box { position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; width: min(560px, 80vw); padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px -12px rgb(0 0 0 / .25); }
.cite-box pre { margin: 0 0 12px; max-height: 240px; overflow: auto; font: 12px/1.6 var(--mono); white-space: pre-wrap; }
.paper-kicker { margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px 16px; font: 400 12px var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.paper-kicker .pick-n { color: var(--accent-ink); }
.paper-kicker .mono { letter-spacing: 0; text-transform: none; }
.paper h1 { margin: 0; font: 600 clamp(30px, 3.6vw, 52px)/1.06 var(--sans); letter-spacing: -.035em; text-wrap: balance; }
.byline { margin: 16px 0 0; color: var(--muted); }
.paper-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 20px 0 8px; font-size: 14px; color: var(--muted); }
.code-link { font-family: var(--mono); color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.layer { position: relative; padding: 32px 0; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.layer-tag { display: inline-block; margin-bottom: 14px; padding: 4px 8px; font: 400 11px/1 var(--pixel); letter-spacing: .08em; text-transform: uppercase; background: var(--ink); color: var(--bg); border-radius: 4px; }
.layer-first .layer-tag { background: var(--accent); color: var(--on-accent); }
.layer h2 { margin: 0 0 8px; font: 400 13px var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tldr { margin: 0; font: 500 calc(clamp(21px, 2.1vw, 28px) * var(--reader-scale))/1.35 var(--sans); letter-spacing: -.02em; text-wrap: pretty; }
.facts3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 24px; margin: 0; }
.facts3 dt { margin: 0 0 8px; font: 400 13px var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.facts3 dd { margin: 0; font-size: calc(16px * var(--reader-scale)); line-height: 1.6; }
.facts3 mark { background: var(--yellow-wash); color: inherit; padding: 1px 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.ideas { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ideas li { display: flex; gap: 16px; align-items: baseline; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: calc(17px * var(--reader-scale)); font-weight: 500; }
.ideas li span { flex: none; font: 400 14px var(--pixel); color: var(--accent-ink); }
.level-note { margin: 16px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 14px; color: var(--muted); }
.level-note .level { color: var(--ink); }
.prose { position: relative; }
.prose p { margin: 0; max-width: 68ch; font-size: calc(18px * var(--reader-scale)); line-height: 1.7; text-wrap: pretty; }
.prose .lede { font-weight: 600; }
.prose h2 span { margin-left: 8px; color: var(--muted); text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 12px; }
mark.hl { background: var(--yellow-wash); color: inherit; box-shadow: 0 2px 0 var(--yellow); cursor: pointer; padding: 1px 0; }
:root[data-theme="dark"] mark.hl { box-shadow: 0 2px 0 #b8941c; }
.sel-pop { position: absolute; z-index: 40; display: flex; padding: 4px; gap: 2px; background: var(--ink); border-radius: 10px; box-shadow: 0 12px 30px -10px rgb(0 0 0 / .4); transform: translate(-50%, -100%); }
.sel-pop button { border: 0; background: none; color: var(--bg); font: 500 13px var(--sans); height: 32px; padding: 0 10px; border-radius: 7px; cursor: pointer; }
.sel-pop button:hover { background: color-mix(in srgb, var(--bg) 15%, transparent); }
.sel-pop .sel-hl { background: var(--yellow); color: #111; }
.sel-pop .sel-hl:hover { background: var(--yellow); }
.check { padding: 28px; margin-top: 8px; border: 1px dashed var(--yellow); border-radius: 14px; background: var(--yellow-wash); }
.check h2 { color: var(--accent-ink); }
.check-q { margin: 0; font-size: calc(20px * var(--reader-scale)); font-weight: 500; letter-spacing: -.01em; }
.check-a { margin: 16px 0 0; padding: 14px 16px; border-radius: 10px; background: var(--surface); }
.check-actions { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; margin: 32px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.facts div { background: var(--surface); padding: 14px 16px; }
.facts dt { font: 400 11px var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 500; }
.facts a { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.done-card { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 40px 0 24px; }
.done-card > div, .next-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 14px; }
.done-card > div { background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.done-card strong { color: var(--ink); font-size: 20px; line-height: 1.2; }
.next-card { background: var(--ink); color: var(--bg); font-size: 18px; font-weight: 600; line-height: 1.3; }
.next-card .label { color: var(--accent); }
.next-card:hover { background: var(--accent); color: var(--on-accent); }
.next-card:hover .label { color: var(--on-accent); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 64px; }
.pager-link { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; font-weight: 500; line-height: 1.35; }
.pager-link span { font: 400 11px var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pager-link.next { text-align: right; }
.pager-link:hover { border-color: var(--ink); }
.note-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.note-list blockquote { margin: 0 0 6px; padding-left: 10px; border-left: 3px solid var(--yellow); color: var(--muted); font-size: 13px; }
.note-list p { margin: 0; font-weight: 500; }
.note-list button { margin-top: 4px; border: 0; background: none; padding: 0; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; }
.foryou { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.foryou-item { display: flex; flex-direction: column; gap: 8px; min-height: 120px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-size: 13px; }
.foryou-item a { font-size: 16px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.foryou-item a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.foryou-meta { margin-top: auto; display: flex; align-items: center; color: var(--muted); font-size: 12px; }
.foryou-item.skeleton { height: auto; background: linear-gradient(var(--line-2), var(--line-2)) 20px 22px / 40% 10px no-repeat, linear-gradient(var(--line-2), var(--line-2)) 20px 48px / 80% 14px no-repeat, var(--surface); }
.nextlist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 14px; }
.nextlist a { display: block; font-weight: 500; line-height: 1.35; }
.nextlist a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.nextlist span { display: flex; align-items: center; margin-top: 2px; font-size: 12px; color: var(--muted); }
body.focus .ticker, body.focus .site-header, body.focus .rail, body.focus .margin, body.focus .site-footer { display: none; }
body.focus .read-grid { grid-template-columns: minmax(0, 760px); justify-content: center; }
body.focus .progress { top: 0; }
.focus-exit { position: fixed; right: 16px; top: 12px; z-index: 30; display: none; }
body.focus .focus-exit { display: inline-flex; }

/* ---------- All papers ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 500; }
.field-grow { flex: 1 1 280px; }
.result-meta { margin-bottom: 12px; font-size: 14px; color: var(--muted); }
.empty-action { margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); }
.foot-in { display: flex; gap: 8px 24px; justify-content: space-between; flex-wrap: wrap; padding-block: 24px; font-size: 13px; color: var(--muted); }
.foot-in a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.foot-in a:hover { color: var(--ink); text-decoration-color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .read-grid { grid-template-columns: 200px minmax(0, 1fr); }
  .margin { position: static; display: contents; }
}
@media (max-width: 1100px) {
  .read-grid { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
  .rail { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .rail .toc, .rail .rail-box { display: none; }
  .rail-actions { flex-direction: row; flex-wrap: wrap; }
  .rail-actions .btn { width: auto; }
  .margin { grid-column: 1; }
}
@media (max-width: 1000px) {
  .foryou { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero, .split, .chart-card { grid-template-columns: 1fr; }
  .picks { grid-template-columns: 1fr; }
  .chart-facts { grid-template-columns: repeat(3, 1fr); }
  .cmdk { width: auto; } .cmdk span { display: none; }
}
@media (max-width: 680px) {
  .foryou { grid-template-columns: 1fr; }
  .foryou-item { min-height: 0; }
  .bar-in { gap: 8px; }
  .streak { display: none; }
  .nav-long { display: none; } .nav-short { display: inline; }
  .ticker-date { display: none; }
  .hero { padding-top: 28px; }
  .pick { padding: 20px; }
  .row, .list-home .row { grid-template-columns: 32px minmax(0, 1fr); grid-template-areas: "date title" "date authors" "date badges"; }
  .list-home .row { grid-template-areas: "date title" "date authors"; }
  .list-home .quick-save { display: none; }
  .row .badges { justify-content: flex-start; max-width: none; margin-top: 6px; }
  .row-date { font-size: 11px; }
  .pulse a { grid-template-columns: minmax(0, 1fr) 60px 36px 56px; gap: 8px; }
  .vchart-long { display: none; } .vchart-short { display: block; }
  .done-card, .pager { grid-template-columns: 1fr; }
  .chart-facts dd { font-size: 24px; }
}
@media (pointer: coarse) { .btn-sm, .text-size button { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.quick-save { grid-area: badges; justify-self: end; }

/* ---- Project Scout ---- */
.scout { display: grid; grid-template-columns: minmax(320px, 460px) minmax(0, 1fr); gap: clamp(24px, 3.5vw, 48px); align-items: start; padding-bottom: 64px; }
.sh { --ok: var(--sx-strong); --ok-wash: var(--sx-strong-wash); max-width: none; padding: clamp(12px, 4vw, 48px) 0 clamp(20px, 3vw, 36px); }
.sh .sb-eyebrow { margin: 0 0 16px; font-size: 12.5px; }
.sh h1.sh-h { margin: 0; font: 600 clamp(34px, 5.2vw, 64px)/1.02 var(--sans); letter-spacing: -.04em; text-wrap: balance; }
.sh .sh-lede { margin: 16px 0 0; max-width: 60ch; font-size: clamp(16px, 1.4vw, 18px); line-height: 1.55; color: var(--muted); }
.scout-form { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: 18px; box-shadow: var(--shadow); }
.scout-form .field-label { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.field-hint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.sh-box { margin-top: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); transition: border-color .15s, box-shadow .15s; }
.sh-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.sh-box:has([aria-invalid="true"]) { border-color: var(--bad); }
.textarea { height: auto; min-height: 168px; padding: 12px 14px; resize: vertical; font: inherit; font-size: 16px; line-height: 1.5; }
.sh-box .textarea { display: block; width: 100%; min-height: 150px; padding: 16px 16px 8px; border: 0; border-radius: 14px 14px 0 0; background: transparent; box-shadow: none; outline: none; }
.sh-box-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; }
.sh-box-foot .btn { border-radius: 999px; padding-inline: 20px; }
.field-foot { display: flex; justify-content: space-between; gap: 12px; min-height: 0; font-size: 13px; }
.field-error { color: var(--bad); font-weight: 500; }
.char-count { white-space: nowrap; color: var(--muted); font: 400 12px var(--mono); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; }
.examples { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; padding-top: 18px; border-top: 1px dashed var(--line); }
.examples .label { margin-bottom: 2px; }
.example { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; line-height: 1.45; text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.example b { color: var(--ink); font-size: 14px; font-weight: 600; }
.example b::after { content: " →"; color: var(--accent-ink); opacity: 0; transition: opacity .15s; }
.example:hover { border-color: color-mix(in srgb, var(--ink) 35%, var(--line)); transform: translateY(-1px); }
.example:hover b::after { opacity: 1; }
.fine { margin: 4px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.scout-out { display: flex; flex-direction: column; gap: 16px; min-width: 0; scroll-margin-top: 96px; }
.scout-intro { --ok: var(--sx-strong); --ok-wash: var(--sx-strong-wash); --gap: var(--sx-gap); --gap-wash: var(--sx-gap-wash); --gap-line: var(--sx-gap-line); padding-top: 4px; }
.sh-preview { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background:
  radial-gradient(circle at 100% 0, var(--accent-wash), transparent 45%), var(--surface); box-shadow: var(--shadow); }
.shp-top { display: flex; align-items: center; gap: 20px; }
.shp-ring { width: 88px; height: 88px; }
.shp-ring b { font-size: 21px; }
.shp-kicker { margin: 0 0 4px; font: 400 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.shp-h { margin: 0; font: 600 clamp(19px, 2vw, 24px)/1.15 var(--sans); letter-spacing: -.025em; }
.shp-sub { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.shp-parts { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.shp-part { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.shp-part b { font-size: 14.5px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.shp-part .sb-part-top { font-size: 11px; }
.shp-part:first-child .sb-part-top > span:first-child, .shp-part.is-gap .sb-part-top > span:first-child { color: var(--accent-ink); }
.shp-part .sb-pill { padding: 2px 8px; font-size: 10px; }
.shp-part.is-gap { border: 1.5px dashed var(--gap-line); background: repeating-linear-gradient(135deg, var(--gap-wash) 0 8px, color-mix(in srgb, var(--gap-wash) 55%, var(--surface)) 8px 16px); }
.shp-part.is-gap .sb-pill { background: var(--gap); color: #fff; }
.shp-part.is-gap .sb-seg i { background: color-mix(in srgb, var(--gap) 30%, var(--surface)); }
.shp-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.shp-paper { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.shp-cover { display: grid; place-items: center; min-height: 92px; border-radius: 8px; background: linear-gradient(160deg, #1d3b8f, #5b7cf0); color: #fff; font: 400 14px var(--pixel); letter-spacing: .04em; }
.shp-score { margin: 0; font: 400 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ok); }
.shp-score b { margin-right: 4px; padding: 1px 7px; border-radius: 999px; background: var(--ok-wash); font: 600 12px var(--sans); letter-spacing: 0; }
.shp-t { margin: 6px 0 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
.shp-why { margin: 4px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.shp-cases { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.shp-cases p { margin: 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.shp-cases b { color: var(--ink); }
.shp-teams { display: flex; }
.shp-teams i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--surface); color: #fff; font: 700 13px var(--sans); font-style: normal; }
.shp-teams i + i { margin-left: -6px; }
.how { margin: 22px 0 0; padding: 0; list-style: none; counter-reset: how; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.how li { counter-increment: how; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--muted); }
.how li::before { content: "0" counter(how); display: block; margin-bottom: 8px; font: 400 12px/1 var(--mono); letter-spacing: .08em; color: var(--accent-ink); }
.how b { display: block; margin-bottom: 3px; color: var(--ink); font-size: 15px; font-weight: 600; }
.scout-summary { padding: 24px 28px; }
.scout-summary > p { margin: 8px 0 0; font-size: 20px; font-weight: 500; line-height: 1.35; letter-spacing: -.01em; }
.qchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.qchips > span:first-child { margin-right: 4px; }
.qchip { padding: 4px 9px; border-radius: 999px; background: var(--yellow-wash); color: var(--ink); font-size: 12px; font-weight: 500; }
.scout-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.plan { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 24px; }
.stage-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 10px; }
.stage-head h2, .stage-head h3 { margin: 0; font: 400 20px/1.1 var(--pixel); letter-spacing: -.01em; }
.stage-head span { font-size: 13px; color: var(--muted); }
.stage-start .stage-head h2, .stage-start .stage-head h3 { color: var(--accent-ink); }
.plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plan-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) 32px; gap: 12px; align-items: start; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.stage-start .plan-item { border-left: 3px solid var(--accent); }
.plan-n { font: 400 18px/1.3 var(--pixel); color: var(--muted); }
.plan-title { font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.plan-title:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.plan-reason { margin: 6px 0 0; font-size: 15px; line-height: 1.5; }
.plan-meta { display: flex; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: 12px; color: var(--muted); }
.plan-meta a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.plan-item .quick-save { grid-area: auto; opacity: 1; }
.plan-item.is-read .plan-title::after { content: "Read"; margin-left: 8px; font: 400 11px var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--good); }
.scout-loading { padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; }
.pixbar-run i { animation: pix 1.2s steps(1) infinite; }
.pixbar-run i:nth-child(2) { animation-delay: .15s; } .pixbar-run i:nth-child(3) { animation-delay: .3s; } .pixbar-run i:nth-child(4) { animation-delay: .45s; }
.pixbar-run i:nth-child(5) { animation-delay: .6s; } .pixbar-run i:nth-child(6) { animation-delay: .75s; } .pixbar-run i:nth-child(7) { animation-delay: .9s; } .pixbar-run i:nth-child(8) { animation-delay: 1.05s; }
@keyframes pix { 0% { background: var(--accent); } 50% { background: var(--line); } }
.plan-skeleton { display: flex; flex-direction: column; gap: 8px; }
.plan-skeleton i { display: block; height: 96px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); opacity: .7; }
.empty-card { padding: 24px 28px; } .empty-card p { margin: 8px 0 0; font-size: 15px; line-height: 1.5; }
@media (max-width: 1000px) {
  .scout { grid-template-columns: 1fr; }
  .scout-form { position: static; }
}
@media (max-width: 680px) {
  .how, .shp-parts, .shp-row { grid-template-columns: 1fr; }
  .how { gap: 14px; }
  .sh-preview { padding: 18px; }
  .shp-top { gap: 14px; } .shp-ring { width: 72px; height: 72px; } .shp-ring b { font-size: 17px; } .shp-ring span { display: none; }
  .shp-part { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px; }
  .shp-part .sb-part-top { order: 2; margin-left: auto; } .shp-part .sb-part-top > span:first-child { display: none; }
  .shp-part .sb-seg { order: 3; width: 100%; }
  .plan-item { grid-template-columns: 28px minmax(0, 1fr) 32px; padding: 16px; gap: 10px; }
  .scout-form, .scout-summary { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .pixbar-run i { animation: none; background: var(--accent); } }
@media (max-width: 380px) { .brand { display: none; } }

/* ---- Ask this paper ---- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ask h2 span { margin-left: 8px; color: var(--muted); text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 12px; }
.ask-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ask-log:not(:empty) { margin-bottom: 16px; }
.ask-q { margin: 0 0 6px auto; max-width: 80%; width: fit-content; padding: 10px 14px; border-radius: 12px 12px 2px 12px; background: var(--ink); color: var(--bg); font-size: 15px; }
.ask-a { max-width: 92%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px 12px 12px 2px; background: var(--surface); font-size: calc(16px * var(--reader-scale, 1)); line-height: 1.55; }
.ask-a p { margin: 0; }
.ask-a.is-loading { display: grid; gap: 8px; justify-items: start; }
.ask-a.is-loading .pixbar { width: 120px; }
.ask-a.is-error { color: var(--bad); }
.ask-quote { display: block; width: 100%; margin-top: 10px; padding: 10px 12px; border: 0; border-left: 3px solid var(--yellow); border-radius: 4px; background: var(--yellow-wash); color: var(--ink); font: inherit; font-size: 14px; line-height: 1.5; text-align: left; cursor: pointer; }
.ask-quote .label { margin-bottom: 4px; }
.ask-quote:hover { box-shadow: inset 0 0 0 1px var(--yellow); }
.ask-note { margin-top: 8px !important; font-size: 13px; color: var(--muted); }
a.ask-quote { text-decoration: none; }
.ask-wait { font-size: 13px; line-height: 1.5; color: var(--muted); }
.ask-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ask-suggest .qchip { border: 1px solid transparent; font: inherit; font-size: 13px; cursor: pointer; }
.ask-suggest .qchip:hover { border-color: var(--yellow); }
.ask-form { display: flex; gap: 8px; }
.ask-form .input { flex: 1; min-width: 0; }
mark.flash { background: var(--yellow); color: #111; transition: background .4s; border-radius: 2px; }
@media (max-width: 680px) { .ask-q, .ask-a { max-width: 100%; } }

/* ---- Feedback ---- */
.feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 20px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--r); font-size: 14px; color: var(--muted); }
.feedback span { margin-right: auto; }
.feedback .btn[aria-pressed="true"] { background: var(--yellow); color: #111; box-shadow: none; }
.feedback .btn:disabled { cursor: default; opacity: 1; }
.feedback .btn:disabled:not([aria-pressed="true"]) { opacity: .45; }

/* Subscribe: one line on the home page under today's picks, and at the end of each paper */
.subscribe { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin: 8px 0 16px; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.paper .subscribe { margin-top: 20px; }
.subscribe-copy { flex: 1 1 280px; min-width: 0; }
.subscribe-copy h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.01em; }
.subscribe-copy p { margin: 0; font-size: 14px; color: var(--muted); max-width: 52ch; }
.subscribe-act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; flex: 1 1 320px; justify-content: flex-end; }
.subscribe-form { display: flex; gap: 8px; flex: 1 1 300px; max-width: 420px; }
.subscribe-form .input { min-width: 0; }
.hdr-sub { height: 40px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
.hdr-sub[hidden] { display: none; }
.sub-done { display: flex; gap: 12px; align-items: flex-start; flex: 1 1 320px; max-width: 480px; font-size: 14px; }
.sub-done[hidden], .sub-mini[hidden], .subscribe[hidden], .subscribe-act[hidden] { display: none; }
.sub-done p { margin: 2px 0 0; color: var(--muted); }
.sub-tick { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #1f9d55; color: #fff; font-size: 14px; font-weight: 700; }
.sub-tick-lg { width: 44px; height: 44px; font-size: 22px; }
.link-button { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:disabled { cursor: default; text-decoration: none; }
.sub-mini { display: flex; align-items: center; gap: 10px; margin: 8px 0 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; color: var(--muted); }
.paper .sub-mini { margin-top: 20px; }
.sub-mini .sub-tick { width: 22px; height: 22px; font-size: 12px; }
.youre-in { max-width: 640px; margin: 56px auto; }
.youre-in h1 { margin: 16px 0; font: 400 clamp(40px, 5vw, 72px)/.95 var(--pixel); letter-spacing: -.02em; }
.youre-in .lead { font-size: 18px; color: var(--muted); }
.expect { display: grid; gap: 12px; margin: 28px 0; padding: 0; list-style: none; }
.expect li { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.expect b { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.expect span { display: block; color: var(--muted); font-size: 14px; }
.youre-in-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 680px) { .hdr-sub { height: 36px; padding: 0 12px; font-size: 13px; } }
@media (max-width: 560px) {
  .subscribe { padding: 16px; }
  .subscribe-act { justify-content: flex-start; }
  .subscribe-form { flex-basis: 100%; max-width: none; }
}

/* ---- Most read ---- */
.pick[data-slot="most-read"] .pick-n { padding: 4px 7px; border-radius: 4px; background: var(--yellow); color: #111; }
.most-read { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.most-read li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 8px; }
.most-read a { font-size: 14px; font-weight: 500; line-height: 1.35; }
.most-read a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.mr-n { grid-row: span 2; font: 400 16px/1.3 var(--pixel); color: var(--accent-ink); }
.mr-views { font-size: 12px; color: var(--muted); }

/* ---- Tabs (All papers / By day) ---- */
.tabs { display: inline-flex; gap: 2px; margin-bottom: 18px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.tabs a { padding: 6px 12px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--muted); }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--bg); }

/* ---- Topic pulse (shares) ---- */
.pulse2 { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pulse2 a { display: grid; grid-template-columns: minmax(0, 1fr) 96px 44px 82px; gap: 12px; align-items: center; padding: 9px 0; font-size: 14px; border-bottom: 1px solid var(--line-2); }
.pulse2 li:last-child a { border: 0; padding-bottom: 0; } .pulse2 li:first-child a { padding-top: 0; }
.pulse2 a:hover .pulse-name { text-decoration: underline; text-decoration-color: var(--c); text-underline-offset: 3px; }
.pulse-track { position: relative; height: 8px; border-radius: 4px; background: var(--line-2); }
.pulse-fill { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--c, var(--ink)); }
.pulse2 li a { --c: var(--ink); }
.pulse2 .pulse-name { white-space: normal; line-height: 1.3; }
.pulse2 a { grid-template-columns: minmax(0, 1fr) 76px 40px 78px; }
.pulse2 .pulse-fill { background: color-mix(in srgb, var(--ink) 80%, transparent); }
.pulse-base { position: absolute; top: -4px; width: 2px; height: 16px; margin-left: -1px; border-radius: 1px; background: var(--accent); }
.pulse-pct { font: 400 15px var(--pixel); text-align: right; }
.empty-note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* ---- Trends page ---- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 8px 0 8px; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.stat strong { font: 400 clamp(28px, 3vw, 40px)/1 var(--pixel); letter-spacing: -.01em; overflow-wrap: anywhere; }
.stat strong.stat-text { font-size: clamp(20px, 2vw, 26px); line-height: 1.15; }
.stat > span:last-child { font-size: 13px; color: var(--muted); }
.chart { display: block; width: 100%; height: auto; font: 400 11px var(--sans); overflow: visible; }
.chart .grid line { stroke: var(--line-2); stroke-width: 1; }
.chart .grid text, .chart .xlab text { fill: var(--muted); font: 400 11px var(--pixel); }
.chart-box { padding: 24px; }
.share-area .areas path { stroke: var(--surface); stroke-width: 2; stroke-linejoin: round; }
.area-s1, .sw-s1 { fill: var(--s1); } .area-s2, .sw-s2 { fill: var(--s2); } .area-s3, .sw-s3 { fill: var(--s3); }
.area-s4, .sw-s4 { fill: var(--s4); } .area-s5, .sw-s5 { fill: var(--s5); } .area-rest, .sw-rest { fill: var(--s-rest); }
.share-area .areas path { opacity: .9; }
.share-area .direct text { fill: var(--ink); font: 500 12px var(--sans); }
.cols .hit { fill: transparent; }
.cols .col { outline: none; }
.cols .cross { stroke: var(--ink); stroke-width: 1; opacity: 0; }
.cols .tip, .pt .tip { opacity: 0; pointer-events: none; transition: opacity .1s; }
.cols .col:hover .tip, .cols .col:focus .tip, .cols .col:hover .cross, .cols .col:focus .cross { opacity: 1; }
.chart .tip rect { fill: var(--ink); } .chart .tip text { fill: var(--bg); font: 400 12px var(--sans); }
.chart .tip text.tip-h { font-weight: 600; }
.table-view { margin-top: 16px; font-size: 13px; }
.table-view summary { cursor: pointer; color: var(--muted); font-weight: 500; }
.table-view summary:hover { color: var(--ink); }
.data-table { width: 100%; margin-top: 12px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.data-table th:first-child { text-align: left; }
.data-table thead th { color: var(--muted); font-weight: 500; }
.chart-box:has(.data-table) { overflow-x: auto; }
.movers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mover { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.mover > a { font-size: 14px; } .mover > a:hover { text-decoration: underline; text-underline-offset: 3px; }
.mover-nums { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mover-nums strong { font: 400 26px/1 var(--pixel); }
.spark { display: block; width: 100%; height: 40px; overflow: visible; }
.spark-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-area { fill: color-mix(in srgb, var(--ink) 7%, transparent); }
.spark-end { fill: var(--ink); stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
.mover.up .spark-line, .mover.up .spark-end { stroke: var(--good); } .mover.up .spark-end { fill: var(--good); stroke: var(--surface); }
.mover.up .spark-area { fill: color-mix(in srgb, var(--good) 10%, transparent); }
.mover.down .spark-line { stroke: var(--bad); } .mover.down .spark-end { fill: var(--bad); }
.mover.down .spark-area { fill: color-mix(in srgb, var(--bad) 8%, transparent); }
.mover-axis { display: flex; justify-content: space-between; font: 400 10px var(--pixel); color: var(--muted); }
.split-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.words { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.words li { display: grid; grid-template-columns: 28px minmax(80px, 1fr) 120px 110px 44px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.words li:first-child { padding-top: 0; } .words li:last-child { border: 0; padding-bottom: 0; }
.w-n { font: 400 13px var(--pixel); color: var(--muted); }
.w-word { font-weight: 600; } .w-word:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.word-spark { height: 28px; }
.word-spark .spark-line { stroke: var(--accent); } .word-spark .spark-end { fill: var(--accent); } .word-spark .spark-area { fill: color-mix(in srgb, var(--accent) 10%, transparent); }
.w-now { font-size: 12px; color: var(--muted); } .w-x { font: 400 14px var(--pixel); text-align: right; color: var(--accent-ink); }
.cal-wrap { overflow-x: auto; }
.calendar { min-width: 760px; }
.cal-0 { fill: var(--cal-0); } .cal-1 { fill: var(--cal-1); } .cal-2 { fill: var(--cal-2); } .cal-3 { fill: var(--cal-3); } .cal-4 { fill: var(--cal-4); } .cal-5 { fill: var(--cal-5); }
.calendar rect:hover { stroke: var(--ink); stroke-width: 1.5; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.cal-legend i { width: 12px; height: 12px; border-radius: 3px; }
.cal-legend i.cal-0 { background: var(--cal-0); } .cal-legend i.cal-1 { background: var(--cal-1); } .cal-legend i.cal-2 { background: var(--cal-2); }
.cal-legend i.cal-3 { background: var(--cal-3); } .cal-legend i.cal-4 { background: var(--cal-4); } .cal-legend i.cal-5 { background: var(--cal-5); }
.cal-note { margin-left: auto; }
.code-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.code-area { fill: color-mix(in srgb, var(--accent) 9%, transparent); }
.pt { outline: none; } .pt .hit { fill: transparent; }
.pt circle { fill: var(--accent); stroke: var(--surface); stroke-width: 2; opacity: 0; }
.pt:hover circle, .pt:focus circle, .pt:last-child circle { opacity: 1; }
.pt:hover .tip, .pt:focus .tip { opacity: 1; }
.end-label { fill: var(--ink); font: 400 14px var(--pixel); }
.you-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.you-bars li { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 6px 12px; align-items: center; font-size: 13px; }
.you-bars .bars { display: flex; flex-direction: column; gap: 3px; }
.you-bars .bar-you, .you-bars .bar-field { height: 8px; border-radius: 0 4px 4px 0; min-width: 2px; }
.you-bars .bar-you { background: var(--accent); } .you-bars .bar-field { background: color-mix(in srgb, var(--ink) 30%, transparent); }
.you-bars .bar-row { display: flex; align-items: center; gap: 8px; font: 400 11px var(--pixel); color: var(--muted); }
.you-key { display: flex; gap: 16px; margin: 0 0 14px; font-size: 12px; color: var(--muted); }
.you-key i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; }
.you-key .k-you { background: var(--accent); } .you-key .k-field { background: color-mix(in srgb, var(--ink) 30%, transparent); }
@media (max-width: 1100px) { .movers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split-even { grid-template-columns: 1fr; } .movers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  .movers { grid-template-columns: 1fr 1fr; gap: 8px; } .mover { padding: 12px; }
  .chart-box { padding: 14px; }
  .share-area { min-width: 640px; } .chart-box:has(.share-area) { overflow-x: auto; }
  .words li { grid-template-columns: 24px minmax(0, 1fr) 72px 40px; } .w-now { display: none; }
  .pulse2 a { grid-template-columns: minmax(0, 1fr) 64px 40px 72px; gap: 8px; }
  .cal-note { margin-left: 0; width: 100%; }
}

/* ---- Trends story: the opening and five chart cards ---- */
:root { --cool: #2f63c8; --cool-ink: #2552a8; --cool-wash: #eef2fb; --cool-line: #c9d6f0; --sc-foot: #f8f6f1; --rest: #b8b2a6; --on-cool: #fff; }
:root[data-theme="dark"] { --cool: #6e98f0; --cool-ink: #9ab8ff; --cool-wash: #16203a; --cool-line: #2c3d66; --sc-foot: #19191c; --rest: #5d5c63; --on-cool: #0b0b0c; }
.trend-hero { max-width: 1040px; margin: 0 auto; padding: clamp(32px, 6vw, 72px) 0 8px; }
.th-eyebrow { margin: 0 0 18px; font: 400 12.5px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.trend-hero h1 { margin: 0; max-width: 900px; font: 600 clamp(40px, 8.4vw, 80px)/.98 var(--sans); letter-spacing: -.045em; text-wrap: balance; }
.trend-hero h1 .accent { color: var(--accent); }
.th-lede { margin: 28px 0 0; max-width: 800px; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.6; }
.th-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 44px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.th-stat { margin: 0; padding: 20px 24px; border-left: 1px solid var(--line); margin-left: -1px; }
.th-stat strong { display: block; font: 600 40px/1.1 var(--sans); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.th-stat span { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.th-source { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.tone-up strong { color: var(--accent-ink); } .tone-down strong { color: var(--cool-ink); } .tone-ink strong { color: var(--ink); }
.story { max-width: 1040px; margin: 0 auto 24px; display: flex; flex-direction: column; gap: 40px; padding-top: 32px; }
.story-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgb(20 20 19 / .04), 0 12px 32px -16px rgb(20 20 19 / .12); overflow: hidden; }
.sc-head { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; padding: 32px 40px 8px; }
.sc-text { flex: 1 1 480px; min-width: 0; }
.sc-eyebrow { margin: 0 0 14px; font: 400 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sc-eyebrow b { font-weight: 400; color: var(--accent-ink); }
.sc-head h2 { margin: 0; max-width: 640px; font: 600 clamp(22px, 2.6vw, 30px)/1.15 var(--sans); letter-spacing: -.025em; text-wrap: balance; }
.sc-sub { margin: 10px 0 0; max-width: 620px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.sc-stat { margin: 0; text-align: right; flex: 0 0 auto; }
.sc-stat strong { display: block; font: 600 52px/1 var(--sans); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.sc-stat span { display: block; max-width: 190px; margin: 6px 0 0 auto; font-size: 13px; color: var(--muted); }
.sc-body { padding: 24px 40px 24px; }
.sc-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: baseline; padding: 14px 40px; border-top: 1px solid var(--line-2); background: var(--sc-foot); font-size: 12.5px; color: var(--muted); }
.sc-foot .table-view { margin: 0; }
.sc-foot .table-view[open] { flex-basis: 100%; }
.sc-foot .table-view summary { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.sc-foot .tech-board-wrap { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.trend-more { max-width: 1040px; margin: 0 auto; }
.sc-scroll { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }

/* 01 topic shift */
.ts-chart { min-width: 600px; font-family: var(--sans); }
.ts-chart .grid line.base { stroke: var(--line); } .ts-chart .grid line.dash { stroke: var(--line); stroke-dasharray: 2 4; }
.ts-chart .grid text { font: 400 12px var(--sans); fill: var(--muted); }
.ts-chart .xlab text { font: 400 12px var(--mono); fill: var(--muted); }
.ts-area { fill: color-mix(in srgb, var(--accent) 16%, transparent); }
.ts-base { fill: none; stroke: var(--rest); stroke-width: 2.5; stroke-linecap: round; }
.ts-rise { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 3px 4px color-mix(in srgb, var(--accent) 25%, transparent)); }
.ts-start { fill: var(--surface); stroke: var(--accent); stroke-width: 3; }
.ts-halo { fill: var(--accent); opacity: .18; } .ts-end { fill: var(--accent); stroke: var(--surface); stroke-width: 2.5; }
.ts-base-end { fill: var(--rest); stroke: var(--surface); stroke-width: 2; }
.ts-pill rect { fill: var(--surface); stroke: color-mix(in srgb, var(--accent) 35%, var(--line)); } .ts-pill text { fill: var(--accent-ink); font: 600 12px var(--sans); }
.ts-name { fill: var(--ink); font: 600 15px var(--sans); }
.ts-value { fill: var(--accent-ink); font: 600 26px var(--sans); letter-spacing: -.02em; }
.ts-x rect { fill: var(--accent); } .ts-x text { fill: var(--on-accent); font: 600 12px var(--sans); }
.ts-base-name { fill: var(--muted); font: 500 14px var(--sans); } .ts-base-note { fill: var(--muted); font: 400 13px var(--sans); opacity: .85; }

/* 02 momentum bars */
.mb { list-style: none; margin: 0; padding: 0; }
.mb-group { display: flex; align-items: center; gap: 12px; margin: 18px 0 6px; font: 400 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mb-group:first-child { margin-top: 0; }
.mb-group::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.mb-group.g-breakout, .mb-group.g-rising { color: var(--accent-ink); } .mb-group.g-cooling { color: var(--cool-ink); }
.mb-row a { display: grid; grid-template-columns: minmax(120px, 230px) minmax(0, 1fr) 64px; gap: 16px; align-items: center; padding: 5px 0; border-radius: 8px; }
.mb-row a:hover .mb-name, .mb-row a:focus-visible .mb-name { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); }
.mb-name { font-size: 14px; text-align: right; line-height: 1.25; }
.mb-row.st-breakout .mb-name { font-weight: 600; }
.mb-row.st-steady .mb-name { color: var(--muted); }
.mb-track { position: relative; height: 18px; border-radius: 9px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.mb-zero { position: absolute; top: -5px; bottom: -5px; width: 1.5px; margin-left: -.75px; background: var(--ink); }
.mb-bar { position: absolute; top: 0; bottom: 0; border-radius: 9px; background: color-mix(in srgb, var(--rest) 100%, transparent); }
.mb-row.st-breakout .mb-bar, .mb-row.st-rising .mb-bar { background: color-mix(in srgb, var(--accent) calc(var(--k) * 100%), var(--surface)); }
.mb-row.st-cooling .mb-bar { background: color-mix(in srgb, var(--cool) calc(var(--k) * 100%), var(--surface)); }
.mb-val { justify-self: start; padding: 2px 9px; border-radius: 12px; font: 600 12px/1.5 var(--sans); font-variant-numeric: tabular-nums; color: var(--muted); }
.mb-row.st-breakout .mb-val, .mb-row.st-rising .mb-val { background: var(--accent); color: var(--on-accent); }
.mb-row.st-cooling .mb-val { background: var(--cool); color: var(--on-cool); }

/* 03 research against practice */
.rp-key { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.rp-key span { display: inline-flex; align-items: center; gap: 8px; }
.rp-key b { margin-left: auto; font: 400 11px var(--mono); letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.rp-key i { position: static; transform: none; }
.rp-list { list-style: none; margin: 0; padding: 0; }
.rp-group { display: flex; align-items: center; gap: 12px; margin: 16px 0 6px; font: 400 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.rp-group:first-child { margin-top: 0; } .rp-group.g-practice { color: var(--accent-ink); }
.rp-group::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.rp-row { display: grid; grid-template-columns: minmax(120px, 210px) minmax(0, 1fr) 96px; gap: 4px 20px; align-items: center; padding: 8px 12px; border-radius: 8px; }
.rp-row:nth-child(odd) { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.rp-name { font-size: 14px; text-align: right; }
.rp-track { position: relative; height: 16px; }
.rp-track::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--line-2); }
.rp-bar { position: absolute; top: 5px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--rest), var(--accent)); }
.rp-row.research .rp-bar { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 50%, transparent), var(--muted)); }
.rp-paper, .rp-case { position: absolute; top: 0; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; box-sizing: border-box; display: inline-block; }
.rp-paper { background: var(--surface); border: 2.5px solid var(--muted); z-index: 1; }
.rp-case { background: var(--accent); border: 2px solid var(--surface); z-index: 2; }
.rp-gap { justify-self: end; padding: 2px 10px; border-radius: 12px; background: var(--ink); color: var(--bg); font: 600 12px/1.5 var(--sans); white-space: nowrap; }
.rp-row.practice .rp-gap { background: var(--accent); color: var(--on-accent); }
.rp-vals { display: none; grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.rp-axis { display: grid; grid-template-columns: minmax(120px, 210px) minmax(0, 1fr) 96px; gap: 20px; padding: 8px 12px 0; }
.rp-ticks { position: relative; height: 16px; grid-column: 2; }
.rp-ticks span { position: absolute; transform: translateX(-50%); font-size: 12px; color: var(--muted); }

/* 04 off the peak */
.op { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.op li { display: grid; grid-template-columns: minmax(120px, 230px) minmax(0, 1fr) 64px; gap: 16px; align-items: center; }
.op-name { font-size: 14px; text-align: right; }
.op-track { position: relative; height: 28px; }
.op-peak { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 6px; border: 1px solid var(--cool-line);
  background: repeating-linear-gradient(45deg, var(--cool-wash) 0 4px, var(--cool-line) 4px 6px); }
.op-now { position: absolute; top: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; border-radius: 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--cool) 80%, #fff), var(--cool)); }
.op-now b { font: 600 13px var(--sans); color: #fff; }
.op-track em { position: absolute; top: 50%; transform: translateY(-50%); padding-left: 8px; font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }
.op-drop { justify-self: start; padding: 2px 9px; border-radius: 12px; background: var(--cool); color: var(--on-cool); font: 600 12px/1.5 var(--sans); }

/* 05 words on the rise */
.wr { list-style: none; margin: 0; padding: 0; }
.wr li { display: grid; grid-template-columns: minmax(140px, 1.2fr) minmax(200px, 2fr) auto; gap: 24px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line-2); }
.wr li:first-child { border-top: 0; padding-top: 4px; }
.wr-word { font: 600 clamp(24px, 3vw, 34px)/1.05 var(--sans); letter-spacing: -.03em; overflow-wrap: anywhere; }
.wr-word:hover { color: var(--accent-ink); }
.wr-bars { display: flex; flex-direction: column; gap: 6px; }
.wr-bars > span { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.wr-bars i { height: 8px; border-radius: 4px; min-width: 3px; }
.wr-before { background: var(--rest); } .wr-now { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 60%, #fff), var(--accent)); }
.wr-bars b { color: var(--accent-ink); font-weight: 600; }
.wr-x { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 15px; background: var(--accent-wash); color: var(--accent-ink); font: 600 15px var(--sans); }

/* Code with the paper: a small bar per month */
.cm { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; height: 190px; align-items: end; }
.cm li { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 6px; }
.cm i { width: 100%; max-width: 28px; border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.cm li:last-child i { background: var(--accent); }
.cm-v { font: 400 11px var(--mono); color: var(--muted); }
.cm li:last-child .cm-v { color: var(--accent-ink); font-weight: 600; }
.cm-m { font: 400 11px var(--mono); color: var(--muted); text-transform: uppercase; }

@media (max-width: 760px) {
  .sc-head { padding: 24px 20px 4px; } .sc-body { padding: 18px 20px; } .sc-foot { padding: 12px 20px; }
  .sc-stat { text-align: left; } .sc-stat span { margin-left: 0; } .sc-stat strong { font-size: 40px; }
  .th-stats { grid-template-columns: 1fr 1fr; } .th-stat { padding: 16px 18px; border-top: 1px solid var(--line); margin-top: -1px; } .th-stat strong { font-size: 30px; }
  .rp-key b { display: none; }
  .mb-row a, .op li { grid-template-columns: minmax(0, 1fr) 56px; gap: 4px 10px; }
  .mb-name, .op-name { grid-column: 1 / -1; text-align: left; }
  .mb-row a { padding: 6px 0; }
  .rp-row { grid-template-columns: minmax(0, 1fr) auto; padding: 10px; }
  .rp-name { grid-column: 1 / -1; text-align: left; } .rp-vals { display: block; }
  .rp-axis { display: none; }
  .wr li { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; }
  .wr-bars { grid-column: 1 / -1; grid-row: 2; }
  .cm-v { font-size: 9px; } .cm { gap: 3px; }
  .op-track em { display: none; }
}

/* ---- Paper page: Ask beside the text, tools menu, source strip ---- */
.read-grid > .margin { position: static; align-self: stretch; display: block; }
.ask-panel { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 116px); padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.ask-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ask-head h2 { margin: 0; font: 400 18px/1.1 var(--pixel); text-transform: none; letter-spacing: 0; color: var(--ink); }
.ask-close { display: none; }
.ask-sub { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.ask-panel .ask-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0; padding-right: 2px; }
.ask-panel .ask-log:empty { display: none; }
.ask-panel .ask-q { max-width: 90%; font-size: 14px; }
.ask-panel .ask-a { max-width: 100%; font-size: 14px; }
.ask-panel .ask-suggest { margin: 0; }
.ask-panel .ask-suggest .qchip { font-size: 12px; }
.ask-panel .ask-form .btn { height: 44px; }
.ask-fab { display: none; }
.rail-notes { display: flex; flex-direction: column; gap: 4px; }
.rail-notes .note-list { margin-top: 8px; }
.tools { position: relative; }
.tools > summary { list-style: none; width: 100%; justify-content: flex-start; }
.tools > summary::-webkit-details-marker { display: none; }
.tools > summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.tools[open] > summary::after { content: "▴"; }
.tools-menu { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.tools-menu .btn { justify-content: flex-start; width: 100%; }
.source { margin-top: 40px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.source .facts { margin: 0; border: 0; background: none; border-radius: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.source .facts div { padding: 0; background: none; }
.source .actions { align-items: center; gap: 8px 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.text-link { font-size: 14px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.text-link:hover { text-decoration-color: var(--accent); }
.read-next { margin: 8px 0 28px; }
.nextlist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nextlist-grid li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sel-pop .sel-ask { background: var(--accent); color: var(--on-accent); }
.sel-pop .sel-ask:hover { background: var(--accent); }
@media (max-width: 1280px) {
  .ask-panel { position: fixed; z-index: 60; inset: auto 16px 16px auto; width: min(420px, calc(100vw - 32px)); max-height: min(70vh, 640px); box-shadow: 0 24px 60px -20px rgb(0 0 0 / .45); display: none; }
  .ask-panel.is-open { display: flex; }
  .ask-close { display: inline-grid; }
  .ask-fab { position: fixed; z-index: 55; right: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font: 600 14px var(--sans); box-shadow: 0 12px 30px -10px rgb(0 0 0 / .45); cursor: pointer; }
  .ask-fab::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
  .ask-fab:hover { background: var(--accent); color: var(--on-accent); }
  .ask-fab:hover::before { background: var(--on-accent); }
  .ask-fab[aria-expanded="true"] { display: none; }
}
@media (max-width: 1100px) {
  .rail-notes:has([data-notes-empty]:not([hidden])) { display: none; }
  .rail-notes { width: 100%; }
  .tools > summary { width: auto; }
  .tools-menu { position: absolute; z-index: 30; left: 0; top: calc(100% + 6px); width: 240px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px -12px rgb(0 0 0 / .25); }
}
@media (max-width: 680px) {
  .ask-panel { inset: auto 0 0 0; width: 100%; max-height: 80vh; border-radius: 16px 16px 0 0; }
  .ask-fab { right: 12px; bottom: 12px; }
  .nextlist-grid { grid-template-columns: 1fr; }
  .source .actions .btn { flex: 1 1 100%; }
}
body.focus .ask-fab { display: none; }

/* ---- Home: Trends teaser ---- */
.teaser { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 360px); grid-template-areas: "facts chart" "go chart"; gap: 12px 32px; padding: 24px 28px; transition: border-color .15s; }
.teaser:hover { border-color: var(--ink); }
.teaser-facts { grid-area: facts; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.teaser-facts li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: baseline; font-size: 15px; }
.teaser-facts .pulse-ch { text-align: left; font-size: 14px; }
.teaser-facts b { font-weight: 600; }
.teaser-chart { grid-area: chart; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.teaser-spark { height: 72px; }
.teaser-spark .spark-line { stroke: var(--good); } .teaser-spark .spark-end { fill: var(--good); } .teaser-spark .spark-area { fill: color-mix(in srgb, var(--good) 10%, transparent); }
.teaser-go { grid-area: go; align-self: end; font-weight: 600; font-size: 14px; }
.teaser:hover .teaser-go { color: var(--accent-ink); }
@media (max-width: 680px) {
  .teaser { grid-template-columns: 1fr; grid-template-areas: "facts" "chart" "go"; padding: 20px; }
  .teaser-facts li { grid-template-columns: 84px minmax(0, 1fr); }
}
.ext { color: var(--muted); white-space: nowrap; }
.split-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.split-main .most-read { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
@media (max-width: 680px) { .split-main .most-read { grid-template-columns: 1fr; } }

/* ---- Project Scout results: verdict, coverage, build path, comparison ---- */
.scout-verdict { padding: 26px 28px; --v: var(--muted); --v-wash: var(--line-2); }
.scout-verdict.v-good { --v: var(--good); --v-wash: color-mix(in srgb, var(--good) 14%, var(--surface)); }
.scout-verdict.v-partial { --v: #8a6a00; --v-wash: var(--yellow-wash); }
:root[data-theme="dark"] .scout-verdict.v-partial { --v: var(--yellow); }
.scout-verdict.v-none { --v: var(--muted); --v-wash: var(--line-2); }
.verdict-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.verdict-pill { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--v-wash); color: var(--v); font-size: 13px; font-weight: 600; }
.verdict-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--v); }
.verdict-summary { margin: 12px 0 0; font-size: 22px; font-weight: 500; line-height: 1.3; letter-spacing: -.015em; }
.cov-meter { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin-top: 20px; }
.cov-meter i { height: 12px; border-radius: 3px; background: var(--line-2); border: 1px solid var(--line); }
.cov-meter i.s-covered { background: var(--good); border-color: var(--good); }
.cov-meter i.s-partly { background: repeating-linear-gradient(135deg, var(--yellow) 0 4px, var(--yellow-wash) 4px 8px); border-color: var(--yellow); }
.cov-count { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.cov-count b { color: var(--ink); font-weight: 600; }
.verdict-note { margin: 14px 0 0; font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 62ch; }

.scout-sec { display: flex; flex-direction: column; gap: 12px; }
.sec-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.sec-head h2 { margin: 0; font: 400 22px/1.1 var(--pixel); letter-spacing: -.01em; }
.sec-head span { font-size: 13px; color: var(--muted); }

.cov-list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.cov { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.cov:last-child { border-bottom: 0; }
.cov-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: 15px; font-weight: 700; background: var(--line-2); color: var(--muted); }
.cov.s-covered .cov-icon { background: color-mix(in srgb, var(--good) 16%, var(--surface)); color: var(--good); }
.cov.s-partly .cov-icon { background: var(--yellow-wash); color: #8a6a00; }
:root[data-theme="dark"] .cov.s-partly .cov-icon { color: var(--yellow); }
.cov-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.cov-head b { font-size: 16px; font-weight: 600; }
.cov-status { font: 400 11px/1 var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cov.s-covered .cov-status { color: var(--good); }
.cov-body p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.cov-papers { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 120px; }
.pchip { display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); font: 400 12px/1 var(--pixel); color: var(--ink); text-decoration: none; }
.pchip:hover { border-color: var(--accent); color: var(--accent-ink); }

.try { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.try .label { margin-right: 4px; }
.try .qchip { text-decoration: none; border: 1px solid transparent; }
.try .qchip:hover { border-color: var(--yellow); }

.build { list-style: none; margin: 0; padding: 0; position: relative; display: flex; flex-direction: column; gap: 10px; }
.build::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: var(--line); }
.build-step { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start; }
.build-n { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 400 16px/1 var(--pixel); }
.build-step.no-paper .build-n { background: var(--surface); color: var(--muted); border: 2px dashed var(--line); }
.build-body { padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.build-step.no-paper .build-body { background: transparent; border-style: dashed; }
.build-body b { font-size: 16px; font-weight: 600; }
.build-body p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.build-papers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.build-papers > span { margin-right: 2px; }

.plan-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.fit-badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.fit-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.fit-badge.fit-direct { background: color-mix(in srgb, var(--good) 14%, var(--surface)); color: var(--good); }
.fit-badge.fit-partial { background: var(--yellow-wash); color: #8a6a00; }
:root[data-theme="dark"] .fit-badge.fit-partial { color: var(--yellow); }
.code-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); font: 400 11px/1 var(--pixel); letter-spacing: .02em; color: var(--ink); text-decoration: none; }
.code-badge:hover { border-color: var(--accent); color: var(--accent-ink); }
.plan-item.fit-direct { border-left: 3px solid var(--good); }
.stage-start .plan-item.fit-partial, .plan-item.fit-partial { border-left: 3px solid var(--yellow); }
.plan-item { scroll-margin-top: 96px; }
.plan-item:target { box-shadow: 0 0 0 2px var(--accent); }
.need-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.need-tag { padding: 2px 8px; border-radius: 6px; background: var(--line-2); color: var(--ink); font-weight: 500; }

.compare-wrap { overflow-x: auto; }
.compare { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.compare th, .compare td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-2); }
.compare thead th { font: 400 11px/1.2 var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--bg); white-space: nowrap; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare tbody th { position: sticky; left: 0; z-index: 1; width: 30%; min-width: 220px; background: var(--surface); font-weight: 600; }
.compare tbody th .pchip { margin: 0 8px 6px 0; }
.compare-title { display: block; margin-bottom: 6px; }
.compare .muted { color: var(--muted); }
.compare td[data-label="Code"] { white-space: nowrap; }

.scout-extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.need-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.need-list li { padding: 6px 10px; border-radius: var(--r-sm); background: var(--line-2); font-size: 14px; }
.watch-out ul { margin: 12px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.5; }
.watch-out li + li { margin-top: 6px; }
.watch-out li::marker { color: var(--bad); }

/* Home: watched Scout projects */
.watch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.watch-card { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; }
.watch-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.watch-count { font: 400 11px/1 var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.watch-count.has-new { padding: 5px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.watch-title { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.35; }
.watch-items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.watch-items li { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.watch-items a { font-size: 15px; font-weight: 500; line-height: 1.35; }
.watch-items a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.watch-empty { margin: 0; font-size: 14px; color: var(--muted); }
.watch-actions { display: flex; gap: 16px; margin-top: auto; padding-top: 6px; }
.watch-actions button.text-link { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }

@media (max-width: 680px) {
  .scout-verdict { padding: 20px; }
  .verdict-summary { font-size: 19px; }
  .cov { grid-template-columns: 28px minmax(0, 1fr); padding: 14px 16px; gap: 12px; }
  .cov-icon { width: 28px; height: 28px; font-size: 13px; }
  .cov-papers { grid-column: 2; justify-content: flex-start; max-width: none; }
  .build::before { left: 15px; }
  .build-step { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
  .build-n { width: 32px; height: 32px; font-size: 14px; }
  /* The comparison table becomes one card per paper */
  .compare { min-width: 0; }
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; }
  .compare tr { padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
  .compare tbody tr:last-child { border-bottom: 0; }
  .compare tbody th { position: static; min-width: 0; padding: 0 0 8px; border: 0; }
  .compare td { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 6px 0; border: 0; }
  .compare td::before { content: attr(data-label); font: 400 11px/1.5 var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
}

/* Scout: the papers as one reading-order panel. Columns on the right are the
   project's needs; a Harvey ball shows how well each paper covers each need. */
.syllabus { --ball-w: 72px; --save-w: 52px; --matrix: calc(var(--n-needs, 0) * var(--ball-w)); container-type: inline-size; padding: 0; overflow: hidden; }
.hb { display: inline-block; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); }
.hb-full { background: var(--ink); }
.hb-half { background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }
.hb-none { border-color: var(--line); }

.syl-head { display: grid; grid-template-columns: minmax(0, 1fr) var(--matrix) var(--save-w); align-items: end; padding: 16px 0 12px 20px; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.3; color: var(--muted); }
.syl-needs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n-needs, 0), var(--ball-w)); }
.syl-head .syl-needs li { padding: 0 6px; text-align: center; font-weight: 500; color: var(--ink); }

.syl-stage + .syl-stage { border-top: 1px solid var(--line); }
.syl-stage-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 14px 20px 0; font: 400 17px/1.2 var(--pixel); }
.syl-stage-name::before { content: ""; align-self: center; width: 10px; height: 10px; background: var(--ink); }
.stage-start .syl-stage-name { color: var(--accent-ink); }
.stage-start .syl-stage-name::before { background: var(--accent); }
.stage-further .syl-stage-name::before { background: transparent; box-shadow: inset 0 0 0 2px var(--muted); }
.syl-stage-name small { font: 400 13px/1.4 var(--sans); color: var(--muted); }

.syl-list { list-style: none; margin: 0; padding: 0; }
.syl-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) var(--matrix) var(--save-w); align-items: start; padding: 16px 0 20px; scroll-margin-top: 96px; }
.syl-row + .syl-row { border-top: 1px solid var(--line-2); }
.syl-row:target { background: var(--accent-wash); }
.syl-n { padding-left: 20px; font: 400 40px/.85 var(--pixel); color: var(--ink); }
.stage-start .syl-n { color: var(--accent); }
.syl-paper { min-width: 0; padding-right: 24px; }
.syl-title { font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; text-decoration: none; }
.syl-title:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.syl-reason { margin: 6px 0 0; max-width: 64ch; font-size: 15px; line-height: 1.5; color: var(--muted); }
.syl-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 10px; }
.syl-links .text-link { font-size: 13px; }
.syl-ext { font-size: 13px; color: var(--muted); }
.syl-row .syl-needs li { display: flex; justify-content: center; padding-top: 4px; }
.syl-ball-label { display: none; }
.syl-row .quick-save { grid-area: auto; justify-self: center; opacity: 1; }
.syl-row.is-read .syl-title::after { content: "Read"; margin-left: 8px; font: 400 11px var(--pixel); color: var(--good); }

.syl-key { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--bg); font-size: 13px; color: var(--muted); }
.syl-key span, .syl-fit { display: inline-flex; align-items: center; gap: 8px; }
.syl-key .hb, .syl-fit .hb { width: 12px; height: 12px; }
.syl-fit { margin-top: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }

/* Narrow panel: needs move under each paper, with their names */
@container (max-width: 600px) {
  .syl-head { display: none; }
  .syl-row { grid-template-columns: 44px minmax(0, 1fr) 44px; padding: 14px 0 18px; }
  .syl-n { padding-left: 16px; font-size: 28px; }
  .syl-stage-name { padding: 14px 16px 0; }
  .syl-paper { padding-right: 8px; }
  .syl-row .syl-needs { grid-column: 2 / 4; grid-row: 2; display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; padding-right: 16px; }
  .syl-row .syl-needs li { gap: 6px; align-items: center; padding: 0; font-size: 13px; }
  .syl-ball-label { display: inline; }
  .syl-row .syl-needs li:has(.hb-none) { display: none; }
  .syl-key { padding: 12px 16px; }
}

/* Technology tracker (Trends) */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border: 1px solid var(--line); border-radius: 999px; font: 500 12px/1.4 var(--sans); color: var(--muted); white-space: nowrap; }
.status i { font: 400 9px/1 var(--sans); font-style: normal; letter-spacing: -1px; }
.status.st-breakout { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.status.st-rising { background: var(--accent-wash); border-color: transparent; color: var(--accent-ink); }
.status.st-new { background: var(--yellow-wash); border-color: transparent; color: var(--ink); }
.status.st-steady { color: var(--ink); }
.status.st-cooling { border-style: dashed; }
.tech-board-wrap { overflow-x: auto; }
.tech-board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tech-board th, .tech-board td { padding: 12px 18px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tech-board thead th { font: 500 12px/1.3 var(--sans); color: var(--muted); padding-top: 16px; padding-bottom: 10px; }
.tech-board tbody tr:last-child th, .tech-board tbody tr:last-child td { border-bottom: 0; }
.tech-board tbody th { font: 500 15px/1.3 var(--sans); }
.tech-board tbody th a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); }
.tech-board .num { text-align: right; white-space: nowrap; }
.tech-board td.num { font: 400 18px/1.1 var(--pixel); }
.tech-board td.num span { display: block; margin-top: 3px; font: 400 12px var(--sans); color: var(--muted); }
.tech-board td.tb-change { font-size: 16px; }
.tech-board tr.st-breakout .tb-change, .tech-board tr.st-rising .tb-change { color: var(--accent-ink); }
.tech-board tr.st-cooling .tb-change { color: var(--muted); }
.tb-spark { width: 160px; }
.tb-shape { display: none; font: 400 9px/1 var(--sans); font-style: normal; letter-spacing: -1px; margin-right: 5px; vertical-align: 2px; }
.tb-spark .spark { width: 140px; height: 32px; }
.tech-board tr.st-breakout .spark-line, .tech-board tr.st-rising .spark-line { stroke: var(--accent); }
.tech-board tr.st-breakout .spark-end, .tech-board tr.st-rising .spark-end { fill: var(--accent); }
.tech-board tr.st-breakout .spark-area, .tech-board tr.st-rising .spark-area { fill: color-mix(in srgb, var(--accent) 10%, transparent); }
.tech-board tr.st-cooling .spark-line { stroke: var(--muted); } .tech-board tr.st-cooling .spark-end { fill: var(--muted); }
.tech-board tr.st-breakout th a { color: var(--accent-ink); }
.tech-board tr.tb-more { display: none; }
.tech-board-wrap[data-all] tr.tb-more { display: table-row; }
.tb-all { display: block; margin: 12px 18px; }
.tb-note { margin: 0; padding: 12px 18px 16px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-2); }

@media (max-width: 680px) {
  .tech-board thead th:nth-child(2), .tech-board .tb-spark, .tech-board thead th:last-child, .tech-board td:last-child { display: none; }
  .tb-shape { display: inline; }
  .tech-board thead th, .tech-board thead th.num { white-space: normal; }
  .tech-board th, .tech-board td { padding: 10px 12px; }
  .tech-board tbody th { font-size: 14px; }
  .tech-board td.num { font-size: 15px; }
  .tech-board td.num span { font-size: 11px; }
  .tech-board .status { padding: 2px 8px 2px 6px; font-size: 11px; }
}

/* When a paper came out */
.pick-date { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 13px; color: var(--muted); position: relative; z-index: 1; }
.pick.is-first .pick-date { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.old-flag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: var(--yellow-wash); color: var(--ink); font: 500 12px/1.4 var(--sans); white-space: nowrap; }
.pick.is-first .old-flag { background: var(--yellow); color: #111; }
.pub-date { font-size: 13px; color: var(--muted); }

/* ---------- All papers: search bar, quick views and paper cards ---------- */
.page-head-tight { padding-bottom: 8px; }
.page-head-tight h1 { font-size: clamp(36px, 4.4vw, 60px); }
.page-head-tight p { margin-top: 10px; font-size: 16px; }
.pbar { position: sticky; top: var(--header-h, 65px); z-index: 10; margin: 0 calc(-1 * var(--gutter)) 16px; padding: 12px var(--gutter); background: var(--bg); border-bottom: 1px solid var(--line); }
.pbar-search { display: flex; gap: 8px; align-items: stretch; }
.pbar-search .input-wrap { flex: 1; min-width: 0; }
.pbar-search .input { height: 48px; font-size: 16px; }
.pbar-search .toggle { height: 48px; flex: none; }
.chips { display: flex; align-items: center; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 13px var(--sans); cursor: pointer; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip-select { flex: none; width: auto; height: 34px; margin-left: auto; padding-left: 14px; border-radius: 999px; font-size: 13px; font-weight: 500; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.cards > .empty { grid-column: 1 / -1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
/* Paper cards: a tinted "text cover" per topic stands in for a thumbnail (no images to load) */
.pcard { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.pcard:hover { transform: translateY(-2px); border-color: var(--c, var(--ink)); box-shadow: var(--shadow); }
.pcard:has(h3 a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pc-cover { position: relative; height: 112px; border-radius: var(--r) var(--r) 0 0; padding: 12px 14px; overflow: hidden; isolation: isolate; background: color-mix(in srgb, var(--c) 10%, var(--surface)); border-bottom: 1px solid color-mix(in srgb, var(--c) 18%, var(--line-2)); }
.pc-cover-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; min-height: 22px; }
.pc-topic { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; font: 600 12.5px/1 var(--sans); color: var(--c); }
.pc-topic .dot { width: 7px; height: 7px; border-radius: 2px; background: var(--c); flex: none; }
.pc-topic:hover { text-decoration: underline; text-underline-offset: 3px; }
.pc-badge { margin-left: auto; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 11.5px var(--sans); white-space: nowrap; }
.pc-badge-pick { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pc-badge-hot { background: var(--yellow); border-color: var(--yellow); color: #111; }
.pc-badge-new { border-color: var(--ink); color: var(--ink); }
.pc-word { position: absolute; z-index: 0; right: -4px; bottom: -.24em; font: 800 76px/1 var(--sans); letter-spacing: -.045em; white-space: nowrap; color: color-mix(in srgb, var(--c) 20%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 55%); mask-image: linear-gradient(90deg, transparent 0, #000 55%); pointer-events: none; }
.pc-stat { position: absolute; z-index: 2; left: 14px; bottom: 10px; display: flex; flex-direction: column; gap: 3px; }
.pc-stat b { font: 650 30px/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--c); }
.pc-stat b small { font-size: .6em; vertical-align: .18em; margin-right: 3px; }
.pc-stat span { font: 500 12px/1.2 var(--sans); color: var(--ink); opacity: .7; }
.pc-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.pcard-by { margin: 0; display: flex; align-items: center; gap: 7px; min-width: 0; height: 22px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.pcard-by .org-name { font: 600 13px var(--sans); color: var(--ink); flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.pcard-by .by-auth { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pcard-tags { position: relative; z-index: 1; display: flex; flex-wrap: nowrap; gap: 6px; height: 24px; overflow-x: clip; overflow-y: visible; }
.sig.sig-topic { gap: 6px; background: transparent; border: 1px solid var(--line); color: var(--muted); }
.sig.sig-topic .dot { width: 6px; height: 6px; border-radius: 2px; background: var(--c); }
.sig.sig-topic:hover { color: var(--ink); border-color: var(--c); }
.pcard h3 { margin: 0; min-height: 2.64em; font: 600 17px/1.32 var(--sans); letter-spacing: -.014em; text-wrap: pretty; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }
.pcard h3 a:focus-visible { outline: none; }
.pcard-sum { margin: 0; min-height: 6em; font-size: 14px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-auth { margin: 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-foot { margin-top: auto; display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--muted); }
.pcard-dates { margin: 0; display: flex; flex-wrap: nowrap; gap: 6px; min-width: 0; overflow: hidden; }
.date-pill { flex: none; }
.pc-ext { margin-left: auto; flex: none; height: 22px; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); font: 500 11.5px var(--mono); color: var(--muted); }
.pc-badge + .pc-ext { margin-left: 6px; }
.date-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font: 500 12px var(--sans); white-space: nowrap; }
.date-pill .dp-k { font: 600 10px var(--sans); letter-spacing: .07em; text-transform: uppercase; opacity: .7; }
.date-pill time { font-weight: 600; font-variant-numeric: tabular-nums; }
.date-pill.is-pub { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.date-pill.is-added { background: var(--yellow-wash); border: 1px solid color-mix(in srgb, var(--yellow) 65%, transparent); color: var(--ink); }
.date-pill.is-today { background: var(--yellow); border-color: var(--yellow); color: #111; }
.date-pill.is-today::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #111; }
.pcard-org { margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0; font: 600 13px var(--sans); color: var(--ink); }
.org-mark { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--lab, var(--ink)); color: var(--lab-ink, var(--surface)); font: 700 10px/1 var(--sans); letter-spacing: .01em; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06); }
.org-mark svg { width: 62%; height: 62%; fill: currentColor; }
.org-mark .lm-3 { font-size: 8.5px; }
.org-mark .lm-4 { font-size: 7.5px; letter-spacing: 0; }
[data-theme="dark"] .org-mark { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .16); }
.org-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sig-info { position: static; gap: 6px; border: 0; cursor: help; }
.sig-i { display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; border: 1px solid currentColor; font: 700 9px/1 var(--sans); font-style: italic; opacity: .75; }
.sig-tip { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 5; padding: 10px 12px; border-radius: 10px; background: var(--ink); color: var(--surface); font: 400 12.5px/1.45 var(--sans); white-space: normal; text-align: left; box-shadow: 0 10px 30px -10px rgb(0 0 0 / .35); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s; pointer-events: none; }
.sig-tip b { font-weight: 600; }
.sig-info:hover .sig-tip, .sig-info:focus .sig-tip { opacity: 1; visibility: visible; transform: none; }
.sig.sig-arxiv { background: transparent; border: 1px dashed var(--line); color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.sig.sig-used { background: color-mix(in srgb, var(--good) 14%, var(--surface)); color: var(--good); }
.pcard-foot .ext { margin-left: auto; font-family: var(--mono); }
.pcard-foot .quick-save { position: relative; z-index: 1; margin-left: auto; opacity: 1; width: 30px; height: 30px; }
.pcard-foot .ext + .quick-save { margin-left: 0; }
.pcard-read { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 6px; background: color-mix(in srgb, var(--good) 12%, var(--surface)); font: 600 11px var(--mono); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; color: var(--good); }
.pcard-tags > * { flex: none; }
.pcard.is-read h3 a { color: var(--muted); font-weight: 500; }
.sig { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--bg); font: 500 12px var(--sans); color: var(--ink); white-space: nowrap; }
.sig-up { color: var(--accent-ink); }
.pcard.skeleton { height: 340px; gap: 10px; padding: 0 16px 16px; overflow: hidden; }
.pcard.skeleton::before { content: ""; display: block; height: 112px; margin: 0 -16px 6px; background: var(--line-2); }
.pcard.skeleton span { display: block; height: 12px; border-radius: 3px; background: var(--line-2); }
.pcard.skeleton span:nth-child(1) { width: 35%; } .pcard.skeleton span:nth-child(2) { width: 90%; height: 18px; } .pcard.skeleton span:nth-child(3) { width: 70%; }
@media (max-width: 640px) {
  .page-head-tight p { display: none; }
  .pbar-search .toggle { padding: 0 12px; }
  .chip-select { margin-left: 0; }
  .pc-cover { height: 96px; }
  .pc-word { font-size: 64px; }
  .pc-stat b { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .pcard, .pcard:hover { transition: none; transform: none; } }

/* ---------- Project Scout: the papers most relevant to a project ----------
   Its own cool grey-green palette; the site's pixel type for headlines and scores. */
.page-scout {
  --sx-strong: #1F6B45; --sx-strong-wash: #E3F2EC; --sx-related: #9AA6A1; --sx-gap: #B4530F; --sx-gap-wash: #FDF0E6; --sx-gap-line: #D9A07A;
  background: var(--bg);
}
:root[data-theme="dark"] .page-scout {
  --sx-strong: #3CC89A; --sx-strong-wash: #11352A; --sx-related: #66746F; --sx-gap: #F0965A; --sx-gap-wash: #33200F; --sx-gap-line: #7A4A28;
}
.scout.has-results { display: block; }
.scout.has-results .scout-form { display: none; }

.sx-note { margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--line-2); font-size: 14px; color: var(--muted); }
.sx-again { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
  background: color-mix(in srgb, var(--n) 11%, var(--surface)); color: color-mix(in srgb, var(--n) 78%, var(--ink)); }
.sx-removed { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.sx-removed button { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-decoration: underline; cursor: pointer; }
.sx-empty { padding: 40px 0; color: var(--muted); }
.sx-empty b { display: block; margin-bottom: 4px; font-size: 17px; color: var(--ink); }
.sx-results .feedback { margin-top: 32px; }

/* ---- Scout results: the build brief ---- */
.sb { --ok: var(--sx-strong); --ok-wash: var(--sx-strong-wash); --gap: var(--sx-gap); --gap-wash: var(--sx-gap-wash); --gap-line: var(--sx-gap-line);
  max-width: 1200px; margin: 0 auto; }
.sb-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 32px 48px; align-items: end; padding: clamp(8px, 3vw, 32px) 0 8px; }
.sb-eyebrow { margin: 0 0 16px; font: 400 12.5px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sb-eyebrow b { font-weight: 400; color: var(--accent-ink); }
.sb-h { margin: 0; font: 600 clamp(30px, 4.6vw, 56px)/1.04 var(--sans); letter-spacing: -.035em; text-wrap: balance; overflow-wrap: anywhere; }
.sb-full { margin-top: 12px; font-size: 14px; color: var(--muted); }
.sb-full summary { cursor: pointer; }
.sb-full p { margin: 8px 0 0; max-width: 70ch; color: var(--ink); line-height: 1.55; }
.sb-meta { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.sb-meta button { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sb-meta button:hover { color: var(--accent-ink); }
.sb-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.sb-tools .btn { border-radius: 999px; }
.sb-ready { display: flex; align-items: center; gap: 22px; padding: 26px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.sb-ring-big { position: relative; flex: none; width: 104px; height: 104px; display: grid; place-items: center; align-content: center; }
.sb-ring-big svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sb-ring-big circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.sb-ring-big .rg-ok { stroke: var(--ok); } .sb-ring-big .rg-gap { stroke: color-mix(in srgb, var(--gap) 55%, var(--surface)); }
.sb-ring-big b { font: 600 26px/1 var(--sans); letter-spacing: -.03em; }
.sb-ring-big span { margin-top: 3px; font: 400 9.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sb-ready-h { margin: 0 0 6px; font: 600 21px/1.2 var(--sans); letter-spacing: -.02em; }
.sb-ready p:not(.sb-ready-h) { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.sb-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin: 0 0 14px; font: 400 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sb-label span + span { font: 400 13px var(--sans); letter-spacing: 0; text-transform: none; }

/* The build map */
.sb-map { margin-top: 44px; }
.sb-parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.sb-part a { height: 100%; display: flex; flex-direction: column; gap: 12px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease, border-color .15s; }
.sb-part a:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.sb-part.is-gap a { border: 1.5px dashed var(--gap-line); background: repeating-linear-gradient(135deg, var(--gap-wash) 0 10px, color-mix(in srgb, var(--gap-wash) 55%, var(--surface)) 10px 20px); }
.sb-part-top { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; font: 400 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sb-part:first-child .sb-part-top > span:first-child, .sb-part.is-gap .sb-part-top > span:first-child { color: var(--accent-ink); }
.sb-pill { padding: 3px 9px; border-radius: 999px; background: var(--ok-wash); color: var(--ok); font: 500 11px var(--mono); letter-spacing: .06em; }
.sb-part.is-gap .sb-pill { background: var(--gap); color: #fff; }
.sb-part h3 { margin: 0; font: 600 21px/1.2 var(--sans); letter-spacing: -.02em; }
.sb-seg { margin: 0; display: flex; gap: 4px; }
.sb-seg i { flex: 1; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.sb-seg i.s-strong { background: var(--ok); } .sb-seg i.s-rel { background: color-mix(in srgb, var(--ok) 40%, var(--surface)); }
.sb-part.is-gap .sb-seg i { background: color-mix(in srgb, var(--gap) 30%, var(--surface)); }
.sb-pick { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.sb-pick b { color: var(--ink); font-weight: 600; }
.sb-part-foot { margin: auto 0 0; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.sb-part.is-gap .sb-part-foot { color: var(--gap); border-color: var(--gap-line); }
.sb-teams { display: inline-flex; align-items: center; gap: 4px; }
.sb-team { width: 24px; height: 24px; border-radius: 6px; flex: none; }
.sb-team.cs-mono { font-size: 11px; }
.sb-team + :not(.sb-team) { margin-left: 4px; }
svg.sb-team, img.sb-team { padding: 3px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }

/* Parts with their papers, and the side column */
.sb-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; margin-top: 52px; }
.sb-main { min-width: 0; }
.sb-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sb-filters [data-sx-count] { margin-right: auto; font: 400 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sb-filters label { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; cursor: pointer; }
.sb-filters input { accent-color: var(--ok); margin: 0; }
.sb-need { padding-top: 36px; scroll-margin-top: 90px; }
.sb-need > header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.sb-num { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin-top: 2px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 500 12px var(--mono); }
.sb-need:first-of-type .sb-num { background: var(--accent); color: var(--on-accent); }
.sb-num.is-gap { background: none; border: 1.5px dashed var(--gap); color: var(--gap); }
.sb-need h2 { margin: 0; font: 600 clamp(24px, 2.6vw, 32px)/1.15 var(--sans); letter-spacing: -.025em; }
.sb-trends { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.sb-trend { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; }
.sb-trend b { color: var(--accent-ink); } .sb-trend.down b { color: var(--cool-ink, #2552a8); }

/* Paper cards: the All papers card turned sideways, with the fit score on the cover */
.sb-paper { flex-direction: row; margin-top: 14px; }
.sb-paper .sb-cover { flex: none; width: 184px; height: auto; min-height: 196px; border-radius: var(--r) 0 0 var(--r); border-bottom: 0; border-right: 1px solid color-mix(in srgb, var(--c) 18%, var(--line-2)); }
.sb-paper .pc-word { font-size: 58px; }
.page-scout:has(.scout.has-results) .scout-head { display: none; }
.sb-score { position: absolute; z-index: 2; left: 14px; top: 44px; width: 64px; height: 64px; display: grid; place-items: center; }
.sb-score svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sb-ring-bg { fill: var(--surface); stroke: color-mix(in srgb, var(--c) 16%, var(--line-2)); stroke-width: 6; }
.sb-ring-fg { fill: none; stroke: var(--ok); stroke-width: 6; stroke-linecap: round; }
.fit-related .sb-ring-fg, .fit-unchecked .sb-ring-fg { stroke: var(--sx-related); }
.sb-score b { position: relative; font: 650 21px/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.sb-fit { position: absolute; z-index: 2; left: 14px; top: 116px; font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ok); }
.fit-related .sb-fit, .fit-unchecked .sb-fit { color: var(--muted); }
.sb-paper .pc-body { min-width: 0; gap: 9px; padding: 16px 20px 14px; }
.sb-paper h3 { min-height: 0; font-size: 18px; }
.sb-paper .pcard-sum { min-height: 0; -webkit-line-clamp: 2; }
.sb-why { position: relative; z-index: 1; padding: 10px 14px; border-radius: 10px; background: var(--ok-wash); font-size: 14.5px; line-height: 1.5; }
.sb-why span { display: block; margin-bottom: 3px; font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ok); }
.fit-related .sb-why { background: color-mix(in srgb, var(--ink) 5%, var(--surface)); } .fit-related .sb-why span { color: var(--muted); }
.sb-code { position: relative; z-index: 1; background: var(--ink); color: var(--surface); text-decoration: none; }
.sb-also { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.sb-paper .pcard-foot { gap: 8px; }
.sb-acts { position: relative; z-index: 1; margin-left: auto; display: flex; gap: 2px; }
.sb-act { padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: 500 12.5px var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.sb-act:hover { background: var(--line-2); color: var(--ink); }
.sb-paper .pcard-foot .quick-save { margin-left: 0; }
.sb-split { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 0; font: 600 15px var(--sans); }
.sb-split::after { content: ""; flex: 1; align-self: center; height: 1px; background: var(--line); }
.sb-split small { font: 400 13px var(--sans); color: var(--muted); }
.sb-more { margin-top: 14px; padding: 0; border: 0; background: none; color: var(--ink); font: 500 14px var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* An open problem: a part no paper covers */
.sb-open { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; padding: 24px 28px; border-radius: 16px; background: #141413; color: #f2f0eb; }
.sb-open > div { flex: 1 1 360px; min-width: 0; }
.sb-open-k { margin: 0 0 8px; font: 400 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #ff8a52; }
.sb-open-h { margin: 0; font-size: 17px; line-height: 1.5; }
.sb-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.sb-try span { font-size: 13px; color: #b9b6ae; }
.sb-open .qchip { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .18); color: #f2f0eb; }
.sb-scholar { display: inline-block; margin-top: 12px; font-size: 13px; color: #d9d6cf; text-decoration: underline; text-underline-offset: 3px; }
.sb-watch-need { flex: none; border-radius: 999px; background: var(--accent); border-color: var(--accent); color: #fff; }

/* Side column */
.sb-aside { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; margin-top: 50px; }
.sb-box { padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.sb-box p { margin: 0; }
.sb-box-k { margin-bottom: 10px !important; font: 400 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.sb-big { font: 600 36px/1.1 var(--sans) !important; letter-spacing: -.03em; color: var(--ink); }
.sb-plan-bar { display: flex; gap: 3px; margin-top: 14px !important; }
.sb-plan-bar i { height: 8px; border-radius: 4px; background: var(--ink); }
.sb-plan-bar i:first-child { background: var(--accent); }
.sb-techs { display: flex; flex-wrap: wrap; gap: 6px; }
.sb-techs a { padding: 5px 11px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, var(--surface)); color: var(--ink); font-size: 13px; text-decoration: none; }
.sb-techs a:hover { background: color-mix(in srgb, var(--ink) 12%, var(--surface)); }
.sb-box.feedback { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.sb-box.feedback [data-feedback-q] { width: 100%; color: var(--ink); font-weight: 500; }

/* Built in production: case studies, drawn like the Case studies page */
.sb-cases { margin-top: 64px; }
.sb-cases-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 22px; }
.sb-cases-head h2 { margin: 0; font: 600 clamp(26px, 3.2vw, 38px)/1.1 var(--sans); letter-spacing: -.03em; }
.sb-cases-head p { margin: 10px 0 0; max-width: 60ch; font-size: 16px; color: var(--muted); }
.sb-case-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.cs-tags .cs-tag { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 11px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, var(--line)); color: var(--ink); font: 500 12.5px var(--sans); }
.cs-tags .cs-tag::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--c); }
.sb-matches { margin: 14px 0 0 !important; font: 500 11px var(--mono) !important; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink) !important; }
.sb-cases .cs-link::after { content: ""; position: absolute; inset: 0; }
.sb-cases .cs-save { position: relative; z-index: 2; }

:root[data-theme="dark"] .sb-open, :root[data-theme="dark"] .sb-watch { border: 1px solid var(--line); }
/* Watch banner */
.sb-watch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin-top: 56px; padding: 32px 40px; border-radius: 20px; background: #141413; color: #f2f0eb; }
.sb-watch h2 { margin: 0; font: 600 clamp(22px, 2.6vw, 30px)/1.2 var(--sans); letter-spacing: -.02em; }
.sb-watch h2 span { color: #ff8a52; }
.sb-watch p { margin: 8px 0 0; font-size: 15px; color: #b9b6ae; }
.sb-watch .btn { border-radius: 999px; padding-inline: 24px; }
.sb-watch .btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.sb-watch .btn-outline { background: transparent; border-color: rgb(255 255 255 / .4); color: #f2f0eb; }

@media (max-width: 1000px) {
  .sb-hero { grid-template-columns: 1fr; }
  .sb-cols { grid-template-columns: 1fr; }
  .sb-aside { position: static; margin-top: 8px; }
}
@media (max-width: 640px) {
  .sb-tools .btn { flex: 1 1 auto; }
  .sb-ready { padding: 18px; gap: 16px; } .sb-ring-big { width: 84px; height: 84px; }
  .sb-paper { flex-direction: column; }
  .sb-paper .sb-cover { width: auto; min-height: 104px; border-radius: var(--r) var(--r) 0 0; border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--c) 18%, var(--line-2)); }
  .sb-score { left: auto; right: 14px; top: 10px; bottom: auto; width: 56px; height: 56px; }
  .sb-fit { top: auto; bottom: 12px; }
  .sb-paper .pc-body { padding: 14px 16px 12px; }
  .sb-acts .sb-act[data-sx-more] { display: none; }
  .sb-open, .sb-watch { padding: 22px; }
}

/* Scout, step 2: the project split into parts, editable before searching */
.parts { max-width: 760px; padding: 28px; }
.parts-title { margin: 0; font: 400 clamp(26px, 3vw, 36px)/1.05 var(--pixel); letter-spacing: -.01em; }
.parts-summary { margin: 12px 0 0; font-size: 17px; line-height: 1.5; }
.parts-help { margin: 8px 0 0; max-width: 62ch; font-size: 14px; line-height: 1.55; color: var(--muted); }
.parts-list { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--line); }
.parts-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 40px; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.parts-n { display: grid; place-items: center; width: 28px; height: 28px; margin-top: 22px; border-radius: 6px; background: var(--n); color: #fff; font: 400 14px var(--pixel); }
.parts-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; }
.parts-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.parts-lab { font-size: 13px; font-weight: 500; color: var(--muted); }
.parts-name { font-weight: 600; }
.parts-del { width: 40px; height: 44px; margin-top: 22px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--muted); font-size: 15px; cursor: pointer; }
.parts-del:hover:not(:disabled) { border-color: var(--line); color: var(--ink); }
.parts-del:disabled { opacity: .3; cursor: default; }
.parts-add { margin-top: 14px; padding: 10px 14px; border: 1.5px dashed var(--line); border-radius: 10px; background: none; color: var(--ink); font: 500 14px var(--sans); cursor: pointer; }
.parts-add:hover { border-color: var(--ink); }
.parts-error { margin: 14px 0 0; }
.parts-error[hidden] { display: none; }
.parts-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.sx-scope { margin: 16px 0 0; max-width: 72ch; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.sx-scope b { color: var(--ink); font-weight: 600; }
@media (max-width: 680px) {
  .parts { padding: 20px; }
  .parts-row { grid-template-columns: minmax(0, 1fr) 40px; gap: 10px; }
  .parts-n { display: none; }
  .parts-fields { grid-template-columns: 1fr; gap: 10px; }
  .parts-field:first-child .parts-lab { color: var(--n); font-weight: 600; }
  .parts-acts .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---- Decluttered home and paper page ---- */
.hero { grid-template-columns: minmax(0, 1fr); }
.hero .lead { max-width: 62ch; }
.split:has(> aside[hidden]) { grid-template-columns: minmax(0, 1fr); }
.paper-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.paper-actions .btn { min-height: 40px; }
.tools-menu .rail-notes { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.source { margin-top: 32px; }
@media (max-width: 680px) {
  .paper-actions .btn-primary { flex: 1 1 100%; justify-content: center; }
  .paper-actions .btn-outline { flex: 1 1 0; justify-content: center; }
}

/* ---- Paper page: the full breakdown ---- */
.bd h2 { margin: 0 0 6px; }
.bd-note { margin: 0 0 14px; color: var(--muted); font-size: 14px; max-width: 62ch; }
.bd-out h3 { margin: 26px 0 10px; font: 400 20px/1.2 var(--pixel); letter-spacing: -.01em; }
.bd-out h3:first-child { margin-top: 8px; }
.bd-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; max-width: 68ch; }
.bd-list li::marker { color: var(--accent, #ff4f00); }
.bd-quote { margin: 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--line); max-width: 68ch; }
.bd-src { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.bd-table { margin: 0 0 18px; }
.bd-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.bd-scroll:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.bd-table table { border-collapse: collapse; width: 100%; font: 13px/1.4 var(--mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; }
.bd-table th, .bd-table td { padding: 7px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line-2); }
.bd-table tr:last-child td { border-bottom: 0; }
.bd-table th { font-weight: 600; background: var(--bg); }
.bd-table figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); max-width: 68ch; }
.bd-links { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.bd-links a { overflow-wrap: anywhere; }
.bd-short .tldr { margin: 6px 0 0; }
.bd-ai { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

/* ===========================================================================
   Paper page: text cover header, one-minute panel, key numbers, skim colours,
   breakdown tabs, where it fits, try it, inline Ask, phone action bar
   =========================================================================== */
.np { max-width: 1120px; margin: 0 auto; padding: 22px 0 64px; }
.np-paper { display: block; }
.np-crumbs { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.np-crumbs a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.np-crumbs a:hover { color: var(--ink); }
.np-hero { position: relative; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.np-cover { position: relative; height: 132px; padding: 16px 22px; overflow: hidden; isolation: isolate; border-radius: var(--r) var(--r) 0 0; background: color-mix(in srgb, var(--c) 10%, var(--surface)); border-bottom: 1px solid color-mix(in srgb, var(--c) 18%, var(--line-2)); }
.np-cover .pc-word { font-size: 120px; }
.np-cover .pc-stat { left: 22px; bottom: 14px; }
.np-cover .pc-stat b { font-size: 40px; }
.np-head { display: grid; gap: 14px; padding: 22px 22px 20px; }
.np-head h1 { margin: 0; max-width: 28ch; font: 650 clamp(26px, 3.2vw, 40px)/1.12 var(--sans); letter-spacing: -.025em; text-wrap: balance; }
.np-by { font-size: 14.5px; color: var(--muted); }
.np-lab { margin: 0 0 10px; display: flex; align-items: center; gap: 9px; min-width: 0; }
.np-lab .org-mark { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
.np-lab .org-mark .lm-3 { font-size: 10.5px; }
.np-lab .org-mark .lm-4 { font-size: 9px; }
.np-lab .org-name { font: 600 15px var(--sans); color: var(--ink); }
.np-more { display: inline; }
.np-more summary { display: inline; cursor: pointer; color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; list-style: none; }
.np-more summary::-webkit-details-marker { display: none; }
.np-more[open] summary { display: none; }
.np-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.np-row .sig { height: 26px; }
.np-actions .btn { height: 40px; }
.np-tools { position: relative; }
.np-tools > summary { width: auto; }
.np-tools:not([open]) .tools-menu { display: none; }

/* Paper page: "Copy for LLM" and "View as Markdown" */
.np-ai { display: inline-flex; align-items: center; margin-left: auto; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); overflow: hidden; }
.np-ai button, .np-ai a { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 0; background: none; color: var(--ink); font: 500 14px var(--sans); cursor: pointer; text-decoration: none; }
.np-ai > * + * { border-left: 1px solid var(--line); }
.np-ai button:hover, .np-ai a:hover { background: var(--line-2); }
.np-ai .is-done { color: var(--good, #1a7f37); }
.np-md { width: min(760px, calc(100vw - 32px)); max-height: 82vh; padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 30px 60px -20px rgb(0 0 0 / .4); }
.np-md[open] { display: flex; flex-direction: column; }
.np-md::backdrop { background: rgb(0 0 0 / .35); }
.np-md-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.np-md-head b { font: 600 15px var(--sans); } .np-md-head small { font-size: 13px; color: var(--muted); }
.np-md-head .np-md-btns { display: flex; gap: 8px; margin-left: auto; }
.np-md pre { flex: 1; margin: 0; padding: 18px; overflow: auto; font: 13px/1.6 var(--mono); background: var(--bg); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Paper page: the sticky "On this page" bar, and its reading line */
.np-otp { position: sticky; top: var(--header-h, 64px); z-index: 15; margin: 8px 0 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.np-otp-in { display: flex; align-items: center; gap: 4px; height: 48px; overflow-x: auto; scrollbar-width: none; }
.np-otp-in::-webkit-scrollbar { display: none; }
.np-otp-in b { flex: none; margin-right: 10px; font: 400 11px/1 var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.np-otp a { flex: none; padding: 7px 11px; border-radius: 8px; color: var(--muted); font: 500 13.5px var(--sans); text-decoration: none; white-space: nowrap; }
.np-otp a:hover { color: var(--ink); background: var(--line-2); }
.np-otp a[aria-current] { color: var(--accent-ink); background: var(--accent-wash); }
.np-otp a[hidden] { display: none; }
.np-otp-time { flex: none; margin-left: auto; padding-left: 12px; font: 400 12px var(--pixel); color: var(--muted); }
.np-otp-bar { height: 2px; margin-bottom: -1px; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.np-sec[id] { scroll-margin-top: calc(var(--header-h, 64px) + 64px); }
.np-hash { margin-left: 6px; color: var(--muted); text-decoration: none; font-family: var(--mono); opacity: 0; }
.np-sec > h2:hover .np-hash, .np-hash:focus-visible { opacity: 1; }
@media (max-width: 680px) {
  .np-ai { margin-left: 0; }
  .np-otp-time { display: none; }
}
.np-tools .tools-menu { position: absolute; z-index: 30; left: auto; right: 0; top: calc(100% + 6px); width: 260px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.np-tools .cite-box { left: auto; right: 0; width: min(560px, calc(100vw - 32px)); }
.np-tools .rail-notes:has([data-notes-empty]:not([hidden])) .note-list { display: none; }
.np-glance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.np-glance > div { display: grid; align-content: center; gap: 3px; min-height: 72px; padding: 14px 22px; border-right: 1px solid var(--line-2); }
.np-glance > div:last-child { border-right: 0; }
.np-glance b { font: 650 22px/1.1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.np-glance span { font-size: 12.5px; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.np-glance .na b { color: var(--muted); font-weight: 500; }

.np-sec { margin-top: 36px; }
.np-sec > h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 14px; font: 400 13px/1.2 var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.np-sec > h2 small { font: 400 12.5px/1.4 var(--sans); letter-spacing: 0; text-transform: none; color: var(--muted); }
.np-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.np-note a { text-decoration: underline; text-underline-offset: 3px; }

/* The paper in one minute */
.m1 { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.m1-top { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 22px; border-bottom: 1px solid var(--line-2); }
.m1-top .label { color: var(--ink); font-size: 12px; }
.seg { margin-left: auto; display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.seg button { height: 30px; padding: 0 12px; border: 1px solid transparent; border-radius: 7px; background: none; font: 500 13px var(--sans); color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); border-color: var(--line); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.m1-tldr { margin: 0; padding: 22px 22px 20px; font: 550 clamp(20px, 2vw, 25px)/1.4 var(--sans); letter-spacing: -.018em; text-wrap: pretty; }
.m1-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line-2); }
.m1-grid.m1-n1 { --cols: 1; } .m1-grid.m1-n2 { --cols: 2; }
.m1-grid > div { display: grid; align-content: start; gap: 8px; padding: 16px 22px 18px; border-right: 1px solid var(--line-2); }
.m1-grid > div:last-child { border-right: 0; }
.m1-grid dt { display: flex; align-items: center; gap: 8px; font: 400 11px/1.2 var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.m1-grid dt i { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: var(--ink); color: var(--bg); font-style: normal; font-size: 10px; letter-spacing: 0; }
.m1-grid .key dt i { background: var(--yellow); color: #111; }
.m1-grid dd { margin: 0; font-size: 15px; line-height: 1.6; }
.m1-grid .key dd { background: linear-gradient(transparent 60%, var(--yellow-wash) 60%); }
.m1-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 10px 22px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--muted); }
.m1-foot .ok { color: var(--good); font-weight: 600; }
.m1-foot a { margin-left: auto; text-decoration: underline; text-underline-offset: 3px; }

/* Defined terms: a dotted underline that opens a definition on hover, focus or tap */
.term { text-decoration: underline dotted color-mix(in srgb, var(--ink) 55%, transparent); text-decoration-thickness: 2px; text-underline-offset: 5px; cursor: help; }
.term:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
/* The tip is placed against its paragraph, not the word, so it never runs off a phone screen */
.m1-tldr, .m1-grid dd, .np-abs p { position: relative; }
.term-tip { display: none; position: absolute; z-index: 40; left: 0; margin-top: 1.9em; width: min(340px, 100%); padding: 12px 14px; border-radius: 10px; background: var(--ink); color: var(--bg); font: 400 13.5px/1.5 var(--sans); letter-spacing: 0; text-align: left; box-shadow: var(--shadow); pointer-events: none; }
.term-tip b { display: block; margin-bottom: 3px; font-weight: 600; }
.term:hover .term-tip, .term:focus .term-tip, .term.is-open .term-tip { display: block; }

/* Key numbers: same-size tiles */
.kn { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 12px; }
.kn-1 { --n: 1; } .kn-2 { --n: 2; }
.kn > div { display: grid; align-content: start; gap: 8px; min-height: 120px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.kn b { font: 650 32px/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kn p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }

/* Abstract with the skim colours */
.np-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.skim-key { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 500 13px var(--sans); }
.skim-key i { width: 10px; height: 10px; border-radius: 3px; background: var(--h); }
.skim-goal { --h: #2a7de1; } .skim-method { --h: #8a4fd6; } .skim-result { --h: #13995a; }
:root[data-theme="dark"] .skim-goal { --h: #6ea8ff; } :root[data-theme="dark"] .skim-method { --h: #b78cff; } :root[data-theme="dark"] .skim-result { --h: #4ade80; }
.np-legend [data-skim-toggle] { margin-left: auto; }
.np-legend .btn[data-skim-toggle] { background: var(--surface); color: var(--ink); box-shadow: none; }
.np-abs { padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.np-abs p { max-width: none; font-size: calc(16.5px * var(--reader-scale, 1)); line-height: 1.8; }
.np-abs .skim { padding: 1px 2px; border-radius: 3px; background: color-mix(in srgb, var(--h) 13%, transparent); box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--h) 55%, transparent); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.np-abs.no-skim .skim { background: none; box-shadow: none; }
.np-legend.no-skim .skim-key { opacity: .45; }

/* From the full paper */
.np-bd { padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.np-bd .bd-note { margin: 0; font-size: 13px; }
.np-bd .bd-out:not(:empty) { margin-top: 12px; }
.bd-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.bd-tabs button { height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font: 500 14px var(--sans); cursor: pointer; }
.bd-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.bd-panel h3 { display: none; }
.bd-skel { display: grid; gap: 10px; margin-top: 12px; } .bd-skel span { height: 12px; border-radius: 4px; background: var(--line-2); }

/* Build ideas: same-size cards */
.np-level { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.np-ideas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.np-ideas li { display: grid; align-content: start; gap: 10px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-size: 15px; line-height: 1.5; }
.np-ideas li span { font: 400 13px var(--pixel); color: var(--accent-ink); }

/* Where it fits */
.lin { display: grid; grid-template-columns: 1fr 34px 1fr 34px 1fr; }
.lin-col { display: grid; align-content: start; gap: 8px; min-width: 0; }
.lin-col > .label small { margin-left: 4px; letter-spacing: 0; text-transform: none; font-family: var(--sans); }
.lin-item { display: grid; align-content: center; gap: 3px; min-height: 64px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; line-height: 1.35; }
a.lin-item:hover { border-color: var(--ink); }
.lin-item small { font-size: 12px; color: var(--muted); }
.lin-item.here { border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 8%, var(--surface)); font-weight: 600; }
.lin-arrow { display: grid; place-items: center; padding-top: 22px; color: var(--muted); font-size: 18px; }
.lin-empty { display: grid; align-content: center; min-height: 64px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; font-size: 13.5px; color: var(--muted); }

/* Try it */
.try { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.try-tile { display: grid; align-content: start; gap: 4px; min-height: 92px; min-width: 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
a.try-tile:hover { border-color: var(--ink); }
.try-tile b { font: 600 15px var(--sans); }
.try-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.try-tile.off b { color: var(--muted); font-weight: 500; }

/* Ask, inline */
.np-ask { display: grid; gap: 12px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.np-ask .ask-suggest { margin: 0; }
.np-ask .ask-form .input { height: 44px; }
.np-quiz { display: grid; justify-items: start; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.np-quiz .check-q { font-size: 16px; }
.np-quiz .check-a { margin: 0; width: 100%; background: var(--yellow-wash); }

.np-paper .feedback { margin-top: 36px; }
.np-paper .done-card { grid-template-columns: 1fr; margin: 28px 0 0; }
.np-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.np-paper .subscribe { margin-top: 36px; }
.np-mbar { display: none; }

@media (max-width: 860px) {
  .np { padding: 14px 0 96px; }
  .np-cover { height: 108px; padding: 12px 16px; } .np-cover .pc-stat { left: 16px; } .np-cover .pc-stat b { font-size: 32px; } .np-cover .pc-word { font-size: 84px; }
  .np-head { padding: 18px 16px; }
  .np-actions .btn-primary, .np-actions [data-save] { display: none; }
  .np-actions .btn { height: 38px; }
  .np-glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .np-glance > div { padding: 12px 16px; }
  .np-glance > div:nth-child(2n) { border-right: 0; }
  .np-glance > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
  .np-sec > h2 { flex-direction: column; align-items: flex-start; }
  .m1-top { flex-wrap: wrap; padding: 10px 16px; } .seg { margin-left: 0; width: 100%; } .seg button { flex: 1; }
  .m1-tldr { padding: 18px 16px; }
  .m1-grid { grid-template-columns: 1fr; } .m1-grid > div { border-right: 0; border-bottom: 1px solid var(--line-2); padding: 14px 16px; } .m1-grid > div:last-child { border-bottom: 0; }
  .m1-foot { padding: 10px 16px; } .m1-foot a { margin-left: 0; }
  .kn { grid-template-columns: 1fr; } .kn > div { min-height: 0; } .kn b { font-size: 28px; }
  .np-abs, .np-bd, .np-ask { padding: 16px; }
  .np-legend [data-skim-toggle] { margin-left: 0; }
  .np-ideas, .np-related { grid-template-columns: 1fr; }
  .lin { grid-template-columns: 1fr; gap: 6px; } .lin-arrow { padding: 0; height: 22px; transform: rotate(90deg); }
  .try { grid-template-columns: 1fr 1fr; }
  .np-mbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
  .np-mbar .btn { flex: 1; height: 44px; justify-content: center; }
  .np-mbar .btn-icon { flex: 0 0 48px; padding: 0; }
}

/* ---------- Lab names as links, and the By lab page ---------- */
.pcard-by a.org-name { position: relative; z-index: 1; text-decoration: none; }
.pcard-by a.org-name:hover, .np-lab a.org-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.np-lab a.org-name { text-decoration: none; }
.lab-filter { margin-left: 4px; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 12.5px var(--sans); cursor: pointer; vertical-align: middle; }
.lab-filter:hover { border-color: var(--ink); }
.lab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; padding-bottom: 48px; }
.lab-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.lab-card[hidden] { display: none; }
.lab-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lab-head > div { min-width: 0; }
.lab-head .org-mark { width: 40px; height: 40px; border-radius: 10px; font-size: 15px; }
.lab-head .org-mark .lm-3 { font-size: 13px; }
.lab-head .org-mark .lm-4 { font-size: 11px; }
.lab-head h2 { margin: 0; font: 600 18px/1.25 var(--sans); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-head h2 a { color: var(--ink); text-decoration: none; }
.lab-head h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lab-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lab-topics { display: flex; flex-wrap: nowrap; gap: 6px; height: 26px; overflow: hidden; }
.lab-topics .sig { flex: none; }
.lab-topics .sig b { font-weight: 600; color: var(--ink); }
.lab-papers { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--line-2); }
.lab-papers li { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); min-width: 0; }
.lab-papers a { flex: 1; min-width: 0; color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lab-papers a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lab-papers time { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lab-all { margin-top: auto; align-self: flex-start; font: 600 13.5px var(--sans); color: var(--ink); text-decoration: none; }
.lab-all:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Official logos keep their own colours, so they sit on a white tile in both themes */
.org-mark.has-img { background: #fff; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
[data-theme="dark"] .org-mark.has-img { box-shadow: none; }
.org-mark.has-img img { display: block; width: 80%; height: 80%; object-fit: contain; }

/* ---------- Case studies ---------- */
:root { --l-rag: #1971c2; --l-agents: #0c8599; --l-evals: #7048e8; --l-cost: #e8590c; --l-tuning: #9c36b5; --l-safety: #c92a2a; --l-llm: #2f9e44;
  --l-recs: #c2255c; --l-ads: #868e96; --l-predict: #8d5a00; --l-vision: #5c940d;
  --l-coding: #3b5bdb; --l-data: #087f5b; --l-ops: #d9480f; --l-support: #a61e4d; --l-platforms: #495057;
  /* Categories the classifier proposed get one of these, picked from a hash of the name (case_pages.color) */
  --l-x0: #1864ab; --l-x1: #5f3dc4; --l-x2: #0b7285; --l-x3: #a61e4d; --l-x4: #2b8a3e; --l-x5: #e67700; --l-x6: #862e9c; --l-x7: #5c7cfa; }
:root[data-theme="dark"] { --l-rag: #4dabf7; --l-agents: #3bc9db; --l-evals: #9775fa; --l-cost: #ff922b; --l-tuning: #da77f2; --l-safety: #ff6b6b; --l-llm: #69db7c;
  --l-recs: #f06595; --l-ads: #adb5bd; --l-predict: #e8b04b; --l-vision: #a9e34b;
  --l-coding: #748ffc; --l-data: #38d9a9; --l-ops: #ff8787; --l-support: #f783ac; --l-platforms: #ced4da;
  --l-x0: #74c0fc; --l-x1: #b197fc; --l-x2: #66d9e8; --l-x3: #faa2c1; --l-x4: #8ce99a; --l-x5: #ffd43b; --l-x6: #e599f7; --l-x7: #91a7ff; }
.cs-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.cs-wrap { max-width: 1180px; margin: 0 auto; padding-bottom: 72px; font-feature-settings: "tnum" 1; }
.cs-ink { color: var(--ink); }
.cs-ext { width: 13px; height: 13px; flex: none; }
/* hero */
.cs-top { padding: 64px 0 0; }
.cs-top h1 { margin: 0; font: 600 clamp(40px, 6.4vw, 80px)/.96 var(--sans); letter-spacing: -.05em; }
.cs-top > p { margin: 20px 0 0; max-width: 58ch; font-size: 18px; line-height: 1.55; color: var(--muted); }
/* search, company menu and topic chips */
.cs-tools { display: flex; align-items: flex-end; gap: 16px; margin-top: 40px; }
.cs-find { flex: 1; max-width: 520px; }
.cs-find label, .cs-sel span { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--ink); }
.cs-search { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.cs-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.cs-search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.cs-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 15px/1 var(--sans); color: var(--ink); }
.cs-search input::placeholder { color: var(--muted); }
.cs-sel select { height: 44px; min-width: 220px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 500 14px var(--sans); }
.cs-sel select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.cs-chips a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 500 14px var(--sans); cursor: pointer; }
.cs-chips a span { color: var(--muted); font-weight: 400; }
.cs-chips a i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.cs-chips a:hover { border-color: color-mix(in srgb, var(--ink) 35%, var(--line)); }
.cs-chips a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--paper, var(--surface)); }
.cs-chips a[aria-current] span { color: inherit; opacity: .7; }
.cs-chips a[aria-current] i { box-shadow: 0 0 0 2px var(--surface); }
.cs-status { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; min-height: 44px; margin: 20px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.cs-status p { margin: 0; font-size: 14px; color: var(--muted); }
.cs-active b { color: var(--ink); font-weight: 600; }
.cs-active button { margin-left: 8px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: 500 13px var(--sans); cursor: pointer; }
/* cards: a brand cover with the real logo, then the write-up */
.cs-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cs-link { color: inherit; text-decoration: none; }
.cs-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.cs-link:focus-visible { outline: 0; }
.cs-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.cs-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); box-shadow: 0 18px 40px -24px rgb(0 0 0 / .35); }
.cs-card:has(.cs-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.cs-cover { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; align-content: space-between; gap: 12px; min-height: 164px; box-sizing: border-box; padding: 18px 20px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--b) 15%, var(--surface)), color-mix(in srgb, var(--b) 5%, var(--surface))); }
:root[data-theme="dark"] .cs-cover { background: linear-gradient(135deg, color-mix(in srgb, var(--b) 24%, var(--surface)), color-mix(in srgb, var(--b) 8%, var(--surface))); }
.cs-cover > * { position: relative; z-index: 1; }
.cs-cover > .cs-big { position: absolute; z-index: 0; right: -30px; bottom: -44px; width: 170px; height: 170px; pointer-events: none; }
.cs-mono { display: grid; place-items: center; border-radius: 22%; background: var(--b); color: #fff; font: 600 12px/1 var(--sans); }
.cs-big.cs-mono { font-size: 88px; border-radius: 36px; }
.cs-co { display: inline-flex; align-items: center; gap: 9px; font: 600 18px/1.2 var(--sans); letter-spacing: -.02em; }
.cs-badge { display: block; width: 22px; height: 22px; flex: none; }
.cs-cover time { font-size: 13px; color: var(--muted); align-self: center; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 80%, transparent); }
.cs-topic { grid-column: 1 / -1; justify-self: start; align-self: end; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 10px; border-radius: 999px; background: var(--surface); box-shadow: 0 1px 2px rgb(0 0 0 / .08); font-size: 13px; font-weight: 600; }
.cs-topic::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.cs-body { display: flex; flex-direction: column; flex: 1; padding: 20px 20px 16px; }
.cs-body h3 { margin: 0; font: 600 19px/1.32 var(--sans); letter-spacing: -.018em; text-wrap: pretty; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cs-body > p { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cs-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; }
.cs-tags button { position: relative; z-index: 2; min-height: 28px; padding: 0 10px; border: 0; border-radius: 7px; background: color-mix(in srgb, var(--ink) 6%, var(--surface)); color: color-mix(in srgb, var(--ink) 80%, var(--surface)); font: 500 12.5px var(--sans); cursor: pointer; transition: background .15s, color .15s; }
.cs-tags button:hover { background: color-mix(in srgb, var(--ink) 12%, var(--surface)); color: var(--ink); }
.cs-tags button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.cs-rel { position: relative; z-index: 2; display: flex; gap: 10px; margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); color: var(--ink); text-decoration: none; transition: background .15s; }
.cs-rel:hover { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.cs-rel svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--accent-ink); }
.cs-rel span { display: block; font-size: 12px; color: var(--muted); }
.cs-rel b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.4; font-weight: 500; }
.cs-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; }
.cs-body > :nth-last-child(2) { margin-bottom: 18px; }
.cs-foot { border-top: 1px solid var(--line-2); }
.cs-src { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.cs-src .cs-ext { color: var(--muted); }
.cs-card:hover .cs-src, .cs-card:hover .cs-src .cs-ext { color: var(--accent-ink); }
.cs-save { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-right: -8px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: 500 13px var(--sans); cursor: pointer; flex: none; transition: background .15s, color .15s; }
.cs-save svg { width: 16px; height: 16px; }
.cs-save:hover { background: color-mix(in srgb, var(--ink) 6%, var(--surface)); color: var(--ink); }
.cs-save[aria-pressed="true"] { color: var(--accent-ink); }
.cs-save[aria-pressed="true"] svg { fill: currentColor; }
/* the newest write-up, wide */
.cs-grid:not(.cs-plain) > .cs-card:first-child { grid-column: span 2; flex-direction: row; }
.cs-grid:not(.cs-plain) > .cs-card:first-child .cs-cover { width: 46%; flex: none; min-height: 340px; }
.cs-grid:not(.cs-plain) > .cs-card:first-child .cs-cover > .cs-big { width: 290px; height: 290px; right: -48px; bottom: -70px; }
.cs-grid:not(.cs-plain) > .cs-card:first-child .cs-co { font-size: 24px; } .cs-grid:not(.cs-plain) > .cs-card:first-child .cs-badge { width: 28px; height: 28px; }
.cs-grid:not(.cs-plain) > .cs-card:first-child .cs-body { padding: 28px 28px 20px; }
.cs-grid:not(.cs-plain) > .cs-card:first-child h3 { font-size: 30px; line-height: 1.15; letter-spacing: -.035em; -webkit-line-clamp: 4; }
.cs-grid:not(.cs-plain) > .cs-card:first-child .cs-body > p { margin-top: 14px; font-size: 17px; -webkit-line-clamp: 4; }
.cs-tags button:focus-visible, .cs-save:focus-visible, .cs-rel:focus-visible, .cs-chips a:focus-visible, .cs-active button:focus-visible, .cs-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .cs-card, .cs-card:hover { transition: none; transform: none; } }
/* The site's own case study ("How I built AI Papers Daily"): a wide card with the pixel-art cover */
.cs-own { grid-column: span 2; }
.cs-own > a { display: grid; grid-template-columns: 1fr 1fr; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: var(--muted); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.cs-own > a:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); box-shadow: 0 18px 40px -24px rgb(0 0 0 / .35); }
.cs-own > a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cs-own-cv { position: relative; min-height: 320px; background: var(--bg); }
.cs-own-cv .art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cs-own .art .a1 { fill: #ffe9de; } .cs-own .art .a2 { fill: #ffc3a3; } .cs-own .art .a3 { fill: #ff8549; } .cs-own .art .a4 { fill: var(--accent); }
.cs-own .art .pick { fill: var(--yellow); stroke: var(--ink); stroke-width: 2; }
:root[data-theme="dark"] .cs-own .art .a1 { fill: #2a160d; } :root[data-theme="dark"] .cs-own .art .a2 { fill: #6b2d12; } :root[data-theme="dark"] .cs-own .art .a3 { fill: #c2440f; }
:root[data-theme="dark"] .cs-own .art .pick { stroke: var(--yellow); }
.cs-own-tag { position: absolute; left: 16px; top: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; background: var(--surface); color: var(--ink); font: 500 13px var(--mono); }
.cs-own-mk { width: 14px; height: 14px; border-radius: 3px; background: conic-gradient(from 90deg, var(--accent) 0 25%, var(--ink) 0 50%, var(--accent) 0 75%, var(--ink) 0); }
.cs-own-bd { display: flex; flex-direction: column; padding: 24px; }
.cs-own-lbl { margin: 0; font: 500 12px/1.2 var(--mono); color: var(--accent-ink); }
.cs-own h3 { margin: 10px 0 0; color: var(--ink); font: 300 clamp(26px, 2.6vw, 34px)/1.08 var(--sans); letter-spacing: -.03em; text-wrap: balance; }
.cs-own-d { margin: 14px 0 0; font-size: 15px; line-height: 1.55; }
.cs-own-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cs-own-chips span { padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; font: 12px var(--mono); }
.cs-own-go { display: flex; align-items: center; justify-content: space-between; margin: auto 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--accent-ink); font-size: 15px; }
.cs-own-go .ar { width: 16px; height: 16px; transition: transform .2s ease; }
.cs-own > a:hover .cs-own-go .ar { transform: translateX(3px); }
@media (max-width: 980px) { .cs-own > a { grid-template-columns: 1fr; } .cs-own-cv { min-height: 200px; } }
@media (max-width: 640px) { .cs-own { grid-column: auto; } }
@media (prefers-reduced-motion: reduce) { .cs-own > a, .cs-own > a:hover, .cs-own-go .ar { transition: none; transform: none; } }
/* topic sections on the main page, and the topic pages */
.cs-chips a { text-decoration: none; }
.cs-chips { margin-top: 36px; }
.cs-tools { margin-top: 20px; }
.cs-sec { margin-top: 56px; scroll-margin-top: 80px; }
.cs-sec:first-child { margin-top: 40px; }
.cs-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cs-sec-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 28px/1.1 var(--sans); letter-spacing: -.03em; }
.cs-sec-head h2 a { color: inherit; text-decoration: none; }
.cs-sec-head h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--c); }
.cs-sec-head h2 i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.cs-sec-head p { margin: 8px 0 0; font-size: 15px; color: var(--muted); max-width: 62ch; }
.cs-see { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 500 14px var(--sans); text-decoration: none; }
.cs-see:hover { border-color: var(--ink); }
.cs-see .cs-ext { width: 15px; height: 15px; }
.cs-crumb { margin: 0; padding: 28px 0 0; font-size: 14px; color: var(--muted); }
.cs-crumb a { color: var(--muted); }
.cs-topic-top { padding-top: 20px; }
.cs-topic-top h1 { display: flex; align-items: center; gap: 18px; }
.cs-topic-top h1::before { content: ""; width: .32em; height: .32em; border-radius: 50%; background: var(--c); flex: none; }
/* more, nothing found, empty */
.cs-more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 20px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: 500 14px var(--sans); color: var(--ink); cursor: pointer; }
.cs-more:hover { border-color: var(--accent); color: var(--accent-ink); }
.cs-none { padding: 24px 0; }
.cs-none p, .cs-empty p { margin: 0; font-size: 15px; color: var(--muted); }
.cs-none .cs-more { margin-top: 12px; }
.cs-empty { margin-top: 40px; padding: 24px; border: 1px dashed var(--line); border-radius: 14px; }
.cs-empty b { color: var(--ink); font-weight: 500; }
@media (max-width: 980px) { .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-grid:not(.cs-plain) > .cs-card:first-child { flex-direction: column; } .cs-grid:not(.cs-plain) > .cs-card:first-child .cs-cover { width: auto; min-height: 220px; } }
@media (max-width: 640px) {
  .cs-top { padding-top: 40px; } .cs-top > p { font-size: 16px; }
  .cs-tools { flex-direction: column; align-items: stretch; margin-top: 28px; } .cs-find { max-width: none; } .cs-sel select { width: 100%; min-width: 0; }
  .cs-grid { grid-template-columns: minmax(0, 1fr); }
  .cs-sec { margin-top: 44px; } .cs-sec-head { flex-direction: column; align-items: flex-start; } .cs-sec-head h2 { font-size: 24px; }
  .cs-grid:not(.cs-plain) > .cs-card:first-child { grid-column: auto; } .cs-grid:not(.cs-plain) > .cs-card:first-child h3 { font-size: 24px; } .cs-grid:not(.cs-plain) > .cs-card:first-child .cs-body { padding: 20px 20px 16px; }
  .cs-tags button { min-height: 36px; } .cs-save { min-height: 44px; }
}

/* ---------- Main menu: icons and labels; on phones it moves to a bar at the bottom ---------- */
.nav { flex: none; }
.header-actions { flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
.header-actions .cmdk { flex: 0 1 400px; width: auto; min-width: 150px; }
.cmdk span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 681px) and (max-width: 1360px) { .bar-in { gap: 16px; } }
@media (min-width: 1001px) and (max-width: 1180px) { .nav-long { display: none; } .nav-short { display: inline; } }
@media (min-width: 681px) and (max-width: 1000px) {
  .header-actions .cmdk { flex: none; width: 40px; min-width: 0; padding: 0; justify-content: center; } .cmdk span, .cmdk kbd { display: none; }
  .brand-name { display: none; }
  .nav a { padding: 8px 9px; }
  .nav-long { display: none; } .nav-short { display: inline; }
}
@media (min-width: 681px) and (max-width: 820px) {
  .nav a .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav a { padding: 10px; }
  .nav-count { position: absolute; top: 1px; right: -2px; margin: 0; min-width: 16px; height: 16px; font-size: 10px; }
}
@media (max-width: 680px) {
  /* A frosted pill floating above the page; --mnav is the room it takes at the bottom */
  :root { --mnav: 78px; }
  .nav { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40; gap: 0; padding: 6px; border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); box-shadow: 0 10px 30px -10px rgb(0 0 0 / .35), 0 2px 6px rgb(0 0 0 / .06); }
  .nav a { flex: 1 1 0; min-width: 0; height: 52px; flex-direction: column; justify-content: center; gap: 3px; padding: 0 2px; border-radius: 999px; font-size: 10.5px; line-height: 1; color: var(--muted); transition: background-color .2s, color .2s; }
  .nav-ic { width: 21px; height: 21px; }
  .nav a:hover { background: none; color: var(--ink); }
  .nav a[aria-current="page"], .nav a[aria-current="page"]:hover { background: var(--ink); color: var(--surface); font-weight: 600; }
  .nav-count { position: absolute; top: 5px; left: calc(50% + 4px); margin: 0; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; box-shadow: 0 0 0 2px var(--surface); }
  body { padding-bottom: calc(var(--mnav) + env(safe-area-inset-bottom)); }
  body.focus { padding-bottom: 0; }
  .np-mbar { bottom: calc(var(--mnav) + env(safe-area-inset-bottom)); padding-bottom: 10px; background: transparent; border-top: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .np-mbar .btn-outline { background: var(--surface); }
  body:has(.np-mbar) { padding-bottom: calc(var(--mnav) + 60px + env(safe-area-inset-bottom)); }
  @media (prefers-reduced-motion: reduce) { .nav a { transition: none; } }
  .ask-fab { bottom: calc(var(--mnav) + 16px + env(safe-area-inset-bottom)); }
  .ask-panel { inset: auto 16px calc(var(--mnav) + 16px + env(safe-area-inset-bottom)) auto; max-height: min(64vh, 560px); }
  .header-actions .cmdk { flex: none; width: 40px; min-width: 0; padding: 0; justify-content: center; } .cmdk span, .cmdk kbd { display: none; }
}
@media (max-width: 420px) {
  .brand-name { display: none; }
}

/* ---------- Case studies: how it was built, the result, technique tags, approach filters ---------- */
.cs-body > p:not(.cs-result) { color: color-mix(in srgb, var(--ink) 78%, var(--surface)); -webkit-line-clamp: 4; }
.cs-body > p.cs-result { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: 14.5px; font-weight: 600; line-height: 1.4; color: var(--ink); -webkit-line-clamp: unset; }
.cs-result svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--c); }
.cs-tags button { display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, var(--line)); color: var(--ink); }
.cs-tags button::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--c); }
.cs-tags button:hover { background: color-mix(in srgb, var(--c) 9%, var(--surface)); color: var(--ink); }
.cs-tags button[aria-pressed="true"] { background: var(--ink); color: var(--surface); box-shadow: none; }
.cs-tags button[aria-pressed="true"]::before { background: var(--surface); }
.cs-ap { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; }
.cs-ap p { margin: 0; flex: none; font-size: 14px; color: var(--muted); }
.cs-ap div { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-ap button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, var(--line)); color: var(--ink); font: 500 13px var(--sans); cursor: pointer; }
.cs-ap button[hidden] { display: none; }
.cs-ap button:not(.cs-ap-more)::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.cs-ap button span { color: var(--muted); font-weight: 400; }
.cs-ap button:hover { background: color-mix(in srgb, var(--c) 9%, var(--surface)); }
.cs-ap button[aria-pressed="true"] { background: var(--ink); color: var(--surface); box-shadow: none; }
.cs-ap button[aria-pressed="true"]::before { background: var(--surface); }
.cs-ap button[aria-pressed="true"] span { color: inherit; opacity: .7; }
.cs-ap .cs-ap-more { box-shadow: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.cs-ap button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* One row of topics that scrolls sideways, one row for search and company */
/* The edge with more chips behind it fades (--fl, --fr); app.js sets data-left / data-right on the
   bar and shows the arrow buttons on screens with a mouse. Without JavaScript the right edge fades. */
@property --fl { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --fr { syntax: "<length>"; inherits: true; initial-value: 0px; }
.cs-chipbar { position: relative; margin-top: 32px; --fl: 0px; --fr: 48px; transition: --fl .18s ease, --fr .18s ease; }
.cs-chipbar[data-js] { --fr: 0px; }
.cs-chipbar[data-left] { --fl: 56px; }
.cs-chipbar[data-right] { --fr: 56px; }
.cs-chips { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; gap: 6px; margin-top: 0; padding: 4px 2px;
  scroll-padding-inline: 56px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%); }
.cs-chips::-webkit-scrollbar { display: none; }
.cs-chips a { flex: none; min-height: 36px; padding: 0 13px; font-size: 13.5px; gap: 7px; }
.cs-chips a:last-child { margin-right: 12px; } /* room after the last chip, so it never sits flush against the edge */
.cs-chip-arrow { position: absolute; top: 50%; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; margin-top: -16px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 10%, transparent), 0 4px 12px -6px color-mix(in srgb, var(--ink) 25%, transparent); }
.cs-chip-arrow[hidden] { display: none; }
.cs-chip-arrow svg { width: 16px; height: 16px; }
.cs-chip-prev { left: 0; } .cs-chip-next { right: 0; }
.cs-chip-arrow:hover { border-color: color-mix(in srgb, var(--ink) 35%, var(--line)); }
@media (hover: none), (pointer: coarse), (max-width: 640px) { .cs-chip-arrow { display: none !important; } }
@media (max-width: 640px) {
  .cs-chipbar { margin: 20px -16px 0; } .cs-chipbar[data-left] { --fl: 32px; } .cs-chipbar[data-right], .cs-chipbar:not([data-js]) { --fr: 32px; }
  .cs-chips { padding: 4px 0 4px 16px; scroll-padding-inline: 32px; } .cs-chips a { min-height: 44px; } .cs-chips a:last-child { margin-right: 16px; }
}
@media (prefers-reduced-motion: reduce) { .cs-chipbar { transition: none; } }
.cs-tools { align-items: center; gap: 10px; margin-top: 14px; }
.cs-find { max-width: none; }
.cs-sel select { min-width: 200px; }
/* Card text: the problem in plain words, then how they solved it */
.cs-body > p.cs-issue { margin-top: 12px; color: var(--ink); -webkit-line-clamp: 3; }
.cs-body > p.cs-fix { margin-top: 8px; -webkit-line-clamp: 3; }
.cs-issue b, .cs-fix b { font-weight: 600; color: var(--ink); margin-right: 4px; }
.cs-fix b { color: var(--c); filter: brightness(.8); }
:root[data-theme="dark"] .cs-fix b { filter: none; }
img.cs-img { object-fit: contain; border-radius: 22%; }
img.cs-badge.cs-img { border-radius: 6px; }
/* Case study cards use the same type as the "How I built AI Papers Daily" card:
   a light headline with tight spacing, mono labels and chips, an orange "Read" link */
.cs-body h3 { font: 300 23px/1.16 var(--sans); letter-spacing: -.028em; color: var(--ink); text-wrap: balance; }
.cs-body h3 a { color: inherit; }
.cs-body > p, .cs-body > p:not(.cs-result) { font-size: 15px; line-height: 1.55; color: var(--muted); }
.cs-body > p.cs-issue, .cs-issue b, .cs-fix b { font-weight: 500; }
.cs-body > p.cs-result { font-weight: 500; }
.cs-cover time { font: 500 12px var(--mono); }
.cs-topic { font: 500 12px var(--mono); }
.cs-tags button { min-height: 26px; padding: 0 8px; border-radius: 6px; font: 12px var(--mono); }
.cs-src { font-size: 15px; font-weight: 400; color: var(--accent-ink); }
.cs-src .cs-ext { color: var(--accent-ink); }
.cs-save { font-family: var(--mono); font-size: 12px; }
@media (max-width: 680px) {
  .cs-ap { align-items: flex-start; flex-direction: column; gap: 8px; }
  .cs-ap div { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .cs-ap button { flex: none; height: 38px; }
  .cs-ap button[data-cs-ap-extra] { display: inline-flex; } .cs-ap .cs-ap-more { display: none; }
  .cs-tools { flex-direction: column; align-items: stretch; }
  .cs-sel select { width: 100%; }
}

/* =====================================================================
   Paper page, reading layout (.rd)
   The title opens large across the page, then shrinks into a sticky
   column of paper details while the paper's summary, numbers and
   abstract read down the right. Rules and type, no boxes.
   ===================================================================== */
@font-face { font-family: "Newsreader"; src: url(fonts/newsreader.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(fonts/newsreader-italic.woff2) format("woff2"); font-style: italic; font-weight: 200 800; font-display: swap; }
.rd { --serif: "Newsreader", Georgia, serif; --dot: color-mix(in srgb, var(--muted) 45%, transparent); --chip: color-mix(in srgb, var(--ink) 5%, var(--bg));
  --rd-top: 88px; --topic: var(--c, var(--accent-ink)); padding-bottom: 40px; color: var(--ink); }
body.rd-page { background: var(--bg) radial-gradient(60% 40% at 92% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%) no-repeat; }

/* Opening screen */
.rd-hero { position: relative; padding: 40px 0 34px; }
.rd-x { position: absolute; font: 300 15px/1 var(--mono); color: var(--muted); transform: translate(-50%, -50%); pointer-events: none; }
.rd-x-tl, .rd-x-bl { left: 0; } .rd-x-tc, .rd-x-bc { left: 50%; } .rd-x-tr, .rd-x-br { left: 100%; }
.rd-x-tl, .rd-x-tc, .rd-x-tr { top: 18px; } .rd-x-bl, .rd-x-bc, .rd-x-br { top: calc(100% - 12px); }
.rd-kicker { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 22px; font: 400 12.5px/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rd-kicker a { color: inherit; text-decoration: none; } .rd-kicker a:hover { color: var(--ink); }
.rd-kicker .rd-topic { color: var(--topic); }
.rd-kicker .rd-badge { color: var(--accent-ink); }
.rd-kicker .rd-kicker-lab { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.rd-kicker-lab .org-mark { width: 20px; height: 20px; border-radius: 5px; font-size: 11px; }
.rd-kicker-lab .org-mark .lm-3, .rd-kicker-lab .org-mark .lm-4 { font-size: 7.5px; }
.rd-big { position: relative; z-index: 2; margin: 0; max-width: 1320px; font: 500 116px/.94 var(--sans); letter-spacing: -.05em; color: var(--ink); text-wrap: balance; }
.rd-big.rd-len-l { font-size: 96px; } .rd-big.rd-len-xl { font-size: 80px; }

/* Two columns */
.rd-cols { display: grid; grid-template-columns: clamp(330px, 25vw, 470px) minmax(0, 1fr); gap: 0 clamp(40px, 4.2vw, 80px); align-items: start; margin-top: 44px; }
.rd-side { align-self: stretch; }
.rd-stick { position: sticky; top: var(--rd-top); margin-top: calc(-1 * var(--rd-sh, 0px)); max-height: calc(100vh - var(--rd-top)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding-bottom: 24px; }
.rd-stick::-webkit-scrollbar { display: none; }
.rd-small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 0 0 16px; padding: 0; font: 500 32px/1 var(--sans); letter-spacing: -.045em; color: var(--ink); text-wrap: balance; opacity: 0; pointer-events: none; will-change: opacity, transform; }
.rd-small.is-on { opacity: 1; pointer-events: auto; }
.rd-small.rd-len-l { font-size: 28px; } .rd-small.rd-len-xl { font-size: 24px; }
.rd-lbl { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--ink); font: 400 12.5px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
.rd-lbl span { color: var(--muted); }

/* Paper details table */
.rd-md { margin: 0; }
.rd-md > div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px dotted var(--dot); align-items: baseline; }
.rd-md dt { font: 400 12.5px/1.6 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rd-md dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 6px; min-width: 0; font: 400 12.5px/1.6 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.rd-md dd a:not(.rd-pill):not(.rd-chip) { color: inherit; text-underline-offset: 3px; }
/* Every action in one wrapping block under the table */
.rd-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.rd-actions .rd-pill { min-height: 32px; padding: 4px 12px; font-size: 13.5px; }
.rd-actions .rd-cite[open] { flex-basis: 100%; order: 9; }
.rd-sub { color: var(--muted); }
.rd-chip { display: inline-block; padding: 0 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--chip); color: var(--ink); text-decoration: none; cursor: pointer; }
a.rd-chip:hover { border-color: var(--ink); }
.rd-chip-t { color: var(--topic); border-color: color-mix(in srgb, var(--topic) 35%, transparent); background: color-mix(in srgb, var(--topic) 8%, transparent); }
.rd-more { display: contents; } .rd-more summary { list-style: none; } .rd-more summary::-webkit-details-marker { display: none; }
.rd-more[open] summary { display: none; } .rd-more > span { text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 13px; color: var(--muted); }
.rd-none { color: var(--muted); }
.rd-lab { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.rd-lab .org-mark { width: 20px; height: 20px; border-radius: 5px; }
.rd-md .level { font: inherit; gap: 6px; margin-right: 10px; }
.rd-pill { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font: 500 14px/1.2 var(--sans); letter-spacing: -.01em; text-transform: none; text-decoration: none; cursor: pointer; }
.rd-pill:hover, .rd-pill[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.rd-pill-solid { background: var(--ink); color: var(--bg); }
.rd-pill-solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.rd-pill svg { flex: none; }
.rd-cite { position: relative; }
.rd-cite[open] { grid-column: 1 / -1; order: 2; }
.rd-cite .cite-box { position: static; width: auto; margin-top: 8px; box-shadow: none; border-radius: 3px; }
.rd-cite > summary { list-style: none; width: 100%; } .rd-cite > summary::-webkit-details-marker { display: none; }
.rd-cite .cite-box { text-transform: none; letter-spacing: 0; }
.rd-size { display: inline-flex; gap: 6px; margin-top: -6px; }
.rd-size button { min-width: 34px; height: 22px; font-size: 11.5px !important; border: 1px solid var(--line); border-radius: 3px; background: var(--chip); color: var(--ink); font: inherit; cursor: pointer; }
.rd-size button:hover { border-color: var(--ink); }

/* Contents */
.rd-toc { margin-bottom: 32px; }
.rd-toc a { display: flex; gap: 14px; padding: 5px 0; border-bottom: 1px dotted var(--dot); color: var(--muted); font-size: 14px; text-decoration: none; }
.rd-toc a i { width: 20px; font: normal 400 12.5px/1.7 var(--mono); color: var(--muted); }
.rd-toc a:hover { color: var(--ink); }
.rd-toc a[aria-current] { color: var(--ink); font-weight: 500; } .rd-toc a[aria-current] i { color: var(--accent); }
.rd-progress { position: fixed; z-index: 25; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: 0 0; pointer-events: none; }
.rd-notes .note-list:empty { display: none; }
.rd-main .rd-notes { margin-top: 56px; }
.rd-main .rd-notes:has(.note-list:empty) { display: none; }
.rd-notes .rd-note { margin-top: 10px; }

/* The paper column */
.rd-main { min-width: 0; overflow-wrap: break-word; font-size: calc(19px * var(--reader-scale, 1)); line-height: 1.38; letter-spacing: -.01em; }
.rd-main > * { max-width: 780px; }
.rd-main > .rd-lbl-main { max-width: none; margin-bottom: 20px; }
.rd-md dd:has(> .rd-chip), .rd-md dd:has(> .rd-more) { gap: 4px; line-height: 1.5; }
.rd-dot { color: var(--muted); }
/* Who did the work: the lab, large, above the details table */
.rd-labhead { display: flex; align-items: center; gap: 14px; margin: 0 !important; padding: 14px 0; border-bottom: 1px dotted var(--dot); }
.rd-labhead .org-mark { width: 44px; height: 44px; flex: none; border-radius: 11px; font-size: 18px; letter-spacing: -.01em; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08), 0 1px 2px rgb(0 0 0 / .06); }
.rd-labhead .org-mark .lm-1 { font-size: 21px; } .rd-labhead .org-mark .lm-2 { font-size: 16px; } .rd-labhead .org-mark .lm-3 { font-size: 14px; } .rd-labhead .org-mark .lm-4 { font-size: 12px; }
.rd-labhead .org-mark.has-img { background: #fff; padding: 6px; }
.rd-labhead .org-mark.has-img img { width: 100%; height: 100%; object-fit: contain; }
.rd-labhead > span:not(.org-mark) { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rd-labhead small { font: 400 12.5px/1.2 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rd-labhead a { font: 500 22px/1.1 var(--sans); letter-spacing: -.03em; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.rd-labhead a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
/* The paper page is for reading: no site search in its header */
body.rd-page .header-actions .cmdk { display: none; }
.rd-sec { scroll-margin-top: calc(var(--rd-top) + 8px); }
.rd-sec + .rd-sec { margin-top: 1.6em; }
.rd-sec > h2 { margin: 1.5em 0 .5em; font: 500 54px/1 var(--sans); letter-spacing: -.05em; color: var(--ink); text-wrap: balance; }
.rd-sec > h2 .np-hash { font-size: 20px; letter-spacing: 0; vertical-align: middle; }
.rd-sec > h2:hover .np-hash, .rd-sec > h2 .np-hash:focus { opacity: 1; }
.rd-sec h3 { margin: 1.7em 0 .35em; font: 500 24px/1.15 var(--sans); letter-spacing: -.03em; color: var(--ink); }
.rd-sec p { margin: 0 0 1.2em; text-wrap: pretty; }
.rd-lede { margin: 0 0 .9em !important; font-size: calc(22px * var(--reader-scale, 1)); line-height: 1.34; letter-spacing: -.02em; color: var(--ink); }
.rd-src { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 1.6em !important; font: 400 12.5px/1.5 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rd-src a { color: inherit; } .rd-src .rd-ok { color: var(--good); }
.rd-tag { color: var(--ink); }
.rd-tag::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--muted); vertical-align: 1px; }
.rd-src-ai .rd-tag::before { background: #2a78d6; } .rd-src-paper .rd-tag::before { background: #13995a; }
.rd-src .level { font: inherit; gap: 6px; }
.rd-link { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; letter-spacing: inherit; text-transform: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rd-note { margin: 0; font: 400 12.5px/1.6 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rd-levels { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.rd-levels button { height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--chip); color: var(--muted); font: 400 12.5px var(--mono); letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.rd-levels button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }
.rd-first { margin-top: 0; }

/* Key numbers on one rule */
.rd-nums { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); margin: 0 0 14px; border-top: 1px solid var(--ink); }
.rd-nums-1 { --n: 1; } .rd-nums-2 { --n: 2; } .rd-nums-3 { --n: 3; } .rd-nums-4 { --n: 4; }
.rd-nums > div { padding: 16px 18px 6px 0; }
.rd-nums > div + div { padding-left: 18px; border-left: 1px dotted var(--dot); }
.rd-nums b { display: block; font: 500 54px/1 var(--sans); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.rd-nums span { display: block; margin-top: 12px; font: 400 12.5px/1.5 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

/* Abstract: the authors' own words, in a serif */
.rd-abs.np-abs { padding: 0; border: 0; background: none; border-radius: 0; }
.rd-abs.np-abs p { max-width: none; font: 400 calc(21px * var(--reader-scale, 1))/1.55 var(--serif); letter-spacing: 0; color: var(--ink); }
.rd-skim { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; }
.rd-skim.no-skim { display: none; }
.rd-skim .skim-key { height: auto; padding: 0; border: 0; background: none; font: inherit; gap: 6px; }
.rd-skim .skim-key i { width: 8px; height: 8px; border-radius: 2px; }

/* From the full paper, until it becomes its own sections */
.rd-bd.np-bd { padding: 0; border: 0; background: none; border-radius: 0; }
.rd-bd .bd-note { font: 400 13px/1.5 var(--sans); color: var(--muted); }
.rd-bd .bd-tabs button { border-radius: 3px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase; }
.rd-bd .bd-out h3 { font-size: 24px; }
.rd-bd .bd-list, .rd-bd .bd-quote { max-width: none; }
.rd-bd .bd-quote { padding: 0 0 0 22px; border-left: 2px solid var(--accent); font: italic 400 24px/1.4 var(--serif); }
.rd-bd .bd-table table { font-size: 13px; }
.rd-bd .bd-table th { background: none; border-bottom: 1px solid var(--ink); }

.rd-ideas { margin: 0 0 1em; padding-left: 1.4em; }
.rd-ideas li { margin: .45em 0; padding-left: .3em; }
.rd-ideas li::marker { font: 400 .65em var(--mono); color: var(--muted); }

/* Where it fits: same three columns, drawn with rules */
.rd .lin-item, .rd .lin-empty { border-radius: 3px; background: none; }
.rd .lin-item.here { background: color-mix(in srgb, var(--topic) 6%, transparent); }

/* Try it, as table rows */
#try .rd-md dd { text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 14px; }
#try .rd-md dd .rd-chip { font: 400 12.5px/1.6 var(--mono); }

/* Ask */
/* Ask: a framed panel so it reads as something to use, not more text */
.rd-ask.np-ask.rd-ask { padding: 22px 24px 24px; border: 1px solid var(--ink); border-radius: 6px; background: color-mix(in srgb, var(--accent) 6%, var(--bg)); scroll-margin-top: calc(var(--rd-top) + 24px); }
.rd-ask-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 0 0 6px !important; font: 400 11.5px/1.5 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rd-ask-head span:first-child { color: var(--ink); }
.rd-ask .ask-form { gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.rd-ask .ask-form .input { height: 60px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; font-size: 22px; letter-spacing: -.01em; }
.rd-ask .ask-form .input:focus { outline: none; }
.rd-ask .ask-form:focus-within { border-bottom-color: var(--accent); }
.rd-ask .ask-form .rd-pill { align-self: center; padding-inline: 20px; }
.rd-ask .ask-suggest { margin: 14px 0 0; }
.rd-ask .qchip { border: 1px solid var(--line); border-radius: 3px; background: var(--chip); font: 400 12.5px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 5px 8px; }
.rd-ask .qchip:hover { border-color: var(--ink); }
.rd-ask .ask-log:not(:empty) { margin-bottom: 22px; }
.rd-quiz { margin-top: 36px; }
.rd-quiz .check-q { margin: 14px 0 12px; font-size: 1em; }

.rd-feedback.feedback { margin-top: 64px; padding: 14px 0; border: 0; border-top: 1px solid var(--ink); border-bottom: 1px dotted var(--dot); border-radius: 0; font: 400 12px/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.rd-feedback .rd-pill { min-height: 32px; font-size: 13px; }
.rd-feedback .rd-pill:disabled { cursor: default; } .rd-feedback .rd-pill:disabled:not([aria-pressed="true"]) { opacity: .4; }
.rd-next { display: block; margin-top: 40px; text-decoration: none; }
.rd-next-h { display: block; margin-top: 16px; font: 400 34px/1.05 var(--sans); letter-spacing: -.045em; color: var(--ink); }
.rd-next:hover .rd-next-h { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

/* Read next */
.rd-related { margin: 96px 0 40px; }
.rd-related > .rd-lbl { margin-bottom: 20px; }
.rd-rel-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.rd-rel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.rd-rel-item { display: block; padding: 22px 0; text-decoration: none; color: var(--ink); }
.rd-rel-k { display: block; margin-bottom: 12px; font: 400 11.5px/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--c, var(--muted)); }
.rd-rel-h { display: block; margin-bottom: 10px; font: 500 26px/1.08 var(--sans); letter-spacing: -.04em; text-wrap: balance; }
.rd-rel-s { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 1.5; color: var(--muted); }
.rd-rel-item:hover .rd-rel-h { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.rd .subscribe { border-radius: 3px; background: none; }

@media (max-width: 1280px) {
  .rd-big { font-size: 92px; } .rd-big.rd-len-l { font-size: 78px; } .rd-big.rd-len-xl { font-size: 66px; }
  .rd-small { font-size: 28px; } .rd-small.rd-len-l { font-size: 25px; } .rd-small.rd-len-xl { font-size: 22px; }
  .rd-sec > h2 { font-size: 46px; }
}
@media (max-width: 900px) {
  .rd { padding-bottom: 96px; }
  .rd-hero { padding: 28px 0 8px; }
  .rd-x { display: none; }
  .rd-kicker { margin-bottom: 18px; font-size: 11.5px; }
  .rd-big, .rd-big.rd-len-l, .rd-big.rd-len-xl { font-size: clamp(34px, 9.6vw, 48px) !important; line-height: 1.02; }
  .rd-big.rd-len-xl { font-size: clamp(30px, 8.2vw, 42px) !important; }
  .rd-cols { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
  .rd-stick { position: static; margin-top: 0; padding-top: 20px; max-height: none; overflow: visible; overscroll-behavior: auto; } /* one column: the details scroll with the page */
  .rd-small, .rd-toc, .rd-notes { display: none; }
  .rd-md > div { grid-template-columns: 112px minmax(0, 1fr); }
  .rd-main { font-size: calc(18px * var(--reader-scale, 1)); }
  .rd-lede { font-size: calc(21px * var(--reader-scale, 1)); }
  .rd-sec > h2 { font-size: 38px; line-height: 1.02; }
  .rd-sec h3 { font-size: 22px; }
  .rd-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-nums > div:nth-child(2n + 1) { padding-left: 0; border-left: 0; }
  .rd-nums > div:nth-child(n + 3) { border-top: 1px dotted var(--dot); }
  .rd-nums b { font-size: 40px; }
  .rd-abs.np-abs p { font-size: calc(19px * var(--reader-scale, 1)); }
  .rd-ask .ask-form .input { font-size: 18px; }
  .rd-rel { grid-template-columns: minmax(0, 1fr); }
  .rd-rel-item { border-bottom: 1px dotted var(--dot); }
  .rd-related { margin-top: 56px; }
}

.rd-ask.np-ask { box-shadow: none; }

/* Ask entry in the paper column: always in reach while reading */
.rd-askbar { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 18px; padding: 0 8px 0 14px; height: 42px; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--bg); font: 500 15px/1 var(--sans); letter-spacing: -.01em; text-align: left; cursor: pointer; opacity: 0; pointer-events: none; will-change: opacity, transform; transition: background .15s ease, border-color .15s ease; }
.rd-askbar.is-on { opacity: 1; pointer-events: auto; }
.rd-askbar span { flex: 1; }
.rd-askbar kbd { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border: 1px solid color-mix(in srgb, var(--bg) 35%, transparent); border-radius: 999px; font: 400 11.5px/1 var(--mono); }
.rd-askbar:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.rd-ask.is-flash { animation: rd-flash 1.1s ease; }
@keyframes rd-flash { 0%, 40% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 900px) { .rd-askbar { display: none; } .rd-ask.np-ask.rd-ask { padding: 18px 16px 20px; } }
@media (prefers-reduced-motion: reduce) { .rd-ask.is-flash { animation: none; } }

/* Where it fits: ruled rows like the details table, no boxes */
.rd-sec p.rd-lbl { margin: 0; }
.rd-sec p.rd-lbl-gap { margin-top: 44px; }
.rd-fit { list-style: none; margin: 0 0 8px; padding: 0; }
.rd-fit li { border-bottom: 1px dotted var(--dot); }
.rd-fit-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "y h c"; gap: 4px 20px; align-items: baseline; padding: 16px 0; color: var(--ink); text-decoration: none; }
.rd-fit-y, .rd-fit-c { font: 400 12.5px/1.6 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.rd-fit-y { grid-area: y; } .rd-fit-c { grid-area: c; text-align: right; }
.rd-fit-h { grid-area: h; font: 400 calc(19px * var(--reader-scale, 1))/1.38 var(--sans); letter-spacing: -.01em; text-wrap: pretty; }
a.rd-fit-row:hover .rd-fit-h { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.rd-fit-none { margin: 0 !important; padding: 16px 0; border-bottom: 1px dotted var(--dot); font: 400 12.5px/1.6 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rd-sec .rd-fit-src { display: block; margin-top: 20px !important; }
@media (max-width: 900px) {
  .rd-fit-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "h h" "y c"; padding: 14px 0; }
}

/* ---------- Why this ranked (paper page) and the Methodology page ---------- */
.rk-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 0 0 18px !important; }
.rk-total b { font: 500 48px/1 var(--sans); letter-spacing: -.04em; color: var(--ink); }
.rk-total b small { font-size: 20px; color: var(--muted); letter-spacing: 0; }
.rk-total span { flex: 1 1 260px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.rk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; border-top: 1px solid var(--ink); }
.rk-g { padding: 14px 0 12px; border-bottom: 1px solid var(--line); min-width: 0; }
.rk-h { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 8px !important; font-size: 15px; font-weight: 600; }
.rk-h b { font-variant-numeric: tabular-nums; }
.rk-h small { font-weight: 400; color: var(--muted); }
.rk-bar { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.rk-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.rk-ev { margin: 10px 0 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.5; color: var(--muted); }
.rk-ev li + li { margin-top: 3px; }
.rk-ev a { color: inherit; }
.rk-est { display: inline-block; margin-left: 4px; padding: 0 6px; border: 1px dashed var(--muted); border-radius: 4px; font-size: 11px; line-height: 18px; color: var(--muted); }
.rk-claims { margin-top: 22px; }
.rk-claims ol { margin: 0; padding-left: 1.3em; }
.rk-claims li { margin: 0 0 12px; font-size: 15px; line-height: 1.5; }
.rk-claims li span { color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.rk-claims q { display: block; margin-top: 3px; color: var(--muted); font-size: 14px; }
.rk-judge { margin-top: 18px !important; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--accent-wash); font-size: 14px; line-height: 1.5; }
@media (max-width: 640px) {
  .rk-grid { grid-template-columns: minmax(0, 1fr); }
  .rk-total b { font-size: 40px; }
}

.mt { max-width: 780px; margin: 40px auto 72px; padding-inline: var(--gutter); }
.mt h1 { margin: 8px 0 16px; font: 500 clamp(36px, 6vw, 60px)/1.02 var(--sans); letter-spacing: -.045em; text-wrap: balance; }
.mt h2 { margin: 2em 0 .6em; font: 500 28px/1.15 var(--sans); letter-spacing: -.03em; }
.mt p, .mt li { font-size: 17px; line-height: 1.65; }
.mt p { margin: 0 0 1em; max-width: 68ch; }
.mt ul { padding-left: 1.2em; } .mt li + li { margin-top: 6px; }
.mt a { color: var(--accent-ink); }
.mt .rd-pill { color: var(--ink); margin: 4px 6px 4px 0; }
.mt-lede { font-size: 20px !important; color: var(--ink); }
.mt-table { overflow-x: auto; margin: 0 0 1.2em; border-top: 1px solid var(--ink); }
.mt table { width: 100%; border-collapse: collapse; font-size: 15px; }
.mt th, .mt td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.mt td:not(:first-child), .mt thead th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mt thead th { font-weight: 500; color: var(--muted); font-size: 13px; }
.mt .mt-group th { padding-top: 16px; font-weight: 600; }
.mt .mt-group th:last-child { text-align: right; }
.rk .rd-src a, .rk-ev a { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Decluttered: one topic label per card ---- */
.pc-word { display: none; }
.rd-pill-explain { border-color: var(--accent, #ff4f00); color: var(--accent, #ff4f00); }

/* ---- Top bar credit: who built the site, and its open-source code on GitHub ---- */
.oss { position: relative; display: inline-flex; align-items: center; gap: 12px; flex: none; }
.oss-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 4px 0 11px; border-radius: 10px; background: var(--ink); color: var(--bg); white-space: nowrap; transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s; }
.oss-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgb(0 0 0 / .5); }
.oss-btn:active { transform: scale(.97); }
.oss-main { display: inline-flex; align-items: center; gap: 8px; }
.oss-txt { display: flex; flex-direction: column; line-height: 1.05; }
.oss-txt small { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
.oss-txt span { font-size: 13px; font-weight: 600; }
.oss-arrow { opacity: .8; }
.oss-star { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 7px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }
.oss-tip { position: absolute; top: calc(100% + 10px); right: 0; z-index: 50; width: 270px; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 13px; line-height: 1.45; white-space: normal; box-shadow: 0 16px 40px -12px rgb(0 0 0 / .4); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; pointer-events: none; }
.oss-tip b { display: block; margin-bottom: 2px; font-weight: 600; }
.oss:hover .oss-tip, .oss-btn:focus-visible + .oss-tip { opacity: 1; visibility: visible; transform: none; }
@media (max-width: 1240px) { .oss-txt, .oss-arrow { display: none; } .oss-btn { padding: 0 5px 0 10px; } }
@media (max-width: 680px) { .oss-btn { height: 42px; } .oss-star { height: 34px; } .oss-tip { display: none; } }
/* Phones: the logo name gives way to the Subscribe button */
@media (max-width: 540px) { .bar-in:has(.hdr-sub) .brand-name { display: none; } }
@media (prefers-reduced-motion: reduce) { .oss-btn, .oss-btn:hover, .oss-btn:active { transition: none; transform: none; } }
/* The credit takes room in the top bar: search folds to its icon earlier, and the logo stays on small phones */
@media (max-width: 1240px) {
  .header-actions .cmdk { flex: none; width: 40px; min-width: 0; padding: 0; justify-content: center; } .cmdk span, .cmdk kbd { display: none; }
}
@media (max-width: 380px) { .brand { display: flex; } .header-actions { gap: 6px; } }

/* ---- Smooth taps and page changes ---- */
/* No grey or blue box on tap (mobile browsers draw one by default); keyboard focus still shows */
html { -webkit-tap-highlight-color: transparent; }
a, button, summary, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus:not(:focus-visible) { outline: none; }
.nav a { transition: background-color .18s ease, color .18s ease, transform .12s ease; }
.nav a:active { transform: scale(.94); }
/* Pages cross-fade into each other; the top bar and phone menu stay put, and the
   highlighted tab glides from the old tab to the new one */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
.nav { view-transition-name: site-nav; }
.nav a[aria-current="page"] { view-transition-name: nav-current; }
::view-transition-group(*) { animation-duration: 320ms; animation-timing-function: cubic-bezier(.22,1,.36,1); }
::view-transition-group(nav-current) { z-index: 2; }
::view-transition-old(nav-current), ::view-transition-new(nav-current) { height: 100%; object-fit: fill; }
::view-transition-old(root) { animation: 160ms cubic-bezier(.4,0,1,1) both vt-out; }
::view-transition-new(root) { animation: 300ms cubic-bezier(.22,1,.36,1) 40ms both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .nav a { transition: none; } .nav a:active { transform: none; }
}
.cs-cap { margin: 0 0 12px; font-size: 13px; color: var(--muted); }

/* ---------- Case studies finder (case_pages.finder_tools, assets/case-finder.js) ---------- */
.cf-hero { padding-top: 56px; }
.cs-top .cf-eyebrow { margin: 0 0 14px; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cf-hero > p:not(.cf-eyebrow) { margin: 18px 0 0; max-width: 60ch; font-size: 18px; line-height: 1.55; color: var(--muted); }
.cf-form { display: flex; gap: 10px; margin-top: 32px; max-width: 860px; }
.cf-box { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 6%, transparent); }
.cf-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.cf-box svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.cf-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 16px/1.3 var(--sans); color: var(--ink); text-overflow: ellipsis; }
.cf-box input::placeholder { color: var(--muted); }
.cf-go { flex: none; min-height: 56px; padding: 0 22px; border: 0; border-radius: 14px; background: var(--ink); color: var(--surface); font: 600 15px var(--sans); cursor: pointer; }
.cf-go:hover { background: color-mix(in srgb, var(--ink) 85%, var(--surface)); }
.cf-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.cf-try span { font-size: 14px; color: var(--muted); margin-right: 2px; }
.cf-try button { min-height: 34px; padding: 0 12px; border: 1px dashed color-mix(in srgb, var(--ink) 25%, var(--line)); border-radius: 999px; background: transparent; color: var(--ink); font: 500 13px var(--sans); cursor: pointer; }
.cf-try button:hover { border-style: solid; background: var(--surface); }
.cf-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.cf-sel select { height: 40px; max-width: 100%; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 500 14px var(--sans); cursor: pointer; }
.cf-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: 500 14px var(--sans); color: var(--ink); cursor: pointer; }
.cf-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.cf-browse { margin-top: 44px; }
.cf-browse h2 { margin: 0 0 12px; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-chips button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 500 14px var(--sans); cursor: pointer; }
.cf-chips button i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--c); }
.cf-chips button span { color: var(--muted); font-weight: 400; }
.cf-chips button:hover { border-color: color-mix(in srgb, var(--ink) 35%, var(--line)); }
.cf-chips button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cf-try button:focus-visible, .cf-chips button:focus-visible, .cf-go:focus-visible, .cf-sel select:focus-visible,
.cf-toggle:focus-within, .cf-clear:focus-visible, .cs-see:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cf-sec .cs-sec-head h2 { font: 600 clamp(22px, 2.6vw, 28px)/1.2 var(--sans); letter-spacing: -.025em; }
.cf-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 8px !important; font: 500 12px var(--mono) !important; letter-spacing: .06em; text-transform: uppercase; color: var(--ink) !important; }
.cf-kicker i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.cf-results { margin-top: 32px; scroll-margin-top: 80px; }
.cf-results .cs-status { margin-top: 0; }
.cf-clear { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: 500 13px var(--sans); cursor: pointer; }
.cf-match { margin: 10px 0 0 !important; font: 500 12px var(--mono) !important; color: var(--muted) !important; -webkit-line-clamp: unset !important; }
.cf-match mark { padding: 1px 5px; margin-right: 2px; border-radius: 4px; background: var(--yellow-wash); color: var(--ink); }
/* card header pills: the topic, then how many build details the post describes */
.cs-pills { grid-column: 1 / -1; justify-self: start; align-self: end; display: flex; flex-wrap: wrap; gap: 6px; }
.cs-bd { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; font: 500 12px var(--mono); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.cs-bd-hi { background: color-mix(in srgb, var(--good) 16%, var(--surface)); color: color-mix(in srgb, var(--good) 75%, var(--ink)); }
.cs-bd-mid { background: color-mix(in srgb, var(--yellow) 30%, var(--surface)); color: color-mix(in srgb, var(--yellow) 35%, var(--ink)); }
:root[data-theme="dark"] .cs-bd-hi { color: var(--good); }
:root[data-theme="dark"] .cs-bd-mid { color: var(--yellow); }
@media (max-width: 640px) {
  .cf-hero { padding-top: 36px; }
  .cf-hero > p:not(.cf-eyebrow) { font-size: 16px; }
  .cf-form { flex-direction: column; }
  .cf-go { width: 100%; min-height: 48px; }
  .cf-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cf-sel select { width: 100%; min-height: 44px; }
  .cf-toggle { min-height: 44px; }
  .cf-chips button, .cf-try button { min-height: 40px; }
}

/* "Research behind this": the paper on this site behind a case, an inset above the card footer */
.cs-rel { border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.cs-rel:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.cs-rel svg { color: var(--accent); }
.cs-rel div { min-width: 0; }
.cs-rel span { margin-bottom: 2px; font: 500 11.5px var(--mono); letter-spacing: .01em; color: var(--muted); }
.cs-rel b { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
:root[data-theme="dark"] .cs-rel { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }

/* ---------- "Suggest a write-up" (case_pages.SUGGEST_DIALOG, assets/case-finder.js) ---------- */
.cf-hero-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cf-hero-row .cf-eyebrow { margin: 0 !important; }
.cf-suggest { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 500 14px var(--sans); cursor: pointer; }
.cf-suggest:hover { border-color: color-mix(in srgb, var(--ink) 35%, var(--line)); }
.cf-suggest:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sg { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -30px rgb(0 0 0 / .45); }
.sg::backdrop { background: rgb(15 15 18 / .45); }
.sg-form { padding: 26px 26px 20px; }
.sg h2 { margin: 0; font: 600 24px/1.2 var(--sans); letter-spacing: -.02em; }
.sg-intro { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.sg-field { margin-top: 18px; }
.sg-field label { display: block; margin-bottom: 6px; font: 500 14px var(--sans); }
.sg-field label span { margin-left: 4px; font-weight: 400; color: var(--muted); }
.sg-field input, .sg-field textarea { box-sizing: border-box; width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 400 15px/1.4 var(--sans); }
.sg-field textarea { resize: vertical; min-height: 80px; }
.sg-field input:focus-visible, .sg-field textarea:focus-visible, .rv-login input:focus-visible { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.sg-field input[aria-invalid="true"] { border-color: var(--bad); }
.sg-msg { min-height: 20px; margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.sg-msg.sg-ok { color: color-mix(in srgb, var(--good) 75%, var(--ink)); }
.sg-msg.sg-bad { color: var(--bad); }
.sg-msg.sg-dup { color: var(--ink); }
.sg-msg a { color: var(--accent-ink); }
:root[data-theme="dark"] .sg-msg.sg-ok { color: var(--good); }
.sg-hint { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.sg-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sg-error { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--bad) 10%, var(--surface)); color: var(--ink); font-size: 14px; }
.sg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.sg-cancel, .sg-send { min-height: 44px; padding: 0 18px; border-radius: 10px; font: 600 14.5px var(--sans); cursor: pointer; }
.sg-cancel { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.sg-send { border: 0; background: var(--accent); color: var(--on-accent, #fff); }
.sg-send:hover { filter: brightness(1.06); }
.sg-send:disabled { opacity: .6; cursor: progress; }
.sg-cancel:focus-visible, .sg-send:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sg-foot { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); text-align: right; }
.sg-thanks { padding: 8px 0 0; text-align: center; outline: 0; }
.sg-thanks h2 { margin-top: 6px; }
.sg-thanks > p:not(.sg-tick) { margin: 10px auto 0; max-width: 40ch; font-size: 15px; line-height: 1.55; color: var(--muted); }
.sg-tick { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto; border-radius: 50%; background: color-mix(in srgb, var(--good) 16%, var(--surface)); color: var(--good); font: 600 26px var(--sans); }
.sg-thanks .sg-actions { justify-content: center; }
@media (max-width: 640px) {
  .sg-form { padding: 22px 18px 18px; }
  .sg-actions { flex-direction: column-reverse; }
  .sg-cancel, .sg-send { width: 100%; }
  .sg-foot { text-align: left; }
  .cf-suggest { min-height: 40px; padding: 0 12px; font-size: 13.5px; }
}
/* "Suggested by" on a card a reader suggested */
.cs-body > p.cs-by, .cs-by { display: flex; align-items: center; gap: 8px; margin: 14px 0 0 !important; font-size: 13.5px !important; color: var(--muted) !important; -webkit-line-clamp: unset !important; }
.cs-by b { color: var(--ink); font-weight: 600; }
.cs-av { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent-ink); font: 600 12px var(--sans); }

/* ---------- the owner's review page (case-studies/review.html, assets/case-review.js) ---------- */
.rv-private { display: flex; align-items: center; gap: 8px; font-size: 15px !important; }
.rv-private svg { width: 16px; height: 16px; flex: none; }
.rv { margin-top: 28px; max-width: 860px; }
.rv-login label { display: block; margin-bottom: 6px; font: 500 14px var(--sans); }
.rv-login-row { display: flex; gap: 10px; }
.rv-login input { flex: 1; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 400 15px var(--mono); }
.rv-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.rv-tabs button { min-height: 44px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 500 15px var(--sans); cursor: pointer; }
.rv-tabs button span { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, var(--surface)); font-size: 12.5px; }
.rv-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.rv-tabs button:focus-visible, .rv-actions button:focus-visible, .rv-forget:focus-visible, .rv-domain:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rv-list { list-style: none; margin: 0; padding: 0; }
.rv-item { margin-top: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.rv-head { display: flex; gap: 14px; }
.rv-logo { width: 40px; height: 40px; flex: none; font-size: 17px; }
.rv-headtext { min-width: 0; }
.rv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; color: var(--muted); }
.rv-pill { padding: 3px 10px; border-radius: 999px; font: 500 12px var(--mono); }
.rv-ok { background: color-mix(in srgb, var(--good) 16%, var(--surface)); color: color-mix(in srgb, var(--good) 75%, var(--ink)); }
.rv-warn { background: color-mix(in srgb, var(--yellow) 30%, var(--surface)); color: color-mix(in srgb, var(--yellow) 35%, var(--ink)); }
.rv-grey { background: color-mix(in srgb, var(--ink) 8%, var(--surface)); color: var(--muted); }
:root[data-theme="dark"] .rv-ok { color: var(--good); }
:root[data-theme="dark"] .rv-warn { color: var(--yellow); }
.rv-item h3 { margin: 8px 0 0; font: 600 19px/1.3 var(--sans); letter-spacing: -.015em; overflow-wrap: anywhere; }
.rv-domain { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 14px; color: var(--accent-ink); text-decoration: none; overflow-wrap: anywhere; }
.rv-domain svg { width: 13px; height: 13px; flex: none; }
.rv-note { margin: 14px 0 0; padding: 4px 0 4px 14px; border-left: 3px solid var(--accent); font-size: 15px; line-height: 1.5; font-style: italic; color: var(--ink); }
.rv-label { margin: 16px 0 6px; font: 500 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rv-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.rv-chips li { padding: 4px 9px; border-radius: 7px; background: color-mix(in srgb, var(--ink) 6%, var(--surface)); font: 12.5px var(--mono); }
.rv-chips .rv-bd-hi { background: color-mix(in srgb, var(--good) 16%, var(--surface)); }
.rv-chips .rv-bd-mid, .rv-chips .rv-bd-lo { background: color-mix(in srgb, var(--yellow) 30%, var(--surface)); }
.rv-ps { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.rv-ps b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.rv-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 0; font-size: 13.5px; color: var(--muted); }
.rv-yes { color: color-mix(in srgb, var(--good) 75%, var(--ink)); }
.rv-no { color: color-mix(in srgb, var(--yellow) 35%, var(--ink)); }
:root[data-theme="dark"] .rv-yes { color: var(--good); }
:root[data-theme="dark"] .rv-no { color: var(--yellow); }
.rv-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.rv-actions button { min-height: 40px; padding: 0 16px; border-radius: 10px; font: 600 14px var(--sans); cursor: pointer; }
.rv-secondary { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.rv-primary { border: 0; background: var(--ink); color: var(--surface); }
.rv-empty { margin: 24px 0; color: var(--muted); }
.rv-forget { margin-top: 28px; min-height: 40px; padding: 0; border: 0; background: none; color: var(--muted); font: 500 13.5px var(--sans); text-decoration: underline; cursor: pointer; }
@media (max-width: 640px) {
  .rv-item { padding: 16px; }
  .rv-login-row { flex-direction: column; }
  .rv-actions { flex-direction: column-reverse; } .rv-actions button { width: 100%; min-height: 44px; }
}

/* ---------- New this week, the "New" pill, topic follows (case_pages.new_strip, follow_button) ---------- */
.cs-new { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent, #fff); font: 600 12px var(--mono); letter-spacing: .02em; box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.cf-new .cs-sec-head { border-bottom-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.cf-sec-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.cf-follow { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 500 14px var(--sans); cursor: pointer; }
.cf-follow svg { width: 14px; height: 14px; flex: none; color: color-mix(in srgb, var(--ink) 30%, var(--surface)); }
.cf-follow:hover { border-color: color-mix(in srgb, var(--ink) 35%, var(--line)); }
.cf-follow[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.cf-follow[aria-pressed="true"] svg { color: var(--accent); }
.cf-follow:focus-visible, .cf-mine:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cf-topic-follow { margin-top: 18px; }
.cf-chips .cf-mine { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.cf-mine svg { width: 14px; height: 14px; flex: none; color: var(--accent); }
.cf-chips .cf-mine[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cf-chips .cf-badge { padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent, #fff); font: 600 11.5px var(--sans); }
.cf-chips .cf-badge[hidden], .cf-mine[hidden] { display: none; }
@media (max-width: 640px) {
  .cf-sec-actions { width: 100%; justify-content: space-between; }
  .cf-follow { min-height: 44px; }
}

/* ---------- a page per case study (case_detail.py) ---------- */
.cs-details { position: relative; z-index: 2; margin-left: auto; margin-right: 10px; font: 500 12.5px var(--mono); color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.cs-details:hover { color: var(--ink); }
.cs-details:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cd { max-width: 760px; margin-top: 18px; }
.cd-crumb a, .cd-crumb span[aria-current] { color: var(--muted); }
.cd-crumb span[aria-current] { color: var(--ink); }
.cd-head { padding: 26px 28px 28px; border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--b) 12%, var(--surface)), color-mix(in srgb, var(--b) 4%, var(--surface))); }
:root[data-theme="dark"] .cd-head { background: linear-gradient(135deg, color-mix(in srgb, var(--b) 22%, var(--surface)), color-mix(in srgb, var(--b) 7%, var(--surface))); }
.cd-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cd-co { display: inline-flex; align-items: center; gap: 10px; font: 600 18px/1.2 var(--sans); }
.cd-logo { display: block; width: 28px; height: 28px; flex: none; }
.cd-logo.cs-mono { font-size: 14px; }
.cd-meta time { font: 500 12.5px var(--mono); color: var(--muted); }
.cd-pills { margin-top: 14px; }
.cd-head h1 { margin: 16px 0 0; font: 600 clamp(28px, 4.4vw, 44px)/1.1 var(--sans); letter-spacing: -.035em; text-wrap: balance; overflow-wrap: anywhere; }
.cd-lead { margin: 12px 0 0; max-width: 60ch; font-size: 15.5px; line-height: 1.55; color: var(--muted); }
.cd-go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; margin-top: 20px; padding: 0 20px; border-radius: 12px; background: var(--accent); color: var(--on-accent, #fff); font: 600 15.5px var(--sans); text-decoration: none; text-align: center; }
.cd-go:hover { filter: brightness(1.06); }
.cd-go:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.cd-ps { display: grid; gap: 18px; margin-top: 26px; }
.cd-ps h2, .cd-build h2, .cd-more h2 { margin: 0; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cd-ps p { margin: 6px 0 0; font-size: 18px; line-height: 1.6; color: var(--ink); }
.cd-s h2 { color: var(--c); filter: brightness(.85); }
:root[data-theme="dark"] .cd-s h2 { filter: none; }
.cd-result { margin: 0 !important; font-weight: 600; }
.cd-thin { margin: 26px 0 0; color: var(--muted); }
.cd-tags { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.cd-tags dl { margin: 0; display: grid; gap: 12px; }
.cd-tags dl > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.cd-tags dt { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cd-tags dd { margin: 0; }
.cd-tags ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.cd-tags a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 500 13px var(--sans); text-decoration: none; }
.cd-tags a:hover { border-color: color-mix(in srgb, var(--ink) 35%, var(--line)); }
.cd-tags a:focus-visible, .cd-more a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cd-build { margin-top: 26px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cd-note { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.cd-build ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.cd-build li { display: flex; gap: 12px; align-items: flex-start; }
.cd-mark { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; font: 700 13px var(--sans); }
.cd-yes .cd-mark { background: color-mix(in srgb, var(--good) 16%, var(--surface)); color: color-mix(in srgb, var(--good) 75%, var(--ink)); }
.cd-no .cd-mark { background: color-mix(in srgb, var(--ink) 7%, var(--surface)); color: var(--muted); }
:root[data-theme="dark"] .cd-yes .cd-mark { color: var(--good); }
.cd-build b { font-size: 15px; }
.cd-no b { color: var(--muted); font-weight: 500; }
.cd-build p { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.cd .cs-rel { margin-top: 22px; }
.cd .cd-by { margin-top: 18px !important; }
.cd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.cd-actions .cf-suggest { text-decoration: none; }
.cd-bottom { margin-top: 30px; padding: 22px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); }
.cd-bottom p { margin: 0; font-size: 15.5px; color: var(--ink); }
.cd-bottom .cd-go { margin-top: 14px; }
.cd-more { max-width: 760px; margin-top: 44px; }
.cd-more ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cd-more li a { display: flex; flex-direction: column; gap: 8px; height: 100%; box-sizing: border-box; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; }
.cd-more li a:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.cd-rel-co { display: inline-flex; align-items: center; gap: 8px; font: 600 14px var(--sans); }
.cd-rel-co .cs-badge { width: 18px; height: 18px; }
.cd-more b { font: 500 16px/1.35 var(--sans); overflow-wrap: anywhere; }
.cd-more .cs-pills { grid-column: auto; margin-top: auto; align-self: flex-start; justify-content: flex-start; }
.cd-more .cs-topic, .cd-more .cs-bd, .cd-more .cs-new { box-shadow: none; border: 1px solid var(--line); }
.cd-more > p { margin: 14px 0 0; }
@media (max-width: 640px) {
  .cd-head { padding: 20px 18px 22px; }
  .cd-go { display: flex; width: 100%; box-sizing: border-box; }
  .cd-ps p { font-size: 16.5px; }
  .cd-tags dl > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .cd-build { padding: 16px; }
  .cd-more ul { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Today, in the Case studies style (site_builder.build_index, body.home-today) ---------- */
.home-today .hero-eyebrow { margin: 0 0 12px; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.home-today .hero h1 { font: 600 clamp(40px, 6.4vw, 76px)/.98 var(--sans); letter-spacing: -.05em; }
.home-today .block-head h2 { font: 600 22px/1.15 var(--sans); letter-spacing: -.02em; }
.home-today .pick-top { text-transform: none; letter-spacing: 0; }
.home-today .pick-n { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font: 600 12px/1.2 var(--mono); letter-spacing: .02em; background: var(--yellow-wash); color: var(--ink); }
.home-today .pick.is-first .pick-n { background: var(--accent); color: var(--on-accent, #fff); }
.home-today .pick-foot .topic { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); font: 500 12px var(--mono); }
.home-today .pick-date b { font-weight: 600; color: inherit; }
/* "Also new today": a line on why it matters, and a labelled 44px Save */
.home-today .list-home .row { grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-areas: "date title badges" "date authors badges" "date why badges"; }
.row-why { grid-area: why; margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.home-today .list-home .quick-save { display: inline-flex; align-items: center; gap: 6px; width: auto; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 10px; font: 600 13.5px var(--sans); color: var(--ink); opacity: 1; }
.home-today .list-home .quick-save[aria-pressed="true"] { color: #111; }
.home-today .list-home .quick-save:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* "How companies built it this week" */
.hc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hc-list a { display: flex; flex-direction: column; gap: 8px; height: 100%; box-sizing: border-box; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--b) 9%, var(--surface)), var(--surface) 55%); color: var(--ink); text-decoration: none; }
.hc-list a:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.hc-list a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hc-co { display: inline-flex; align-items: center; gap: 8px; font: 600 14px var(--sans); }
.hc-logo { display: block; width: 20px; height: 20px; flex: none; }
.hc-logo.cs-mono { font-size: 11px; }
.hc-list b { font: 600 16px/1.3 var(--sans); letter-spacing: -.01em; overflow-wrap: anywhere; }
.hc-problem { font-size: 14px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hc .cs-pills { margin-top: auto; align-self: flex-start; justify-content: flex-start; }
.hc .cs-topic, .hc .cs-bd { box-shadow: none; border: 1px solid var(--line); }
@media (max-width: 900px) { .hc-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 680px) {
  .home-today .hero { padding-top: 18px; padding-bottom: 6px; }
  .home-today .hero h1 { font-size: 34px; line-height: 1.02; }
  .home-today .hero .lead { margin-top: 10px; font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .home-today #today { margin-top: 14px; }
  .home-today .pick h3 { font-size: 19px; }
  .home-today .pick-blurb { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .home-today .list-home .row { grid-template-columns: 32px minmax(0, 1fr) 44px; grid-template-areas: "date title badges" "date authors badges" "date why badges"; }
  .home-today .list-home .quick-save { display: inline-flex; justify-content: center; width: 44px; padding: 0; }
  .home-today .list-home .quick-save span { display: none; }
  .hc-list a { padding: 14px; }
}
