/* akdarrah — dark-only terminal. Tokens from the design handoff (docs/design/moss-and-bark.md). Radius 0, no shadows. */

:root {
  --bg: #1d201b;
  --bg2: #252923;
  --rule: #33382f;
  --ink: #e3e0d3;
  --body: #c4c1b2;
  --muted: #9b9a8b;
  --faint: #767a6c;
  --moss: oklch(0.66 0.07 135);
  --lichen: oklch(0.74 0.07 80);
  --slate: oklch(0.68 0.04 230);
  --rust: oklch(0.66 0.10 38);
  --teal: oklch(0.72 0.05 190);

  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --measure: 680px;
  --mark: color-mix(in oklch, var(--lichen) 28%, transparent);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 400 13px/1.4 var(--mono);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color .12s; }
a:hover, button:hover { color: var(--lichen); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; transition: color .12s; }
:focus-visible { outline: 1px solid var(--lichen); outline-offset: 2px; }
::selection { background: var(--lichen); color: var(--bg); }
img, video { max-width: 100%; display: block; }
.skip { position: absolute; left: -999px; top: 0; background: var(--lichen); color: var(--bg); padding: 10px 14px; z-index: 100; }
.skip:focus { left: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.faint { color: var(--faint); }
.muted { color: var(--muted); }
.ink { color: var(--ink); }
.moss { color: var(--moss); }
.lichen { color: var(--lichen); }
.slate { color: var(--slate); }
.teal { color: var(--teal); }
[hidden] { display: none !important; }

/* The ASCII portrait on /about keeps its generated classes (script/ascii_portrait.py). */
.a-ink { color: var(--ink); } .a-muted { color: var(--muted); } .a-faint { color: var(--faint); }
.a-cyan { color: var(--teal); } .a-ochre { color: var(--lichen); } .a-blue { color: var(--slate); }
.art {
  margin: 0; font: 400 var(--s, 10px)/1.15 var(--mono); white-space: pre; user-select: none; color: var(--ink);
  font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; overflow: hidden;
}

/* ── Chrome: tmux bar, frame, status bar ───────────────── */
.tmux, .statusbar { display: flex; justify-content: space-between; flex: none; font: 12px/1 var(--mono); background: var(--bg2); color: var(--muted); }
.tmux { border-bottom: 1px solid var(--rule); position: relative; }
.tmux > span { display: flex; align-items: stretch; }
.tabs { all: unset; display: flex; align-items: stretch; } /* the nav is a popover on phones; inline here */
.tmux .menu { display: none; font-size: 16px; line-height: 12px; }
.tmux a, .tmux .cell, .tmux button { padding: 10px 14px; display: inline-flex; align-items: center; }
.brand { background: var(--moss); color: var(--bg); font-weight: 500; }
.brand:hover { color: var(--bg); }
.tab { color: var(--muted); }
.tab[aria-current="page"] { background: var(--bg); color: var(--ink); }
.seal { background: var(--lichen); color: var(--bg); font-weight: 500; padding: 10px 12px !important; }
.seal:hover { color: var(--bg); }
.admin-link { color: var(--moss); }
.account-link { color: var(--ink); }
.account-link span { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { position: absolute; left: 0; bottom: -3px; height: 2px; width: 0; background: var(--lichen); z-index: 5; pointer-events: none; }

.frame { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
.frame.solo { grid-template-columns: minmax(0, 1fr); }
.main { padding: var(--pt, 56px) var(--px, 72px) var(--pb, 72px); display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.main.home { --pt: 52px; --px: 80px; --pb: 56px; gap: 20px; }
.main.post { --pt: 52px; --px: min(120px, calc((100vw - 976px) / 2)); --pb: 96px; gap: 26px; font: 400 19px/1.7 var(--serif); }
.main.about { --px: 120px; }
.main.flow { --pt: 72px; --px: 120px; max-width: 900px; }
.main.error-page { --pt: 0; --px: 120px; --pb: 0; justify-content: center; }
.aside { border-left: 1px solid var(--rule); padding: 56px 40px; display: flex; flex-direction: column; gap: 36px; font: 12px/1 var(--mono); min-width: 0; }
.aside h2 { font: 11px/1 var(--mono); color: var(--faint); margin: 0; font-weight: 400; }
.aside section { display: flex; flex-direction: column; gap: 12px; }

.statusbar { border-top: 1px solid var(--rule); }
.statusbar > span { display: flex; align-items: stretch; }
.statusbar > span:last-child { display: block; white-space: nowrap; }
.statusbar > span:first-child > span, .statusbar > span:last-child { padding: 10px 14px; }
/* The legal line is vim's command line under the status bar: on the ground, © under the mode block, links under the status. */
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 14px; padding-left: 14px; font: 12px/1 var(--mono); color: var(--muted); }
.legal > span { padding: 10px 0; }
.legal nav { display: flex; }
.legal a { padding: 10px 14px; color: var(--ink); }
.legal a + a { padding-left: 0; }
.mode { background: var(--moss); color: var(--bg); font-weight: 500; }
.mode.read { background: var(--lichen); }
.mode.insert { background: var(--slate); }
.mode.error { background: var(--rust); }

/* Prompt line, cursor, section labels */
.prompt { font: 13px/1.4 var(--mono); color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.prompt .u { color: var(--moss); }
.prompt .p { color: var(--slate); }
.prompt .d { color: var(--lichen); }
.prompt .c { color: var(--ink); }
.cursor { display: inline-block; width: 8px; height: 15px; background: var(--lichen); vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.block { display: flex; flex-direction: column; gap: 22px; }
.flash-line { font: 12px/1.6 var(--mono); color: var(--muted); margin: 0; }
.ok { color: var(--moss); }
.err { color: var(--rust); }
.br { color: var(--lichen); }

/* Big titles */
.hero, .page-h1, .post-head h1 { margin: 0; font-weight: 500; font-family: var(--mono); max-width: 1000px; text-wrap: balance; overflow-wrap: anywhere; color: var(--ink); }
.hero { font-size: clamp(38px, 7vw, 72px); line-height: 1.05; letter-spacing: -.045em; }
.hero a { color: inherit; }
.hero .cursor { width: .42em; height: .82em; margin-left: .12em; vertical-align: -.06em; }
.page-h1, .post-head h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.06; letter-spacing: -.04em; }
.page-h1.big { font-size: clamp(38px, 7vw, 72px); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; font: 12px/1 var(--mono); color: var(--muted); }
.tag { font-size: 12px; }
.right { text-align: right; }

/* Dotted-leader rows */
.leader { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; color: var(--ink); }
.leader::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted var(--faint); }
.leader .n { order: 2; color: var(--muted); }

/* Label-over-value facts: about, akd login */
.facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 12px 40px; margin: 0; padding: 20px 0; font: 13px/1.5 var(--mono); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); max-width: 680px; }
.facts > div, .links > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.facts dt, .links dt { font-size: 11px; color: var(--faint); }
.facts dd, .links dd { margin: 0; overflow-wrap: anywhere; }

/* ── Home ──────────────────────────────────────────────── */
.excerpt { margin: 0; font: 400 23px/1.5 var(--serif); color: var(--body); max-width: var(--measure); text-wrap: pretty; }
.recent { margin-top: 22px; max-width: 1000px; display: flex; flex-direction: column; gap: 10px; }
.ls { display: flex; flex-direction: column; }
.ls-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 88px 40px; gap: 24px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--rule); color: var(--ink); }
.ls-row:hover { background: var(--bg2); color: var(--ink); }
.ls-row:hover .t { color: var(--lichen); }
.ls-row .date, .ls-row .read { color: var(--muted); }
.ls-row .read { text-align: right; }
.ls-row .t { font-weight: 500; transition: color .12s; }
.pager { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; padding-top: 14px; border-top: 1px solid var(--rule); font: 12px/1 var(--mono); color: var(--muted); }
.pager a, .pager button { color: var(--ink); }
.pager a:hover, .pager button:hover { color: var(--lichen); }
.pager .sub { display: contents; }
.pager .sub > button { margin-left: auto; }
.pager .sub-panel { flex-basis: 100%; order: 1; max-width: 480px; margin-left: auto; }

/* ── Post ──────────────────────────────────────────────── */
.post-head { display: flex; flex-direction: column; gap: 14px; padding-bottom: 6px; }
.contents-toggle { margin-left: 24px; color: var(--ink); }
.narrow-only { display: none; }
.toc { display: flex; flex-direction: column; gap: 4px; font: 12px/1.5 var(--mono); max-width: var(--measure); padding-top: 4px; }
.toc a { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 4px; color: var(--muted); }
.toc .mk { color: var(--lichen); }
.toc .active { color: var(--ink); }
.changes-line { display: none; margin: 0; flex-direction: column; gap: 4px; font: 11px/1.6 var(--mono); color: var(--muted); }

.prose { display: flex; flex-direction: column; gap: 26px; }
.prose > * { margin: 0; }
.prose > p, .prose > ul, .prose > ol, .prose > blockquote, .prose > h2, .prose > h3, .prose > h4, .prose > table, .prose > figure.term, .prose > .footnotes { max-width: var(--measure); }
.prose p { text-wrap: pretty; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.prose a:hover { color: var(--lichen); text-decoration-color: var(--lichen); }
.prose h2 { font: 500 17px/1.4 var(--mono); margin: 18px 0 -6px; scroll-margin-top: 24px; }
.prose h2::before { content: "## "; color: var(--lichen); }
.prose h3 { font: 500 13px/1.4 var(--mono); margin: 10px 0 -10px; }
.prose h3::before { content: "### "; color: var(--lichen); }
.prose .anchor { display: none; }
.prose :is(p, li, td, th, blockquote, h2, h3) code { font: 400 .8em/1 var(--mono); background: var(--bg2); color: var(--lichen); padding: 2px 5px; }
.prose sup, .prose .footnote-ref { font: 500 11px/1 var(--mono); }
.prose .footnote-ref a { color: var(--lichen); text-decoration: none; padding-left: 2px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .3em; }
.prose li::marker { color: var(--muted); font-family: var(--mono); font-size: .8em; }
.prose blockquote { border-left: 1px solid var(--lichen); padding-left: 20px; color: var(--muted); font-style: italic; }
.prose hr { border: 0; border-top: 1px dashed var(--rule); width: 100%; max-width: var(--measure); }
.prose table { border-collapse: collapse; font: 13px/1.5 var(--mono); display: block; overflow-x: auto; position: relative; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 8px 16px 8px 0; text-align: left; }
.prose th { color: var(--faint); font-weight: 400; font-size: 11px; }
.prose .footnotes { font-size: 15px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 18px; }
.prose .footnotes ol { margin: 0; padding-left: 1.4em; }
.prose .footnotes li::marker { color: var(--lichen); }
.prose .footnote-backref { text-decoration: none; color: var(--faint); }
.legal-prose { gap: 22px; max-width: var(--measure); font: 400 19px/1.7 var(--serif); }
.sidenote { display: none; }

/* Wide enough for the margin: each block is a row of the text track and the note track. */
@media (min-width: 1100px) {
  .post .prose { display: grid; grid-template-columns: minmax(0, var(--measure)) 240px; gap: 26px 56px; align-items: start; }
  .post .prose > * { grid-column: 1; min-width: 0; }
  .post .prose > .sidenote { display: block; grid-column: 2; padding-top: 6px; font: 400 14px/1.5 var(--serif); color: var(--muted); }
  .post .prose > .sidenote p { margin: 0 0 10px; }
  .post .prose > .sidenote p:last-child { margin: 0; }
  .sn-mark { font: 500 11px/1.6 var(--mono); color: var(--lichen); }
  .post .prose > figure.media, .post .prose > figure.code.wide { grid-column: 1 / -1; }
  .post .prose > .footnotes { display: none; }
}
@media (max-width: 1099px) {
  .changes-line { display: flex; }
  .changes-line .br { font-size: 11px; }
}

/* Code blocks */
figure.code { margin: 0; background: var(--bg2); font: 400 13px/1.75 var(--mono); position: relative; min-width: 0; }
.code-head { display: flex; justify-content: space-between; padding: 10px 18px; border-bottom: 1px solid var(--rule); font: 11px/1 var(--mono); color: var(--muted); }
.yank { color: var(--faint); font-size: 11px; }
.code-body { padding: 14px 0; overflow-x: auto; position: relative; }
.code-body code { display: block; white-space: pre; min-width: max-content; }
.ln { display: flex; }
.lno { width: 44px; flex: none; text-align: right; padding-right: 18px; color: var(--faint); user-select: none; box-sizing: content-box; }
.lc { padding-right: 18px; }
.ln.hl { background: color-mix(in oklch, var(--lichen) 10%, transparent); box-shadow: inset 2px 0 var(--lichen); }
.ln.hl .lno { color: var(--lichen); }
/* Rouge token classes → palette */
.code-body :is(.k, .kc, .kd, .kn, .kp, .kr, .kt, .kv, .ow) { color: var(--rust); }
.code-body :is(.s, .s1, .s2, .sb, .sc, .sd, .se, .sh, .si, .sx, .sr, .ss, .dl, .sa) { color: var(--moss); }
.code-body :is(.m, .mi, .mf, .mh, .mo, .mb, .il, .no, .nc, .bp) { color: var(--lichen); }
.code-body :is(.nf, .fm, .nx) { color: var(--slate); }
.code-body :is(.nb, .vg, .nt) { color: var(--teal); }
.code-body :is(.c, .c1, .cm, .cs, .cp, .ch, .cd) { color: var(--muted); font-style: italic; }
.code-body :is(.gd) { color: var(--rust); } .code-body :is(.gi) { color: var(--moss); }
.code-body .err { color: inherit; }

figure.term { margin: 0; background: var(--bg2); }
figure.term pre { margin: 0; padding: 14px 20px; font: 400 13px/1.75 var(--mono); color: var(--muted); white-space: pre; overflow-x: auto; position: relative; }
.t-dollar, .t-wait { color: var(--lichen); }
.t-ok { color: var(--moss); }
.t-bad { color: var(--rust); }

figure.media { margin: 8px 0; display: flex; flex-direction: column; gap: 10px; }
.prose > figure.media { max-width: 976px; } /* images, pairs, videos and YouTube embeds alike */
figure.media img, figure.media video { width: 100%; height: auto; background: var(--bg2); }
figure.media.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
figure.media.pair figcaption { grid-column: 1 / -1; }
figure.media figcaption { font: 12px/1.6 var(--mono); color: var(--muted); }
.vwrap { position: relative; }
.ytwrap { aspect-ratio: 16 / 9; background: var(--bg2); }
.ytwrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.vctl { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 14px; padding: 14px 18px; font: 12px/1 var(--mono); }
.vplay { width: 28px; height: 28px; display: grid; place-items: center; background: var(--bg); color: var(--ink); font-size: 10px; }
.vbar { flex: 1; height: 2px; background: var(--rule); position: relative; cursor: pointer; }
.vfill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--lichen); }
.vtime { color: var(--muted); }

/* Post foot */
.post-foot { max-width: 976px; display: flex; flex-direction: column; gap: 28px; padding-top: 36px; font: 13px/1 var(--mono); }
.actions { display: flex; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 18px; }
.actions > span { display: flex; gap: 24px; align-items: center; }
.actions form { display: inline; }
.signal { color: var(--muted); }
.signal .bolt { color: var(--lichen); }
.signal[disabled] { color: var(--ink); cursor: default; }
.read-next { display: flex; flex-direction: column; gap: 14px; }
.read-next .h { font: 11px/1 var(--mono); color: var(--faint); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--bg2); color: var(--ink); min-width: 0; }
.card .t { font: 500 15px/1.35 var(--mono); }
.card .m { font: 11px/1.5 var(--mono); color: var(--muted); }
.card .why { font: italic 400 15px/1.4 var(--serif); color: var(--muted); }
.keys { display: flex; flex-wrap: wrap; gap: 8px 28px; padding-top: 8px; color: var(--faint); font: 11px/1 var(--mono); }
.keys b { color: var(--muted); font-weight: 400; }

/* Comments */
#comments { max-width: var(--measure); gap: 20px; }
.c-toggle { align-self: flex-start; color: var(--ink); }
.thread { display: flex; flex-direction: column; gap: 22px; padding-left: 20px; border-left: 1px solid var(--rule); }
.comment { display: flex; flex-direction: column; gap: 6px; }
.comment .by { font: 12px/1 var(--mono); color: var(--muted); }
.comment .body { font: 400 17px/1.6 var(--serif); }
.comment .body p { margin: 0 0 .5em; }
.comment .body a { text-decoration: underline; }
.reply { align-self: flex-start; font: 12px/1 var(--mono); color: var(--muted); }
.signout { align-self: flex-start; }
.linkish { font: 11px/1 var(--mono); color: var(--faint); background: none; border: 0; padding: 0; cursor: pointer; }
.linkish:hover { color: var(--lichen); }

/* Forms */
.cform { display: flex; flex-direction: column; gap: 14px; font-size: 13px; max-width: 620px; }
.pfield { display: flex; gap: 12px; align-items: baseline; border-bottom: 1px solid var(--rule); padding-bottom: 8px; font: 13px/1.4 var(--mono); }
.pfield.say, .flow .pfield { border-bottom-color: var(--ink); }
.pfield > span { color: var(--lichen); width: 56px; flex: none; }
.pfield input, .pfield textarea, .pinput input { flex: 1; min-width: 0; font: inherit; color: var(--ink); background: none; border: 0; outline: none; padding: 0; caret-color: var(--lichen); }
.pfield textarea { font: 400 17px/1.6 var(--serif); resize: vertical; }
.pfield input::placeholder, .pfield textarea::placeholder, .pinput input::placeholder { color: var(--faint); }
.cform .foot { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); gap: 12px; }
.wq { font: 12px/1 var(--mono); background: var(--ink); color: var(--bg); padding: 9px 12px; white-space: nowrap; }
.wq:hover { background: var(--lichen); color: var(--bg); }
.hp { position: absolute; left: -9999px; }
.check { display: flex; gap: 8px; align-items: center; font: 12px/1 var(--mono); color: var(--ink); cursor: pointer; align-self: flex-start; padding-top: 6px; }
.check input { appearance: none; margin: 0; width: 14px; height: 14px; border: 1px solid var(--muted); display: inline-grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--moss); border-color: var(--moss); }
.check input:checked::after { content: "✓"; color: var(--bg); font-size: 10px; line-height: 1; }

/* Subscribe toggle */
.sub { display: flex; flex-direction: column; gap: 12px; }
.sub > button { align-self: flex-start; font: 12px/1 var(--mono); color: var(--ink); }
.sub .note { font: 11px/1.6 var(--mono); color: var(--muted); }
.sub .note a { color: var(--ink); }
.pinput { display: flex; gap: 10px; align-items: baseline; border-bottom: 1px solid var(--muted); padding-bottom: 8px; font: 13px/1 var(--mono); }
.pinput > span:first-child { color: var(--lichen); }

/* ── Archive ───────────────────────────────────────────── */
.filter { display: flex; flex-direction: column; gap: 14px; max-width: 880px; padding-top: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.chip { border: 1px solid var(--rule); padding: 6px 10px; color: var(--c, var(--ink)); }
.chip[aria-pressed="true"] { background: var(--c, var(--ink)); border-color: var(--c, var(--ink)); color: var(--bg); }
.years { max-width: 880px; display: flex; flex-direction: column; gap: 18px; padding-top: 8px; }
.year { display: flex; flex-direction: column; container: arow / inline-size; }
.year-h { display: flex; align-items: center; gap: 14px; padding-bottom: 8px; }
.year-h b { font-weight: 500; color: var(--lichen); }
.year-h i { flex: 1; border-top: 1px dashed var(--rule); }
.year-h small { color: var(--muted); font-size: 12px; }
.arow { display: grid; grid-template-columns: 72px minmax(0, 1fr) 96px 40px; gap: 20px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--rule); color: var(--ink); }
.arow:hover { background: var(--bg2); color: var(--lichen); }
.arow .md, .arow .read { color: var(--muted); }
.arow .read { text-align: right; }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar { display: grid; grid-template-columns: 76px minmax(0, 1fr) 28px; gap: 10px; align-items: center; font: 12px/1 var(--mono); }
.bar .k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .b { height: 8px; background: var(--bg2); }
.bar .b i { display: block; height: 100%; }
.bar .n { color: var(--muted); text-align: right; }
.bars.wide .bar { grid-template-columns: minmax(0, 1fr) 96px 32px; }
.swatch { display: inline-block; width: 10px; height: 10px; }

/* ── About ─────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 72px; }
.portrait-fig { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.portrait-fig figcaption { font: 11px/1.5 var(--mono); color: var(--faint); }
/* 120 columns at .6em wide: 4.72px fills the 340px column. */
.portrait { --s: 4.72px; }
.about-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.bio { display: flex; flex-direction: column; gap: 20px; font: 400 21px/1.6 var(--serif); color: var(--body); max-width: 620px; }
.bio p { margin: 0; text-wrap: pretty; }
.bio a { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.about-col .facts { max-width: 620px; }
.links { display: flex; flex-wrap: wrap; gap: 16px 36px; margin: 0; font: 13px/1 var(--mono); }
.links > div { gap: 6px; }
.links dd { white-space: nowrap; }
.colophon { margin: 0; padding-top: 12px; font: 12px/1.6 var(--mono); color: var(--faint); }

/* ── 404 / 500 ─────────────────────────────────────────── */
.notfound { display: flex; flex-direction: column; justify-content: center; gap: 22px; min-height: 60vh; }
.watermark { font: 500 220px/.9 var(--mono); letter-spacing: -.06em; color: var(--bg2); -webkit-text-stroke: 1px var(--rule); }
.notfound .lines { display: flex; flex-direction: column; gap: 10px; font: 14px/1.6 var(--mono); }
.notfound .lines a { text-decoration: underline; }

/* ── Palette (/ search) and shell (`) ──────────────────── */
dialog { color: var(--ink); }
.palette { width: min(100% - 32px, 620px); max-height: min(70vh, 520px); padding: 0; border: 1px solid var(--rule); background: var(--bg2); margin-top: 120px; font: 13px/1.4 var(--mono); }
.palette::backdrop { background: rgb(15 17 14 / .55); }
.palette[open] { display: flex; flex-direction: column; }
.palette .pinput { border-bottom: 1px solid var(--rule); padding: 14px 20px; }
.palette ul { list-style: none; margin: 0; padding: 6px 0; overflow-y: auto; flex: 1; }
.palette li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 9px 20px; cursor: pointer; }
.palette li i { font: 11px/1 var(--mono); color: var(--faint); }
.palette li[aria-selected="true"] { background: var(--bg); box-shadow: inset 2px 0 var(--lichen); }
.palette li small { color: var(--muted); white-space: nowrap; }
.palette .hint { border-top: 1px solid var(--rule); padding: 9px 20px; color: var(--faint); font-size: 11px; display: flex; gap: 16px; white-space: nowrap; overflow: hidden; }
.palette .hint b { color: var(--muted); font-weight: 400; }

.shell { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg); }
.shell[open] { display: flex; flex-direction: column; }
.shell .split { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 0; }
.shell .session { padding: 28px 32px; display: flex; flex-direction: column; gap: 12px; font: 13px/1.65 var(--mono); overflow-y: auto; }
.shell .session pre, .shell .tree pre { margin: 6px 0 0; font: inherit; color: var(--muted); white-space: pre-wrap; }
.shell [data-shell-target="log"] { display: flex; flex-direction: column; gap: 12px; }
.shell .entry { display: flex; flex-direction: column; }
.shell .live { display: flex; align-items: center; gap: 8px; }
.shell .live input { flex: 1; min-width: 0; font: inherit; color: var(--ink); background: none; border: 0; outline: none; padding: 0; caret-color: var(--lichen); }
.shell .tree { border-left: 1px solid var(--rule); padding: 28px 32px; display: flex; flex-direction: column; gap: 6px; font: 13px/1.65 var(--mono); overflow: auto; }
.shell .tree pre { white-space: pre; }

/* ── Tablet and below: one column; the archive's subscribe moves into the main column ── */
.mobile-sub { display: none; }
@media (max-width: 1100px) {
  .main.main:not(.post) { --px: clamp(20px, 5vw, 40px); }
  .main.about { --pt: 40px; }
  .about-grid { gap: 40px; }
}
@media (max-width: 900px) {
  .frame { grid-template-columns: minmax(0, 1fr); }
  .aside { display: none; }
  .mobile-sub { display: block; }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .portrait-fig { order: 1; } /* prompt, title, then content: the tall portrait follows the text here */
  .portrait { --s: min(6.5px, calc((100vw - 48px) / 72)); }
  .main.flow { max-width: none; }
}
@media (max-width: 1099px) {
  .main.post { --px: clamp(20px, 5vw, 40px); }
}

/* ── Mobile ────────────────────────────────────────────── */
.tmux .slash { display: none; }
@media (max-width: 760px) {
  .tmux .hint { display: none !important; }
  .tmux .menu { display: inline-flex; }
  .tabs:not(:popover-open) { display: none; }
  .tabs:popover-open { position: fixed; inset: 45px 0 auto; flex-direction: column; background: var(--bg2); border-bottom: 1px solid var(--rule); }
  .tabs .tab { padding: 16px 20px; }
  .tmux a, .tmux .cell, .tmux button { padding: 16px 14px; }
  .tmux .slash { display: inline-flex !important; }
  .main.main { --pt: 32px; --px: 20px; --pb: 64px; gap: 16px; }
  .main.post { --pt: 28px; font-size: 17px; }
  .main.error-page { --pt: 0; --pb: 0; }
  .hero { font-size: 38px; line-height: 1.08; }
  .post-head h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.035em; }
  .page-h1, .page-h1.big { font-size: 38px; line-height: 1.08; }
  .excerpt { font-size: 18px; line-height: 1.55; }
  .meta { gap: 16px; }
  .recent { margin-top: 14px; }
  .ls-row { grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px; padding: 14px 0; }
  .ls-row .date, .ls-row .tag { font-size: 11px; }
  .ls-row .tag::before { content: "· "; color: var(--muted); }
  .ls-row .t { grid-column: 1 / -1; grid-row: 2; font-size: 14px; }
  .ls-row .read { display: none; }
  .pager .sub-panel { max-width: none; }
  .contents-toggle { flex-basis: 100%; margin: 0; min-height: 44px; display: flex; align-items: center; gap: 6px; padding: 0 14px; border: 1px solid var(--rule); }
  .narrow-only { display: inline; }
  .prose h2 { font-size: 15px; margin-top: 6px; }
  .prose { gap: 18px; }
  .prose > figure.media, .prose > figure.code, .prose > figure.term { margin-left: -20px; margin-right: -20px; }
  figure.media figcaption { padding: 0 20px; }
  figure.code::after { content: ""; position: absolute; right: 0; top: 32px; bottom: 0; width: 36px; background: linear-gradient(90deg, transparent, var(--bg2)); pointer-events: none; }
  .actions, .actions > span { flex-wrap: wrap; gap: 16px; }
  .cards, .conf { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watermark { font-size: 120px; }
  .palette { margin-top: 64px; }
  .shell .split { grid-template-columns: minmax(0, 1fr); }
  .shell .tree { display: none; }
  .shell .session { padding: 24px 20px; }
  .statusbar > span:last-child { display: none; }
  .legal > span, .legal a { padding-top: 16px; padding-bottom: 16px; }
}

@container arow (max-width: 520px) {
  .arow { grid-template-columns: 52px minmax(0, 1fr) 32px; gap: 14px; }
  .arow .tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
  * { transition: none !important; }
}

turbo-frame { display: contents; }

/* ── Flows: sign in, link sent, verify, welcome, akd login, account, unsubscribe ── */
.transcript { display: flex; flex-direction: column; gap: 22px; font: 13px/1.6 var(--mono); }
.transcript p { margin: 0; }
.flow form { margin: 0; }
.lead { margin: 0; font: 400 21px/1.5 var(--serif); color: var(--body); max-width: 620px; text-wrap: pretty; }
.lead strong { font: 500 17px/1 var(--mono); color: var(--ink); }
.said { margin: 10px 0 0; display: flex; gap: 12px; font: 13px/1.4 var(--mono); }
.said > span:first-child { color: var(--lichen); }
.note { margin: 0; font: 12px/1.6 var(--mono); color: var(--muted); max-width: 620px; }
.note a, .flash-line a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.row { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.stepper { list-style: none; margin: 0; padding: 4px 0 6px; display: flex; flex-wrap: wrap; gap: 10px 18px; font: 12px/1 var(--mono); color: var(--muted); }
.stepper li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.stepper li + li::before { content: "—"; color: var(--faint); margin-right: 10px; }
.stepper .box { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--rule); }
.stepper .done { color: var(--faint); }
.stepper .done .box { border-color: var(--moss); color: var(--moss); }
.stepper .now { color: var(--ink); }
.stepper .now .box { background: var(--lichen); border-color: var(--lichen); color: var(--bg); }

/* Settings sections: account */
.conf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; max-width: 1000px; padding-top: 8px; }
.conf section { display: flex; flex-direction: column; gap: 14px; padding: 22px 0; border-top: 1px solid var(--rule); }
.conf h2 { font: 11px/1 var(--mono); color: var(--faint); margin: 0; font-weight: 400; }
.conf .leader { font-size: 12px; line-height: 1; }
.conf .leader .n.ok { color: var(--moss); }
.conf .leader form { order: 3; flex-basis: 100%; padding-top: 6px; }
.conf .why { font: 400 16px/1.5 var(--serif); color: var(--body); margin: 0; }

/* Outlined text buttons that read as commands */
.cmdbtn { font: 12px/1 var(--mono); color: var(--ink); border: 1px solid var(--rule); padding: 8px 12px; background: none; cursor: pointer; }
.cmdbtn:hover { border-color: var(--lichen); color: var(--lichen); }
.cmdbtn.danger { color: var(--rust); }
.cmdbtn.danger:hover { border-color: var(--rust); color: var(--rust); }

/* ── Search ── */
.main .block > form .pinput { max-width: var(--measure); margin-top: 6px; }
.results { display: flex; flex-direction: column; max-width: 1000px; padding-top: 10px; container: results / inline-size; }
.results .hit { display: grid; grid-template-columns: 96px minmax(0, 1fr) 80px 40px; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--rule); color: var(--ink); align-items: baseline; }
.results .hit:hover { background: var(--bg2); }
.results .hit:hover .t { color: var(--lichen); }
.results .hit .tt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.results .hit .t { font-weight: 500; }
.results .hit .desc { font: 400 16px/1.45 var(--serif); color: var(--muted); }
.results .hit .md, .results .hit .read { color: var(--muted); }
.results .hit .read { text-align: right; }
.results mark { background: var(--mark); color: var(--ink); padding: 0 2px; }
.results-h { font: 11px/1 var(--mono); color: var(--faint); padding-bottom: 10px; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; }
@container results (max-width: 560px) {
  .results .hit { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; }
  .results .hit .tt { grid-column: 1 / -1; }
  .results .hit .tag { display: none; }
}

/* ── Admin: the site's own chrome, with admin windows ── */
.admin .main { --pt: 44px; --px: 56px; --pb: 96px; gap: 40px; }
.mode.root { background: var(--lichen); }
.adm { display: flex; flex-direction: column; gap: 40px; }
.adm-h { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.adm-h .prompt { flex: 1 1 auto; }
.seg { display: flex; flex-wrap: wrap; gap: 0; font-size: 12px; }
.seg a, .seg button { border: 1px solid var(--muted); margin-left: -1px; padding: 7px 10px; color: var(--ink); }
.seg a:first-child { margin-left: 0; }
.seg [aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg [aria-current="page"]:hover { color: var(--bg); }
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.figures > * { padding: 18px 20px 18px 0; display: flex; flex-direction: column; gap: 8px; color: var(--ink); }
.figures > * + * { padding-left: 20px; border-left: 1px solid var(--rule); }
.figures b { font: 500 26px/1 var(--mono); letter-spacing: -.02em; }
.figures span { color: var(--muted); font-size: 11px; }
.figures a:hover b { color: var(--lichen); }
.figures .hot b { color: var(--lichen); }
.spark { display: flex; flex-direction: column; gap: 8px; }
.spark svg { width: 100%; height: 140px; display: block; }
.spark .v { fill: var(--slate); }
.spark .u { fill: var(--lichen); }
.spark .axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.spark .legend { display: flex; gap: 16px; font-size: 11px; color: var(--muted); }
.spark .legend i { font-style: normal; }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.cols section, .adm section { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.adm h2 { font: 11px/1 var(--mono); color: var(--muted); margin: 0; font-weight: 400; }
.empty { color: var(--muted); margin: 0; font-size: 12px; }
.empty::before { content: "-- "; color: var(--faint); }

.grid-table { width: 100%; border-collapse: collapse; font: 13px/1.4 var(--mono); }
.grid-table th { text-align: left; font: 11px/1 var(--mono); color: var(--muted); font-weight: 400; padding: 0 16px 10px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.grid-table td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.grid-table tr:hover td { background: var(--bg2); }
.grid-table .num, .grid-table .when { color: var(--muted); white-space: nowrap; }
.grid-table .num { text-align: right; }
.grid-table a { color: var(--ink); }
.grid-table a:hover { color: var(--lichen); }
.scroll { overflow-x: auto; position: relative; }
.state { white-space: nowrap; }
.state.live { color: var(--moss); }
.state.scheduled { color: var(--lichen); }
.state.draft, .state.deleted { color: var(--muted); }
.state.blocked { color: var(--rust); }
.state.admin { color: var(--moss); }

.mod { display: flex; flex-direction: column; }
.mod article { display: flex; flex-direction: column; gap: 10px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.mod .by { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.mod .by b { color: var(--ink); font-weight: 500; }
.mod .body { font: 400 17px/1.6 var(--serif); max-width: var(--measure); }
.mod .body p { margin: 0 0 .5em; }
.mod .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.mod .acts form { display: inline; }

.newtoken { border: 1px solid var(--lichen); padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.newtoken code { font: 13px/1.5 var(--mono); color: var(--lichen); word-break: break-all; }
.newtoken p { margin: 0; color: var(--muted); font-size: 12px; }

.settings-form { display: flex; flex-direction: column; gap: 18px; max-width: var(--measure); }
.adm .field { margin: 0; display: grid; gap: 6px; font-size: 12px; }
.adm .field label { color: var(--muted); font-size: 11px; }
.adm input[type="text"], .adm input[type="datetime-local"], .adm textarea { font: 13px/1.5 var(--mono); color: var(--ink); background: var(--bg2); border: 1px solid var(--rule); border-bottom-color: var(--muted); padding: 9px 10px; width: 100%; }
.adm input:focus, .adm textarea:focus { outline: none; border-color: var(--lichen); }

/* Post editor */
.ed-head { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: baseline; }
.ed-head h1 { margin: 0; font: 500 21px/1.3 var(--mono); letter-spacing: -.01em; flex: 1 1 320px; text-wrap: balance; }
.ed-meta { display: grid; grid-template-columns: 2fr 1fr; gap: 14px 16px; }
.ed-meta .wide { grid-column: 1 / -1; }
.ed-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 10px 0; border-bottom: 1px solid var(--rule); }
.ed-bar .count { margin-left: auto; }
.ed-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--rule); }
.ed-split textarea.body { border: 0; border-right: 1px solid var(--rule); min-height: 70vh; line-height: 1.7; resize: vertical; padding: 18px 20px; }
.ed-split .preview { padding: 18px 24px; max-height: 80vh; overflow-y: auto; position: sticky; top: 52px; }
.ed-split .preview .prose { font: 400 16px/1.65 var(--serif); }
.ed-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; }
.ed-foot section { gap: 12px; }
.ed-foot .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ed-foot .row form { display: flex; gap: 8px; margin: 0; }

@media (max-width: 900px) {
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures > :nth-child(3) { padding-left: 0; border-left: 0; }
  .figures > :nth-child(n+3) { border-top: 1px solid var(--rule); }
  .cols, .ed-split, .ed-meta, .ed-foot { grid-template-columns: minmax(0, 1fr); }
  .ed-split textarea.body { border-right: 0; border-bottom: 1px solid var(--rule); }
  .ed-split .preview { position: static; max-height: none; }
}

/* Bits the canvas set inline */
.cell-form { display: flex; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.count { font-size: 11px; color: var(--muted); }
.count.over { color: var(--rust); }
.tmux span.seal { display: inline-flex; align-items: center; }
.settings-form .ed-meta { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 900px) { .settings-form .ed-meta { grid-template-columns: minmax(0, 1fr); } }
