/* PaperBrain status — shared shell.
   Built 2026-09-10 for side-by-side use: every pane is its own URL and its own window.
   Dense on purpose. Ramey reads these at a glance, not as a document. */

:root, html[data-theme=dark] {
  color-scheme: dark;
  /* Dark, raised a notch on 2026-10-06 (Ramey: dark-on-dark was hard to read; the low-contrast
     look stays, the secondary text and rules just come up far enough to pass). */
  --bg: #0e1014;
  --panel: #161a21;
  --panel-2: #1d222b;
  --line: #2e3643;
  --line-soft: #232a35;
  --ink: #e9ecf2;
  --dim: #a3adbe;
  --dimmer: #76808f;
  --ok: #3fb950;
  --warn: #d29922;
  --bad: #f85149;
  --acc: #58a6ff;
  --purple: #a371f7;
  --ok-ink: #7ee787;   --ok-soft: #10261a;   --ok-line: #1d4428;
  --warn-ink: #f0cd7a; --warn-soft: #241c08; --warn-line: #4a3610; --warn-wash: rgba(210,153,34,.12);
  --bad-ink: #ffb3ae;  --bad-soft: #2a1112;  --bad-line: #5c1f1f;  --bad-wash: rgba(248,81,73,.12);
  --acc-wash: rgba(88,166,255,.15);
  --on-acc: #07121f;
  --on-warn: #1a1205;
  --bar-bg: var(--bar-bg);
  --code-bg: #0b0d11;
  --flag-row: #241a09; --flag-row-hover: #2e2110;
  --weekend: #131720;
  --scrim: rgba(0,0,0,.45);
  --shadow: 0 12px 32px rgba(0,0,0,.45);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}
html[data-theme=light] {
  color-scheme: light;
  --bg: #f4f5f7;
  --panel: #ffffff;
  --panel-2: #eef1f5;
  --line: #d3d9e2;
  --line-soft: #e3e8ee;
  --ink: #1b212b;
  --dim: #5b6676;
  --dimmer: #7f8a9a;
  --ok: #1a7f37;
  --warn: #9a6700;
  --bad: #cf222e;
  --acc: #0969da;
  --purple: #8250df;
  --ok-ink: #116329;   --ok-soft: #dafbe1;   --ok-line: #aceebb;
  --warn-ink: #7d4e00; --warn-soft: #fff4d6; --warn-line: #f0d08a; --warn-wash: rgba(154,103,0,.12);
  --bad-ink: #a40e26;  --bad-soft: #ffebe9;  --bad-line: #f5b5b1;  --bad-wash: rgba(207,34,46,.10);
  --acc-wash: rgba(9,105,218,.18);
  --on-acc: #ffffff;
  --on-warn: #1a1205;
  --bar-bg: rgba(244,245,247,.93);
  --code-bg: #e9edf2;
  --flag-row: #fff8e6; --flag-row-hover: #fff1cc;
  --weekend: #eceff3;
  --scrim: rgba(20,24,30,.35);
  --shadow: 0 12px 32px rgba(20,24,30,.18);
}

/* cyberpunk and cmyk (2026-10-06): read off Ramey's Opalstack dashboard, the two he uses. Both
   are light themes with saturated accents, no pastels. ok/warn/bad keep their meaning on every
   theme: on the yellow page, warn is orange so it never vanishes into the background. */
html[data-theme=cyberpunk] {
  color-scheme: light;
  --bg: #f5e400;
  --panel: #fff35a;
  --panel-2: #fde93a;
  --line: #c9b800;
  --line-soft: #e3d41a;
  --ink: #1a1a1a;
  --dim: #4a4300;
  --dimmer: #6e6500;
  --ok: #0f9d58;
  --warn: #ff6a00;
  --bad: #e8306f;
  --acc: #0096b8;
  --purple: #9d3cff;
  --ok-ink: #076b3b;   --ok-soft: #d9f5e2;   --ok-line: #0f9d58;
  --warn-ink: #8a3a00; --warn-soft: #ffe0c2; --warn-line: #ff6a00; --warn-wash: rgba(255,106,0,.16);
  --bad-ink: #9c0f45;  --bad-soft: #ffd3e3;  --bad-line: #e8306f;  --bad-wash: rgba(232,48,111,.14);
  --acc-wash: rgba(0,150,184,.18);
  --on-acc: #ffffff;
  --on-warn: #1a1a1a;
  --bar-bg: rgba(18,22,51,.96);
  --code-bg: #121633;
  --flag-row: #ffe0c2; --flag-row-hover: #ffd0a3;
  --weekend: #eedb00;
  --scrim: rgba(18,22,51,.5);
  --shadow: 0 12px 32px rgba(18,22,51,.3);
}
html[data-theme=cyberpunk] header.bar, html[data-theme=cyberpunk] .bar * { color: #f3f3f3; }
html[data-theme=cyberpunk] .bar .panes a[aria-current=page] { color: #ff3e8a; }
html[data-theme=cyberpunk] .failed code { color: #ffe600; }

html[data-theme=cmyk] {
  color-scheme: light;
  --bg: #e9e9e9;
  --panel: #ffffff;
  --panel-2: #f2f2f2;
  --line: #cfcfcf;
  --line-soft: #e1e1e1;
  --ink: #111111;
  --dim: #555555;
  --dimmer: #7a7a7a;
  --ok: #1a9c4b;
  --warn: #c99700;
  --bad: #e5007d;
  --acc: #00a3e0;
  --purple: #6f2dbd;
  --ok-ink: #0f6b33;   --ok-soft: #dcf5e5;   --ok-line: #8fd9ab;
  --warn-ink: #6e5200; --warn-soft: #fff6c2; --warn-line: #ffe600; --warn-wash: rgba(255,230,0,.35);
  --bad-ink: #9a0054;  --bad-soft: #fde0ef;  --bad-line: #f59cc9;  --bad-wash: rgba(229,0,125,.12);
  --acc-wash: rgba(0,163,224,.2);
  --on-acc: #ffffff;
  --on-warn: #1a1a1a;
  --bar-bg: rgba(17,17,17,.96);
  --code-bg: #111111;
  --flag-row: #fffbd6; --flag-row-hover: #fff6b0;
  --weekend: #e0e0e0;
  --scrim: rgba(0,0,0,.4);
  --shadow: 0 12px 32px rgba(0,0,0,.2);
}
html[data-theme=cmyk] header.bar, html[data-theme=cmyk] .bar * { color: #f3f3f3; }
html[data-theme=cmyk] .bar .panes a[aria-current=page] { color: #00a3e0; }
html[data-theme=cmyk] .failed code { color: #ffe600; }

/* The other seven Ramey picked off Opalstack (2026-10-06). Each is the full variable set; bar
   text is forced light on themes whose bar is dark. */
html[data-theme=corporate] {
  color-scheme: light;
  --bg: #ebebeb; --panel: #ffffff; --panel-2: #f1f3f6; --line: #cdd3db; --line-soft: #e1e5ea;
  --ink: #15191f; --dim: #4f5a68; --dimmer: #7a8594;
  --ok: #1f9d57; --warn: #b07a00; --bad: #d1343b; --acc: #0074b8; --purple: #5d6b85;
  --ok-ink: #0e6b3a; --ok-soft: #dcf5e6; --ok-line: #9ad9b4;
  --warn-ink: #6e4b00; --warn-soft: #fff3d1; --warn-line: #ecc670; --warn-wash: rgba(176,122,0,.12);
  --bad-ink: #9b1c22; --bad-soft: #fde4e5; --bad-line: #f0a9ac; --bad-wash: rgba(209,52,59,.1);
  --acc-wash: rgba(0,116,184,.18); --on-acc: #ffffff; --on-warn: #1a1205;
  --bar-bg: rgba(10,10,10,.96); --code-bg: #0a0a0a;
  --flag-row: #fff8e6; --flag-row-hover: #fff1cc; --weekend: #e2e2e2;
  --scrim: rgba(0,0,0,.4); --shadow: 0 12px 32px rgba(0,0,0,.18);
}
html[data-theme=bumblebee] {
  color-scheme: light;
  --bg: #f0f0f0; --panel: #ffffff; --panel-2: #f6f6f6; --line: #d6d6d6; --line-soft: #e6e6e6;
  --ink: #111111; --dim: #4d4d4d; --dimmer: #777777;
  --ok: #17a673; --warn: #ff8a00; --bad: #d12c2c; --acc: #e0a800; --purple: #111111;
  --ok-ink: #0d6b4a; --ok-soft: #dcf5ec; --ok-line: #8fdcc1;
  --warn-ink: #7a3f00; --warn-soft: #ffe8cc; --warn-line: #ffb366; --warn-wash: rgba(255,138,0,.14);
  --bad-ink: #951a1a; --bad-soft: #fde2e2; --bad-line: #f0a3a3; --bad-wash: rgba(209,44,44,.1);
  --acc-wash: rgba(255,204,0,.35); --on-acc: #111111; --on-warn: #111111;
  --bar-bg: rgba(60,60,60,.97); --code-bg: #111111;
  --flag-row: #fff7cc; --flag-row-hover: #fff0a3; --weekend: #e8e8e8;
  --scrim: rgba(0,0,0,.4); --shadow: 0 12px 32px rgba(0,0,0,.18);
}
html[data-theme=winter] {
  color-scheme: light;
  --bg: #e3ecf7; --panel: #ffffff; --panel-2: #eef3fa; --line: #c4d2e6; --line-soft: #d9e3f0;
  --ink: #0f1d33; --dim: #3f5273; --dimmer: #6b7f9f;
  --ok: #2a9d6f; --warn: #b8860b; --bad: #c73e8a; --acc: #0a6cff; --purple: #4c3b9e;
  --ok-ink: #1a6b4b; --ok-soft: #dff3ea; --ok-line: #9ad9c0;
  --warn-ink: #6e5006; --warn-soft: #fff3cf; --warn-line: #ecd080; --warn-wash: rgba(184,134,11,.12);
  --bad-ink: #8f2a62; --bad-soft: #fbe3f0; --bad-line: #eeaacf; --bad-wash: rgba(199,62,138,.1);
  --acc-wash: rgba(10,108,255,.18); --on-acc: #ffffff; --on-warn: #1a1205;
  --bar-bg: rgba(8,18,46,.96); --code-bg: #08122e;
  --flag-row: #fff6dc; --flag-row-hover: #ffeeba; --weekend: #d8e3f1;
  --scrim: rgba(8,18,46,.4); --shadow: 0 12px 32px rgba(8,18,46,.2);
}
html[data-theme=night] {
  color-scheme: dark;
  --bg: #0b1222; --panel: #141c2e; --panel-2: #1b2539; --line: #2a3650; --line-soft: #202b42;
  --ink: #e8eefb; --dim: #a9b6d3; --dimmer: #7c89a8;
  --ok: #3fd3a5; --warn: #f5b640; --bad: #ff5d9e; --acc: #3fc1f6; --purple: #8a7cff;
  --ok-ink: #8fe9cb; --ok-soft: #10302a; --ok-line: #1f5a4a;
  --warn-ink: #ffd27a; --warn-soft: #2e2410; --warn-line: #5a4616; --warn-wash: rgba(245,182,64,.14);
  --bad-ink: #ffb0cf; --bad-soft: #35142a; --bad-line: #6a2650; --bad-wash: rgba(255,93,158,.14);
  --acc-wash: rgba(63,193,246,.18); --on-acc: #06111f; --on-warn: #1a1205;
  --bar-bg: rgba(11,18,34,.94); --code-bg: #070d1a;
  --flag-row: #2a2210; --flag-row-hover: #352b14; --weekend: #0f172b;
  --scrim: rgba(0,0,0,.5); --shadow: 0 12px 32px rgba(0,0,0,.5);
}
html[data-theme=wireframe] {
  color-scheme: light;
  --bg: #ededed; --panel: #ffffff; --panel-2: #f3f3f3; --line: #c8c8c8; --line-soft: #dddddd;
  --ink: #222222; --dim: #5c5c5c; --dimmer: #8a8a8a;
  --ok: #2f7d5a; --warn: #8a6d00; --bad: #a33a3a; --acc: #3a3a3a; --purple: #6a6a6a;
  --ok-ink: #245f45; --ok-soft: #e4efe9; --ok-line: #a9c9ba;
  --warn-ink: #5c4800; --warn-soft: #f3eed8; --warn-line: #d9cc8e; --warn-wash: rgba(138,109,0,.1);
  --bad-ink: #7d2c2c; --bad-soft: #f4e3e3; --bad-line: #d9a8a8; --bad-wash: rgba(163,58,58,.1);
  --acc-wash: rgba(0,0,0,.12); --on-acc: #ffffff; --on-warn: #1a1205;
  --bar-bg: rgba(228,228,228,.96); --code-bg: #e2e2e2;
  --flag-row: #f3eed8; --flag-row-hover: #ece4c2; --weekend: #e4e4e4;
  --scrim: rgba(0,0,0,.3); --shadow: 0 12px 32px rgba(0,0,0,.14);
}
html[data-theme=lofi] {
  color-scheme: light;
  --bg: #f0f0f0; --panel: #ffffff; --panel-2: #f4f4f4; --line: #cfcfcf; --line-soft: #e2e2e2;
  --ink: #000000; --dim: #444444; --dimmer: #707070;
  --ok: #2bb673; --warn: #c48a00; --bad: #d1263a; --acc: #000000; --purple: #333333;
  --ok-ink: #1a7a4c; --ok-soft: #dff5ea; --ok-line: #9fe1c1;
  --warn-ink: #705000; --warn-soft: #fff2cc; --warn-line: #ebcc66; --warn-wash: rgba(196,138,0,.12);
  --bad-ink: #981a29; --bad-soft: #fde1e4; --bad-line: #f1a3ab; --bad-wash: rgba(209,38,58,.1);
  --acc-wash: rgba(0,0,0,.14); --on-acc: #ffffff; --on-warn: #1a1205;
  --bar-bg: rgba(0,0,0,.97); --code-bg: #000000;
  --flag-row: #fff6d6; --flag-row-hover: #ffefb8; --weekend: #e8e8e8;
  --scrim: rgba(0,0,0,.45); --shadow: 0 12px 32px rgba(0,0,0,.2);
}
html[data-theme=garden] {
  color-scheme: light;
  --bg: #d9d9d9; --panel: #ffffff; --panel-2: #efefef; --line: #c6c6c6; --line-soft: #dadada;
  --ink: #1c1c1c; --dim: #4a4a4a; --dimmer: #777777;
  --ok: #1f9d55; --warn: #b7791f; --bad: #e6007e; --acc: #5c7a5e; --purple: #8c3b63;
  --ok-ink: #146b3a; --ok-soft: #dcf3e5; --ok-line: #98d6b3;
  --warn-ink: #6e4610; --warn-soft: #fff0d6; --warn-line: #e8c48a; --warn-wash: rgba(183,121,31,.12);
  --bad-ink: #9c0055; --bad-soft: #fde0ef; --bad-line: #f59cc9; --bad-wash: rgba(230,0,126,.1);
  --acc-wash: rgba(92,122,94,.2); --on-acc: #ffffff; --on-warn: #1a1205;
  --bar-bg: rgba(43,32,2,.97); --code-bg: #2b2002;
  --flag-row: #fff3dc; --flag-row-hover: #ffe9c2; --weekend: #cfcfcf;
  --scrim: rgba(0,0,0,.4); --shadow: 0 12px 32px rgba(0,0,0,.2);
}
html[data-theme=corporate] header.bar, html[data-theme=corporate] .bar *,
html[data-theme=bumblebee] header.bar, html[data-theme=bumblebee] .bar *,
html[data-theme=winter] header.bar, html[data-theme=winter] .bar *,
html[data-theme=lofi] header.bar, html[data-theme=lofi] .bar *,
html[data-theme=garden] header.bar, html[data-theme=garden] .bar * { color: #f3f3f3; }
html[data-theme=corporate] .failed code, html[data-theme=bumblebee] .failed code, html[data-theme=winter] .failed code,
html[data-theme=lofi] .failed code, html[data-theme=garden] .failed code { color: #ffe600; }

.bar select.theme, .foot select.theme { -webkit-appearance: none; appearance: none; padding-right: 20px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6'%3E%3Cpath d='M0 0h8L4 6z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 7px center; }
.foot select.theme option, .bar select.theme option { color: #111; background: #fff; }

* { box-sizing: border-box; }
/* The page scrollbar appears only once a pane has loaded its rows; with classic (non-overlay)
   scrollbars that narrows the page by the bar's width and shifts everything sideways. Reserve the
   gutter from the start. (2026-10-07) */
html { scrollbar-gutter: stable; }

/* ---- scrollbars (2026-10-06, Ramey): thin, panel-coloured, no track chrome. Firefox takes the
   two-colour shorthand; WebKit takes the pseudo-elements. Same look on the page, menus and lanes. */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--dimmer); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---- top bar. Sticky because these pages get long and the stamp is the point. ---- */
:root { --bar-h: 52px; --rail-w: 52px; --rail-open: 176px; }
/* ---- the rail (2026-10-07): pane nav down the left, fixed, never wraps ----
   Icons only at rest (Ramey, 2026-10-07: "so it doesn't take up so much space"). Hovering it, or
   tabbing into it, slides it open OVER the page with the labels; the page never moves, because the
   body only ever reserves the 52px strip. Opening waits a beat so a cursor passing by does not
   flash it; closing is immediate. Touch screens keep the icons (there is no hover to open it). */
nav.rail {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--rail-w); z-index: 12; overflow: hidden;
  display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 14px;
  background: var(--bar-bg); backdrop-filter: blur(8px); border-right: 1px solid var(--line);
  transition: width .16s ease, box-shadow .16s ease;
}
nav.rail a .lb { opacity: 0; transition: opacity .12s ease; }
@media (hover: hover) {
  nav.rail:hover, nav.rail:focus-within { width: var(--rail-open); box-shadow: 10px 0 28px var(--scrim); transition-delay: .12s; }
  nav.rail:hover a .lb, nav.rail:focus-within a .lb { opacity: 1; transition-delay: .12s; }
}
@media (hover: none) { nav.rail:focus-within { width: var(--rail-open); } nav.rail:focus-within a .lb { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { nav.rail, nav.rail a .lb { transition: none; } }
nav.rail { padding-top: 14px; }
nav.rail .grp { display: flex; flex-direction: column; gap: 2px; }
nav.rail .grp.creative { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
nav.rail .grp.ops { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
nav.rail .grp.tools { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
nav.rail a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px;
  color: var(--dim); text-decoration: none; font-size: 12.5px; letter-spacing: .02em; white-space: nowrap; }
nav.rail a .ic { width: 16px; height: 16px; flex: none; }
nav.rail a .ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
nav.rail a:hover { color: var(--ink); background: var(--panel-2); }
nav.rail a[aria-current=page] { color: var(--ink); background: var(--panel-2); box-shadow: inset 2px 0 0 var(--acc); }
header.bar {
  /* Fixed height, out of flow, nothing wraps (2026-10-07, Ramey: a layout shift on every pane). The
     bar is injected by app.js after first paint; body reserves --bar-h, so it costs no movement. */
  position: fixed; top: 0; left: var(--rail-w); right: 0; z-index: 10; height: var(--bar-h);
  display: flex; align-items: center; gap: 14px; flex-wrap: nowrap;
  padding: 0 18px;
  background: var(--bar-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
body { padding-top: var(--bar-h); padding-left: var(--rail-w); }
html.embed body { padding-top: 0; padding-left: 0; }
.bar .mark { display: block; width: 30px; height: 26px; color: var(--ink); flex: none; }
.bar .mark svg { width: 100%; height: 100%; display: block; }
.bar .mark:hover { color: var(--acc); }
.bar h1 { white-space: nowrap; flex: none; }
.bar .cf { min-width: 390px; flex: none; }
.bar .cf select:not([data-picker]) { visibility: hidden; }
.bar .cpick > button { white-space: nowrap; }
/* the footer: bottom-right, fixed, quiet until hovered */
footer.foot { position: fixed; right: 12px; bottom: 10px; z-index: 9; display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 8px; background: var(--bar-bg); border: 1px solid var(--line); backdrop-filter: blur(8px);
  opacity: .55; transition: opacity .15s; }
footer.foot:hover, footer.foot:focus-within { opacity: 1; }
footer.foot .stamp { white-space: nowrap; }
footer.foot .theme, footer.foot .signout { flex: none; }
html.embed footer.foot { display: none; }
.stats { min-height: 76px; }
.cid { font-family: var(--mono); font-size: 11px; color: var(--dimmer); white-space: nowrap; }
/* due tag (2026-10-07): 7d / 1d / od3, sits at the right edge of a card or row */
.due-tag { font: 600 10px/1 var(--mono); padding: 2px 5px; border-radius: 4px; border: 1px solid;
           white-space: nowrap; letter-spacing: .02em; flex: none; }
.due-tag.ok   { color: var(--ok-ink);   background: var(--ok-soft);   border-color: var(--ok-line); }
.due-tag.near { color: var(--warn-ink); background: var(--warn-soft); border-color: var(--warn-line); }
.due-tag.late { color: var(--bad-ink);  background: var(--bad-soft);  border-color: var(--bad-line); }
td > .due-tag { float: right; margin: 2px 0 0 10px; }
/* budget tag (2026-10-08): estimate × 2, plus the days it spans at 6 h a day */
.est-tag { font: 600 10px/1 var(--mono); padding: 2px 5px; border-radius: 4px; border: 1px solid var(--line);
           color: var(--dim); background: var(--panel-2); white-space: nowrap; flex: none; }
td > .est-tag { float: right; margin: 2px 0 0 6px; }
.bar h1 { margin: 0; font-size: 15px; letter-spacing: .02em; font-weight: 650; }
.bar .pane { color: var(--ink); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }

nav.panes { display: flex; gap: 4px; margin-left: auto; }
nav.panes a {
  color: var(--dim); text-decoration: none; padding: 4px 10px;
  border: 1px solid transparent; border-radius: 6px; font-size: 13px;
}
nav.panes a:hover { color: var(--ink); background: var(--panel-2); border-color: var(--line); }
nav.panes a[aria-current] { color: var(--ink); background: var(--panel-2); border-color: var(--line); }

/* Panes open in the same tab (2026-09-23); cmd-click still gives a second window. The old
   " ↗" suffix said "new window" and is gone with it. */

/* ---- the one client filter, every pane (2026-09-23) ---- */
.bar .cf { display: flex; align-items: center; gap: 8px; }
.bar .cf select {
  font: 12.5px/1.3 inherit; padding: 4px 8px; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px; max-width: 190px;
}
.bar .cf select:focus { outline: none; border-color: var(--acc); }
.bar .cf select:has(option:checked:not([value=""])) { border-color: var(--acc); color: var(--acc); }
.bar .cf-note {
  font: 11px/1 var(--mono); color: var(--warn); border: 1px solid var(--warn);
  border-radius: 5px; padding: 4px 7px; white-space: nowrap;
}

.stamp {
  font: 11px/1 var(--mono); color: var(--dim);
  border: 1px solid var(--line); border-radius: 5px; padding: 5px 8px;
  white-space: nowrap;
}
.stamp.stale { color: var(--on-warn); background: var(--warn); border-color: var(--warn); font-weight: 700; }

main { padding: 18px; max-width: 1400px; }

/* ---- panels ---- */
section.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 9px; margin-bottom: 16px; overflow: hidden;
}
section.card > h2 {
  margin: 0; padding: 10px 14px; font-size: 13px; font-weight: 650;
  letter-spacing: .03em; text-transform: uppercase; color: var(--dim);
  border-bottom: 1px solid var(--line); background: var(--panel-2);
  display: flex; align-items: center; gap: 10px;
}
section.card > h2 .count { margin-left: auto; font-family: var(--mono); text-transform: none; }

/* ---- collapsible, colour-coded sections (board pane, 2026-10-06) ---- */
details.sec { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--sec, var(--line));
  border-radius: 9px; margin-bottom: 12px; overflow: hidden; }
details.sec > summary { list-style: none; cursor: grab; user-select: none; margin: 0; padding: 9px 14px;
  font-size: 13px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: var(--sec-ink, var(--dim));
  background: var(--sec-wash, var(--panel-2)); display: flex; align-items: center; gap: 10px; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec[open] > summary { border-bottom: 1px solid var(--line); }
details.sec > summary .tri { color: var(--sec, var(--dimmer)); font-size: 11px; width: 10px; display: inline-block; transition: transform .12s; }
details.sec:not([open]) > summary .tri { transform: rotate(-90deg); }
details.sec > summary .count { margin-left: auto; font-family: var(--mono); text-transform: none; font-weight: 700; color: var(--sec-ink, var(--dim)); }
details.sec > summary .why { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center;
  border: 1px solid currentColor; border-radius: 50%; font-size: 10px; font-weight: 700; opacity: .6; cursor: help; text-transform: none; }
details.sec > summary .why:hover, details.sec > summary .why:focus { opacity: 1; }
details.sec table { margin: 0; }
details.sec tr.flagged td { background: transparent; }
details.sec tr.flagged:hover td { background: var(--panel-2); }
details.sec .flag { color: var(--sec-ink, var(--dim)); }
.tone-bad    { --sec: var(--bad);    --sec-ink: var(--bad-ink);  --sec-wash: var(--bad-soft); }
.tone-warn   { --sec: var(--warn);   --sec-ink: var(--warn-ink); --sec-wash: var(--warn-soft); }
.tone-ok     { --sec: var(--ok);     --sec-ink: var(--ok-ink);   --sec-wash: var(--ok-soft); }
.tone-acc    { --sec: var(--acc);    --sec-ink: var(--acc);      --sec-wash: var(--acc-wash); }
.tone-purple { --sec: var(--purple); --sec-ink: var(--purple);   --sec-wash: color-mix(in srgb, var(--purple) 14%, var(--panel)); }
.tone-dim    { --sec: var(--dimmer); --sec-ink: var(--dim);      --sec-wash: var(--panel-2); }
.pad { padding: 12px 14px; }

/* ---- the failure banner. Loud on purpose. ---- */
.failed {
  background: var(--bad-soft); border: 1px solid var(--bad); border-radius: 9px;
  padding: 14px; margin-bottom: 16px;
}
.failed h3 { margin: 0 0 6px; color: var(--bad); font-size: 14px; }
.failed p { margin: 4px 0; color: var(--ink); }
.failed code {
  display: block; margin-top: 8px; padding: 8px 10px; background: var(--code-bg);
  border-radius: 6px; font: 12px/1.5 var(--mono); color: var(--acc);
  user-select: all; overflow-x: auto;
}

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; font-weight: 600; color: var(--dim); font-size: 11px;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 7px 14px; border-bottom: 1px solid var(--line); background: var(--panel-2);
  position: sticky; top: 0;
}
td { padding: 7px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.flagged td { background: var(--flag-row); }
tr:hover td { background: var(--panel-2); }
tr.flagged:hover td { background: var(--flag-row-hover); }
td a { color: var(--acc); text-decoration: none; }
td a:hover { text-decoration: underline; }

.mono { font-family: var(--mono); font-size: 12px; }
.dim { color: var(--dim); }
.num { font-family: var(--mono); text-align: right; white-space: nowrap; }

/* ---- pills ---- */
.pill {
  display: inline-block; padding: 1px 7px; border-radius: 20px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--line); color: var(--dim);
}
.pill.ok   { color: var(--ok);   border-color: var(--ok-line); background: var(--ok-soft); }
.pill.warn { color: var(--warn); border-color: var(--warn-line); background: var(--warn-soft); }
.pill.bad  { color: var(--bad);  border-color: var(--bad-line); background: var(--bad-soft); }

.flag {
  display: block; margin-top: 3px; font-size: 11.5px; color: var(--warn);
}

/* ---- big number strip ---- */
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.stat {
  flex: 1 1 150px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 9px; padding: 12px 14px;
}
.stat .n { font: 650 26px/1.1 var(--mono); }
.stat .l { color: var(--dim); font-size: 11.5px; margin-top: 3px; }
.stat.ok .n { color: var(--ok); }
.stat.warn .n { color: var(--warn); }
.stat.bad .n { color: var(--bad); }

.empty { padding: 22px 14px; color: var(--dim); text-align: center; }

/* ---- drill-down: click a project, see the actual advisories ----
   Built 2026-09-10. The table showed a number and nothing else, so the only way to find out
   WHAT was wrong was to go read deps.json by hand. A dashboard you have to leave in order to
   act on is a dashboard that gets glanced at and ignored. Native <details>, no JS toggling. */
table.drilldown td { padding: 0; border-bottom: 1px solid var(--line-soft); }
table.drilldown tr:hover td { background: transparent; }

details > summary {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 14px; cursor: pointer; list-style: none;
  transition: background .1s;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: "▸"; color: var(--dimmer); font-size: 11px; width: 10px; flex: none;
  transition: transform .12s;
}
details[open] > summary::before { transform: rotate(90deg); }
details > summary:hover { background: var(--panel-2); }
details[open] > summary { background: var(--panel-2); border-bottom: 1px solid var(--line); }
details.quiet > summary { opacity: .5; }

summary .proj { font-size: 13px; min-width: 210px; }
summary .meta { font-size: 11.5px; }

.drill { padding: 12px 14px 14px 38px; background: var(--panel-2); }

.pkg { margin-bottom: 12px; }
.pkg:last-child { margin-bottom: 0; }
.pkg-head {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding-bottom: 5px; border-bottom: 1px solid var(--line); margin-bottom: 6px;
}
.pkg-head .fix { font-size: 11.5px; color: var(--ok); margin-left: auto; }
.pkg-head .fix.dim { color: var(--dim); }

ul.adv { list-style: none; margin: 0; padding: 0; }
ul.adv li {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 3px 0; font-size: 12.5px;
}
ul.adv a { color: var(--acc); text-decoration: none; font-size: 11.5px; white-space: nowrap; }
ul.adv a:hover { text-decoration: underline; }
.cve {
  font-size: 10.5px; color: var(--dim); border: 1px solid var(--line);
  border-radius: 3px; padding: 0 4px; white-space: nowrap;
}
.sum { color: var(--ink); flex: 1 1 300px; min-width: 0; }

.note {
  font-size: 12px; color: var(--dim); border-left: 2px solid var(--line);
  padding: 2px 0 2px 10px; margin: 10px 14px 14px;
}

/* ---- sign-out + the padded-credential notice (2026-09-17, session login) ---- */
.bar .signout, .foot .signout {
  color: var(--dimmer); text-decoration: none; font-size: 12px;
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px;
}
.bar .signout:hover, .foot .signout:hover { color: var(--ink); border-color: var(--dim); }
.bar .theme, .foot .theme {
  font: inherit; font-size: 12px; color: var(--dimmer); background: transparent; cursor: pointer;
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; text-transform: lowercase;
}
.bar .theme:hover, .foot .theme:hover { color: var(--ink); border-color: var(--dim); }
.padded-warn {
  margin: 0; padding: 10px 18px; font-size: 13px;
  background: var(--warn-wash); border-bottom: 1px solid var(--warn); color: var(--warn-ink);
}

/* rail on the themes whose bar is dark on a light page */
html[data-theme=cyberpunk] nav.rail, html[data-theme=cmyk] nav.rail, html[data-theme=corporate] nav.rail, html[data-theme=bumblebee] nav.rail,
html[data-theme=winter] nav.rail, html[data-theme=lofi] nav.rail, html[data-theme=garden] nav.rail { --ink: #f3f3f3; --dim: #c9c9c9; --panel-2: rgba(255,255,255,.1); border-right-color: rgba(255,255,255,.12); }

/* phones: after the base rules so it wins */
@media (max-width: 900px) {
  :root { --bar-h: 96px; }
  /* the first row is pinned to the top and the picker's row is reserved at a fixed height, so the
     brain and the pane name do not sit centred and then jump up when the picker arrives */
  header.bar { flex-wrap: wrap; row-gap: 6px; padding: 8px 12px; align-content: flex-start; }
  .bar .mark, .bar h1 { height: 32px; display: flex; align-items: center; }
  .bar .cf { min-width: 0; flex: 1 1 100%; height: 34px; }
  .bar .cpick, .bar .cpick > button { width: 100%; }
  .bar .cpick > button { justify-content: space-between; }
  .bar .cpick .menu { min-width: 0; width: 100%; }
  .bar .cpick > button .chips { grid-template-columns: 30px repeat(6, 28px) 44px; gap: 3px; }
  .bar .cpick > button .chip-l { font-size: 10px; }
  /* stats: one scrolling row at a fixed height, so the pane does not jump when they fill
     (on a phone the wrapping grid was 4 rows tall and arrived after first paint) */
  .stats { flex-wrap: nowrap; overflow-x: auto; min-height: 76px; height: 76px; margin-bottom: 12px; scrollbar-width: none; }
  .stats::-webkit-scrollbar { display: none; }
  .stat { flex: 0 0 140px; }
  .stats:empty { background: transparent; }
}

/* drag states shared by board sections and rows (2026-10-07) */
details.sec.dragging { opacity: .5; }
tr[draggable] { cursor: grab; }
tr.dragging { opacity: .45; }
/* Where a drop lands is a 3px line on the gap it lands in, never an outline around a target
   (v2, 2026-10-07: an outlined section did not say above or below). Set by markDrop() in app.js.
   The negative-spread shadow draws only outside the edge, so it needs no extra element. */
details.sec.drop-before, .task.drop-before { box-shadow: 0 -7px 0 -4px var(--acc); }
details.sec.drop-after, .task.drop-after { box-shadow: 0 7px 0 -4px var(--acc); }
tr.drop-before td { box-shadow: inset 0 3px 0 var(--acc); }
tr.drop-after td { box-shadow: inset 0 -3px 0 var(--acc); }
/* board sections draw their own ▾; the generic details arrow doubled it */
details.sec > summary::before { content: none; }
.ctrlrow { display: flex; justify-content: flex-end; margin-bottom: 8px; }
select.order { font: inherit; font-size: 12px; color: var(--dim); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }

/* fields that save when you leave them (2026-10-10): unsaved typing, a refused date, a save in flight */
input.dirty { outline: 1px dashed var(--warn); outline-offset: 1px; }
input.bad { border-color: var(--bad) !important; box-shadow: 0 0 0 2px var(--bad-wash); }
input.saving { opacity: .55; }

/* ── date chips + the small calendar (2026-10-10): every date shows its weekday and opens a month grid ── */
.dchip { font:inherit; font-size:13px; color:var(--ink); background:var(--panel); border:1px solid var(--line); border-radius:6px;
  padding:5px 10px; cursor:pointer; text-align:left; white-space:nowrap; min-width:8.5em; }
.dchip:hover, .dchip.open { border-color:var(--acc); }
.dchip-empty { color:var(--dimmer); }
.mcal { position:absolute; z-index:60; width:236px; padding:8px; background:var(--panel); color:var(--ink); border:1px solid var(--line);
  border-radius:10px; box-shadow:0 10px 30px rgba(0,0,0,.28); font-size:12px; }
.mcal-h { display:flex; align-items:center; justify-content:space-between; margin:0 0 6px; font-weight:600; }
.mcal-h .mcal-nav { background:none; border:0; color:var(--dim); font-size:16px; line-height:1; padding:2px 8px; cursor:pointer; border-radius:6px; }
.mcal-h .mcal-nav:hover { color:var(--ink); background:var(--panel-2); }
.mcal-g { display:grid; grid-template-columns:repeat(7, 1fr); gap:2px; }
.mcal-w { text-align:center; font:600 10px/1.8 var(--mono); color:var(--dimmer); text-transform:uppercase; }
.mcal-d { font:inherit; font-size:12px; height:28px; border:1px solid transparent; border-radius:6px; background:none; color:var(--ink); cursor:pointer; }
.mcal-d:hover { background:var(--panel-2); }
.mcal-d.wknd { color:var(--dim); }
.mcal-d.out { color:var(--dimmer); opacity:.55; }
.mcal-d.today { border-color:var(--acc); }
.mcal-d.sel { background:var(--acc); color:var(--bg); font-weight:600; }
.mcal-f { display:flex; justify-content:space-between; margin-top:6px; padding-top:6px; border-top:1px solid var(--line); }
.mcal-f button { background:none; border:0; color:var(--acc); font:inherit; font-size:12px; cursor:pointer; padding:2px 4px; }

/* ---- why the move? (2026-10-16): the one-line reason asked on every lane or Due change (askWhy, app.js) ---- */
dialog.why { padding:0; border:1px solid var(--line); border-radius:12px; background:var(--panel); color:var(--ink);
  width:min(440px, calc(100vw - 32px)); box-shadow:0 18px 50px rgba(0,0,0,.35); }
dialog.why::backdrop { background:rgba(0,0,0,.35); }
dialog.why form { padding:16px 18px 14px; margin:0; }
.why-h { margin:0 0 6px; font-weight:600; }
.why-what { margin:0 0 2px; }
.why-t { margin:0 0 12px; font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
dialog.why input { width:100%; box-sizing:border-box; font:inherit; padding:8px 10px; border-radius:8px;
  border:1px solid var(--line); background:var(--panel-2); color:var(--ink); }
dialog.why input:focus { outline:2px solid var(--acc); outline-offset:1px; }
.why-b { display:flex; gap:8px; margin-top:12px; }
.why-b button { font:inherit; padding:6px 12px; border-radius:8px; border:1px solid var(--line); background:var(--panel-2); color:var(--ink); cursor:pointer; }
.why-b button:focus-visible { outline:2px solid var(--acc); outline-offset:1px; }
.why-b .why-save { background:var(--acc); border-color:var(--acc); color:var(--on-acc); font-weight:600; }
.why-b .why-no { margin-left:auto; background:none; border-color:transparent; color:var(--dim); }
.why-b .why-no:hover { color:var(--ink); }
.why-k { margin:10px 0 0; font-size:11px; }
