/* The keeper's language: paper, ink, one accent, mono figures, no dashboard. System fonts only,
   no external asset. Three versions of the strip and the page frame, chosen by html[data-v]:
   ledger (the default), column, hairline. The body art has no versions. A page opens on the
   dark paper (2026-11-10), so dark is the base here and nothing flashes light before the
   script runs; html[data-dark="0"] is the light paper a visitor switches to. */
:root {
  --paper: #15130f; --ink: #ebe5d6; --accent: #e9623a; --dim: #9a917f; --rule: rgba(235, 229, 214, 0.2); --wash: rgba(235, 229, 214, 0.05);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --strip-h: 124px; --nav-h: 30px; --measure: 66ch;
  --frame: rgba(235, 229, 214, 0.55); --gutter: 16px;
  color-scheme: dark;
}
html[data-dark="0"] { --paper: #f1ece2; --ink: #14110e; --accent: #c8431f; --dim: #6b6257; --rule: rgba(20, 17, 14, 0.18); --wash: rgba(20, 17, 14, 0.04); --frame: rgba(20, 17, 14, 0.62); color-scheme: light; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--serif); }
body { min-height: 100vh; }
a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
a:hover { border-bottom-color: var(--accent); }
.n, .seq, .time, .hash, .f .v, .s-figures .v, .rows .v, .e-fields { font-family: var(--mono); font-size: 0.86em; }
h1, h2 { font-weight: normal; letter-spacing: 0.01em; }
h1 { font-size: 1.5em; margin: 1.2em 0 0.6em; }
h2 { font-size: 1.1em; margin: 1.6em 0 0.5em; color: var(--dim); }
blockquote { margin: 0.3em 0 0.3em 1.2em; padding-left: 0.8em; border-left: 1px solid var(--rule); }
pre.diff { font: 13px/1.4 var(--mono); white-space: pre-wrap; margin: 0.4em 0 0.4em 1.2em; padding-left: 0.8em; border-left: 1px solid var(--rule); }
ul.plain, ul.pledge { padding-left: 1.2em; }
ul.pledge li { margin: 0.2em 0; }
canvas { display: block; }

/* ---------------------------------------------------------------- the strip */
/* the strip takes the height its rows need (boot.js measures it into --strip-h on the html
   element), the navigation row sits right under it, and one clear rule closes the top bar */
.strip { position: fixed; top: 0; left: 0; right: 0; height: auto; min-height: 0; box-sizing: border-box; z-index: 100; background: var(--paper); color: var(--ink); overflow: hidden; padding: 10px 24px 6px; }
.strip-row { display: flex; align-items: baseline; gap: 0 22px; white-space: nowrap; }
.strip-figures { font-family: var(--mono); font-size: 13px; line-height: 24px; flex-wrap: wrap; max-height: 48px; overflow: hidden; }
.s-main, .s-rest { display: contents; }
.strip .stale-mark { color: var(--accent); font-family: var(--serif); font-size: 12px; }
.strip .s-name { font-family: var(--serif); font-size: 16px; letter-spacing: 0.02em; border: 0; margin-right: 6px; }
.strip .s-item .k { color: var(--dim); font-family: var(--serif); font-size: 13px; margin-right: 6px; }
.strip .s-item .v b { font-weight: normal; }
.strip .s-item.empty { display: none; }
.strip .s-runway { display: inline-flex; align-items: center; gap: 8px; }
.strip .s-stroke { width: 90px; height: 6px; }
.strip .late { color: var(--accent); }
.strip .s-stale { color: var(--accent); font-family: var(--serif); font-size: 13px; }
/* the panel behind "what holds him": in the top bar's band, under the navigation row, over
   everything else; the holding line as the keeper sends it, then the pledge */
.hold-panel { position: fixed; top: calc(var(--strip-h) + var(--nav-h)); left: 0; right: 0; z-index: 95; box-sizing: border-box; background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--frame); padding: 10px 24px 12px; font-size: 13.5px; line-height: 1.5; }
.hold-panel p { margin: 0; }
.hold-panel p + p { margin-top: 6px; }
.strip-holding { color: var(--ink); }
.strip-pledge { color: var(--dim); }
.strip-pledge .s-key { color: var(--ink); margin-right: 2px; }
.strip-pledge .s-text a { border: 0; color: inherit; }
.strip-pledge .s-text a.s-stop-words { border-bottom: 1px solid var(--rule); }
.holding-text a { color: inherit; }
/* the paper switch at the row's end: two words, the one in use in ink with a rule under it */
.nav .nav-paper { position: absolute; right: 24px; top: 0; height: calc(var(--nav-h) - 1px); display: flex; gap: 10px; padding-left: 14px; background: var(--paper); }
.nav .nav-paper button { padding: 0; margin: 0; background: none; border: 0; border-bottom: 1px solid transparent; font: inherit; line-height: inherit; color: var(--dim); cursor: pointer; }
.nav .nav-paper button:hover { color: var(--ink); }
.nav .nav-paper button.on { color: var(--ink); border-bottom-color: var(--ink); cursor: default; }
.nav .nav-paper button:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.nav .nav-hold { position: absolute; right: 112px; top: 0; height: calc(var(--nav-h) - 1px); padding: 0 0 0 14px; margin: 0; background: var(--paper); border: 0; border-bottom: 1px solid transparent; font: inherit; line-height: inherit; color: var(--dim); cursor: pointer; }
.nav .nav-hold:hover, .nav .nav-hold[aria-expanded="true"] { color: var(--ink); }
.nav .nav-hold[aria-expanded="true"] { border-bottom-color: var(--ink); }
.nav .nav-hold:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.unanswered { color: var(--accent); }
.composed { margin: 0.6em 0; }
.e-text.verbatim .line { margin: 0.2em 0; }
p.k, span.k { color: var(--dim); }
.strip-outage { margin: 4px -24px -6px; padding: 2px 24px; font-size: 13px; line-height: 18px; color: var(--paper); background: var(--accent); }
.strip.stale + .nav { border-bottom-color: var(--accent); }

/* the page's own row of links, below the strip and not part of it */
.nav { position: fixed; top: var(--strip-h); left: 0; right: 0; height: var(--nav-h); box-sizing: border-box; z-index: 90; padding-right: 150px; background: var(--paper); font-size: 12.5px; line-height: calc(var(--nav-h) - 1px); padding: 0 24px; white-space: nowrap; overflow: hidden; color: var(--dim); border-bottom: 1px solid var(--frame); }
.nav a { border: 0; margin-right: 14px; color: var(--dim); }
.nav a.on { color: var(--ink); border-bottom: 1px solid var(--ink); }
.nav a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- the page */
.page { padding: calc(var(--strip-h) + var(--nav-h) + 8px) 24px 60px; max-width: var(--measure); }
.rows .row { display: flex; gap: 12px; align-items: baseline; padding: 2px 0; border-bottom: 1px solid var(--wash); }
.rows .k { color: var(--dim); min-width: 18ch; font-size: 0.95em; }
.rows .v { font-family: var(--mono); font-size: 0.86em; }
.verbatim { margin: 0.6em 0; }
.verbatim.lead { font-size: 1.15em; line-height: 1.45; }
.empty, .form { color: var(--dim); }
.rule { color: var(--dim); font-size: 0.92em; margin: 0.2em 0 0.8em; }
.entries { margin-top: 0.6em; }
.entry { padding: 8px 0; border-top: 1px solid var(--wash); }
.entry p { margin: 0.15em 0; }
.e-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.e-head .kind { color: var(--dim); }
.e-head .time { color: var(--dim); }
.e-line { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.e-line .model { font-weight: normal; }
.e-line .k { color: var(--dim); }
.e-fields { display: flex; gap: 6px 16px; flex-wrap: wrap; color: var(--dim); }
.e-fields .f .k { margin-right: 6px; font-family: var(--serif); font-size: 0.95em; }
.e-fields .f .v { color: var(--ink); }
.e-fields.hashes { font-size: 0.8em; }
.f.refusal { color: var(--accent); }
.e-text { margin: 0.3em 0; }
.outage-past, .restart, .scope { padding: 8px 0; border-top: 1px solid var(--wash); color: var(--dim); }
.harness { color: var(--dim); font-size: 0.95em; margin: 0.8em 0 0.2em; }
.more { display: inline-block; margin-top: 1em; }
.held { margin: 0.6em 0; padding: 6px 12px; border-left: 2px solid var(--accent); }
.maker-name { font-size: 2.2em; margin: 0.6em 0 0.3em; }
.filmstrip { display: flex; gap: 10px; margin: 0.6em 0; }
.filmstrip .frame { width: 120px; height: 120px; border: 1px solid var(--rule); box-sizing: border-box; }
.filmstrip .frame.empty { background: var(--wash); }
.first { padding: 8px 0; border-top: 1px solid var(--wash); }
.question { padding: 8px 0; border-top: 1px solid var(--wash); }
.tag { color: var(--accent); }

/* ---------------------------------------------------------------- the body page */
/* under the top bar: his room at three quarters on the left, in a frame, with the disclaimer on
   its lower edge; on the right the keeper's sidebar, each section in its own frame with a small
   label on the line; gutters between them. The frames are still lines in ink, never boiling. */
body[data-page="home"] .page { max-width: none; padding: 0; }
.stage { position: fixed; top: calc(var(--strip-h) + var(--nav-h)); left: 0; right: 0; bottom: 0; padding: var(--gutter); display: grid; grid-template-columns: minmax(0, 3fr) minmax(320px, 1fr); gap: var(--gutter); }
.room { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid var(--frame); }
.room canvas { flex: 1 1 auto; width: 100%; min-height: 0; }
.room .disclaimer { border-top: 1px solid var(--frame); }
.disclaimer { margin: 0; padding: 9px 24px 10px; text-align: center; font-size: 15px; line-height: 1.4; color: var(--ink); }
.side { display: flex; flex-direction: column; gap: var(--gutter); min-width: 0; min-height: 0; font-size: 14px; line-height: 1.45; }
.panel { position: relative; display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--frame); padding: 14px 18px 12px; }
.panel > h2 { position: absolute; top: -9px; left: 12px; margin: 0; padding: 0 6px; background: var(--paper); font-size: 12px; line-height: 16px; letter-spacing: 0.04em; color: var(--dim); }
.panel.now { flex: none; }
.panel.thread { flex: 1 1 auto; }
.panel .inner { min-height: 0; flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; padding-right: 4px; }
.panel .k { color: var(--dim); }
.panel .n, .panel .seq, .panel .time, .panel .hash { font-family: var(--mono); font-size: 12.5px; }
.panel .empty, .panel .unanswered, .panel .harness { font-size: 13px; margin: 0 0 6px; }
.panel .unanswered { color: var(--accent); }
/* now: what he is doing this moment, the stakes beside it */
.now .doing { font-size: 16px; line-height: 1.35; margin: 0 0 3px; }
.now .doing .k { font-size: 13px; }
.now .flight { color: var(--dim); font-size: 13px; margin: 0; }
.now .flight .accent { color: var(--accent); }
.now .stakes { display: flex; gap: 18px; font-family: var(--mono); font-size: 13px; color: var(--ink); margin: 8px 0 0; }
.now .stakes .k { font-family: var(--serif); margin-right: 6px; }
.now .stakes .stale-mark { color: var(--accent); font-family: var(--serif); font-size: 12px; margin-left: 4px; }
/* the thread: one item per entry, a thought with the actions it chose under it */
.it { padding: 6px 0 7px; border-top: 1px solid var(--wash); }
.it-head { display: flex; gap: 10px; align-items: baseline; cursor: pointer; margin: 0; }
.it-head .time { color: var(--dim); flex: none; }
.it-head .what { color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.it-head .seq { margin-left: auto; flex: none; color: var(--dim); border-bottom-color: transparent; }
.it-head .seq:hover { color: var(--ink); border-bottom-color: var(--accent); }
.it-line { color: var(--dim); font-size: 13px; margin: 1px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.it.refused .what, .it.hold .what, .it.death .what { color: var(--accent); }
/* his words: the one voice on the page that is not the keeper's, set in italic ink; a few
   lines in the thread and under "now" until opened, then whole */
.it-words { margin: 4px 0 1px; color: var(--ink); font-style: italic; font-size: 14px; line-height: 1.42; white-space: normal; overflow-wrap: anywhere; cursor: pointer; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.it-words .k { font-style: normal; font-size: 13px; }
.it.open .it-words { display: block; white-space: pre-wrap; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; }
.it-more blockquote.said { font-style: italic; white-space: pre-wrap; overflow-wrap: anywhere; }
.now .now-words { margin: 9px 0 3px; padding-left: 10px; cursor: pointer; }
.now .now-words p { margin: 0; font-style: italic; font-size: 15px; line-height: 1.42; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; line-clamp: 7; overflow: hidden; }
.now .now-words.open p { display: block; white-space: pre-wrap; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; }
.it.quiet .what { color: var(--dim); }
.it-more { display: none; margin: 6px 0 2px; font-size: 13px; }
.it.open .it-more { display: block; }
.it.open .it-head .what, .it.open .it-line { white-space: normal; }
.it-more p { margin: 3px 0; }
.it-more .k { margin-right: 6px; }
.it-more .refusal { color: var(--accent); }
.it-more blockquote { margin: 3px 0; padding-left: 10px; font-size: 13px; }
.it-more pre.diff { margin: 4px 0; padding-left: 10px; font-size: 12px; }
.it-more .chain { margin-top: 6px; padding-top: 4px; border-top: 1px solid var(--wash); }
.it-more .chain p { display: flex; gap: 8px; align-items: baseline; }
.it-more .chain .k { min-width: 7ch; }
.it-more .chain a, .it-more .chain .n { font-family: var(--serif); font-size: 13px; }
.turn { border-top: 1px solid var(--wash); padding: 6px 0 4px; }
.turn .it { border-top: 0; padding: 3px 0 4px; }
.turn .it.act { margin-left: 14px; }
.turn .it.act .it-head::before { content: ""; display: inline-block; width: 8px; border-top: 1px solid var(--rule); margin-right: 6px; vertical-align: middle; }
.thread .more { margin-top: 10px; display: inline-block; }
.thread .scope-line { color: var(--dim); font-size: 13px; margin: 8px 0 0; }
.feed { max-width: var(--measure); padding: 8px 24px 60px; }
.below { max-width: var(--measure); padding: 0 24px 60px; }
body[data-page="line"] .page, body[data-page="maker"] .page, body[data-page="card"] .page { padding-top: 0; }
.plate { margin-top: calc(var(--strip-h) + var(--nav-h)); }
.plate canvas { width: 100%; height: 56vh; }
.plate.card { padding: 24px; }
.plate.card canvas { width: min(100%, 1200px); height: auto; aspect-ratio: 1200 / 675; border: 1px solid var(--rule); }
.plate.mark canvas { width: 160px; height: 160px; margin: 24px 24px 0; }
.mark-with { display: flex; align-items: flex-end; }

/* ---------------------------------------------------------------- a stream frame (B7 later): no interface */
html[data-frame="1"] .nav { display: none; }

/* ---------------------------------------------------------------- version: column */
html[data-v="column"] { --strip-h: 136px; --nav-h: 0px; }
html[data-v="column"] .strip { display: grid; grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: auto; column-gap: 32px; row-gap: 2px; padding: 10px 28px 0; align-content: start; }
html[data-v="column"] .strip-figures { display: contents; }
html[data-v="column"] .s-main { display: flex; flex-direction: column; grid-column: 1; grid-row: 1; line-height: 22px; min-width: 0; }
html[data-v="column"] .s-main .s-name { font-size: 18px; margin: 0 0 2px; }
html[data-v="column"] .s-main .s-item { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
html[data-v="column"] .s-main .s-item .k { min-width: 7ch; }
html[data-v="column"] .s-main .s-item .v { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
html[data-v="column"] .s-main .s-stroke { width: 50px; flex: none; }
html[data-v="column"] .s-rest { display: flex; flex-wrap: wrap; grid-column: 2; grid-row: 1; gap: 0 18px; font-size: 12.5px; line-height: 20px; white-space: nowrap; overflow: hidden; min-width: 0; max-height: 40px; }
html[data-v="column"] .strip-outage { left: 310px; }
html[data-v="column"] .nav { top: 0; height: auto; position: fixed; left: 0; width: 160px; right: auto; padding: calc(var(--strip-h) + 16px) 0 0 28px; line-height: 1.9; white-space: normal; border: 0; background: transparent; }
html[data-v="column"] .nav a { display: block; }
html[data-v="column"] .page { padding-left: 200px; max-width: calc(var(--measure) + 176px); }
html[data-v="column"] body[data-page="home"] .page { padding-left: 0; }
html[data-v="column"] .feed { padding-left: 200px; max-width: calc(var(--measure) + 176px); }
html[data-v="column"] .plate.card, html[data-v="column"] .plate.mark canvas, html[data-v="column"] .below { margin-left: 176px; }

/* ---------------------------------------------------------------- version: hairline */
html[data-v="hairline"] { --strip-h: 84px; --nav-h: 26px; }
html[data-v="hairline"] .strip { padding: 6px 24px 0; }
html[data-v="hairline"] .strip-figures { font-size: 12.5px; line-height: 22px; gap: 0 18px; max-height: 44px; }
html[data-v="hairline"] .nav { font-size: 12px; line-height: var(--nav-h); }
html[data-v="hairline"] .page { max-width: 84ch; }
html[data-v="hairline"] .feed { max-width: 84ch; }
html[data-v="hairline"] .strip-outage { padding: 1px 24px; font-size: 12px; line-height: 16px; }

/* ---------------------------------------------------------------- phones, a short secondary check */
@media (max-width: 720px) {
  :root { --strip-h: 136px; }
  .strip { padding: 8px 12px 0; }
  .strip-figures { flex-wrap: wrap; line-height: 20px; gap: 0 12px; font-size: 12px; max-height: 60px; }
  .nav { padding: 0 12px; overflow-x: auto; }
  .page, .feed { padding-left: 12px; padding-right: 12px; }
  .disclaimer { padding: 8px 12px 10px; font-size: 14px; }
  .stage { position: static; display: block; padding: 10px 12px; margin-top: calc(var(--strip-h) + var(--nav-h)); }
  .room { height: 70vh; margin-bottom: 12px; }
  .panel { margin-bottom: 12px; }
  .panel.thread .inner { overflow: visible; }
  html[data-v="column"] { --strip-h: 150px; }
  html[data-v="column"] .strip { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; }
  html[data-v="column"] .s-main { grid-row: 1; flex-direction: row; flex-wrap: wrap; gap: 0 12px; }
  html[data-v="column"] .s-rest { grid-column: 1; grid-row: 4; }
  html[data-v="column"] .strip-outage { left: 0; }
  html[data-v="column"] .nav { position: static; width: auto; padding: calc(var(--strip-h) + 8px) 12px 0; }
  html[data-v="column"] .page, html[data-v="column"] .feed { padding-left: 12px; }
  html[data-v="column"] .disclaimer { padding-left: 12px; }
}
