/* akdarrah — dark-only terminal. Tokens from the design handoff (Terminal Blog v5). Radius 0, no shadows. */

:root {
  --bg: #0e0e0d;
  --bg2: #171715;
  --ink: #e6e1d5;
  --muted: #9a958a;
  --faint: #4d4b45;
  --rule: #2a2925;
  --red: oklch(0.70 0.16 32);
  --ochre: oklch(0.82 0.13 80);
  --moss: oklch(0.78 0.13 145);
  --cyan: oklch(0.80 0.10 205);
  --blue: oklch(0.68 0.13 258);
  --pur: oklch(0.72 0.13 300);
  --pink: oklch(0.75 0.14 355);

  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --measure: 680px;
  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(--red); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; transition: color .12s; }
:focus-visible { outline: 1px solid var(--ochre); outline-offset: 2px; }
::selection { background: var(--red); color: var(--bg); }
img, video { max-width: 100%; display: block; }
.skip { position: absolute; left: -999px; top: 0; background: var(--red); 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); }
[hidden] { display: none !important; }

/* Art palette (generated ASCII + tag colours) */
.a-red { color: var(--red); } .a-ochre { color: var(--ochre); } .a-moss { color: var(--moss); }
.a-cyan { color: var(--cyan); } .a-blue { color: var(--blue); } .a-pur { color: var(--pur); }
.a-pink { color: var(--pink); } .a-ink { color: var(--ink); } .a-muted { color: var(--muted); } .a-faint { color: var(--faint); }

.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; 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; }
.tmux a, .tmux .cell, .tmux button { padding: 10px 14px; display: inline-flex; align-items: center; }
.brand { background: var(--red); 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(--ochre); color: var(--bg); font-weight: 500; padding: 10px 12px !important; }
.seal:hover { color: var(--bg); }
.progress { position: absolute; left: 0; bottom: -3px; height: 2px; width: 0; background: linear-gradient(90deg, var(--red), var(--ochre)); z-index: 5; pointer-events: none; }

.frame { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 32vw, 440px); }
.frame.solo { grid-template-columns: minmax(0, 1fr); }
.main { padding: 44px 56px 96px; display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.aside { container: aside / inline-size; border-left: 1px solid var(--rule); padding: 44px clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 44px; font: 12px/1 var(--mono); min-width: 0; }
.aside.sticky { padding: 0; }
.aside.sticky > div { position: sticky; top: 0; padding: 32px clamp(24px, 3vw, 40px) 40px; display: flex; flex-direction: column; gap: 30px; max-height: 100vh; overflow-y: auto; scrollbar-width: none; }
.aside h2, .aside .h { font: 11px/1 var(--mono); color: var(--faint); margin: 0; font-weight: 400; }
.aside section { display: flex; flex-direction: column; gap: 12px; }
.aside figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.aside figcaption { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; font: 11px/1.5 var(--mono); color: var(--muted); }

.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; }
.mode { background: var(--moss); color: var(--bg); font-weight: 500; }

/* Prompt line */
.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(--blue); }
.prompt .d { color: var(--red); }
.prompt .c { color: var(--ink); }
.cursor { display: inline-block; width: 8px; height: 15px; background: var(--red); vertical-align: -2px; margin-left: -4px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.block { display: flex; flex-direction: column; gap: 14px; }
.flash-line { font: 12px/1.6 var(--mono); color: var(--muted); }
.ok { color: var(--moss); }
.err { color: var(--red); }

/* Dotted-leader rows (aside lists) */
.leader { display: flex; 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); }
.kv { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.kv span:last-child { color: var(--ink); }

/* ── Home ──────────────────────────────────────────────── */
.whoami { font: 13px/1.6 var(--mono); margin: 0; }
.ls { container: ls / inline-size; display: flex; flex-direction: column; font: 13px/1.4 var(--mono); }
.ls-head, .ls-row { display: grid; grid-template-columns: 128px 96px minmax(0, 1fr) 72px 40px; gap: 24px; }
.ls-head { padding: 4px 0 10px; color: var(--faint); font-size: 11px; border-bottom: 1px solid var(--rule); }
.ls-row { align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); color: var(--ink); }
.ls-row:hover { background: var(--bg2); color: var(--ink); }
.ls-row:hover .t { color: var(--red); }
.ls-row .thumb { overflow: hidden; height: 44px; }
.ls-row .date, .ls-row .read { color: var(--muted); }
.ls-row .read { text-align: right; }
.ls-row .tt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ls-row .t { font-weight: 500; transition: color .12s; }
.ls-row .desc { font: 400 15px/1.45 var(--serif); color: var(--muted); }
.ls-row .tag { font-size: 12px; }
.right { text-align: right; }
.pager { display: flex; gap: 20px; font: 12px/1 var(--mono); color: var(--muted); align-items: center; padding-top: 14px; }
.pager a, .pager button { color: var(--ink); }
.br { color: var(--red); }

/* ── Post ──────────────────────────────────────────────── */
.post { gap: 26px; font: 400 18px/1.7 var(--serif); }
.post-head { display: flex; flex-direction: column; gap: 12px; padding: 6px 0 10px; }
.post-head h1, .page-h1 { margin: 0; font: 500 26px/1.25 var(--mono); letter-spacing: -.02em; max-width: var(--measure); text-wrap: balance; }
.meta { display: flex; flex-wrap: wrap; gap: 20px; font: 12px/1 var(--mono); color: var(--muted); }
.mobile-art, .mobile-notes, .mobile-sub { display: none; }

.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.code:not(.wide), .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(--red); text-decoration-color: var(--red); }
.prose h2 { font: 500 15px/1.4 var(--mono); margin: 18px 0 -6px; scroll-margin-top: 24px; }
.prose h2::before { content: "## "; color: var(--red); }
.prose h3 { font: 500 13px/1.4 var(--mono); margin: 10px 0 -10px; }
.prose h3::before { content: "### "; color: var(--red); }
.prose .anchor { display: none; }
.prose :is(p, li, td, th, blockquote, h2, h3) code { font: 400 .82em/1 var(--mono); background: var(--bg2); color: var(--ochre); padding: 2px 5px; }
.prose sup, .prose .footnote-ref { font: 500 11px/1 var(--mono); }
.prose .footnote-ref a { color: var(--ochre); 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(--red); 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; }
.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(--ochre); }
.prose .footnote-backref { text-decoration: none; color: var(--faint); }

/* 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; }
.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; }
.lc { padding-right: 18px; }
.ln.hl { background: color-mix(in oklch, var(--ochre) 9%, transparent); box-shadow: inset 2px 0 var(--ochre); }
.ln.hl .lno { color: var(--ochre); }
/* Rouge token classes → palette */
.code-body :is(.k, .kc, .kd, .kn, .kp, .kr, .kt, .kv, .ow) { color: var(--red); }
.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(--ochre); }
.code-body :is(.nf, .fm, .nx) { color: var(--blue); }
.code-body :is(.nb, .vg, .nt) { color: var(--cyan); }
.code-body :is(.c, .c1, .cm, .cs, .cp, .ch, .cd) { color: var(--muted); font-style: italic; }
.code-body :is(.gd) { color: var(--red); } .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; }

figure.media { margin: 8px 0; display: flex; flex-direction: column; gap: 10px; }
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; }
.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(--red); }
.vtime { color: var(--muted); }

/* Post foot */
.post-foot { max-width: 880px; display: flex; flex-direction: column; gap: 20px; padding-top: 40px; 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(--ochre); }
.signal[disabled] { color: var(--ink); cursor: default; }
.read-next { display: flex; flex-direction: column; gap: 14px; padding: 16px 0 20px; }
.read-next .h { font: 11px/1 var(--mono); color: var(--faint); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--bg2); color: var(--ink); min-width: 0; }
.card .thumb { overflow: hidden; height: 64px; }
.card .t { font: 500 13px/1.4 var(--mono); }
.card .m { font: 11px/1.5 var(--mono); color: var(--muted); }
.card .why { font: italic 400 14px/1.4 var(--serif); color: var(--muted); }

/* Comments */
.c-toggle { align-self: flex-start; padding: 6px 0; 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-size: 12px; 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); }
.cform { display: flex; flex-direction: column; gap: 14px; font-size: 13px; }
.pfield { display: flex; gap: 12px; align-items: baseline; border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
.pfield.say { border-bottom-color: var(--ink); }
.pfield > span { color: var(--red); 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; }
.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; }
.wq:hover { background: var(--red); color: var(--bg); }
.hp { position: absolute; left: -9999px; }

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

/* Post aside */
.prog { display: flex; justify-content: space-between; white-space: pre; }
.prog-bar { color: var(--red); }
.toc { display: flex; flex-direction: column; gap: 6px; }
.toc button, .toc a { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 8px; text-align: left; line-height: 1.5; padding: 3px 0; color: var(--muted); }
.toc .mk { color: var(--red); }
.toc .mt { color: var(--faint); }
.toc .active { color: var(--ink); }
.toc .passed { color: var(--faint); }
.items { display: flex; flex-direction: column; gap: 9px; }
.items a { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; color: var(--ink); }
.items a .g { color: var(--faint); }
.items a .m { color: var(--muted); }
.items .zip { display: block; color: var(--muted); padding-top: 4px; }
.changes span { line-height: 1.6; color: var(--muted); display: block; }
.keys { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--faint); font-size: 11px; }
.keys b { color: var(--muted); font-weight: 400; }

/* ── Archive ───────────────────────────────────────────── */
.filter { display: flex; flex-direction: column; gap: 16px; }
.filter .pinput { border-bottom-color: var(--rule); padding-bottom: 10px; max-width: var(--measure); }
.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)); color: var(--bg); }
.year { display: flex; flex-direction: column; padding-top: 20px; }
.year-h { display: flex; align-items: center; gap: 14px; padding-bottom: 6px; }
.year-h b { font-weight: 500; color: var(--ochre); }
.year-h i { flex: 1; border-bottom: 1px dashed var(--rule); }
.year-h small { color: var(--faint); font-size: 11px; }
.arow { display: grid; grid-template-columns: 72px minmax(0, 1fr) 96px 40px; gap: 24px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--rule); color: var(--ink); }
.arow:hover { background: var(--bg2); color: var(--red); }
.arow .md, .arow .read { color: var(--muted); }
.arow .read { text-align: right; }
.arow .tag { font-size: 12px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar { display: grid; grid-template-columns: 48px minmax(0, 1fr) 24px; gap: 12px; white-space: pre; }
.bars.tags .bar { grid-template-columns: 80px minmax(0, 1fr) 24px; }
.bar .n { color: var(--muted); text-align: right; }
.bar .k { color: var(--muted); }

/* ── About ─────────────────────────────────────────────── */
.neofetch { display: flex; gap: 40px; align-items: center; font: 13px/1.75 var(--mono); flex-wrap: wrap; }
.neofetch .facts { display: flex; flex-direction: column; }
.neofetch .who { color: var(--moss); font-weight: 500; }
.neofetch .k { color: var(--red); }
.swatches { display: flex; padding-top: 12px; }
.swatches i { width: 22px; height: 14px; }
.about-body { display: flex; flex-direction: column; gap: 22px; max-width: var(--measure); font: 400 18px/1.7 var(--serif); }
.colophon { font: 13px/1.6 var(--serif); color: var(--muted); }

/* ── 404 ───────────────────────────────────────────────── */
.notfound { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 28px; min-height: 60vh; }
.notfound .lines { display: flex; flex-direction: column; gap: 10px; font: 13px/1.6 var(--mono); }

/* ── Palette (/ search) and shell (`) ──────────────────── */
dialog { color: var(--ink); }
.palette { width: min(100% - 32px, 640px); max-height: min(70vh, 520px); padding: 0; border: 1px solid var(--rule); background: var(--bg2); margin-top: 12vh; font: 13px/1.4 var(--mono); }
.palette::backdrop, .shell::backdrop { background: rgb(0 0 0 / .6); }
.palette[open] { display: flex; flex-direction: column; }
.palette .pinput { border-bottom: 1px solid var(--rule); padding: 14px 16px; }
.palette ul { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.palette li { padding: 9px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; }
.palette li[aria-selected="true"] { background: var(--bg); color: var(--red); }
.palette li small { color: var(--muted); white-space: nowrap; }
.palette .hint { border-top: 1px solid var(--rule); padding: 9px 16px; color: var(--faint); font-size: 11px; display: flex; gap: 16px; }
.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: 44px 56px; display: flex; flex-direction: column; gap: 22px; font: 13px/1.65 var(--mono); overflow-y: auto; }
.shell .session pre { margin: 6px 0 0; font: inherit; color: var(--muted); white-space: pre-wrap; }
.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(--red); }
.shell .session pre.art { font: 400 var(--s)/1.15 var(--mono); font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; color: var(--ink); }
.shell .tree { border-left: 1px solid var(--rule); display: grid; place-items: center; padding: 24px; overflow: hidden; }

/* ── Mobile ────────────────────────────────────────────── */
@media (max-width: 760px) {
  .tab, .tmux .hint { display: none !important; }
  .tmux a, .tmux .cell, .tmux button { padding: 16px 14px; }
  .tmux .slash { display: inline-flex !important; }
  .main { padding: 24px 20px 64px; gap: 28px; }
  .post { font-size: 17px; gap: 18px; }
  .post-head h1 { font-size: 21px; line-height: 1.3; }
  .meta { font-size: 11px; gap: 14px; }
  .mobile-notes > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; font: 12px/1 var(--mono); border: 1px solid var(--rule); padding: 14px; min-height: 44px; cursor: pointer; }
  .mobile-notes > summary::-webkit-details-marker { display: none; }
  .mobile-notes > summary .br::before { content: "[+]"; }
  .mobile-notes[open] > summary .br::before { content: "[-]"; }
  .mobile-notes .notes { display: flex; flex-direction: column; gap: 24px; padding-top: 18px; font: 12px/1 var(--mono); }
  .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; }
  .shell .split { grid-template-columns: minmax(0, 1fr); }
  .shell .session pre.art { font: 400 var(--s)/1.15 var(--mono); font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; color: var(--ink); }
.shell .tree { display: none; }
  .shell .session { padding: 24px 20px; }
  .statusbar > span:last-child { display: none; }
}
.tmux .slash { display: none; }

/* ── Tablet and below: one column; aside content moves into the main column ── */
@media (max-width: 900px) {
  .frame { grid-template-columns: minmax(0, 1fr); }
  .aside { display: none; }
  .mobile-notes, .mobile-sub { display: block; }
  .mobile-art { display: block; overflow: hidden; }
  .main { padding: 40px clamp(20px, 5vw, 40px) 80px; }
}
@media (max-width: 760px) { .mobile-art { margin: -4px -20px 0; padding: 0 20px; } }

/* Lists size themselves to their own width, not the viewport. */
@container ls (max-width: 600px) {
  .ls-head, .ls-row { grid-template-columns: 88px minmax(0, 1fr) 64px 32px; gap: 18px; }
  .ls-head span:first-child, .ls-row .thumb { display: none; }
}
@container ls (max-width: 440px) {
  .ls-head { display: none; }
  .ls-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; }
  .ls-row .tag { display: none; }
  .ls-row .tt { grid-column: 1 / -1; grid-row: 1; }
  .ls-row .date { grid-row: 2; font-size: 11px; }
  .ls-row .read { grid-row: 2; grid-column: 2; font-size: 11px; }
}
.read-next { container: cards / inline-size; }
@container cards (max-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cards .card:nth-child(3) { display: none; } }
@container cards (max-width: 400px) { .cards { grid-template-columns: minmax(0, 1fr); } .cards .card:nth-child(3) { display: flex; } }
.year { container: arow / inline-size; }
@container arow (max-width: 520px) {
  .arow { grid-template-columns: 52px minmax(0, 1fr) 32px; gap: 14px; }
  .arow .tag { display: none; }
}
/* Aside art scales down with a narrower aside instead of clipping. */
@container aside (max-width: 380px) { .aside .art { font-size: calc(var(--s) * 0.82); } }

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

/* ── Admin (reuses the tokens) ─────────────────────────── */
.admin { font-size: 13px; }
.admin .topbar { border-bottom: 1px solid var(--rule); background: var(--bg2); }
.wrap { width: min(100% - 32px, 1200px); margin-inline: auto; }
.admin .topbar .wrap { display: flex; align-items: center; gap: 20px; min-height: 44px; flex-wrap: wrap; }
.admin .prompt-home { color: var(--ink); } .admin .prompt-home .user { color: var(--moss); }
.nav { display: flex; gap: 18px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--muted); } .nav a[aria-current="page"] { color: var(--ink); }
.key-btn { font: inherit; color: var(--muted); border: 1px solid var(--rule); padding: 4px 8px; }
.admin main { padding: 32px 0 64px; }
.admin h1 { font: 500 20px/1.3 var(--mono); margin: 0 0 20px; }
.flash { font-size: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.flash.notice::before { content: "[ok] "; color: var(--moss); }
.flash.alert::before { content: "err  "; color: var(--red); }
.field { display: grid; gap: 6px; margin-bottom: 14px; font-size: 12px; }
.field label { color: var(--muted); }
.admin input[type="text"], .admin input[type="email"], .admin input[type="password"], .admin input[type="datetime-local"], .admin textarea, .admin select, .login input:not([type=submit]) {
  font: 13px/1.5 var(--mono); color: var(--ink); background: var(--bg2); border: 1px solid var(--rule); padding: 8px 10px; width: 100%;
}
.admin input:focus, .admin textarea:focus, .login input:not([type=submit]):focus { outline: none; border-color: var(--ochre); }
.btn { font: 12px/1 var(--mono); display: inline-block; background: var(--ink); color: var(--bg); border: 1px solid var(--ink); padding: 9px 12px; cursor: pointer; }
.btn:hover { background: var(--red); border-color: var(--red); color: var(--bg); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--red); color: var(--red); }
.btn.danger { background: transparent; color: var(--red); border-color: var(--red); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table th { color: var(--faint); font-weight: 400; font-size: 11px; }
.status { font-size: 11px; padding: 2px 6px; border: 1px solid var(--rule); color: var(--muted); }
.status.live { color: var(--moss); border-color: var(--moss); }
.status.scheduled { color: var(--ochre); border-color: var(--ochre); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-bottom: 24px; }
.stats div { background: var(--bg); padding: 14px; }
.stats strong { display: block; font-size: 22px; font-weight: 500; }
.stats span { color: var(--muted); font-size: 11px; }
.chart { width: 100%; height: 160px; display: block; margin-bottom: 24px; }
.chart rect { fill: var(--cyan); } .chart rect.u { fill: var(--ochre); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.block-title { font: 11px/1 var(--mono); color: var(--faint); margin: 28px 0 12px; font-weight: 400; }
.block-title::before { content: "# "; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.editor textarea.body { min-height: 70vh; line-height: 1.7; }
.editor .preview { border: 1px solid var(--rule); padding: 20px 24px; max-height: 80vh; overflow-y: auto; position: sticky; top: 16px; }
.editor .preview .prose { font: 400 16px/1.65 var(--serif); }
.meta-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 0 16px; }
.panel { border: 1px solid var(--rule); padding: 16px 20px; margin: 24px 0; background: var(--bg2); }
.panel h2 { font: 500 13px/1.3 var(--mono); margin: 0 0 14px; }
.panel .actions { justify-content: flex-start; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.count { font-size: 11px; color: var(--muted); }
.count.over { color: var(--red); }
.token { background: var(--bg); border: 1px solid var(--ochre); padding: 12px; word-break: break-all; }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; font-size: 12px; }
.diff pre { white-space: pre-wrap; background: var(--bg); padding: 12px; margin: 0; font: 12px/1.55 var(--mono); }
.ai-badge.human { color: var(--ink); } .ai-badge.assisted { color: var(--pur); } .ai-badge.ai { color: var(--cyan); }
.login { max-width: 360px; margin: 12vh auto; display: flex; flex-direction: column; gap: 18px; }
.login .field input { width: 100%; }
@media (max-width: 900px) { .editor, .two-col, .meta-grid { grid-template-columns: 1fr; } .editor .preview { position: static; } }
turbo-frame { display: contents; }
