/*
  Paperlane. Product chrome in Geist, papers in Latin Modern, one highlighter colour across both.
  White paper and black ink. The one brand colour is highlighter lime, and it only ever sits behind things:
  matched words, chosen fields, the active order and papers with a Lean project.
  Light is the default for everyone; dark applies only when the reader switches to it.
*/
/* Every font is served from assets/fonts: Geist (variable, Google Fonts' latin subsets) and Latin Modern (from latex-css 1.13.0). */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geist-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geist-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geist-mono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geist-mono-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Latin Modern"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/LM-regular.woff2") format("woff2"); }
@font-face { font-family: "Latin Modern"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/LM-italic.woff2") format("woff2"); }
@font-face { font-family: "Latin Modern"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/LM-bold.woff2") format("woff2"); }
@font-face { font-family: "Latin Modern"; font-style: italic; font-weight: 700; font-display: swap; src: url("fonts/LM-bold-italic.woff2") format("woff2"); }
:root {
  --paper: #fdfdfc;
  --leaf: #ffffff;
  --ink: #111210;
  --ink-2: #393b36;
  --muted: #6a6d65;
  --faint: #a0a39a;
  --rule: #dcded7;
  --rule-soft: #ecede8;
  --red: #4b6a00;
  --red-soft: #eef7d2;
  --green: #111210;
  --green-soft: #e3f5a6;
  --hl: #d9f763;
  --lime: #c8f53c;
  --term-bg: #121310;
  --term-fg: #e6e8e0;
  --serif: "Latin Modern", "Latin Modern Roman", "CMU Serif", "Computer Modern Serif", Georgia, serif;
  --sans: "Geist", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #0e0f0c; --leaf: #151612; --ink: #eceee6; --ink-2: #c4c7bd; --muted: #8f9288; --faint: #5e6158;
  --rule: #2a2c26; --rule-soft: #1c1e19; --red: #c8f53c; --red-soft: #232b0e; --green: #eceee6; --green-soft: #34410f;
  --hl: #3f4d12; --lime: #c8f53c; --term-bg: #070806; --term-fg: #e6e8e0; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 90px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 18px; line-height: 1.55; font-optical-sizing: auto; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--hl); color: var(--ink); }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--red); text-decoration-color: currentColor; }
button { font: inherit; color: inherit; }
code, .mono, kbd, pre { font-family: var(--mono); }
.mono { font-size: 0.78em; letter-spacing: -0.01em; }
code { font-size: 0.85em; }
em { font-style: italic; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 16px; height: 16px; }
.leader { flex: 1; min-width: 12px; border-bottom: 1.5px dotted var(--faint); transform: translateY(-0.32em); margin: 0 0.45em; opacity: 0.8; }
button.link { background: none; border: 0; padding: 0; color: var(--red); cursor: pointer; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* The mark */
.mark { width: 34px; height: 34px; flex: none; overflow: visible; }
.mark .wind path { fill: none; stroke: var(--red); stroke-width: 1.6; stroke-linecap: round; }
.mark .sheet { fill: var(--leaf); stroke: var(--ink); stroke-width: 1.7; stroke-linejoin: round; }
.mark .fold { fill: var(--rule-soft); stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.mark .ink, .mark .ink path { fill: none; stroke: var(--ink); stroke-width: 1.45; stroke-linecap: round; }
.mark .qed { fill: var(--red); }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.32rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand:hover .mark { transform: rotate(-4deg) translateY(-1px); transition: transform 0.25s ease; }
.brand.small { font-size: 1.1rem; }
.brand.small .mark { width: 26px; height: 26px; }

/* Buttons and controls */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--ink); background: transparent; color: var(--ink); border-radius: 3px; padding: 9px 18px; font-family: var(--serif); font-size: 1rem; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background 0.12s, color 0.12s, border-color 0.12s; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn.small { padding: 4px 12px; font-size: 0.9rem; }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--rule); background: var(--leaf); border-radius: 3px; padding: 7px 12px; cursor: pointer; font-family: var(--mono); font-size: 0.78rem; color: var(--ink-2); white-space: nowrap; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip em { font-style: normal; color: var(--faint); }
.chip[aria-pressed="true"], .chip.on, .chip[aria-expanded="true"] { background: var(--hl); border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] em, .chip.on em { color: var(--ink-2); }
.chip.lean[aria-pressed="true"] { background: var(--green-soft); border-color: var(--green); color: var(--green); }
#f-fields-n:not(:empty) { margin-left: 2px; }
#f-fields-n:not(:empty)::before { content: "· "; }

/* Header */
header.site { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: 1px solid var(--rule); }
.bar { position: relative; max-width: 1160px; margin: 0 auto; height: 58px; padding: 0 28px; display: flex; align-items: center; gap: 30px; }
header nav { display: flex; align-items: center; gap: 18px; }
header nav a, header nav button { background: none; border: 0; padding: 4px 0; color: var(--muted); text-decoration: none; cursor: pointer; font-size: 0.8rem; }
header nav a:hover, header nav button:hover { color: var(--ink); }
header nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.lookup { display: flex; align-items: center; gap: 8px; width: 230px; background: var(--leaf); border: 1px solid var(--rule); border-radius: 3px; padding: 0 10px; color: var(--red); font-size: 0.8rem; transition: width 0.15s ease, border-color 0.15s; }
.lookup:focus-within { width: 300px; border-color: var(--ink); }
.lookup input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; padding: 7px 0; }
.lookup input::placeholder { color: var(--faint); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 3px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; }
.icon-btn:hover { color: var(--ink); background: var(--rule-soft); }

main { min-height: 60vh; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 28px; }
.wrap-wide { max-width: 1160px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.kicker { color: var(--muted); margin: 0 0 10px; }
h1 { font-weight: 400; font-size: 2.6rem; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 12px; }
h1 em { color: var(--red); }
h2 { font-weight: 400; letter-spacing: -0.01em; }
.lede { font-size: 1.2rem; color: var(--ink-2); margin: 0 0 26px; max-width: 34em; }
.lede.small { font-size: 1.08rem; }

/* Home */
.toc { list-style: none; margin: 0; padding: 0; }
.toc li a { display: flex; align-items: baseline; padding: 5px 0; text-decoration: none; color: var(--ink); }
.toc li a:hover { color: var(--red); }
.toc li .mono { color: var(--muted); }
.interest-input { width: 100%; font-family: var(--serif); font-size: 1.3rem; font-style: italic; padding: 8px 2px; border: 0; border-bottom: 1.5px solid var(--ink); background: none; color: var(--ink); outline: 0; }
.interest-input::placeholder { color: var(--faint); }
.interest-input:focus { border-bottom-color: var(--red); }
.hint { color: var(--muted); font-size: 0.92rem; margin: 10px 0 30px; }
.terminal { margin: 0; background: var(--term-bg); color: var(--term-fg); border-radius: 4px; padding: 18px 20px; font-size: 0.74rem; line-height: 1.75; white-space: pre-wrap; word-break: break-word; overflow: auto; }
.terminal .cmd { color: #9c937f; }
.t-lean { color: var(--green); }
.t-lean.soft { color: var(--green); opacity: 0.75; }
.t-code { color: var(--red); }
.t-rev { color: var(--muted); font-style: italic; }

/* Issue page */
.issue-head { padding-top: 48px; }
.issue-head h1 em { color: var(--ink); }
.day-nav { float: right; display: inline-flex; gap: 16px; }
.day-nav a { color: var(--muted); text-decoration: none; }
.day-nav a:hover { color: var(--red); }
.rebuilt { color: var(--muted); }
.stats { color: var(--muted); margin: 0; }
.toolbar { position: sticky; top: 58px; z-index: 30; background: var(--paper); padding: 16px 0 8px; margin-top: 22px; border-bottom: 1px solid var(--ink); }
.row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; background: var(--leaf); border: 1px solid var(--rule); border-radius: 3px; padding: 0 12px; }
.search:focus-within { border-color: var(--ink); }
.search .prompt { color: var(--red); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-family: var(--serif); font-size: 1rem; color: var(--ink); padding: 7px 0; }
.search input::placeholder { color: var(--faint); font-style: italic; }
.lbl { color: var(--faint); }
.pop { position: relative; }
.panel { position: absolute; top: calc(100% + 6px); left: 0; width: 340px; max-height: min(62vh, 540px); overflow-y: auto; background: var(--leaf); border: 1px solid var(--ink); border-radius: 3px; padding: 10px 12px; z-index: 50; box-shadow: 6px 6px 0 var(--rule-soft); }
input.mini { width: 100%; font-family: var(--mono); font-size: 0.78rem; padding: 7px 9px; border: 1px solid var(--rule); border-radius: 2px; background: var(--paper); color: var(--ink); outline: 0; margin-bottom: 6px; }
input.mini:focus { border-color: var(--ink); }
.opt { display: flex; align-items: baseline; gap: 8px; padding: 3px 2px; cursor: pointer; font-size: 0.98rem; color: var(--ink-2); }
.opt:hover { color: var(--ink); }
.opt input { accent-color: var(--red); margin: 0; flex: none; transform: translateY(1px); }
.opt em { font-style: normal; color: var(--faint); }
.opt:has(input:checked:not([name="kind"])) span { background: linear-gradient(transparent 58%, var(--hl) 58%); color: var(--ink); }
.panel-label { color: var(--faint); margin: 12px 0 4px; }
.panel-foot { position: sticky; bottom: -10px; display: flex; align-items: center; justify-content: space-between; background: var(--leaf); border-top: 1px solid var(--rule); margin: 8px -12px -10px; padding: 10px 12px; }
.results { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 30px; padding: 8px 0 0; color: var(--muted); font-size: 0.74rem; }
#f-pills { display: contents; }
.pill { display: inline-flex; align-items: center; gap: 4px; background: var(--hl); color: var(--ink); border: 0; border-radius: 2px; padding: 1px 4px 1px 8px; font: inherit; cursor: pointer; }
.pill b { font-weight: 400; padding: 0 3px; }
.empty { border: 1px dashed var(--rule); padding: 20px; color: var(--muted); text-align: center; margin-top: 18px; font-style: italic; }
.group h2 { display: flex; align-items: baseline; font-style: italic; font-size: 1.35rem; margin: 34px 0 4px; }
.group h2 .n { font-style: normal; color: var(--muted); }
.group.flat { margin-top: 18px; }
#list, #flat { counter-reset: paper; }

/* Paper entries */
article.paper { counter-increment: paper; border-bottom: 1px solid var(--rule-soft); }
article.paper .head { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); column-gap: 6px; row-gap: 2px; width: 100%; text-align: left; background: none; border: 0; padding: 14px 0 13px; cursor: pointer; }
article.paper .head > :not(.num) { grid-column: 2; }
.num { grid-row: 1 / span 4; color: var(--faint); padding-top: 0.42em; font-size: 0.72rem; }
.num::before { content: counter(paper, decimal-leading-zero); }
article.paper .title { font-size: 1.16rem; font-weight: 500; line-height: 1.32; letter-spacing: -0.006em; color: var(--ink); transition: color 0.1s; }
article.paper .head:hover .title { color: var(--red); }
article.paper .authors { font-style: italic; color: var(--muted); font-size: 0.98rem; }
article.paper .tags { color: var(--muted); font-size: 0.7rem; margin-top: 3px; }
.tags .sep { color: var(--faint); }
.t-pp { color: var(--faint); }
.why { color: var(--muted); font-size: 0.7rem; margin-top: 2px; }
.why mark { background: var(--hl); color: var(--ink); padding: 0 2px; }
article.paper .body { display: none; padding: 2px 0 20px 2.6rem; margin-left: 6px; }
article.paper.open .body { display: block; }
article.paper.open .num { color: var(--red); }
article.paper:target .title, article.paper.flash .title { background: linear-gradient(transparent 60%, var(--hl) 60%); }
.abstract { margin: 4px 0 14px; font-size: 1.02rem; line-height: 1.62; text-align: justify; hyphens: auto; color: var(--ink-2); }
.facts { margin: 0 0 14px; display: grid; gap: 4px; font-size: 0.93rem; }
.facts div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 10px; align-items: baseline; }
.facts dt { color: var(--faint); font-size: 0.72rem; }
.facts dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.facts .ok { color: var(--green); font-family: var(--mono); font-size: 0.78em; margin-left: 6px; }
.facts .warn { color: var(--red); font-family: var(--mono); font-size: 0.78em; margin-left: 6px; }
.actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 0.76rem; }
.act { background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); text-decoration: none; font: inherit; }
.act::before { content: "["; color: var(--faint); margin-right: 2px; }
.act::after { content: "]"; color: var(--faint); margin-left: 2px; }
.act:hover { color: var(--red); }
.act[aria-expanded="true"] { background: var(--hl); }
.pid { margin-left: auto; color: var(--faint); text-decoration: none; }
.pid:hover { color: var(--red); }
.md-panel { margin-top: 14px; border-radius: 4px; overflow: hidden; background: var(--term-bg); color: var(--term-fg); }
.md-bar { display: flex; align-items: center; gap: 14px; padding: 8px 14px; border-bottom: 1px solid #3a352c; font-family: var(--mono); font-size: 0.72rem; color: #9c937f; }
.md-bar span { flex: 1; }
.md-bar a, .md-bar button.link { color: #e9e1cf; }
.md-panel pre { margin: 0; padding: 14px 16px; font-size: 0.74rem; line-height: 1.7; white-space: pre-wrap; word-break: break-word; max-height: 440px; overflow: auto; }

/* A single paper, set like a first page */
.first-page { padding-top: 56px; border: 0; counter-increment: none; }
.first-page > .kicker, .first-page .title, .first-page .authors, .first-page .tags { text-align: center; display: block; }
.first-page .kicker a { color: var(--muted); }
article.first-page .title { font-size: 2.15rem; line-height: 1.18; font-weight: 500; letter-spacing: -0.015em; margin: 4px 0 14px; }
article.first-page .authors { font-style: italic; color: var(--ink-2); font-size: 1.12rem; margin: 0 0 10px; }
article.first-page .tags { color: var(--muted); font-size: 0.72rem; margin: 0 0 30px; }
.abs-h { text-align: center; font-variant-caps: all-small-caps; letter-spacing: 0.1em; font-size: 1.05rem; font-weight: 600; margin: 0 0 6px; }
.first-page .abstract { max-width: 36em; margin: 0 auto 26px; font-size: 1.06rem; }
.first-page .facts, .first-page .actions, .first-page .md-panel { max-width: 36em; margin-left: auto; margin-right: auto; }
.first-page .actions { padding-top: 14px; border-top: 1px solid var(--rule); }

/* Archive and about */
.archive-toc { margin-top: 24px; border-top: 1px solid var(--ink); }
.archive-toc li a { padding: 12px 0; border-bottom: 1px solid var(--rule-soft); gap: 0; }
.archive-toc .no { color: var(--red); width: 4.5rem; flex: none; }
.archive-toc .d em { color: var(--ink); }
.archive-toc .c { color: var(--muted); }
.prose h2 { font-style: italic; font-size: 1.45rem; margin: 40px 0 8px; }
.prose p { color: var(--ink-2); }
.glossary { margin: 0 0 12px; display: grid; gap: 10px; }
.glossary div { display: grid; grid-template-columns: 8rem 1fr; gap: 14px; align-items: baseline; }
.glossary dt { font-size: 0.78rem; }
.glossary dd { margin: 0; color: var(--ink-2); }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
table.files { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
table.files td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--rule-soft); color: var(--ink-2); vertical-align: baseline; }
table.files tr:last-child td { border-bottom: 0; }
table.files td.mono { font-size: 0.74rem; white-space: nowrap; padding-right: 22px; }

/* Ask dialog */
.close { position: absolute; top: 10px; right: 14px; }
.close button { background: none; border: 0; font-size: 1.6rem; color: var(--muted); cursor: pointer; line-height: 1; }

/* Footer */
footer.site { border-top: 1px solid var(--ink); margin-top: 88px; }
.foot { max-width: 1160px; margin: 0 auto; padding: 28px 28px 44px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px 40px; align-items: start; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.foot nav a { color: var(--muted); text-decoration: none; }
.foot nav a:hover { color: var(--red); }
.foot .built { grid-column: 1 / -1; color: var(--faint); margin: 8px 0 0; }

@media (max-width: 900px) {
  header nav button, header nav a[href$="about.html"] { display: none; }
  .bar { gap: 18px; }
  .lookup { width: 36px; padding: 0 12px; cursor: text; }
  .lookup input { width: 0; }
  .lookup:focus-within { position: absolute; left: 14px; right: 14px; width: auto; z-index: 2; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .bar, .wrap, .wrap-wide, .foot { padding-left: 18px; padding-right: 18px; }
  .tools a.icon-btn { display: none; }
  h1 { font-size: 2.05rem; }
  .day-nav { float: none; display: flex; margin-top: 6px; }
  .toolbar { position: static; }
  .search { flex-basis: 100%; }
  .panel { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-height: 72vh; }
  article.paper .head { grid-template-columns: 2rem minmax(0, 1fr); }
  article.paper .body { padding-left: 0; margin-left: 0; }
  .abstract { text-align: left; }
  .facts div, .glossary div { grid-template-columns: 1fr; gap: 0; }
  .pid { margin-left: 0; flex-basis: 100%; }
  article.first-page .title { font-size: 1.65rem; }
  .foot { grid-template-columns: 1fr; }
  .foot nav { justify-content: flex-start; }
}
@media (max-width: 420px) {
  header nav a[href$="archive.html"] { display: none; }
}

/* Highlighter model */
.mark .wind path { stroke: var(--ink); stroke-width: 1.35; stroke-linejoin: round; }
.mark .sheet { fill: var(--leaf); }
.mark .hl { fill: none; stroke: var(--lime); stroke-width: 4.6; stroke-linecap: round; }
.mark .qed { fill: var(--ink); }
.brand { font-weight: 700; letter-spacing: -0.01em; }
h1, h2 { font-weight: 400; }
h1 em { color: inherit; background: linear-gradient(transparent 58%, var(--hl) 58%, var(--hl) 92%, transparent 92%); padding: 0 0.06em; }
.day .issue-head h1 em { background: none; }
a:hover { color: var(--ink); text-decoration-color: var(--ink); text-decoration-thickness: 2px; }
.btn.primary:hover { background: var(--hl); border-color: var(--ink); color: #111210; }
header nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--lime); }
.lookup, .search .prompt { color: var(--muted); }
.t-lean { color: #111210; background: var(--hl); padding: 0 4px; border-radius: 2px; }
:root[data-theme="dark"] .t-lean { color: var(--ink); }
.t-lean.soft { color: var(--muted); background: none; padding: 0; opacity: 1; }
.t-code { color: var(--ink-2); text-decoration: underline dotted; text-underline-offset: 3px; }
.chip.lean[aria-pressed="true"] { background: var(--hl); border-color: var(--ink); color: var(--ink); }
.facts .ok { color: var(--ink); background: var(--hl); padding: 0 4px; }
.rebuilt { color: var(--muted); border: 0; cursor: default; }
article.paper .title { font-weight: 400; font-size: 1.22rem; }
article.paper .head:hover .title { color: var(--ink); text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 4px; }
article.paper.open .num { color: var(--ink); }
article.first-page .title { font-weight: 400; }
.abs-h { font-weight: 700; }
.archive-toc .no { color: var(--muted); }
.terminal .cmd { color: #8e9187; }
.md-bar { border-bottom-color: #2a2c26; color: #8e9187; }
.panel { box-shadow: 5px 5px 0 var(--hl); }

/* Startup layer: the interface speaks Geist, the papers keep the LaTeX voice. */
body { font-family: var(--sans); font-size: 16px; line-height: 1.55; letter-spacing: -0.005em; }
.mono { font-size: 0.8em; letter-spacing: 0; }
h1, h2, .prose h2 { font-family: var(--sans); font-weight: 650; letter-spacing: -0.035em; font-style: normal; }
h1 { font-size: 2.5rem; line-height: 1.08; }
h1 em, h2 em { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -0.01em; background: none; padding: 0;
  text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 0.22em; text-underline-offset: 0.06em; text-decoration-skip-ink: none; }
.issue-head h1 em { text-decoration: none; }
.lede { font-size: 1.15rem; color: var(--ink-2); line-height: 1.6; }
.prose h2 { font-size: 1.3rem; margin-top: 44px; }

/* Buttons and controls get product-style corners; the primary action is the highlighter. */
.btn { font-family: var(--sans); font-weight: 550; font-size: 0.95rem; border-radius: 10px; padding: 10px 18px; border-color: var(--rule); background: var(--leaf); }
.btn:hover { background: var(--leaf); color: var(--ink); border-color: var(--ink); }
.btn.primary { background: var(--lime); border-color: var(--lime); color: #111210; }
.btn.primary:hover { background: #b9e81f; border-color: #b9e81f; color: #111210; }
.btn.small { border-radius: 8px; padding: 5px 12px; font-size: 0.85rem; }
.chip, .search, .lookup, input.mini { border-radius: 9px; }
.chip { font-family: var(--sans); font-size: 0.86rem; font-weight: 500; }
.chip em { font-family: var(--mono); font-size: 0.78rem; }
.search input, .interest-input { font-family: var(--sans); font-style: normal; }
.search input::placeholder, .interest-input::placeholder { font-style: normal; }
.interest-input { font-size: 1.15rem; border: 1px solid var(--rule); border-radius: 10px; padding: 11px 14px; background: var(--leaf); }
.interest-input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--lime); }
.panel { border-radius: 12px; border-color: var(--rule); box-shadow: 0 18px 50px rgba(17, 18, 16, 0.14); }
.terminal, .md-panel { border-radius: 12px; }
header nav a, header nav button { font-family: var(--sans); font-size: 0.9rem; }
header nav a[aria-current="page"] { box-shadow: none; background: var(--rule-soft); border-radius: 7px; padding: 4px 10px; }
header nav { gap: 6px; }
header nav a, header nav button { padding: 4px 10px; border-radius: 7px; }
header nav a:hover, header nav button:hover { background: var(--rule-soft); }
.brand { font-family: var(--sans); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.03em; }
.toolbar { border-bottom-color: var(--rule); }
.results, .stats { font-family: var(--mono); }

/* Home: product touches */
.live { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--rule); background: var(--leaf); border-radius: 999px; padding: 5px 14px 5px 10px; color: var(--ink-2); text-decoration: none; margin-bottom: 4px; }
.live:hover { border-color: var(--ink); color: var(--ink); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #5fb520; box-shadow: 0 0 0 0 rgba(95, 181, 32, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(95, 181, 32, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(95, 181, 32, 0); } 100% { box-shadow: 0 0 0 0 rgba(95, 181, 32, 0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.window-bar { display: flex; align-items: center; gap: 6px; margin: 0 -20px 14px; padding: 10px 14px; border-bottom: 1px solid var(--rule-soft); background: var(--paper); }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); }
.window-bar span { margin-left: 8px; color: var(--faint); }
.toc li a span:first-child { font-family: var(--serif); font-size: 1.05rem; }

/* Papers keep the LaTeX voice */
article.paper .title, article.paper .authors, .abstract, .group h2, .abs-h { font-family: var(--serif); }
article.paper .title { font-size: 1.24rem; }
.group h2 { font-weight: 400; letter-spacing: 0; }
.abs-h { font-family: var(--serif); letter-spacing: 0.12em; }
.facts dd { font-family: var(--sans); font-size: 0.92rem; }
.act { font-family: var(--mono); }
.prose p, .glossary dd, .hint { font-family: var(--sans); }
/* A translucent selection never hides the line above it. */
::selection { background: rgba(200, 245, 60, 0.5); color: inherit; }
:root[data-theme="dark"] ::selection { background: rgba(200, 245, 60, 0.3); }

/* Each paper is its own card, so the eye can tell where one ends and the next begins. */
article.paper { background: var(--leaf); border: 1px solid var(--rule); border-radius: 14px; margin: 0 0 10px; padding: 0 20px; transition: border-color 0.12s, box-shadow 0.12s; }
article.paper:hover { border-color: color-mix(in srgb, var(--ink) 35%, var(--rule)); }
article.paper.open { border-color: var(--ink); box-shadow: 0 10px 30px rgba(17, 18, 16, 0.08); }
article.paper .head { padding: 16px 0 15px; }
article.paper .body { padding-bottom: 20px; border-top: 1px dashed var(--rule); padding-top: 14px; }
.num { display: inline-flex; align-items: center; justify-content: center; align-self: start; width: 2rem; height: 1.45rem; margin-top: 0.15em; padding: 0; border-radius: 6px; background: var(--paper); border: 1px solid var(--rule-soft); color: var(--muted); font-size: 0.68rem; }
article.paper.open .num { background: var(--lime); border-color: var(--lime); color: #111210; }
article.paper.folded { display: none !important; }
article.first-page { background: none; border: 0; padding: 56px 0 0; box-shadow: none; }
.group h2 { margin: 36px 0 12px; }
.group:first-child h2 { margin-top: 20px; }

/* Jump to a field, and the buttons that unfold a long field */
.more { display: block; width: 100%; margin: 2px 0 8px; padding: 11px; border: 1px dashed var(--rule); border-radius: 12px; background: transparent; color: var(--ink-2); cursor: pointer; font-size: 0.78rem; }
.more:hover { border-color: var(--ink); color: var(--ink); background: var(--leaf); }
#flat-more { margin-top: 4px; }
:root[data-theme="dark"] article.paper.open { box-shadow: none; }
@media (max-width: 600px) {
  article.paper { padding: 0 14px; border-radius: 12px; }
}

/* Home: two ways in, before and after, and the honest answer to "why not my own AI" */
.prompt-box { width: 100%; margin: 0 0 14px; background: #1c1d19; border: 1px solid #2a2c26; font-size: 0.76rem; }
.side { border-radius: 16px; padding: 22px 26px; border: 1px solid var(--rule); }
.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.side li { position: relative; padding-left: 28px; }
.side li::before { position: absolute; left: 0; top: 0.05em; font-family: var(--mono); font-size: 0.85rem; width: 18px; height: 18px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; }
.side.old { background: var(--paper); color: var(--muted); }
.side.old li::before { content: "×"; color: var(--muted); border: 1px solid var(--rule); }
.side.new { background: var(--leaf); border-color: var(--ink); }
.side.new li::before { content: "✓"; background: var(--lime); color: #111210; }
.side .label { margin: 0 0 14px; color: var(--muted); }
.modes { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--rule); border-radius: 9px; margin: 0 0 14px; }
.modes button { background: none; border: 0; padding: 4px 12px; border-radius: 6px; cursor: pointer; color: var(--muted); font: inherit; }
.modes button[aria-selected="true"] { background: var(--lime); color: #111210; }


/* One continuous highlighter band under emphasised words, line by line, never broken between words. */
h1 em, h2 em {
  text-decoration: none;
  background-image: linear-gradient(var(--lime), var(--lime));
  background-repeat: no-repeat; background-size: 100% 0.15em; background-position: 0 94%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 0.05em;
}
.day .issue-head h1 em { background: none; padding: 0; }

/* The two ways in are the same height, with their actions on the bottom edge. */
.btn.dark { background: #1c1d19; border-color: #2e302a; color: #eceee6; }
.btn.dark:hover { border-color: #eceee6; background: #1c1d19; color: #fff; }

/* Ask page */
.ask-builder { background: var(--leaf); border: 1px solid var(--rule); border-radius: 16px; padding: 24px; }
.ask-builder label { display: block; color: var(--muted); margin: 0 0 6px; font-size: 0.8rem; }
.ask-builder .interest-input { margin-bottom: 16px; }
.ask-builder #prompt.terminal { margin: 0 0 16px; font-size: 0.78rem; min-height: 120px; }
.ask-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Dark mode: brighter ink, a clearer step between page and card, and heavier type rendering so thin serifs stay legible. */
:root[data-theme="dark"] {
  --paper: #0f100e; --leaf: #1a1c18; --ink: #f2f3ed; --ink-2: #d5d8ce; --muted: #a7aa9f; --faint: #7a7d73;
  --rule: #33362f; --rule-soft: #262822; --hl: #46561a;
}
:root[data-theme="dark"] body { -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto; }
:root[data-theme="dark"] article.paper .title, :root[data-theme="dark"] .abstract, :root[data-theme="dark"] .group h2,
:root[data-theme="dark"] .toc li a span:first-child,
:root[data-theme="dark"] h1 em, :root[data-theme="dark"] h2 em { text-shadow: 0 0 0.4px currentColor; }
:root[data-theme="dark"] article.paper .authors { color: var(--ink-2); text-shadow: 0 0 0.3px currentColor; }
:root[data-theme="dark"] article.paper .tags { color: var(--muted); }
:root[data-theme="dark"] .num { background: #121311; border-color: var(--rule); color: var(--muted); }

.ask-actions .btn { padding: 9px 14px; }
.ask-actions .btn:not(.primary) { font-weight: 500; }
.time-row { margin: 0 0 14px; }
.time-row label { display: block; color: var(--muted); margin: 0 0 6px; font-size: 0.8rem; }
.time-line { display: flex; align-items: center; gap: 12px; }
.time-line input { font-family: var(--mono); font-size: 1.05rem; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 10px; background: var(--leaf); color: var(--ink); outline: 0; }
.time-line input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--lime); }
.time-line span { color: var(--muted); font-size: 0.78rem; }
.time-row .hint { margin: 8px 0 0; font-size: 0.72rem; }
.time-row .hint.warn { color: var(--ink); background: var(--hl); padding: 4px 8px; border-radius: 6px; display: inline-block; }

/* Big headlines sit tighter than their selection boxes, so selected headline text changes colour instead of
   getting a background box. Nothing overlaps, and body text keeps the normal highlight. */
h1::selection, h1 *::selection, h2::selection, h2 *::selection, h3::selection, h3 *::selection,
article.first-page .title::selection, article.first-page .title *::selection { background: transparent; color: #4b6a00; }
:root[data-theme="dark"] h1::selection, :root[data-theme="dark"] h1 *::selection, :root[data-theme="dark"] h2::selection,
:root[data-theme="dark"] h2 *::selection, :root[data-theme="dark"] h3::selection, :root[data-theme="dark"] h3 *::selection,
:root[data-theme="dark"] article.first-page .title::selection, :root[data-theme="dark"] article.first-page .title *::selection { background: transparent; color: #c8f53c; }
@media (max-width: 600px) { .time-line { flex-wrap: wrap; } }


/* Quiet layer. Each page leads with one thing to do, and everything else waits to be asked for. */
.hero { padding-top: 12vh; padding-bottom: 10vh; min-height: 72vh; }
.hero .live { margin-bottom: 26px; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); line-height: 1.12; letter-spacing: -0.045em; margin: 0 0 34px; }
.hero h1 em { font-size: 1.04em; white-space: normal; display: inline; word-spacing: -0.06em; }
.finder { max-width: 720px; }
.finder-box { display: flex; align-items: center; background: var(--leaf); border: 1.5px solid var(--ink); border-radius: 14px; padding: 0 18px; box-shadow: 0 1px 2px rgba(17, 18, 16, 0.05), 0 14px 40px rgba(17, 18, 16, 0.07); transition: box-shadow 0.15s; }
.finder-box:focus-within { box-shadow: 0 0 0 4px var(--lime), 0 14px 40px rgba(17, 18, 16, 0.08); }
.finder-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-family: var(--sans); font-size: 1.25rem; color: var(--ink); padding: 16px 0; }
.finder-box input::placeholder { color: var(--faint); }
.tries { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 0; font-size: 0.78rem; }
.tries > span { color: var(--faint); margin-right: 4px; }
.tries button { font: inherit; color: var(--ink-2); background: none; border: 1px solid var(--rule); border-radius: 999px; padding: 4px 11px; cursor: pointer; }
.tries button:hover { border-color: var(--ink); color: var(--ink); }
.tries button[aria-pressed="true"] { background: var(--hl); border-color: var(--ink); color: #111210; }
.finds { list-style: none; margin: 0; padding: 0; }
.finder.open .finds { margin-top: 22px; border-top: 1px solid var(--rule); }
.finds li a { display: block; padding: 13px 2px; border-bottom: 1px solid var(--rule-soft); text-decoration: none; color: var(--ink); animation: rise 0.25s ease both; }
.finds li:nth-child(2) a { animation-delay: 0.03s; } .finds li:nth-child(3) a { animation-delay: 0.06s; }
.finds li:nth-child(4) a { animation-delay: 0.09s; } .finds li:nth-child(5) a { animation-delay: 0.12s; }
.finds .t { display: block; font-family: var(--serif); font-size: 1.12rem; line-height: 1.3; }
.finds .m { display: block; color: var(--muted); font-size: 0.7rem; margin-top: 4px; }
.finds mark { background: var(--hl); color: #111210; padding: 0 3px; }
.finds li a:hover .t { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.finds .none { color: var(--muted); padding: 14px 2px; }
.finds-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 16px 0 0; font-size: 0.8rem; }
.finds-foot a, .browse a, .hook-actions a { color: var(--ink); text-decoration: none; box-shadow: inset 0 -2px 0 var(--lime); }
.finds-foot a:hover, .browse a:hover, .hook-actions a:hover { box-shadow: inset 0 -8px 0 var(--hl); }
.browse { margin: 26px 0 0; font-size: 0.8rem; color: var(--muted); }
.finder.open + .browse { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .finds li a { animation: none; } }

.hook { border-top: 1px solid var(--rule); padding-top: 56px; padding-bottom: 24px; max-width: 980px; }
.hook h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin: 0 0 12px; }
.hook > p { color: var(--ink-2); max-width: 34em; margin: 0 0 22px; }
.hook-actions { display: flex; align-items: center; gap: 22px; margin: 0; font-size: 0.8rem; }

/* Issue page: one row of controls, a count, and the papers. */
.toolbar { padding-bottom: 12px; }
.results { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.results .sort { margin-left: auto; }
.results select { font: inherit; color: var(--muted); background: none; border: 0; padding: 2px 0; cursor: pointer; }
.results select:hover, .results select:focus { color: var(--ink); outline: 0; }

/* Ask page: one column. */
.ask-builder { margin-top: 28px; }
.ask-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 14px; }
.ask-actions .hint { margin: 0; font-size: 0.74rem; }

/* Footer: one line. */
footer.site { border-top: 1px solid var(--rule); margin-top: 96px; }
.foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 26px; padding: 22px 28px 30px; font-size: 0.74rem; }
.foot nav { display: flex; gap: 18px; justify-content: flex-start; }
.foot .built { margin: 0 0 0 auto; color: var(--faint); }
@media (max-width: 420px) { header.site .lookup { display: none; } }
@media (max-width: 600px) {
  .hero { padding-top: 40px; min-height: 0; }
  .finder-box input { font-size: 1.08rem; padding: 14px 0; }
  .foot .built { margin-left: 0; width: 100%; }
}
:root[data-theme="dark"] .tries button[aria-pressed="true"], :root[data-theme="dark"] .finds mark { color: var(--ink); }
:root[data-theme="dark"] .finder-box { border-color: var(--ink-2); box-shadow: none; }


/* Headlines: a highlighter box behind the emphasised words, exactly as wide as the words. */
h1 em, h2 em {
  background-image: linear-gradient(var(--hl), var(--hl));
  background-size: 100% 0.5em; background-position: 0 88%; background-repeat: no-repeat;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 0.04em 0 0; margin: 0;
}
.day .issue-head h1 em { background: none; }

/* Timezone picker */
.tz { position: relative; flex: 1; min-width: 0; }
.tz-btn { width: 100%; display: flex; align-items: center; gap: 10px; font: inherit; font-family: var(--sans); font-size: 0.95rem; color: var(--ink); background: var(--leaf); border: 1px solid var(--rule); border-radius: 10px; padding: 9px 12px; cursor: pointer; text-align: left; }
.tz-btn:hover, .tz-btn[aria-expanded="true"] { border-color: var(--ink); }
.tz-btn:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--lime); }
.tz-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tz-off, .tz-caret { color: var(--muted); font-size: 0.75rem; }
.tz-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 280px; z-index: 60; background: var(--leaf); border: 1px solid var(--ink); border-radius: 12px; box-shadow: 0 14px 40px rgba(17, 18, 16, 0.14); overflow: hidden; }
.tz-q { display: block; width: 100%; border: 0; border-bottom: 1px solid var(--rule); background: none; color: var(--ink); font-family: var(--sans); font-size: 0.95rem; padding: 11px 14px; outline: 0; }
.tz-q::placeholder { color: var(--faint); }
.tz-list { list-style: none; margin: 0; padding: 4px; max-height: 248px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.tz-list li[data-z] { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.tz-list .c { font-size: 0.92rem; color: var(--ink); }
.tz-list .c em { font-style: normal; font-size: 0.68rem; color: #111210; background: var(--hl); border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.tz-list .r { grid-column: 1; font-size: 0.68rem; color: var(--faint); }
.tz-list .o { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 0.72rem; color: var(--muted); }
.tz-list li.on { background: var(--paper); }
.tz-list li[aria-selected="true"] .c { font-weight: 600; }
.tz-list .none { padding: 9px 10px; font-size: 0.72rem; color: var(--faint); cursor: default; }
:root[data-theme="dark"] .tz-list .c em { color: var(--ink); }
:root[data-theme="dark"] .tz-pop { box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5); }

/* Sheets drifting through the margins */
.drift { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.drift i { position: absolute; top: 0; left: 0; display: block; will-change: transform; opacity: 0.55; }
.drift svg { display: block; width: 100%; height: auto; overflow: visible; }
.drift .s { fill: var(--leaf); stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.drift .f { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }
.drift .l { fill: none; stroke: var(--muted); stroke-width: 1.3; stroke-linecap: round; }
.drift .lit { opacity: 0.8; }
.drift .lit .l { stroke: var(--ink); }
.drift .lit .s { fill: var(--hl); }
main, footer.site { position: relative; z-index: 1; }
@media print { .drift { display: none; } }

/* Drawn highlight boxes (see fitBands in app.js). The CSS band above is the fallback without JavaScript. */
h1, h2 { position: relative; isolation: isolate; }
h1 em.fit, h2 em.fit { background: none; padding: 0; }
.band { position: absolute; z-index: -1; background: var(--hl); pointer-events: none; }
.time-line .tz-name { color: var(--ink); font-size: 0.95rem; }
.time-line .tz-off, .time-line .tz-caret { font-size: 0.75rem; }
.tz-list span { font-size: inherit; }
@media (max-width: 600px) { .tz { flex-basis: 100%; } .tz-pop { min-width: 0; } }

/* The footer sits at the bottom of short pages, and intro text uses more of the wider column. */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
.lede { max-width: 44em; }

/* 404: a page lost in peer review */
.lost { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px 56px; align-items: start; padding-top: 7vh; padding-bottom: 4vh; }
.lost-code { font-family: var(--sans); font-weight: 700; font-size: clamp(7rem, 18vw, 13rem); line-height: 0.85; letter-spacing: -0.07em; margin: 0 0 18px; color: var(--ink); }
.lost h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.12; letter-spacing: -0.045em; margin: 0 0 22px; }
.lost .lede { margin-bottom: 30px; }
.verdict { align-self: center; background: var(--leaf); border: 1px solid var(--rule); border-radius: 14px; padding: 22px 24px; font-size: 0.78rem; line-height: 1.7; color: var(--ink-2); transform: rotate(1.4deg); box-shadow: 0 1px 2px rgba(17, 18, 16, 0.04), 0 18px 40px rgba(17, 18, 16, 0.08); }
.verdict p { margin: 0 0 10px; }
.verdict .v-head { color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: 14px; }
.verdict .v-sign { margin: 14px 0 0; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink); }
.lost-note { grid-column: 1 / -1; border-top: 1px solid var(--rule); padding-top: 22px; margin: 18px 0 0; color: var(--ink-2); max-width: 44em; }
@media (max-width: 800px) { .lost { grid-template-columns: 1fr; padding-top: 32px; } .verdict { transform: none; } }
.lost-side { display: flex; flex-direction: column; align-items: stretch; }
.lost-art { width: 112%; max-width: none; height: auto; overflow: visible; margin: -10px 0 -34px -6%; position: relative; z-index: 0; }
.lost-side .verdict { position: relative; z-index: 1; margin-left: 12%; }
.la-wind path { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.la-back { fill: var(--paper); stroke: var(--faint); stroke-width: 2; stroke-linejoin: round; }
.la-sheet { fill: var(--leaf); stroke: var(--ink); stroke-width: 2.6; stroke-linejoin: round; }
.la-fold { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; }
.la-hl { stroke: var(--hl); stroke-width: 14; stroke-linecap: round; }
.la-ink path { fill: none; stroke: var(--muted); stroke-width: 3; stroke-linecap: round; }
.la-qed { fill: var(--ink); }
.la-stamp rect { fill: var(--leaf); fill-opacity: 0.82; stroke: var(--ink); stroke-width: 3; }
.la-stamp .la-small { paint-order: stroke; stroke: var(--leaf); stroke-width: 4px; }
.la-stamp rect + rect { stroke-width: 1.5; }
.la-stamp text { font-family: var(--mono); font-weight: 500; font-size: 21px; letter-spacing: 0.14em; fill: var(--ink); }
.la-stamp .la-small { font-size: 11px; letter-spacing: 0.3em; fill: var(--muted); }
.la-stamp { opacity: 0.88; transform-box: fill-box; transform-origin: center; animation: thunk 0.5s 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
.la-lock rect { fill: var(--lime); stroke: var(--ink); stroke-width: 2.4; }
.la-lock .la-shackle { fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; }
.la-lock text { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; font-weight: 500; fill: #111210; }
.la-float { animation: bob 6s ease-in-out infinite; }
@keyframes thunk { from { opacity: 0; transform: rotate(-16deg) scale(1.7); } to { opacity: 0.88; transform: rotate(-16deg) scale(1); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(-0.6deg); } }
@media (prefers-reduced-motion: reduce) { .la-float, .la-stamp { animation: none; } }
/* 404 easter egg: the flying accepted sheet */
.flight { position: fixed; inset: 0; z-index: 100; pointer-events: none; overflow: hidden; }
.flight .big-sheet { position: absolute; left: 50%; top: 50%; width: min(46vw, 420px); margin: calc(min(46vw, 420px) * -0.6) 0 0 calc(min(46vw, 420px) * -0.5); will-change: transform; filter: drop-shadow(0 30px 50px rgba(17, 18, 16, 0.18)); }
.flight svg { display: block; width: 100%; height: auto; }
.flight .s { fill: var(--paper); stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.flight .f { fill: none; stroke: var(--ink); stroke-width: 3.5; stroke-linejoin: round; }
.flight .h { stroke: var(--hl); stroke-width: 22; stroke-linecap: round; }
.flight .l { fill: none; stroke: var(--muted); stroke-width: 5; stroke-linecap: round; }
.flight .q { fill: var(--ink); }
.flight .st { fill: var(--lime); stroke: var(--ink); stroke-width: 4; }
.flight text { font-family: var(--mono); font-weight: 500; font-size: 30px; letter-spacing: 0.14em; fill: #111210; }
.flight .gust { position: absolute; left: 0; height: 3px; width: 50vw; border-radius: 3px; background: var(--ink); opacity: 0; }
.flight .gust:nth-child(1) { top: 38%; } .flight .gust:nth-child(2) { top: 52%; width: 36vw; } .flight .gust:nth-child(3) { top: 64%; width: 44vw; }
.lost { overflow-x: clip; }
@media (max-width: 800px) { .lost-art { width: 100%; margin: 0 0 -24px; } .lost-side .verdict { margin-left: 0; } }

/* Email sign-up and the sample email */
.signup { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; margin: 8px 0 40px; max-width: 620px; }
.signup .finder-box { flex: 1 1 260px; margin: 0; }
.signup input[type="email"] { width: 100%; }
.browse a + a { margin-left: 18px; }
.issue-mail { margin: 48px 0 0; text-align: center; }
.mail-sample { margin: 0 0 24px; }
.mail { border: 1px solid var(--rule); border-radius: 10px; background: var(--leaf); max-width: 680px; overflow: hidden; }
.mail-subject { margin: 0; padding: 14px 22px; border-bottom: 1px solid var(--rule); font-weight: 550; }
.mail-subject .mono { color: var(--muted); font-weight: 400; font-size: 0.8rem; margin-right: 10px; }
.mail-body { padding: 6px 22px 18px; font-family: var(--serif); font-size: 1rem; line-height: 1.55; color: var(--ink-2); }
.mail-body h3 { font-family: var(--sans); font-size: 1.05rem; color: var(--ink); margin: 26px 0 6px; }
.mail-body a { color: var(--ink); }
.mail-body ul { padding-left: 20px; }
.mail-body li { margin: 4px 0; }
.mail-body blockquote { margin: 10px 0; padding: 10px 14px; border-left: 3px solid var(--hl); background: var(--paper); font-size: 0.92rem; }
.mail-body hr { border: 0; border-top: 1px solid var(--rule); margin: 22px 0 12px; }
.mail-body hr + p { font-size: 0.85rem; color: var(--muted); }
.signup-done { margin: 8px 0 40px; max-width: 620px; padding: 14px 18px; border-radius: 10px; background: var(--hl); color: #111210; font-weight: 550; }

/* Lean builds */
.lean-list { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.lean-list li a { display: grid; grid-template-columns: 190px 1fr; column-gap: 16px; row-gap: 2px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--rule-soft); text-decoration: none; color: var(--ink); }
.lean-list img { grid-row: span 3; height: 20px; align-self: center; }
.lean-list .repo { font-size: 0.78rem; color: var(--ink); }
.lean-list .t { color: var(--muted); font-size: 0.95rem; }
.lean-list .assumed-tag { grid-column: 2; font-size: 0.72rem; }
.lean-list li a:hover .repo { text-decoration: underline; }
.lean-page h1.repo { font-size: 1.5rem; overflow-wrap: anywhere; }
.lean-page h1.repo a { color: var(--ink); text-decoration: none; }
.lean-page .badge-img img { height: 20px; }
.lean-page .facts { margin-top: 18px; }
.lean-papers { padding-left: 1.1em; }
.lean-papers li { margin: 6px 0; }
.faint { color: var(--faint); font-size: 0.78em; }
.facts .build-link { font-size: 0.72rem; margin-left: 8px; color: var(--muted); }
.snippet { margin: 12px 0; border-radius: 12px; overflow: hidden; background: var(--term-bg); color: var(--term-fg); }
.snippet pre { margin: 0; padding: 12px 16px; font-size: 0.74rem; line-height: 1.6; white-space: pre-wrap; word-break: break-all; }
@media (max-width: 640px) { .lean-list li a { grid-template-columns: 1fr; } .lean-list img { grid-row: auto; } }
.lean-page .kicker a { font-family: var(--mono); color: var(--muted); }
header nav a { white-space: nowrap; }
@media (max-width: 420px) { header nav { gap: 0; } header nav a, header nav button { padding: 4px 7px; } }
.mail-body.mail-html { padding: 0; }
