/* dev.css — what the design system does NOT cover, and nothing else.

   DS-M0 moved every page's band, nav, lanes, tables, statuses, counters and
   notices onto design/dev-board.css. What is left in this file is:

     1. v0 token ALIASES. The ATLAS and City scenes read colours and faces by
        their old names; each name now points at a system token, so the scenes
        follow the theme instead of holding a second palette. No hex values.
     2. The ATLAS composition variables and its 3D scene — the system has no
        opinion about a perspective ground plane (4.4).
     3. The City scene, likewise.
     4. Page glue: layout-only rules for containers the system has no
        component for — a lane, an expanded detail row, the prompt composer.
     5. The pages not yet on the system: the projects cards, the release
        console and Project mode. Named in the DS-M0 REPORT.

   Load order is dev.css → dev-board.css → theme-v0.css → skins, so the system
   always wins a collision. Nothing here may set a colour or a face that is not
   a system token. */
:root {
  /* ---- v0 names → system tokens ---- */
  --disp: var(--font-serif);
  --body: var(--font-sans);
  --mono: var(--font-mono);
  --ink-soft: var(--ink-2);
  --gold-dim: var(--attn);
  --red: var(--stop);
  --amber: var(--attn);

  /* ---- ATLAS composition (site atlas.css §8 values, retuned for DEV-BOARD's
     shorter stage). --tileW and --tileTop are seeded here and then written
     by atlas.js syncFloor() on mount and on resize. ---- */
  --persp: 1250px;
  --tileW: 784px; --tileTop: 118px; --tileX: 0px; --tileShift: 0.314;
  --planeK: 0.34;   /* plane compression carried from the site; no consumer
                       in M0 because DEV-BOARD has no geo plate (O7) */
  --graphH: 331px; --graphTop: 44px; --sceneH: 330px;
}

/* ---- page glue -----------------------------------------------------------
   Layout and spacing only. Every colour and face below is a system token, and
   nothing here re-states something a db-* class already does. */
/* db-notice sets display:grid, which outranks the UA [hidden] rule */
[hidden] { display: none !important; }

.db code { font: 400 13px/20px var(--font-mono); background: var(--surface-sunk); border-radius: var(--radius-2); padding: 0 var(--space-4); }

.q-lane { margin: 0 0 var(--space-32); }
.q-lane .db-heading { display: flex; align-items: baseline; gap: var(--space-8); }
.q-sub { color: var(--ink-3); margin: var(--space-4) 0 var(--space-12); max-width: var(--measure); }
.q-toggle { cursor: pointer; user-select: none; }
.q-caret { color: var(--ink-3); }
.q-empty { display: block; padding: var(--space-8) 0; }
.q-table { margin-top: var(--space-4); }
.q-strip2 { margin-top: var(--space-12); }
.q-counter-link { display: block; color: inherit; text-decoration: none; }

/* ---- queue tabs (T2-20260923-queue-tabs) ----
   The strip is the system's segmented switch (Controls: db-seg + db-btn,
   aria-pressed). Glue only: the strip scrolls sideways rather than wrapping
   (Q7 — the phone view is a strip, not a stack), and each label's count is in
   the data face. On the pressed (ink-filled) tab an attention mark takes the
   button's own paper colour through the system's --st hook, so it keeps its
   shape and word on either theme; BLOCKED · YOU keeps its plate. No colours. */
.q-tabs { max-width: 100%; overflow-x: auto; margin: 0 0 var(--space-16); }
.q-tabs .db-seg { display: flex; width: max-content; }
.q-tab { display: inline-flex; align-items: center; gap: var(--space-8); white-space: nowrap; }
.q-tab__n { font: 400 13px/16px var(--font-mono); font-variant-numeric: tabular-nums; }
.q-tab[aria-pressed="true"] .db-st:not(.is-you) { --st: currentColor; }

/* ---- queue layout (TIE-IN-DEV-QUEUE-LAYOUT, DEV-DASHBOARD-SPEC §8 Q9–Q17) ----
   One lane per view: queue.js switches a lane off with `is-off` (services.js
   owns its lane's [hidden], so the tabs do not share that switch) (Q9). The
   strip is two labelled groups and sticks under the fixed bar; each table's
   header row sticks under the strip at --q-stick, which queue.js measures
   (Q10, Q11). The lane tables are fixed layout, one line a row: every column
   but NOW has a width here, so NOW takes the rest (Q12). The old `.q-now` /
   `.q-why` max-widths are gone — a max-width on a table cell does nothing.
   The name cell keeps `q-id`, which the phone skin keys its two-column rows
   on (design/skins/phone.css). Layout only. */
.q-lane.is-off { display: none; }
.q-tabs-mount { position: sticky; top: 0; z-index: 20; background: var(--paper); padding: var(--space-8) 0; border-bottom: var(--line-hair) solid var(--rule); }
html.has-topbar:not(.is-embedded) .q-tabs-mount { top: var(--header-h); }
.q-tabs-mount .q-tabs { margin: 0; }
.q-tabs--two { display: flex; align-items: center; gap: var(--space-24); }
.q-tabs__grp { display: flex; align-items: center; gap: var(--space-8); flex: none; }
.q-help { margin-left: var(--space-8); padding: 0; border: 0; background: none; color: var(--ink-3); cursor: pointer;
  font: 500 11px/16px var(--font-mono); letter-spacing: .06em; text-decoration: underline dotted; }
.q-help:hover { color: var(--ink); }
.q-lane .db-table-wrap { overflow: visible; }
.q-fixed { table-layout: fixed; }
.q-fixed th, .q-fixed td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-fixed thead th { position: sticky; top: var(--q-stick, 0px); z-index: 10; }
.q-fixed .q-detail td, .q-fixed .q-compose td { white-space: normal; overflow: visible; }
.q-fixed td.q-act { text-overflow: clip; }
.q-act .db-btn { margin-right: var(--space-4); }
.q-c-handle { width: 3rem; }
.q-c-name { width: 18%; }
.q-c-proj { width: 7%; }
.q-c-ms { width: 9%; }
.q-c-st { width: 9%; }
.q-c-age { width: 4.5rem; }
.q-c-sum { width: 14%; }
.q-c-act { width: 6rem; }
.q-c-act2 { width: 9rem; }
.q-c-kind { width: 6rem; }
.q-c-kinds { width: 12%; }
.q-c-who { width: 6rem; }
.q-c-date { width: 9rem; }
.q-c-file { width: 20%; }
.q-sum .db-mark, .q-spec .db-mark { color: var(--st); margin-right: var(--space-4); }
.q-spec { font: 400 13px/20px var(--font-mono); color: var(--ink-2); }
.q-spec .db-data { color: var(--ink); }
.q-dhead { margin: 0 0 var(--space-8); }
.q-dact { display: flex; gap: var(--space-8); margin-top: var(--space-12); }
.q-flags { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-8); }
.q-fold { margin-top: var(--space-16); }
.q-fold > summary { cursor: pointer; padding: var(--space-4) 0; }
.q-pair { padding: var(--space-4) 0; border-bottom: var(--line-hair) solid var(--rule); }
.q-pair__why { font: 400 13px/20px var(--font-sans); color: var(--ink-2); }
/* Q18 (TIE-IN-DEV-QUEUE-GROUPING): a group row per project on Chats,
   Awaiting archive and Done — it opens in place; the cards beneath it */
.q-fixed tr.q-group td { background: var(--surface-sunk); cursor: pointer; user-select: none; border-bottom: var(--line-hair) solid var(--rule-strong); }
.q-fixed tr.q-group:hover td { background: var(--surface-sunk); }
.q-group .q-caret { display: inline-block; width: 1em; }
.q-group__n { margin-left: var(--space-8); font: 400 13px/20px var(--font-mono); color: var(--ink-3); }
#lane-services .db-table td { white-space: nowrap; }
#lane-services .svc-note { display: inline; margin-left: var(--space-8); }
/* narrow panes: the one-line tables keep their columns and scroll sideways
   inside the lane (the 820 px rule below), as the tables did before */
@media (max-width: 820px) { .q-fixed { min-width: 48rem; } .q-tabs--two { gap: var(--space-12); } }
/* a phone shows the name and NOW only (the skin hides the rest), so the
   table goes back to auto layout and its cells wrap, as before */
@media (max-width: 480px) { .q-fixed { table-layout: auto; min-width: 0; } .q-fixed col[class] { width: auto; }
  .q-fixed th, .q-fixed td { white-space: normal; overflow: visible; } }

/* a status whose word would be a paragraph: the mark carries it, the sentence
   stays in body text (see the chip() note in queue.js) */
.q-flag { display: inline-flex; align-items: baseline; gap: 6px; margin: 0 var(--space-8) var(--space-2) 0; color: var(--ink-2); }
.q-flag .db-mark { color: var(--st, var(--ink-3)); }
.db-table .dim, .dim { color: var(--ink-3); }

.q-row { cursor: pointer; }
.q-row.dragging td { opacity: .35; }
.q-grip { cursor: grab; color: var(--ink-3); user-select: none; letter-spacing: -2px; margin-right: var(--space-4); }
.q-grip:active { cursor: grabbing; }
.q-pos { font: 400 13px/20px var(--font-mono); color: var(--ink-3); }
.q-th-handle { width: 3rem; }
.q-handle { white-space: nowrap; }
.q-id { min-width: 19rem; }
.q-title { color: var(--ink-2); max-width: 34ch; }
.q-signal { display: inline-block; font: 500 11px/16px var(--font-mono); letter-spacing: .06em; color: var(--ink-3); margin: 0 var(--space-8) 0 0; }
.q-signal::before { content: "· "; }

/* the expanded detail row — a well, not a card */
.q-detail td { background: var(--surface-sunk); padding: var(--space-12) var(--space-16); cursor: default; }
.q-dl { display: grid; grid-template-columns: 9rem 1fr; gap: var(--space-2) var(--space-12); margin: 0; }
.q-dl dt { font: 600 11px/20px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.q-dl dd { margin: 0; font: 400 13px/20px var(--font-mono); color: var(--ink-2); overflow-wrap: anywhere; }
.q-sub-block { margin-top: var(--space-12); padding: var(--space-8) var(--space-12); background: var(--surface); border: var(--line-hair) solid var(--rule); }
.q-sub-block > b { display: block; font: 600 11px/16px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--space-4); }
.q-paths { font: 400 13px/20px var(--font-mono); color: var(--ink-2); }
.q-paths--bad, .q-paths .is-stop { color: var(--stop); }
.q-stages { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: var(--space-4) 0 var(--space-8); }
.q-start { display: block; margin: var(--space-4) 0; }

/* Narrow panes: the tables scroll sideways inside their db-table-wrap rather
   than squashing titles to one word a line. */
.db-table { min-width: 960px; }
@media (max-width: 820px) { .atlas-lbl { font-size: 9px; } .q-dl { grid-template-columns: 1fr; } }

/* ---- ATLAS scene ---- */
.atlas-stage { position: relative; margin: 0 auto 1.6rem; max-width: 1180px; }
.atlas-scene { position: relative; height: calc(var(--sceneH) + var(--graphTop)); perspective: var(--persp); perspective-origin: 50% 12%; }
.atlas-ground { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.atlas-ground .atlas-tile { position: absolute; left: 50%;
  top: calc(var(--tileTop) + var(--graphTop) - var(--tileW) * var(--tileShift));
  width: var(--tileW); margin-left: calc(var(--tileW) / -2); transform: translateX(var(--tileX)); }
.atlas-ground .atlas-tile svg { width: 100%; height: auto; display: block; overflow: visible; }
.atlas-ground .atlas-glow { position: absolute; left: 0; right: 0; top: calc(var(--tileTop) + var(--graphTop) - 70px);
  height: 250px; background: radial-gradient(ellipse at 50% 55%, color-mix(in srgb, var(--green) 16%, transparent), transparent 72%); }
.atlas-graph { position: absolute; top: var(--graphTop); left: 0; right: 0; height: var(--graphH); pointer-events: none; z-index: 3; }
.atlas-graph svg { width: 100%; height: 100%; overflow: visible; }
.atlas-lblLayer { pointer-events: none; }
.atlas-nodelink { pointer-events: auto; cursor: pointer; }
/* accent, not oxblood: exact oxblood is 1.7:1 on the night ground and the
   system forbids it as text there (tokens.json usage note). */
.atlas-nodelink:hover .atlas-lbl { fill: var(--accent); text-decoration: underline; }
.atlas-lbl { font-family: var(--font-sans); font-weight: 600; font-size: 11px; letter-spacing: .04em; fill: var(--ink); }
.atlas-lbl-t1 { font-size: 12px; letter-spacing: .14em; fill: var(--accent); }
.atlas-dot { cursor: default; }
.atlas-tierLane { stroke: var(--gold-dim); stroke-width: 1; stroke-dasharray: 2 7; opacity: .45; }
.atlas-tierLane.is-reserved { stroke-dasharray: 1 9; opacity: .22; }
.atlas-tierLbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; fill: var(--ink-3); }
.atlas-spoke { stroke: var(--gold-dim); stroke-width: 1; opacity: .35; }

/* ---- projects ---- */
.dev-toolbar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.dev-filter { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; color: var(--ink-soft); }
.dev-chip { display: inline-block; font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; padding: .12rem .45rem; border: 1px solid var(--green); border-radius: 2px; color: var(--green); text-decoration: none; background: var(--surface); }
.dev-chip.on { background: var(--green); color: var(--paper); }
.dev-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.dev-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 3px; padding: .85rem 1rem 1rem; scroll-margin-top: 5rem; }
.dev-card.is-target { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 35%, transparent); }
.dev-card h2 { font-family: var(--disp); font-weight: 700; font-size: 1.12rem; letter-spacing: .06em; margin: 0 0 .15rem; }
.dev-root { font-family: var(--mono); font-size: .68rem; color: var(--ink-soft); margin: 0 0 .55rem; word-break: break-all; }
.dev-root.none { color: var(--gold-dim); font-style: italic; }
.dev-scope { font-size: .88rem; line-height: 1.45; margin: 0 0 .6rem; cursor: text; }
.dev-scope:hover { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.dev-scope-edit { width: 100%; font: inherit; font-size: .88rem; padding: .3rem .4rem; border: 1px solid var(--gold); border-radius: 2px; }
.dev-chips { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .6rem; }
.dev-cardfoot { display: flex; gap: .8rem; align-items: baseline; }
.dev-cardfoot a { font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; color: var(--oxblood); }
.dev-saving { font-family: var(--mono); font-size: .66rem; color: var(--ink-soft); }
.dev-saving.err { color: var(--oxblood); }

/* Narrow panes: the tables scroll sideways inside .q-table rather than
   squashing titles to one word a line, and the scan meta gets out of the
   way of the nav. */

@media (max-width: 900px) { .dev-scanmeta { display: none; } .dev-bar { gap: .8rem; } }
@media (max-width: 820px) { .atlas-lbl { font-size: 9px; } .q-dl { grid-template-columns: 1fr; } }

/* ---- archive + prompt controls (S4 amendment 2026-09-06) ---- */
.q-btn { font: 600 .66rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: .28rem .5rem; margin: .1rem .35rem .1rem 0; border: 1px solid var(--gold-dim); border-radius: 3px; background: var(--surface); color: var(--oxblood); cursor: pointer; vertical-align: middle; }
.q-btn:hover { background: var(--gold); }
.q-btn:disabled { opacity: .4; cursor: wait; }
.q-compose td { background: color-mix(in srgb, var(--gold) 10%, var(--surface)); padding: .5rem .75rem; }
.q-compose .q-to { font-family: var(--mono); font-size: .68rem; color: var(--ink-soft); margin-bottom: .3rem; }
.q-compose textarea { width: 100%; min-height: 4.5rem; box-sizing: border-box; font: .8rem/1.4 var(--sans, system-ui); padding: .4rem .5rem; border: 1px solid var(--gold-dim); border-radius: 3px; background: var(--surface); resize: vertical; }
.q-compose .q-actions { margin-top: .35rem; display: flex; gap: .25rem; align-items: center; }
.q-compose .q-hint { font-family: var(--mono); font-size: .64rem; color: var(--ink-soft); margin-left: auto; }
.q-prompt-text { white-space: pre-wrap; font-size: .8rem; max-width: 60ch; }

/* ---- release console (§14) ---------------------------------------------
   The gate, made visible: a step is idle / running / ready / locked, and the
   deploy row is the only place on this board that can reach production — so
   it is the only control that carries the oxblood fill. */
.rc { border: 1px solid var(--rule); background: var(--surface); padding: .9rem 1.1rem 1.1rem; }
.rc-stage {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .18em; text-transform: uppercase;
  padding: .12rem .5rem; border: 1px solid var(--rule); color: var(--ink-soft); background: var(--paper);
}
.rc-step { display: flex; gap: .8rem; padding: .75rem 0; border-top: 1px solid var(--rule); }
.rc-step:first-of-type { border-top: 0; }
.rc-step-n {
  font-family: var(--disp); font-weight: 700; font-size: 1.5rem; line-height: 1;
  color: var(--rule); min-width: 2.2rem; text-align: right;
}
.rc-ready .rc-step-n { color: var(--green); }
.rc-running .rc-step-n { color: var(--gold-dim); }
.rc-locked .rc-step-n { color: var(--rule); }
.rc-step-b { flex: 1; min-width: 0; }
.rc-step-h { display: flex; align-items: baseline; gap: .6rem; }
.rc-step-h b { font-family: var(--disp); font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; }
.rc-step-p { font-family: var(--body); font-size: .82rem; color: var(--ink-soft); margin: .2rem 0 .5rem; max-width: 95ch; }
.rc-pill { font-family: var(--mono); font-size: .55rem; letter-spacing: .16em; text-transform: uppercase;
  padding: .1rem .4rem; border: 1px solid var(--rule); color: var(--ink-soft); }
.rc-pill-ready, .rc-pill-ok, .rc-pill-reviewed, .rc-pill-shipped { color: var(--green); border-color: var(--green); }
.rc-pill-running, .rc-pill-checking, .rc-pill-shipping, .rc-pill-served, .rc-pill-warn { color: var(--amber); border-color: var(--amber); }
.rc-pill-locked, .rc-pill-idle { color: var(--ink-soft); }
.rc-pill-failed { color: var(--red); border-color: var(--red); }
.rc-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .35rem 0; }
.rc-dim { font-family: var(--mono); font-size: .66rem; letter-spacing: .03em; color: var(--ink-soft); margin: .2rem 0; }
.rc-foot { margin-top: .8rem; }
.rc-warn { font-family: var(--mono); font-size: .68rem; color: var(--red); margin: .3rem 0; }
.rc-warn-inline { font-family: var(--mono); font-size: .6rem; color: var(--red); margin-left: .5rem; }
.rc-item { display: block; padding: .25rem .4rem; border: 1px solid transparent; cursor: pointer; font-size: .85rem; }
.rc-item:hover { border-color: var(--rule); }
.rc-item.on { border-color: var(--gold); background: var(--paper); }
.rc-item b { font-family: var(--mono); font-size: .8rem; margin-right: .3rem; }
.rc-item .rc-pill { margin-left: .5rem; }
.rc-item-notready { opacity: .75; }
.rc-check { display: block; font-size: .85rem; margin: .25rem 0; cursor: pointer; }
.rc-check input { margin-right: .45rem; }
.rc-cmd { display: flex; align-items: center; gap: .5rem; background: var(--paper); border: 1px solid var(--rule); padding: .3rem .5rem; margin: .4rem 0; }
.rc-cmd code { font-size: .72rem; overflow-x: auto; white-space: nowrap; }
.rc-copy { font-family: var(--mono); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase;
  background: none; border: 1px solid var(--rule); color: var(--ink-soft); padding: .1rem .4rem; cursor: pointer; margin-left: auto; }
.rc-copy:hover { border-color: var(--gold-dim); color: var(--ink); }
.rc-log {
  font-family: var(--mono); font-size: .66rem; line-height: 1.5; margin: .5rem 0 0;
  max-height: 22rem; overflow: auto; background: var(--paper); color: var(--ink);
  padding: .6rem .7rem; border: 1px solid var(--rule); white-space: pre-wrap; word-break: break-word;
}
.rc-links { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .4rem 0; }
.rc-link { font-family: var(--mono); font-size: .66rem; color: var(--oxblood); }
.rc-in { font-family: var(--mono); font-size: .72rem; padding: .35rem .5rem; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); }
.rc-in-msg { flex: 1; min-width: 22rem; }
.rc-in-cp { width: 14rem; }
.rc-in:disabled { background: var(--paper); color: var(--ink-soft); }
.rc-deploy { padding: .5rem; border: 1px solid var(--rule); background: var(--paper); }
.rc-ship { background: var(--oxblood); color: var(--paper); border-color: var(--gold); }
.rc-ship:hover:not(:disabled) { background: var(--accent); color: var(--gold); }
.rc-ship:disabled { background: var(--rule); color: var(--ink-soft); border-color: var(--rule); cursor: not-allowed; }
/* pressed is an ink-filled inversion, not brand colour (Controls) */
.db-btn.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
/* a dropped check: the loudest thing on the page, because every control under
   it has just become a refusal */
.rc-stale { border: 1px solid var(--red); border-left: 4px solid var(--red); background: var(--stop-wash); padding: .6rem .8rem; margin: 0 0 .8rem; }
.rc-stale b { font-family: var(--disp); font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.rc-stale p { font-family: var(--mono); font-size: .7rem; color: var(--ink-soft); margin: .25rem 0 .5rem; }
.rc-stale .db-btn { margin-right: .6rem; }
.rc-shelf { font-family: var(--mono); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase;
  background: none; border: 1px solid var(--rule); color: var(--ink-soft); padding: .08rem .4rem; cursor: pointer; margin-left: .6rem; }
.rc-shelf:hover { border-color: var(--oxblood); color: var(--oxblood); }
.rc-shelfbox { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .2rem 0 .5rem 1.6rem;
  padding: .5rem .6rem; background: var(--paper); border: 1px solid var(--rule); }
.rc-in-why { flex: 1; min-width: 20rem; }
.rc-shelved { opacity: .72; border-left: 3px solid var(--rule); padding-left: .5rem; }
.rc-inline { margin-left: .5rem; }

/* ===================================================================
   PROJECT MODE (§15) — /p/<id> and /m/p/<id>
   No new tokens: every colour and face here is one the queue already uses,
   so the two modes read as one board.
   =================================================================== */
.p-head { display: flex; gap: 1.4rem; align-items: flex-start; flex-wrap: wrap;
  border-bottom: 2px solid var(--oxblood); padding: 0 0 .8rem; margin: 0 0 1.2rem; }
.p-head-main { flex: 1; min-width: 20rem; }
.p-title { margin: 0 0 .2rem; }
.p-scope { font-size: .92rem; line-height: 1.45; margin: 0 0 .35rem; max-width: 80ch; color: var(--ink-soft); }
.p-root { margin: 0; font-size: .7rem; }
.p-head-side { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.p-sel-l, .p-rel { font-family: var(--mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.p-sel { font-family: var(--disp); font-size: .95rem; letter-spacing: .1em; text-transform: uppercase;
  margin-left: .5rem; padding: .18rem .4rem; background: var(--surface); color: var(--ink);
  border: 1px solid var(--oxblood); border-radius: 2px; }
.p-rel { cursor: pointer; }

.p-sec { margin-bottom: 1.6rem; }
.p-h { cursor: pointer; user-select: none; }
.p-h:hover { color: var(--oxblood); }
.q-caret { font-size: .7em; opacity: .55; }
.p-body { }

/* the two docs, rendered as written */
.p-docsrc { margin: 0 0 .5rem; }
/* DS-M0: the rendered markdown (help, VISION, reports) on the system's type
   scale. Prose keeps to `measure`; headings are the office's serif; anything
   a machine wrote stays mono. */
.p-md { background: var(--surface); border: var(--line-hair) solid var(--rule); padding: var(--space-12) var(--space-16); }
.p-md h1, .p-md h2 { font: 700 17px/24px var(--font-serif); margin: var(--space-24) 0 var(--space-4); }
.p-md h3 { font: 400 17px/24px var(--font-serif); margin: var(--space-16) 0 var(--space-4); }
.p-md h4, .p-md h5, .p-md h6 { font: 600 11px/16px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: var(--space-16) 0 var(--space-2); }
.p-md p, .p-md li { max-width: var(--measure); margin: var(--space-4) 0; }
.p-md pre { background: var(--surface-sunk); border: var(--line-hair) solid var(--rule); border-radius: var(--radius-2); padding: var(--space-8) var(--space-12); overflow-x: auto; font: 400 13px/20px var(--font-mono); }
.p-md hr { border: 0; border-top: var(--line-hair) solid var(--rule); margin: var(--space-16) 0; }
.p-md-t { width: 100%; border-collapse: collapse; font: 400 14px/20px var(--font-sans); margin: var(--space-8) 0; }
.p-md-t td { padding: var(--space-4) var(--space-8); border-bottom: var(--line-hair) solid var(--rule); vertical-align: baseline; }
.p-md-t th { padding: var(--space-4) var(--space-8); text-align: left; background: var(--surface-sunk); font: 600 11px/16px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
  border-top: var(--line-hair) solid var(--rule-strong); border-bottom: var(--line-hair) solid var(--rule-strong); }

/* a project that has not opted in — PM7's amber card, naming the path */
.p-amber > b { display: block; }
.p-amber b { font-family: var(--disp); font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); }
.p-amber p { font-size: .8rem; margin: .3rem 0 0; max-width: 90ch; }

/* plan phases */
.p-phase-wrap { margin: 0 0 1.1rem; }
.p-phase { font-family: var(--disp); font-size: .95rem; letter-spacing: .12em; text-transform: uppercase;
  margin: .9rem 0 .3rem; display: flex; align-items: baseline; gap: .5rem; }
.p-phase-x { color: var(--amber); }
.p-phase-note { font-size: .8rem; color: var(--ink-soft); margin: .1rem 0 .4rem; max-width: 92ch; }
.p-plan td, .p-items td { font-size: .78rem; }
.p-ms { max-width: 40ch; line-height: 1.35; }
.p-live { min-width: 12rem; }
.p-live-i { font-size: .7rem; margin-top: .15rem; }
.q-row.p-flash td { background: color-mix(in srgb, var(--gold) 34%, var(--surface)); }

/* reports feed */
.p-rep { border: 1px solid var(--rule); background: var(--surface); margin: 0 0 .4rem; }
.p-rep-top { display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; padding: .45rem .7rem; cursor: pointer; }
.p-rep-top:hover { background: var(--paper); }
.p-rep-1 { font-size: .8rem; color: var(--ink-soft); flex: 1; min-width: 16rem; }
.p-rep-body { border-top: 1px solid var(--rule); padding: .5rem .7rem .7rem; }
.p-rep-h { font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-soft); margin: .5rem 0 .1rem; cursor: pointer; display: flex; gap: .4rem; align-items: baseline; }
.p-rep-h:hover { color: var(--oxblood); }
.p-rep-sec { border: 0; padding: 0 0 0 .2rem; font-size: .82rem; }

/* the phone view: same renderer, one column, tables that scroll */
.p-bar-m { gap: .6rem; padding: .5rem .8rem; }
.p-wrap-m { padding: .8rem .8rem 3rem; max-width: 100%; }
body[data-mobile] .p-head { flex-direction: column; gap: .6rem; }
body[data-mobile] .p-head-side { align-items: flex-start; }
body[data-mobile] .p-head-main { min-width: 0; }
body[data-mobile] .q-lane { overflow-x: auto; }
body[data-mobile] .db-table { min-width: 42rem; }
body[data-mobile] .p-md { min-width: 0; padding: .7rem .8rem; }
body[data-mobile] .q-strip { gap: .4rem; }
body[data-mobile] .q-cell { min-width: 4.6rem; }
@media (max-width: 820px) {
  .p-head { flex-direction: column; }
  .p-head-side { align-items: flex-start; }
  .q-lane { overflow-x: auto; }
}
/* plan tables: the id and the dates stay narrow so the milestone text gets the
   room. `table-layout: auto` would hand the width to whichever column has the
   longest unbroken token, which on a plan row is a file path in LOCKS. */
.p-plan th:first-child, .p-plan td:first-child { width: 7rem; white-space: nowrap; }
.p-plan th:last-child, .p-plan td:last-child { width: 24rem; }
.p-plan td { vertical-align: top; }
.p-plan .q-now { max-width: 24rem; margin-top: .2rem; }
.p-items th:first-child, .p-items td:first-child { width: 22rem; }
/* Long chips wrap rather than widening the table — a BLOCKED reason or a lock
   path must not decide the column layout. Only in the cells that actually hold
   long text: a status or stage chip that wraps reads as "ACTI VE". */
.p-plan .p-live .db-label, .p-items td:last-child .db-data, .p-items .q-now .db-data,
.p-items .q-id .db-data, .p-items .q-id .q-flag { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
.p-plan th:nth-child(2), .p-plan td:nth-child(2) { min-width: 18rem; }
.p-plan th:nth-child(3), .p-plan td:nth-child(3) { width: 9rem; }
/* status and stage hold one word each; give them the room for it */
.p-items th:nth-child(4), .p-items td:nth-child(4) { width: 8rem; }
.p-items th:nth-child(5), .p-items td:nth-child(5) { width: 5.5rem; }
.p-items td:nth-child(4) .db-st, .p-items td:nth-child(5) .db-st { white-space: nowrap; }
.p-items th:nth-child(2), .p-items td:nth-child(2) { white-space: nowrap; width: 4.5rem; }
.p-items th:nth-child(6), .p-items td:nth-child(6) { white-space: nowrap; width: 4rem; }
/* the paste-to-begin line, shown whole so it can be copied in one go */
.q-start { display: block; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--paper);
  border: 1px solid var(--rule); padding: .35rem .5rem; margin: .2rem 0; font-size: .7rem; line-height: 1.4; }

/* ---- CITY (CITY-SPEC@REV0 §4.3) ----------------------------------
   The city fills the window below the chrome: it is a scene, not a
   document, so it does not sit in .dev-wrap and does not scroll. */
.city-body { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

.city-tools {
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  padding: .45rem 1.4rem; border-bottom: 1px solid var(--rule); background: var(--paper);
}
.city-framings { display: flex; gap: .5rem; }
.city-framings a {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none; border: 1px solid var(--rule);
  border-radius: 2px; padding: .18rem .55rem;
}
.city-framings a.on { color: var(--paper); background: var(--oxblood); border-color: var(--oxblood); }

.city-crumb { font-family: var(--mono); font-size: .68rem; color: var(--ink-soft); flex: 1 1 18rem; min-width: 0; overflow-x: auto; white-space: nowrap; }
.city-crumb-empty { opacity: .5; }
.city-crumb-seg { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--rule); }
.city-crumb-seg:hover { color: var(--oxblood); border-bottom-color: var(--oxblood); }
.city-crumb-project { margin-left: .6rem; color: var(--oxblood); font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--oxblood); }

.city-scrub { display: flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.city-scrub input[type=range] { width: 14rem; accent-color: var(--oxblood); }
.city-scrub output { min-width: 5.2rem; }

.city-panes { flex: 1 1 auto; display: grid; grid-template-columns: 1fr; min-height: 0; }
.city-panes.is-split { grid-template-columns: 1fr 1fr; }
.city-pane { position: relative; min-width: 0; min-height: 0; border-left: 1px solid var(--rule); }
.city-pane:first-child { border-left: 0; }
.city-pane canvas { display: block; width: 100%; height: 100%; }
/* C17: on the pane's own right edge, not its left — the left corner is the
   Overlay's tl slot and the tag has been sitting under "City · C:\dev"
   since DS-M0. Colour comes from db-ovl (the chip city.js puts it on):
   under `night` the scene behind it is near-black, and bare ink on the
   scene is a label you cannot read in one of the two looks. */
.city-pane-tag {
  position: absolute; top: .6rem; right: .8rem; z-index: 2; pointer-events: none;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .22em; text-transform: uppercase;
  opacity: .85;
}

/* DS-M0: the hover tooltip is retired — the hovered building now names
   itself in the Overlay's br slot. The stage is only a positioning context
   for that overlay; the scene inside it is untouched. */
.city-stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; }
.city-stage > .city-panes { flex: 1 1 auto; min-width: 0; }
.city-status {
  position: fixed; left: 50%; top: 55%; transform: translate(-50%, -50%);
  font-family: var(--mono); font-size: .8rem; color: var(--ink-soft);
}
.city-status.is-error { color: var(--red); max-width: 40rem; text-align: center; }

/* the C18 massing panel, edifice pane only */
.city-knobs {
  position: absolute; bottom: .7rem; left: .8rem; z-index: 3;
  /* A fourth column for GROUNDS' per-row reset (G16). The C18 rows above
     carry three cells and simply leave it empty. */
  display: grid; grid-template-columns: auto 1fr auto auto; gap: .18rem .45rem; align-items: center;
  /* O-CITY-13 made the night page reachable by default, and this was the one
     hardcoded colour left in the city block — a pre-DS paper cream, which put
     light labels on a light panel the moment the page went dark. */
  background: var(--surface); border: 1px solid var(--rule); border-radius: 2px;
  padding: .2rem .5rem;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft);
}
.city-knob { display: contents; }
.city-knobs input[type=range] { width: 7.5rem; accent-color: var(--oxblood); }
.city-knobs select { grid-column: 2 / 4; font-family: var(--mono); font-size: .6rem; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); }
.city-knobs output { min-width: 2.4rem; text-align: right; }
/* the panel-wide reset; the per-row one below opts out of the full span */
.city-knobs .db-btn:not(.city-knob-reset) { grid-column: 1 / -1; justify-self: end; margin-top: .25rem; }
/* GROUNDS G16 — per-row reset. A glyph, not a word: it repeats on every
   road row and a word there would be wider than the control it resets. */
.city-knobs .city-knob-reset {
  grid-column: 4; justify-self: end; margin: 0;
  padding: 0 .2rem; min-height: 0; line-height: 1.1;
  font-size: .62rem; opacity: .55; border-color: transparent; background: transparent;
}
.city-knobs .city-knob-reset:hover { opacity: 1; border-color: var(--rule); }

/* §19 tool launcher — rows in the project page's Tools section. */
#sec-tools .p-tbl td { vertical-align: middle; padding: 3px 10px 3px 0; }
.p-tool-note { color: var(--ink-3); font-style: italic; }
.p-tool-do { text-align: right; white-space: nowrap; }
.p-tool-do > * + * { margin-left: 6px; }
.p-tool-do .db-btn[disabled] { opacity: .55; cursor: default; }

/* ---- the wiki (DEV-WIKI-SPEC W4) ------------------------------------------
   Page chrome for /help…: breadcrumb, tag chips, the search box, backlinks.
   Layout and system tokens only — the type is the system's db-label / db-data /
   db-input / db-heading. A WANTED link is the one new meaning here and it is
   `attn`, the same amber every other "this needs you" on the board uses; the
   dotted rule keeps it told apart without colour (F5). */
.w-crumb { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-8); margin: 0 0 var(--space-12); }
.w-crumb [aria-current] { color: var(--ink-2); }
.w-sep { color: var(--ink-3); }
.w-search { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-16); margin: 0 0 var(--space-12); }
.w-search .db-input { flex: 1 1 18rem; max-width: 32rem; }
.w-hits { flex: 1 0 100%; list-style: none; margin: 0; padding: var(--space-8) var(--space-12); background: var(--surface); border: var(--line-hair) solid var(--rule); }
.w-hits li { margin: var(--space-4) 0; }
.w-snip { color: var(--ink-3); }
.w-tags { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-8); margin: 0 0 var(--space-8); }
.db a.w-tag { text-decoration: none; }
.db a.w-tag:hover { color: var(--ink); }
.w-meta { color: var(--ink-3); margin: 0 0 var(--space-12); }
.w-img { display: block; max-width: 100%; height: auto; margin: var(--space-12) 0; background: var(--surface); border: var(--line-hair) solid var(--rule); }
/* a diagram is not prose: it takes the page width, not the reading measure */
.p-md p:has(> .w-img) { max-width: none; }
.w-back { margin: var(--space-24) 0 0; }
.w-list { margin: var(--space-4) 0; padding-left: var(--space-16); }
/* night and v0 set `attn` and the link accent to the same gold, so the colour
   alone would not tell a wanted link from a live one there: the wash does. */
.db a.wiki-wanted { color: var(--attn); background: var(--attn-wash); text-decoration-style: dotted; padding: 0 var(--space-2); }

/* ---- the glossary (GLOSSARY-SPEC GL5, GL6, GL9) ----------------------------
   A term link is a link with a dotted underline and the definition as its
   title (GL10, no script). The glossary page is the system's pieces — db-input,
   db-btn in a db-seg, db-st chips, db-label, the w-list — with spacing only. */
.db a.wiki-term { text-decoration-style: dotted; text-underline-offset: 3px; }
.g-tools { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-8); margin: 0 0 var(--space-8); }
.g-tools .db-input { flex: 1 1 320px; max-width: 520px; }
.g-az { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-8); margin: 0 0 var(--space-8); }
.db .g-az a { text-decoration: none; }
.db .g-az a.is-off { color: var(--ink-3); opacity: .45; pointer-events: none; }
.g-cats { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: 0 0 var(--space-16); }
.g-cats .db-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.g-letter { margin: var(--space-24) 0 var(--space-4); }
.g-entry { padding: var(--space-12) 0; border-top: var(--line-hair) solid var(--rule); scroll-margin-top: calc(var(--header-h, 0px) + var(--space-16)); }
.g-anchor { display: block; position: relative; top: calc(-1 * var(--header-h, 0px) - var(--space-16)); }
.g-term { margin: 0; }
.g-full { font-weight: 400; color: var(--ink-2); }
.g-chips { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-8); margin: var(--space-2) 0 var(--space-4); }
.g-def { margin: 0 0 var(--space-4); max-width: 72ch; }
.g-kv { margin: var(--space-2) 0; }
.g-notes { margin: var(--space-4) 0; }
.g-used { margin: var(--space-4) 0 0; }
.g-entry:target { background: var(--surface); }

/* ---- the home page's outline (Ilya 2026-10-06) -----------------------------
   Every section of the guide with its subsections and the glossary terms it
   uses, at the top of /help. Sections and subsections are plain links; the
   terms are the same dotted wiki-term links the prose carries. A jump lands
   below the fixed bar. */
.w-outline { margin: var(--space-12) 0 var(--space-24); padding: var(--space-12) var(--space-16); background: var(--surface); border: var(--line-hair) solid var(--rule); }
.w-outline__title { margin: 0 0 var(--space-8); display: flex; gap: var(--space-12); align-items: baseline; }
.w-outline__list { margin: 0; padding-left: var(--space-24); }
.w-outline__list > li { margin: 0 0 var(--space-8); }
.w-outline__head { font-weight: 600; }
.w-outline__subs { display: block; color: var(--ink-3); }
.w-outline__terms { display: block; color: var(--ink-3); }
.w-outline__terms .wiki-term { margin-right: var(--space-4); }
.p-md > h3[id], .p-md > h4[id] { scroll-margin-top: calc(var(--header-h, 0px) + var(--space-16)); }

/* ---- the wiki sidebar (DEV-WIKI-SPEC W11) ---------------------------------
   Grid glue only: a 240 px index beside the page. The pieces inside it are the
   system's — db-input, db-label, db-data — and the lists are the w-list the
   backlinks already use. Sticky, and it scrolls on its own, so a long page
   never carries the index away. Below 900 px it is out of the flow until the
   header's Index button opens it; the phone shell never has one. */
.w-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--space-32); align-items: start; }
.w-main { min-width: 0; }
.w-side { position: sticky; top: var(--space-16); max-height: calc(100vh - var(--space-32)); overflow-y: auto;
  padding-right: var(--space-16); border-right: var(--line-hair) solid var(--rule); }
.w-side .db-input { width: 100%; box-sizing: border-box; }
.w-side .w-hits { margin: var(--space-8) 0 0; }
.w-side .w-hits .w-snip { display: block; }
.w-nav__home { display: block; margin: var(--space-12) 0 var(--space-8); }
.w-nav summary, .w-nav__head { display: block; margin: var(--space-12) 0 var(--space-4); color: var(--ink-3); }
.w-nav summary { cursor: pointer; user-select: none; list-style: none; }
.w-nav summary::-webkit-details-marker { display: none; }
.w-nav summary::before { content: "▾ "; opacity: .55; }
.w-nav details:not([open]) > summary::before { content: "▸ "; }
.w-nav summary:hover { color: var(--ink); }
.w-nav .w-list { list-style: none; padding-left: var(--space-12); margin: 0; }
.w-nav .w-list li { margin: var(--space-2) 0; }
.w-nav__foot { margin: var(--space-16) 0 0; padding-top: var(--space-8); border-top: var(--line-hair) solid var(--rule); }
/* the page you are on: ink, not link colour, with a rule on the left — told
   apart without colour (F5) */
.db .w-nav a[aria-current] { color: var(--ink); font-weight: 600; text-decoration: none; border-left: var(--line-rule) solid var(--ink); padding-left: var(--space-8); margin-left: calc(-1 * var(--space-8) - var(--line-rule)); }
body.w-side-closed .w-layout { grid-template-columns: minmax(0, 1fr); }
body.w-side-closed .w-side { display: none; }
@media (max-width: 899px) {
  .w-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-16); }
  .w-side, body.w-side-closed .w-side { display: none; position: static; max-height: none; padding: 0 0 var(--space-12);
    border-right: 0; border-bottom: var(--line-hair) solid var(--rule); }
  body.w-side-open .w-side { display: block; }
}

/* ---- Services (DEV-SERVICES-SPEC SV6/SV7) — page glue, system tokens only ---- */
/* the header is the accent ground; a status colour needs paper under it to read */
.svc-chip { display: inline-flex; align-items: center; margin-right: var(--space-12); padding: var(--space-2) var(--space-8); background: var(--paper); border-radius: var(--radius-2); text-decoration: none; }
.svc-note { margin-top: var(--space-2); color: var(--ink-3); font: 400 12px/16px var(--font-sans); max-width: var(--measure); white-space: normal; }
.svc-actions { display: flex; gap: var(--space-4); justify-content: flex-end; }
.svc-p { margin: 0 0 var(--space-8); }
.svc-pre { margin: 0; padding: var(--space-8) var(--space-12); background: var(--surface); border: var(--line-hair) solid var(--rule); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- the door's actions, and the row it lands on (WIDGET-SPEC S6a) ----
   W4's list acts: "queue" goes to the item on the real queue, "prompt"
   writes the board's existing prompt record. The row the queue opens on is
   MARKED, not recoloured — on this board a colour on a row means status,
   and "you asked for this one" is not a status. */
.wg-act { white-space: nowrap; }
.wg-act > * { margin: 0 var(--space-4) 0 0; }
.wg-act a.db-btn { display: inline-flex; align-items: center; text-decoration: none; }
.q-focus > td { background: var(--surface-sunk); box-shadow: inset 3px 0 0 var(--ink); }

/* ---- the permanent top bar (FRONT-SPEC REV0 F6) -------------------------
   The Header component, promoted: nav.js adds `is-fixed` to the page's own
   `.db-header` and `has-topbar` to <html>. Its strip is the header's own
   height token, reserved under it on every page (and on the block, measured
   out of the camera's viewport). Tokens only. */
.db-header.is-fixed { position: fixed; top: 0; left: 0; right: 0; z-index: 30; }
html.has-topbar:not(.is-embedded) body.db { padding-top: var(--header-h); }
.db-bar__glyph { margin-right: var(--space-4); font-family: var(--font-mono); opacity: .8; }
.db-bar__counts { display: flex; align-items: center; gap: var(--space-8); margin: 0; padding: 0; list-style: none; }
.db-bar__counts .db-st { color: var(--on-band-strong); font-family: var(--font-mono); }
.db .db-bar__svc { display: inline-flex; align-items: center; gap: var(--space-4); color: var(--on-band-strong); text-decoration: none; }
.db-bar__svc .db-mark { display: inline-block; width: 9px; height: 9px; background: currentColor; }
.db-bar__svc-word { font: 500 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
/* on the block: glass, a hairline after 8 s idle, gone while the saver runs */
.db-header.is-glass { background: color-mix(in oklab, var(--band) 72%, transparent);
  -webkit-backdrop-filter: blur(var(--space-8)) saturate(1.1); backdrop-filter: blur(var(--space-8)) saturate(1.1);
  transition: transform 240ms ease, opacity 240ms ease; }
.db-header.is-glass.is-collapsed { transform: translateY(calc(var(--line-rule) - var(--header-h))); }
.db-header.is-glass.is-collapsed > * { opacity: 0; }
.db-header.is-glass.is-hidden { opacity: 0; pointer-events: none; transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) { .db-header.is-glass { transition: none; } }
@media (max-width: 760px) { .db-bar__counts, .db-bar__svc-word, .db-bar__glyph { display: none; } }
.db-header.is-fixed .db-header__name { white-space: nowrap; }
.db-header.is-fixed .db-nav { overflow: hidden; }
/* T2-20261006-nav-dev-group — a nav group: one item in the bar, its members in
   a menu under it. The trigger wears the nav link's look (not the header's
   boxed button); the menu is the bar's own band, hung from the header (the
   positioned box) so .db-nav's clip does not cut it. Phone: inline, below. */
.db .db-header .db-nav__trigger { display: flex; align-items: center; gap: 0; height: auto; padding: 0 var(--space-8); border: 0; border-radius: 0;
  border-top: var(--line-rule) solid transparent; border-bottom: var(--line-rule) solid transparent; color: var(--on-band-strong); background: transparent; cursor: pointer; }
.db .db-header .db-nav__trigger:hover, .db .db-header .db-nav__group.is-open > .db-nav__trigger { border-bottom-color: var(--on-band-strong); }
.db .db-header .db-nav__trigger[aria-current="page"] { color: var(--on-band); font-weight: 600; border-bottom-color: var(--gold); }
.db-nav__caret { margin-left: var(--space-4); font-size: 10px; opacity: .8; }
.db-nav__menu { display: none; position: absolute; top: 100%; z-index: 60; min-width: 168px; margin: 0; padding: var(--space-4) 0; list-style: none;
  background: var(--band); border: var(--line-hair) solid var(--on-band); border-top: var(--line-rule) solid var(--gold); }
.db-nav__group.is-open > .db-nav__menu { display: block; }
.db .db-header .db-nav__menu a { display: flex; padding: var(--space-4) var(--space-12); border: 0; border-left: var(--line-rule) solid transparent; white-space: nowrap; }
.db .db-header .db-nav__menu a:hover { border-left-color: var(--on-band-strong); }
.db .db-header .db-nav__menu a[aria-current="page"] { border-left-color: var(--gold); }
.db-header.is-glass .db-nav__menu { background: color-mix(in oklab, var(--band) 92%, transparent); }
/* T2-20261020-work-nav — a tool that is not placed yet: greyed, its note under it, no link */
.db .db-header .db-nav__ph > span { display: flex; flex-direction: column; padding: var(--space-4) var(--space-12); border-left: var(--line-rule) solid transparent;
  color: var(--on-band-strong); opacity: .55; cursor: default; white-space: nowrap; }
.db-nav__note { max-width: 280px; font: 400 11px/15px var(--font-mono); white-space: normal; }
/* T2-20261020-work-nav-2 — a sub-group inside a menu (Modules → Work): a row
   button, its members indented under it, shut until clicked. A long menu
   scrolls inside the window rather than running off it. */
.db-nav__menu { max-height: calc(100vh - 56px); overflow-y: auto; }
.db .db-header .db-nav__subtrigger { display: flex; align-items: center; justify-content: space-between; width: 100%; height: auto; margin: 0;
  padding: var(--space-4) var(--space-12); border: 0; border-left: var(--line-rule) solid transparent; border-radius: 0; color: var(--on-band-strong);
  background: transparent; font: inherit; text-align: left; cursor: pointer; white-space: nowrap; }
.db .db-header .db-nav__subtrigger:hover { border-left-color: var(--on-band-strong); }
.db .db-header .db-nav__subtrigger[aria-current="page"] { border-left-color: var(--gold); }
.db-nav__sub { border-top: var(--line-hair) solid color-mix(in oklab, var(--on-band) 40%, transparent); margin-top: var(--space-4); }
.db-nav__sub.is-open > .db-nav__subtrigger .db-nav__caret { transform: rotate(90deg); }
.db-nav__submenu { display: none; margin: 0; padding: 0 0 var(--space-4) var(--space-12); list-style: none; }
.db-nav__sub.is-open > .db-nav__submenu { display: block; }
.db .db-header .db-nav__tool > a { flex-direction: column; align-items: flex-start; }
.db .db-header .db-nav__tool .db-nav__note { opacity: .75; }
/* T2-20261009-remote-push-button — the remote control: the services dot's
   look as a button, and a panel hung from the header like a nav menu. */
.db .db-header .db-bar__remote { display: inline-flex; align-items: center; gap: var(--space-4); height: auto; padding: 0; border: 0; border-radius: 0;
  color: var(--on-band-strong); background: transparent; cursor: pointer; }
.db-bar__remote .db-mark { display: inline-block; width: 9px; height: 9px; background: currentColor; }
.db-bar__remote-age { font: 400 11px/16px var(--font-mono); opacity: .8; }
.db-header.is-remote-open .db-bar__remote { text-decoration: underline; text-underline-offset: 4px; }
.db-bar__rpanel { display: none; position: absolute; top: 100%; z-index: 60; width: min(460px, calc(100vw - var(--space-16))); box-sizing: border-box;
  padding: var(--space-12); color: var(--on-band-strong); background: var(--band); border: var(--line-hair) solid var(--on-band); border-top: var(--line-rule) solid var(--gold); }
.db-header.is-remote-open .db-bar__rpanel { display: block; }
.db-header.is-glass .db-bar__rpanel { background: color-mix(in oklab, var(--band) 92%, transparent); }
.db-bar__rline { margin: 0 0 var(--space-8); font: 400 12px/18px var(--font-mono); overflow-wrap: anywhere; }
.db-bar__ract { display: flex; align-items: center; gap: var(--space-12); }
.db .db-header .db-bar__rhelp { color: var(--on-band-strong); font-size: 12px; }
.db-bar__rerr { margin: var(--space-8) 0 0; padding: var(--space-4) var(--space-8); background: var(--paper); color: var(--ink); font-size: 12px; }
.db-bar__rlog { margin: var(--space-8) 0 0; max-height: 220px; overflow: auto; padding: var(--space-8); background: var(--paper); color: var(--ink);
  font: 400 11px/16px var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
/* the full-window pages keep their height with the bar's strip inside it, and sticky rails start under the bar */
html.has-topbar:not(.is-embedded) .city-body { box-sizing: border-box; }
html.has-topbar:not(.is-embedded) .w-side { top: calc(var(--header-h) + var(--space-16)); max-height: calc(100vh - var(--header-h) - var(--space-32)); }
html.has-topbar:not(.is-embedded) { scroll-padding-top: var(--header-h); }

/* ---- phone (MOBILE-PASS-SPEC REV0, ruled "take-all" 2026-09-24) ----------
   What the system does not have, at phone width. The system's own classes
   are restyled in design/skins/phone.css (the sanctioned place, §17.3);
   these are the page glue's classes and the one element nav.js adds.
   Everything below is inside (max-width: 480px), so a desktop page is
   unchanged; html[data-phone="off"] (theme.js) turns the Menu off with it. */
.db-bar__menu { display: none; }
@media (max-width: 480px) {
  html:not([data-phone="off"]) .db-header .db-bar__menu { display: inline-flex; align-items: center; margin-left: auto; }
  html:not([data-phone="off"]) .db-header.is-menu-open .db-bar__menu { order: 2; }
  /* the Menu sheet is already a list: a nav group's members sit inline under its name */
  html:not([data-phone="off"]) .db-header.is-menu-open .db-nav__trigger { pointer-events: none; opacity: .7; }
  html:not([data-phone="off"]) .db-header.is-menu-open .db-nav__caret { display: none; }
  html:not([data-phone="off"]) .db-header.is-menu-open .db-nav__menu { display: block; position: static; border: 0; padding: 0 0 0 var(--space-16); background: none; }
  /* …and a sub-group's (Modules → Work) inline under its own name, one step further in (T2-20261020-work-nav-2) */
  html:not([data-phone="off"]) .db-header.is-menu-open .db-nav__menu { max-height: none; overflow: visible; }
  html:not([data-phone="off"]) .db-header.is-menu-open .db-nav__subtrigger { pointer-events: none; opacity: .7; }
  html:not([data-phone="off"]) .db-header.is-menu-open .db-nav__submenu { display: block; }
  /* the open sheet is the fixed header grown past the screen: it scrolls in itself, so its end is reachable */
  html:not([data-phone="off"]) .db-header.is-fixed.is-menu-open { max-height: 100vh; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
  /* G4 — wide content scrolls inside its own box, never the page */
  .p-md-t { display: block; max-width: 100%; overflow-x: auto; font-size: 16px; line-height: 24px; }
  .p-md-t th { font-size: 13px; }
  .p-md pre { box-sizing: border-box; max-width: 100%; white-space: pre; }
  .db code { overflow-wrap: anywhere; }
  .p-md img, .p-md svg { max-width: 100%; height: auto; }
  .p-md { overflow-wrap: anywhere; }
  /* G3 on the glue */
  .q-sub-block > b, .p-md h4, .p-md h5, .p-md h6, .q-signal, .q-dl dt, .db-bar__svc-word { font-size: 13px; line-height: 20px; }
  .svc-note { font-size: 13px; }
  .p-sel-l, .p-rel { font-size: 13px; }
  /* G2 on the glue */
  .w-tag, .p-rel, .w-back a, #sideBtn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
  .p-rel { gap: var(--space-8); }
  .w-crumb a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
  .p-root { font-size: 13px; }
  /* F4 on the glue — the queue folds to its five states and its rows */
  ul.db-counters.q-strip2 { display: none; }
  #strip .db-counter__note { display: none; }
  .q-lane > .q-sub { display: none; }
  .q-id, .q-title, .q-now, .p-plan .q-now { min-width: 0; max-width: none; }
  .p-plan td, .p-items td { font-size: 16px; }
  .dev-scope, .p-scope { font-size: 16px; line-height: 24px; }
  .dev-root, .p-amber p, .p-phase-note, .p-rep-1, .q-prompt-text, .q-compose .q-to, .rc-warn { font-size: 13px; }
  .dev-cardfoot a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
  .p-rel input { width: 24px; height: 24px; }
  .db .db-bar__svc { min-height: 44px; min-width: 44px; justify-content: center; }
  body[data-mobile] .db-table { min-width: 0; }
  /* C3 — 8 px between neighbouring targets */
  .p-head-side { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-16); }
  .dev-chip { margin: 0 var(--space-8) var(--space-8) 0; }
  .w-list li + li { margin-top: var(--space-8); }
  .w-list a { display: inline-flex; align-items: center; min-height: 44px; margin: 4px 0; }
  .p-live-i + .p-live-i { margin-top: var(--space-8); }
  .q-caret { font-size: 13px; }
  /* RA — /atlas as a list; the map stays below it, a still */
  .atlas-list { list-style: none; margin: var(--space-16) 0; padding: 0; border-top: var(--line-hair) solid var(--rule); }
  .atlas-list a { display: flex; align-items: center; gap: var(--space-12); min-height: 44px; font-size: 16px; text-decoration: none; border-bottom: var(--line-hair) solid var(--rule); }
  .atlas-list .db-label { flex: 0 0 64px; }
  .atlas-list li + li { margin-top: var(--space-8); }
  .atlas-stage { pointer-events: none; }
  .atlas-stage .atlas-nodelink { pointer-events: none; }
  .atlas-stage .atlas-lblLayer, .atlas-stage .atlas-tierLbl { display: none; }
}

/* SKETCH-M0 (DEV-SKETCH-SPEC SK6) - the Sketches section on /p/<id> and the pencil on a card or plan row */
.p-sk { list-style: none; padding: 0; margin: var(--space-8) 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-12); }
.p-sk-i { display: grid; grid-template-columns: 120px 1fr; gap: var(--space-8); align-items: start; border: 1px solid var(--rule); background: var(--surface); padding: var(--space-8); }
.p-sk-i img { display: block; width: 120px; height: 80px; object-fit: contain; background: var(--surface); border: 1px solid var(--rule); }
.p-sk-refs { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-4); }
.p-pencil { margin-left: var(--space-4); text-decoration: none; color: var(--accent); font-weight: 600; }
.p-pencil:hover { color: var(--oxblood); }
/* INCUBATOR-M0 (DEV-INCUBATOR-SPEC §I4) — page glue for the Incubator lane: the detail
   under an open row and its action strip. Statuses and chips are the system's own. */
#lane-incubator .inc-open td { background: var(--surface); }
#lane-incubator .inc-detail { display: grid; gap: var(--space-8); padding: var(--space-8) var(--space-4); }
#lane-incubator .inc-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-4) var(--space-12); margin: 0; }
#lane-incubator .inc-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
#lane-incubator .inc-actions { display: flex; flex-wrap: wrap; gap: var(--space-8); align-items: center; }
#lane-incubator .inc-note { justify-self: start; }
#lane-incubator .inc-row.is-stop td { background: var(--stop-wash); }

/* ---- PV-M0 — /p/<id> in the new mode (DEV-PROJECT-VIEW-SPEC REV2 §9, §9b PV60–PV68; Ledger).
   System tokens and the system's type scale only (PV45, PV65, PV66): serif for headings, the body
   face at full contrast for Ilya's own text, mono for ids, and machine text (src, dates, REV) in
   the muted token one step smaller. Separation is the system's hairline rule, never a box; no
   card-in-card. The only accents are the flag marks (attn / stop), drawn by the system (PV64). ---- */
.pv { --pv-rail: 19rem; }
.pv-machine { font: 400 12px/16px var(--font-mono); color: var(--ink-3); }
.pv-quiet { font: 400 12px/16px var(--font-sans); color: var(--ink-3); margin: var(--space-4) 0 var(--space-12); }
.pv-id { font: 600 13px/20px var(--font-mono); color: var(--ink); white-space: nowrap; }
.pv-text { font: 400 14px/20px var(--font-sans); color: var(--ink); }
.pv-h { display: flex; align-items: baseline; gap: var(--space-8); margin: var(--space-24) 0 var(--space-8); }
.pv-h__n { font-weight: 400; }
.pv-main > .pv-h:first-child, .pv-main > .pv-src + .pv-h { margin-top: 0; }

/* header line + the tab row that is also the completeness strip (PV39, PV13, PV38) */
.pv-strip { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-12); padding: 0 0 var(--space-8); }
.pv-strip__end { margin-left: auto; }
.pv-flaglink { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.pv-tabs { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); margin: 0 0 var(--space-16); }
.pv-tab { display: inline-flex; align-items: center; gap: var(--space-4); padding: var(--space-8) var(--space-12); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  font: 400 13px/16px var(--font-sans); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.pv-tab:hover { background: var(--surface-sunk); }
.pv-tab[aria-pressed="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.pv-tab__n { font: 400 11px/16px var(--font-mono); color: var(--ink-3); }
.pv-tab .db-mark { margin-right: var(--space-2); }

/* the grid: tab content, then the rail (PV61) */
.pv-grid { display: grid; grid-template-columns: minmax(0, 1fr) var(--pv-rail); gap: var(--space-32); align-items: start; }
.pv-grid--one { grid-template-columns: minmax(0, 1fr); }
.pv-main { min-width: 0; }
.pv-src { margin: 0 0 var(--space-12); }
.pv-bar { display: flex; flex-wrap: wrap; gap: var(--space-8); align-items: center; margin: var(--space-8) 0 var(--space-12); }
.pv-prompts { margin-top: var(--space-16); }

/* entry rows: one line, id · status · text · links, detail on expand (PV62) */
.pv-tblwrap { border-top: 1px solid var(--rule-strong); }
.pv-tbl { width: 100%; min-width: 0; }   /* the board-wide .db-table min-width (960px) would push the rail off a one-line row list */
.pv-tbl td { vertical-align: baseline; padding-top: var(--space-4); padding-bottom: var(--space-4); }
.pv-row { cursor: pointer; }
.pv-row:hover td, .pv-row[aria-expanded="true"] td { background: var(--surface-sunk); }
.pv-row:focus-visible { outline: 2px solid var(--rule-strong); outline-offset: -2px; }
.pv-row > td:first-child { width: 4.5rem; }
.pv-st { width: 7.5rem; white-space: nowrap; }
.pv-st__w { font-weight: 400; }
.pv-st__w--ruled { color: var(--ink-3); }
.pv-st__flag { margin-left: var(--space-8); }
.pv-row--retired .pv-text, .pv-row--retired .pv-id { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--rule-strong); }
.pv-row--proposed .pv-text { font-style: italic; }
.pv-links { text-align: right; }
.pv-links > * + * { margin-left: var(--space-4); }
.pv-links .pv-machine { white-space: nowrap; }
.pv-ctl { white-space: nowrap; text-align: right; width: 1%; }
.pv-do + .pv-do { margin-left: var(--space-4); }
.pv-detail > td { background: var(--surface-sunk); padding-top: 0; }
.pv-detail__in { display: flex; flex-direction: column; gap: var(--space-4); padding: 0 0 var(--space-8) 4.5rem; }
.pv-trailer { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.pv-chip { display: inline-block; font: 400 12px/16px var(--font-mono); padding: 0 var(--space-4); border: var(--line-hair) solid var(--rule); border-radius: var(--radius-2); color: var(--ink-2); background: transparent; white-space: nowrap; }
button.pv-chip { cursor: pointer; }
button.pv-chip:hover { background: var(--surface-sunk); }
/* PV diagrams (TIE-IN-CW-VISITOR-ACCESS) */
.pv-diagram { display: block; margin-top: var(--space-4); }
.pv-diagram img { display: block; max-width: 100%; height: auto; border: 1px solid var(--gold-dim); background: var(--paper, #fff); cursor: zoom-in; }
.pv-chip--link.is-dead { border-style: dashed; color: var(--ink-3); }
.pv-chip.is-unknown { border-style: dashed; }

/* designed empty state (PV67) */
.pv-empty { border-top: 1px solid var(--rule-strong); padding: var(--space-12) 0 0; }
.pv-empty__lead { font: 400 14px/20px var(--font-sans); color: var(--ink-3); margin: 0 0 var(--space-8); }
.pv-checklist { list-style: none; margin: 0 0 var(--space-8); padding: 0; font: 400 12px/20px var(--font-sans); color: var(--ink-3); }
.pv-checklist li::before { content: ""; display: inline-block; width: 9px; height: 9px; border: 1px solid var(--rule-strong); margin-right: var(--space-8); vertical-align: -1px; }

/* flags — the one accented thing (PV64) */
.pv-flags { list-style: none; margin: 0 0 var(--space-12); padding: 0; border-top: 1px solid var(--rule-strong); }
.pv-flag { display: grid; grid-template-columns: auto 3.5rem minmax(0, 1fr) auto; gap: var(--space-8); align-items: baseline; padding: var(--space-4) 0; border-bottom: 1px solid var(--rule); }
.pv-flag .db-mark { align-self: center; }
.pv-flag__k { font: 600 12px/20px var(--font-mono); color: var(--ink-2); }
.pv-flag__t { font: 400 13px/20px var(--font-sans); color: var(--ink); min-width: 0; }
.pv-flag__ids { font: 400 12px/20px var(--font-mono); color: var(--ink-2); }
.pv-flag__do { white-space: nowrap; }
.pv-flag.is-dismissed .pv-flag__t, .pv-flag.is-dismissed .pv-flag__k { color: var(--ink-3); }
.pv-next { margin: 0; padding: 0 0 0 var(--space-24); }
.pv-next li { padding: var(--space-2) 0; }
.pv-list { list-style: none; margin: 0 0 var(--space-12); padding: 0; border-top: 1px solid var(--rule-strong); }
.pv-list li { padding: var(--space-4) 0; border-bottom: 1px solid var(--rule); font: 400 13px/20px var(--font-sans); }
.pv-malformed { white-space: pre-wrap; padding: var(--space-8); margin: 0 0 var(--space-12); }

/* the rail: three blocks, separated by rules (PV61, PV65) */
.pv-rail { display: flex; flex-direction: column; position: sticky; top: var(--space-48); border-top: 1px solid var(--rule-strong); }
.pv-rail__b { padding: var(--space-12) 0; border-bottom: 1px solid var(--rule); }
.pv-rail__b .pv-h { margin-top: 0; }
.pv-rail summary.pv-h { cursor: pointer; list-style: none; }
.pv-rail summary.pv-h::-webkit-details-marker { display: none; }
.pv-field { display: flex; width: 100%; margin: 0 0 var(--space-8); }
.pv-in { width: 100%; box-sizing: border-box; }
.pv-chat__in { height: auto; resize: none; }
.pv-live { list-style: none; margin: 0 0 var(--space-8); padding: 0; }
.pv-live li { display: flex; flex-wrap: wrap; gap: 0 var(--space-8); align-items: baseline; padding: var(--space-2) 0; }
.pv-live__id { font: 400 12px/16px var(--font-mono); color: var(--ink); overflow-wrap: anywhere; }
.pv-live__now { flex-basis: 100%; font: 400 12px/16px var(--font-sans); color: var(--ink-2); }
.pv-opens { display: flex; gap: var(--space-8); align-items: baseline; background: none; border: 0; padding: var(--space-4) 0 0; cursor: pointer; }
.pv-card-out { margin-top: var(--space-8); }
.pv-card-out code { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 12px/16px var(--font-mono); }
@media (max-width: 960px) {
  .pv-grid { grid-template-columns: minmax(0, 1fr); }
  .pv-rail { position: static; }
}
.pv-src { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .pv-tbl, .pv-tbl tbody { display: block; width: 100%; }
  .pv-tbl tr.pv-row { display: grid; grid-template-columns: auto 1fr; column-gap: var(--space-8); border-bottom: 1px solid var(--rule); }
  .pv-tbl tr.pv-row > td { border: 0; width: auto; }
  .pv-tbl tr.pv-row > td.pv-text, .pv-tbl tr.pv-row > td.pv-links, .pv-tbl tr.pv-row > td.pv-ctl { grid-column: 1 / -1; text-align: left; white-space: normal; padding-top: 0; }
  .pv-tbl tr.pv-detail { display: block; }
  .pv-detail__in { padding-left: 0; }
  .pv-flag { grid-template-columns: auto 3rem minmax(0, 1fr); }
  .pv-flag__do { grid-column: 1 / -1; }
}

/* ---- PV-M0 visual pass 1 (Ilya, 2026-10-24): "more separation / borders between sections, and some more
   visual appeal". Every block on a tab, and every rail block, is a framed panel: the surface ground on the
   paper page, a strong hairline frame, a sunk header strip in the serif heading with the letterhead's gold
   rule under it. System tokens only; panels never nest. Amends PV65 (rules-only separation). ---- */
.pv-panel { background: var(--surface); border: var(--line-hair) solid var(--rule-strong); border-radius: var(--radius-2);
  margin: 0 0 var(--space-16); box-shadow: 0 1px 0 var(--rule); }
.pv-panel__h { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-4) var(--space-8); padding: var(--space-8) var(--space-12);
  background: var(--surface-sunk); border-bottom: 2px solid var(--gold); border-radius: var(--radius-2) var(--radius-2) 0 0; }
.pv-panel__t { font: 700 15px/20px var(--font-serif); margin: 0; }
.pv-panel__n { font-weight: 400; }
.pv-panel__aside { margin-left: auto; }
.pv-panel__b { padding: var(--space-8) var(--space-12) var(--space-12); }
.pv-panel__b > :first-child { margin-top: 0; }
.pv-panel__b > :last-child { margin-bottom: 0; }
/* a panel that holds flags carries the attention colour on its frame edge — the flag stays the accent (PV64) */
.pv-panel.is-flagged { border-left: 3px solid var(--attn); }
/* inside a frame the lists and tables need no opening rule of their own */
.pv-panel .pv-tblwrap, .pv-panel .pv-flags, .pv-panel .pv-list, .pv-panel .pv-empty { border-top: 0; }
.pv-panel .pv-empty { padding-top: 0; }
.pv-panel .pv-flag:last-child, .pv-panel .pv-list li:last-child, .pv-panel .pv-tbl tr:last-child > td { border-bottom: 0; }
.pv-panel .pv-next { margin: 0; }

/* the tab row: a band of its own, framed like the panels */
.pv-tabs { background: var(--surface); border: var(--line-hair) solid var(--rule-strong); border-radius: var(--radius-2); padding: 0 var(--space-4); }
.pv-tab[aria-pressed="true"] { background: var(--paper); border-bottom-color: var(--gold); }
.pv-strip { padding-bottom: var(--space-12); }

/* the legacy sections that moved under DOCS / ACTIVITY (Specs, Wiki, Links, Sketches, Tools, Reports,
   Sessions) are framed the same way, from outside — their markup stays project.js's */
.pv-main > .p-sec { background: var(--surface); border: var(--line-hair) solid var(--rule-strong); border-radius: var(--radius-2);
  margin: 0 0 var(--space-16); box-shadow: 0 1px 0 var(--rule); }
.pv-main > .p-sec > .p-h { padding: var(--space-8) var(--space-12); margin: 0; font-size: 15px; line-height: 20px;
  background: var(--surface-sunk); border-bottom: 2px solid var(--gold); border-radius: var(--radius-2) var(--radius-2) 0 0; }
.pv-main > .p-sec > .q-sub, .pv-main > .p-sec > .p-body { padding: var(--space-8) var(--space-12); margin: 0; }
.pv-main > .p-sec > .p-body[hidden] { display: none; }

/* the rail: the same three blocks, each its own panel (PV61) */
.pv-rail { border-top: 0; gap: var(--space-16); }
.pv-rail__b { background: var(--surface); border: var(--line-hair) solid var(--rule-strong); border-radius: var(--radius-2);
  padding: 0 var(--space-12) var(--space-12); box-shadow: 0 1px 0 var(--rule); }
.pv-rail__b > .pv-h:first-child, .pv-rail__b > summary.pv-h, .pv-composer > .db-heading:first-child {
  margin: 0 calc(-1 * var(--space-12)) var(--space-12); padding: var(--space-8) var(--space-12); font-size: 15px; line-height: 20px;
  background: var(--surface-sunk); border-bottom: 2px solid var(--gold); border-radius: var(--radius-2) var(--radius-2) 0 0; }
.pv-rail__b.pv-chat:not([open]) { padding-bottom: 0; }
.pv-rail__b.pv-chat:not([open]) > summary.pv-h { margin-bottom: 0; border-bottom: 0; border-radius: var(--radius-2); }

/* ---- PV-M0 visual pass 1b (Ilya, 2026-10-24): "make the headers look more polished and distinctive".
   One header style for every panel, rail block and framed legacy section: the nameplate type (serif, caps,
   wide tracking), an oxblood index tab carrying the record section's letter, the count as a right-hand mono
   figure, and a gold double rule under the strip — the ruled-ledger heading. System tokens only; the band
   colour is the one constant across themes, so the tab reads the same day and night. ---- */
.pv-panel__h, .pv-main > .p-sec > .p-h, .pv-rail__b > .pv-h:first-child, .pv-rail__b > summary.pv-h, .pv-composer > .db-heading:first-child {
  display: flex; align-items: center; gap: var(--space-8); min-height: 36px; box-sizing: border-box;
  padding: var(--space-8) var(--space-12);
  background: linear-gradient(var(--surface-sunk), var(--surface-sunk)) padding-box;
  border-bottom: 3px double var(--gold);
  font: 700 12px/16px var(--font-serif); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.pv-panel__t { font: inherit; letter-spacing: inherit; margin: 0; }
.pv-panel__k { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: var(--radius-2);
  background: var(--band); color: var(--on-band-strong); font: 700 12px/1 var(--font-mono); letter-spacing: 0; text-transform: none;
  box-shadow: inset 0 -2px 0 var(--gold); }
.pv-panel__aside { margin-left: auto; letter-spacing: 0; text-transform: none; font-weight: 400; }
.pv-panel__n { margin-left: auto; font: 400 12px/16px var(--font-mono); letter-spacing: .04em; color: var(--ink-3); text-transform: none;
  padding: 0 var(--space-4); border: var(--line-hair) solid var(--rule); border-radius: var(--radius-2); background: var(--surface); }
.pv-panel__aside + .pv-panel__n { margin-left: 0; }
.pv-panel.is-flagged .pv-panel__n { color: var(--attn); border-color: var(--attn); }
/* the rail and legacy headings carry their counts in their own markup: keep those quiet and to the right */
.pv-rail__b > .pv-h .pv-h__n, .pv-rail__b > summary.pv-h .pv-h__n { margin-left: auto; letter-spacing: 0; text-transform: none; }
.pv-main > .p-sec > .p-h .q-caret { margin-left: auto; letter-spacing: 0; }
.pv-composer > .db-heading:first-child { margin: 0 calc(-1 * var(--space-12)) var(--space-12); }

/* ---- PV-M0 visual pass 1c (Ilya, 2026-10-24): "make the tabs / tab names more pronounced and accented".
   The tab row is an index strip on the letterhead's colours: an oxblood band rule along its foot, bolder
   labels, and the selected tab filled with the band (cream label, gold counts, gold underline) so it reads
   as the open folder. Overview, the nine sections, and Docs/Activity sit in three groups. On the selected
   tab the status mark turns cream — its SHAPE still carries the meaning (F5: never colour alone). ---- */
.pv-tabs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2px; padding: var(--space-4) var(--space-4) 0;
  background: var(--surface); border: var(--line-hair) solid var(--rule-strong); border-bottom: 3px solid var(--band);
  border-radius: var(--radius-2) var(--radius-2) 0 0; margin: 0 0 var(--space-16); }
.pv-tab { gap: var(--space-8); padding: var(--space-8) var(--space-12); margin: 0; border: 0; border-radius: var(--radius-2) var(--radius-2) 0 0;
  font: 600 13px/18px var(--font-sans); letter-spacing: .02em; color: var(--ink-2); background: transparent; }
.pv-tab:hover { background: var(--surface-sunk); color: var(--ink); }
.pv-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.pv-tab__l { font: inherit; }
.pv-tab__n { font: 400 11px/16px var(--font-mono); color: var(--ink-3); }
.pv-tab[aria-pressed="true"] { background: var(--band); color: var(--on-band-strong); border-bottom: 0; box-shadow: inset 0 -3px 0 var(--gold); }
.pv-tab[aria-pressed="true"] .pv-tab__n { color: var(--on-band); }
.pv-tab[aria-pressed="true"] .db-mark { color: var(--on-band-strong); }
/* the three groups: Overview · the record's nine sections · Docs and Activity */
.pv-tab[data-tab="USE"], .pv-tab[data-tab="DOCS"] { margin-left: var(--space-12); }
.pv-tab[aria-pressed="true"]:focus-visible { outline-color: var(--gold); }
/* one line at desktop widths: twelve tabs, three groups, Docs/Activity pushed to the right end */
.pv-tab { padding: var(--space-8) 10px; gap: 6px; letter-spacing: 0; }
.pv-tab[data-tab="USE"] { margin-left: var(--space-8); }
.pv-tab[data-tab="DOCS"] { margin-left: auto; }

/* ---- /p/<id> title block (PV-M0 visual pass 2, Ilya 2026-10-24: "nice and presentable … bigger font for the
   names … emphasize what needs emphasis … every convention to make the title block look professional … a
   reflection of the entire project … inspiring"). An engineering drawing's title block on the letterhead:
     the band — oxblood, a faint knurl, a gold steel-rule scale along the top, gold corner brackets; the name
       large in cream serif; the scope as an italic lede; the project's purpose as a pull quote; the
       drawing-register cells (DWG NO., REV, UPDATED, STATUS, CHECKED, PART OF) ruled in gold;
     the lower panel — the record gauge (one segment per section) and the facts strip, where only what needs
       a look takes a colour and its status mark.
   System tokens; colour-mix() only blends tokens. The band is the one constant in every theme. Shared by the
   record page and the legacy page. ---- */
.p-tbw { margin: 0 0 var(--space-24); }
.p-tb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-16); margin: 0 0 var(--space-8); }
.p-tb-bar__sel { display: inline-flex; align-items: center; gap: var(--space-8); }
.p-tb-bar__sp { flex: 1; }
.p-tbw .p-sel { margin: 0; height: 30px; padding: 0 var(--space-8); font: 600 13px/20px var(--font-sans); letter-spacing: .02em; text-transform: none;
  color: var(--ink); background: var(--surface); border: var(--line-hair) solid var(--rule-strong); border-radius: var(--radius-2); }
.p-tbw .p-rel { font: 400 12px/16px var(--font-sans); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.p-tb__link { font: 400 12px/16px var(--font-sans); color: var(--ink-2); }
.p-tb__link:hover { color: var(--accent); }

.p-tb { margin: 0; border: var(--line-hair) solid var(--rule-strong); border-radius: var(--radius-2); overflow: hidden; box-shadow: var(--shadow-lift); background: var(--surface); }

/* the band */
.p-tb__band { position: relative; padding: 44px 40px 32px; color: var(--on-band-strong);
  background-color: var(--band);
  background-image:
    radial-gradient(130% 160% at 0% 0%, color-mix(in srgb, var(--on-band-strong) 12%, transparent), transparent 55%),
    repeating-linear-gradient(45deg, color-mix(in srgb, var(--gold) 7%, transparent) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(-45deg, color-mix(in srgb, var(--gold) 7%, transparent) 0 1px, transparent 1px 6px);
  border-bottom: 3px double var(--gold); }
.p-tb__scale { position: absolute; top: 0; left: 40px; right: 40px; height: 24px; border-bottom: 1px solid var(--gold); border-right: 1.5px solid var(--gold);
  background:
    repeating-linear-gradient(90deg, var(--gold) 0 1.5px, transparent 1.5px 10%) bottom / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, var(--gold) 0 1px, transparent 1px 5%) bottom / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--gold) 75%, transparent) 0 1px, transparent 1px 1%) bottom / 100% 4px no-repeat; }
.p-tb__num { position: absolute; top: 1px; margin-left: 3px; font: 400 9px/10px var(--font-mono); color: var(--on-band); }
.p-tb__num:last-child { margin-left: -15px; }
.p-tb__corner { position: absolute; width: 14px; height: 14px; border: 0 solid var(--gold); }
.p-tb__corner.is-tl { top: 34px; left: 16px; border-top-width: 1.5px; border-left-width: 1.5px; }
.p-tb__corner.is-tr { top: 34px; right: 16px; border-top-width: 1.5px; border-right-width: 1.5px; }
.p-tb__corner.is-bl { bottom: 12px; left: 16px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.p-tb__corner.is-br { bottom: 12px; right: 16px; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.p-tb__body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-32); align-items: end; }
.p-tb__ident { min-width: 0; }
.p-tb__kicker { margin: 0 0 var(--space-8); font: 700 11px/16px var(--font-serif); letter-spacing: .3em; text-transform: uppercase; color: var(--on-band); }
.p-tb__name { margin: 0 0 var(--space-8); font: 400 56px/60px var(--font-serif); letter-spacing: -.015em; color: var(--gold); overflow-wrap: anywhere; }   /* gold on the band (Ilya, 2026-10-24: "change the title text font color to gold or sage" — gold: sage sits too close to oxblood in value to read) */
.p-tb__scope { margin: 0; max-width: 64ch; font: italic 400 18px/28px var(--font-serif); color: color-mix(in srgb, var(--on-band-strong) 82%, var(--band)); }
.p-tb__purpose { position: relative; margin: var(--space-16) 0 0; padding: var(--space-4) 0 var(--space-4) var(--space-24); max-width: 64ch; border-left: 3px solid var(--gold); }
.p-tb__purpose::before { content: "\201C"; position: absolute; left: 6px; top: -10px; font: 400 40px/1 var(--font-serif); color: var(--on-band); }
.p-tb__purpose p { margin: 0; font: 400 17px/26px var(--font-serif); color: var(--on-band-strong); }
.p-tb__purpose cite { display: block; margin-top: var(--space-4); font: 400 10px/14px var(--font-mono); font-style: normal; letter-spacing: .16em; text-transform: uppercase; color: var(--on-band); }

/* the drawing-register cells, ruled in gold */
.p-tb__grid { display: grid; grid-template-columns: repeat(3, minmax(7.5rem, auto)); align-self: end; min-width: 0;
  border: 1px solid var(--gold); background: color-mix(in srgb, var(--band) 82%, var(--ink)); }
.p-tb__cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: var(--space-4) var(--space-12) var(--space-8);
  border-right: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); }
.p-tb__cell:nth-child(3n) { border-right: 0; }
.p-tb__cell:nth-last-child(-n + 3) { border-bottom: 0; }
.p-tb__cap { font: 600 9px/12px var(--font-sans); letter-spacing: .18em; text-transform: uppercase; color: var(--on-band); }
.p-tb__val { font: 400 13px/18px var(--font-mono); color: var(--on-band-strong); overflow-wrap: anywhere; }
.p-tb__cell.is-id .p-tb__val { font: 700 15px/18px var(--font-mono); letter-spacing: .02em; }
.p-tb__band a { color: var(--on-band-strong); text-decoration-color: var(--gold); }
.p-tb__band .db-st { --st: var(--on-band-strong); color: var(--on-band-strong); }

/* the lower panel: the gauge and the facts */
.p-tb__lower { padding: 0 40px; background: var(--surface); }
.p-tb__gauge { padding: var(--space-16) 0 var(--space-12); border-bottom: var(--line-hair) solid var(--rule); }
.p-tb__gauge-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-4) var(--space-16); }
.p-tb__lower .p-tb__cap { color: var(--ink-3); font-size: 11px; line-height: 16px; letter-spacing: .14em; }
.p-tb__read { font: 400 13px/20px var(--font-sans); color: var(--ink-2); }
.p-tb__read b { font: 600 14px/20px var(--font-mono); color: var(--ink); }
.p-tb__read b.is-attn { color: var(--attn); }
.p-tb__sep { margin: 0 var(--space-8); color: var(--ink-3); }
.p-tb__segs { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: var(--space-8); margin-top: var(--space-12); }
.p-tb__seg { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "k n" "bar bar"; align-items: center; gap: 6px var(--space-8);
  padding: var(--space-8); text-decoration: none; color: var(--ink); background: var(--paper);
  border: var(--line-hair) solid var(--rule); border-radius: var(--radius-2); }
.p-tb__seg:hover { border-color: var(--rule-strong); background: var(--surface-sunk); }
.p-tb__seg.is-attn { border-color: var(--attn); }
.p-tb__seg.is-stop { border-color: var(--stop); }
.p-tb__seg-k { grid-area: k; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: var(--radius-2);
  background: var(--band); color: var(--on-band-strong); font: 700 12px/1 var(--font-mono); box-shadow: inset 0 -2px 0 var(--gold); }
.p-tb__seg-n { grid-area: n; justify-self: end; display: inline-flex; align-items: center; gap: 4px; font: 400 11px/16px var(--font-mono); color: var(--ink-3); }
.p-tb__seg-bar { grid-area: bar; display: flex; height: 8px; overflow: hidden; background: var(--surface-sunk); border: var(--line-hair) solid var(--rule); border-radius: 1px; }
.p-tb__seg-r { background: var(--ink-2); }
.p-tb__seg-p { background: repeating-linear-gradient(45deg, var(--ink-3) 0 1.5px, transparent 1.5px 4px); }
.p-tb__seg-e { flex: 1; }
.p-tb__plan { position: relative; height: 10px; margin-top: var(--space-12); background: var(--surface-sunk); border: var(--line-hair) solid var(--rule);
  background-image: repeating-linear-gradient(90deg, var(--rule-strong) 0 1px, transparent 1px 10%); }
.p-tb__plan-done { position: absolute; inset: 0 auto 0 0; background: var(--ink-2); }
.p-tb__facts { display: flex; flex-wrap: wrap; margin: 0; padding: var(--space-8) 0 var(--space-12); }
.p-tb__fact { padding: var(--space-4) var(--space-16) 0 0; margin: 0 var(--space-16) 0 0; border-right: var(--line-hair) solid var(--rule); min-width: 0; }
.p-tb__fact:last-child { border-right: 0; margin-right: 0; }
.p-tb__fact dt { font: 600 11px/16px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 2px; }
.p-tb__fact dd { display: flex; align-items: center; gap: 6px; margin: 0; font: 400 14px/20px var(--font-mono); color: var(--ink); overflow-wrap: anywhere; }
.p-tb__fact dd a { color: inherit; }
.p-tb__fact.is-attn dd { color: var(--attn); font-weight: 600; }
.p-tb__fact.is-you dd { color: var(--you); font-weight: 600; }
.p-tb__fact.is-stop dd { color: var(--stop); font-weight: 600; }
.p-tb__live { display: inline-flex; gap: var(--space-12); }
.p-tb__live > span { display: inline-flex; align-items: center; gap: 4px; }
.p-tb__live > span.is-you { color: var(--you); font-weight: 600; }

@media (max-width: 900px) {
  .p-tb__body { grid-template-columns: minmax(0, 1fr); gap: var(--space-16); }
  .p-tb__grid { justify-self: start; }
  .p-tb__segs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .p-tb__band { padding: 36px var(--space-16) var(--space-24); }
  .p-tb__scale { left: var(--space-16); right: var(--space-16); }
  .p-tb__corner { display: none; }
  .p-tb__name { font-size: 36px; line-height: 40px; }
  .p-tb__scope { font-size: 16px; line-height: 24px; }
  .p-tb__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .p-tb__cell:nth-child(3n) { border-right: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); }
  .p-tb__cell:nth-child(2n) { border-right: 0; }
  .p-tb__cell:nth-last-child(-n + 3) { border-bottom: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); }
  .p-tb__cell:nth-last-child(-n + 2) { border-bottom: 0; }
  .p-tb__lower { padding: 0 var(--space-16); }
  .p-tb__segs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .p-tb__facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8) 0; }
  .p-tb__fact { border-right: 0; margin: 0; }
}
/* The title's ornaments (Ilya, 2026-10-24: "sage stretched diamonds on both sides of the title text").
   A lozenge three times as wide as it is tall, in the brand sage (--green), either side of the name. They
   are drawn in CSS like every other mark (no glyph characters) and are decoration only — never status. */
.p-tb__name { display: flex; align-items: center; gap: var(--space-16); }
.p-tb__name::before, .p-tb__name::after { content: ""; flex: none; width: 36px; height: 12px; background: var(--green);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
@media (max-width: 640px) {
  .p-tb__name { gap: var(--space-8); }
  .p-tb__name::before, .p-tb__name::after { width: 24px; height: 8px; }
}

/* ---- path 2: the chat pane (DEV-PROJECT-VIEW-SPEC §7, TIE-IN-DEV-PROJECT-VIEW-E). Same tokens as the
   panels: Ilya's lines and the session's text in the body face, what the session wrote as machine lines with
   the ok mark, a refused write with the stop mark (the one accent here, PV27). ---- */
.pv-chat__in { min-height: 64px; resize: vertical; margin-top: var(--space-8); }
.pv-chat__card { margin: 0 0 var(--space-4); overflow-wrap: anywhere; }
.pv-chat__targets { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); margin: 0 0 var(--space-8); }
.pv-chat__targets .db-label { width: 100%; }
.pv-chip--toggle { cursor: pointer; }
.pv-chip--toggle[aria-pressed="true"] { background: var(--band); color: var(--on-band-strong); border-color: var(--band); }
.pv-chat__log { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-8);
  padding: var(--space-8); background: var(--paper); border: var(--line-hair) solid var(--rule); border-radius: var(--radius-2); }
.pv-chat__log:empty { display: none; }
.pv-cl { font: 400 13px/19px var(--font-sans); color: var(--ink); overflow-wrap: anywhere; }
.pv-cl__who { display: block; font: 600 10px/14px var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.pv-cl__t { white-space: pre-wrap; }
.pv-cl--you .pv-cl__t { font-weight: 600; }
.pv-cl--write, .pv-cl--note { font: 400 12px/18px var(--font-mono); color: var(--ink-2); }
.pv-cl--hazard { font: 400 12px/18px var(--font-mono); color: var(--stop); }
.pv-live__run { height: 22px; padding: 0 var(--space-8); font-size: 12px; }
.pv-cl__md { white-space: normal; }
.pv-cl__md p, .pv-cl__md ul, .pv-cl__md ol, .pv-cl__md pre { margin: 0 0 var(--space-4); }
.pv-cl__md pre { white-space: pre-wrap; font-size: 11px; }

/* PV108 (T2-20261115-pv-m1c) — the `proposed` chip on a custom section tab whose DECISIONS audit line is unruled */
.pv-tab__chip { margin-left: 4px; }
