/* AIYO 1d "Plain ground, living nodes" (ADR-0099 am. 4), product UI v2 (ADR-0192 §I, design/reference/PRODUCT_UI_V2.md).
   Ground, filled widgets with no borders, square hairline chrome. Plex Sans for reading, Plex Mono only for values and
   the wordmark. Status is shown only as nodes. Red marks what you can touch: a red fill with black ink for the primary
   action, a red outline (--red-ink) for every other control; the current thing that needs you keeps the inset frame.
   Dark is the default; [data-theme="light"] on <html> is the full light theme, chosen per person (window.aiyoTheme in
   app.js). Print is always light (the @media print block at the end). */
@font-face { font-family: "IBM Plex Sans"; src: url("/static/IBMPlexSans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/static/IBMPlexSans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/static/IBMPlexSans-600.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/static/IBMPlexMono-400.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/static/IBMPlexMono-300.woff2") format("woff2"); font-weight: 200 300; font-display: swap; }

/* The tokens the aiyo-look skill mirrors (skills/aiyo-look/.../references/tokens.css; tests/test_skills_look.py keeps
   them equal): the dark values, unchanged. The themed set below repeats them so a [data-theme] container can switch. */
:root {
  color-scheme: dark;
  --textarea-max: 33vh;   /* ADR-0244 d5: how tall any text box grows before it scrolls; the one place to change it */
  /* ground and lines */
  --ground: #000000; --widget: #0e0e10; --raised: #1c1c20; --hairline: #1f1f1f; --row: #141416;
  --control: #2e2e33; --control-hover: #3e3e45; --edge: #5a2530;
  --red: #ff2e4c; --red-hover: #ff5a72; --red-disabled-bg: #2a1418; --red-disabled-ink: #6a4a50;
  --danger-border: #4a2026; --danger-hover-bg: #1f0d0f;
  /* ink: the handoff's exact values */
  --text: #ecebe8; --body: #d6d5d2; --muted: #9d9ca3; --faint: #77767d; --off: #4a4950;
  /* status: on nodes (and tiny meters) only, never as fills of panels, pills or buttons */
  --s-run: #3987e5; --s-run-halo: rgba(57, 135, 229, .25); --s-person: #e8723c; --s-good: #4cc38a;
  --s-warn: #e5a54b; --s-bad: #ff6b60; --s-wait: #8f8e96; --s-aside: #4a4950;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --r-widget: 12px; --r-option: 10px; --r-chip: 6px; --r-control: 6px; --r-check: 4px;
  --overlay: 0 24px 48px rgba(0, 0, 0, .6), 0 0 0 1px var(--control);
  --accent-ink: #000;
}
/* v2 tokens (design/reference/notebook-v2/tokens/colors.css), dark */
:root, [data-theme="dark"] {
  color-scheme: dark;
  /* ground and lines */
  --ground: #000000; --widget: #0e0e10; --raised: #1c1c20; --raised-2: #26262b; --hairline: #1f1f1f;
  --row: #141416; --control: #2e2e33; --control-hover: #3e3e45; --control-disabled: #1a1a1d; --input-disabled-bg: #0a0a0b;
  --edge: #5a2530; --edge-faint: #2a1a1d;
  /* red: what you can touch. --red is a fill (black ink on it in both themes); --red-ink is red as text or outline */
  --red: #ff2e4c; --red-hover: #ff5a72; --red-link-hover: #ff6b7f; --red-ring: rgba(255, 46, 76, .2); --red-wash: rgba(255, 46, 76, .12);
  --red-ink: #ff2e4c; --red-fill-soft: rgba(255, 46, 76, .93);
  --red-disabled-bg: #2a1418; --red-disabled-ink: #6a4a50; --danger-border: #4a2026; --danger-hover-bg: #1f0d0f;
  /* ink */
  --text: #ecebe8; --body: #d6d5d2; --muted: #9d9ca3; --faint: #77767d; --off: #4a4950; --on-red: #000000;
  /* status */
  --s-run: #3987e5; --s-run-halo: rgba(57, 135, 229, .25); --s-person: #e8723c; --s-good: #4cc38a;
  --s-warn: #e5a54b; --s-bad: #ff6b60; --s-wait: #8f8e96; --s-aside: #4a4950;
  --s-draft-ring: #3a2a22; --s-idle-ring: #3d5e4c; --s-warn-line: #5a4520; --s-run-2: #2a6bb8;
  /* tab bars (the segmented bar that opens each column) */
  --tab-bg: #ff2e4c; --tab-ink: #000000; --tab-sep: #000000; --tab-on-bg: #000000; --tab-on-ink: #ff2e4c; --tab-hover: rgba(0, 0, 0, .16);
  /* action cards (things you act on): a grey surface with a red outline and red buttons, as in light */
  --act-bg: #141416; --act-ink: #ecebe8; --act-muted: #9d9ca3; --act-line: #2a2a2e; --act-fill: #1f1f22;
  --act-ring: #ff2e4c; --act-btn: #ff2e4c;
  /* ask and notes cards */
  --ask-ring: var(--s-good); --ask-btn: var(--s-good); --ask-btn-ink: #000000;
  /* placeholders */
  --stripes: repeating-linear-gradient(135deg, #141416 0 10px, #101012 10px 20px);
  /* chrome that is not a token in the handoff: shadows, scrims, the live network's nodes, pictures' paper */
  --shadow: rgba(0, 0, 0, .6); --scrim: rgba(0, 0, 0, .72); --net-node: #ffffff; --paper: #ffffff;
  --overlay: 0 24px 48px var(--shadow), 0 0 0 1px var(--control);
  --code-hl: rgba(255, 46, 76, .13); --diff-add: rgba(25, 158, 112, .16); --diff-del: rgba(217, 89, 38, .16);
  --reply-bg: #000000;
}
/* v2 tokens, light */
[data-theme="light"] {
  color-scheme: light;
  --ground: #f7f6f3; --widget: #ecebe7; --raised: #e2e1dc; --raised-2: #d9d8d3; --hairline: #d9d8d3; --row: #e4e3de;
  --control: #c9c8c3; --control-hover: #a3a2a8; --control-disabled: #e4e3de; --input-disabled-bg: #efeeea;
  --edge: #e7aab4; --edge-faint: #f1d4d9;
  --red-ink: #d81f3c; --red-ring: rgba(255, 46, 76, .16); --red-wash: rgba(255, 46, 76, .1); --red-link-hover: #ff2e4c;
  --red-disabled-bg: #f3d6db; --red-disabled-ink: #a06a73; --danger-border: #e7aab4; --danger-hover-bg: #fbe9ec;
  --text: #0e0e10; --body: #2e2e33; --muted: #56555c; --faint: #6a6970; --off: #a3a2a8;
  --s-run: #2f74cc; --s-run-halo: rgba(47, 116, 204, .2);
  --s-person: #d5602a; --s-good: #2f9e6c; --s-warn: #c88a2c; --s-bad: #e0453b; --s-wait: #8a8990; --s-aside: #a3a2a8;
  --s-draft-ring: #e8c9b8; --s-idle-ring: #9cc7b0; --s-warn-line: #e3c48f; --s-run-2: #6f9fdc;
  --tab-bg: #ffffff; --tab-ink: #0e0e10; --tab-sep: #d81f3c; --tab-on-bg: #ff2e4c; --tab-on-ink: #000000; --tab-hover: rgba(255, 46, 76, .1);
  --act-bg: #ecebe7; --act-ink: #0e0e10; --act-muted: #56555c; --act-line: #d9d8d3; --act-fill: #e2e1dc; --act-ring: #d81f3c; --act-btn: #d81f3c;
  --stripes: repeating-linear-gradient(135deg, #e4e3de 0 10px, #ecebe7 10px 20px);
  --shadow: rgba(0, 0, 0, .14); --scrim: rgba(14, 14, 16, .32); --net-node: #0e0e10;
  --code-hl: rgba(255, 46, 76, .12); --diff-add: rgba(47, 158, 108, .16); --diff-del: rgba(213, 96, 42, .14);
  --reply-bg: #ffffff;
}
/* names derived from the tokens, resolved wherever a theme is set; the page rules below still use the older ones */
:root, [data-theme] {
  --surface: var(--ground);  /* what hollow nodes and graph labels are filled with */
  --bg: var(--ground); --panel: var(--widget); --ink: var(--text); --line: var(--hairline); --soft: var(--raised);
  --accent: var(--red); --accent-ink: var(--on-red); --ok: var(--s-good); --warn: var(--s-warn); --bad: var(--s-bad);
  --link: var(--red-ink); --link-hover: var(--red-link-hover); --hair: var(--hairline);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--text); }
body { font: 14px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
a:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--red-ink); border-radius: 2px; }
code, kbd, samp, pre, .v { font-family: var(--mono); }
.v { font-size: 12px; } .v-faint { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.prefilled { font-family: var(--mono); border-bottom: 1px dotted var(--s-run); }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- chrome: square, hairlines */
.wordmark { display: inline-block; border: 1px solid var(--red-ink); color: var(--red-ink); font: 300 16px/1 var(--mono);
  padding: .19em .62em .4em; text-decoration: none; }
.wordmark:hover { color: var(--red-ink); }
.wordmark.big { font-size: 34px; border-width: 1.5px; }
header.top { height: 52px; border-bottom: 1px solid var(--hairline); background: var(--ground); display: flex;
  align-items: center; gap: 28px; padding: 0 20px; position: sticky; top: 0; z-index: 6; }
header.top .crumb { color: var(--muted); font-size: 13px; }
header.top .spacer { flex: 1; }
header.top .who { color: var(--body); font-size: 13px; }
header.top .who-init { display: none; }
@media (max-width: 480px) {   /* a long name never runs off a phone's header: initials in a circle, the name on hover */
  header.top .who-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  header.top .who-init { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
    border-radius: 50%; background: var(--raised); color: var(--text); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
}
header.top .me { display: flex; align-items: center; gap: 4px; }
nav.sitetabs { display: flex; gap: 22px; font-size: 13px; align-items: center; }
nav.sitetabs a { color: var(--muted); display: inline-flex; align-items: center; gap: 7px; min-height: 32px; }
nav.sitetabs a:hover { color: var(--text); }
nav.sitetabs a.on { color: var(--text); }
nav.sitetabs a.on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
main { max-width: 1080px; margin: 0 auto; padding: 32px 24px 96px; }
h1 { font-size: 24px; font-weight: 500; letter-spacing: -.015em; line-height: 1.25; margin: 0 0 20px; }
h2 { font-size: 18px; font-weight: 500; line-height: 1.35; margin: 0 0 10px; }
h3 { font-size: 14px; font-weight: 500; }
.note { margin: 0; font-size: 13px; }
.note.bad, .err { color: var(--s-bad); }
.err { min-height: 1.2em; font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 0 0 auto; }
.row > .grow { flex: 1 1 auto; }
.row.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 8px; }
.grid { display: grid; grid-template-columns: 2fr 1fr; gap: 10px 24px; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- widgets: rounded, filled, no border, no shadow */
.card { --surface: var(--widget); background: var(--widget); border-radius: var(--r-widget); padding: 14px 16px; margin-bottom: 10px; }
.card h2 { font-size: 14px; font-weight: 500; }
.card.needs-you { box-shadow: inset 0 0 0 1px var(--red-ink); }
.widget-head { display: flex; align-items: center; gap: 10px; min-height: 24px; }
.widget-head > .fold-btn { flex: 1 1 auto; min-width: 0; }
button.fold-btn { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; cursor: pointer; width: 100%;
  min-height: 24px; border-radius: 4px; }
.widget-head button.fold-btn:hover { background: none; border: 0; color: inherit; }
.widget-head button.fold-btn:focus-visible { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--red-ink); }
.widget-title { font-size: 14px; font-weight: 500; color: var(--text); flex: 1 1 auto; min-width: 0; margin: 0; }
.widget-summary { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.widget-chevron { font-size: 11px; color: var(--faint); width: 10px; text-align: center; }
.card.folded:hover { background: var(--raised); --surface: var(--raised); }
.card.folded:hover .widget-chevron { color: var(--muted); }
.card > .widget-body { margin-top: 12px; }
.card.folded > .widget-body { display: none; }
/* empty: three faint unlinked ring nodes, a title and one line of help */
.empty { color: var(--muted); padding: 8px 0; font-size: 13px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 12px; text-align: center; }
.empty-state .rings { display: flex; gap: 22px; margin-bottom: 6px; }
.empty-state .rings span { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--faint); }
.empty-state .t { font-size: 14px; font-weight: 500; color: var(--text); }
.empty-state .h { font-size: 13px; color: var(--muted); max-width: 44ch; }
/* chips: labels that are not states */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.5; padding: 1px 8px;
  border-radius: var(--r-chip); background: var(--raised); color: var(--body); white-space: nowrap; }
/* a state word with its node before it (the word stays white) */
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text); white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
  border: 1.5px solid var(--c, var(--s-wait)); background: var(--surface); box-sizing: border-box; }
.pill.ok { --c: var(--s-good); } .pill.ok::before { background: var(--c); }
.pill.run { --c: var(--s-run); } .pill.run::before { background: var(--c); box-shadow: 0 0 0 3px var(--s-run-halo); }
.pill.warn { --c: var(--s-warn); } .pill.bad { --c: var(--s-bad); } .pill.muted { --c: var(--s-aside); color: var(--muted); }

/* ---------------------------------------------------------------- controls: radius 6, 32 tall (text boxes 38) */
button, .btn { min-height: 32px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 400 13px/1.3 var(--sans); border-radius: var(--r-control); border: 1px solid var(--red-ink); background: transparent;
  color: var(--text); cursor: pointer; text-decoration: none; }
/* red marks what you can touch (ADR-0192 #30): every button is a red outline, its hover a red wash */
button:hover, .btn:hover { border-color: var(--red-ink); background: var(--red-wash); color: var(--text); }
button:focus-visible, .btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--red-ink); }
button:disabled, .btn[aria-disabled="true"] { border-color: var(--control-disabled); color: var(--off); cursor: default; background: transparent; }
button.primary, .btn.primary { background: var(--red); border-color: var(--red); color: var(--on-red); font-weight: 500; }
button.primary:hover, .btn.primary:hover { background: var(--red-hover); border-color: var(--red-hover); color: var(--on-red); }
button.primary:disabled { background: var(--red-disabled-bg); border-color: var(--red-disabled-bg); color: var(--red-disabled-ink); }
button.quiet, .btn.quiet { border-color: transparent; color: var(--muted); padding: 0 10px; }
button.quiet:hover, .btn.quiet:hover { color: var(--text); background: var(--raised); border-color: transparent; }
button.danger, .btn.danger { border-color: var(--danger-border); color: var(--s-bad); background: transparent; }
button.danger:hover, .btn.danger:hover { border-color: var(--s-bad); background: var(--danger-hover-bg); color: var(--s-bad); }
button.amber, .btn.amber { border-color: var(--s-warn); color: var(--s-warn); background: transparent; }   /* "I messed up" */
button.amber:hover, .btn.amber:hover { border-color: var(--s-warn); background: color-mix(in srgb, var(--s-warn) 12%, transparent); color: var(--s-warn); }
button.linkish { background: none; border: 0; padding: 0; min-height: 0; color: var(--red-ink); font: inherit; border-radius: 2px; }
button.linkish:hover { background: none; color: var(--link-hover); }
:where(input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=color])), select, textarea {
  font: 14px var(--sans); color: var(--text); background: transparent; border: 1px solid var(--red-ink);
  border-radius: var(--r-control); padding: 0 12px; min-height: 38px; width: 100%; }
textarea { padding: 12px 14px; border-radius: var(--r-option); line-height: 1.6; min-height: 84px; field-sizing: content; max-height: var(--textarea-max); resize: vertical; }
input:hover, textarea:hover, select:hover { border-color: var(--red-link-hover); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--red-ink) !important; }
input:disabled, textarea:disabled, select:disabled { background: var(--input-disabled-bg); border-color: var(--control-disabled); color: var(--off); }
input::placeholder, textarea::placeholder { color: var(--faint); }
select { appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer; background-repeat: no-repeat;
  background-position: right 12px center; background-size: 8px 5px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 5'%3E%3Cpath d='M0 0h8L4 5z' fill='%239d9ca3'/%3E%3C/svg%3E"); }
select option { background: var(--raised); color: var(--text); }
input[type=checkbox], input[type=radio] { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 0;
  flex: 0 0 16px; border: 1.5px solid var(--red-ink); background: transparent; cursor: pointer; vertical-align: -3px;
  border-radius: var(--r-check); display: inline-grid; place-content: center; }
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:checked { background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.4 2.4 4.6-5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; border-color: var(--red); }
input[type=radio]:checked { border-color: var(--red-ink); background: radial-gradient(circle, var(--red) 0 3.5px, transparent 4px); }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--red-ink); }
input[type=checkbox]:disabled, input[type=radio]:disabled { border-color: var(--control-disabled); cursor: default; }
/* a switch: <input type=checkbox class="toggle"> */
input[type=checkbox].toggle { width: 34px; height: 20px; flex-basis: 34px; border-radius: 10px; border: 0; background: var(--control);
  place-content: center start; padding: 0 3px; transition: background .15s; }
input[type=checkbox].toggle::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .15s; }
input[type=checkbox].toggle:checked { background: var(--red); }
input[type=checkbox].toggle:checked::before { background: var(--on-red); transform: translateX(14px); }
label:has(> input[type=checkbox], > input[type=radio]) { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
/* view switches are segmented and grey; they never use red */
.seg, .segmented { display: inline-flex; border: 1px solid var(--control); border-radius: var(--r-control); overflow: hidden; }
.seg button, .seg > a, .segmented > * { border: 0; border-radius: 0; background: transparent; padding: 5px 10px; min-height: 28px;
  font-size: 12px; color: var(--muted); }
.seg > :is(button, a) + :is(button, a), .segmented > * + * { border-left: 1px solid var(--control); }
.seg button:hover, .seg > a:hover { background: var(--raised); color: var(--text); border-color: var(--control); }
.seg > a { display: inline-flex; align-items: center; text-decoration: none; }
.seg button[aria-pressed="true"], .seg > .on, .segmented > .on { background: var(--raised); color: var(--text); }
.seg button:focus-visible { box-shadow: inset 0 0 0 1.5px var(--red-ink); }
#tk-states { max-width: 100%; overflow-x: auto; }   /* the ticket tabs scroll sideways on a phone, never clipped */
#tk-states button { white-space: nowrap; flex: none; }
/* page tabs: the active one gets a small red node, not an underline */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--hairline); margin-bottom: 24px; flex-wrap: wrap; }
.tabs button { border: 0; border-radius: 0; background: transparent; padding: 12px 0; min-height: 44px; color: var(--muted); gap: 7px; }
.tabs button:hover { background: transparent; color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.tabs button:focus-visible { box-shadow: inset 0 -1.5px 0 var(--red-ink); }

/* ---------------------------------------------------------------- nodes: shape = who does the work, colour = state */
.node { --c: var(--s-wait); width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--c); background: var(--surface);
  color: var(--c); font: 500 8px/1 var(--sans); display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; box-sizing: border-box; }
.node.sm { width: 12px; height: 12px; font-size: 7px; } .node.lg { width: 16px; height: 16px; font-size: 9px; }
.node.xl { width: 22px; height: 22px; font-size: 12px; }
.node.fill { background: var(--c); }
.node.running { --c: var(--s-run); background: var(--c); box-shadow: 0 0 0 4px var(--s-run-halo); }
.node.done { --c: var(--s-good); background: var(--c); }
.node.wait, .node.paused { --c: var(--s-wait); } .node.stuck, .node.question { --c: var(--s-warn); }
.node.failed { --c: var(--s-bad); } .node.aside { --c: var(--s-aside); } .node.aiyo { --c: var(--s-run); }
.node.person { --c: var(--s-person); }
.node.coordinator { border-radius: 4px; }
.node.planner { border-radius: 2px; transform: rotate(45deg) scale(.86); }
.node.planner > * { transform: rotate(-45deg); }
.node.outside { border-style: dashed; }
.node.tri { border: 0; background: none; width: auto; min-width: 14px; font-size: 13px; }  /* a person: △ waiting, ▲ active */
.node.selected { box-shadow: 0 0 0 4px var(--surface), 0 0 0 5.5px var(--red-ink); }
.edge { stroke: var(--edge); stroke-width: 1; fill: none; } .edge.path { stroke: var(--red-ink); stroke-width: 1.5; }
.glabel { background: var(--surface); padding: 1px 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* the thread spine */
.spine { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 18px; }
.spine::before { content: ""; position: absolute; left: 10.5px; top: 0; bottom: 0; width: 1px; background: var(--edge); }
/* option cards (answers, choices) */
.option { background: var(--widget); border-radius: var(--r-option); padding: 11px 14px; display: flex; align-items: center; gap: 12px; font-size: 14px; }
.option.selected { box-shadow: inset 0 0 0 1px var(--red-ink); }
.option.own-words { background: transparent; border: 1px dashed var(--control); color: var(--faint); }

/* ---------------------------------------------------------------- lists and tables */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 0; border-top: 1px solid var(--row); }
.list li:first-child { border-top: 0; }
.projects a.proj { display: block; text-decoration: none; color: inherit; }
.projects a.proj:hover .name { color: var(--text); text-decoration: underline; text-decoration-color: var(--control-hover); }
.name { font-weight: 500; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.checks { font-size: 12px; color: var(--muted); }
.report { white-space: pre-wrap; }
table.files { width: 100%; border-collapse: collapse; }
table.files td { padding: 8px 4px; border-top: 1px solid var(--row); }
.spend { font-family: var(--mono); font-size: 12px; }
#another { margin: 4px 0 12px; }
.keyline { margin: -4px 0 12px; }

/* ---------------------------------------------------------------- a conversation: yours on the right, AIYO's full width with its orb */
.chat { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.msg { position: relative; padding: 0; white-space: pre-wrap; color: var(--body); align-self: stretch; }
.msg.me { color: var(--text); }
.ps-who { display: flex; align-items: center; gap: 8px; }
.q { border-left: 1px solid var(--edge); padding-left: 12px; }

/* ---------------------------------------------------------------- the bench's orb, with the live network inside (bench only, ADR-0229) */
.helper-orb { position: fixed; right: 16px; bottom: 112px; z-index: 20; width: 28px; height: 28px; min-height: 0; padding: 0; touch-action: none;
  border-radius: 50%; background: var(--ground); border: 0; overflow: hidden;   /* the theme's own ground and nodes (ADR-0194) */
  box-shadow: 0 0 0 1.5px var(--red-ink), 0 8px 24px var(--shadow); }
.helper-orb:hover { background: var(--ground); box-shadow: 0 0 0 1.5px var(--red-hover), 0 8px 24px var(--shadow); }
.helper-orb:focus-visible { box-shadow: 0 0 0 1.5px var(--red-ink), 0 0 0 4px var(--ground), 0 0 0 5.5px var(--red-ink); }
.helper-orb canvas { width: 100%; height: 100%; display: block; pointer-events: none; }
/* AIYO, the one orb at a conversation's bottom (always drifting; faster, in a pulse, while it works) */
.aiyo-presence { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--ground); overflow: hidden; display: block;
  box-shadow: 0 0 0 1.5px var(--red-ink); transition: box-shadow .3s; }
.aiyo-presence.working { box-shadow: 0 0 0 1.5px var(--red-ink), 0 0 10px 2px var(--red-ink); animation: aiyo-halo 1.2s ease-in-out infinite; }
/* the halo breathes with the network's pulse (PULSE_MS in app.js), in AIYO red so it shows on either theme */
@keyframes aiyo-halo {
  0%, 100% { box-shadow: 0 0 0 1.5px var(--red-ink), 0 0 2px 0 transparent; }
  50% { box-shadow: 0 0 0 1.5px var(--red-ink), 0 0 12px 4px var(--red-ink); }
}
/* a subagent at work (its Running now card's diamond) breathes with the orb (2026-11-16) */
.ac-card:not(.ac-ended) .ac-top .node.planner.running { animation: aiyo-halo 1.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .aiyo-presence.working, .ac-card .ac-top .node.planner.running { animation: none; } }
.aiyo-presence canvas { width: 100%; height: 100%; display: block; }
.bs-presence, .ps-presence { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.aiyo-clock { font-variant-numeric: tabular-nums; min-width: 3ch; }
.bs-doing { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-doing code { font-size: 12px; }

/* ---------------------------------------------------------------- live views (ADR-0094)
   Dark only. Colours by job: status steps are fixed (good / warning / serious / critical) and always carry a glyph and a
   word; in-progress work is the one categorical blue; magnitude is a single blue ramp, validated on the dark
   surface (dataviz validator, #141417). Text stays in ink tokens. */
.viz {
  --v-blue: #3987e5; --v-orange: #d95926; --v-aqua: #199e70;
  --v-good: #0ca30c; --v-warn: #fab219; --v-serious: #ec835a; --v-crit: #d03b3b; --v-gray: #898781;
  --v-edge: #3a3a40; --v-grid: #26262b; --v-glyph: #ffffff; --v-glyph-dark: #0b0b0b;
  --v-s1: #184f95; --v-s2: #256abf; --v-s3: #3987e5; --v-s4: #6da7ec; --v-s5: #b7d3f6;
}
.viz-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.viz-bar label { display: flex; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); }
.viz-bar select { width: auto; padding: 5px 8px; }
.viz-scroll { position: relative; overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); }
.viz svg { display: block; }
.viz text { fill: var(--ink); font-size: 12px; font-family: inherit; }
.viz text.sub { fill: var(--muted); }
.viz .edge { fill: none; stroke: var(--v-edge); stroke-width: 1.5; }
.viz .dep { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 3; }
/* the task graph's links in the logo's red (ADR-0099 am. 1); the plan tree keeps its grey */
.viz .edge.tg { stroke: var(--red); stroke-opacity: .75; }
.viz .dep.tg { stroke: var(--red); stroke-opacity: .9; }
.viz .arrow.tg { fill: var(--red); }
.viz .arrow { fill: var(--muted); }
.viz .mark { stroke: var(--panel); stroke-width: 2; }
.viz .n { cursor: default; outline: none; }
.viz .n:hover .mark, .viz .n:focus .mark, .viz .n.on .mark { stroke: var(--ink); stroke-width: 2; }
.viz .hit { fill: transparent; stroke: none; }
.viz .glyph { fill: none; stroke: var(--v-glyph); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.viz .glyph.dark { stroke: var(--v-glyph-dark); }
.viz .glyph-t { fill: var(--v-glyph-dark); font-size: 10px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.viz .c-blue { fill: var(--v-blue); } .viz .c-good { fill: var(--v-good); } .viz .c-warn { fill: var(--v-warn); }
.viz .c-serious { fill: var(--v-serious); } .viz .c-crit { fill: var(--v-crit); } .viz .c-gray { fill: var(--v-gray); }
.viz .c-s1 { fill: var(--v-s1); } .viz .c-s2 { fill: var(--v-s2); } .viz .c-s3 { fill: var(--v-s3); }
.viz .c-s4 { fill: var(--v-s4); } .viz .c-s5 { fill: var(--v-s5); }
.viz .c-hollow { fill: var(--panel); stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 3 2; }
.viz .c-ring { fill: var(--panel); stroke: var(--v-blue); stroke-width: 2.5; }
.viz .glyph.blue { stroke: var(--v-blue); }
.viz .computing { fill: none; stroke: var(--v-blue); stroke-width: 1.5; stroke-dasharray: 2 2; }
.viz .grid { stroke: var(--v-grid); stroke-width: 1; }
.viz .now { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; }
.viz .allow { fill: none; stroke: var(--v-blue); stroke-width: 1.5; stroke-dasharray: 3 3; }
.viz .rowband { fill: var(--soft); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 13px;
  color: var(--ink); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend svg { flex: 0 0 auto; }
.legend .count { color: var(--muted); font-variant-numeric: tabular-nums; }
.legend.shapes { color: var(--muted); }
.tip { position: absolute; z-index: 3; pointer-events: none; background: var(--raised); color: var(--text);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; max-width: 320px; box-shadow: var(--overlay); }
.tip .t { font-weight: 500; margin-bottom: 4px; }
.tip dl { display: grid; grid-template-columns: auto 1fr; gap: 1px 10px; margin: 0; }
.tip dt { color: var(--muted); } .tip dd { margin: 0; font-variant-numeric: tabular-nums; }
.tip code { font-size: 12px; word-break: break-all; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; color: var(--muted); font-weight: 400; font-size: 13px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.data td { padding: 6px 8px; border-top: 1px solid var(--line); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
@media (max-width: 720px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.tile .k { font-size: 13px; color: var(--muted); }
.tile .v { font-size: 24px; font-weight: 600; }
.tile .v small { font-size: 14px; font-weight: 400; color: var(--muted); }
.meter { margin: 6px 0 14px; }
.meter .lab { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.meter svg { width: 100%; height: 14px; }
.meter .track { fill: var(--soft); stroke: var(--line); stroke-width: 1; }
@media (forced-colors: active) {
  .viz .mark { stroke: CanvasText; }
  .viz .glyph { stroke: CanvasText; }
}
.viz text.lab { paint-order: stroke; stroke: var(--panel); stroke-width: 4px; stroke-linejoin: round; }

.viz .c-orange { fill: var(--v-orange); } .viz .c-aqua { fill: var(--v-aqua); }
.viz .glyph-l { fill: var(--v-glyph); font-size: 9px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.viz .glyph-l.dark { fill: var(--v-glyph-dark); }
.viz .halo { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: 0; }
.viz .fresh .halo, .viz .moved .halo { animation: halo 2.4s ease-out 1; }
@keyframes halo { 0% { opacity: .9; } 100% { opacity: 0; } }
.viz .notedot { fill: var(--ink); stroke: var(--panel); stroke-width: 1.5; }
@media (prefers-reduced-motion: reduce) { .viz .fresh .halo, .viz .moved .halo { animation: none; opacity: .6; } .activity .spin { animation: none; } }

/* ---------------------------------------------------------------- planning: the conversation beside its tree */
body.wide main { max-width: 1440px; }
.plan-side h3 { font-size: 14px; margin: 0; }
.plan-side .framing { font-size: 14px; color: var(--body); border-left: 1px solid var(--edge);
  padding: 4px 12px; margin: 8px 0; white-space: pre-wrap; }

/* ---------------------------------------------------------------- what the model is doing */
.activity { align-self: flex-start; font-size: 14px; color: var(--muted); padding: 4px 2px; }
.activity .step { display: flex; align-items: center; gap: 8px; }
.activity .step.done { font-size: 13px; }
.activity .tick { color: var(--ok); width: 12px; text-align: center; }
.activity .secs { font-variant-numeric: tabular-nums; }
.activity .spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent);
  animation: spin .9s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.steps { align-self: flex-start; font-size: 12px; color: var(--muted); margin: 0 0 -4px 2px; }

/* ---------------------------------------------------------------- tools and keys in a conversation (ADR-0095) */
.offer, .keybox { align-self: stretch; border-radius: var(--r-option); padding: 12px 14px; background: var(--raised); --surface: var(--raised); }
.offer > * + *, .keybox > * + * { margin-top: 6px; }
.offer-t { font-weight: 500; }
.lookup { font-size: 13px; color: var(--muted); }
.lookup summary { cursor: pointer; }
.lookup .note { margin-top: 4px; color: var(--ink); }

/* People's tasks (ADR-0096) */
.recv .tick { display: inline-block; width: 1.4em; color: var(--muted); font-weight: 700; }
.recv .tick.yes { color: var(--ok); }
code.inbox { display: block; padding: 6px 8px; background: var(--soft); border-radius: 6px; word-break: break-all; }
.viz .mark.hollow { fill: var(--panel); stroke-width: 2; }
.viz .mark.s-blue { stroke: var(--v-blue); } .viz .mark.s-orange { stroke: var(--v-orange); }
.viz .mark.s-aqua { stroke: var(--v-aqua); }
.viz .mark.crit { stroke: var(--ink); stroke-width: 2.5; }
.viz line.target { stroke: var(--v-warn); stroke-width: 1.5; stroke-dasharray: 5 3; }
.viz line.milestone { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 1 3; }
#t-count:not(:empty) { margin-left: 4px; font-size: 12px; color: var(--muted); }
.task-late .row { flex-wrap: wrap; }
.task-late .row > input { flex: 1 1 140px; min-width: 0; width: auto; }
.task-late .row > button { flex: 0 0 auto; }

/* People's work beyond the bench (ADR-0097) */
pre.result { white-space: pre-wrap; word-break: break-word; background: var(--soft); border-radius: 6px; padding: 8px 10px;
  margin: 0; font-size: 13px; max-height: 360px; overflow: auto; }
img.plot { max-width: 100%; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); }
code.inbox { white-space: pre-wrap; }
input.short { width: 90px; flex: 0 0 auto; }
.diff { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line);
  border-radius: 8px; overflow: auto; max-height: 70vh; background: var(--panel); }
.diff .dl { display: flex; white-space: pre; min-width: max-content; }
.diff .dl .ln { flex: 0 0 48px; text-align: right; padding-right: 8px; color: var(--muted); user-select: none; }
.diff .dl .code { padding-right: 12px; }
.diff .dl.add { background: var(--diff-add); }
.diff .dl.del { background: var(--diff-del); }
.diff .dl.file { font-weight: 700; background: var(--soft); padding-top: 4px; }
.diff .dl.hunk, .diff .dl.meta { color: var(--muted); }
.diff .dl[tabindex]:hover, .diff .dl[tabindex]:focus-visible { outline: 1px solid var(--accent); cursor: pointer; }
.row > input.short { flex: 0 0 90px; width: 90px; min-width: 0; }
.row > input.grow { width: auto; min-width: 0; flex: 1 1 120px; }
/* `aiyo playground` */
select.play-as { width: auto; max-width: 300px; min-height: 30px; font-size: 13px; }
header.top label.who { gap: 6px; font-size: 13px; color: var(--muted); }
ol.tut { margin: 0; padding-left: 20px; } ol.tut li + li { margin-top: 3px; }

/* Markdown in agents' replies (ADR-0099) */
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md pre, .md blockquote, .md .md-table { margin: 0 0 8px; }
.md ul, .md ol { padding-left: 20px; } .md li + li { margin-top: 2px; }
.md h3, .md h4, .md h5, .md h6 { margin: 10px 0 6px; font-size: 14px; }
.md code { font-family: var(--mono); font-size: 12px; background: var(--soft);
  padding: 1px 4px; border-radius: 4px; }
.md pre { background: var(--soft); padding: 8px 10px; border-radius: 6px; overflow: auto; }
.md pre code { background: none; padding: 0; }
.md blockquote { border-left: 3px solid var(--line); padding-left: 10px; color: var(--muted); }
.md .md-table { overflow-x: auto; } .md table.data { font-size: 13px; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.viz .selring { fill: none; stroke: var(--accent); stroke-width: 2.5; }

/* Tasks tab: the schedule on top, cards beside the graph */
.sched-card { margin-bottom: 14px; }
.graph-scroll { max-height: 72vh; }

/* Compute: one card per resource */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 16px; }
.rcard { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.rhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.rstat { font-size: 12px; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--line); white-space: nowrap; }
.rstat.online { color: var(--ok); border-color: var(--ok); } .rstat.degraded { color: var(--warn); border-color: var(--warn); }
.rstat.offline { color: var(--bad); border-color: var(--bad); } .rstat.unknown { color: var(--muted); }
.rmeter-l { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.rbar { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.rbar-f { height: 100%; background: var(--v-blue); border-radius: 4px; }
.rbar-f.warm { background: var(--warn); } .rbar-f.hot { background: var(--bad); }
.rjobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.rjob { background: var(--soft); border-radius: 6px; padding: 6px 8px; font-size: 12px; color: var(--muted); }
.rjob b { display: block; font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.rjob.failed b, .rjob.killed b, .rjob.timed_out b, .rjob.out_of_memory b { color: var(--bad); }
.ralert { font-size: 13px; color: var(--warn); }

/* Tools: the whole catalog */
.catalog-list { max-height: 60vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.catalog-list .crow { display: grid; grid-template-columns: minmax(180px, 1.2fr) 3fr auto; gap: 10px; padding: 7px 10px;
  border-bottom: 1px solid var(--line); font-size: 13px; align-items: center; }
.catalog-list .crow:last-child { border-bottom: 0; }
.catalog-list .cname { font-weight: 600; word-break: break-word; }

/* Files beside the CodeGraph */
.files-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }  /* ADR-0152 D3 am.: the files and the graph side by side, half each */

.files-grid.reading { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.files-grid.reading > .files-list { display: none; }
.files-narrow { table-layout: fixed; width: 100%; }
.files-narrow th:nth-child(1), .files-narrow td:nth-child(1) { width: auto; }
.files-narrow th:nth-child(2), .files-narrow td:nth-child(2) { width: 110px; }
.files-narrow th:nth-child(3), .files-narrow td:nth-child(3) { width: 64px; text-align: right; white-space: nowrap; }
.files-list .who-dot .dot { margin-right: 6px; }
.files-list .who-dot { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.files-list #changes-card { margin-top: 16px; }
.files-grid .cg-card { --surface: var(--widget); }
.files-grid .cg-scroll { height: max(460px, 68vh); }
@media (max-width: 700px) { .files-grid, .files-grid.reading { grid-template-columns: minmax(0, 1fr); } }
.cg-card { background: var(--ground); }
.cg-scroll { background: var(--ground); border-color: var(--hairline); height: 62vh; max-height: none; }
.viz .cg-edge { stroke: var(--red); stroke-opacity: .38; stroke-width: calc(.8px * var(--u, 1)); fill: none; }
.viz .cg-edge.w2 { stroke-width: calc(1.4px * var(--u, 1)); } .viz .cg-edge.w3 { stroke-width: calc(2.2px * var(--u, 1)); }
.viz .cg-node { stroke: var(--ground); stroke-width: calc(.8px * var(--u, 1)); cursor: pointer; }
.viz .cg-node.on { stroke: var(--text); stroke-width: calc(2px * var(--u, 1)); }
.viz .cg-dim { opacity: .18; }
.viz .cg-node.cg-hollow { stroke: var(--muted); stroke-width: calc(1.2px * var(--u, 1)); }
.viz .cg-node:focus { outline: none; stroke: var(--text); stroke-width: calc(2px * var(--u, 1)); }
.cg-scroll svg { cursor: grab; touch-action: none; }
.viz .cg-group { stroke: var(--ground); }
.viz .cg-edge.cg-contains { stroke: var(--v-gray); stroke-dasharray: 3 2; }
.viz .cg-node.picked { stroke: var(--text); stroke-width: calc(3px * var(--u, 1)); }
.viz text.cg-label { fill: var(--text); text-anchor: middle; pointer-events: none; font-size: calc(11px * var(--u, 1)); paint-order: stroke; stroke: var(--ground); stroke-width: calc(3px * var(--u, 1)); }
.cg-crumbs { font-size: 13px; margin-bottom: 8px; min-height: 20px; }
pre.code { position: relative; margin: 0; max-height: 64vh; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 0; font: 12px/1.6 var(--mono); white-space: pre; tab-size: 4; }
pre.code .ln { display: block; padding: 0 12px 0 0; }
pre.code .no { display: inline-block; width: 4.5em; padding-right: 12px; text-align: right; color: var(--muted); user-select: none; }
pre.code .ln.hl { background: var(--code-hl); box-shadow: 3px 0 0 var(--accent) inset; }
.cg-leg { cursor: pointer; border-radius: 6px; padding: 1px 6px; }
.cg-leg:hover, .cg-leg:focus-visible { background: var(--soft); outline: none; }
.cg-leg.sel { background: var(--soft); box-shadow: 0 0 0 1px var(--ink) inset; }
.msg .md { white-space: normal; }

#file-view .fv-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#file-view .fv-head b { flex: 1 1 100%; word-break: break-all; }
.row > select { width: auto; flex: 0 0 auto; }

/* Landing page: your tasks as a list, a board or a schedule (ADR-0099) */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.bcol { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px; min-height: 120px; display: flex; flex-direction: column; gap: 8px; }
.bcol h3 { margin: 0 0 2px; font-size: 13px; }
.bcol.offered h3 { color: var(--warn); } .bcol.stuck h3 { color: var(--bad); } .bcol.done h3 { color: var(--ok); }
a.bcard { display: block; margin: 0; padding: 8px 10px; text-decoration: none; color: var(--ink); }
a.bcard:hover, a.bcard:focus-visible { border-color: var(--muted); }
a.bcard .name { font-size: 13px; font-weight: 600; }

/* the setup checklist (ADR-0099) */
ul.setup { margin-top: 6px; }
.setup-i { display: flex; gap: 10px; align-items: flex-start; }
.setup-i .sg { width: 16px; flex: 0 0 16px; text-align: center; margin-top: 2px; }
.setup-i .sg.ok { color: var(--ok); } .setup-i .sg.warn { color: var(--warn); } .setup-i .sg.muted { color: var(--muted); }
.setup-i.done .note:last-child { display: none; }
.setup-i.not_available { opacity: .75; }
dl.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; }
td.warn { color: var(--warn); } td.bad { color: var(--bad); }

/* loading: the logo's network, alive (ADR-0099 am. 1) */
.aiyo-loading-host { position: relative; min-height: 140px; }
.aiyo-loading { position: absolute; inset: 0; z-index: 4; background: var(--ground); border-radius: inherit; overflow: hidden;
  transition: opacity .25s ease; min-height: 120px; }
.aiyo-loading.full { position: fixed; z-index: 50; border-radius: 0; }
.aiyo-loading canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.aiyo-loading.done { opacity: 0; pointer-events: none; }
.aiyo-loading-mark { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 300 34px/1 var(--mono);
  color: var(--red-ink); border: 1.5px solid var(--red-ink); padding: .19em .62em .4em; background: var(--ground); }
.rcard code, .setup-i code { font-family: var(--mono); font-size: 12px; background: var(--soft);
  padding: 1px 5px; border-radius: 4px; word-break: break-word; }
.setup-i ol { margin: 6px 0 0; padding-left: 20px; }
.card.flash { box-shadow: 0 0 0 2px var(--accent); transition: box-shadow .3s ease; }

.aiyo-loading-word { position: absolute; left: 50%; top: calc(50% + 44px); transform: translateX(-50%); color: var(--text);
  font-size: 13px; text-shadow: 0 0 10px var(--ground); white-space: nowrap; }
.aiyo-loading-word.says { white-space: normal; width: max-content; max-width: min(88vw, 560px); text-align: center; }
.aiyo-loading:not(.full) .aiyo-loading-word { top: auto; bottom: 10px; font-size: 12px; opacity: .85; }
.aiyo-loading-dots { display: inline-block; width: 1.5em; text-align: left; }

/* the setup pop-ups (ADR-0099 am. 2) */
dialog.setup-pop { --surface: var(--widget); max-width: 640px; width: calc(100vw - 32px); max-height: 86vh; overflow: auto; background: var(--widget);
  color: var(--text); border: 0; border-radius: var(--r-widget); padding: 18px 20px; box-shadow: var(--overlay); }
dialog.setup-pop::backdrop { background: var(--scrim); }
dialog.setup-pop h2 { margin: 0; }
/* the new git token, shown once until closed (ADR-0195 decision 1) */
dialog.token-pop { max-width: 560px; display: none; }
dialog.token-pop[open] { display: flex; flex-direction: column; gap: 12px; }
dialog.token-pop .token-row { flex-wrap: nowrap; gap: 8px; }
dialog.token-pop .token-in { flex: 1 1 auto; min-width: 0; width: auto; font-family: var(--mono, monospace); font-size: 13px; }
.grid.narrow-right { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
ol.steps li { margin-bottom: 8px; }
.catalog-list.tall { max-height: 70vh; }
.fb-text { white-space: pre-wrap; }
/* the AIYO team's tickets and fault board (ADR-0185) */
.nav-badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--red); color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.tk-filters { gap: 16px; margin: 4px 0 12px; }
.tk-filters select { width: auto; }
.ptable.tk .ptr:not(.pth) { cursor: pointer; }
.ptable.tk .ptr > [role="cell"], .ptable.ft .ptr > [role="cell"] { min-width: 0; overflow: hidden; }
.ptable.tk .ptr .ellipsis, .ptable.ft .ptr .ellipsis { display: block; }
.ptable.adm.tk .ptr { grid-template-columns: 20px 16px 40px minmax(0, 2fr) minmax(0, 1fr) minmax(0, 110px) minmax(0, 1fr) 96px; }
.ptable.adm.ft .ptr { grid-template-columns: minmax(0, 2fr) 56px minmax(0, 1fr) 96px 96px 110px; }
@media (max-width: 700px) { .ptable.adm.tk .ptr { grid-template-columns: 20px 16px auto minmax(0, 1fr); gap: 2px 12px; }
  .ptable.adm.tk .ptr > :nth-child(3) { grid-column: 3; } .ptable.adm.tk .ptr > :nth-child(4) { grid-column: 4; }
  .ptable.adm.tk .ptr > :nth-child(n+5) { grid-column: 3 / -1; }
  .ptable.adm.ft .ptr { grid-template-columns: minmax(0, 1fr) 48px; } .ptable.adm.ft .ptr > :nth-child(n+3) { grid-column: 1 / -1; }
  .ptable.adm.tk .pth, .ptable.adm.ft .pth { display: none; } }
.ptable.tk .ptr.on { background: var(--raised); }
.ptable.tk .tk-num { font-variant-numeric: tabular-nums; }
.ptable.tk .tk-pick { margin: 0; width: 16px; height: 16px; }
.tk-merge { gap: 12px; padding: 10px 12px; margin: 0 0 8px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--raised); }
.tk-merge select { width: auto; max-width: 100%; }
.tk-merge > .muted { flex: 1 1 260px; min-width: 0; white-space: normal; }
.tk-merged ul { margin: 4px 0 0; padding-left: 18px; }
.tk-merged h3 { margin: 0; }
.tk-shot { max-width: 100%; max-height: 360px; border-radius: var(--r-control); border: 1px solid var(--line); }
.tk-hist { margin: 0; padding-left: 18px; }
/* a ticket's thread (ADR-0239 decision 3): which ticket, whose thread */
.tk-thread-head { padding: 8px 16px; border-bottom: 1px solid var(--hairline); display: flex; gap: 10px; align-items: center; min-width: 0; }
.tk-thread-head > a { white-space: nowrap; }
.tk-thread-head .tk-num { color: var(--faint); font-family: var(--mono); font-weight: 400; font-size: 13px; }
.tk-thread-head .tk-title { min-width: 0; font-weight: 600; }
.tk-thread-head .tk-state { white-space: nowrap; }
.tk-here { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
@media (max-width: 640px) { .tk-thread-head { flex-wrap: wrap; } .tk-here { display: none; } }
/* the team's Design section (ADR-0239 decision 21): rows to read, not buttons */
.dz-hit { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--hairline); border-radius: 0;
  background: none; padding: 8px 2px; font: inherit; color: inherit; cursor: pointer; min-height: 0; overflow-wrap: anywhere; }
.dz-hit:hover b, .dz-hit:focus-visible b { text-decoration: underline; }
#dz-doc { overflow-wrap: anywhere; min-width: 0; }
#dz-doc pre, #dz-doc .md-table { max-width: 100%; overflow-x: auto; }
#dz-list { min-width: 0; }
.tk-hist li { margin: 2px 0; }
.ft-detail { font-family: var(--mono, monospace); font-size: 12px; }
.ft-limit-in { width: 7em; }
/* planning together takes the page (ADR-0099 am. 2) */

details.person { border-bottom: 1px solid var(--line); padding: 8px 0; }
details.person > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
details.person > summary::-webkit-details-marker { display: none; }
details.person .roles { margin: 8px 0 4px 12px; }
.role-row select { width: auto; }
dialog.danger-pop { box-shadow: var(--overlay), inset 0 0 0 1px var(--danger-border); }
#fb-kind label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin-right: 14px; }
#fb-kind input { width: auto; margin: 0; }

/* ---------------------------------------------------------------- foundation fit-ups (ADR-0099 am. 4) */
.row > select, .viz-bar select, .row > input.short { min-height: 32px; }
header.top .who, header.top label.who { white-space: nowrap; }
/* the project's sidebar is its conversation: the orb only shows when that is folded away */
/* narrow screens until the phone layout: the site tabs take their own scrolling row */
@media (max-width: 900px) {
  header.top { flex-wrap: wrap; height: auto; min-height: 52px; gap: 0 16px; padding: 8px 16px 0; }
  header.top nav.sitetabs { order: 10; flex: 1 0 100%; overflow-x: auto; white-space: nowrap; gap: 20px; padding-bottom: 4px;
    scrollbar-width: none; }
  header.top nav.sitetabs a { min-height: 44px; }
  main { padding: 24px 16px 96px; }
}
@media (max-width: 480px), (pointer: coarse) {
  button, .btn { min-height: 44px; font-size: 15px; border-radius: 8px; }
  .seg button, .tabs button { min-height: 44px; }
  button.linkish { min-height: 0; }
  header.top select.play-as { min-height: 36px; }
}

/* ================================================================ phase 2 pages (ADR-0099 am. 4) */
.node.todo { --c: var(--s-person); }
.small { font-size: 12px; }
/* a main column beside a right panel of widgets, split by a hairline */
.page-split { display: grid; grid-template-columns: minmax(0, 1fr) 400px; min-height: calc(100vh - 52px); }
.page-split.wide-side { grid-template-columns: minmax(0, 1fr) 420px; }
main.page-main { max-width: none; margin: 0; padding: 36px 48px 96px; border-right: 1px solid var(--hairline); min-width: 0;
  display: flex; flex-direction: column; gap: 32px; }
.page-side { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.page-side .card { margin: 0; }
main.page-plain { max-width: none; margin: 0; padding: 36px 48px 96px; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 900px) {
  .page-split, .page-split.wide-side { grid-template-columns: minmax(0, 1fr); }
  main.page-main { border-right: 0; padding: 24px 16px 32px; }
  .page-side { border-top: 1px solid var(--hairline); padding: 16px 16px 96px; }
  main.page-plain { padding: 24px 16px 96px; }
}
.page-head { display: flex; flex-direction: column; gap: 6px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 0; color: var(--muted); font-size: 14px; }
/* a section: its title, a count, then its controls */
.sec { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sec-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.sec-head h1, .sec-head h2 { margin: 0; }
.sec-head .count { font-family: var(--mono); font-size: 13px; color: var(--muted); align-self: baseline; }
.sec-head .count.person { color: var(--s-person); }
.sec-head h1 + .count { margin-left: -2px; }
.sec-head .grow { flex: 1 1 auto; }
.sec-head select { width: auto; min-height: 32px; font-size: 13px; }
/* For you: one widget row per item */
.fy { display: flex; flex-direction: column; gap: 8px; }
.fy > .card { margin: 0; }
a.fy-row { display: flex; align-items: center; gap: 14px; background: var(--widget); --surface: var(--widget); border-radius: var(--r-widget);
  padding: 14px 16px; color: var(--text); }
a.fy-row:hover { background: var(--raised); --surface: var(--raised); color: var(--text); }
a.fy-row:focus-visible { box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--red-ink); border-radius: var(--r-widget); }
.fy-text { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
.fy-title { font-size: 14px; }
.fy-sub { font-size: 12px; color: var(--muted); }
a.fy-row .btn { pointer-events: none; min-height: 30px; }
/* Your projects: a table of rows */
.ptable { display: flex; flex-direction: column; }
.ptr { display: grid; grid-template-columns: 16px minmax(0, 1fr) minmax(0, 300px); gap: 16px; align-items: center; padding: 13px 16px;
  border-top: 1px solid var(--row); color: var(--text); --surface: var(--ground); }
.ptr.pth { border-top: 0; padding: 0 16px 6px; font-size: 12px; color: var(--faint); }
a.ptr:hover { background: var(--widget); --surface: var(--widget); color: var(--text); }
a.ptr:focus-visible { box-shadow: inset 0 0 0 1.5px var(--red-ink); border-radius: 0; }
.pcell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pname { font-size: 14px; }
.pnow { font-size: 13px; }
.psub { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.psub.ellipsis { display: block; }
@media (max-width: 700px) { .ptr { grid-template-columns: 16px minmax(0, 1fr); } .ptr > :nth-child(3) { grid-column: 2; } }
/* Finish setting up: a line of nodes, then the open items */
.nodeline { display: flex; align-items: center; }
.nodeline .nl-edge { flex: 1; height: 1px; background: var(--edge); }
button.setup-row { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; font-size: 13px; width: 100%;
  cursor: pointer; padding: 2px 0; border-radius: 4px; min-height: 28px; }
button.setup-row:hover .grow { text-decoration: underline; text-decoration-color: var(--control-hover); }
button.setup-row:focus-visible { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--red-ink); }
button.setup-row .muted { font-size: 12px; }
/* Your computers */
.computers { display: flex; flex-direction: column; gap: 12px; }
.computers:empty { display: none; }
.comp { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.comp > .node { margin-top: 5px; }
.comp-t { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.comp-t .lk-say { font-size: 12px; color: var(--muted); }
.comp-t .row { flex-wrap: wrap; }
.lk-name { font-family: var(--mono); font-size: 12px; }
#clusters-card .widget-body > * + * { margin-top: 12px; }
/* Infra: a card per computer */
.res3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
@media (max-width: 1200px) { .res3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .res3 { grid-template-columns: minmax(0, 1fr); } }
.card.rc { margin: 0; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.lk-head { display: flex; align-items: center; gap: 10px; }
.card.rc .lk-head .node { width: 12px; height: 12px; }
.card.rc .lk-name { font-size: 14px; flex: 1; min-width: 0; }
.rc-name { font-size: 14px; flex: 1; min-width: 0; }
.lk-state { font-size: 12px; color: var(--muted); white-space: nowrap; }
.lk-host { margin-top: -4px; word-break: break-all; }
.lk-say { font-size: 13px; line-height: 1.5; color: var(--body); }
.lk-duo { display: flex; align-items: center; gap: 14px; }
.lk-timer { font: 300 28px/1 var(--mono); font-variant-numeric: tabular-nums; }
pre.lk-prompt { margin: 0; white-space: pre-wrap; }
.lk-form input { min-width: 0; }
.lk-form[hidden] { display: none; }
.meters { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; font-size: 13px; color: var(--muted); }
.meters .v { color: var(--text); text-align: right; }
.meters .v.warm { color: var(--s-warn); }
.bar { display: block; height: 3px; background: var(--raised); border-radius: 2px; overflow: hidden; }
.bar > span { display: block; height: 3px; width: 0; background: var(--s-run); border-radius: 2px; }
.bar.warm > span { background: var(--s-warn); }
.alert { display: flex; gap: 8px; align-items: flex-start; }
.alert .node { margin-top: 4px; }
.runs .ptr { grid-template-columns: 16px minmax(0, 1fr); }
/* Settings: a section nav beside the section */
.page-nav { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - 52px); }
.sec-nav { border-right: 1px solid var(--hairline); padding: 36px 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.sec-nav a { color: var(--muted); padding: 8px 10px 8px 24px; border-radius: var(--r-control); display: flex; align-items: center; gap: 8px; min-height: 36px; }
.sec-nav a:hover { color: var(--text); background: var(--widget); }
.sec-nav a.on { color: var(--text); background: var(--widget); padding-left: 10px; }
.sec-nav a.on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
main.page-sections { max-width: 956px; margin: 0; padding: 36px 48px 96px; }
.settings-sec { display: flex; flex-direction: column; gap: 12px; }
.settings-sec > h1, .settings-sec > .sec-head { margin: 0 0 10px; }
.settings-sec > .card { margin: 0; }
.widget-title { display: flex; align-items: center; gap: 12px; }
#key-card.needs-you .widget-title { font-size: 15px; }
#key-card .widget-body, #git-card .widget-body { padding-left: 26px; }
#key-box .offer, #git-box .offer { background: none; padding: 0; }
#key-box .offer-t, #git-box .offer-t { display: none; }
@media (max-width: 900px) {
  .page-nav { grid-template-columns: minmax(0, 1fr); }
  .admin, .page-nav { align-content: start; }   /* one column: rows keep their own height, never the screen's (ADR-0194) */
  .sec-nav { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--hairline); padding: 8px 16px; overflow-x: auto; align-items: center; height: auto; min-height: 0; position: static; }
  .sec-nav a { white-space: nowrap; padding-left: 10px; min-height: 44px; }
  main.page-sections { padding: 24px 16px 96px; }
  #key-card .widget-body, #git-card .widget-body { padding-left: 0; }
}
/* Feedback */
main.fb-main { padding: 48px 80px 96px; gap: 24px; }
.h-lg { font-size: 28px; }
.fb-form { display: flex; flex-direction: column; gap: 24px; max-width: 720px; }
.fb-group { display: flex; flex-direction: column; gap: 10px; }
.options4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1100px) { .options4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
label.option { padding: 12px 14px; gap: 10px; cursor: pointer; min-height: 44px; }
label.option:hover { background: var(--raised); }
label.option:has(input:checked) { box-shadow: inset 0 0 0 1px var(--red-ink); }
.option input[type=radio] { width: 12px; height: 12px; flex-basis: 12px; border-color: var(--s-wait); }
.option input[type=radio]:checked { background: var(--red); border-color: var(--red); }
#fb-text { min-height: 150px; font-size: 15px; padding: 14px 16px; }
.fb-where { gap: 8px; }
.fb-where input { flex: 1 1 240px; width: auto; min-height: 32px; font-size: 13px; }
.where-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--widget); border-radius: var(--r-control);
  padding: 2px 2px 2px 10px; box-shadow: inset 0 0 0 1px var(--edge); font-size: 12px; }
.where-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--s-run); }
button.chip-x { min-height: 28px; padding: 0 8px; border: 0; color: var(--faint); font-size: 12px; }
.fb-send { margin-top: 6px; }
/* a mini timeline: nodes on a thin spine */
.mini-spine { position: relative; display: flex; flex-direction: column; gap: 14px; }
.mini-spine::before { content: ""; position: absolute; left: 5.5px; top: 8px; bottom: 8px; width: 1px; background: var(--edge); }
.ms-item { position: relative; display: flex; gap: 14px; align-items: flex-start; }
.ms-item > .node { margin-top: 5px; }
.ms-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; font-size: 13px; }
.ms-body .row { align-items: flex-start; }
.mini-spine .empty-state { padding: 8px 0; }
.mini-spine:has(.empty-state)::before { display: none; }
@media (max-width: 900px) { main.fb-main { padding: 24px 16px 32px; } }
/* Signed out: the network behind one black card */
body.signed-out { min-height: 100vh; display: grid; place-items: center; overflow: hidden; }
body.signed-out canvas.bg { position: fixed; inset: 0; width: 100%; height: 100%; opacity: .55; }
.out-card { position: relative; width: min(440px, calc(100vw - 32px)); background: var(--ground); border: 1px solid var(--hairline);
  padding: 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.out-card h1 { margin: 8px 0 0; font-size: 22px; }
.out-card p { margin: 0; color: var(--muted); }
.out-card .btn.primary { min-height: 40px; padding: 0 18px; font-size: 14px; }
.out-card .small { color: var(--faint); }
.out-card canvas.out-live { width: 100%; aspect-ratio: 8 / 5; display: block; }
.out-card:has(canvas.out-live) { width: min(800px, calc(100vw - 32px)); }   /* the slide at twice the old card's width */
.out-card .out-mark, .out-card:has(canvas.out-live) .btn { align-self: center; }   /* the walk-through's first slide */
.sec-title { display: inline-flex; align-items: baseline; gap: 12px; }
.sec-title .count { align-self: auto; }
button.setup-row .grow { flex: 1 1 auto; }
#clusters-card .widget-body > a { font-size: 13px; }
label.option { white-space: nowrap; }
header.top .me button.quiet { white-space: nowrap; }
@media (max-width: 700px) { .ptr.pth { display: none; } }
@media (max-width: 480px) {
  header.top .who-l { display: none; }
  header.top select.play-as { max-width: 190px; }
  header.top .me { margin-left: auto; }
  .sec-head .seg { order: 5; }
}
.row > :where(input:not([type=checkbox], [type=radio], .short)) { flex: 1 1 auto; width: auto; min-width: 0; }
.comp-t .lk-timer { font-size: 20px; }
.comp.needs .lk-duo { gap: 10px; }
/* the board of your tasks: filled columns, plain headings (status stays on nodes) */
.bcol { background: var(--widget); --surface: var(--widget); border: 0; border-radius: var(--r-widget); padding: 12px; }
.bcol h3, .bcol.offered h3, .bcol.stuck h3, .bcol.done h3 { color: var(--text); font-size: 13px; font-weight: 500; }
.bcol h3 .count { font-family: var(--mono); font-size: 12px; }
.bcol a.bcard { background: var(--raised); border-radius: var(--r-option); }
.bcol a.bcard:hover { background: var(--control); }
.bcol a.bcard .name { font-weight: 500; }
/* the Timeline's "No date yet" strip: the Board's cards for what the chart can't draw (ADR-0213 decision 4) */
.mt-undated { background: var(--widget); --surface: var(--widget); border-radius: var(--r-widget); padding: 12px; margin-top: 14px;
  display: flex; flex-direction: column; gap: 8px; }
.mt-undated h3 { margin: 0; color: var(--text); font-size: 13px; font-weight: 500; }
.mt-undated h3 .count { font-family: var(--mono); font-size: 12px; }
.mt-undated p.note { margin: 0; }
.mt-undated .strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.mt-undated a.bcard { background: var(--raised); border-radius: var(--r-option); }
.mt-undated a.bcard:hover { background: var(--control); }
.mt-undated a.bcard .name { font-weight: 500; }
pre.lk-prompt { color: var(--body); font-size: 12px; }
/* Home's projects: a progress column (ADR-0099 am. 4 §9) */
.ptable:not(.runs):not(.adm) .ptr { grid-template-columns: 16px minmax(0, 1fr) minmax(0, 240px) 120px 104px; }
.bar.good > span { background: var(--s-good); } .bar.person > span { background: var(--s-person); }
.bar.bad > span { background: var(--s-bad); } .bar.wait > span { background: var(--s-wait); }
.pcell .bar { margin-bottom: 4px; }
@media (max-width: 700px) { .ptable:not(.runs):not(.adm) .ptr { grid-template-columns: 16px minmax(0, 1fr); } .ptable:not(.runs):not(.adm) .ptr > :nth-child(n+3) { grid-column: 2; } }

/* ================================================================ phase 3: the project page (ADR-0099 am. 4 §10) */
.proj-head { padding: 28px 32px 0; border-bottom: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 6px; }
.proj-crumb { font-size: 13px; color: var(--muted); }
.proj-crumb a { color: var(--muted); } .proj-crumb a:hover { color: var(--text); }
.proj-title-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.proj-title-row h1, .proj-id h1 { margin: 0; max-width: 70ch; }
.proj-state { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; white-space: nowrap; }
.proj-state .node { width: 16px; height: 16px; font-size: 9px; }
.proj-head .keyline { margin: 0; }
.proj-head .keyline:empty, .proj-head .err:empty { display: none; }
.proj-head .tabs { margin: 10px 0 0; border-bottom: 0; gap: 26px; }
.proj-head .tabs button { font-size: 13px; }
.proj-body { display: grid; grid-template-columns: minmax(0, 1fr); }
/* the project page fills the window below the header whatever the header and the project's head measure; it scrolls
   only when its content is longer (ticket 20: guessed offsets, 100vh - 200px and - 260px, left an outer scrollbar
   under short content, worst in planning and the thread with its composer at the bottom) */
body:has(> #layout.proj-layout) { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body:has(> #layout.proj-layout) > #layout { flex: 1 0 auto; display: flex; flex-direction: column; }
#layout.proj-layout > :not(.proj-body) { flex: none; }
#layout.proj-layout > .proj-body { flex: 1 0 auto; }
.proj-main:has(> .thread-panel:not(.hidden)) { display: flex; flex-direction: column; }
.proj-body.with-side { grid-template-columns: minmax(0, 1fr) 380px; }
.proj-body > .proj-side { display: none; }
.proj-body.with-side > .proj-side { display: flex; }
.proj-main { padding: 24px 32px 96px; min-width: 0; }
.proj-body.with-side > .proj-main { border-right: 1px solid var(--hairline); padding-bottom: 24px; }
.proj-side { flex-direction: column; gap: 10px; padding: 16px; min-width: 0; }
.proj-side .card { margin: 0; }
.proj-layout.planning .proj-body { grid-template-columns: minmax(0, 1fr); }
.proj-layout.planning .proj-side, .proj-layout.planning .thread-panel { display: none !important; }
@media (max-width: 1000px) {
  .proj-body.with-side { grid-template-columns: minmax(0, 1fr); }
  .proj-body.with-side > .proj-main { border-right: 0; }
  .proj-side { border-top: 1px solid var(--hairline); padding-bottom: 96px; }
  .proj-head { padding: 20px 16px 0; } .proj-main { padding: 20px 16px 32px; }
  .proj-head .tabs { flex-wrap: nowrap; overflow-x: auto; gap: 22px; scrollbar-width: none; }
  .proj-head .tabs button { white-space: nowrap; }
}
/* the timeline: one spine, a node per event, coloured by who did it */
.thread-panel { display: flex; flex-direction: column; }
.timeline { position: relative; display: flex; flex-direction: column; gap: 22px; max-width: 760px; }
.timeline:empty { display: none; }
#timeline::before, #talk-chat:not(:empty)::before { content: ""; position: absolute; left: 10.5px; top: 4px; bottom: 4px; width: 1px; background: var(--edge); }
#talk-chat { margin-top: 22px; }
.ev { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 18px; }
.ev-node { display: flex; justify-content: center; padding-top: 4px; position: relative; z-index: 1; }
.ev-node .node { width: 12px; height: 12px; }
.ev-node .node.xl { width: 22px; height: 22px; font-size: 12px; }
.ev-q .ev-node { padding-top: 0; }
.ev-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ev-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.ev-who { font-weight: 500; color: var(--text); }
.ev-text { color: var(--body); white-space: pre-wrap; }
.ev-text .md { white-space: normal; }
.ev-folded .ev-answer { font-size: 13px; color: var(--text); }
.q-text { font-size: 16px; line-height: 1.55; color: var(--text); }
.q-text .md p { margin: 0 0 6px; }
/* a question forks into its answer cards: a red trunk from the node, an elbow to the selected card */
.ev-q-wrap { display: flex; flex-direction: column; gap: 10px; }
.ev-q.needs::after { content: ""; position: absolute; left: 10.25px; top: 24px; bottom: var(--elbow, 40px); width: 1.5px; background: var(--red); }
.fork { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.fork > .option { position: relative; }
.fork > .option::before { content: ""; position: absolute; left: -29px; top: 50%; width: 29px; height: 1px; background: var(--control); }
.ev-q.needs .fork > .option.selected::before { height: 1.5px; background: var(--red); }
.fork > .option.own-words { padding: 4px; border-style: dashed; }
.ev-q.needs .fork > .option.own-words.selected { box-shadow: inset 0 0 0 1px var(--red-ink); border-color: transparent; }
.fork textarea { border: 0; min-height: 72px; background: transparent; }
.fork textarea:focus { border: 0 !important; }
.ev-acts > span { display: block; }
/* the composer: a hairline row at the bottom */
.composer-row { position: sticky; bottom: 0; margin: auto -32px -24px; padding: 10px 32px; border-top: 1px solid var(--hairline);
  background: var(--ground); display: flex; align-items: center; gap: 14px; }
.composer-row.hidden { display: none; }
.composer-row .node { width: 12px; height: 12px; background: transparent; border-color: var(--red-ink); }
.composer-row input { border: 0; padding: 0; min-height: 44px; flex: 1; }
.composer-row input:focus { border: 0 !important; }
.composer-row:focus-within { box-shadow: inset 0 1px 0 var(--red-ink); }
@media (max-width: 1000px) { .composer-row { margin: auto -16px -32px; padding: 8px 16px; } }
/* the right panel: For you and a mini spine of the plan */
.count-person { color: var(--s-person); }
.mini-plan { position: relative; display: flex; flex-direction: column; gap: 10px; }
.mini-plan::before { content: ""; position: absolute; left: 5.5px; top: 8px; bottom: 8px; width: 1px; background: var(--edge); }
.mp-row { position: relative; display: flex; align-items: center; gap: 12px; font-size: 13px; }
.mp-row.sub { padding-left: 22px; }
.mp-row .node { z-index: 1; }
.mp-row .node.tri { width: 12px; min-width: 12px; font-size: 11px; justify-content: center; background: var(--surface); }
#fy-list .setup-row { font-size: 13px; }
@media (max-width: 1000px) { .thread-panel { min-height: 0; } }
/* questions with choices (ADR-0145): cards in the fork, AIYO's suggestion picked, the elbow following the pick */
.fork > button.option { border: 0; min-height: 44px; padding: 11px 14px; justify-content: flex-start; text-align: left;
  font: 400 14px/1.4 var(--sans); color: var(--text); background: var(--widget); border-radius: var(--r-option); gap: 12px; width: 100%; }
.fork > button.option:hover { background: var(--raised); }
.fork > button.option:focus-visible { box-shadow: inset 0 0 0 1.5px var(--red-ink); }
.fork > button.option.selected { box-shadow: inset 0 0 0 1px var(--red-ink); }
.fork > .option.dim, .fork > button.option:disabled { background: var(--row); color: var(--muted); cursor: default; box-shadow: none; }
.opt-dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--s-wait); flex: 0 0 12px; box-sizing: border-box; }
.option.selected .opt-dot { background: var(--red); border-color: var(--red); }
.option.dim .opt-dot { border-color: var(--off); background: transparent; }
.ev-q:not(.needs) .fork > .option.selected { box-shadow: inset 0 0 0 1px var(--control-hover); }
.ev-q:not(.needs) .option.selected .opt-dot { background: var(--muted); border-color: var(--muted); }
.ev-q.needs .fork > .option::before { background: var(--control); }
.ev-q.needs .fork > .option.selected::before { height: 1.5px; background: var(--red); }
.ev-q.no-sel::after { display: none; }
.ev-q:not(.needs) .fork > .option::before { display: none; }
.why-card { background: var(--widget); border-radius: var(--r-option); padding: 10px 14px; font-size: 13px; color: var(--body); max-width: 680px; }
.plan-fork { margin-top: 0; }
.plan-fork > button.option::before { display: none; }
/* the plan's groups on the Thread */
.tg { display: flex; flex-direction: column; gap: 14px; }
button.tg-head { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 12px; gap: 18px;
  align-items: center; cursor: pointer; border-radius: 6px; min-height: 32px; }
button.tg-head .ev-node { padding-top: 0; }
button.tg-head:hover .tg-name { text-decoration: underline; text-decoration-color: var(--control-hover); }
button.tg-head:focus-visible { box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--red-ink); }
.tg-title { display: flex; flex-direction: column; min-width: 0; }
.tg-name { font-size: 14px; font-weight: 500; color: var(--text); }
.tg-body { position: relative; display: flex; flex-direction: column; gap: 16px; margin-left: 40px; }
.tg-body::before { content: ""; position: absolute; left: 10.5px; top: -6px; bottom: 4px; width: 1px; background: var(--edge); }
.ev.routine .ev-text { color: var(--muted); font-size: 13px; }
.ev.routine .ev-node .node { width: 8px; height: 8px; }
.tiny-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--off); margin-top: 7px; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--widget); border-radius: var(--r-chip);
  padding: 4px 10px; font: 12px var(--mono); color: var(--body); }
.file-chip .dot { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--muted); }
.ev.pending { opacity: .6; }

/* ================================================================ phase 4: the plan graph (ADR-0099 am. 4 §11) */
/* the views' palette is the 1d status set; magnitudes keep their blue ramp */
.viz { --v-blue: var(--s-run); --v-good: var(--s-good); --v-warn: var(--s-warn); --v-crit: var(--s-bad); --v-gray: var(--s-aside);
  --v-orange: var(--s-person); --v-serious: var(--s-warn); --v-edge: var(--edge); --v-grid: var(--row); }
/* filled means done or running; a ring means not happening yet, filled with the surface so edges never show through */
.viz .mark { stroke: var(--surface); stroke-width: 1.5; }
.viz .mark.c-hollow, .viz .mark.c-ring { fill: var(--surface); stroke: var(--s-wait); stroke-width: 1.5; stroke-dasharray: none; }
.viz .mark.c-warn { fill: var(--surface); stroke: var(--s-warn); }
.viz .mark.c-crit { fill: var(--surface); stroke: var(--s-bad); }
.viz .mark.c-gray { fill: var(--surface); stroke: var(--s-aside); }
.viz .mark.c-person { fill: var(--surface); stroke: var(--s-person); }
.viz .mark.c-good { fill: var(--s-good); stroke: var(--s-good); }
.viz .mark.c-blue { fill: var(--s-run); stroke: var(--s-run); }
.viz g.st-c-warn .glyph { stroke: var(--s-warn); } .viz g.st-c-crit .glyph { stroke: var(--s-bad); }
.viz g.st-c-gray .glyph { stroke: var(--s-aside); } .viz g.st-c-ring .glyph, .viz g.st-c-ring .glyph.blue { stroke: var(--s-wait); }
.viz g.st-c-warn .glyph-t { fill: var(--s-warn); }
.viz .run-halo { fill: none; stroke: var(--s-run-halo); stroke-width: 4; }
.viz .n:hover .mark, .viz .n:focus .mark, .viz .n.on .mark { stroke-width: 2; }
.viz .n:focus-visible { outline: none; }
.viz .n:focus-visible .mark { stroke: var(--red-ink); }
.viz .selring { fill: none; stroke: var(--red-ink); stroke-width: 1.5; }
/* edges mean "needs": dim red; the critical path brighter */
.viz .edge.tg { stroke: var(--edge); stroke-opacity: 1; stroke-width: 1; }
.viz .dep.tg { stroke: var(--edge); stroke-opacity: 1; stroke-width: 1; stroke-dasharray: none; }
.viz .edge.tg.path, .viz .dep.tg.path { stroke: var(--red-ink); stroke-width: 1.5; }
.viz .arrow.tg { fill: var(--edge); }
/* labels sit on a backing of the surface colour */
.viz text.lab { fill: var(--text); font-size: 12px; paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }
.viz-scroll { background: transparent; border: 0; border-radius: 0; }
.viz .rowband { fill: var(--row); }
/* the Plan tab: the graph, its legend in one row, the schedule folded, the picked step on the right */
.plan-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
@media (max-width: 1200px) { .plan-layout { grid-template-columns: minmax(0, 1fr); } }
.plan-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.plan-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.plan-bar select { width: auto; min-height: 32px; font-size: 13px; }
.plan-bar .widget-title { margin: 0; }
#pv-graph .graph-scroll { height: max(420px, 64vh); max-height: none; }
.plan-legend { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; border-top: 1px solid var(--hairline); padding-top: 12px; }
.plan-legend .legend { margin: 0; font-size: 13px; color: var(--muted); }
.plan-legend .legend .count { display: none; }
.legend-sep { width: 1px; height: 16px; background: var(--hairline); }
.crit-key { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.crit-line { width: 20px; height: 1.5px; background: var(--red); }
/* the people on the plan (ADR-0196): a column of initials on the right; their lines to steps show on point or pin */
.pe-key { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pe-line { width: 20px; height: 0; border-top: 1.5px solid var(--text); }
.pe-line.with { border-top: 1.5px dashed var(--muted); margin-left: 8px; }
.viz .pe { display: none; fill: none; pointer-events: none; }
.viz .pe.lit { display: inline; }
.viz .pe.own { stroke: var(--text); stroke-width: 1.5; }
.viz .pe.with { stroke: var(--muted); stroke-width: 1.25; stroke-dasharray: 5 4; }
.viz .pn { cursor: pointer; outline: none; }
.viz .pmark { fill: var(--raised); stroke: var(--control); stroke-width: 1; }
.viz .pn.me .pmark { stroke: var(--s-person); stroke-width: 1.5; }
.viz .pn:hover .pmark, .viz .pn.on .pmark, .viz .pn.lnk .pmark { fill: var(--raised-2); stroke: var(--text); stroke-width: 2; }
.viz .pn:focus-visible .pmark, .viz .pn.pinned .pmark { stroke: var(--red-ink); stroke-width: 2; }
.viz .pinit { fill: var(--text); font-size: 13px; font-weight: 600; letter-spacing: .02em; pointer-events: none; }
.viz .pcol-h { fill: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.viz .n.lnk .mark { stroke: var(--text); stroke-width: 2; }
/* the Brainstorm threads a project came from (ADR-0200 decision 23): left of the root, each opening its thread */
.viz .tn { outline: none; }
.viz .tn.mine { cursor: pointer; }
.viz .tmark { fill: var(--raised); stroke: var(--s-run); stroke-width: 1.5; }
.viz .tglyph { fill: none; stroke: var(--s-run); stroke-width: 1.4; stroke-linecap: round; pointer-events: none; }
.viz .tn.mine:hover .tmark, .viz .tn.on .tmark { fill: var(--raised-2); stroke-width: 2; }
.viz .tn:focus-visible .tmark { stroke: var(--red-ink); stroke-width: 2; }
.viz .edge.from-bs { stroke-dasharray: 4 4; }
.viz .n, .viz .edge, .viz .dep { transition: opacity .12s; }
.viz svg.pfocus .n:not(.lnk), .viz svg.pfocus .edge, .viz svg.pfocus .dep { opacity: .3; }
#net .n { cursor: pointer; }
.pe-init { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--raised); color: var(--text); font-size: 11px; font-weight: 600; }
ul.pd-tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pd-task { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.pd-task > button:not(.linkish) { margin-top: 2px; }
.plan-side .card { margin: 0; }
#plan-detail { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.pd-head { display: flex; align-items: center; gap: 10px; }
.pd-head .quiet { min-height: 28px; padding: 0 8px; }
.pd-title { font-size: 18px; font-weight: 500; margin: 0; }
.pd-sum { font-size: 13px; color: var(--body); max-height: 240px; overflow: auto; }
.pd-dl { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 13px; }
.pd-dl dt { color: var(--muted); } .pd-dl dd { margin: 0; display: flex; flex-direction: column; gap: 4px; }
button.dl-link { color: var(--text); display: inline-flex; align-items: center; gap: 6px; text-align: left; }
button.dl-link:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--control-hover); }
main.proj-main { max-width: none; margin: 0; }
.viz .mark.c-settled { fill: var(--surface); stroke: var(--text); }
.viz g.st-c-warn .glyph-l { fill: var(--s-warn); } .viz g.st-c-gray .glyph-l { fill: var(--s-aside); }
.viz g.st-c-ring .glyph-l { fill: var(--s-wait); }
.viz .fresh .run-halo, .viz .moved .run-halo { opacity: 1; animation: halo 2.2s ease-out 1 forwards; }
@media (prefers-reduced-motion: reduce) { .viz .fresh .run-halo, .viz .moved .run-halo { animation: none; opacity: .8; } }
.viz .notedot { fill: var(--s-run); stroke: var(--surface); }

/* planning together: the interview beside the plan so far (ADR-0099 am. 4 §12) */
.interview { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 32px; align-items: start; margin-bottom: 24px; }
.interview.hidden { display: none; }
@media (max-width: 1100px) { .interview { grid-template-columns: minmax(0, 1fr); } }
.iv-main { display: flex; flex-direction: column; gap: 20px; max-width: 760px; min-width: 0; }
.iv-steps { display: flex; align-items: center; min-height: 20px; }
.iv-steps .nl-edge { flex: 1; max-width: 120px; height: 1px; background: var(--edge); }
.iv-steps .node.now { width: 18px; height: 18px; border-color: var(--red-ink); box-shadow: 0 0 0 3px var(--ground), 0 0 0 4px var(--edge); }
.iv-count { margin-left: 14px; }
.iv-q { font-size: 20px; line-height: 1.45; font-weight: 500; color: var(--text); }
.iv-q:empty { display: none; }
.plan-act:empty { display: none; }
#plan-text { min-height: 96px; font-size: 15px; }
.about-row { gap: 8px; }
.iv-side { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 68px; }
#plan-so-far { margin: 0; display: flex; flex-direction: column; gap: 10px; }
#plan-so-far .viz-scroll { height: 340px; max-height: none; }
#plan-so-far .viz .n { cursor: pointer; }
#plan-talk .timeline::before { content: ""; position: absolute; left: 10.5px; top: 4px; bottom: 4px; width: 1px; background: var(--edge); }
#plan-so-far #plan-tree { max-width: 100%; height: auto; }

/* ================================================================ phase 5: Admin (ADR-0099 am. 4 §13) */
.admin { display: grid; grid-template-columns: 240px minmax(0, 1fr) 420px; min-height: calc(100vh - 52px); }
.admin.hidden { display: none; }
.sec-nav a .v-faint, .sec-nav a .node { margin-left: auto; }
main.admin-main { max-width: none; margin: 0; padding: 36px 48px 96px; border-right: 1px solid var(--hairline); min-width: 0;
  display: flex; flex-direction: column; gap: 20px; }
main.admin-main > section { display: flex; flex-direction: column; gap: 16px; }
main.admin-main > section.hidden { display: none; }
.admin-side > div { display: flex; flex-direction: column; gap: 10px; }
.admin-side > div.hidden { display: none; }
@media (max-width: 1200px) { .admin { grid-template-columns: 200px minmax(0, 1fr); } .admin-side { grid-column: 2; border-top: 1px solid var(--hairline); } }
@media (max-width: 900px) { .admin { grid-template-columns: minmax(0, 1fr); } .admin-side { grid-column: 1; }
  .admin, .page-nav { align-content: start; }   /* one column: rows keep their own height, never the screen's (ADR-0194) */
  .admin .sec-nav { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--hairline); padding: 8px 16px; overflow-x: auto; align-items: center; height: auto; min-height: 0; position: static; }
  .admin .sec-nav a { white-space: nowrap; padding-left: 10px; min-height: 44px; }
  main.admin-main { padding: 24px 16px 32px; border-right: 0; } }
/* filter chips: grey, never red */
.chips { gap: 6px; flex-wrap: wrap; }
button.chip-btn { min-height: 30px; padding: 0 12px; border: 0; border-radius: var(--r-control); font-size: 13px; color: var(--muted); background: transparent; }
button.chip-btn:hover { background: var(--widget); color: var(--text); }
button.chip-btn.on { background: var(--raised); color: var(--text); }
button.chip-btn .v { color: var(--faint); margin-left: 4px; }
#people-q { width: 240px; min-height: 32px; font-size: 13px; }
/* what needs the owner, first */
.att-row { display: flex; align-items: center; gap: 14px; padding-left: 26px; }
#attention, #health-warn { display: flex; flex-direction: column; gap: 12px; padding: 18px; margin: 0; }
#attention.hidden, #health-warn.hidden { display: none; }
#health-warn .note { padding-left: 26px; }
/* the tables */
.ptable.adm .ptr { grid-template-columns: 16px minmax(0, 2fr) minmax(0, 1fr) 72px 110px 136px; }
#people.ptable.adm .ptr { grid-template-columns: 16px minmax(0, 1fr) 100px 110px 110px 44px; }
.ptable.adm.audit .ptr { grid-template-columns: 48px minmax(0, 170px) minmax(0, 1fr) minmax(0, 160px) minmax(0, 1fr); }
.ptable.adm .ptr .v.warm { color: var(--s-warn); }
.ptr .acts { justify-content: flex-end; gap: 4px; }
.ptr .acts button { min-height: 28px; padding: 0 10px; font-size: 12px; }
.ptr a.pname { color: var(--text); }
.ptr a.pname:hover { text-decoration: underline; text-decoration-color: var(--control-hover); }
.ptr .row { gap: 8px; min-width: 0; }
.person-more { display: flex; flex-direction: column; gap: 8px; padding: 6px 16px 16px 48px; border-top: 1px solid var(--row); }
.person-more .role-row select { width: auto; min-height: 32px; font-size: 13px; }
.au-day { padding: 18px 16px 6px; border-top: 1px solid var(--row); }
@media (max-width: 700px) { .ptable.adm .ptr, #people.ptable.adm .ptr, .ptable.adm.audit .ptr { grid-template-columns: 16px minmax(0, 1fr); }
  .ptable.adm .ptr > :nth-child(n+3) { grid-column: 2; } .ptr .acts { justify-content: flex-start; } }
/* site health: one row per service */
.services { display: flex; flex-direction: column; }
.svc { display: flex; align-items: center; gap: 14px; padding: 14px 6px; border-top: 1px solid var(--row); font-size: 14px; }
.svc-says { text-align: right; max-width: 60%; }
/* feedback */
.fb-list { display: flex; flex-direction: column; gap: 10px; }
.fb-item { margin: 0; display: flex; flex-direction: column; gap: 8px; }
/* across the site and the week, small meters in the status colours */
.big-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.big-v { font: 300 26px/1.2 var(--mono); color: var(--text); }
.stack-bar { display: flex; height: 4px; background: var(--raised); border-radius: 2px; overflow: hidden; gap: 2px; }
.stack-bar span { display: block; height: 4px; }
.stack-bar .seg-0 { background: var(--s-run); } .stack-bar .seg-1 { background: var(--s-run-2); }
.stack-bar .seg-2 { background: var(--s-warn); } .stack-bar .seg-3 { background: var(--s-good); }
.week-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 90px; align-items: end; margin-bottom: 8px; }
.wb { display: flex; flex-direction: column-reverse; height: 100%; justify-content: flex-start; gap: 2px; }
.wb-p { background: var(--s-run); border-radius: 2px 2px 0 0; } .wb-s { background: var(--s-run-2); }
button.quiet.del:hover { color: var(--s-bad); }
.ptable.adm .pcell .psub { flex-wrap: wrap; }
/* the interviewer tools (ADR-0146): pick several, a number, starts */
.opt-box { width: 14px; height: 14px; border-radius: var(--r-check); border: 1.5px solid var(--control-hover); flex: 0 0 14px; box-sizing: border-box; }
.option.selected .opt-box { background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.4 2.4 4.6-5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px no-repeat; border-color: var(--red); }
.fork.several { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fork.several > .own-words, .fork.several > .starters { grid-column: 1 / -1; }
.fork.several > .option::before { display: none; }
.num-ask { background: var(--widget); border-radius: var(--r-option); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.num-ask input[type=range] { width: 100%; accent-color: var(--red-ink); min-height: 28px; }
.num-scale { font-size: 11px; }
.num-v { font: 300 32px/1 var(--mono); color: var(--text); }
.starters { gap: 6px; }
.starters .chip-btn { background: var(--widget); font-size: 12px; min-height: 30px; }
button.ev-change { margin-left: 8px; }
@media (max-width: 700px) { .fork.several { grid-template-columns: minmax(0, 1fr); } }
.fork .own-words textarea[rows="1"] { min-height: 44px; }

/* ================================================================ phase 7: phones (ADR-0099 am. 4 §15) */
nav.bottomtabs, .you-panel, .plan-strip, .grabber, .grabber-btn { display: none; }

@media (max-width: 480px) {
  /* the app bar: the wordmark and who you are; the site's tabs move to the bottom */
  header.top { height: 48px; min-height: 48px; flex-wrap: nowrap; padding: 0 16px; gap: 12px; }
  header.top nav.sitetabs, header.top .crumb, header.top select.play-as, header.top .who-l, header.top .me button.quiet { display: none; }
  header.top label.who::after { content: ""; }
  nav.bottomtabs { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: var(--ground); border-top: 1px solid var(--hairline); padding-bottom: env(safe-area-inset-bottom); }
  nav.bottomtabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 58px;
    font-size: 12px; color: var(--muted); }
  nav.bottomtabs a::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: transparent; }
  nav.bottomtabs a.on { color: var(--text); } nav.bottomtabs a.on::before { background: var(--red); }
  body.has-bottomtabs { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  /* You: who you are and your other pages, on top of Settings */
  .you-panel { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
  .you-head { display: flex; align-items: flex-start; gap: 12px; }
  .you-head h1 { margin: 0; font-size: 22px; }
  a.card.you-link { display: flex; align-items: center; min-height: 52px; margin: 0; color: var(--text); font-weight: 500; }
  #you-as label { display: flex; width: 100%; } #you-as select { max-width: none; width: auto; flex: 1 1 auto; min-width: 0; }
  .composer-row { bottom: calc(58px + env(safe-area-inset-bottom)); }
  .page-nav .sec-nav { position: static; }
  /* bottom sheets: a grabber, the widget colour, rounded on top */
  .sheet { position: fixed; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom)); z-index: 20; background: var(--widget);
    --surface: var(--widget); border-radius: 16px 16px 0 0; box-shadow: var(--overlay); padding: 8px 16px 16px; max-height: 62vh; overflow: auto; }
  .sheet .grabber { display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--control-hover); margin: 0 auto 10px; }
  .plan-side.sheet.empty { display: none; }
  .plan-side.sheet .card { background: transparent; padding: 0; }
  .plan-layout { padding-bottom: 50vh; }
  /* planning: the interview fills the screen; the plan so far is a strip in a sheet, the whole graph when opened */
  .iv-side.sheet { position: fixed; top: auto; }
  .iv-side.sheet #plan-so-far { background: transparent; padding: 0; gap: 8px; }
  .grabber-btn { display: block; all: unset; box-sizing: border-box; display: flex; justify-content: center; width: 100%; min-height: 24px; cursor: pointer; }
  .grabber-btn .grabber { margin: 0; }
  .iv-side.sheet:not(.open) #plan-scroll, .iv-side.sheet:not(.open) #plan-so-far > .row, .iv-side.sheet:not(.open) #plan-legend,
  .iv-side.sheet:not(.open) #plan-so-far > p, .iv-side.sheet:not(.open) .framing { display: none !important; }
  .plan-strip { display: flex; align-items: center; overflow-x: auto; padding: 6px 2px; }
  .plan-strip .nl-edge { flex: 1 0 12px; height: 1px; background: var(--edge); }
  button.strip-n { all: unset; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; cursor: pointer; }
  button.strip-n.sel .node { box-shadow: 0 0 0 3px var(--surface), 0 0 0 4.5px var(--red-ink); }
  .interview { padding-bottom: 180px; }
  /* the Thread and questions: bigger targets, full-width answers */
  .fork > button.option { min-height: 48px; }
  .ev-acts .row { flex-wrap: wrap; }
  .ev-acts .q-answer, .ev-go { flex: 1 1 100%; min-height: 48px; font-size: 16px; }
  .proj-head .proj-crumb { display: none; }
  .proj-title-row h1, .proj-id h1 { font-size: 20px; }
  /* Home: the top item for you, framed, with its button full width */
  a.fy-row { flex-wrap: wrap; }
  a.fy-row:has(.btn.primary) { box-shadow: inset 0 0 0 1px var(--red-ink); }
  a.fy-row .btn.primary { flex: 1 1 100%; min-height: 48px; font-size: 16px; }
  .lk-timer { font-size: 44px; }
}

/* ---------------------------------------------------------------- the lab notebook (ADR-0147; Pages #05, Notebook #3a/#3b) */
.amber { color: var(--s-warn); } .red { color: var(--red-ink); }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--off); flex: none; }
.dot.blue { background: var(--s-run); } .dot.red { background: var(--red); }
.red-link { color: var(--red-ink); font-size: 13px; } .quiet-link { color: var(--muted); font-size: 13px; }
button.linkish.quiet-l { color: var(--muted); font-size: 12px; } button.linkish.quiet-l:hover { color: var(--text); }
/* the Notebook tab: experiments beside what's coming from the plan */
.nb-tab { display: grid; grid-template-columns: minmax(0, 1fr) 400px; min-height: calc(100vh - 220px); }
.nb-main { padding: 28px 40px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--hairline); }
.nb-bar { display: flex; align-items: center; gap: 12px; } .nb-bar h2 { margin: 0; font-size: 18px; }
.nb-bar input[type=search] { width: 240px; }
.nb-side { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.nb-side .card { margin: 0; }
a.nb-row { --surface: var(--widget); background: var(--widget); border-radius: var(--r-widget); padding: 16px 18px; color: var(--text);
  display: grid; grid-template-columns: 16px minmax(0, 1fr) 200px 90px 80px; gap: 16px; align-items: center; }
a.nb-row:hover { background: var(--raised); --surface: var(--raised); color: var(--text); }
a.nb-row.needs-you { box-shadow: inset 0 0 0 1px var(--red-ink); }
.nb-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .nb-t .t { font-size: 15px; } .nb-t .who { font-size: 12px; color: var(--muted); }
.nb-s { font-size: 13px; color: var(--body); } .nb-when { color: var(--faint); }
a.nb-row .btn { justify-self: end; min-height: 30px; padding: 0 12px; pointer-events: none; }
.nb-older { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); padding: 8px 4px; }
.nb-coming-row { display: flex; gap: 12px; align-items: center; }
.nb-coming-row .t { display: block; font-size: 13px; } .nb-coming-row .small { display: block; }
.nb-side ul.list li { padding: 4px 0; }
label.check { gap: 10px; }
@media (max-width: 1000px) {
  .nb-tab { grid-template-columns: minmax(0, 1fr); } .nb-main { border-right: 0; padding: 20px 16px; }
  a.nb-row { grid-template-columns: 16px minmax(0, 1fr) auto; } a.nb-row .nb-s { grid-column: 2; } a.nb-row .nb-when { display: none; }
  a.nb-row .btn { grid-row: 1; grid-column: 3; }
}
/* the desk page: steps | the record | the selected step's tools */
body.nb-body { overflow-x: hidden; }
.nb-desk { display: grid; grid-template-columns: 240px minmax(0, 1fr) 420px; min-height: calc(100vh - 52px); }
.nb-left { border-right: 1px solid var(--hairline); padding: 22px 18px; display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 52px; height: calc(100vh - 52px); overflow-y: auto; }
.nb-meta { display: flex; flex-direction: column; gap: 6px; } .nb-task { font-size: 13px; line-height: 1.4; color: var(--text); }
.nb-task:hover { color: var(--text); text-decoration: underline; }
.nb-spine ol { list-style: none; margin: 10px 0 0; padding: 0; }
.nb-spine li { position: relative; }
.nb-spine li:not(:last-child)::before { content: ""; position: absolute; left: 8.5px; top: 18px; bottom: -3px; width: 1px; background: var(--edge); }
button.nb-spine-step { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; width: 100%;
  font-size: 13px; line-height: 1.35; color: var(--body); padding: 0 0 12px; cursor: pointer; align-items: start; }
button.nb-spine-step .node { margin: 3px 0 0 2px; width: 12px; height: 12px; }
button.nb-spine-step:hover span:last-child, .nb-spine li.picked span:last-child { color: var(--text); }
.nb-spine li.picked span:last-child { text-decoration: underline; text-decoration-color: var(--off); text-underline-offset: 4px; }
button.nb-spine-step:focus-visible { box-shadow: 0 0 0 2px var(--red-ink); border-radius: 2px; }
.node.now { --c: var(--red-ink); border-color: var(--red-ink); background: var(--surface); box-shadow: 0 0 0 3px var(--red-ring); }
.nb-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; font-size: 12px; color: var(--muted); margin: 0; }
.nb-facts dd { margin: 0; color: var(--body); text-align: right; } .nb-facts dd.red { color: var(--red-ink); }
.nb-centre { padding: 28px 36px 96px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid var(--hairline); min-width: 0; max-width: none; margin: 0; }
.nb-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.nb-head h1 { font-size: 26px; margin: 0; } .nb-summary { font-size: 14px; line-height: 1.6; color: var(--body); max-width: 640px; margin: 0; }
.nb-summary:empty { display: none; }
.nb-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.nb-legend .row { gap: 6px; }
.nb-val { font-family: var(--mono); font-size: 13px; color: var(--text); border-bottom: 1px dotted var(--s-run); }
.nb-val:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--red-ink); }
.nb-note { margin: 0 0 6px; gap: 14px; } .nb-note p { margin: 2px 0 0; } .nb-drafting { width: 64px; height: 64px; position: relative; flex: none; }
.nb-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.nb-step { --surface: var(--widget); border-radius: var(--r-widget); }
.nb-step.done:not(.open) { background: var(--widget); }
.nb-step.next { border: 1px solid var(--hairline); --surface: var(--ground); }
.nb-step:not(.open) { display: flex; align-items: center; gap: 10px; padding-right: 12px; }
button.nb-step-row { all: unset; box-sizing: border-box; flex: 1; display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  cursor: pointer; min-height: 44px; border-radius: var(--r-widget); min-width: 0; }
button.nb-step-row:focus-visible { box-shadow: inset 0 0 0 1.5px var(--red-ink); }
button.nb-step-row .t { font-size: 14px; color: var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-step.done button.nb-step-row .t { color: var(--text); }
.nb-step .n { font-size: 12px; color: var(--faint); width: 16px; flex: none; }
button.chip-btn.up { min-height: 26px; padding: 0 10px; font-size: 12px; border: 1px solid var(--control); border-radius: var(--r-chip); background: none; }
.nb-step.open { background: var(--widget); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; margin: 6px 0; }
.nb-step.open.current { box-shadow: inset 0 0 0 1px var(--red-ink); }
.nb-step.open.current .n { color: var(--red-ink); }
.nb-step-head { display: flex; align-items: center; gap: 14px; } .nb-step-head h2 { font-size: 17px; margin: 0; }
.nb-step-body { padding-left: 58px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; line-height: 1.6; color: var(--body); }
.nb-step-body .md p { margin: 0 0 8px; } .nb-step-body textarea { width: 100%; font: 13px/1.5 var(--mono); }
.nb-step-acts { padding-left: 58px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nb-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nb-check li { display: flex; gap: 12px; align-items: center; }
button.nb-box { min-height: 0; width: 16px; height: 16px; padding: 0; border-radius: var(--r-check); border: 1.5px solid var(--control);
  background: none; font-size: 11px; font-weight: 600; color: var(--on-red); flex: none; position: relative; }
button.nb-box::after { content: ""; position: absolute; inset: -14px; }   /* a 44 px target around the 16 px box */
button.nb-box.on { background: var(--red); border-color: var(--red); }
button.nb-box:disabled.on { background: var(--muted); border-color: var(--muted); }
.nb-callout { background: var(--ground); border-radius: 8px; padding: 10px 14px; display: flex; gap: 12px; align-items: baseline; font-size: 13px; }
.nb-entries { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--edge); display: flex; flex-direction: column; gap: 10px; }
.nb-entries p { margin: 2px 0 0; } .nb-photo { display: block; max-width: 100%; max-height: 240px; border-radius: 8px; margin-top: 6px; }
.nb-devs { display: flex; flex-direction: column; gap: 10px; }
.nb-dev { display: flex; gap: 12px; align-items: flex-start; background: var(--ground); border-radius: var(--r-option); padding: 10px 14px; }
.nb-dev .node { margin-top: 5px; } .nb-dev p { margin: 2px 0 0; }
.nb-recover { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.nb-devform { margin-left: 58px; background: var(--ground); border-radius: var(--r-option); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.nb-devform p { margin: 0; }
.nb-comments { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--hairline); padding-top: 10px; }
.nb-comment p { margin: 2px 0 0; } .nb-comments .row input { flex: 1; }
.nb-hands { background: var(--ground); border-radius: var(--r-option); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.nb-hands textarea { width: 100%; } .nb-put { margin: 0; white-space: pre-wrap; }
.nb-analysis { --surface: var(--widget); background: var(--widget); border-radius: var(--r-option); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.nb-figure { display: block; max-width: 100%; max-height: 360px; background: var(--paper); border-radius: 6px; }
.nb-findings { margin: 0; padding-left: 18px; } .nb-findings li { margin: 2px 0; }
.nb-prov dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0 0; font-size: 12px; }
.nb-prov dt { color: var(--muted); } .nb-prov dd { margin: 0; overflow-wrap: anywhere; }
.nb-prov summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.nb-sign { margin-top: 10px; } .nb-sign:empty { display: none; }
.nb-sigs { list-style: none; margin: 0; padding: 0 0 0 58px; display: flex; flex-direction: column; gap: 8px; }
.nb-sigs li { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.nb-signform { padding-left: 58px; display: flex; flex-direction: column; gap: 10px; }
.nb-signform p { margin: 0; } .nb-signform .row input { flex: 1; max-width: 320px; }
.nb-before { background: var(--ground); border-radius: var(--r-option); padding: 10px 14px; } .nb-before ul { margin: 4px 0 0; padding-left: 18px; }
.nb-amends { margin-top: 18px; } .nb-amends h2 { font-size: 15px; }
.nb-amend-spine { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.nb-amend-spine li { display: flex; gap: 12px; align-items: flex-start; } .nb-amend-spine p { margin: 2px 0 0; }
.nb-amend-spine li .node { margin-top: 5px; }
.nb-amend-form { background: var(--widget); border-radius: var(--r-widget); padding: 12px 16px; }
.nb-amend-form summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.nb-amend-form[open] { display: flex; flex-direction: column; gap: 8px; } .nb-amend-form textarea { width: 100%; }
.nb-right { padding: 16px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 52px; height: calc(100vh - 52px); overflow-y: auto; }
.nb-right .card { margin: 0; }
.nb-timer { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.nb-timer .node { width: 12px; height: 12px; box-shadow: 0 0 0 3px var(--s-run-halo); }
.nb-timer-v { font-size: 20px; }
.nb-tools-label { font-size: 12px; color: var(--muted); padding: 8px 4px 0; display: flex; gap: 8px; align-items: center; }
.nb-tools-label:empty { display: none; }
iframe.nb-frame { display: block; width: 100%; height: 160px; border: 0; background: transparent; color-scheme: dark; }
#nb-notes-card textarea { width: 100%; }
@media (max-width: 1280px) { .nb-desk { grid-template-columns: 220px minmax(0, 1fr) 360px; } }
@media (max-width: 1000px) {
  .nb-desk { grid-template-columns: minmax(0, 1fr); }
  .nb-left, .nb-right { position: static; height: auto; border-right: 0; }
  .nb-left { border-bottom: 1px solid var(--hairline); } .nb-left > .grow { display: none; }
  .nb-centre { border-right: 0; padding: 20px 16px 40px; }
  .nb-step-body, .nb-step-acts, .nb-signform, .nb-sigs { padding-left: 0; } .nb-devform { margin-left: 0; }
}
@media (max-width: 480px) {
  .nb-left { padding: 14px 16px; gap: 12px; } .nb-spine { display: none; }
  .nb-step.open { padding: 16px; } .nb-head h1 { font-size: 22px; }
  .nb-step-acts button { flex: 1 1 100%; }
}
@media print {
  header.top, .nb-right, .nb-step-acts, .nb-amend-form, .nb-signform, .helper-orb, nav.bottomtabs { display: none !important; }
  .nb-desk { display: block; } .nb-left { position: static; height: auto; }
  body, .nb-step, .card { background: var(--ground) !important; color: var(--text) !important; }
}
header.top .crumb a { color: var(--muted); } header.top .crumb a:hover { color: var(--text); } header.top .crumb .here { color: var(--text); }
button.nb-step-row .grow { flex: 1 1 auto; min-width: 0; }
.nb-coming-row > .grow { flex: 1 1 auto; min-width: 0; }
@media (max-width: 1000px) { .nb-main { padding: 16px 0; } .nb-side { padding: 0; } .nb-bar { flex-wrap: wrap; } }
@media (max-width: 480px) { .nb-bar input[type=search] { order: 3; width: 100%; } .nb-bar h2 { flex: 1; } }
.nb-step-acts .grow { flex: 1 1 auto; }
@media (max-width: 480px) { button.nb-step-row .muted.small, button.nb-step-row .amber { display: none; } }
.nb-facts a { color: var(--muted); } .nb-facts a:hover { color: var(--text); }
/* a data step, opened (Notebook #3b) */
.nb-data { min-height: calc(100vh - 52px); }
.nbd-head { display: flex; align-items: center; gap: 14px; padding: 22px 36px; border-bottom: 1px solid var(--hairline); }
.nbd-head h1 { font-size: 24px; margin: 0; } .nbd-sep { width: 1px; height: 24px; background: var(--hairline); }
.nbd-body { display: grid; grid-template-columns: minmax(0, 1fr) 520px; min-height: calc(100vh - 140px); }
.nbd-left { padding: 24px 36px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--hairline); }
.nbd-left .card { margin: 0; } .nbd-left textarea { width: 100%; }
.nbd-right { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.nbd-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--hairline); }
.nbd-tabs button { all: unset; cursor: pointer; font-size: 14px; color: var(--muted); padding: 10px 0; min-height: 24px; display: inline-flex; align-items: center; gap: 8px; }
.nbd-tabs button[aria-selected="true"] { color: var(--text); }
.nbd-tabs button[aria-selected="true"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.nbd-tabs button:focus-visible { box-shadow: 0 0 0 2px var(--red-ink); }
.nbd-file { gap: 14px; } .nbd-drop { border: 1px dashed var(--control); border-radius: var(--r-widget); padding: 22px; text-align: center; color: var(--body); cursor: pointer; }
.nbd-drop.over, .nbd-drop:hover { border-color: var(--muted); background: var(--widget); }
.nbd-drop:focus-within { box-shadow: 0 0 0 2px var(--red-ink); }
.nbd-template { border: 1px solid var(--control); border-radius: var(--r-control); padding: 10px 14px; margin: 12px 0; }
.nbd-settings { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 0 0 12px; align-items: center; }
.nbd-settings dt { color: var(--muted); } .nbd-settings dd { margin: 0; } .nbd-settings input { width: 100%; }
.nbd-quick { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.nbd-loader { position: relative; height: 360px; margin: 0 -16px; }
.nbd-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; z-index: 2; pointer-events: none; }
.nbd-progress { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.nbd-progress li { display: flex; gap: 14px; align-items: center; }
.nbd-sees h3 { margin: 0 0 8px; } .nbd-sees .row { align-items: flex-start; gap: 10px; margin-bottom: 6px; } .nbd-sees .node { margin-top: 5px; }
@media (max-width: 1000px) { .nbd-body { grid-template-columns: minmax(0, 1fr); } .nbd-left { border-right: 0; padding: 16px; } .nbd-head { padding: 14px 16px; flex-wrap: wrap; }
  .nbd-settings { grid-template-columns: 1fr; } .nbd-loader { height: 240px; } }
.nbd-left .row, .nbd-right .row, .nb-hands .row, .nb-signform .row { flex-wrap: wrap; } .nbd-left .row > .muted, .nb-hands .row > .muted { flex: 1 1 200px; min-width: 0; }
.nb-val.changed { border-bottom-color: var(--s-warn); }
table.nb-reagents { width: 100%; font-size: 13px; } table.nb-reagents td.num, table.nb-reagents th.num { text-align: right; }
table.nb-reagents td.added { color: var(--s-good); }
.nb-inputs { display: flex; flex-direction: column; gap: 6px; } .nb-inputs input { width: 110px; }

/* ---------------------------------------------------------------- bench mode (Notebook #3c, Phone #05): targets 56 px and up */
.seg.bench-seg { display: inline-flex; margin-left: 16px; border: 1px solid var(--control); border-radius: var(--r-control); overflow: hidden; vertical-align: middle; }
.seg.bench-seg > * { padding: 4px 10px; font-size: 12px; color: var(--muted); }
.seg.bench-seg > .on { background: var(--raised); color: var(--text); } .seg.bench-seg > * + * { border-left: 1px solid var(--control); }
body.bench-body { overflow-x: hidden; }
.bench { display: grid; grid-template-columns: 96px minmax(0, 1fr) 420px; min-height: calc(100vh - 52px); }
.bench-rail { border-right: 1px solid var(--hairline); padding: 28px 0; }
.bench-rail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 46px; position: relative; }
.bench-rail ol::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--off); }
button.b-node { position: relative; width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%; border: 1.5px solid var(--s-wait);
  background: var(--ground); color: var(--body); font: 15px var(--sans); }
button.b-node::after { content: ""; position: absolute; inset: -8px; }   /* 56 px to tap */
button.b-node.done { background: var(--s-good); border-color: var(--s-good); color: var(--on-red); }
button.b-node.cur { width: 48px; height: 48px; border-color: var(--s-run); background: var(--ground); color: var(--text); box-shadow: 0 0 0 4px var(--s-run-halo); }
button.b-node.cur.red { border-color: var(--red-ink); color: var(--red-ink); box-shadow: 0 0 0 4px var(--red-ring); }
.bench-main { padding: 36px 48px 140px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.b-label { font-size: 16px; color: var(--muted); } .red-t { color: var(--red-ink); } .amber-dot { background: var(--s-warn); }
h1.b-title { font-size: 40px; font-weight: 500; letter-spacing: -.02em; margin: 0; line-height: 1.15; }
.b-mixes { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 16px; }
.b-mix { display: inline-flex; gap: 10px; align-items: center; } .b-mix .node { width: 20px; height: 20px; }
.b-edge { width: 60px; height: 1.5px; background: var(--off); } .b-edge.on { background: var(--red); }
.b-text { font-size: 19px; line-height: 1.6; color: var(--body); } .b-text .md p { margin: 0 0 8px; }
.b-text .nb-val { font-size: 17px; }
.b-rows { display: flex; flex-direction: column; gap: 14px; }
button.b-row { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 22px; min-height: 84px; padding: 14px 28px;
  background: var(--widget); border-radius: var(--r-widget); cursor: pointer; }
button.b-row.cur { min-height: 104px; box-shadow: inset 0 0 0 1.5px var(--red-ink); }
button.b-row:focus-visible { box-shadow: inset 0 0 0 2px var(--red-ink), 0 0 0 2px var(--ground); }
button.b-row:disabled { cursor: default; }
button.b-row:not(.added):not(.cur) { background: var(--ground); box-shadow: inset 0 0 0 1px var(--hairline); }
.b-ring { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--s-wait); flex: none; }
.b-ring.red { border-color: var(--red-ink); box-shadow: 0 0 0 4px var(--red-ring); }
.b-check { width: 32px; height: 32px; border-radius: 50%; background: var(--s-good); color: var(--on-red); display: grid; place-items: center; font-weight: 600; flex: none; }
.b-what { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.b-name { font-size: 20px; color: var(--text); } button.b-row.added .b-name { color: var(--body); }
button.b-row.cur .b-name { font-size: 22px; font-weight: 500; }
.b-lot { font-size: 13px; color: var(--faint); }
.b-amt { font-size: 30px; color: var(--body); white-space: nowrap; } button.b-row.cur .b-amt { font-size: 44px; color: var(--text); }
.b-amt small { font-size: 14px; color: var(--muted); }
.b-total { display: flex; justify-content: space-between; padding: 6px 4px; font-size: 15px; color: var(--muted); } .b-total .v { font-size: 15px; color: var(--text); }
.b-note { font-size: 15px; }
.b-timer { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 8px 0; }
.b-ring-wrap { position: relative; width: 220px; height: 220px; }
.b-ring-svg { width: 220px; height: 220px; transform: rotate(-90deg); }
.b-ring-svg circle { fill: none; stroke-width: 9; } .b-ring-svg .track { stroke: var(--raised); } .b-ring-svg .arc { stroke: var(--s-run); stroke-linecap: butt; }
.b-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.b-ring-t { font-size: 56px; line-height: 1; } .b-ring-s { font-size: 14px; color: var(--muted); margin-top: 8px; }
.b-btns { display: flex; gap: 14px; width: 100%; max-width: 420px; }
button.b-btn { min-height: 56px; flex: 1; font-size: 17px; border-radius: 10px; }
.bench-tools { border-left: 1px solid var(--hairline); padding: 24px 20px 140px; display: flex; flex-direction: column; gap: 14px; }
.bench-tools .card { margin: 0; padding: 20px; } .bench-tools h2 { font-size: 16px; margin: 0 0 14px; }
.b-step { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.b-stepper { display: flex; gap: 12px; align-items: stretch; }
button.b-sq { width: 56px; min-height: 56px; padding: 0; font-size: 24px; border-radius: 10px; }
.b-sv { flex: 1; background: var(--ground); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.b-sv .v { font-size: 28px; } .b-sv small { font-size: 14px; color: var(--muted); margin-left: 6px; }
.b-trow { min-height: 44px; } .b-tv { font-size: 22px; }
.bench-bar { position: fixed; left: 96px; right: 420px; bottom: 0; padding: 20px 48px 24px; display: flex; gap: 16px; align-items: center;
  background: linear-gradient(transparent, var(--ground) 30%); z-index: 20; }
button.b-oops-btn { min-height: 72px; padding: 0 28px; font-size: 19px; color: var(--s-warn); border: 1.5px solid var(--s-warn-line); border-radius: 12px; gap: 14px; background: var(--ground); }
button.b-oops-btn .node { width: 22px; height: 22px; font-size: 12px; }
button.primary.b-go { flex: 1; min-height: 72px; font-size: 22px; border-radius: 12px; }
.bench-queue { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); background: var(--raised); border-radius: 10px; padding: 10px 16px;
  font-size: 14px; display: flex; gap: 12px; align-items: center; z-index: 30; box-shadow: var(--overlay); }
dialog.bench-oops { width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 32px); background: var(--widget); color: var(--text); border: 0;
  border-radius: 16px; padding: 28px; box-shadow: var(--overlay); --surface: var(--widget); }
dialog.bench-oops::backdrop { background: var(--scrim); }
.b-oops-in { display: flex; flex-direction: column; gap: 18px; } .b-oops-in h2 { font-size: 24px; margin: 0; }
.b-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
button.b-kind { min-height: 72px; justify-content: flex-start; padding: 0 22px; font-size: 18px; background: var(--ground); border: 0; border-radius: 12px; }
button.b-kind.on { box-shadow: inset 0 0 0 1.5px var(--red-ink); } button.b-kind.own { border: 1px dashed var(--control); color: var(--muted); }
input.b-words { min-height: 64px; font-size: 18px; }
.b-oops-wait { position: relative; height: 240px; }
.b-oops-in .fork .option { min-height: 72px; font-size: 17px; }
.b-orb { width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--red-ink); }
@media (max-width: 1100px) { .bench { grid-template-columns: 80px minmax(0, 1fr) 340px; } .bench-bar { left: 80px; right: 340px; } }
@media (max-width: 760px) {
  .bench { grid-template-columns: minmax(0, 1fr); }
  .bench-rail { border-right: 0; border-bottom: 1px solid var(--hairline); padding: 14px 16px; overflow-x: auto; }
  .bench-rail ol { flex-direction: row; gap: 0; justify-content: space-between; min-width: 100%; }
  .bench-rail ol::before { top: 50%; bottom: auto; left: 0; right: 0; width: auto; height: 1px; background: var(--edge); }
  .bench-rail li { display: flex; }
  button.b-node { width: 14px; height: 14px; font-size: 0; color: transparent; } button.b-node.cur { width: 22px; height: 22px; }
  button.b-node::after { inset: -16px; }
  .bench-main { padding: 20px 16px 24px; } h1.b-title { font-size: 32px; } .b-text { font-size: 17px; }
  button.b-row { padding: 12px 16px; gap: 14px; min-height: 72px; } button.b-row.cur { min-height: 88px; }
  .b-amt { font-size: 24px; } button.b-row.cur .b-amt { font-size: 32px; } .b-name { font-size: 17px; } button.b-row.cur .b-name { font-size: 18px; }
  .bench-tools { border-left: 0; padding: 0 16px 120px; }
  .bench-bar { left: 0; right: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--ground); border-top: 1px solid var(--hairline); }
  button.b-oops-btn, button.primary.b-go { min-height: 60px; font-size: 18px; } button.b-oops-btn { padding: 0 18px; }
  .b-kinds { grid-template-columns: 1fr; } dialog.bench-oops { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; padding: 20px 16px; }
  body.bench-body nav.bottomtabs { display: none; }
}
@media (max-width: 760px) { .b-edge { display: none; } .b-mixes { flex-direction: column; align-items: flex-start; gap: 8px; } }
body.bench-body nav.sitetabs { display: none; } body.bench-body header.top .crumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.b-refused { gap: 10px; } button.b-btn.small-btn { min-height: 44px; flex: none; font-size: 14px; padding: 0 12px; }
/* a recovery option's worked-out amounts go on their own line under it */
.b-oops-in .fork .option, .nb-recover .fork .option { flex-wrap: wrap; row-gap: 4px; }
.b-oops-in .fork .option > .v-faint, .nb-recover .fork .option > .v-faint { order: 5; flex-basis: 100%; padding-left: 26px; white-space: normal; }
.pdue { gap: 0; } .pdue .v { font-size: 12px; } .pdue .amber { font-size: 11px; }
.runs-cell { display: flex; flex-direction: column; gap: 2px; }
.fb-reply { background: var(--ground); border-radius: var(--r-option); padding: 8px 12px; font-size: 13px; margin-top: 6px; }
.nb-review { margin: 0 0 6px; } .nb-concerns { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.nb-concerns li { display: flex; flex-direction: column; gap: 2px; } .good-t { color: var(--s-good); }
.iv-stage { display: inline-flex; gap: 6px; align-items: center; } .iv-stage.now .small { color: var(--text); } .iv-steps .nl-edge.on { background: var(--s-good); }

/* ---------------------------------------------------------------- a cluster's detail (Infra 10b, OQ-54) */
main.cd-main { max-width: 1240px; display: flex; flex-direction: column; gap: 14px; }
.cd-main .card { margin: 0; } .cd-h { font-size: 16px; margin: 12px 0 0; }
.cd-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cd-sum { display: flex; flex-direction: column; gap: 6px; } .cd-sum .big-v { font: 28px var(--mono); }
.cd-grid, .cd-months { display: grid; gap: 3px; } .cd-months { margin-top: 12px; }
.cd-cell { width: 12px; height: 12px; border-radius: 3px; display: inline-block; background: var(--row); }
.cd-cell.l1 { background: color-mix(in srgb, var(--s-run) 25%, transparent); } .cd-cell.l2 { background: color-mix(in srgb, var(--s-run) 45%, transparent); }
.cd-cell.l3 { background: rgba(57, 135, 229, .7); } .cd-cell.l4 { background: var(--s-run); }
.cd-cell.back { box-shadow: inset 0 0 0 1.5px var(--s-warn); } .cd-wd { font-size: 10px; line-height: 12px; }
.cd-legend { gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.cd-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cd-part h3 { margin: 0; font-size: 15px; }
.cd-nodes { display: grid; grid-template-columns: repeat(16, 12px); gap: 3px; margin: 12px 0; }
.cd-sq { width: 12px; height: 12px; border-radius: 2px; background: var(--control); }
.cd-sq.yours { background: var(--s-run); } .cd-sq.idle { background: transparent; box-shadow: inset 0 0 0 1.5px var(--s-idle-ring); }
.cd-sq.down { background: transparent; box-shadow: inset 0 0 0 1.5px var(--red-ink); }
.cd-part-n { display: flex; gap: 16px; font-size: 12px; color: var(--muted); flex-wrap: wrap; } .cd-part-n b { color: var(--text); font-weight: 500; }
.cd-dots { display: grid; grid-template-columns: repeat(24, 10px); gap: 4px; margin: 10px 0; }
.cd-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--off); }
.cd-dot.done { background: var(--s-good); } .cd-dot.running { background: var(--s-run); } .cd-dot.waiting { background: transparent; box-shadow: inset 0 0 0 1.5px var(--s-wait); }
.cd-dot.taken_back { background: transparent; box-shadow: inset 0 0 0 1.5px var(--s-warn); } .cd-dot.failed { background: var(--s-bad); }
.cd-tl { position: relative; height: 22px; background: var(--row); border-radius: 4px; margin: 10px 0 4px; overflow: hidden; }
.cd-run { position: absolute; top: 5px; height: 12px; background: var(--s-run); border-radius: 2px; }
.cd-back { position: absolute; top: 1px; color: var(--s-warn); font-size: 14px; transform: translateX(-50%); }
.cd-now { position: absolute; right: 0; top: 0; bottom: 0; width: 1.5px; background: var(--red); }
.cd-gbar { display: inline-flex; width: 120px; height: 6px; background: var(--control); border-radius: 3px; overflow: hidden; vertical-align: middle; }
.cd-gbar .o { background: var(--muted); } .cd-gbar .y { background: var(--s-run); }
@media (max-width: 900px) { .cd-strip, .cd-parts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 480px) { .cd-strip, .cd-parts { grid-template-columns: minmax(0, 1fr); } .cd-dots { grid-template-columns: repeat(16, 10px); } }
.cd-heads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; } .cd-heads .big-v { font: 24px var(--mono); }
.cd-heat-scroll { overflow-x: auto; max-width: 100%; } @media (max-width: 480px) { .cd-heads { grid-template-columns: 1fr 1fr; } .cd-nodes { grid-template-columns: repeat(16, 1fr); } .cd-sq { width: auto; aspect-ratio: 1; } }
#cd-gpus { overflow-x: auto; } @media (max-width: 480px) { .cd-gbar { width: 60px; } }
.row > .grow { min-width: 0; }
.cap-req { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-top: 1px solid var(--row); }
.cap-req:first-of-type { border-top: 0; } .cap-req p { margin: 0; } .cap-req input[type=number] { width: 110px; }
#sec-notifications input[type=time] { width: 140px; flex: none; }

/* ---------------------------------------------------------------- the visual review's fixes (groups 1–2) */
.composer-row { z-index: 2; }
.keyline.warn { color: var(--s-warn); }
@media (max-width: 480px) {
  body.settings-body .sec-nav { display: none; }
}
@media (min-width: 761px) { .bench-bar { background: var(--ground); border-top: 1px solid var(--hairline); } .bench-main { padding-bottom: 150px; } }
.nb-recover .fork > .option.selected { box-shadow: inset 0 0 0 1px var(--muted); }
.nb-recover .fork > .option.selected .opt-dot { background: var(--text); border-color: var(--text); }
.files a, #files a { color: var(--text); font-family: var(--mono); font-size: 13px; }
body.settings-body .card label.check { gap: 12px; min-height: 44px; }

/* ---------------------------------------------------------------- the project's head and tabs (handoff #3–#9) */
.proj-head-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.proj-id { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.proj-head-top .proj-title-row { gap: 20px; }
/* the project's spend: a number, no cap (ADR-0195 decision 5, ADR-0243 d15) */
header.top .me .proj-spend { display: inline-flex; align-items: center; height: 28px; margin-right: 24px; cursor: default; }
header.top .me .proj-spend .spend-num { white-space: nowrap; font: 12px var(--mono); color: var(--muted); }
.sec-bar { display: flex; align-items: center; gap: 16px; margin: 4px 0 14px; min-height: 40px; }
.sec-bar h2 { margin: 0; font-size: 18px; }
.dot.aiyo { background: var(--s-run); } .dot.person { background: var(--s-person); }
.dot.good { background: var(--s-good); } .dot.bad { background: var(--s-bad); } .dot.warn { background: var(--s-warn); }
.who-dot .dot, #changes .dot, .where-row .dot { width: 8px; height: 8px; }
.ptr.head { padding-top: 0; padding-bottom: 10px; border-top: 0; font-size: 13px; color: var(--muted); font-weight: 400; }
.ptr .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ptr .who .v-faint { font-family: var(--mono); font-size: 12px; }
/* Compute's jobs */
#jobs.ptable .ptr { grid-template-columns: 24px minmax(0, 1fr) minmax(0, 150px) minmax(0, 150px) minmax(0, 170px); gap: 20px; padding: 18px 16px; }
#jobs.ptable .ptr.head { padding: 0 16px 10px; }
.card.job-fail { display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; }
.card.job-fail p { margin: 4px 0 6px; }
.over-time { margin-top: 32px; }
.where-row { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.where-row .bar { height: 3px; }
.card.row-card { display: flex; align-items: center; gap: 12px; color: var(--text); }
.card.row-card .widget-title { margin: 0; }
a.card.row-card:hover { background: var(--raised); }
/* Files & Code */
.files-bar .chip.mono { font-family: var(--mono); }
table.files-wide { width: 100%; }
table.files-wide td, table.files-wide th { padding: 14px 16px; }
table.files-wide th { font-weight: 400; color: var(--muted); font-size: 13px; }
table.files-wide th.num, table.files-wide td.num { text-align: left; width: 110px; }
table.files-wide td:nth-child(3) { width: 150px; } table.files-wide td:nth-child(4) { width: 100px; }
.who-dot { display: inline-flex; align-items: center; gap: 8px; }
#changes .change { gap: 10px; min-height: 30px; }
#changes .v-faint { font-family: var(--mono); font-size: 12px; }
.proj-side .cg-card, .files-grid .cg-card { padding: 0; overflow: hidden; }
.proj-side .cg-card .viz-bar, .files-grid .cg-card .viz-bar { padding: 16px 18px 8px; flex-wrap: wrap; }
.proj-side .cg-card .cg-crumbs, .proj-side .cg-card .legend, .proj-side .cg-card .note, .files-grid .cg-card .cg-crumbs, .files-grid .cg-card .legend, .files-grid .cg-card .note { padding: 0 18px; }
.proj-side .cg-card .note, .files-grid .cg-card .note { padding-bottom: 14px; }
.proj-side .cg-scroll { height: 360px; }
/* People */
#members.ptable .ptr { grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1.3fr) 170px 60px 100px; gap: 20px; padding: 16px; }
#members.ptable .ptr.head { padding: 0 16px 10px; }
#members.ptable select { width: 100%; }
.person-tri::before { content: "△"; font-size: 14px; color: var(--muted); }
.person-tri.lead::before { color: var(--s-person); }
.person-tri.member::before { content: "▲"; color: var(--s-run); }
.person-tri.viewer::before { color: var(--faint); }
dl.roles { display: grid; grid-template-columns: 110px 1fr; gap: 10px 16px; margin: 4px 0 0; font-size: 14px; }
dl.roles dt { color: var(--text); } dl.roles dd { margin: 0; color: var(--muted); }
#add-member { margin-bottom: 8px; }
@media (max-width: 700px) {
  #jobs.ptable .ptr, #members.ptable .ptr { grid-template-columns: 24px minmax(0, 1fr); gap: 4px 12px; }
  #jobs.ptable .ptr > :nth-child(n+3), #members.ptable .ptr > :nth-child(n+3) { grid-column: 2; }
  #jobs.ptable .ptr.head, #members.ptable .ptr.head { display: none; }
  table.files-wide td:nth-child(3), table.files-wide th:nth-child(3), table.files-wide td:nth-child(4), table.files-wide th:nth-child(4) { display: none; }
  .proj-head-top { align-items: flex-start; }
}
.sec-bar > .grow { flex: 1 1 auto; }
.side-set { display: flex; flex-direction: column; gap: 10px; }
.side-set.hidden { display: none; }
/* the Notebook tab lays out its own columns, flush with the page (handoff #5) */
.proj-main > section[data-panel=notebook] > .nb-tab { margin: 0 -32px -96px; grid-template-columns: minmax(0, 1fr) 380px; }
.proj-main > section[data-panel=notebook] > .nb-tab > .nb-side { padding-top: 0; }
@media (min-width: 1001px) { .nb-tab > .nb-main { padding: 0 32px 48px; } }
.nb-bar > .grow { flex: 1 1 auto; }
.nb-bar input[type=search] { width: 320px; }
/* Tools (handoff #7): full width; headings on the ground, not in cards */
section[data-panel=tools] > .card { background: transparent; padding: 0; margin: 0 0 32px; }
section[data-panel=tools] > .card > h2, section[data-panel=tools] > .card > .row > h2 { font-size: 18px; }
section[data-panel=tools] table.data:has(tbody:empty) thead { display: none; }
@media (max-width: 1100px) { .proj-main > section[data-panel=notebook] > .nb-tab { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1000px) { .proj-main > section[data-panel=notebook] > .nb-tab { margin: 0 -16px -32px; } }
/* the notebook page and the bench: a crumb at the left, Desk/Bench and the person at the right, no site menu */
body.nb-body nav.sitetabs { display: none; }
body.nb-body header.top .crumb, body.bench-body header.top .crumb { font-size: 14px; }
header.top .me .seg.bench-seg { margin: 0 20px 0 0; }
.seg.bench-seg > * { display: inline-flex; align-items: center; padding: 6px 14px; font-size: 13px; }
@media (min-width: 761px) { body.bench-body header.top { height: 72px; } }
body.bench-body header.top .seg.bench-seg > * { min-height: 56px; min-width: 88px; justify-content: center; font-size: 16px; }
body.bench-body header.top .bench-back { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; min-height: 56px; font-size: 22px; }
body.bench-body header.top .me button { min-height: 56px; }
/* the round network mark, in a tutorial guide's head */
.helper-mark { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--red-ink); overflow: hidden; flex: none; display: block; }
.helper-mark canvas { width: 100%; height: 100%; display: block; }
/* Plan (handoff #4): the step card in a side column, flush with the page like the other tabs */
@media (min-width: 1201px) {
  .proj-main > section[data-panel=work] > .plan-layout { margin: 0 -32px -96px; gap: 0; grid-template-columns: minmax(0, 1fr) 380px; align-items: stretch; min-height: calc(100vh - 230px); }
  .proj-main > section[data-panel=work] .plan-main { padding: 0 32px 48px; }
  .proj-main > section[data-panel=work] .plan-side { border-left: 1px solid var(--hairline); padding: 0 16px 16px; }
}
.plan-bar > .grow { flex: 1 1 auto; }
.pd-title { font-size: 20px; font-weight: 500; line-height: 1.3; }
.plan-legend > ul.legend { display: inline-flex; flex-wrap: wrap; width: auto; gap: 6px 16px; }
.res3 { align-items: stretch; }
/* the cluster page (handoff #10b): a head row, then the page at full width */
.cd-top { display: flex; align-items: center; gap: 14px; padding: 20px 40px; border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
.cd-backlink { color: var(--muted); font-size: 14px; } .cd-backlink:hover { color: var(--text); }
.cd-top > .grow { flex: 1 1 auto; }
.cd-sep { width: 1px; height: 22px; background: var(--hairline); }
.cd-name { font: 400 24px var(--mono); margin: 0; }
.cd-meta { font-size: 14px; } .cd-meta .v { font-size: 13px; }
#cd-dot .dot { width: 10px; height: 10px; display: block; }
main.cd-main { max-width: none; padding: 24px 40px 80px; margin: 0; }
.cd-sum-h { gap: 8px; } .cd-sum-h .v { font-size: 14px; }
.cd-sum { gap: 10px; }
.cd-jobs { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: 14px; }
.cd-jobs .big-v { font: 30px var(--mono); color: var(--text); } .cd-jobs .big-v.sm { font-size: 18px; margin-left: 14px; color: var(--muted); }
.cd-heat-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: start; }
.cd-heat-card .widget-head { gap: 12px; margin-bottom: 4px; }
.cd-heat-right { display: flex; flex-direction: column; gap: 20px; }
.cd-heat-right .cd-heads { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.cd-heat-right .big-v { font: 26px var(--mono); }
.cd-metric { align-self: flex-start; }
.cd-hrow { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.cd-hrow .cd-h { margin: 0; }
.cd-hrow > .grow { flex: 1 1 auto; }
.cd-plegend { margin: 0; font-size: 12px; color: var(--muted); align-items: center; }
.cd-plegend li { display: inline-flex; align-items: center; gap: 6px; }
.cd-plegend .cd-sq { width: 10px; height: 10px; }
.cd-parts { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cd-part h3 { font-size: 16px; font-weight: 400; }
.cd-part .chip.warm { color: var(--s-warn); box-shadow: inset 0 0 0 1px var(--s-warn-line); background: transparent; }
.cd-nodes { grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 4px; margin: 14px 0; }
.cd-sq { width: auto; height: auto; aspect-ratio: 1; }
.cd-part-n { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--hairline); padding-top: 12px; }
.cd-part-n > div { display: flex; flex-direction: column; gap: 2px; }
.cd-part-n b { font: 400 18px var(--mono); }
.cd-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; align-items: start; }
.cd-two.one { grid-template-columns: minmax(0, 1fr); }
.cd-two .widget-title { margin: 0 0 12px; }
.cd-two .widget-head { gap: 12px; flex-wrap: wrap; }
.cd-arr { padding: 0; background: transparent; }
.cd-dots { grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 5px; }
.cd-dot { width: auto; height: auto; aspect-ratio: 1; }
.cd-arr-n .cd-dot { display: inline-block; width: 8px; height: 8px; vertical-align: middle; }
.cd-arr-n { gap: 6px 16px; }
.cd-prejob { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--row); }
.cd-axis { display: flex; justify-content: space-between; font-size: 11px; padding-top: 8px; }
.cd-tlegend { margin: 0; font-size: 12px; color: var(--muted); }
.cd-key.run { display: inline-block; width: 16px; height: 4px; border-radius: 2px; background: var(--s-run); margin-right: 6px; vertical-align: middle; }
.cd-key.back { color: var(--s-warn); margin-right: 6px; }
.cd-gbar { width: 100%; max-width: 420px; }
@media (max-width: 1100px) { .cd-heat-card, .cd-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .cd-top { padding: 14px 16px; gap: 10px; } .cd-meta { flex-basis: 100%; font-size: 12px; } main.cd-main { padding: 16px 16px 96px; }
  .cd-heat-right .cd-heads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.you-tail { margin-top: 24px; }
a.card.you-link .muted.small { margin-right: 10px; font-weight: 400; }
/* the project's phone app bar (handoff phone #2): ‹, the title with its state under it, ⋯ for the controls */
.proj-back, .proj-more, .proj-state-sm { display: none; }
@media (max-width: 480px) {
  body:has(#layout.proj-layout) header.top { display: none; }
  .proj-head { padding: 10px 12px 0; gap: 4px; }
  .proj-head-top { flex-wrap: nowrap; gap: 6px; align-items: center; }
  .proj-back { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 44px; font-size: 26px; color: var(--muted); }
  .proj-id { flex: 1 1 auto; gap: 0; }
  .proj-id h1 { font-size: 16px; -webkit-line-clamp: 1; }
  .proj-state-sm { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
  .proj-state-sm .node { width: 10px; height: 10px; font-size: 6px; }
  .proj-more { display: inline-flex; min-width: 44px; min-height: 44px; font-size: 20px; justify-content: center; }
  .proj-head-top > .proj-title-row { display: none; }
  #layout.more-open .proj-head-top { flex-wrap: wrap; }
  #layout.more-open .proj-head-top > .proj-title-row { display: flex; flex-basis: 100%; padding: 8px 0 4px 46px; }
  .proj-head .keyline { font-size: 12px; padding-left: 46px; }
  .proj-head .tabs { margin-top: 4px; }
}
/* the plan's sheet on a phone (handoff phone #3): no red frame, the main button full width, Hand off bordered */
@media (max-width: 480px) {
  .plan-side.sheet #plan-detail.needs-you { box-shadow: none; border: 0; }
  .plan-side.sheet #plan-detail { padding: 0; gap: 10px; }
  .plan-side.sheet #plan-detail .row:last-child { flex-wrap: nowrap; }
  .plan-side.sheet #plan-detail .row:last-child > button.primary { flex: 1 1 auto; min-height: 48px; font-size: 16px; }
  .plan-side.sheet #plan-detail .row:last-child > button:not(.primary) { min-height: 48px; }
  .plan-side.sheet #plan-detail .pd-title { font-size: 17px; }
}
/* New project on a phone (handoff phone #4): × and "Start a project" in the bar, Next across the width */
/* New project made from Brainstorm threads (ADR-0200 am. 6): the threads it continues */
ul.new-from { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; }
ul.new-from li { gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--row); font-size: 13px; min-width: 0; }
ul.new-from li:first-child { border-top: 0; }
ul.new-from li .node { margin-top: 3px; }
ul.new-from .stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
ul.new-from .stack > * { margin: 0; }
.new-bar { display: none; }
@media (max-width: 480px) {
  body.new-body header.top { display: none; }
  .new-bar { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 12px; border-bottom: 1px solid var(--hairline); font-size: 15px; }
  .new-bar a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 44px; font-size: 22px; color: var(--muted); }
  .new-bar .v { font-size: 12px; }
  body.new-body .page-head h1 { display: none; }
  .new-next { flex-wrap: wrap; }
  .new-next #create { flex: 1 1 100%; min-height: 52px; font-size: 17px; }
}
a.card.you-link > .grow, .you-head > .grow { flex: 1 1 auto; min-width: 0; }
.node.ring-tri { font-size: 7px; line-height: 1; padding-bottom: 1px; }
.node.ring-tri.sm { font-size: 6px; } .node.ring-tri.lg { font-size: 8px; } .node.ring-tri.xl { font-size: 10px; }
.mp-row .node.ring-tri { width: 12px; height: 12px; }
/* the mini plan: a finished step is a green ring with a check */
.mp-row .node.done { background: var(--surface); }
.mp-row .node.done::after { content: "✓"; font-size: 7px; color: var(--s-good); }
.fb-where .where-chip { flex: 1 1 auto; min-height: 40px; padding: 0 8px 0 12px; }
.fb-where .where-chip #fb-chip-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-shot { gap: 12px; align-items: center; } #fb-file-name { max-width: 260px; }
#au-week .pd-dl dd { text-align: right; }
.nbd-head > .grow { flex: 1 1 auto; min-width: 0; }
#fb-kinds dd, #fb-where dd { text-align: right; } #fb-kinds dt.muted, #fb-where dt.muted { grid-column: 1 / -1; font-size: 13px; }
/* second review: Compute's spend, the CodeGraph widget, People's Remove, Home's project filter */
.proj-side .cg-card, .files-grid .cg-card { background: var(--widget); --surface: var(--widget); border-radius: var(--r-widget); }
.proj-side .cg-card .viz-bar h3, .files-grid .cg-card .viz-bar h3 { margin: 0; font-size: 15px; }
.proj-side .cg-card select { max-width: 170px; text-overflow: ellipsis; padding-right: 26px; }
.cg-crumbs .linkish { color: var(--muted); } .cg-crumbs .linkish:hover { color: var(--text); }
.proj-side .cg-card #cg-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; }
@media (hover: hover) and (pointer: fine) {
  #members .ptr .acts button { opacity: 0; transition: opacity .12s; }
  #members .ptr:hover .acts button, #members .ptr:focus-within .acts button { opacity: 1; }
}
#mt-project { border: 0; background-color: transparent; color: var(--muted); width: auto; min-height: 32px; padding-left: 4px; }
#mt-project:hover { color: var(--text); }
.svc > .grow { flex: 1 1 auto; min-width: 0; }
.ptable.adm.audit .ptr { grid-template-columns: 48px minmax(0, 150px) minmax(0, 2fr) minmax(0, 150px) minmax(0, 1fr); }
#sec-bench > section.card { display: flex; flex-direction: column; gap: 12px; }
#sec-notifications input[type=time] { font-family: var(--mono); }
#runs-table .ptr.pth .v { font-family: var(--sans); }
.card.rc .lk-name { text-transform: lowercase; }
.good-t { color: var(--s-good); }
/* third review: phone overflow, bars, red and nodes */
.b-ring.cur { border-color: var(--text); }
.node.done-tri { color: var(--s-good); }
.pd-head > .grow { flex: 1 1 auto; min-width: 0; }
.nb-spine li.picked span:last-child { text-decoration: none; color: var(--text); }
.fork > .option .v-faint, .nb-recover .fork .option > .v-faint { font-family: var(--sans); }
.nb-inputs .row { flex-wrap: wrap; row-gap: 4px; }
@media (max-width: 700px) {
  .nb-inputs .row > .faint.small { flex-basis: 100%; }
  #runs-table .ptr.pth { display: none; }
  #runs-table .ptr { grid-template-columns: 16px minmax(0, 1fr); gap: 2px 12px; }
  #runs-table .ptr > :nth-child(n+3) { grid-column: 2; }
}
@media (max-width: 480px) {
  /* a project, New project and the bench have no bottom tabs (handoff phone #2–#5): their own bar is the bottom edge */
  body:has(#layout.proj-layout) nav.bottomtabs, body.new-body nav.bottomtabs { display: none; }
  body:has(#layout.proj-layout) .composer-row { bottom: env(safe-area-inset-bottom); }
  body.has-bottomtabs:has(#layout.proj-layout) { padding-bottom: 0; }   /* no tabs here: the thread reaches the bottom edge */
  body:has(#layout.proj-layout) .sheet, body.new-body .sheet { bottom: 0; }
  #mytasks-card .sec-head select, #mytasks-card .sec-head label { display: none; }
  #mytasks .board { grid-auto-flow: row; grid-auto-columns: auto; overflow-x: visible; }   /* columns one under another, */
  #mytasks .bcol { min-height: 0; } #mytasks .bcol:not(:has(a.bcard)) { display: none; }  /* only those with something */
  body.bench-body .bench-main { padding-bottom: 96px; }
}
@media (max-width: 760px) { body.bench-body header.top .seg.bench-seg > * { min-height: 40px; min-width: 64px; font-size: 14px; } }
/* Admin: feedback tabs and states, budget requests in one row */
.node.fb-new { --c: var(--red-ink); } .node.fb-seen { --c: var(--s-wait); }
.fb-item.fixed .fb-text { color: var(--muted); }
.fb-acts { gap: 8px; }
.cap-req-row { align-items: flex-start; gap: 10px; } .cap-req-row > .grow { flex: 1 1 260px; min-width: 0; } .cap-req-row p { margin: 4px 0 0; }
/* cluster page, second pass: pre-emptible rows beside their tracks, the now line, plain metric tabs */
.cd-prejob { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 18px; align-items: center; padding: 12px 0; border-bottom: 0; }
.cd-pre-l { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cd-pre-l .small-btn { align-self: flex-start; margin-top: 4px; }
.cd-tl { overflow: visible; background: transparent; border-top: 1px dashed var(--v-grid, var(--raised-2)); height: 0; margin: 0; top: 0; }
.cd-tl .cd-run { top: -3px; height: 6px; border-radius: 3px; }
.cd-tl .cd-back { top: -11px; font-size: 12px; }
.cd-tl::after { content: ""; position: absolute; right: 0; top: -16px; height: 32px; width: 1.5px; background: var(--red); }
.cd-axis-row { padding-top: 0; } .cd-axis { padding-top: 0; } .cd-axis .now-t { color: var(--red-ink); }
.cd-about { margin-top: 2px; }
.bad-t { color: var(--s-bad); }
.cd-metric { border: 0; gap: 4px; background: transparent; }
.cd-metric button { border: 0; border-radius: var(--r-control); background: transparent; color: var(--muted); }
.cd-metric button[aria-pressed="true"] { background: var(--raised); color: var(--text); }
.cd-gcell { width: 45%; } .cd-gcell .cd-gbar { width: 100%; max-width: none; height: 6px; }
@media (max-width: 700px) { .cd-prejob { grid-template-columns: minmax(0, 1fr); gap: 14px; } .cd-axis-row > span:first-child { display: none; } }
/* the bench's orb: see-through until touched, and movable (press and drag) */
@media (max-width: 760px), (pointer: coarse) {
  body.bn .helper-orb { opacity: .6; transition: opacity .15s; }
  body.bn .helper-orb:active, body.bn .helper-orb.dragging, body.bn .helper-orb:focus-visible { opacity: 1; }
}
body.bn .helper-orb.dragging { cursor: grabbing; transition: none; }
.b-stepn { display: none; }
@media (max-width: 480px) {
  body.bench-body header.top .wordmark { display: none; }
  body.bench-body header.top .crumb { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; font-size: 15px; color: var(--text); }
  body.bench-body header.top .crumb .here { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  body.bench-body header.top .bench-back { min-width: 40px; min-height: 44px; font-size: 24px; }
  body.bench-body .b-stepn { display: inline; margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
  body.bench-body header.top .me .seg.bench-seg { display: none; }
}
.side-dot { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; } #side-nb-say, #side-cmp-say { white-space: nowrap; }
#people-err:empty, .cap-req .err:empty { display: none; }
.model-pick { min-width: 15em; }   /* Admin → Models: one width for every grade (ADR-0149) */

/* pan and zoom (ADR-0152 D2): a graph in a box of fixed height, moved by dragging, zoomed by wheel, pinch or the corner buttons */
.pz { overflow: hidden; touch-action: none; }
.pz > svg { cursor: grab; user-select: none; }
.pz.dragging > svg { cursor: grabbing; }
.pz-ctl { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; z-index: 3; }
.pz-b { min-width: 30px; height: 28px; padding: 0 8px; font: 400 13px/1 var(--sans); color: var(--muted); background: var(--ground);
  border: 1px solid var(--control); border-radius: var(--r-control); cursor: pointer; }
.pz-b:hover { color: var(--text); border-color: var(--control-hover); }
.pz-b:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--red-ink); }
@media (pointer: coarse) { .pz-b { min-width: 44px; height: 44px; } }

/* The Thread as an inbox (ADR-0152 Q2, am.): a thin list of conversations on the left; the opened one beside it,
   scrolling on its own and opening at its newest turn, with its reply box inside it. Side by side down to phones. */
.thread-panel.inbox { display: grid; grid-template-columns: 240px minmax(0, 1fr) 320px; gap: 0; align-items: stretch;
  min-height: 460px; }
/* ADR-0263 d5: what used to sit above the threads is a card beside them: waiting on you first, then the work, Running
   now, the tutorial last */
.ws-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; overflow-y: auto;
  border-left: 1px solid var(--hairline); padding: 0 0 16px 14px; margin-left: 20px; }
.ws-side-set { display: flex; flex-direction: column; gap: 10px; }
.ws-side-set:empty { display: none; }
.ws-side .card, .ws-side .ws-found-host { margin: 0; padding: 12px 14px; }
.ws-side .card h2, .ws-side .widget-title { font-size: 13px; }
.ws-side #ws-side-you > :not(.hidden) { box-shadow: inset 2px 0 0 var(--s-person); }
.ws-side textarea { min-height: 72px; }
.ws-side .row { flex-wrap: wrap; }
.ws-side select { max-width: 100%; }
.ws-side .ws-side-run { padding: 2px 0; }
.ac-line-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%;
  background: none; border: 0; padding: 6px 4px; border-radius: var(--r-chip); text-align: left; color: var(--text); font: inherit;
  font-size: 13px; min-height: 0; }
.ac-line-row:hover { background: var(--raised); }
.ac-line-row .v-faint { white-space: nowrap; }
.ac-line-open { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 8px 18px; }
@media (max-width: 1180px) {
  .thread-panel.inbox { grid-template-columns: 240px minmax(0, 1fr); }
  .ws-side { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--hairline); margin: 12px 0 0; padding: 12px 0 0; overflow: visible; }
}
/* it takes the column's height left below the project's head (ticket 20; it was max(460px, 100vh - 250px), a guess at
   the head's height that overflowed the window when the head was taller); the page scrolls only below 460px */
.proj-main > .thread-panel.inbox { flex: 1 1 0; }
/* the thread reaches the window's bottom edge: no padding under it, so the composer sits at the bottom and the
   messages get every pixel above it (the maintainer, 2026-11-15); the composer keeps its own bottom gap */
.proj-body > .proj-main:has(> .thread-panel.inbox:not(.hidden)) { padding-bottom: 0; }
.inbox-list { display: flex; flex-direction: column; gap: 2px; padding-right: 12px; border-right: 1px solid var(--hairline);
  min-width: 0; overflow-y: auto; }
.inbox-sec { font-size: 12px; color: var(--muted); padding: 14px 8px 4px; display: flex; gap: 6px; align-items: baseline; }
.inbox-sec:first-child { padding-top: 0; }
.inbox-row { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; align-items: start; width: 100%; text-align: left;
  background: none; border: 0; border-radius: var(--r-chip); padding: 8px; color: var(--text); cursor: pointer; font: inherit; min-height: 0; }
.inbox-row .node { margin-top: 3px; }
.inbox-row:hover { background: var(--raised); }
.inbox-row.sel { background: var(--widget); }
.inbox-row.is-done .inbox-title, .inbox-row.is-done .inbox-sub, .inbox-row.is-done .inbox-when { opacity: .55; }
.inbox-row.is-done .node { opacity: .7; }
.inbox-sec-done { color: var(--faint); }
/* ADR-0271 d15: Autonomous, aiyo's own work: faded rows; its stream read-only */
.inbox-sec-auto { color: var(--faint); }
.inbox-row.is-auto .inbox-title, .inbox-row.is-auto .inbox-sub { opacity: .6; }
.inbox-row.is-auto.sel .inbox-title { opacity: 1; }
.auto-stream { display: flex; flex-direction: column; gap: 12px; padding: 8px 0 24px; }
.auto-call { padding-left: 2px; }
.auto-handin { background: var(--widget); border-radius: var(--r-widget); padding: 12px 14px; }
.inbox-row:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--red-ink); }
.inbox-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.inbox-title { font-size: 13px; line-height: 1.4; }
.inbox-row.needs .inbox-title { font-weight: 500; }
.inbox-sub { font-size: 12px; color: var(--faint); line-height: 1.4; }
.inbox-row .needs-word { color: var(--s-person); }
.inbox-when { display: none; }
.inbox-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding-left: 28px; }
.conv-head { flex: none; display: flex; gap: 12px; align-items: center; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--hairline); }
.conv-titles { display: flex; flex-direction: column; min-width: 0; }
.conv-title { margin: 0; font-size: 16px; font-weight: 500; }
.conv-back { display: none; }
.conv-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 4px 16px 0; }
.conv-scroll .timeline { max-width: 760px; }
.conv-scroll #talk-chat:empty { display: none; }
.conv-reply { flex: none; display: flex; gap: 8px; align-items: center; max-width: 760px; margin: 8px 0 0;
  padding: 4px 6px 4px 14px; background: var(--widget); border: 1px solid var(--control); border-radius: var(--r-option); }
.conv-reply.hidden { display: none; }
.conv-reply:focus-within { border-color: var(--red-ink); }
.conv-reply input { flex: 1; border: 0; background: transparent; padding: 0; min-height: 40px; }
.conv-reply input:focus { border: 0 !important; box-shadow: none !important; }
@media (max-width: 700px) {
  /* the column's height left under the project's head (the flex chain above), not a guess at the head's height */
  .thread-panel.inbox { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .thread-panel.inbox { grid-template-rows: auto minmax(0, 1fr); }
  .thread-panel.inbox:not(.reading) .ws-side { display: none; }
  .thread-panel.inbox.reading .ws-side { order: -1; max-height: 34vh; overflow-y: auto; border-top: 0; border-bottom: 1px solid var(--hairline);
    margin: 0 0 8px; padding: 0 0 8px; }
  .thread-panel.inbox.reading .ws-side:not(:has(.needs-you, #ws-side-you > :not(.hidden), .tk-cards > *)) { display: none; }
  .inbox-list { border-right: 0; padding-right: 0; }
  .inbox-pane { display: none; padding-left: 0; }
  .thread-panel.inbox.reading .inbox-list { display: none; }
  .thread-panel.inbox.reading .inbox-pane { display: flex; }
  .conv-back { display: inline-flex; }
}
.timeline.activity::before { content: ""; position: absolute; left: 10.5px; top: 4px; bottom: 4px; width: 1px; background: var(--edge); }
.timeline.activity { gap: 16px; }
#activity-card { margin-top: 16px; }
.pd-sub { margin: 18px 0 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.pd-hist { gap: 12px; }
.pd-hist .ev-text { font-size: 13px; }
@media (max-width: 1000px) {
  .thread-panel.inbox { grid-template-columns: minmax(0, 1fr); }
  .inbox-list { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--hairline); padding-bottom: 12px; margin-bottom: 16px; }
  .inbox-pane { padding-left: 0; }
  .inbox .composer-row { margin: auto -16px -32px; padding: 8px 16px; }
}

/* The interview (ADR-0152 Q1): the conversation so far above, scrolling; the waiting question's background small,
   the question itself large, its reason, choices and answer box together; lookups beside, under the plan so far */
.iv-talk { position: relative; max-height: 34vh; overflow-y: auto; padding: 4px 4px 4px 0; margin: 4px 0 20px;
  border-bottom: 1px solid var(--hairline); padding-bottom: 18px; }
.iv-talk .timeline { gap: 16px; max-width: none; }
.iv-talk .timeline::before { content: ""; position: absolute; left: 10.5px; top: 4px; bottom: 4px; width: 1px; background: var(--edge); }
.iv-talk .ev-text { font-size: 14px; }
.iv-bg { color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 720px; margin-bottom: 10px; }
.iv-bg p { margin: 0 0 6px; }
#plan-extras-card { margin-top: 12px; }
#plan-extras-card .activity, #plan-extras-card details { font-size: 13px; }

/* What waits on you in the Thread, in red with black text (ADR-0152 am. 3): the choices of a
   question you can answer, its own-words box, a number to give, starters, and the reply box. Look-only stays grey. */
.inbox-pane .ev-q.mine .fork > .option, .inbox-pane .ev-q.mine .num-ask {
  background: var(--red-fill-soft); color: var(--on-red); border-color: transparent; }
.inbox-pane .ev-q.mine .fork > .option:hover { background: var(--red-hover); }
.inbox-pane .ev-q.mine .fork > .option *, .inbox-pane .ev-q.mine .num-ask * { color: var(--on-red); }
.inbox-pane .ev-q.mine .fork > .option .muted, .inbox-pane .ev-q.mine .fork > .option .v-faint, .inbox-pane .ev-q.mine .num-ask .v-faint { color: rgba(0, 0, 0, .62); }
.inbox-pane .ev-q.mine .fork > .option.selected { background: var(--red); box-shadow: inset 0 0 0 2px var(--on-red); }
.inbox-pane .ev-q.mine .opt-dot { border-color: var(--on-red); }
.inbox-pane .ev-q.mine .option.selected .opt-dot { background: var(--on-red); border-color: var(--on-red); }
.inbox-pane .ev-q.mine .fork > .option.own-words { border: 1px dashed rgba(0, 0, 0, .45); }
.inbox-pane .ev-q.mine .fork textarea, .inbox-pane .ev-q.mine .num-ask input { color: var(--on-red); background: transparent; }
.inbox-pane .ev-q.mine .fork textarea::placeholder { color: var(--on-red); opacity: .55; }
.inbox-pane .ev-q.mine .fork > .option::before { background: var(--red); }
.inbox-pane .ev-q.mine .chip-btn { background: var(--red-fill-soft); color: var(--on-red); border-color: transparent; }
.inbox-pane .ev-q.mine .chip-btn:hover { background: var(--red-hover); }
.inbox-pane .ev-q.mine :focus-visible { outline: 2px solid var(--on-red); outline-offset: -2px; box-shadow: none; }
.inbox-pane .ev-q.mine .fork textarea:focus-visible { outline: none; }
/* the reply box ("Write to the project") is the page's own ground with a red outline, like the notebook's light cards:
   black in dark, white in light (ADR-0195 decision 4) */
.inbox-pane .conv-reply { background: var(--reply-bg); color: var(--text); border-color: var(--red-ink); }
.inbox-pane .conv-reply input { color: var(--text); background: transparent; }
.inbox-pane .conv-reply input::placeholder { color: var(--muted); opacity: 1; }
.inbox-pane .conv-reply button { color: var(--red-ink); }
.inbox-pane .conv-reply:focus-within { border-color: var(--red-ink); box-shadow: inset 0 0 0 1px var(--red-ink); }
.inbox-pane .conv-reply :focus-visible { outline: 2px solid var(--red-ink); outline-offset: -2px; box-shadow: none; }
.inbox-pane .conv-reply input:focus-visible { outline: none; }
.inbox-pane .ev-q.mine .num-ask input[type=range] { accent-color: var(--on-red); }
.inbox-pane .ev-q.mine .chip-btn.on { background: var(--red); box-shadow: inset 0 0 0 2px var(--on-red); }

/* Additional comments under a question's choices (ADR-0152 am. 4): sent with the choice, or alone if none is picked */
.ask-comments { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.ask-comments textarea { min-height: 56px; background: var(--widget); border: 1px solid var(--control); border-radius: var(--r-option); padding: 10px 14px; }
.inbox-pane .ev-q.mine .ask-comments textarea { background: var(--red-fill-soft); color: var(--on-red); border-color: transparent; }
.inbox-pane .ev-q.mine .ask-comments textarea::placeholder { color: var(--on-red); opacity: .55; }
.inbox-pane .ev-q.mine .ask-comments textarea:focus { box-shadow: inset 0 0 0 2px var(--on-red); border-color: transparent; }

/* Interactive sessions (ADR-0155): the conversation two thirds, what it is making one third; in the Thread's inbox
   and alone in Focus mode. Only the holder's controls are live; what waits on them is red with black text. */
.ses { display: flex; flex-direction: column; gap: 14px; min-height: 0; height: 100%; container-type: inline-size; }
.ses-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap;
  padding-bottom: 12px; border-bottom: 1px solid var(--hairline); }
.ses-head .ses-err:empty { display: none; }
.ses-head .ses-err { flex-basis: 100%; order: 9; }
.ses-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ses-title { margin: 0; font-size: 18px; font-weight: 500; }
.ses-focus .ses-title { font-size: 24px; }
.ses-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; min-height: 0; flex: 1 1 auto; }
@container (max-width: 760px) { .ses-body { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 701px) {   /* one column beside the side cards: the conversation takes the room, the results scroll below */
  @container (max-width: 760px) {
    .ses-body { display: flex; flex-direction: column; }
    .ses-body > .ses-convo { flex: 1 1 auto; min-height: 0; }
    .ses-body > .ses-side { flex: 0 1 auto; max-height: 38%; align-self: stretch; border-top: 1px solid var(--hairline); padding-top: 10px; }
  }
}
.ses-convo { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.ses-scroll { flex: 1 1 auto; min-height: 200px; overflow-y: auto; padding-right: 4px; }
.ses-turns { max-width: none; gap: 18px; }
.ses-turns::before { content: ""; position: absolute; left: 10.5px; top: 4px; bottom: 4px; width: 1px; background: var(--edge); }
.ses-result .ev-text { border-left: 2px solid var(--s-run); padding-left: 10px; }
.ses-hint { margin: 4px 0; }
.ses-compose { display: flex; flex-direction: column; gap: 6px; }
.ses-reply { background: var(--red-fill-soft); border-color: transparent; max-width: none; }
.ses-reply input, .ses-reply button { color: var(--on-red); }
.ses-reply input::placeholder { color: var(--on-red); opacity: .55; }
.ses-reply:focus-within { box-shadow: inset 0 0 0 2px var(--on-red); border-color: transparent; }
.ses-convo .ev-q.mine .fork > .option, .ses-convo .ev-q.mine .ask-comments textarea {
  background: var(--red-fill-soft); color: var(--on-red); border-color: transparent; }
.ses-convo .ev-q.mine .fork > .option * { color: var(--on-red); }
.ses-convo .ev-q.mine .fork > .option .muted, .ses-convo .ev-q.mine .fork > .option .v-faint { color: rgba(0, 0, 0, .62); }
.ses-convo .ev-q.mine .fork > .option.selected { background: var(--red); box-shadow: inset 0 0 0 2px var(--on-red); }
.ses-convo .ev-q.mine .opt-dot { border-color: var(--on-red); }
.ses-convo .ev-q.mine .option.selected .opt-dot { background: var(--on-red); }
.ses-convo .ev-q.mine .ask-comments textarea::placeholder { color: var(--on-red); opacity: .55; }
.ses-closebox { border-top: 1px solid var(--hairline); padding-top: 8px; }
.ses-close summary { cursor: pointer; color: var(--text); font-weight: 500; padding: 6px 0; }
.ses-close textarea { width: 100%; margin: 8px 0; }
.ses-readback { margin: 6px 0 8px 18px; padding: 0; font-size: 13px; }
.ses-closed { background: var(--widget); border-radius: var(--r-widget); padding: 14px 16px; }
.ses-closed p { margin: 6px 0; }
/* closing signs the session's entry (ADR-0216 D5): the typed name and the witness; the record under the close */
.ses-signs { margin: 4px 0 8px; }
.ses-signrow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ses-signrow input { flex: 1 1 220px; min-width: 0; } .ses-signrow select { flex: 0 1 220px; width: auto; }
.ses-entry { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 10px; padding-top: 10px; border-top: 1px solid var(--hairline); }
.ses-sig { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .ses-sig .node.xs { width: 10px; height: 10px; flex: 0 0 10px; }
.ses-seal { font-family: var(--mono); font-size: 11px; }
.ses-amend { padding-left: 18px; color: var(--body); }
.ses-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; overflow-y: auto; }
.ses-run, .ses-decision { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ses-run.accepted { box-shadow: inset 2px 0 0 var(--s-good); }
.ses-decision.on { box-shadow: inset 2px 0 0 var(--s-warn); }
.ses-fig { width: 100%; border-radius: 6px; background: var(--paper); }
.ses-steps { margin: 0 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.ses-steps p { margin: 4px 0; }
.ses-sign { display: flex; flex-direction: column; gap: 6px; }
.ses-upload { display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.inbox-pane.is-session .conv-scroll { overflow: hidden; display: flex; padding-top: 0; padding-bottom: 0; }
.inbox-pane > .err:empty { display: none; }   /* an empty error line takes no room under the composer */
.inbox-pane.is-session #timeline { flex: 1; max-width: none; }
.inbox-pane.is-session #timeline::before { display: none; }
/* a pane drawn where the timeline goes (New thread, a project thread, a task) is not a timeline: no spine through it */
#timeline:has(> .ws-new-title, > .bs-with-actions, > .tk-thread-main, > .tk-thread-page)::before { display: none; }
.inbox-pane.is-session .conv-head { border-bottom: 0; padding-bottom: 0; margin: 0; }
.inbox-pane.is-session .conv-head:not(:has(.conv-back:not([style*="none"]))) { display: none; }
@media (min-width: 701px) { .inbox-pane.is-session .conv-head { display: none; } }
/* Focus mode: the session alone */
.ses-main { padding: 20px 32px 24px; height: calc(100vh - 52px); display: flex; flex-direction: column; gap: 10px; }
.ses-main #ses-host { flex: 1 1 auto; min-height: 0; }
@media (max-width: 700px) { .ses-main { padding: 16px; height: auto; } .ses-scroll { max-height: 60vh; } }
.ses-side { justify-content: flex-start; }
.ses-side > .empty-state { flex: none; margin: 8px 0; }
.ses-side > * { flex: none; margin-top: 0; } .ses-side { align-self: start; max-height: 100%; }
.ses-grab { display: none; }
@media (max-width: 700px) {
  .ses-side { position: fixed; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom)); z-index: 15; max-height: 70vh;
    background: var(--widget); border-radius: var(--r-widget) var(--r-widget) 0 0; box-shadow: var(--overlay); padding: 0 16px 16px;
    transform: translateY(calc(100% - 48px)); transition: transform .2s ease; overflow-y: auto; align-self: auto; }
  .ses-side.open { transform: none; }
  .ses-grab { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; min-height: 48px; background: none;
    border: 0; color: var(--text); position: sticky; top: 0; background: var(--widget); padding-top: 6px; }
  .ses-body { padding-bottom: 60px; }
}
@media (prefers-reduced-motion: reduce) { .ses-side { transition: none; } }
@media (max-width: 700px) { .ses-side .card { background: var(--raised); } }
.ses-prev { margin-bottom: 8px; } .ses-prev summary { cursor: pointer; color: var(--muted); } .ses-prev .timeline { margin-top: 10px; opacity: .8; }

/* "How this was made" (ADR-0163) */
.how { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.how h3 { margin: 0 0 6px; font-size: 1rem; }
.how-row { display: grid; grid-template-columns: 7em 1fr; gap: 8px; padding: 3px 0; }
.how-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.how .chip.dashed { border-style: dashed; opacity: .85; }
.how-details summary { cursor: pointer; color: var(--muted); margin-top: 6px; }

/* views (ADR-0164): a sandboxed frame per view */
.view-box { min-height: 420px; }
.view-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
/* Adding a cluster (ADR-0157): one dialog, five steps */
.page-head.row-head { display: flex; gap: 16px; align-items: flex-start; }
dialog.add-cl { display: none; }
dialog.add-cl[open] { display: flex; flex-direction: column; gap: 14px; }
.add-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; flex-wrap: wrap; }
.add-steps li { display: flex; gap: 6px; align-items: center; color: var(--muted); }
.add-steps li.now { color: var(--text); }
.add-fork { margin: 0; }
.add-fork > .option::before { display: none; }
.add-cl label.stack { gap: 4px; }
.add-part { gap: 6px; align-items: center; margin-right: 14px; }
.part-order { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.part-order li { padding: 2px 0; }
.part-order li.off { color: var(--muted, inherit); }
.part-order button { min-width: 28px; padding: 0 6px; }
/* ADR-0265 R4: the GPU tag on a ticked partition; pressed = used for GPU work */
.part-order button.chip { min-width: 0; border: 1px solid var(--control); background: transparent; color: var(--muted); cursor: pointer; }
.part-order button.chip.on { background: var(--raised); color: var(--text); }
.add-summary { padding: 8px 0; border-top: 1px solid var(--line, var(--control)); border-bottom: 1px solid var(--line, var(--control)); }
/* what each person brings (ADR-0158) */
.brings-group { gap: 4px; margin-bottom: 8px; }
.brings-row { gap: 8px; align-items: center; }
.brings-row.off { color: var(--faint); }
.reach-wrap { margin-left: 26px; gap: 4px; display: flex; flex-direction: column; }
.reach-row { gap: 6px; align-items: center; }
.reach-row input { min-width: 0; }
/* what a storage's walk found (ADR-0162) */
.walk-tree { list-style: none; margin: 4px 0 0 0; padding-left: 14px; }
.walk-tree .walk-tree { padding-left: 18px; }
.walk-view { margin: 6px 0; max-height: 320px; overflow: auto; max-width: 640px; }

/* a view's look switch (ADR-0168): AIYO or the library's own */
.view-look { display: flex; gap: 4px; justify-content: flex-end; margin: 0 0 6px; }
.view-look .chip-btn.on { color: var(--text); background: var(--raised); }
.view-frame { background: var(--widget); border-color: var(--control); }

/* Infra: a partition's use and a folder's space (ADR-0166); your share drawn over everyone's */
.bar.share { position: relative; height: 5px; }
.bar.share > span { position: absolute; left: 0; top: 0; height: 5px; }
.bar.share > span.yours { background: var(--s-person); }
.cl-extras { gap: 8px; margin-top: 6px; }
.part-use { gap: 4px; }
.plain-link { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.plain-link:hover { color: var(--text); }
/* Add a machine (ADR-0167) */
.machine-steps { margin: 6px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.machine-cmd { gap: 8px; align-items: center; background: var(--raised); border-radius: 6px; padding: 8px 10px; }
.machine-cmd code { overflow-x: auto; white-space: nowrap; font-size: 12px; }

/* Admin → Skills (ADR-0175 13): name, where from, findings, the harness's mark */
.ptable.adm.sk .ptr { grid-template-columns: minmax(0, 1.4fr) 90px minmax(0, 2fr) 150px; }
.ptable.adm.sk .ptr .v { font-family: inherit; }
@media (max-width: 700px) { .ptable.adm.sk .ptr { grid-template-columns: minmax(0, 1fr); } }
.ses-review h3 { margin: 0 0 4px; } .ses-review h4 { margin: 16px 0 6px; color: var(--muted); font-weight: 500; }
.ses-review .small { margin: 3px 0; word-break: break-word; } .ses-review code { white-space: pre-wrap; }
.ses-file { max-height: 50vh; overflow: auto; font-size: 12px; padding: 10px; border: 1px solid var(--hairline); }


/* ---------------------------------------------------------------- product UI v2: shared classes (ADR-0192 §I, PRODUCT_UI_V2.md)
   The notebook desk and bench build on these (their own rules are in nb.css). */
/* a tab bar opens each column: a segmented bar, red in dark (black ink) and white with red dividers in light */
.tabbar { display: flex; align-items: stretch; height: 33px; flex: none; border-radius: var(--r-control); overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--red-ink); background: var(--tab-bg); color: var(--tab-ink); font-size: 13px; }
.tabbar.bench { height: 44px; font-size: 15px; }
.tabbar > button, .tabbar > a, .tabbar > span { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 0; height: auto; padding: 0 12px; margin: 0; border: 0; border-radius: 0; background: transparent; color: inherit;
  font: inherit; white-space: nowrap; text-decoration: none; cursor: pointer; }
.tabbar > span { cursor: default; }
.tabbar > * + * { border-left: 1px solid var(--tab-sep); }
.tabbar > .grow { flex: 100 1 auto; justify-content: flex-start; }
.tabbar > button:hover, .tabbar > a:hover { background: var(--tab-hover); color: inherit; border-color: var(--tab-sep); }
.tabbar > .on, .tabbar > [aria-selected="true"], .tabbar > [aria-pressed="true"] { background: var(--tab-on-bg); color: var(--tab-on-ink); }
.tabbar > .on:hover { background: var(--tab-on-bg); color: var(--tab-on-ink); }
.tabbar > :focus-visible { outline: none; box-shadow: inset 0 0 0 2px currentColor; }
.tabbar > :disabled { color: inherit; opacity: .5; cursor: default; background: transparent; }
.tabbar .n { font: 11px var(--mono); opacity: .8; }
/* an action card: something you act on (a timer, a recipe, an aiyo change, a question, a stepper). Grey with a red
   outline in both themes; its main button is solid red with black ink */
.act-card { --surface: var(--act-bg); background: var(--act-bg); color: var(--act-ink); box-shadow: inset 0 0 0 1px var(--act-ring);
  border-radius: var(--r-widget); padding: 14px 16px; margin-bottom: 10px; }
.act-card :is(h2, h3, h4, .widget-title, .name, a:not(.btn)) { color: var(--act-ink); }
.act-card :is(.muted, .faint, .v-faint, .small.muted) { color: var(--act-muted); }
.act-card hr, .act-card .act-line { border: 0; border-top: 1px solid var(--act-line); margin: 10px 0; }
.act-card .act-fill { background: var(--act-fill); border-radius: var(--r-control); }
.act-card :is(button, .btn):not(.primary) { border-color: var(--act-btn); color: var(--act-ink); background: transparent; }
.act-card :is(button, .btn):not(.primary):hover { background: var(--act-fill); border-color: var(--act-btn); color: var(--act-ink); }
.act-card :is(button, .btn).primary { background: var(--red); border-color: var(--red); color: var(--on-red); }
.act-card :is(button, .btn).primary:disabled { background: var(--red-disabled-bg); border-color: var(--red-disabled-bg); color: var(--red-disabled-ink); cursor: default; }   /* ADR-0271 d23: an off Start looks off */
.act-card :is(button, .btn):focus-visible { box-shadow: 0 0 0 2px var(--act-bg), 0 0 0 3.5px var(--act-ink); }
.act-card :is(input, textarea, select) { border-color: var(--act-btn); color: var(--act-ink); }
.act-card .node { box-shadow: 0 0 0 1.5px var(--act-ink); }
.act-card .node.halo, .act-card .node.running { box-shadow: 0 0 0 1.5px var(--act-ink), 0 0 0 4px var(--act-fill); }
/* an ask or notes card: where you write to AIYO or add a note (green ring, solid green chips) */
.ask-card { --surface: var(--ground); background: var(--ground); box-shadow: inset 0 0 0 1px var(--ask-ring);
  border-radius: var(--r-widget); padding: 14px 16px; margin-bottom: 10px; }
.ask-card :is(textarea, input:not([type=checkbox], [type=radio])) { background: var(--widget); border-color: var(--control); }
.ask-card :is(textarea, input):focus { border-color: var(--ask-ring) !important; }
.ask-card :is(button, .btn, .chip-btn) { background: var(--ask-btn); border-color: var(--ask-btn); color: var(--ask-btn-ink); font-weight: 500; }
.ask-card :is(button, .btn, .chip-btn):hover { background: color-mix(in srgb, var(--ask-btn) 85%, var(--text)); border-color: var(--ask-btn); color: var(--ask-btn-ink); }
.ask-card :is(button, .btn).quiet { background: transparent; border-color: transparent; color: var(--muted); font-weight: 400; }
/* a static widget: filled, no border */
.widget { --surface: var(--widget); background: var(--widget); border-radius: var(--r-widget); padding: 14px 16px; margin-bottom: 10px; }
/* a linked chip ("PBS ▸", the ▸ written in its text): opens the thing in the panel */
.chip-link, button.chip-link { display: inline-flex; align-items: center; gap: 6px; padding: 0 7px; min-height: 0; border: 0;
  border-radius: var(--r-chip); background: transparent; box-shadow: inset 0 0 0 1px var(--red-ink); color: var(--text);
  font: inherit; font-size: 13px; line-height: 22px; white-space: nowrap; cursor: pointer; text-decoration: none; }
.chip-link:hover, button.chip-link:hover { background: var(--red-wash); color: var(--text); }
.chip-link:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--red-ink), 0 0 0 2px var(--ground), 0 0 0 3.5px var(--red-ink); }
/* a chip that is one choice of several (Who's in it): the chosen one is filled, as a primary button */
button.chip-link[role="radio"][aria-checked="true"] { background: var(--red); box-shadow: none; color: var(--on-red); font-weight: 500; }
button.chip-link[role="radio"][aria-checked="true"]:hover { background: var(--red-hover); color: var(--on-red); }
/* the current step, or the thing that needs you: the inset red frame (1.5 px at the bench) */
.needs-you { box-shadow: inset 0 0 0 1px var(--red-ink); }
.needs-you.bench, .bench .needs-you { box-shadow: inset 0 0 0 1.5px var(--red-ink); }
/* nodes by status, v2 names (the node language above is unchanged): run, good, warn and bad are filled, person and wait
   hollow as before; .ring makes any node hollow, .fill any filled, .halo adds the running halo */
.node.run { --c: var(--s-run); background: var(--c); } .node.good { --c: var(--s-good); background: var(--c); }
.node.warn { --c: var(--s-warn); background: var(--c); } .node.bad { --c: var(--s-bad); background: var(--c); }
.node.person { --c: var(--s-person); }
.node.ring { background: var(--surface); }
.node.halo { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }
.node.run.halo { box-shadow: 0 0 0 4px var(--s-run-halo); }
/* placeholders */
.stripes { background: var(--stripes); border-radius: var(--r-option); }
/* the header's theme switch: grey, like every view switch */
header.top .seg.theme-seg { margin-right: 8px; }
header.top .seg.theme-seg button { min-height: 28px; padding: 4px 12px; font-size: 13px; }

/* ---------------------------------------------------------------- live views on the light ground: chrome lines and the
   neutral grey re-stepped; the status steps and the blue ramp are the dark ones (they carry glyphs and words) */
[data-theme="light"] .viz { --v-edge: #c9c8c3; --v-grid: #d9d8d3; --v-gray: #8a8990; --v-s5: #8fb6e8; }

/* ---------------------------------------------------------------- print and PDF are always light (tokens/print.css).
   Mark chrome data-print="hide", grids data-print="flat", the reading column data-print="doc". */
@media print {
  :root, [data-theme] { color-scheme: light;
    --ground: #ffffff; --widget: #f3f2ef; --raised: #e8e7e3; --raised-2: #dddcd7; --hairline: #d9d8d3; --row: #eeede9; --control: #c9c8c3;
    --text: #0e0e10; --body: #2e2e33; --muted: #56555c; --faint: #6a6970; --off: #a3a2a8; --edge: #e7aab4; --red-ink: #d81f3c;
    --s-run: #2f74cc; --s-good: #2f9e6c; --s-warn: #c88a2c; --s-bad: #e0453b; --s-wait: #8a8990; --s-person: #d5602a;
    --act-bg: #f3f2ef; --act-ink: #0e0e10; --act-muted: #56555c; --act-line: #d9d8d3; --act-ring: #d81f3c; --act-btn: #d81f3c;
    --tab-bg: #ffffff; --tab-ink: #0e0e10; --tab-sep: #d81f3c; --tab-on-bg: #ff2e4c; --tab-on-ink: #000000;
    --shadow: transparent; --net-node: #0e0e10; }
  html, body { background: #fff !important; }
  header.top, nav.bottomtabs, .helper-orb { display: none !important; }
  [data-print="hide"] { display: none !important; }
  [data-print="flat"] { display: block !important; }
  [data-print="doc"] { max-width: none !important; padding: 0 0 24px !important; }
  section { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@page { margin: 16mm 14mm; }
/* Labs (ADR-0173): the lab's name and switcher in the header, the team's read-only banner, the welcome and team pages */
header.top .lab-name { color: var(--s-good); font-size: 13px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.lab-menu-wrap { position: relative; }
button.lab-menu-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px 0 6px; background: transparent;
  border: 1px solid transparent; color: var(--s-good); }
button.lab-menu-btn:hover, button.lab-menu-btn[aria-expanded="true"] { background: var(--raised); border-color: var(--control); color: var(--s-good); }
.lab-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--s-good); color: #000; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; flex: none; }
.lab-caret { font-size: 10px; color: var(--muted); }
.lab-menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 50; min-width: 280px; max-width: 360px; padding: 6px;
  background: var(--widget); border: 1px solid var(--control); border-radius: var(--r-widget); box-shadow: var(--overlay); }
.lab-menu[hidden] { display: none; }
.lab-menu-head { padding: 6px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.lab-menu-item { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
  border-radius: 6px; cursor: pointer; color: var(--text); font-size: 13px; }
.lab-menu-item:hover, .lab-menu-item:focus-visible { background: var(--raised); }
.lab-menu-item .grow { display: flex; flex-direction: column; min-width: 0; }
.lab-menu-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-menu-role { font-size: 11px; color: var(--muted); }
.lab-menu-on { color: var(--s-good); }
.lab-menu-ico { width: 22px; text-align: center; color: var(--muted); }
.lab-menu-sep { height: 1px; background: var(--hairline); margin: 6px 4px; }
.visiting-banner { padding: 6px 48px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--hairline); background: var(--ground); }
@media (max-width: 900px) { .visiting-banner { padding: 6px 16px; } }
.two-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; align-items: start; }
.welcome-main { max-width: 1100px; }
.lab-results { display: flex; flex-direction: column; gap: 8px; }
.lab-result { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--hairline); }
.lab-result:first-child { border-top: 0; }
.state-line { display: flex; align-items: baseline; gap: 12px; padding: 6px 0; border-top: 1px solid var(--hairline); }
.state-line:first-child { border-top: 0; }
.share-edit input { width: 76px; }
.bounds-grid { display: grid; grid-template-columns: 140px 1fr; gap: 12px 24px; align-items: start; }
.bounds-grid .models { display: flex; flex-wrap: wrap; gap: 4px 16px; }
@media (max-width: 700px) { .bounds-grid { grid-template-columns: 1fr; } }
.once-link { word-break: break-all; }
.admin.no-side { grid-template-columns: 240px minmax(0, 1fr); }
.admin.no-side main.admin-main { border-right: 0; }
@media (max-width: 1100px) { .admin.no-side { grid-template-columns: 1fr; } }
#labs.ptable.adm .ptr { grid-template-columns: 16px minmax(0, 2fr) 140px minmax(0, 1fr) 140px 44px; }
#labs .lab-more { padding: 8px 16px 16px 48px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--hairline); }
#links.ptable.adm .ptr { grid-template-columns: 16px minmax(0, 1fr) 140px 140px minmax(0, 1fr); }
#visits.ptable.adm .ptr { grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); }
@media (max-width: 700px) { #labs.ptable.adm .ptr, #links.ptable.adm .ptr, #visits.ptable.adm .ptr { grid-template-columns: 16px minmax(0, 1fr); } }
#welcome .field, #welcome .field > label.stack { display: flex; flex-direction: column; }
#welcome .field > * + *, #welcome .field > label.stack > * + * { margin-top: 6px; }
#welcome form.stack { gap: 14px; }
#lab-form input { width: min(360px, 60vw); }

/* ADR-0173: joint projects, labs in a project, the lab's resources */
.joint-head { padding: 18px 16px 6px; border-top: 1px solid var(--line); }
.lab-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.lab-row:first-child { border-top: 0; }
.lab-row .grow { min-width: 0; }
.node-lab { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.res-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* a participant's session (ADR-0174) */
.ps-main { max-width: 860px; }
.ps-turn { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--hairline); }
.ps-turn:first-of-type { border-top: 0; }
.ps-you > div:last-child { color: var(--body); }
.ps-question { font-size: 16px; font-weight: 500; margin: 4px 0 8px; }
.ps-message { color: var(--muted); margin-bottom: 4px; }
.ps-part { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-top: 1px solid var(--hairline); }
.asked-row { padding: 8px 0; border-top: 1px solid var(--hairline); align-items: flex-start; gap: 12px; }
.asked-row:first-child { border-top: 0; }

/* the guided setup (ADR-0180): one step at a time: red with the page blurred behind, black text */
dialog.guide-pop { width: min(780px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 48px)); padding: 0; border: 0;
  border-radius: var(--r-widget); overflow: hidden; color: #000; background: rgba(255, 46, 76, .93); --surface: #ff2e4c;
  box-shadow: 0 24px 48px rgba(0, 0, 0, .6); }
dialog.guide-pop[open] { display: flex; flex-direction: column; }
dialog.guide-pop::backdrop { background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.guide-pop .guide-head { display: flex; align-items: center; gap: 12px; padding: 14px 10px 12px 18px; border-bottom: 1px solid rgba(0, 0, 0, .25); }
.guide-pop .guide-head h2 { margin: 0; font-size: 17px; font-weight: 600; color: #000; }
.guide-pop .helper-mark { background: #000; box-shadow: none; width: 22px; height: 22px; }
.guide-pop .guide-where { margin: 12px 18px 0; font-size: 12px; letter-spacing: .02em; color: rgba(0, 0, 0, .62); }
.guide-pop .grow { flex: 1 1 auto; min-width: 0; }
.guide-pop .guide-body > * + *, .guide-pop .guide-field > * + * { margin-top: 0; }
.guide-pop .guide-body { flex: 1 1 auto; overflow: auto; padding: 6px 18px 14px; display: flex; flex-direction: column; gap: 14px; }
.guide-pop .guide-body > .err:empty { display: none; }
.guide-pop h3 { margin: 6px 0 0; font-size: 15px; font-weight: 600; color: #000; }
.guide-pop h3.guide-step { font-size: 20px; line-height: 1.25; margin: 2px 0 -4px; }
.guide-pop p { margin: 0; color: #000; line-height: 1.45; }
.guide-pop .note, .guide-pop .muted, .guide-pop summary, .guide-pop .guide-field > span:last-child:not(:first-child) { color: rgba(0, 0, 0, .66); font-size: 13px; }
.guide-pop .guide-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.guide-pop .guide-field > .note { font-weight: 400; line-height: 1.4; }
.guide-pop .guide-field > span:first-child { color: #000; }
.guide-pop .guide-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.guide-pop .guide-row > input { flex: 1 1 180px; min-width: 0; }
.guide-pop .guide-row > select { flex: 0 0 auto; width: auto; }
.guide-pop .guide-row > .grow + select { flex: 0 1 260px; min-width: 200px; }
.guide-pop .guide-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.guide-pop .guide-list:empty { display: none; }
.guide-pop details ol { margin: 6px 0 0; padding-left: 20px; }
.guide-pop a { color: #000; text-decoration: underline; }
.guide-pop code { background: rgba(0, 0, 0, .14); color: #000; }
.guide-pop .err { color: #000; font-weight: 600; }
.guide-pop .err:empty { display: none; }
.guide-pop > .err { margin: 0 18px; }
/* controls on red: black ink, a faint dark well, a black focus ring */
.guide-pop input, .guide-pop select, .guide-pop textarea { background: rgba(0, 0, 0, .1); border: 1px solid rgba(0, 0, 0, .45);
  color: #000; border-radius: var(--r-option, 6px); }
.guide-pop input:hover, .guide-pop select:hover, .guide-pop textarea:hover { border-color: #000; }
.guide-pop input:focus, .guide-pop select:focus, .guide-pop textarea:focus { border-color: #000 !important; box-shadow: inset 0 0 0 1px #000; }
.guide-pop input::placeholder, .guide-pop textarea::placeholder { color: #000; opacity: .5; }
.guide-pop input[readonly] { background: rgba(0, 0, 0, .06); }
.guide-pop select option, .guide-pop select optgroup { background: #fff; color: #000; }
.guide-pop button, .guide-pop .btn { background: transparent; border: 1px solid #000; color: #000; }
.guide-pop button:hover, .guide-pop .btn:hover { background: rgba(0, 0, 0, .12); border-color: #000; color: #000; }
.guide-pop button.primary, .guide-pop .btn.primary { background: #000; border-color: #000; color: #ff2e4c; font-weight: 600; }
.guide-pop button.primary:hover, .guide-pop .btn.primary:hover { background: #1c1c20; color: #ff5a72; }
.guide-pop button.quiet { border-color: transparent; color: #000; }
.guide-pop button.quiet:hover { background: rgba(0, 0, 0, .12); }
.guide-pop button:disabled, .guide-pop button.primary:disabled { opacity: .4; background: transparent; color: #000; border-color: rgba(0, 0, 0, .5); }
.guide-pop :focus-visible { outline: 2px solid #000; outline-offset: 2px; box-shadow: none; }
.guide-pop input:focus-visible, .guide-pop select:focus-visible, .guide-pop textarea:focus-visible { outline: none; }
.guide-pop .guide-nav { display: flex; align-items: center; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid rgba(0, 0, 0, .25); }
/* the boxes borrowed from the assistant and the views (a key, a git token): no card of their own inside the window */
.guide-pop .offer, .guide-pop .keybox { background: transparent; border: 0; padding: 0; color: #000; }
.guide-pop .offer-t { color: #000; font-weight: 600; }
@media (max-width: 700px) {
  dialog.guide-pop { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
  .guide-pop .guide-nav { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}
.guide-pop .guide-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.guide-pop button.guide-choice { flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px; padding: 10px 14px; text-align: left; }
.guide-pop button.guide-choice b { font-weight: 600; }
.guide-pop button.guide-choice[aria-pressed="true"] { background: #000; color: #ff2e4c; }
.guide-pop button.guide-choice[aria-pressed="true"] .note { color: rgba(255, 46, 76, .8); }
/* ADR-0226: the rail of steps (You, Your lab), each step's "Where this lives", a pending lab step */
.guide-pop .guide-main { display: grid; grid-template-columns: 220px minmax(0, 1fr); flex: 1 1 auto; min-height: 0; }
.guide-pop .guide-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.guide-pop .guide-rail { border-right: 1px solid rgba(0, 0, 0, .25); padding: 12px 0; overflow: auto; }
.guide-pop .guide-rail h4 { margin: 10px 16px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(0, 0, 0, .62); }
.guide-pop .guide-rail h4:first-child { margin-top: 0; }
.guide-pop .guide-rail button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 16px; font-size: 13px; color: rgba(0, 0, 0, .7); }
.guide-pop .guide-rail button:hover { background: rgba(0, 0, 0, .08); }
.guide-pop .guide-rail button:focus-visible { outline: 2px solid #000; outline-offset: -2px; }
.guide-pop .guide-rail button[aria-current="step"] { color: #000; font-weight: 600; background: rgba(0, 0, 0, .12); }
.guide-pop .guide-rail .note { font-size: 11px; }
.guide-pop .guide-dot { width: 14px; height: 14px; flex: none; border: 1.5px solid currentColor; border-radius: 4px; display: grid; place-items: center; font-size: 10px; }
.guide-pop .guide-rail .done .guide-dot { background: #000; border-color: #000; color: #ff2e4c; }
.guide-pop .guide-rail .skipped .guide-dot { border-style: dashed; }
.guide-pop .guide-pending { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px dashed rgba(0, 0, 0, .45); border-radius: var(--r-option); padding: 10px 12px; }
.guide-pop .guide-pending p { flex: 1 1 220px; }
.guide-pop .guide-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.guide-pop .guide-where-link { margin-top: 2px; }
@media (max-width: 640px) {
  .guide-pop .guide-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .guide-pop .guide-rail { border-right: 0; border-bottom: 1px solid rgba(0, 0, 0, .25); display: flex; overflow-x: auto; padding: 6px 8px; }
  .guide-pop .guide-rail h4, .guide-pop .guide-rail .grow, .guide-pop .guide-rail .note { display: none; }
  .guide-pop .guide-rail button { width: auto; padding: 6px; }
}
.setup-asks-line { gap: 10px; align-items: center; padding: 10px 14px; margin: 8px 0; border-radius: var(--r-widget); background: var(--red-wash); border: 1px solid var(--edge); }
.guide-pop .setup-ask { border-top: 1px solid rgba(0, 0, 0, .25); padding-top: 12px; gap: 8px; }
.guide-pop .setup-ask:first-child { border-top: 0; padding-top: 0; }
[data-theme="light"] .guide-pop .setup-ask { border-color: var(--edge); }
/* the light theme: white with a red outline, black text and a red primary button (ADR-0226 decision 11) */
[data-theme="light"] dialog.guide-pop { background: #fff; --surface: #fff; box-shadow: 0 0 0 2px var(--red), 0 24px 48px rgba(0, 0, 0, .18); }
[data-theme="light"] dialog.guide-pop::backdrop { background: rgba(247, 246, 243, .55); }
[data-theme="light"] .guide-pop .guide-head, [data-theme="light"] .guide-pop .guide-nav, [data-theme="light"] .guide-pop .guide-rail { border-color: var(--edge); }
[data-theme="light"] .guide-pop .helper-mark { background: var(--red); }
[data-theme="light"] .guide-pop input:not([type="checkbox"]):not([type="radio"]), [data-theme="light"] .guide-pop select, [data-theme="light"] .guide-pop textarea { background: var(--ground); border-color: var(--control); }
[data-theme="light"] .guide-pop button.primary, [data-theme="light"] .guide-pop .btn.primary,
[data-theme="light"] .guide-pop button.guide-choice[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #000; }
[data-theme="light"] .guide-pop button.primary:hover, [data-theme="light"] .guide-pop .btn.primary:hover { background: var(--red-hover); color: #000; }
[data-theme="light"] .guide-pop button.guide-choice[aria-pressed="true"] .note { color: rgba(0, 0, 0, .7); }
[data-theme="light"] .guide-pop button.guide-choice { border-color: var(--control); }
[data-theme="light"] .guide-pop .guide-rail .done .guide-dot { background: var(--red-ink); border-color: var(--red-ink); color: #fff; }

/* notebook protocols as a lab writes them (ADR-0182): sections, master mixes, timers in the step, flagged steps */
.nb-section { list-style: none; margin: 18px 0 2px; }
.nb-section h3 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  padding-bottom: 6px; border-bottom: 1px solid var(--hairline); }
#nb-steps > .nb-section:first-child { margin-top: 0; }
.nb-spine li.nb-spine-sec { margin: 14px 0 4px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--faint); line-height: 1.35; }
.nb-spine li.nb-spine-sec:first-child { margin-top: 4px; }
.nb-spine li.nb-spine-sec::before { display: none; }
.nb-spine li.flagged button.nb-spine-step .node { box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--s-warn); }
.nb-spine li.flagged button.nb-spine-step span:last-child { color: var(--s-warn); }
figure.nb-mix { margin: 0; background: var(--raised); border: 1px solid var(--control); border-radius: 8px; overflow: hidden; }
figure.nb-mix figcaption { padding: 9px 14px; font-size: 13px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--control); }
figure.nb-mix table.nb-reagents { margin: 0; border-collapse: collapse; }
figure.nb-mix table.nb-reagents th { font-size: 11px; font-weight: 600; letter-spacing: .03em; color: var(--muted); text-transform: none;
  background: rgba(255, 255, 255, .03); padding: 7px 14px; border-bottom: 1px solid var(--control); white-space: nowrap; }
figure.nb-mix table.nb-reagents td { padding: 7px 14px; color: var(--text); border-bottom: 1px solid var(--hairline); }
figure.nb-mix table.nb-reagents tr:last-child td { border-bottom: 0; }
figure.nb-mix table.nb-reagents td.strong { font-weight: 600; }
figure.nb-mix table.nb-reagents td.faint { color: var(--muted); }
figure.nb-mix .nb-added { color: var(--s-good); font-weight: 400; font-size: 12px; }
.nb-timers-inline { display: flex; flex-direction: column; border: 1px solid var(--control); border-radius: 8px; overflow: hidden; }
.nb-timer-row { display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 14px; font-size: 13px; color: var(--text);
  border-bottom: 1px solid var(--hairline); }
.nb-timer-row:last-child { border-bottom: 0; }
.nb-timer-row.on { background: rgba(57, 135, 229, .08); }
.nb-timer-row .node { width: 10px; height: 10px; box-shadow: 0 0 0 3px var(--s-run-halo); }
.nb-timer-row .nb-clock { width: 14px; text-align: center; color: var(--muted); font-size: 13px; }
.nb-timer-row button { min-height: 28px; }
.nb-timer-row .nb-timer-v { font-size: 15px; }
.nb-step-row .nb-timer-v.sm { font-size: 12px; color: var(--s-run); }
@media (max-width: 700px) { figure.nb-mix { overflow-x: auto; } figure.nb-mix table.nb-reagents th, figure.nb-mix table.nb-reagents td { padding: 6px 10px; } }
.nb-timer-row .grow { flex: 1 1 auto; min-width: 0; }
.nb-timer-row .nb-clock { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--muted); flex: none; }

/* the plan graph's halos (ADR-0183): green where it is your move, red where work is going on */
.viz .pulse-halo { fill: none; stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: pulse-halo 1.8s ease-out infinite; }
.viz .pulse-halo.yours { stroke: var(--s-good); }
.viz .pulse-halo.going { stroke: var(--red); }
@keyframes pulse-halo { 0% { opacity: .95; transform: scale(.85); } 70% { opacity: 0; transform: scale(1.7); } 100% { opacity: 0; transform: scale(1.7); } }
@media (prefers-reduced-motion: reduce) { .viz .pulse-halo { animation: none; opacity: .8; } }
/* the inbox's groups, with a clear line between them (ADR-0183) */
.inbox-sec:not(:first-child) { border-top: 1px solid var(--control); margin-top: 8px; padding-top: 12px; }
.inbox-sec.yours { color: var(--s-person); font-weight: 600; }
.inbox-sec.done { color: var(--faint); }
/* a notebook page keeps the project's tabs (ADR-0183) */
nav.nb-tabs { margin: 0; padding: 0 24px; align-items: center; background: var(--ground); }
nav.nb-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 12px 0; min-height: 44px; color: var(--muted); text-decoration: none; }
nav.nb-tabs a:hover { color: var(--text); }
nav.nb-tabs a.on { color: var(--text); }
nav.nb-tabs a.on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
nav.nb-tabs a.nb-tabs-proj { color: var(--text); font-weight: 600; margin-right: 6px; }
a.nb-back { font-size: 13px; color: var(--muted); text-decoration: none; margin-bottom: 4px; }
a.nb-back:hover { color: var(--text); }
@media print { nav.nb-tabs, a.nb-back { display: none !important; } }

/* ---------------------------------------------------------------- the tutorial: a carousel of screenshots (ADR-0198) */
button.tutorial-card { width: 100%; min-height: 0; padding: 14px 16px; text-align: left; font: inherit; color: var(--text);
  background: var(--widget); border: 0; box-shadow: inset 0 0 0 1px var(--control); cursor: pointer; }
button.tutorial-card:hover { background: var(--widget); box-shadow: inset 0 0 0 1px var(--red-ink); }
button.tutorial-card .stack > span { display: block; }
dialog.tour-pop { width: min(1000px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; overflow: hidden;
  border-radius: var(--r-widget); background: var(--widget); color: var(--text); box-shadow: var(--overlay); }
dialog.tour-pop[open] { display: flex; flex-direction: column; }
dialog.tour-pop::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tour-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--hairline); }
.tour-name { font-weight: 600; font-size: 15px; }
.tour-count { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.tour-head .tour-x { margin-left: auto; }
.tour-fig { margin: 0; display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.tour-frame { display: flex; align-items: center; justify-content: center; background: var(--ground); height: min(56vh, 540px);
  padding: 12px; box-sizing: border-box; touch-action: pan-y; }
.tour-shot { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  border-radius: 8px; box-shadow: 0 0 0 1px var(--control); }
.tour-cap { padding: 14px 18px 4px; }
.tour-cap h2 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.tour-cap p { margin: 0; color: var(--body); line-height: 1.5; max-width: 72ch; min-height: 3em; }
.tour-foot { display: flex; align-items: center; gap: 12px; padding: 12px 18px 16px; }
.tour-foot .primary { min-width: 84px; }
.tour-foot .tour-wait { visibility: hidden; }   /* kept in place, so nothing shifts when it shows */
.tour-dots { flex: 1 1 auto; display: flex; justify-content: center; flex-wrap: wrap; gap: 2px; }
button.tour-dot { min-height: 24px; width: 24px; padding: 0; border: 0; background: transparent; position: relative; }
button.tour-dot::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--off); }
button.tour-dot:hover { background: transparent; }
button.tour-dot:hover::after { background: var(--muted); }
button.tour-dot[aria-current="step"]::after { background: var(--red); inset: 7px; }
/* a clip (ADR-0220): the video in the picture's place, its Pause/Play over its corner */
.tour-frame { position: relative; }
video.tour-clip { background: var(--ground); }
canvas.tour-live { width: 100%; height: 100%; box-shadow: none; }   /* a live slide fills its frame (ADR-0220 am. 2) */
button.tour-play { position: absolute; right: 20px; bottom: 20px; min-height: 32px; padding: 4px 14px; border-radius: 999px;
  background: var(--widget); color: var(--text); box-shadow: 0 0 0 1px var(--control), var(--overlay); }
button.tour-play:hover { background: var(--widget); box-shadow: 0 0 0 1px var(--red-ink), var(--overlay); }
@media (max-width: 640px) {
  button.tour-play { right: 14px; bottom: 14px; }
}
@media (max-width: 640px) {
  dialog.tour-pop { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .tour-frame { height: min(48dvh, 420px); padding: 8px; }
  .tour-cap { padding: 12px 14px 2px; }
  .tour-cap h2 { font-size: 16px; }
  .tour-cap p { font-size: 14px; }
  .tour-foot { padding: 10px 14px 14px; gap: 4px; }
  .tour-foot .primary { min-width: 72px; }
  .tour-dots { gap: 0; flex-wrap: nowrap; }
  button.tour-dot { width: 14px; }
  button.tour-dot::after { inset: 8px 3px; }
  button.tour-dot[aria-current="step"]::after { inset: 7px 2px; }
}

/* the team page's Previews & ships (ADR-0185) */
#ops-pv.ptable.adm .ptr { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 64px minmax(0, 1fr) 110px 72px; }
#ops-previews, #ops-ship { display: flex; flex-direction: column; gap: 12px; }
#ops-pv-form input, #ops-ship-form input { flex: 1; min-width: 0; }
[data-panel="ops"] .warm { color: var(--s-warn); }
.ops-job { border-top: 1px solid var(--line, rgba(255,255,255,.08)); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.ops-steps { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ops-step { display: block; }
.ops-mark { display: inline-block; width: 1.4em; text-align: center; }
.ops-step.passed .ops-mark { color: var(--s-good); } .ops-step.failed .ops-mark { color: var(--s-warn); }
.ops-step.skipped, .ops-step.waiting { color: var(--faint); }
.ops-step > div, .ops-step > details { margin-left: 1.4em; }
.ops-out { max-height: 320px; overflow: auto; font-size: 12px; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 700px) { #ops-pv.ptable.adm .ptr { grid-template-columns: minmax(0, 1fr); } #ops-pv-form, #ops-ship-form { flex-wrap: wrap; } }
.tk-ship { border-top: 1px solid var(--line); padding-top: 10px; gap: 8px; }
.tk-ship h3 { margin: 0; }
.tk-ship .warm { color: var(--s-warn); }

/* AIYO's fix on a ticket, and screenshot sets (ADR-0185 decisions 2 and 8) */
.tk-fix { border-top: 1px solid var(--line); padding-top: 10px; gap: 8px; }
.tk-fix h3 { margin: 0; }
.tk-fix .warm, .sc-pair .warm { color: var(--s-warn); }
.tk-diff { white-space: pre-wrap; overflow-x: auto; max-height: 240px; margin: 4px 0; padding: 8px; background: var(--bg-sunk, rgba(0,0,0,.03)); border-radius: var(--r-control); }
.tk-fix-shots { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.tk-fix-shots img { max-width: min(520px, 100%); max-height: 360px; border: 1px solid var(--line); border-radius: var(--r-control); }
.tk-fix-shots img.phone { max-width: 140px; }
.sc-pair { border-top: 1px solid var(--line); padding-top: 10px; }
.sc-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sc-sides figure { margin: 0; min-width: 0; }
.sc-sides img { width: 100%; border: 1px solid var(--line); border-radius: var(--r-control); }
.sc-pair.phone .sc-sides { grid-template-columns: repeat(2, minmax(0, 220px)); }
.sc-none { padding: 24px 0; text-align: center; }
.sc-marked { position: relative; }
.sc-marked > a { display: block; }
.sc-box { position: absolute; border: 2px solid var(--s-warn); background: color-mix(in srgb, var(--s-warn) 12%, transparent); pointer-events: none; box-sizing: border-box; }

/* the Set up page (ADR-0186 decision 1) */
.setup-step { gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; }
.setup-step .setup-state { min-width: 7.5em; text-align: right; }
.setup-line { gap: 10px; align-items: center; }
@media (max-width: 640px) { .setup-step { flex-wrap: wrap; } .setup-step .setup-state { min-width: 0; text-align: left; } }
/* Resources (ADR-0199): one page in four parts, each kind a block of cards or a card of rows */
main.page-sections.res-main { max-width: 1280px; display: flex; flex-direction: column; gap: 28px; }
.res-area { display: flex; flex-direction: column; gap: 14px; min-width: 0; scroll-margin-top: 64px; }
.res-main > .stack:empty { display: none; }   /* nothing left to set up: no gap above the tab (ADR-0199 am. 1) */
.res-area > .muted.small { margin: -6px 0 0; }
.res-area-title { font-size: 20px; margin: 0; padding-top: 18px; border-top: 1px solid var(--hairline); }
.res-kind { display: flex; flex-direction: column; gap: 10px; min-width: 0; scroll-margin-top: 64px; }
.res-area > .card, .res-area .stack > .card { margin: 0; }
.res-sub { margin: 10px 0 0; font-weight: 500; }
#sources { scroll-margin-top: 64px; }
/* A chemical's controls in its Safety card, the desk's and the bench's (ADR-0213 Part C) */
.sds-ctl { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--hairline); }
.sds-ctl-h { font-size: 12px; color: var(--muted); }
.sds-ctl ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sds-ctl li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px; color: var(--text); line-height: 1.35; }
.sds-ctl-i { width: 18px; height: 18px; display: block; fill: none; stroke: var(--text); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.sds-ctl .cs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.sds-ctl .c { font: 11px/1.6 var(--mono); color: var(--muted); }
.sds-ctl .c[title] { cursor: help; text-decoration: underline dotted; text-decoration-color: var(--faint); text-underline-offset: 2px; }
.sds-ctl .any { font-size: 11px; color: var(--faint); }

/* ---------------------------------------------------------------- the Tutorials page (ADR-0217) */
main.tuts .tut-sections { max-width: 860px; gap: 32px; }
main.tuts .sec { display: flex; flex-direction: column; gap: 10px; }
main.tuts .sec > .note { margin: 0; }
main.tuts .tutorial-card .tut-done { color: var(--muted); margin-right: 12px; }
/* the rest, for other kinds of work, folded under yours (ADR-0221 decision 8) */
main.tuts details.tut-others > summary { cursor: pointer; color: var(--muted); min-height: 32px; display: flex; align-items: center; gap: 8px; }
main.tuts details.tut-others > summary::before { content: "▸"; font-size: 11px; transition: transform .15s; }
main.tuts details.tut-others[open] > summary::before { transform: rotate(90deg); }
main.tuts details.tut-others[open] > summary { margin-bottom: 10px; }
/* the dot on Tutorials while a Basic tutorial is not finished (ADR-0217 am. 1): after the word, where the page's own is before */
a.tut-due::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin-left: 6px;
  align-self: flex-start; margin-top: 4px; flex: none; }
nav.sitetabs a.tut-due.on::after { display: none; }   /* on the page itself, its own dot is enough */
a.card.you-link.tut-due::after { order: -1; align-self: center; margin: 0 10px 0 0; }
nav.bottomtabs a.tut-due { position: relative; }   /* on a phone, beside You's word, clear of its own dot above */
nav.bottomtabs a.tut-due::after { position: absolute; top: 12px; left: calc(50% + 14px); margin: 0; }

/* Home: the example projects the site builds, apart from the team's own work */
.ex-builds { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }

/* the AIYO team's Copy panel (ADR-0222): one card an entry, its key in mono, the default under an edited one */
.copy-filters select { width: auto; min-width: 160px; }
.copy-filters input[type=search] { min-width: 220px; }
.copy-area { margin-top: 18px; }
.copy-page { margin: 6px 0 -2px; text-transform: none; }
.copy-entry.edited { border-color: var(--red-ink); }
.copy-key { font-size: 12px; overflow-wrap: anywhere; }
.copy-entry textarea { min-height: 0; }
.copy-history li { display: flex; gap: 10px; flex-wrap: wrap; }
.copy-when { flex: none; }
/* the Prompts panel (ADR-0267 am. 1 item 12): neutral, like the Copy panel */
button.prompt-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px;
  background: var(--widget); border: 1px solid var(--hairline); border-radius: var(--r-option); color: var(--text); }
button.prompt-row:hover { background: var(--raised); }
button.prompt-row.edited { border-color: var(--control); }
textarea.prompt-text { font-family: var(--mono); font-size: 12px; line-height: 1.5; }
.prompt-preview { font-family: var(--mono); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0;
  padding: 10px 12px; background: var(--ground); border: 1px solid var(--hairline); border-radius: var(--r-control);
  max-height: 60vh; overflow: auto; color: var(--body); }
.prompt-versions li { gap: 4px; }
.sk-cap { width: 6em; }   /* the team page's crawl cap (was an inline style the CSP blocked) */

.subscription-usage { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.codex-code { margin: 0; font-size: 1.5rem; letter-spacing: 0.08em; user-select: all; }
.usage-window { display: grid; gap: 6px; margin-bottom: 12px; }
.usage-meter { display: block; width: 100%; height: 7px; border: 0; border-radius: 4px; overflow: hidden; background: var(--raised); accent-color: var(--s-run); }
.usage-meter::-webkit-progress-bar { background: var(--raised); }
.usage-meter::-webkit-progress-value { background: var(--s-run); }
.usage-meter::-moz-progress-bar { background: var(--s-run); }
.usage-meter.high { accent-color: var(--s-warn); }
.usage-meter.high::-webkit-progress-value { background: var(--s-warn); }
.usage-meter.high::-moz-progress-bar { background: var(--s-warn); }
.add-model { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; }
.add-model > .stack, .add-model > label { margin-top: 16px; }
.add-model input, .add-model select { width: 100%; min-width: 0; box-sizing: border-box; }

/* ACME, inc's state switch (ADR-0224 D3): the lab menu's look, at the right of the menu bar */
.acme-wrap { margin-right: 8px; }
.acme-wrap .acme-menu { left: auto; right: 0; }
.acme-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--s-warn, #c58b00); flex: none; }
@media (max-width: 640px) {
  .acme-wrap { margin-right: 0; }
  .acme-btn { padding: 0 6px; gap: 4px; }
  .acme-btn .lab-caret { display: none; }
  .acme-btn .lab-name { max-width: 5.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .acme-wrap .acme-menu { position: fixed; left: 16px; right: 16px; top: 56px; min-width: 0; max-width: none; }
}
/* Set up's Benchling step: short numbered steps (ADR-0224 D8) */
ol.guide-steps { margin: 4px 0 8px; padding-left: 1.4em; display: grid; gap: 4px; }

/* the Add a model dialog's providers (ADR-0227 am. 2): one button each, its mark in the text's colour, light and dark */
.provider-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.provider-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; min-height: 84px;
  background: var(--panel); color: var(--ink); border: 1px solid var(--control); border-radius: var(--r-option); text-align: center; }
.provider-btn:hover { border-color: var(--control-hover); }
.provider-btn[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.provider-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.provider-logo { width: 28px; height: 28px; background: currentColor; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; flex: none; }
.provider-logo.letter { -webkit-mask: none; mask: none; background: none; border: 2px solid currentColor; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; line-height: 1; }
@media (max-width: 420px) { .provider-btn { padding: 10px 4px; font-size: 13px; } }
.add-model .codex-row { align-items: center; gap: 8px; }
.add-model .codex-code code { font-size: 26px; letter-spacing: .08em; }
.add-model .connected-list { margin: 0; padding: 0; list-style: none; }
.widget-head > .head-remove { flex: none; }
.add-model .working { display: flex; align-items: center; gap: 8px; }
.add-model .working .spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent);
  animation: spin .9s linear infinite; flex: none; }
@media (prefers-reduced-motion: reduce) { .add-model .working .spin { animation: none; border-color: var(--accent); background: var(--accent); transform: scale(.6); } }

/* Conversations: your messages on the right in a red outline, AIYO's on the left (the maintainer, 2026-11-06) */
.msg.me { align-self: flex-end; width: fit-content; max-width: min(75%, 640px); margin-left: auto; padding: 8px 12px;
  border: 1px solid var(--red-ink); border-radius: 12px; }
/* in a centred column (.bs-scroll > *), keep yours against the column's right edge, not centred in it */
.bs-scroll > .msg.me { margin-right: max(0px, calc((100% - 820px) / 2)); }
.ev.aiyo .ev-node { padding-top: 0; }
.ev.me { grid-template-columns: minmax(0, 1fr); }
.ev.me .ev-node { display: none; }
.ev.me .ev-body { align-items: flex-end; }
.ev.me .ev-head { justify-content: flex-end; }
.ev.me .ev-text { width: fit-content; max-width: min(75%, 640px); padding: 8px 12px; border: 1px solid var(--red-ink); border-radius: 12px;
  color: var(--text); }
.ps-turn.ps-you { align-items: flex-end; border-top: 0; }
.ps-turn.ps-you > div:last-child { width: fit-content; max-width: min(75%, 640px); padding: 8px 12px; border: 1px solid var(--red-ink);
  border-radius: 12px; white-space: pre-wrap; }

/* Stop (ADR-0231): the common square in a round button, shown in a conversation's message box while AIYO replies */
button.reply-stop { width: 32px; min-height: 32px; height: 32px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center;
  flex: none; background: transparent; border: 1px solid var(--red-ink); color: var(--red-ink); box-shadow: none; }
button.reply-stop:hover { background: var(--red-wash); border-color: var(--red-ink); color: var(--red-ink); }
button.reply-stop.hidden { display: none; }
.reply-stop-sq { width: 11px; height: 11px; border-radius: 2px; background: currentColor; }
/* a conversation's usage: a plan's weekly bar or a key's dollars (ADR-0232) */
.usage-chip { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.usage-chip .usage-meter { display: inline-block; width: 72px; }

/* ---------------------------------------------------------------- the Actions column (ADR-0233, actions.js) */
.ac-col { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.ac-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ac-fold { display: none; }
.ac-h { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 2px; }
.ac-h h2 { font-size: 13px; font-weight: 600; margin: 0; letter-spacing: .02em; }
.ac-list > .ac-h:not(:first-child) { margin-top: 14px; }
.ac-group { font-size: 11px; color: var(--faint); margin: 6px 0 -2px; display: flex; gap: 6px; align-items: center; }
button.ac-group.ac-other { justify-content: flex-start; width: 100%; background: none; border: 0; padding: 2px 0; min-height: 0; cursor: pointer; text-align: left; font-size: 11.5px; }
button.ac-group.ac-other:hover { color: var(--text); }
.ac-card { background: var(--widget); border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 12px; display: grid; gap: 7px; min-width: 0; }
.ac-card.ac-needs { box-shadow: inset 0 0 0 1px var(--red-ink); }   /* ADR-0240 am. 11: as the conversation's needs cards */
.ac-card.ac-needs .ac-top { display: flex; gap: 8px; align-items: center; }
.ac-card.open { border-color: var(--control); }
.ac-top, button.ac-top, .ac-top-btn { display: flex; align-items: center; gap: 8px; min-width: 0; width: 100%; background: none; border: 0; padding: 0;
  min-height: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ac-fail-top .ac-top-btn { flex: 1; width: auto; }
.ac-fail-top > button.quiet { font-size: 12px; min-height: 24px; padding: 0 6px; }
.ac-name { font-size: 13px; font-weight: 500; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ac-chev { color: var(--faint); font-size: 11px; }
.ac-line { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ac-line code, .ac-steps code { font-size: 11.5px; }
.ac-line .bs-doing { font-size: 12px; }
.ac-kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 2px 0 0; font-size: 12px; }
.ac-kv dt { color: var(--faint); }
.ac-kv dd { margin: 0; color: var(--body, var(--text)); font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ac-log { margin: 0; background: var(--ground); border: 1px solid var(--hairline); border-radius: 6px; padding: 7px 8px;
  font: 11px/1.45 "IBM Plex Mono", monospace; color: var(--muted); white-space: pre-wrap; max-height: 92px; overflow: hidden; }
.ac-log.ac-full { max-height: 320px; overflow: auto; }
.ac-slack-top { display: flex; gap: 8px; align-items: center; cursor: pointer; }   /* ADR-0262 am. 2 */
.ac-acts { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.ac-acts button { font-size: 12px; min-height: 28px; padding: 0 10px; }
.ac-bar { height: 4px; border-radius: 2px; background: var(--raised-2); overflow: hidden; }
.ac-bar i { display: block; height: 100%; width: 0; background: var(--s-run); }
.ac-steps { display: grid; gap: 3px; font-size: 11.5px; color: var(--muted); }
.ac-steps > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-steps .bs-doing { font-size: 11.5px; }
.ac-mark { color: var(--faint); }
.ac-grid { display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px; }
.ac-grid > i, .ac-grid > button { aspect-ratio: 1; border-radius: 2px; background: var(--raised-2); border: 0; padding: 0; min-height: 0; min-width: 0; display: block; }
.ac-grid > button { cursor: pointer; }
.ac-grid > .r { background: var(--s-run); } .ac-grid > .d { background: var(--s-good); } .ac-grid > .f { background: var(--s-bad); }
.ac-grid > .sel { outline: 1.5px solid var(--text); outline-offset: 1px; }
.ac-counts { font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.ac-counts b { font-weight: 500; color: var(--text); }
.ac-task { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.ac-task b { font-weight: 500; }
.ac-empty { font-size: 12px; color: var(--faint); padding: 8px 0; margin: 0; }
.ac-ring { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--s-bad); flex: none; display: inline-block; }
button.ac-fail-row { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 6px 0 4px; border: 0; border-top: 1px solid var(--hairline);
  border-radius: 0; background: none; color: inherit; width: 100%; text-align: left; min-height: 0; cursor: pointer; }
.ac-fail-row b { font-weight: 500; }
.ac-fail-row .why { color: var(--muted); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-fail-row .ago { color: var(--faint); font-size: 11px; }
.ac-fail-open { display: grid; gap: 6px; padding: 2px 0 6px 18px; }
button.ac-stop { border-color: var(--red-ink); }
/* Brainstorm: the column beside the conversation; on narrower screens it folds to a heading above it */
.bs-with-actions { display: grid; grid-template-columns: minmax(0, 1fr) 300px; height: 100%; min-height: 0; width: 100%; }
.bs-with-actions > .bs-actions { border-left: 1px solid var(--hairline); padding: 18px 14px; overflow-y: auto; min-height: 0; }
.bs-with-actions:has(> .bs-actions.ac-idle) { grid-template-columns: minmax(0, 1fr); }
.bs-with-actions > .bs-actions.ac-idle { display: none; }
@media (max-width: 1180px) {
  .bs-with-actions { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .bs-with-actions > .bs-actions { order: -1; border-left: 0; border-bottom: 1px solid var(--hairline); padding: 6px 14px; max-height: 50vh; }
  .bs-with-actions > .bs-actions.ac-none { display: none; }
  /* no actions shown: the thread is the only row and takes the whole height, so its composer stays at the bottom */
  .bs-with-actions:has(> .bs-actions:is(.ac-idle, .ac-none)), .bs-with-actions:not(:has(> .bs-actions)) { grid-template-rows: minmax(0, 1fr); }
  .bs-actions .ac-fold { display: flex; justify-content: flex-start; width: 100%; background: none; border: 0; padding: 4px 0; min-height: 0; font-size: 12.5px; color: var(--muted); cursor: pointer; }
  .bs-actions .ac-fold::after { content: " ▾"; color: var(--faint); }
  .bs-actions.ac-expanded .ac-fold::after { content: " ▴"; }
  .bs-actions:not(.ac-expanded) > .ac-list { display: none; }
  .bs-actions.ac-expanded > .ac-list { padding-bottom: 8px; }
  /* 2026-11-16: above the conversation it is a panel of its own, clearly divided from the thread's header, and
     compact: the fold is its heading (no second one), each card one line, Slack its switch and its button */
  .bs-with-actions > .bs-actions { background: var(--widget); border-bottom: 1px solid var(--control);
    box-shadow: 0 1px 0 var(--control); padding: 2px 14px; max-height: 40vh; }
  .bs-actions .ac-fold { min-height: 34px; align-items: center; font-size: 13px; font-weight: 600; color: var(--text); }
  .bs-actions .ac-list > .ac-h:first-child { display: none; }
  .bs-actions .ac-list { display: grid; gap: 6px; }
  .bs-actions .ac-card { background: var(--ground); padding: 6px 10px; gap: 2px; border-radius: 8px; }
  .bs-actions .ac-empty { margin: 0 0 4px; font-size: 12px; }
  .bs-actions .ac-slack { display: flex; align-items: center; gap: 10px; }
  .bs-actions .ac-slack > .ac-slack-top { width: auto; flex: 1 1 auto; }
  .bs-actions .ac-slack > .ac-line { display: none; }
  .bs-actions .ac-slack > .ac-acts { margin: 0; flex: none; }
}

/* Light theme (ADR-0152 am. 5): what waits on you is the page's ground with a red outline, not a red fill; the picked
   choice stays filled. Dark keeps the red fill. */
[data-theme="light"] :is(.inbox-pane, .ses-convo) .ev-q.mine :is(.fork > .option, .num-ask, .chip-btn, .ask-comments textarea),
[data-theme="light"] .ses-reply {
  background: var(--ground); color: var(--text); border: 1.5px solid var(--red-ink); }
[data-theme="light"] :is(.inbox-pane, .ses-convo) .ev-q.mine :is(.fork > .option, .num-ask, .chip-btn):hover { background: var(--widget); }
[data-theme="light"] :is(.inbox-pane, .ses-convo) .ev-q.mine :is(.fork > .option, .num-ask) *,
[data-theme="light"] :is(.inbox-pane, .ses-convo) .ev-q.mine .fork textarea,
[data-theme="light"] .ses-reply :is(input, button) { color: var(--text); }
[data-theme="light"] :is(.inbox-pane, .ses-convo) .ev-q.mine .fork > .option :is(.muted, .v-faint) { color: var(--muted); }
[data-theme="light"] :is(.inbox-pane, .ses-convo) .ev-q.mine :is(.fork textarea, .ask-comments textarea, .num-ask input)::placeholder,
[data-theme="light"] .ses-reply input::placeholder { color: var(--muted); opacity: 1; }
[data-theme="light"] :is(.inbox-pane, .ses-convo) .ev-q.mine .opt-dot { border-color: var(--red-ink); }
[data-theme="light"] :is(.inbox-pane, .ses-convo) .ev-q.mine .fork > .option.own-words { border-style: dashed; }
[data-theme="light"] :is(.inbox-pane, .ses-convo) .ev-q.mine :is(.fork > .option.selected, .chip-btn.on) {
  background: var(--red); color: var(--on-red); box-shadow: none; }
[data-theme="light"] :is(.inbox-pane, .ses-convo) .ev-q.mine .fork > .option.selected * { color: var(--on-red); }
[data-theme="light"] :is(.inbox-pane, .ses-convo) .ev-q.mine .option.selected .opt-dot { background: var(--on-red); border-color: var(--on-red); }
[data-theme="light"] :is(.inbox-pane, .ses-convo) .ev-q.mine :is(.ask-comments textarea:focus, :focus-visible),
[data-theme="light"] .ses-reply:focus-within { box-shadow: inset 0 0 0 1px var(--red-ink); outline-color: var(--red-ink); }
/* ADR-0238: where auto compute sent a job, and what it was weighed against */
.ac-line.ac-why { white-space: normal; }
.ac-why b { font-weight: 600; color: var(--body, var(--text)); }
.ac-weighed { font-size: 12px; display: grid; gap: 4px; }
.ac-weighed-h, .ac-weighed-by { color: var(--faint); }
.ac-weighed table { border-collapse: collapse; width: 100%; }
.ac-weighed th { text-align: left; color: var(--faint); font-weight: 400; padding: 2px 6px 2px 0; }
.ac-weighed td { padding: 2px 6px 2px 0; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ac-weighed td:first-child { white-space: normal; }
.ac-weighed tr.won td { color: var(--body, var(--text)); font-weight: 600; }
.ac-copy-mark { width: 14px; text-align: center; color: var(--muted); }

/* a session's action cards (ADR-0240 am. 7), under what it makes */
.ses-actions { margin-top: 16px; }
.ses-actions:empty { display: none; }

/* the lab, for a PI (ADR-0243 A) */
.lab-sec { margin-top: 24px; }
.lab-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.lab-card summary { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
.lab-card summary .pname { flex: 1; min-width: 0; }
.lab-card .stack { margin-top: 8px; }
.lab-chips { display: inline-flex; gap: 4px; flex-shrink: 0; }
.lab-chip { padding: 1px 6px; font-weight: 600; }
.lab-chip.owner { box-shadow: inset 0 0 0 1px var(--text); }

/* a lab project, as its PI sees it; From your PI on a project (ADR-0243) */
.lab-card summary a.pname { color: inherit; text-decoration: none; }
.lab-card summary a.pname:hover { text-decoration: underline; }
.lp-main .sec { margin-top: 24px; }
.lp-turns { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.lp-turn { padding: 8px 12px; border-radius: var(--r-control); max-width: 90%; }
.lp-turn.pi { align-self: flex-end; background: var(--widget); white-space: pre-wrap; }
.lp-turn.aiyo { align-self: flex-start; background: var(--raised); }
.lp-ask { align-items: flex-end; gap: 8px; }
.lp-suggest { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.lp-offer, .lp-sugg { display: flex; flex-direction: column; gap: 6px; }
.lp-offer { margin-top: 8px; }
.lp-take { border-left: 2px solid var(--s-warn-line, var(--hairline)); padding-left: 8px; }
.lp-take summary { cursor: pointer; font-size: 12px; }
.lp-signed-row { padding: 6px 0; border-bottom: 1px solid var(--hairline); }
.lp-page { margin-top: 8px; }
.lp-digest-entry, .lp-prep { padding: 6px 0; border-top: 1px solid var(--hairline); }
.lp-prep summary { cursor: pointer; }
.from-pi { margin: 8px 0; }
.from-pi .lp-sugg + .lp-sugg { border-top: 1px solid var(--hairline); padding-top: 8px; }
.lp-msg { padding-left: 8px; }
/* a person's git key (ADR-0253): the public half beside its Copy button */
.gitkey-row { flex-wrap: nowrap; align-items: flex-start; }
.gitkey-pub { flex: 1 1 auto; min-width: 0; width: auto; font-family: var(--mono, ui-monospace, monospace); font-size: 12px; word-break: break-all; resize: none; }
.gitkey-row > button { flex: none; }
.gitkey-fp { overflow-wrap: anywhere; }

/* the bell (ADR-0262 decision 7): a red dot while an ask waits unseen; its list under it, nothing pops up */
.bell-wrap { position: relative; display: inline-flex; align-items: center; }
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; color: var(--muted); }
.bell svg { width: 18px; height: 18px; flex: none; }
.bell:hover, .bell[aria-expanded="true"] { color: var(--text); }
.bell-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.bell-dot[hidden] { display: none; }
.bell-list { position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; width: min(320px, calc(100vw - 32px)); max-height: 60vh; overflow-y: auto;
  background: var(--widget); border-radius: var(--r-widget); box-shadow: var(--overlay); padding: 6px; display: flex; flex-direction: column; }
.bell-list[hidden] { display: none; }
.bell-item { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--r-option); color: var(--body); text-decoration: none; }
.bell-item:hover { background: var(--raised); }
.bell-item.unseen .bell-title { color: var(--text); font-weight: 600; }
.bell-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-empty { margin: 8px 10px; }
/* ADR-0263 d4: Setting up is a thread. The interview sits in the thread pane as a conversation: every turn in one
   scrolling list (questions in body type, their background muted above them), choices and the composer below;
   the plan so far and its work are cards in the side column. Nothing takes the whole page. */
.inbox-pane.is-setup:has(> #plan-card:not(.hidden)) > .conv-scroll { display: none; }
.inbox-pane > .interview { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; gap: 0; margin: 0; padding: 0; }
.inbox-pane > .interview > .iv-side { display: none; }
.inbox-pane > .interview .iv-main { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; max-width: 760px; gap: 10px; padding: 0; }
.inbox-pane > .interview .iv-main > .page-head, .inbox-pane > .interview #iv-steps,
.inbox-pane > .interview #plan-bg, .inbox-pane > .interview #plan-q { display: none; }
.inbox-pane > .interview #plan-talk { display: block; max-height: none; flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: 16px 4px 8px 0; border: 0; background: none; }
.inbox-pane > .interview #plan-chat { gap: 18px; }
.inbox-pane > .interview .iv-talk .ev-text { font-size: 14px; }
.setup-ask .setup-bg { color: var(--muted); margin-bottom: 4px; }
.setup-ask.waiting .ev-who { color: var(--text); }
.setup-note { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--faint); }
.inbox-pane > .interview #plan-reply { flex: none; }
.ws-side #plan-so-far, .ws-side #plan-extras-card { margin: 0; }
/* ADR-0271 d10: Setting up drawn as every other thread: no timeline spine, one header line across the pane, the
   column centred at the thread width, and the question's answer box in the composer's place as the docked card */
.inbox-pane > .interview #plan-talk .timeline::before { display: none; }
.inbox-pane > .interview #plan-talk { padding-left: 10px; margin-left: -10px; }   /* room for the orb's glow */
.conv-head:has(> .th-head) { padding: 0; margin: 0; border-bottom: 0; }
.conv-head > .th-head { flex: 1 1 auto; }
.inbox-pane > .interview .iv-main { width: 100%; max-width: 868px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.inbox-pane > .interview #plan-reply { padding-bottom: 18px; gap: 10px; }
.inbox-pane > .interview #plan-reply:has(#plan-choices:not(.hidden)) > .th-ask {
  background: var(--act-bg); color: var(--act-ink); box-shadow: inset 0 0 0 1px var(--act-ring); border-radius: var(--r-widget); padding: 12px 14px; }
.inbox-pane > .interview #plan-reply .why-card { order: -1; }
.ws-side #plan-actions:empty { display: none; }

/* ADR-0263 d7: a task is a thread: its conversation in the pane (or its own page), its cards beside it */
.inbox-pane:has(.tk-thread-main) > .conv-head { display: none; }
.inbox-pane:has(.tk-thread-main) > .conv-scroll { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
#timeline:has(> .tk-thread-main) { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; max-width: 760px; }
#timeline:has(> .tk-thread-main)::before { display: none; }
.tk-thread-main { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; gap: 8px; }
.tk-thread-main > .conv-head { margin-bottom: 0; }
.tk-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 4px 12px 0; }
.tk-talk { gap: 18px; }
.tk-composer { flex: none; }
.tk-staged:empty { display: none; }
.tk-thread-page { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; height: calc(100vh - 160px); min-height: 460px; }
.tk-side-col { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-width: 0; }
.tk-cards { display: flex; flex-direction: column; gap: 10px; }
.tk-cards .card { margin: 0; padding: 12px 14px; }
.tk-cards .needs-you { box-shadow: inset 2px 0 0 var(--s-person); }
.tk-items { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.tk-item { display: flex; gap: 8px; align-items: baseline; }
.tk-item .tick { color: var(--faint); }
.tk-item .tick.yes { color: var(--s-good); }
.tk-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; margin: 0; font-size: 12px; }
.tk-kv dt { color: var(--faint); }
.tk-kv dd { margin: 0; color: var(--body); }
.tk-more > summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.tk-more[open] > summary { margin-bottom: 8px; }
@media (max-width: 900px) { .tk-thread-page { grid-template-columns: minmax(0, 1fr); height: auto; } }

/* ADR-0263 am. 1: every disclosure arrow is red, the browser's own marker and the ones drawn in CSS alike */
summary::marker, summary::-webkit-details-marker { color: var(--red); }
main.tuts details.tut-others > summary::before, .bs-actions .ac-fold::after { color: var(--red); }
dialog.ws-confirm { display: none; max-width: 480px; }
dialog.ws-confirm[open] { display: flex; flex-direction: column; gap: 12px; }
dialog.ws-confirm p { margin: 0; color: var(--body); line-height: 1.5; }
.ws-confirm-acts { gap: 8px; }
.setup-why { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.proj-rename { gap: 6px; padding: 4px 0; }
.proj-rename input { width: 100%; }

/* Settings (ADR-0265): one list of model accounts, one notifications card, rows that edit in place */
.model-rows > li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 0; border-top: 1px solid var(--hairline); }
.model-rows > li:first-child { border-top: 0; }
.model-rows .mr-name { flex: 1 1 200px; min-width: 0; color: var(--text); }
.model-rows .mr-state { color: var(--muted); font-size: 13px; }
.model-rows .mr-state.bad { color: var(--bad); }
.inline-num { display: inline-flex; align-items: center; gap: 4px; }
.inline-num input { width: 6em; }
#cl-row { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
#cl-row .grow { flex: 1 1 auto; }
.nt-card .nt-row { align-items: center; gap: 10px; min-height: 36px; }
.nt-card .nt-row:not(:first-child) { border-top: 1px solid var(--hairline); padding-top: 8px; }
.nt-times[hidden] { display: none; }
.chip-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--edge);
  border-radius: var(--r-chip); font-size: 13px; color: var(--body); cursor: pointer; }
.chip-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-toggle { position: relative; }
.chip-toggle:has(input:checked) { border-color: var(--text); color: var(--text); background: var(--raised); }
.chip-toggle:has(input:checked)::before { content: "✓"; font-size: 12px; }
.chip-toggle:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.lab-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.lab-inline .edit-text { border: 1px dashed transparent; border-radius: var(--r-control); padding: 2px 6px; cursor: text; color: var(--text); background: none; font: inherit; }
.lab-inline .edit-text:hover, .lab-inline .edit-text:focus { border-color: var(--edge); }
.lab-inline .domain-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid var(--edge); border-radius: var(--r-chip); font-size: 13px; }
.lab-inline .domain-chip button { border: 0; background: none; padding: 0 2px; color: var(--muted); min-height: 0; }
#tool-keys, #model-list { padding: 0; margin: 0; list-style: none; }
/* ADR-0265 decision 3: a choice that acts on its click is a button shaped like an option row */
button.option { width: 100%; text-align: left; color: var(--text); border: 0; min-height: 44px; cursor: pointer; font: inherit; }
button.option:hover:not(:disabled) { background: var(--raised); }
button.option:disabled { cursor: default; color: var(--faint); }
.bs-place-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.bs-place-row > button.option { flex: 1 1 260px; min-width: 0; }
.bs-place-row > select.bs-env { flex: 0 1 260px; min-width: 0; }
.fb-kindrow { flex-direction: row; justify-content: flex-start; align-items: center; gap: 10px; }
/* ADR-0265 R5/R6: a storage's name renamed in place; what it takes as a chip with a menu */
.storage-name { cursor: text; border-bottom: 1px dashed transparent; }
.storage-name:hover, .storage-name:focus-visible { border-bottom-color: var(--control); outline: none; }
input.inline-name { font: inherit; padding: 1px 4px; min-height: 0; width: 18ch; }
select.chip-select { font: inherit; font-size: 12px; padding: 1px 6px; min-height: 0; border-radius: var(--r-chip);
  background: var(--raised); color: var(--body); border: 0; width: auto; }
.storage-kinds { flex-wrap: wrap; margin: 4px 0 8px; }
/* ADR-0265 R14: Write up ▾ beside search, and the About row it opens */
details.lib-write { position: relative; }
details.lib-write > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px;
  border: 1px solid var(--control); border-radius: var(--r-control); color: var(--text); white-space: nowrap; }
details.lib-write > summary::-webkit-details-marker { display: none; }
.lib-write-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; display: flex; flex-direction: column; min-width: 180px;
  background: var(--widget); border: 1px solid var(--control); border-radius: var(--r-control); padding: 4px; }
.lib-write-menu button { justify-content: flex-start; text-align: left; }
.lib-write-row { margin: 8px 0; align-items: center; }
.lib-write-note { flex-basis: 100%; margin: 0; }
.bs-picker-foot { justify-content: flex-end; }
.bs-place .bs-why { margin-left: auto; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.bs-place .grow { min-width: 0; }

/* aiyo instructions (ADR-0267 d1): one box of standing words, its count, its earlier versions */
.instr-text { width: 100%; min-height: 160px; font: 13px/1.6 var(--mono); }
.instr-history summary { cursor: pointer; color: var(--muted); }
.instr-old { padding: 8px 0; border-top: 1px solid var(--hairline); }
.instr-old-text { margin: 0; white-space: pre-wrap; font-family: var(--mono); color: var(--muted); }
/* memory beside them (ADR-0267 am. 2): the facts aiyo kept, each with where it came from */
.mem-list { list-style: none; margin: 0; padding: 0; }
.mem-fact { padding: 10px 0; border-top: 1px solid var(--hairline); gap: 4px; }
.mem-fact:first-child { border-top: 0; }
.mem-text { margin: 0; color: var(--body); white-space: pre-wrap; overflow-wrap: anywhere; }
.mem-edit { width: 100%; min-height: 64px; font: 13px/1.6 var(--sans); }
.mem-acts { gap: 4px; }
.mem-acts button.quiet { padding: 0 8px; min-height: 28px; font-size: 12px; }
.bs-suggestion .bs-suggestion-line { margin: 6px 0; white-space: pre-wrap; }

/* ADR-0269 am. 1: the Cerebellum card and the dots under a reply; never red */
.cb-card { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.cb-head { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.cb-title { font-weight: 500; }
.cb-strip { display: inline-flex; align-items: center; gap: 4px; flex: 1; }
.cb-list { display: flex; flex-direction: column; gap: 2px; }
.cb-row { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; padding: 4px 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.cb-row-passed { color: var(--faint); }
.cb-detail { padding: 2px 0 6px 16px; }
.cb-text { margin: 0 0 4px; white-space: pre-wrap; }
.cb-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; box-sizing: border-box; }
.cb-dot.cb-used { background: var(--s-good); }
.cb-dot.cb-passed { width: 6px; height: 6px; background: transparent; border: 1px solid var(--faint); }
.cb-dot.cb-unread { background: var(--off); }
.cb-dots { display: flex; gap: 4px; margin-top: 4px; }
.cb-dotbtn { background: none; border: 0; padding: 4px; margin: -4px 0; cursor: pointer; line-height: 0; }

/* a thread's report on the site (ADR-0273) */
.rp-body { display: flex; flex-direction: column; height: 100vh; margin: 0; background: var(--bg); }
.rp-bar { gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--edge); background: var(--surface); }
.rp-bar .name { font-weight: 600; min-width: 0; }
.rp-linkline { padding: 4px 16px; word-break: break-all; }
.rp-frame { flex: 1; width: 100%; border: 0; color-scheme: light; background: Canvas; }   /* a page as a browser shows it */
.rp-file { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px 16px; text-align: center; }
.rp-kept { word-break: normal; }
.bs-report .bs-report-acts { gap: 8px; margin-top: 4px; }
.bs-report details summary { cursor: pointer; }

/* a thread waiting on the person's answer: a pulsing outline in the inbox and the Brainstorm list */
.inbox-row.asks, .bs-row.asks { box-shadow: inset 0 0 0 1px var(--red-ink); animation: asks-pulse 2s ease-in-out infinite; border-radius: 8px; }
@keyframes asks-pulse { 0%, 100% { box-shadow: inset 0 0 0 1px var(--red-ink); } 50% { box-shadow: inset 0 0 0 1px var(--red-ring); } }
@media (prefers-reduced-motion: reduce) { .inbox-row.asks, .bs-row.asks { animation: none; } }
