/* FlexDok Dev Operations Center: the interface's styles (CONTRACT.md section 5).
   FlexDok's design language: grey chrome, readable at a glance. Purple #8B5CF6 is a FILL accent only (the active-view
   mark, primary buttons, the current pipeline stage, the "waiting on you" badge, the selected row's edge); it is never
   the colour of text. Light and dark follow prefers-color-scheme; the toggle stamps [data-theme] on <html>, which wins
   in both directions. Every colour is a token on bare :root; the dark blocks only redefine tokens.
   (2026-10-29, the sidebar redesign, for the operator's "more beautiful, very well structured and fluent" of about
   20:35 UTC and the "Left sidebar" answer in RULINGS.md) One scale for everything: spacing 4/8/12/16/24/32 (--s1 to
   --s6), radius 10 to 12, soft shadows, a type scale of 24/700 page titles, small-caps muted section labels and 14 px
   body, tabular numbers for every count and time, and 160 ms transitions that prefers-reduced-motion switches off.
   The page is a grid of the sidebar and the content: a full sidebar above 1100 px, an icon rail from 761 to 1100 px,
   and on a phone a slim bar with the sidebar as a drawer (400 px must never scroll sideways).
   (2026-11-04, R-0256) Flex DevCenter 3.0 wears the Mist look the operator chose on the proposal page A-0125:
   lavender-grey paper under white cards, wide Archivo titles, Instrument Sans for the interface and JetBrains Mono for
   versions, commits and times, rounder corners and roomier rows. The three faces are served from /fonts/ (SIL Open Font
   License, the texts beside them); the tokens below carry the palette, and the "Mist" section at the end refines
   the shapes. Purple is still a fill only. */

@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url("fonts/archivo-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url("fonts/archivo-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-stretch: 100%; font-display: swap;
  src: url("fonts/instrument-sans-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-stretch: 100%; font-display: swap;
  src: url("fonts/instrument-sans-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/jetbrains-mono-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --accent: #8B5CF6;                 /* fill only */
  --accent-soft: rgba(139, 92, 246, .14);
  --on-accent: #ffffff;
  --bg: #f2effa;                     /* Mist paper, lavender-grey (2026-11-04, R-0256) */
  --surface: #ffffff;
  --surface-2: #f8f6fd;
  --surface-3: #ede9f7;
  --sidebar: #f2effa;                /* the sidebar sits on the paper itself */
  --sb-hover: #e9e3f7;
  --sb-active: #ffffff;              /* the active view: a white pill on the paper */
  --border: #e2dcf1;
  --border-strong: #cbc3e0;
  --text: #17161c;
  --text-2: #4d4b57;
  --muted: #6e6b78;
  --chip: #ede9f7;
  --row-hover: #f7f4fd;
  --row-sel: #efe9fd;
  --focus: rgba(139, 92, 246, .6);
  --scrim: rgba(23, 16, 40, .45);
  --shadow: 0 1px 2px rgba(40, 24, 90, .05), 0 1px 3px rgba(40, 24, 90, .06);
  --shadow-md: 0 2px 4px rgba(40, 24, 90, .05), 0 8px 20px rgba(40, 24, 90, .08);
  --shadow-lg: 0 18px 44px rgba(40, 24, 90, .2);
  --banner-bg: #fff4e0;
  --banner-border: #f1c27a;
  --warn-bg: rgba(217, 119, 6, .08);
  --warn-border: rgba(217, 119, 6, .45);
  --ok: #16a34a; --warn: #d97706; --bad: #dc2626; --info: #0284c7; --idle: #9aa1ab; --filed: #f97316; --err: #be123c;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --dur: 160ms;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sb-w: 248px;
  --rail-w: 68px;
  --mb-h: 52px;
  --font: "Instrument Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  --display: Archivo, "Instrument Sans", "Segoe UI", system-ui, sans-serif;   /* titles and the brand, set wide */
  /* (2026-10-31, CONTRACT.md 6.11 C) The charts' colours, by the job each does (the dataviz skill's method).
     CATEGORICAL, a FIXED order, validated 2026-10-31 by the skill's validate_palette.js on this page's own surfaces
     (light on #ffffff, dark on #171a1f, all checks pass; slots 3 and 4 sit under 3:1 on light, so every chart carries
     direct labels or its Table view); "Other" is the de-emphasis grey. STATUS: the skill's status palette, the same in
     both modes, never a series colour, always beside an icon and a label. SEQUENTIAL: one blue ramp, light to dark;
     the dark blocks reverse it so near-zero recedes into the dark surface. Grid and axis: hairlines one step off the
     surface. */
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-other: #a7adb6;
  --st-good: #0ca30c; --st-warning: #fab219; --st-serious: #ec835a; --st-critical: #d03b3b;
  --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #6da7ec; --seq-4: #3987e5; --seq-5: #256abf; --seq-6: #184f95; --seq-7: #0d366b;
  --chart-grid: #eaecef; --chart-axis: #c3c8cf;
  --ink-on-fill: #ffffff; --ink-on-light-fill: #0b0b0b;   /* an icon inside a status fill: white, near-black on warning */
  /* (2026-11-02, CONTRACT.md 6.13 H, the fix round) an artifact poster's colour per kind: fills and icons only, never
     words; no purple among them (purple stays the accent) */
  --k-page: #64748b; --k-report: #2a78d6; --k-dashboard: #1baf7a; --k-deck: #eb6834; --k-diagram: #0891b2;
  --k-explainer: #d97706; --k-app: #0d9488; --k-game: #db2777; --k-other: #64748b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --accent-soft: rgba(150, 112, 247, .22);
    --bg: #131019; --surface: #1a1724; --surface-2: #1f1b2b; --surface-3: #2a2538;
    --sidebar: #131019; --sb-hover: #221d30; --sb-active: #2a2440;
    --border: #2b2640; --border-strong: #3f3858;
    --text: #edecf2; --text-2: #c2bfd0; --muted: #918ca3;
    --chip: #2a2538; --row-hover: #1f1b2b; --row-sel: #2a2340;
    --scrim: rgba(0, 0, 0, .6);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-md: 0 2px 4px rgba(0, 0, 0, .4), 0 8px 20px rgba(0, 0, 0, .35); --shadow-lg: 0 16px 40px rgba(0, 0, 0, .55);
    --banner-bg: #2b2213; --banner-border: #6b5222; --idle: #6b7380;
    --warn-bg: rgba(217, 119, 6, .12); --warn-border: rgba(217, 119, 6, .5);
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-other: #5d6571;
    --seq-1: #0d366b; --seq-2: #184f95; --seq-3: #256abf; --seq-4: #3987e5; --seq-5: #6da7ec; --seq-6: #9ec5f4; --seq-7: #cde2fb;
    --chart-grid: #22262d; --chart-axis: #3a414b;
    --k-page: #94a3b8; --k-report: #5a9ae8; --k-dashboard: #34c995; --k-deck: #f08a5d; --k-diagram: #22b5d6;
    --k-explainer: #f0a33a; --k-app: #2dbdaf; --k-game: #ec5f9f; --k-other: #94a3b8;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent-soft: rgba(150, 112, 247, .22);
  --bg: #131019; --surface: #1a1724; --surface-2: #1f1b2b; --surface-3: #2a2538;
  --sidebar: #131019; --sb-hover: #221d30; --sb-active: #2a2440;
  --border: #2b2640; --border-strong: #3f3858;
  --text: #edecf2; --text-2: #c2bfd0; --muted: #918ca3;
  --chip: #2a2538; --row-hover: #1f1b2b; --row-sel: #2a2340;
  --scrim: rgba(0, 0, 0, .6);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-md: 0 2px 4px rgba(0, 0, 0, .4), 0 8px 20px rgba(0, 0, 0, .35); --shadow-lg: 0 16px 40px rgba(0, 0, 0, .55);
  --banner-bg: #2b2213; --banner-border: #6b5222; --idle: #6b7380;
  --warn-bg: rgba(217, 119, 6, .12); --warn-border: rgba(217, 119, 6, .5);
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-other: #5d6571;
  --seq-1: #0d366b; --seq-2: #184f95; --seq-3: #256abf; --seq-4: #3987e5; --seq-5: #6da7ec; --seq-6: #9ec5f4; --seq-7: #cde2fb;
  --chart-grid: #22262d; --chart-axis: #3a414b;
  --k-page: #94a3b8; --k-report: #5a9ae8; --k-dashboard: #34c995; --k-deck: #f08a5d; --k-diagram: #22b5d6;
  --k-explainer: #f0a33a; --k-app: #2dbdaf; --k-game: #ec5f9f; --k-other: #94a3b8;
}

/* ---- base ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--text-2); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
/* Visually hidden, still read aloud: the rail keeps every link's name for a screen reader. */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 6px 10px; border-radius: 6px; }
.skip:focus { left: 8px; }
kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--surface-2); color: var(--text); }
/* The inline SVG icons app.js draws into [data-icon] (stroke = currentColor, so they take the text colour around them). */
.ico { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; }
.ico svg { width: 100%; height: 100%; display: block; }

/* ---- the sidebar (2026-10-29, the sidebar redesign: it replaced the top bar, which held the same pieces in one row;
   the operator chose "Left sidebar" over a refined top bar). Top: the brand and the workspace switcher. Middle: the
   views, each an icon, a label and its count; the admin entries below for admins. Bottom: the live status, the clock,
   the theme, help and the account. It stays in view (sticky) while the content scrolls. ---- */
.shell { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; z-index: 20; display: flex; flex-direction: column; gap: var(--s3); height: 100vh; min-width: 0;
  padding: var(--s4) var(--s3) var(--s3); background: var(--sidebar); border-right: 1px solid var(--border); }
.sb-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: 0 var(--s1); min-height: 34px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; white-space: nowrap; }
.logo { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 15px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 15px; }
.brand-sub { color: var(--muted); font-size: 12px; }
/* The drawer's close button exists on a phone only; the compound selector outranks .icon-btn's display, declared later. */
.sb-top .sb-close { display: none; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 calc(-1 * var(--s1)); padding: 2px var(--s1); scrollbar-width: thin; }
.nav a { position: relative; display: flex; align-items: center; gap: 10px; flex: none; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--text-2);
  text-decoration: none; white-space: nowrap; font-weight: 600; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.nav a:hover { color: var(--text); background: var(--sb-hover); }
.nav a[aria-current="page"] { color: var(--text); background: var(--sb-active); }
/* The active view's mark: a purple fill bar at the item's left edge (the old top bar drew it under the link). */
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: calc(-1 * var(--s1)); top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav .ni { color: var(--muted); transition: color var(--dur) var(--ease); }
.nav a:hover .ni, .nav a[aria-current="page"] .ni { color: var(--text-2); }
.nav .nl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { margin: var(--s4) 10px var(--s1); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.badge.accent { background: var(--accent); color: var(--on-accent); }
.badge.bad { background: var(--bad); color: #ffffff; }
.sb-foot { display: flex; flex-direction: column; gap: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--border); }
.sb-row { display: flex; align-items: center; gap: 6px; }
.sb-row .clock { flex: 1 1 auto; min-width: 0; padding-left: 4px; }
.clock { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font: inherit; font-size: 12px; cursor: pointer; min-width: 0; transition: background-color var(--dur) var(--ease); }
.sb-foot .pill { width: 100%; justify-content: flex-start; overflow: hidden; white-space: nowrap; }
.pill .dot, .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--idle)); flex: none; }
.pill[data-state="live"], .mb-live[data-state="live"] { --dot: var(--ok); }
.pill[data-state="connecting"], .mb-live[data-state="connecting"] { --dot: var(--idle); }
.pill[data-state="reconnecting"], .mb-live[data-state="reconnecting"] { --dot: var(--warn); }
.pill[data-state="offline"], .mb-live[data-state="offline"] { --dot: var(--bad); }
.pill[data-state="live"] .dot { box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
/* Beside "Live": the newest event's seq and its age, re-counted every second (app.js renderLiveLast). */
.live-last { color: var(--muted); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.live-last::before { content: "\00B7"; margin-right: 6px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; min-width: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-2); font: inherit; font-size: 12px; cursor: pointer; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.icon-btn .ico { width: 16px; height: 16px; }
.icon-btn:hover, .pill:hover { background: var(--surface-3); color: var(--text); }
/* The phone's bar (hidden above 760 px) and the drawer's scrim. */
.mobilebar { display: none; }
.scrim { position: fixed; inset: 0; z-index: 44; background: var(--scrim); }
@media (min-width: 761px) { .scrim { display: none !important; } }
.content { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }

/* ---- banner (stream or server down) ---- */
.banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 32px; background: var(--banner-bg); border-bottom: 1px solid var(--banner-border); color: var(--text); font-size: 13px; }

/* ---- page frame ---- */
.main { flex: 1 0 auto; width: 100%; max-width: 1480px; margin: 0 auto; padding: 28px var(--s6) 48px; outline: none; }
body.panel-open .main { padding-right: calc(var(--s6) + min(560px, 42vw)); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 24px; line-height: 1.25; letter-spacing: -.01em; }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.page-head .head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .grow { flex: 1 1 220px; min-width: 0; }
.count-line { color: var(--muted); font-size: 12px; margin: 0 0 8px; font-variant-numeric: tabular-nums; }

/* ---- controls ---- */
.input, select, textarea { font: inherit; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.input, select { height: 34px; padding: 0 10px; }
.input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
select { padding-right: 6px; max-width: 220px; }
textarea { width: 100%; min-height: 72px; padding: 8px 10px; resize: vertical; line-height: 1.45; }
.input::placeholder, textarea::placeholder { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), filter var(--dur) var(--ease); }
.btn:hover { background: var(--surface-3); }
.btn .ico { width: 15px; height: 15px; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); box-shadow: 0 1px 2px rgba(139, 92, 246, .3); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.btn[aria-pressed="true"] { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.form-err { color: var(--bad); font-size: 12px; }
label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }

/* ---- chips (status, lead, kind) : neutral text, the colour is the dot ---- */
.chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 1px 8px; border-radius: 999px; background: var(--chip); color: var(--text); font-size: 12px; font-weight: 600; line-height: 20px; white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; }
.chip.plain { font-weight: 500; color: var(--text-2); }
.chip.link { text-decoration: none; cursor: pointer; }
.chip.link:hover { background: var(--surface-3); }
.chip.strong { box-shadow: inset 0 0 0 1px var(--border-strong); }
.chip.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); }
.s-new { --dot: #94a3b8; } .s-triaged { --dot: #64748b; } .s-designing { --dot: #0ea5e9; } .s-building { --dot: #f59e0b; }
.s-waiting-operator { --dot: #f97316; } .s-ready-for-you { --dot: var(--accent); } .s-releasing { --dot: #14b8a6; }
.s-live { --dot: #22c55e; } .s-done { --dot: #15803d; } .s-parked { --dot: #a3a3a3; } .s-declined { --dot: #737373; }
/* (2026-10-29, about 22:10 UTC) Partially live: Live's green, half filled, so it reads as "some of it is out". Both
   spellings, because a chip carries the class on itself (.chip.s-x .dot) and dotText() on the dot (.dot.s-x). */
.s-partially-live { --dot: #22c55e; }
.s-partially-live .dot, .dot.s-partially-live { background: linear-gradient(90deg, var(--dot) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--dot); }
.s-planned { --dot: #94a3b8; } .s-preparing { --dot: #0ea5e9; } .s-candidate { --dot: #3b82f6; } .s-testing { --dot: #f59e0b; }
.s-gate { --dot: #f97316; } .s-pushing { --dot: #14b8a6; } .s-deploying { --dot: #06b6d4; } .s-live-check { --dot: #84cc16; }
.s-rolled-back { --dot: #dc2626; } .s-cancelled { --dot: #737373; }
.p-urgent { --dot: #dc2626; } .p-high { --dot: #f97316; } .p-normal { --dot: #94a3b8; } .p-low { --dot: #cbd5e1; }
.l-ok { --dot: #22c55e; } .l-warn { --dot: #f59e0b; } .l-bad { --dot: #dc2626; } .l-info { --dot: #0ea5e9; } .l-idle { --dot: #a3a3a3; }
/* (2026-10-29, the Tests page, CONTRACT.md 6.8) A run's status and a switch's state: the colour is the dot, the word is
   always beside it. A filed red (a known red held against its BACKLOG row) is orange, not red: it was expected. */
.t-pass { --dot: var(--ok); } .t-fail { --dot: var(--bad); } .t-filed-red { --dot: var(--filed); } .t-error { --dot: var(--err); }
.t-skipped { --dot: var(--idle); } .t-never { --dot: transparent; }
.t-never .dot, .dot.t-never { box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.ps-on { --dot: var(--ok); } .ps-off { --dot: var(--bad); } .ps-paused { --dot: var(--warn); }

/* ---- cards and layout grids ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--s4) 18px; min-width: 0; }
.card + .card { margin-top: var(--s4); }
.card[hidden] + .card { margin-top: 0; }
/* "Needs attention" (GET /api/attention): the purple edge is a fill, as on a selected release; absent when empty. */
.card.attention { box-shadow: inset 3px 0 0 var(--accent), var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.card-head a.small { color: var(--text-2); text-decoration: none; font-weight: 600; }
.card-head a.small:hover { color: var(--text); text-decoration: underline; }
.ov-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--s4); margin-top: var(--s4); align-items: start; }
.ov-grid > div > .card + .card { margin-top: var(--s4); }
.kpis + .card { margin-top: var(--s4); }
.card + .toolbar { margin-top: var(--s4); }
@media (max-width: 1180px) { .ov-grid { grid-template-columns: minmax(0, 1fr); } }
/* The Overview's hero: the current release, first on the page (2026-10-29, the sidebar redesign). */
.card.hero { padding: 18px 20px; }
.card.hero .rel-head h3 { font-size: 22px; }
.card.hero .pipe .node { width: 22px; height: 22px; }
.card.hero .pipe li::before { top: 10px; }
/* The row of KPI tiles under the hero: Waiting on you, Building, Live, Tests. */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); margin-top: var(--s4); }
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
a.kpi:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.kpi .k-label { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kpi .k-label > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi .k-ico { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); }
.kpi .k-ico .ico { width: 16px; height: 16px; }
.kpi.accent .k-ico { background: var(--accent); color: var(--on-accent); }
.kpi .k-n { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .k-n .k-of { font-size: 15px; font-weight: 700; color: var(--muted); }
.kpi .k-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; min-width: 0; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.kpi .k-sub > span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.kpi .k-sub .skel { width: 80%; }
.kpi .k-n .skel { width: 3em; height: 22px; }

/* ---- release headline and pipeline ---- */
.rel-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.rel-head h3 { font-size: 18px; }
.rel-head h3 a { text-decoration: none; }
.pipe-wrap { overflow-x: auto; margin: 14px 0 4px; padding-bottom: 4px; }
.pipe { display: grid; grid-template-columns: repeat(9, minmax(82px, 1fr)); list-style: none; margin: 0; padding: 0; min-width: 740px; }
.pipe li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 4px; }
.pipe li::before { content: ""; position: absolute; top: 9px; left: -50%; right: 50%; height: 2px; background: var(--border-strong); }
.pipe li:first-child::before { display: none; }
.pipe li.done::before, .pipe li.now::before { background: var(--text-2); }
.pipe .node { position: relative; z-index: 1; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--surface); }
.pipe li.done .node { background: var(--text-2); border-color: var(--text-2); }
.pipe li.now .node { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.pipe .st { margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.pipe li.todo .st { color: var(--muted); font-weight: 600; }
.pipe li.now .st { color: var(--text); }
.pipe .tm { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pipe.off li .node { opacity: .6; }
.pipe.compact { min-width: 560px; grid-template-columns: repeat(9, minmax(60px, 1fr)); }
.pipe.compact .node { width: 14px; height: 14px; border-width: 2px; font-size: 0; }
.pipe.compact li::before { top: 6px; }
.pipe.compact li.now .node { box-shadow: 0 0 0 3px var(--accent-soft); }
.pipe.compact .st { font-size: 11px; margin-top: 4px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 16px; margin-top: 14px; }
.fact .k { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.fact .v { font-size: 13px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* ---- status tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; text-decoration: none; transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.tile:hover { background: var(--surface-3); }
.tile .n { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile .l { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.tile.zero { opacity: .55; }

/* ---- lists: waiting, feed, agents mini ---- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { min-width: 0; }
.list > li + li { border-top: 1px solid var(--border); }
/* A list row is three columns that never cross (2026-10-29, the operator's screenshot at about 1960 px, where each
   summary ran on under the "43 min ago" time and out into the right-hand column): a lead (a chip or a dot), the body
   (the title on one line, the summary clamped to two, both cut with an ellipsis; the whole text is the row's tooltip
   and the detail panel), and the time in a column of its own. The body's text sits in BLOCK boxes: an inline span
   ignores overflow and text-overflow, so a nowrap summary in one simply painted across the time and past the card. */
.item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "lead body when"; gap: 10px; align-items: start; padding: 9px 6px; border-radius: 8px; text-decoration: none; transition: background-color var(--dur) var(--ease); }
a.item:hover { background: var(--row-hover); }
.item > * { min-width: 0; overflow-wrap: anywhere; }
.item > .lead { grid-area: lead; }
.item > .lead .chip { max-width: 14em; overflow: hidden; }
.item > .lead.dotlead { padding-top: 6px; }
.item > .body { grid-area: body; overflow: hidden; }
.item > .when { grid-area: when; min-width: 5.5em; padding-top: 2px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.item .t { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .t.clamp2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; white-space: normal; }
.item .s { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; color: var(--muted); font-size: 12px; }
/* On a phone a row whose lead is a chip puts the chip and the time on one line and gives the body the whole width. */
@media (max-width: 560px) {
  .item.stack { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lead when" "body body"; row-gap: 4px; }
  .item.stack > .lead { justify-self: start; }
}
.group-label { font-size: 12px; font-weight: 700; color: var(--text-2); margin: 12px 0 4px; }
.group-label:first-child { margin-top: 0; }

/* ---- event log rows (feed, activity, timelines) ---- */
.ev { display: grid; grid-template-columns: 112px auto minmax(0, 1fr); gap: 4px 10px; align-items: baseline; padding: 7px 4px; font-size: 13px; }
.ev + .ev { border-top: 1px solid var(--border); }
.ev .tm { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev .who { color: var(--text-2); font-size: 12px; white-space: nowrap; max-width: 16em; overflow: hidden; text-overflow: ellipsis; }
.ev .txt { overflow-wrap: anywhere; }
.ev .meta { display: inline-flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ev details { grid-column: 3; }
.ev details summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.ev pre { margin: 4px 0 0; padding: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; overflow: auto; max-height: 260px; font-size: 12px; }
.ev.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: var(--accent-soft); } to { background: transparent; } }
.feed { max-height: 560px; overflow-y: auto; }
.log { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 4px 14px; }

/* ---- data tables ---- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.data th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); border-bottom: 1px solid var(--border); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 0; white-space: nowrap; }
table.data th .sort { display: flex; align-items: center; gap: 4px; width: 100%; padding: 10px 12px; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; text-align: left; }
table.data th .sort:hover { color: var(--text); }
table.data th .arrow { font-size: 10px; }
table.data th.plainth { padding: 10px 12px; }
table.data td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr.row { cursor: pointer; }
table.data tbody tr.row td { transition: background-color var(--dur) var(--ease); }
table.data tbody tr.row:hover td { background: var(--row-hover); }
table.data tbody tr.sel td { background: var(--row-sel); }
table.data tbody tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
table.data td.title { max-width: 520px; }
/* (2026-10-29, the sidebar redesign) In the automatic table layout a cell's max-width is not a limit, so a long one-line
   summary claimed its whole width and pushed Updated (and, on Tests, the Switch) out of sight once the sidebar took
   248 px of the screen. max-width 0 with a share of the width makes these columns take what is left and cut their
   text with the ellipsis (the whole text is the tooltip); min-width keeps them readable where the table scrolls. */
table.reqs td.title { max-width: 0; width: 46%; min-width: 240px; }
table.feats td.title { max-width: 0; width: 78%; min-width: 240px; }
table.data td.title .t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
table.data td.title .s { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
table.data td.state-cell { padding: 0; }
table.data td.numcell, table.data th.numcell { text-align: right; font-variant-numeric: tabular-nums; }
table.data th.numcell .sort { justify-content: flex-end; }
/* A group's title row inside a table (the Agents view's "Online now" and "Silent"). */
table.data tr.grp td { padding: 8px 12px; background: var(--surface-2); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
table.data tr.grp td > .muted { margin-left: 6px; font-weight: 500; text-transform: none; letter-spacing: 0; }
/* (2026-10-30) What an agent is doing keeps a readable width; on a phone the table scrolls inside its frame instead of
   folding the sentence one word per line. */
table.data td.doing { min-width: 220px; }
table.data tr.grp .att-toggle:disabled { cursor: default; }

/* ---- releases list ---- */
.rel-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--s4) 18px; }
.rel-card + .rel-card { margin-top: var(--s3); }
.rel-card.sel { box-shadow: inset 3px 0 0 var(--accent), var(--shadow); }
.rel-card .contents { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rel-card .contents .chip { overflow: hidden; }   /* a long title is cut at the card's edge (its tooltip has it whole) */
.rel-card details { margin-top: 10px; }
.rel-card details > summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--text-2); }
.vec { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 12.5px; }
.vec .k { color: var(--muted); }
/* (2026-10-29, the Tests page) "Tests off in this release": every suite reported skipped with the release (testsOff). */
.rel-off { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.off-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.off-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 13px; }
.off-list li .why { color: var(--muted); overflow-wrap: anywhere; }
/* (2026-10-31, CONTRACT.md 6.10) The release notes on a card: "What's new" and "What's changed" side by side, one line
   per bullet (cut with the ellipsis; the whole bullet is the tooltip), "Show all" drawing the sections whole in place.
   The block stays in the layout while it is empty, at no height, because a block that is not displayed never comes into
   view, and the card asks for its notes when it does. */
.rn:not(:empty) { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.rn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
.rn-grid.one { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 760px) { .rn-grid { grid-template-columns: minmax(0, 1fr); } }
.rn-sec { min-width: 0; }
.rn-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.rn-head h4 { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--text); }
.rn-n { font-size: 11px; }
.rn-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rn-lines li { position: relative; min-width: 0; padding-left: 14px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rn-lines li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--border-strong); }
.rn-more { margin-top: 4px; padding: 0 8px; }
.rn-missing { margin: 0; }
/* The notes rendered whole (the detail panel, and a card's section after "Show all"): markdown's subset, in the page's
   own type and tokens; a table or a code block scrolls inside its own frame instead of widening the page. */
.md-notes { font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere; }
.md-notes p { margin: 0 0 8px; }
.md-notes .md-h { margin: 16px 0 6px; font-size: 13.5px; font-weight: 700; color: var(--text); }
.md-notes h5.md-h, .md-notes h6.md-h { margin-top: 12px; font-size: 12.5px; color: var(--text-2); }
.md-notes.rn-full > .md-h:first-child { margin-top: 4px; }
.md-notes .md-list { margin: 0 0 8px; padding-left: 20px; }
.md-notes .md-list li { margin: 3px 0; }
.md-notes .md-list .md-list { margin: 4px 0 2px; }
.md-notes .md-list li::marker { color: var(--muted); }
.md-notes code { padding: 0 4px; border-radius: 4px; background: var(--surface-3); font-size: 12px; }
.md-notes pre.md-code { margin: 0 0 8px; padding: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; overflow: auto; max-height: 360px; overflow-wrap: normal; }
.md-notes pre.md-code code { padding: 0; background: none; white-space: pre; }
.md-notes .md-url { color: var(--muted); }
.md-notes a[href^="#"] { white-space: nowrap; }   /* an in-page ref (R-0002, v0.229.53) is never broken at its hyphen */
.md-notes .md-tw { margin: 0 0 8px; box-shadow: none; border-radius: 8px; }
.md-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.md-table th { padding: 8px 10px; background: var(--surface-2); border-bottom: 1px solid var(--border); text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.md-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.md-table tr:last-child td { border-bottom: 0; }
.md-table td:first-child { min-width: 8em; font-weight: 600; color: var(--text-2); }
.rn-title { margin: 0 0 8px; font-size: 15px; font-weight: 700; line-height: 1.4; }
.rn-intro { color: var(--text-2); }
.rn-part { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.rn-part > .md-h:first-child { margin-top: 0; }
.rn-src { margin: 16px 0 0; }

/* ---- detail panel ---- */
.panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 15; width: min(560px, 42vw); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); overflow-y: auto; animation: panel-in var(--dur) var(--ease); }
@keyframes panel-in { from { transform: translateX(16px); opacity: .4; } to { transform: none; opacity: 1; } }
.panel-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 10px 18px; background: var(--surface); border-bottom: 1px solid var(--border); }
.panel-head .grow { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.panel-body { padding: var(--s4) 18px 40px; }
.panel-body h2.title { font-size: 19px; line-height: 1.3; margin-bottom: 12px; outline: none; }
.panel section { margin-top: 20px; }
.panel section > h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
blockquote.ask { margin: 0; padding: 10px 14px; border-left: 3px solid var(--border-strong); background: var(--surface-2); border-radius: 0 6px 6px 0; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
blockquote.ask::before { content: "\201C"; } blockquote.ask::after { content: "\201D"; }
.cite { margin-top: 4px; font-size: 12px; color: var(--muted); }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
dl.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 13px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.note { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.note + .note { margin-top: 8px; }
.note .by { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
pre.rowtext { margin: 0; padding: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 12px; line-height: 1.5; max-height: 60vh; overflow: auto; }
.tl { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); }
.tl li { position: relative; padding: 4px 0 8px 10px; font-size: 13px; }
.tl li::before { content: ""; position: absolute; left: -20px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--border-strong)); border: 2px solid var(--surface); }
.tl .when { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- states: loading, empty, error ---- */
.state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 32px 16px; color: var(--text-2); }
.state .ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-weight: 800; }
.state.error .ico { background: rgba(220, 38, 38, .12); color: var(--bad); }
.state .st-title { font-weight: 700; color: var(--text); }
.state .st-text { font-size: 13px; max-width: 560px; overflow-wrap: anywhere; }
.state.compact { padding: 16px 8px; }
.skel-box { padding: 14px 6px; }
.skel { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skel + .skel { margin-top: 10px; }
.skel.w60 { width: 60%; } .skel.w80 { width: 80%; } .skel.w40 { width: 40%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---- toasts, help, g-hint, footer ---- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { padding: 10px 12px; border: 1px solid var(--border); border-left: 4px solid var(--idle); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-lg); font-size: 13px; animation: toast-in var(--dur) var(--ease); }
@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.ok { border-left-color: var(--ok); } .toast.error { border-left-color: var(--bad); }
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: var(--scrim); }
.modal-box { width: min(520px, 100%); max-height: 90vh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 18px 20px; }
.modal-box h2 { font-size: 16px; margin-bottom: 10px; }
.keys { width: 100%; border-collapse: collapse; font-size: 13px; }
.keys td { padding: 5px 0; border-bottom: 1px solid var(--border); }
.keys td:first-child { width: 120px; white-space: nowrap; }
.ghint { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 55; padding: 6px 12px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 700; }
.foot { width: 100%; max-width: 1480px; margin: 0 auto; padding: 0 var(--s6) 24px; color: var(--muted); font-size: 12px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---- narrow screens ---- */
@media (max-width: 1100px) {
  body.panel-open .main { padding-right: var(--s5); }
  .panel { width: min(560px, 100vw); z-index: 30; }
}
@media (max-width: 760px) {
  .panel { top: 0; width: 100vw; z-index: 30; }
  dl.kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  dl.kv dd { margin-bottom: 6px; }
  .ev { grid-template-columns: minmax(0, 1fr); }
  .ev details { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .ev.flash, .skel { animation: none; }
}

/* ===== v2: workspaces, the user menu, the account and admin pages, the auth pages (DESIGN-v2.md 6.C) =========
   The same language: grey chrome; #8B5CF6 only as a fill (the current workspace's edge, the active tab's bar, primary
   buttons, a role dot); text never purple. */

/* ---- the workspace switcher and the user button ---- */
/* (2026-10-29, the sidebar redesign) Both are full-width cards in the sidebar now: the workspace at the top with a
   "Workspace" kicker over its name, the user at the bottom with their role under their name. */
.ws-switch, .user-wrap { position: relative; flex: none; }
.ws-btn, .user-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 8px; text-align: left;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-size: 13px;
  font-weight: 700; cursor: pointer; box-shadow: var(--shadow); transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.ws-btn:hover, .user-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.ws-btn[aria-expanded="true"], .user-btn[aria-expanded="true"] { background: var(--surface-2); border-color: var(--border-strong); }
.ws-text, .user-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; line-height: 1.2; }
.ws-kicker { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.user-role { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.ws-name, .user-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { color: var(--muted); font-size: 10px; }
.caret.ico { width: 16px; height: 16px; }
.ws-ico { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3);
  border: 1px solid var(--border-strong); color: var(--text-2); font-size: 13px; font-weight: 800; }
.menu .ws-ico { width: 24px; height: 24px; border-radius: 6px; font-size: 12px; }
.ws-ico.lg { width: 38px; height: 38px; border-radius: 9px; font-size: 17px; }
.user-btn { font-weight: 600; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3);
  border: 1px solid var(--border-strong); color: var(--text-2); font-size: 11.5px; font-weight: 800; letter-spacing: .02em; }
.menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 240px; max-width: min(320px, calc(100vw - 24px));
  max-height: min(70vh, 520px); overflow-y: auto; padding: 6px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); animation: menu-in var(--dur) var(--ease); }
.menu.right { left: auto; right: 0; }
/* The account menu sits at the bottom of the sidebar, so it opens upwards. */
.menu.up { top: auto; bottom: calc(100% + 6px); animation-name: menu-up; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes menu-up { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.menu-item { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text); font: inherit; font-size: 13px; text-align: left; text-decoration: none; cursor: pointer; transition: background-color var(--dur) var(--ease); }
.menu-item:hover, .menu-item:focus-visible { background: var(--row-hover); }
.menu-item .ico { width: 16px; height: 16px; color: var(--muted); }
.menu-item[aria-current="true"] { background: var(--row-sel); }
.menu-item[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--accent); }
.menu-label { padding: 6px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.menu-head { padding: 8px 10px 6px; }
.menu-sep { height: 1px; margin: 6px 4px; background: var(--border); }
.menu-empty { padding: 8px 10px; color: var(--muted); font-size: 13px; }
.mi-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mi-t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-s { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.help-btn { flex: none; }

/* ---- roles: the colour is the dot ---- */
.r-admin { --dot: var(--accent); } .r-member { --dot: #0ea5e9; } .r-viewer { --dot: #94a3b8; }

/* ---- the workspace chooser ---- */
.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ws-card { display: flex; align-items: center; gap: 12px; text-decoration: none; transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.card.ws-card + .card.ws-card { margin-top: 0; }
.ws-card:hover { background: var(--row-hover); box-shadow: var(--shadow-md); }
.page-head.gap-top { margin-top: 20px; }
.page-head h2 { font-size: 15px; }

/* ---- Needs attention: the server line ---- */
.att-server { background: var(--surface-2); border-radius: 6px; }
/* (2026-10-29, about 20:30 UTC) Folded by default: the head is a button styled as the other cards' h2, with a caret that
   turns when open; folded, one line of chips (.att-folded) stands for the rows. */
.att-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 2px 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.att-toggle:hover { color: var(--text-2); }
.att-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.att-caret { width: 0; height: 0; border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .15s ease; }
.att-toggle[aria-expanded="true"] .att-caret { transform: rotate(90deg); }
.card.attention .card-head:last-child { margin-bottom: 0; }
/* (2026-10-29, the sidebar redesign) Folded, the head and the chips share one line where there is room, so the card is
   one slim strip under the KPI tiles and never pushes the release down. */
.card.attention.folded { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.card.attention.folded .card-head { margin-bottom: 0; }
.att-more { display: block; padding: 6px 6px 2px; font-size: 12.5px; color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { .att-caret { transition: none; } }

/* ---- tabs (account, admin) ---- */
.tabs { display: flex; gap: 2px; margin: 0 0 16px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; padding: 8px 12px; color: var(--text-2); text-decoration: none; font-weight: 600; white-space: nowrap; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.tab:hover { color: var(--text); background: var(--row-hover); border-radius: 6px 6px 0 0; }
.tab[aria-current="page"] { color: var(--text); }
.tab[aria-current="page"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }

/* ---- forms ---- */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 560px; }
.form-grid.cols { max-width: none; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: start; }
.form-grid .span, .form-grid .form-err { grid-column: 1 / -1; }
.form-grid .form-row { margin-top: 0; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field .fl { font-size: 12px; font-weight: 700; color: var(--text-2); }
.field .fh { font-size: 12px; color: var(--muted); }
.field .input, .field select { width: 100%; max-width: none; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; min-height: 32px; align-items: center; }
.btn.danger { border-color: var(--bad); color: var(--bad); background: transparent; }
.btn.danger:hover { background: rgba(220, 38, 38, .08); }

/* ---- a secret shown once (an agent key, a temporary password) ---- */
.card.secret-card { box-shadow: inset 3px 0 0 var(--accent), var(--shadow); }
.secret-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
code.secret { flex: 1 1 280px; min-width: 0; padding: 8px 10px; border: 1px dashed var(--border-strong); border-radius: 6px; background: var(--surface-2);
  font-size: 13px; overflow-wrap: anywhere; user-select: all; }

/* ---- tables inside cards ---- */
.table-wrap.flat { border: 0; box-shadow: none; border-radius: 0; margin: 0 -18px -16px; border-top: 1px solid var(--border); }
table.data tr.dim td { opacity: .6; }
table.data td .t { display: block; font-weight: 600; }
table.data td .s { display: block; color: var(--muted); font-size: 12px; }
table.data td.act { text-align: right; }
table.data td.detail { min-width: 220px; overflow-wrap: anywhere; color: var(--text-2); }

/* ---- the signed-out state ---- */
body.signed-out .nav, body.signed-out .ws-switch, body.signed-out .pill, body.signed-out .user-wrap { visibility: hidden; }
.card.signedout { max-width: 520px; margin: 48px auto; text-align: center; padding: 28px 24px; }
.card.signedout h1 { font-size: 20px; margin: 8px 0 8px; }
.card.signedout .form-row { justify-content: center; margin-top: 14px; }
.so-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); font-size: 20px; font-weight: 800; }

/* ===== the Tests page (2026-10-29, CONTRACT.md 6.8, the operator's ask of about 20:35 UTC) =====================
   The catalogue as a table (one row per suite of the chain, in chain order), the filter chips above it, and the
   detail panel with the description, how it runs, the switch (On / Off / Pause until a date, with a typed reason) and
   the runs with their sparkline. A filter chip that is on is filled with the TEXT colour, not purple: purple stays the
   accent of the active view and the primary button. */
.chipbar { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.fchip:hover { background: var(--surface-3); color: var(--text); }
.fchip .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.fchip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.fchip[aria-pressed="true"] .n { color: inherit; opacity: .72; }
.tests-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 10px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tests-meta .stale { color: var(--text); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 0 0 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--text-2); font-size: 13px; }
.notice.warn { border-color: var(--warn-border); background: var(--warn-bg); color: var(--text); }
.notice .n-ico { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 800; }
.notice.warn .n-ico { background: var(--warn); color: #ffffff; }
table.tests td.c-pos { width: 3.5em; color: var(--muted); font-variant-numeric: tabular-nums; }
table.tests td.c-name .t { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; }
table.tests td.c-name .nm { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
table.tests td.c-guard { max-width: 0; width: 40%; min-width: 200px; }
table.tests td.c-guard .g { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
table.tests td.c-res .chip, table.tests td.c-sw .chip { background: transparent; padding-left: 0; }
.tchip { font-size: 11px; line-height: 18px; padding: 0 7px; }
@media (max-width: 760px) {
  /* On a phone each suite is a card of three lines: name and switch, what it guards, last result and when. */
  table.tests thead { display: none; }
  table.tests, table.tests tbody { display: block; }
  table.tests tr.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name sw" "guard guard" "res when"; gap: 2px 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
  table.tests tr.row:last-child { border-bottom: 0; }
  table.tests td { display: block; padding: 0; border: 0; min-width: 0; }
  table.tests td.c-pos, table.tests td.c-runs, table.tests td.c-avg { display: none; }
  table.tests td.c-name { grid-area: name; } table.tests td.c-sw { grid-area: sw; text-align: right; }
  table.tests td.c-guard { grid-area: guard; max-width: none; min-width: 0; width: auto; }
  table.tests td.c-res { grid-area: res; } table.tests td.c-when { grid-area: when; text-align: right; }
  table.tests tr.sel td:first-child { box-shadow: none; }
  table.tests tr.sel { box-shadow: inset 3px 0 0 var(--accent); }
  table.tests tr.row td { background: transparent !important; }
  table.tests tr.row:hover, table.tests tr.sel { background: var(--row-hover); }
}
/* The switch: a segmented control of three, the state's dot inside each. */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: var(--radius); }
.seg button { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg button:disabled { cursor: not-allowed; opacity: .6; }
.switch-box { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.switch-box .now { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.switch-box .row2 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.switch-box .counter { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.switch-box input[type="date"] { height: 34px; }
.switch-box .form-err:empty { display: none; }
/* The runs: a sparkline of the last 30 durations, one bar per run, oldest at the left, its colour the run's status. */
.spark-wrap { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 16px; margin-bottom: 10px; }
.spark { display: block; width: 100%; max-width: 360px; height: 48px; }
.spark rect { fill: var(--dot, var(--idle)); }
.spark .base { stroke: var(--border-strong); stroke-width: 1; }
.spark-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.spark-legend span { display: inline-flex; align-items: center; gap: 5px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.stat { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); min-width: 0; }
.stat .n { display: block; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.wide { grid-column: span 2; }
.stat .l { display: block; font-size: 11.5px; color: var(--muted); }
table.runs td { font-size: 12.5px; }
table.runs td.verdict { min-width: 180px; overflow-wrap: anywhere; color: var(--text-2); }
.md code { font-size: 12px; padding: 0 4px; border-radius: 4px; background: var(--surface-3); }

/* ===== Reliability (2026-10-30, CONTRACT.md 6.9, the operator's ask of about 23:35 UTC) =======================
   Every check is a card, green or red, nothing in between: the status colour is the card's left edge and its chip's dot
   (fills, never the colour of text), and the words say why. An attention row that can be acknowledged gains a fourth
   column for its button. The Acknowledge dialog reuses the help box's modal. */
.rel-summary { margin-bottom: var(--s4); }
.rel-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px var(--s4); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); font-size: 13.5px; }
.rel-line.red { box-shadow: inset 3px 0 0 var(--bad), var(--shadow); }
.rel-line.green { box-shadow: inset 3px 0 0 var(--ok), var(--shadow); }
.rsec + .rsec { margin-top: var(--s5); }
.sec-label { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sec-note { margin: 0 0 var(--s3); color: var(--muted); font-size: 13px; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: var(--s4); align-items: start; }
.rcard { min-width: 0; padding: var(--s4) 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.rcard.red { box-shadow: inset 3px 0 0 var(--bad), var(--shadow); }
.rcard.green { box-shadow: inset 3px 0 0 var(--ok), var(--shadow); }
.rc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rc-head h3 { min-width: 0; font-size: 15px; line-height: 1.3; }
.rc-what { margin: 8px 0 0; color: var(--text-2); font-size: 13px; }
.rc-why { margin: 8px 0 0; color: var(--text); font-size: 13px; font-weight: 600; }
.rc-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 10px 0 0; font-size: 12.5px; }
.rc-facts dt { color: var(--muted); }
.rc-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.rc-facts .checked { font-family: var(--mono); font-size: 12px; }
.rc-items { margin-top: 12px; border-top: 1px solid var(--border); }
.rc-more { padding: 6px; }
.rcard .notice { margin: 12px 0 0; }
/* (2026-10-30, the fix round after the attack) Grey is "Not set up": a check this workspace does not have. It is never
   green, so an empty workspace never reads as all clear; the sidebar shows it as a grey dot instead of a count. */
.rcard.grey, .rel-line.grey { box-shadow: inset 3px 0 0 var(--idle), var(--shadow); }
.badge-dot { display: inline-block; flex: none; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--idle); }
/* A session the checker cannot see, or prompts the hook did not log: a red row. */
table.hooks tr.red-row td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
/* An acknowledged item's row, on its rule's card. */
.item.acked .t { color: var(--text-2); }
.notice.auto-reg { margin: 0 0 12px; }
/* A stage time the client claimed, or a stage that arrived late: muted, beside the server's time. */
.pipe .tm.claim { margin-top: 1px; font-size: 10.5px; line-height: 1.25; }
.when .claim, .tl .claim { color: var(--muted); }
.rcard .table-wrap.flat { margin: 12px -18px -16px; }
/* An attention row that can be acknowledged: lead, body, when and the button, four columns that never cross. */
.item.has-act { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "lead body when act"; }
.item > .act { grid-area: act; }
.item a.t { color: inherit; text-decoration: none; }
.item a.t:hover { text-decoration: underline; text-decoration-color: var(--border-strong); }
/* Narrow (a phone, or a rule card about 320 px wide), the row takes three lines: the kind and how long, the text on the
   whole width, then the button. Four columns in a card left the text no room at all and pushed the chip over the time
   (the first screenshot run, 2026-10-30); the chip, the time and the button on one line still did not fit (the
   second). */
@media (max-width: 560px) {
  .item.stack.has-act { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lead when" "body body" "act act"; row-gap: 4px; }
  .item.stack.has-act > .lead, .item.stack.has-act > .act { justify-self: start; }
}
.rc-items .item.has-act, .rc-items .item.acked { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lead when" "body body" "act act"; row-gap: 4px; }
.rc-items .item.has-act > .lead, .rc-items .item.has-act > .act, .rc-items .item.acked > .lead { justify-self: start; }
.ack-modal .modal-box { width: min(540px, 100%); }
.ack-modal .card-head h2 { margin: 0; font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--text); }
.ack-what { margin: 0 0 8px; font-weight: 600; overflow-wrap: anywhere; }
.ack-modal .counter { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ack-modal .form-err:empty { display: none; }
/* Evidence (6.9 D): the status form's field, red-edged when the page or the server refused it; a path to copy. */
.evidence-box { margin-top: 10px; }
.evidence-box .field .input { width: 100%; }
.evidence-box.invalid .input { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(220, 38, 38, .14); }
.copy-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
code.copyable { flex: 1 1 260px; min-width: 0; padding: 7px 10px; border: 1px dashed var(--border-strong); border-radius: 6px; background: var(--surface-2); overflow-wrap: anywhere; user-select: all; }
.evidence a { overflow-wrap: anywhere; }
/* Seen on production: one release.observed report per item. */
.obs-list { list-style: none; margin: 0; padding: 0; }
.obs-list li + li { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.obs-list .when { margin-bottom: 4px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---- the sidebar on narrower screens (2026-10-29, the sidebar redesign; this block replaced "the header on narrow
   screens: row 1 brand, workspace, right-hand controls; row 2 the views", which described the top bar) ----
   761 to 1100 px: an icon rail. Labels are visually hidden but still read aloud, every link keeps its tooltip, and a
   count becomes a small badge on the icon's corner. The menus open over the content beside the rail.
   760 px and below: the sidebar is a drawer (full labels) that slides in over a scrim from the slim bar at the top;
   a choice, Esc, the scrim or the close button shut it. */
@media (min-width: 761px) and (max-width: 1100px) {
  .shell { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .sidebar { padding: var(--s3) 10px; gap: 10px; }
  .sb-top { justify-content: center; padding: 0; }
  .brand-text, .ws-text, .user-text, .caret, .sb-row .clock, #theme-label, .nav-label { display: none; }
  .nav .nl, #stream-text, .live-last { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav { margin: 0 -6px; padding: 2px 6px; }
  .nav a { justify-content: center; height: 40px; padding: 0; }
  .nav a[aria-current="page"]::before { left: -6px; }
  .nav .ni { width: 20px; height: 20px; }
  .nav .badge { position: absolute; top: 2px; right: 2px; min-width: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; }
  .nav .badge-dot { position: absolute; top: 6px; right: 6px; margin: 0; }
  .nav-group { margin-top: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--border); }
  .ws-btn, .user-btn { justify-content: center; padding: 6px; min-height: 42px; }
  .sb-foot .pill { justify-content: center; padding: 0; }
  .sb-row { flex-direction: column; }
  .sb-row .icon-btn { width: 100%; }
  .menu { left: 0; }
  .banner { padding: 8px var(--s5); }
  .main { padding: var(--s5) var(--s5) 40px; }
  .foot { padding: 0 var(--s5) 24px; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 45; width: min(300px, 86vw); height: auto; box-shadow: var(--shadow-lg);
    transform: translateX(-104%); visibility: hidden; transition: transform var(--dur) var(--ease), visibility 0s linear var(--dur); }
  body.drawer-open .sidebar { transform: none; visibility: visible; transition: transform var(--dur) var(--ease); }
  .sb-top .sb-close { display: inline-flex; }
  .mobilebar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: var(--mb-h); padding: 0 var(--s3);
    background: var(--surface); border-bottom: 1px solid var(--border); }
  .mobilebar .icon-btn { height: 34px; min-width: 34px; }
  .mobilebar .icon-btn .ico { width: 18px; height: 18px; }
  .brand.mini .logo { width: 28px; height: 28px; font-size: 14px; }
  .mb-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
  .mb-live { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; }
  .banner { padding: 8px var(--s4); }
  .main { padding: 18px var(--s4) 40px; }
  .page-head h1 { font-size: 21px; }
  .foot { padding: 0 var(--s4) 24px; }
  .menu { max-width: calc(min(300px, 86vw) - 24px); min-width: 0; right: 0; }
}
@media (max-width: 480px) {
  .kpi .k-n { font-size: 24px; }
  .kpi { padding: 12px 14px; }
  .kpis { gap: 10px; }
}
/* Reduced motion: no slide, no fade, no shimmer; every change is immediate. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== charts (2026-10-31, CONTRACT.md 6.11 C): the kit of app.js section 6c, the dataviz skill's marks =====
   A chart is a card (a section of the panel when .flat): its caption and one-line subtitle, the "Table" toggle, the
   legend, the plot drawn at its own width (no fixed height, so the x labels never sit in a nested scroll), the
   tooltip, a foot line. Marks: 2 px lines with round joins, an area at a 10% wash, bars and columns in the series
   colour with 4 px rounded data ends (the path), 8 px dots with a 2 px ring in the surface colour, hairline solid
   gridlines one step off the surface. Text is always in the text tokens; a colour only ever fills or strokes a mark. */
.chart { position: relative; margin: 0; min-width: 0; }
.chart.card { padding: 14px 18px 12px; }
.chart.flat { margin-top: 20px; }
/* two charts side by side where the content area has room for both (the panel open narrows it, whatever the window) */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: var(--s4); margin-top: var(--s4); align-items: start; }
.chart-grid > .card + .card { margin-top: 0; }
.chart-grid > .wide { grid-column: 1 / -1; }
.ch-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
/* (2026-11-01) the title keeps a readable width: a chart's own switch (6.12) goes under it when the card is narrow */
.ch-titles { min-width: 0; flex: 1 1 240px; }
.ch-title { font-size: 14px; font-weight: 700; color: var(--text); }
.chart.flat .ch-title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ch-sub { margin-top: 2px; font-size: 12px; color: var(--muted); }
.ch-tbl { flex: none; }
.ch-legend { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-2); }
.ch-legend li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.ch-key { display: inline-block; flex: none; }
.ch-key.k-rect { width: 10px; height: 10px; border-radius: 3px; }
.ch-key.k-line { width: 14px; height: 2px; border-radius: 1px; }
.ch-key.s1 { background: var(--series-1); } .ch-key.s2 { background: var(--series-2); } .ch-key.s3 { background: var(--series-3); }
.ch-key.s4 { background: var(--series-4); } .ch-key.so { background: var(--series-other); }
.ch-sticon { display: block; flex: none; }
.ch-plot { min-width: 0; }
.ch-svg { display: block; max-width: 100%; }
.ch-svg text { font-family: inherit; font-size: 11px; fill: var(--muted); }
.ch-svg .ch-yt, .ch-svg .ch-xt { font-variant-numeric: tabular-nums; }
.ch-svg .ch-cat { font-size: 12px; fill: var(--text-2); }
.ch-svg .ch-dl { fill: var(--text-2); font-weight: 600; }
.ch-svg .ch-in { fill: var(--ink-on-fill); font-weight: 600; pointer-events: none; }     /* a name inside its own fill */
.ch-svg .ch-in.on-light { fill: var(--ink-on-light-fill); }
.ch-svg .ch-gl { stroke: var(--chart-grid); stroke-width: 1; }
.ch-svg .ch-base { stroke: var(--chart-axis); stroke-width: 1; }
.ch-svg:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ch-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-area { stroke: none; fill-opacity: .1; }
.ch-dot { stroke: var(--surface); stroke-width: 2; }
.ch-line.s1 { stroke: var(--series-1); } .ch-line.s2 { stroke: var(--series-2); } .ch-line.s3 { stroke: var(--series-3); } .ch-line.s4 { stroke: var(--series-4); } .ch-line.so { stroke: var(--series-other); }
.ch-area.s1, .ch-dot.s1, .ch-bar.s1 { fill: var(--series-1); }
.ch-area.s2, .ch-dot.s2, .ch-bar.s2 { fill: var(--series-2); }
.ch-area.s3, .ch-dot.s3, .ch-bar.s3 { fill: var(--series-3); }
.ch-area.s4, .ch-dot.s4, .ch-bar.s4 { fill: var(--series-4); }
.ch-area.so, .ch-dot.so, .ch-bar.so { fill: var(--series-other); }
/* the status palette (pass, fail, filed red, skipped): never a series colour, always beside its icon and word */
.st-good { fill: var(--st-good); } .st-critical { fill: var(--st-critical); } .st-serious { fill: var(--st-serious); } .st-warning { fill: var(--st-warning); }
.ch-ink { fill: none; stroke: var(--ink-on-fill); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ch-ink.on-light { stroke: var(--ink-on-light-fill); }
.ch-cross { stroke: var(--text-2); stroke-width: 1; pointer-events: none; }
.ch-hit { fill: transparent; pointer-events: all; }
.ch-band { fill: var(--row-hover); pointer-events: none; }
/* the heat strip: one blue ramp in seven steps (app.css :root, reversed in dark); q0 is no output at all */
.hc.q0 { fill: var(--chart-grid); } .hc.q1 { fill: var(--seq-1); } .hc.q2 { fill: var(--seq-2); } .hc.q3 { fill: var(--seq-3); }
.hc.q4 { fill: var(--seq-4); } .hc.q5 { fill: var(--seq-5); } .hc.q6 { fill: var(--seq-6); } .hc.q7 { fill: var(--seq-7); }
.hc-ring { fill: none; stroke: var(--text); stroke-width: 1.5; pointer-events: none; }
.ch-scale { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.hs-steps { display: inline-flex; gap: 2px; }
.hs { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.hs.q0 { background: var(--chart-grid); } .hs.q1 { background: var(--seq-1); } .hs.q2 { background: var(--seq-2); } .hs.q3 { background: var(--seq-3); }
.hs.q4 { background: var(--seq-4); } .hs.q5 { background: var(--seq-5); } .hs.q6 { background: var(--seq-6); } .hs.q7 { background: var(--seq-7); }
.hs-gap { width: 6px; }
/* the tooltip: the value leads, the name follows; beside the pointer, inside the card */
.ch-tip { position: absolute; z-index: 5; min-width: 120px; max-width: min(300px, calc(100% - 12px)); padding: 8px 10px; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 8px; box-shadow: var(--shadow-md); font-size: 12px; pointer-events: none; }
.tt-head { margin-bottom: 4px; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.tt-row { display: flex; align-items: center; gap: 6px; line-height: 1.55; }
.tt-v { color: var(--text); font-variant-numeric: tabular-nums; }
.tt-k { min-width: 0; color: var(--muted); overflow-wrap: anywhere; }
.ch-foot { margin-top: 6px; font-size: 12px; color: var(--muted); }
.ch-empty { margin: 6px 0 2px; }
.ch-tw { margin-top: 2px; box-shadow: none; }
table.ch-table td.rowh { font-weight: 600; white-space: nowrap; }
.ch-spark { display: block; }
.sp-line { fill: none; stroke: var(--series-other); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sp-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 1.5; }
.refetch { opacity: .55; transition: opacity var(--dur) var(--ease); }   /* a new range loading: the old frame stays */
/* where the charts sit on the other pages */
.ag-heat > .chart, .tests-runs > .chart, .rel-chart > .chart { margin-bottom: var(--s4); }
.ov-trends { margin-top: var(--s4); }

/* ===== Usage (2026-10-31, CONTRACT.md 6.11): tiles, the range, the charts, the sessions table and a session ===== */
/* the tiles fill the row by the room the content area has (four, two, or one under another) */
.kpis.u-tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.u-tiles .k-n { font-variant-numeric: normal; }      /* a stat tile's value in proportional figures (the skill) */
.u-tiles .k-n .k-of { font-size: 13px; font-weight: 600; }
.u-tiles .k-n .chip.est { align-self: center; }
.chip.est { padding: 0 7px; font-size: 11px; line-height: 18px; font-weight: 700; color: var(--text-2); background: var(--chip); }
table.u-agents th.plainth, table.u-agents td { padding-left: 8px; padding-right: 8px; }
.u-price { margin: 10px 0 0; }
.u-filters { margin-top: var(--s4); margin-bottom: 0; }
.u-range { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.u-sessions { margin-top: var(--s4); }
table.usage td.title { max-width: 0; width: 34%; min-width: 200px; }
table.usage td.sparkcell { width: 112px; padding-top: 4px; padding-bottom: 4px; }
/* a background agent's description is the point of the row: it wraps rather than being cut */
table.u-agents td.title { min-width: 190px; }
table.u-agents td.title .t { white-space: normal; overflow: visible; overflow-wrap: anywhere; font-weight: 600; }
table.data td.title .s.mono { font-family: var(--mono); font-size: 11.5px; }
.u-sid { margin: -6px 0 0; overflow-wrap: anywhere; }
/* (2026-11-01, CONTRACT.md 6.12) calibration: the real cost leads its tile, the list price beside it in smaller muted
   figures; one plain line per month under the range, the limits under them; the cost chart's "List price / Your cost"
   switch beside its Table toggle; the admins' "Plan and bill" card. */
.u-tiles .k-n .k-list { font-size: 13px; font-weight: 600; color: var(--muted); }
.u-calib { margin: var(--s4) 0 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.u-cline { margin: 0 0 6px; font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.u-cline[data-kind="provisional"], .u-cline[data-kind="no-bill"], .u-cline[data-kind="no-totals"] { color: var(--text-2); }
.u-caveat { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.ch-ctl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.seg.ch-seg button { height: 26px; padding: 0 10px; font-size: 12px; }
.u-bill { margin-top: var(--s4); }
.u-bill-form { margin-bottom: 12px; }
table.u-bills td.u-note { min-width: 160px; overflow-wrap: anywhere; }
/* (2026-11-01, the fix round) when the machine totals arrived; a month's Delete and its confirmation, a box under the
   table (outside its sideways scroller, so at 400 px the question and both buttons stay on screen), the month's row
   marked while it is open */
.u-machine { margin: -4px 0 12px; }
table.u-bills td.u-act { width: 1%; white-space: nowrap; text-align: right; }
table.u-bills tr.u-del-on td { background: var(--row-sel); }
/* a flat table sits flush with the card's bottom (a negative bottom margin); with the box after it, it keeps its edge */
.u-bill-tw.u-del-follows { margin-bottom: 0; border-bottom: 1px solid var(--border); }
.u-del { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.u-del-q { margin: 0; font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.u-del .form-row { margin-top: 0; }
.u-del .input { flex: 1 1 260px; min-width: 0; }

/* ===== Artifacts (2026-11-02, CONTRACT.md 6.13 H, R-0232): every page an agent made, from every project ============
   The gallery: the projects on the left (sticky; a row of chips above the grid on a phone), the toolbar, the cards in
   groups by project. A card is its preview at 16:10 (the thumb, or a poster drawn from its words: since the fix round
   after the attack the gallery never renders a page), the title on two lines at most, project and kind, "v3 · 2 h ago"
   and the pin star; the title's link covers the whole card, the star sits above it. The viewer gives the page the
   content area's whole width and height: the bar on top, the page, the details panel at the right (below the page on a
   phone). Grey chrome; purple only as a fill (the chosen scope's edge, a pinned star, the version on screen's edge, the
   primary button), never as the colour of text. */
.art-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: var(--s5); align-items: start; }
.art-main { min-width: 0; }
/* no artifact at all: the empty card alone (app.js renderGallery) */
.art-gallery.is-empty .art-layout { grid-template-columns: minmax(0, 1fr); }
.art-gallery.is-empty .art-col, .art-gallery.is-empty .art-tools { display: none; }
.art-tools { margin-bottom: var(--s4); }
.art-gnote { margin-bottom: var(--s4); }

/* -- the left column: All, Pinned, the projects (an initial, the name, the workspace and the newest update), Archived -- */
.art-col { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 2px; min-width: 0; max-height: calc(100vh - 40px); overflow-y: auto;
  margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.art-scope { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px;
  border-radius: 8px; color: var(--text-2); text-decoration: none; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.art-scope:hover { background: var(--sb-hover); color: var(--text); }
.art-scope[aria-current="page"] { background: var(--sb-active); color: var(--text); }
.art-scope[aria-current="page"]::before { content: ""; position: absolute; left: -4px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.art-scope > .ico { width: 18px; height: 18px; margin: 0 2px; color: var(--muted); }
.art-scope[aria-current="page"] > .ico, .art-scope:hover > .ico { color: var(--text-2); }
.ac-b { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ac-n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-s { display: flex; gap: 6px; min-width: 0; margin-top: 1px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.ac-s > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ac-s > * + *::before { content: "\00B7"; margin-right: 6px; }
.ac-c { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ac-pj { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border-strong);
  color: var(--text-2); font-size: 11px; font-weight: 800; }
.ac-pj.lg { width: 40px; height: 40px; border-radius: 10px; font-size: 17px; }
.ac-pj.ico-box .ico { width: 20px; height: 20px; }
.art-col-label { margin: 14px 10px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.art-col-sep { flex: none; height: 1px; margin: 10px 6px; background: var(--border); }

/* -- above the cards: the project, Pinned or Archived; how many match a search -- */
.art-shead { display: flex; align-items: center; gap: 12px; margin: 0 0 var(--s4); }
.art-shead .sh-b { min-width: 0; }
.art-shead h2 { font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.art-shead .sh-s { margin-top: 2px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.art-count { margin: -4px 0 12px; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }

/* -- the groups (All) and the grid -- */
.art-group + .art-group { margin-top: 30px; }
.art-ghead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.art-ghead h2 { min-width: 0; font-size: 15px; letter-spacing: -.005em; overflow-wrap: anywhere; }
.art-ghead h2 a { text-decoration: none; }
.art-ghead h2 a:hover { text-decoration: underline; text-decoration-color: var(--border-strong); }
.art-gm { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 244px), 1fr)); gap: 18px; }

/* -- a card -- */
.art-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.art-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.art-pv { position: relative; flex: none; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--border); }
/* (2026-11-02, the fix round after the attack, B1) The gallery never renders a page: a card shows the version's thumb
   (an image the server made at publish), faded in once it has loaded, or the POSTER below. The poster waits under the
   picture, hidden while the picture loads, and shows if it fails. (This replaced the live page drawn at four times the
   card's size and scaled to a quarter in a sandboxed iframe.) */
.art-pv > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: 0; transition: opacity 220ms var(--ease); }
.art-pv.thumb-ok > img { opacity: 1; }
.art-pv.has-thumb > .art-poster { visibility: hidden; }
/* The poster: the kind's colour (a token per kind, :root) fills the icon's tile, a thin band along the top and a wash
   in the corner; the words are in the text tokens, never in the kind's colour. The excerpt takes the lines the card
   has left and fades out where it ends, whatever the card's size. (A large faint icon in the corner was tried and
   taken out the same day: wherever it sat, an excerpt ran across it.) */
.art-poster { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 7px; padding: 15px 16px 0; overflow: hidden;
  background: radial-gradient(130% 90% at 0% 0%, color-mix(in srgb, var(--k) 13%, var(--surface)) 0%, var(--surface) 62%); box-shadow: inset 0 3px 0 var(--k); }
.art-poster[data-kind="page"] { --k: var(--k-page); } .art-poster[data-kind="report"] { --k: var(--k-report); }
.art-poster[data-kind="dashboard"] { --k: var(--k-dashboard); } .art-poster[data-kind="deck"] { --k: var(--k-deck); }
.art-poster[data-kind="diagram"] { --k: var(--k-diagram); } .art-poster[data-kind="explainer"] { --k: var(--k-explainer); }
.art-poster[data-kind="app"] { --k: var(--k-app); } .art-poster[data-kind="game"] { --k: var(--k-game); } .art-poster[data-kind="other"] { --k: var(--k-other); }
.ap-top { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; }
.ap-ico { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 7px; background: color-mix(in srgb, var(--k) 17%, transparent); color: var(--k); }
.ap-ico .ico { width: 15px; height: 15px; }
.ap-kicker { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.ap-title { position: relative; flex: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  font-size: 15.5px; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; }
.ap-ex { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; font-size: 11.5px; line-height: 1.5; color: var(--text-2); overflow-wrap: anywhere;
  -webkit-mask-image: linear-gradient(180deg, #000 52%, transparent 94%); mask-image: linear-gradient(180deg, #000 52%, transparent 94%); }
/* a wide card (one to a row, on a phone) has a taller poster: larger words, so it does not stand half empty */
.art-pv { container-type: inline-size; }
@container (min-width: 330px) {
  .art-poster { gap: 9px; padding: 18px 20px 0; }
  .ap-title { font-size: 18px; }
  .ap-ex { font-size: 13px; }
}
.art-body { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; padding: 11px 14px 10px; }
.art-title { margin: 0 0 1px; font-size: 14px; font-weight: 700; line-height: 1.35; letter-spacing: -.005em; }
.art-link { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
/* the title's link covers the whole card (one link per card, read once by a screen reader); the star sits above it */
.art-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.art-link:focus-visible { outline: none; }
.art-link:focus-visible::after { box-shadow: inset 0 0 0 2px var(--focus); border-radius: var(--radius-lg); }
.art-meta { display: flex; align-items: center; min-width: 0; font-size: 12.5px; color: var(--text-2); }
.art-meta > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-meta > .art-kd { flex: none; }
.art-meta > * + *::before { content: "\00B7"; margin: 0 6px; color: var(--muted); }
.art-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; margin-top: auto; padding-top: 3px; font-size: 12px; color: var(--muted); }
.art-ver { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.art-star { position: relative; z-index: 2; display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; margin: -4px -7px -4px 0; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
button.art-star:hover { background: var(--surface-3); color: var(--text); }
span.art-star { cursor: default; }
.art-star .ico { width: 17px; height: 17px; }
.art-star[aria-pressed="true"] .ico svg, .art-act.art-pin[aria-pressed="true"] .ico svg { fill: var(--accent); stroke: var(--accent); }
/* the skeleton while the list is read */
.art-skel .art-card { box-shadow: none; }
.art-skel .art-body { gap: 10px; padding-bottom: 16px; }

/* -- no artifact yet: what to run -- */
.card.art-empty { max-width: 660px; margin: 12px auto; padding: 34px 30px 28px; text-align: center; }
.art-e-ico { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 14px; border-radius: 16px; background: var(--surface-3); color: var(--text-2); }
.art-e-ico .ico { width: 28px; height: 28px; }
.art-empty h2 { margin-bottom: 8px; font-size: 19px; }
.art-empty p { color: var(--text-2); }
.art-empty .art-e-run { margin: 16px 0 6px; font-weight: 600; color: var(--text); }
.art-empty p code { white-space: nowrap; }
code.art-cmd { display: block; margin: 0 auto 12px; padding: 12px 14px; text-align: left; border: 1px dashed var(--border-strong); border-radius: 8px; background: var(--surface-2);
  font-size: 13px; overflow-wrap: anywhere; user-select: all; }
.art-center { justify-content: center; margin-bottom: 8px; }

/* -- the viewer: the page has the content area to itself (body.art-viewer, app.js markNav) -- */
body.art-viewer:not(.signed-out) .content { height: 100vh; min-height: 0; }
body.art-viewer:not(.signed-out) .main { flex: 1 1 auto; min-height: 0; max-width: none; padding: 0; display: flex; flex-direction: column; }
body.art-viewer:not(.signed-out) .foot { display: none; }
.art-viewer { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.art-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px var(--s4); background: var(--surface); border-bottom: 1px solid var(--border); }
.art-back { flex: none; width: 32px; height: 32px; padding: 0; }
.art-bar-t { flex: 1 1 260px; min-width: 0; }
.art-h1 { font-size: 16px; line-height: 1.3; letter-spacing: -.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-sub { display: flex; align-items: center; flex-wrap: wrap; min-width: 0; margin-top: 1px; font-size: 12px; color: var(--muted); }
.art-sub > * { min-width: 0; overflow-wrap: anywhere; }
.art-sub > * + *::before { content: "\00B7"; margin: 0 6px; }
.art-sub .mono { font-size: 11.5px; }
.art-sub a { color: var(--text-2); text-decoration: none; }
.art-sub a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); }
.art-acts { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; min-width: 0; }
select.art-vsel { height: 28px; max-width: 240px; font-size: 12px; font-variant-numeric: tabular-nums; }
.art-act.art-del:hover { border-color: var(--bad); color: var(--bad); background: rgba(220, 38, 38, .06); }
/* the bar's buttons keep their words where there is room for them; below that, the icon, its tooltip and its name */
@media (max-width: 1599px) {
  .art-act .bl { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .btn.art-act { width: 30px; padding: 0; }
}
.art-confirm { display: flex; flex-direction: column; gap: 8px; padding: 12px var(--s4); background: var(--warn-bg); border-bottom: 1px solid var(--warn-border); }
.art-confirm-q { margin: 0; font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.art-confirm .form-row { margin-top: 0; }
.art-confirm .form-err:empty { display: none; }
.art-vnote:empty { display: none; }
.art-vnote .notice { margin: 0; border-width: 0 0 1px; border-radius: 0; padding-left: var(--s4); padding-right: var(--s4); align-items: center; }
.art-vnote .notice > span:nth-child(2) { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.art-vstate { padding: var(--s5); }
.art-split { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 344px; }
.art-split.no-side { grid-template-columns: minmax(0, 1fr); }
.art-split.no-side > .art-side { display: none; }
.art-frame { position: relative; min-width: 0; min-height: 0; background: var(--surface); }
.art-frame > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--surface); }
/* Full screen (2026-11-02, the fix round, B2): the frame's box fills the window over everything on this page (the
   frame itself is never moved, which would reload the page); the way back sits on it, top right, quiet until pointed at. */
.art-viewer.is-full .art-frame { position: fixed; inset: 0; z-index: 50; height: auto; min-height: 0; }
body.art-full { overflow: hidden; }
.art-full-exit { position: absolute; top: 12px; right: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 10px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-md);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; opacity: .86; transition: opacity var(--dur) var(--ease); }
.art-full-exit:hover, .art-full-exit:focus-visible { opacity: 1; }
.art-full-exit .ico { width: 15px; height: 15px; }
.art-full-exit kbd { font-size: 10.5px; }
@media (hover: none), (max-width: 640px) { .art-full-exit kbd { display: none; } }   /* a phone has no Esc to press */
.art-side { min-width: 0; min-height: 0; overflow-y: auto; background: var(--surface); border-left: 1px solid var(--border); scrollbar-width: thin; }
.art-sec { padding: 16px 18px; }
.art-sec + .art-sec { border-top: 1px solid var(--border); }
.art-sec h3 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.art-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; margin-bottom: 6px; }
.art-sec-h h3 { margin: 0; }
.art-sec-h .btn .ico { width: 14px; height: 14px; }
.art-title-full { margin: 0 0 6px; font-size: 14px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
/* (2026-11-02, the fix round, B4) what the sandbox does and does not stop, once, beside a shield */
.art-sec.art-seal { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); }
.art-seal > .ico { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--muted); }
.art-seal p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.art-desc { margin: 0 0 10px; font-size: 13px; color: var(--text-2); }
.art-tags { gap: 4px 6px; }
.art-side dl.kv { grid-template-columns: 80px minmax(0, 1fr); gap: 7px 10px; font-size: 12.5px; }
.art-side dl.kv dd { font-variant-numeric: tabular-nums; }
.art-side .kv-by { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
/* a path breaks at the <wbr> after each slash (app.js artPathText); a name longer than the line, anywhere */
code.art-folder { font-size: 11.5px; overflow-wrap: anywhere; }
.art-vlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.art-vitem { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 9px; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 12.5px; transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.art-vitem:hover { background: var(--row-hover); border-color: var(--border-strong); }
.art-vitem.on { background: var(--row-sel); border-color: var(--border-strong); box-shadow: inset 3px 0 0 var(--accent); }
.vi-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vi-h strong { font-size: 13px; }
.vi-sz { margin-left: auto; color: var(--muted); font-size: 11.5px; }
.vi-t, .vi-by, .vi-w { color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.vi-note { margin-top: 2px; color: var(--text-2); overflow-wrap: anywhere; }
.art-edit { max-width: none; gap: 10px; }
.art-edit textarea { min-height: 96px; }

/* -- narrower screens: the rail (761 to 1100 px), then a phone -- */
@media (max-width: 1100px) {
  .art-layout { grid-template-columns: 206px minmax(0, 1fr); gap: var(--s4); }
  .art-split { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 760px) {
  /* the projects become a row of chips above the grid, sliding sideways, the chosen one filled with the text colour as
     the Tests page's filter chips are */
  .art-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .art-col { position: static; flex-direction: row; gap: 6px; max-height: none; overflow-x: auto; overflow-y: hidden; margin: 0 calc(-1 * var(--s4)); padding: 2px var(--s4) 6px;
    scrollbar-width: none; }
  .art-col::-webkit-scrollbar { display: none; }
  .art-col-label, .art-col-sep, .art-scope .ac-s, .art-scope .ac-pj { display: none; }
  .art-scope { flex: none; grid-template-columns: auto auto auto; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 999px;
    background: var(--surface); }
  .art-scope.art-p { grid-template-columns: auto auto; }
  .art-scope > .ico { width: 15px; height: 15px; margin: 0; }
  .art-scope .ac-n { font-size: 12.5px; }
  .art-scope[aria-current="page"] { background: var(--text); border-color: var(--text); color: var(--bg); }
  .art-scope[aria-current="page"]::before { display: none; }
  .art-scope[aria-current="page"] > .ico, .art-scope[aria-current="page"] .ac-c { color: inherit; opacity: .75; }
  .art-grid { gap: var(--s4); }
  /* the search on a line of its own, the kind and the order sharing the next */
  .art-tools .input.grow { flex: 1 1 100%; }
  .art-tools select { flex: 1 1 0; min-width: 0; max-width: none; }
  /* the viewer: the page first, at most of the screen's height, the details below it; in the bar the version picker
     has a line of its own and the seven buttons share the next (they broke two to a third line on the first shots) */
  body.art-viewer:not(.signed-out) .content { height: auto; }
  .art-bar { padding: 8px var(--s3); }
  .art-acts { justify-content: flex-start; flex: 1 1 100%; }
  select.art-vsel { max-width: none; flex: 1 1 100%; }
  .art-split { display: block; }
  .art-frame { height: calc(100svh - var(--mb-h) - 132px); min-height: 360px; }
  .art-side { border-left: 0; border-top: 1px solid var(--border); overflow: visible; }
  .art-vstate { padding: var(--s4); }
}
@media (prefers-reduced-motion: reduce) {
  .art-card:hover { transform: none; }
}

/* ===== Images (2026-11-12, CONTRACT.md 6.18 D): every request sent to the OpenAI image generator =====
   The gallery wears the Artifacts gallery's classes (the left column, the grid, the cards); what is its own: a photo's
   preview is cropped from its centre (a page's is from its top), the card's title is the prompt in smaller words, a
   failed or lost request has its poster, and the counts sit above the cards. The viewer: the bar, then the picture at
   the content's width beside the details (below them on a phone). Grey chrome; purple only as a fill. */
.img-pv { aspect-ratio: 4 / 3; }
/* a transparent picture on a checkerboard; the poster hidden under any picture (it showed through a transparent one's
   clear parts on the first shots) */
.img-pv > img { object-position: center;
  background-color: var(--surface-2);
  background-image: linear-gradient(45deg, var(--surface-3) 25%, transparent 25%), linear-gradient(-45deg, var(--surface-3) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--surface-3) 75%), linear-gradient(-45deg, transparent 75%, var(--surface-3) 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.img-pv.has-thumb > .img-poster { visibility: hidden; }
.img-ptitle { font-size: 13px; font-weight: 600; line-height: 1.4; }
.img-ptitle .art-link { -webkit-line-clamp: 3; line-clamp: 3; }
.img-tok { flex: none; font-variant-numeric: tabular-nums; }
.img-poster { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; overflow: hidden;
  --k: var(--k-other); background: radial-gradient(130% 90% at 0% 0%, color-mix(in srgb, var(--k) 13%, var(--surface)) 0%, var(--surface) 62%); box-shadow: inset 0 3px 0 var(--k); }
.img-poster[data-kind="failure"] { --k: var(--bad); }
.img-poster[data-kind="lost"] { --k: var(--warn); }
.img-poster .ap-ico { background: color-mix(in srgb, var(--k) 17%, transparent); color: var(--k); }
.img-pk { font-size: 12px; font-weight: 700; color: var(--text-2); }
.img-pe { flex: 1 1 auto; min-height: 0; overflow: hidden; font-family: var(--mono); font-size: 11px; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 95%); mask-image: linear-gradient(180deg, #000 55%, transparent 95%); }
.img-poster.big { position: relative; inset: auto; min-height: 260px; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.img-flag { position: absolute; z-index: 2; left: 10px; bottom: 10px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; }
.img-flag.failure { background: var(--bad); }
.img-flag.lost { background: var(--warn); }
.img-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 var(--s4); }
.img-kpi { display: flex; flex-direction: column; gap: 1px; min-width: 104px; padding: 9px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.ik-v { font-family: var(--display); font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.ik-l { font-size: 12px; color: var(--muted); }
.img-more { display: flex; justify-content: center; margin: var(--s5) 0; }
.img-more:empty { display: none; }

/* -- the viewer -- */
.img-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 var(--s4); }
.img-bt { flex: 1 1 260px; min-width: 0; }
.img-bt h1 { font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
.img-bt .sub { margin-top: 2px; }
.img-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.img-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: var(--s5); align-items: start; }
.img-stage { position: sticky; top: 16px; display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.img-stage > img { display: block; max-width: 100%; max-height: calc(100vh - 150px); margin: 0 auto; border-radius: var(--radius); background: var(--surface-2);
  box-shadow: var(--shadow-md); cursor: zoom-in; object-fit: contain;
  /* a transparent picture on a checkerboard, so its transparent parts read as transparent */
  background-image: linear-gradient(45deg, var(--surface-3) 25%, transparent 25%), linear-gradient(-45deg, var(--surface-3) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--surface-3) 75%), linear-gradient(-45deg, transparent 75%, var(--surface-3) 75%);
  background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; }
.img-stage.whole { position: static; overflow: auto; }
.img-stage.whole > img { max-width: none; max-height: none; cursor: zoom-out; }
.img-side { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.img-sec { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); min-width: 0; }
.img-sec > h3 { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.img-prompt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.55; color: var(--text); max-height: 420px; overflow-y: auto; }
.img-note { margin-top: 8px; font-size: 12px; color: var(--muted); }
.img-dl { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.img-kv { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.img-kv dt { font-size: 12px; color: var(--muted); }
.img-kv dd { margin: 0; font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.img-kv dd[title] { cursor: help; text-decoration: underline dotted var(--border-strong); text-underline-offset: 3px; }
.img-path { font-size: 11.5px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.img-err { margin: 6px 0; padding: 8px 10px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border);
  border-left: 3px solid var(--bad); border-radius: 6px; max-height: 240px; overflow: auto; }
.img-ins, .img-sibs { display: flex; flex-wrap: wrap; gap: 8px; }
.img-in { display: flex; flex-direction: column; gap: 4px; width: 112px; }
.img-in img, .img-sib img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.img-inn { font-size: 11px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-sib { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); overflow: hidden; }
.img-sib img { height: 100%; border: 0; border-radius: 0; }
.img-sib.failure { border-color: var(--bad); color: var(--bad); }
.img-sib.lost { border-color: var(--warn); color: var(--warn); }
.img-fold { border-top: 1px solid var(--border); padding: 6px 0; }
.img-fold:first-of-type { border-top: 0; }
.img-fold > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text); padding: 4px 0; overflow-wrap: anywhere; }
.img-pre { margin: 6px 0 4px; padding: 10px; max-height: 460px; overflow: auto; font-family: var(--mono); font-size: 11.5px; line-height: 1.5; white-space: pre;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; }
@media (max-width: 1100px) {
  .img-split { grid-template-columns: minmax(0, 1fr); }
  .img-stage { position: static; }
  .img-stage > img { max-height: 70vh; }
}
@media (max-width: 760px) {
  .img-kv { grid-template-columns: 108px minmax(0, 1fr); }
  .img-kpi { min-width: 0; flex: 1 1 40%; }
}

/* ===== the sign-in and enrollment pages (login.html, enroll.html) ===== */
body.auth { min-height: 100vh; display: flex; flex-direction: column; }
.auth-main { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-md);
  padding: 28px 26px 24px; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-brand .logo { width: 34px; height: 34px; border-radius: 9px; font-size: 18px; }
.auth-brand .bn { font-weight: 800; font-size: 16px; line-height: 1.2; }
.auth-brand .bs { color: var(--muted); font-size: 12.5px; }
.auth-card h1 { font-size: 20px; margin-bottom: 4px; }
.auth-card .lead { color: var(--text-2); font-size: 13px; margin-bottom: 16px; }
.auth-card .form-grid { max-width: none; }
.auth-card .btn.primary { width: 100%; height: 38px; font-size: 14px; }
.auth-note { margin-top: 14px; color: var(--muted); font-size: 12.5px; }
.auth-msg { padding: 8px 10px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.auth-msg.bad { border-color: rgba(220, 38, 38, .45); background: rgba(220, 38, 38, .08); }
.auth-msg.ok { border-color: rgba(22, 163, 74, .45); background: rgba(22, 163, 74, .08); }
.auth-foot { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 0 16px 20px; color: var(--muted); font-size: 12px; }
.auth-top { display: flex; justify-content: flex-end; padding: 12px 16px 0; }
.pw-meter { display: block; height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.pw-meter > span { display: block; height: 100%; width: 0; background: var(--text-2); transition: width .2s; }
.pw-meter[data-ok="1"] > span { background: var(--ok); }

/* ---- Flex DevCenter 3.0, the Mist look (2026-11-04, R-0256: the operator chose "Mist" on the proposal page A-0125).
   The tokens at the top carry the palette; these rules refine the shapes the sections above draw: wide Archivo titles
   and brand, the mark (an ink square with a purple dot), the active view as a white pill on the paper, rounder controls
   and roomier rows. Every colour still comes from a token. ---- */
.page-head h1, .brand-name, .modal-box h2 { font-family: var(--display); }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 28px; line-height: 1.15; font-weight: 640; font-variation-settings: 'wdth' 118; letter-spacing: -.012em; }
.brand-name { font-size: 16px; font-weight: 500; letter-spacing: -.005em; }
.brand-flex { font-weight: 800; font-variation-settings: 'wdth' 125; }
.logo { position: relative; background: var(--text); color: var(--bg); font-family: var(--display); font-variation-settings: 'wdth' 125; border-radius: 9px; }
.logo::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.nav a { height: 38px; border-radius: 11px; }
.nav a[aria-current="page"] { box-shadow: var(--shadow); font-weight: 600; }
.nav-label { letter-spacing: .09em; }
.card { padding: 18px 20px; }
.card-head h2 { letter-spacing: .08em; }
.btn, .input, select { height: 36px; border-radius: 10px; }
.btn.sm { height: 30px; border-radius: 9px; }
textarea { border-radius: 10px; }
table.data td { padding: 10px 14px; }
table.data th .sort, table.data th.plainth { padding: 11px 14px; }
code, .mono { font-size: 12px; }

/* The Activity page, rebuilt (R-0256): a live pill, an hourly strip of the last 24 hours, filter chips for the kind and
   for who wrote it, lines grouped by day and hour under sticky headings, runs folded into one line, new lines sliding
   in, and a purple rule above what came since your last look. */
.act-live { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.act-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.act-live[data-state="live"] .dot { animation: act-pulse 1.8s ease-in-out infinite; }
.act-live[data-state="paused"] .dot { background: var(--warn); }
@keyframes act-pulse { 50% { opacity: .3; } }
.act-post { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.act-post .grow { flex: 1 1 280px; min-width: 0; }
.card.act-strip { padding: 14px 18px 12px; }
.act-strip-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
.act-bars { display: flex; align-items: flex-end; gap: 3px; height: 64px; }
.act-bars button { flex: 1 1 0; min-width: 0; min-height: 3px; padding: 0; border: 0; border-radius: 4px 4px 1px 1px; background: var(--accent); opacity: .42;
  cursor: pointer; transition: opacity var(--dur) var(--ease); }
.act-bars button:hover, .act-bars button[aria-pressed="true"] { opacity: 1; }
.act-bars button.zero { background: var(--surface-3); opacity: 1; }
.act-x { display: flex; gap: 3px; margin-top: 6px; font: 500 10.5px/1 var(--mono); color: var(--muted); }
.act-x span { flex: 1 1 0; min-width: 0; white-space: nowrap; }
.act-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 18px 0 10px; }
.act-filters > .grow { flex: 1 1 240px; min-width: 0; }
.act-people { margin-bottom: 16px; }
.av { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3);
  border: 1px solid var(--border); color: var(--text-2); font: 700 9.5px/1 var(--mono); }
.av.you { background: var(--text); border-color: var(--text); color: var(--bg); }
.fchip .av { width: 18px; height: 18px; font-size: 8.5px; margin-left: -5px; }
.act-stream { display: grid; gap: 18px; }
.act-day { margin: 6px 0 -8px; font: 640 16px/1.2 var(--display); font-variation-settings: 'wdth' 114; color: var(--text); }
.act-hour h4 { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 7px 0; background: var(--bg);
  font: 600 11.5px/1 var(--mono); color: var(--muted); }
.act-hour h4::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.act-rows { display: grid; gap: 6px; }
.act-row { display: grid; grid-template-columns: 50px 24px minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 11px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color var(--dur) var(--ease); }
.act-row:hover { border-color: var(--border-strong); }
.act-row .tm { font: 500 12px/1.8 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.act-row .av { margin-top: 2px; }
.act-row .body { display: grid; gap: 5px; min-width: 0; }
.act-line1 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12px; }
.act-line1 .who { color: var(--muted); }
.act-txt { font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.act-txt mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.act-more { justify-self: start; padding: 2px 0; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 12px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.act-more:hover { color: var(--text); }
.act-fold { display: grid; gap: 6px; padding-left: 12px; border-left: 2px solid var(--border); }
.act-fold .sub { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 10px; }
.act-fold .sub .tm { font: 500 12px/1.6 var(--mono); color: var(--muted); }
.act-row details summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.act-row details pre { margin: 6px 0 0; padding: 10px; border-radius: 8px; background: var(--surface-2); font: 12px/1.45 var(--mono); overflow-x: auto; }
/* (2026-11-20, R-0196, CONTRACT.md 6.44 D) the prompts sessions sent themselves: the quiet line above "Your asks", the mark on a
   line (it wraps at a phone's width, where the chip's own nowrap would push it past the row) and the line's words a step quieter */
.act-sent-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: -2px 0 12px; font-size: 12px; color: var(--muted); }
.act-sent-note .act-more { padding: 0; }
.act-line1 .act-sent { white-space: normal; line-height: 18px; padding-top: 1px; padding-bottom: 1px; }
.act-row.sent .act-txt { color: var(--text-2); }
/* (2026-11-20, R-0196 fix round, CONTRACT.md 6.44 D 2, X13) the Overview's "Live activity" marks the same lines, wrapping at 400 px.
   (2026-11-21, R-0196 release edit E2, CONTRACT.md 6.44 R; check:page N3) The mark is its own item of the row's grid, in the
   words' column (3) on the row's first line, the words on the line below it in the same column: inside .meta it widened that
   `auto` column and left the words 28 to 65 px of a 529 px row. One column at 760 px and below: the mark and the words follow
   the time and the meta, as before. */
.ev > .act-sent { grid-column: 3; justify-self: start; white-space: normal; line-height: 18px; padding-top: 1px; padding-bottom: 1px; }
.ev.sent > .txt { grid-column: 3; }
@media (max-width: 760px) {
  .ev > .act-sent, .ev.sent > .txt { grid-column: auto; }
}
.ev.sent .txt { color: var(--text-2); }
.act-newmark { display: flex; align-items: center; gap: 10px; margin: 4px 0; font-size: 12px; font-weight: 600; color: var(--text-2); }
.act-newmark::before, .act-newmark::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: var(--accent); }
.act-row.arrive { animation: act-arrive 1.2s var(--ease); }
/* (2026-11-04, R-0256 phase 2, CONTRACT 6.15) the Releases page's earlier releases, read from the project's history:
   one closed card per period (its number, dates, title and count), opening onto its story and its versions */
.hist { margin-top: 28px; display: grid; gap: 10px; }
.hist-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 2px; }
.hist-head h2 { font: 640 21px/1.2 var(--display); font-variation-settings: 'wdth' 114; }
.card.hist-group { padding: 0; }
.card.hist-group + .card.hist-group { margin-top: 0; }
.hist-group > summary { display: grid; grid-template-columns: 74px 120px minmax(0, 1fr) auto; gap: 4px 14px; align-items: baseline; padding: 14px 18px;
  cursor: pointer; list-style: none; border-radius: var(--radius-lg); }
.hist-group > summary::-webkit-details-marker { display: none; }
.hist-group > summary:hover { background: var(--row-hover); }
.hist-group[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.hg-n { font: 600 11.5px/1.4 var(--mono); color: var(--muted); white-space: nowrap; }
.hg-dates { font: 500 12.5px/1.4 var(--mono); color: var(--text-2); white-space: nowrap; }
.hg-title { font-weight: 600; min-width: 0; }
.hg-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.hg-story { padding: 14px 18px 2px; max-width: 86ch; color: var(--text-2); }
.hist-list { list-style: none; margin: 0; padding: 4px 0 6px; }
.hist-row { display: grid; grid-template-columns: 86px 128px auto minmax(0, 1fr) auto; gap: 6px 12px; align-items: baseline; padding: 9px 18px;
  border-top: 1px solid var(--border); font-size: 13px; }
.hist-row:first-child { border-top: 0; }
.hist-row .hr-t { min-width: 0; overflow-wrap: anywhere; }
.hist-row .rn { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .hist-group > summary { grid-template-columns: auto minmax(0, 1fr) auto; }
  .hg-title { grid-column: 1 / -1; }
  .hist-row { grid-template-columns: auto minmax(0, 1fr); }
  .hist-row .hr-t { grid-column: 1 / -1; }
  .hist-row .chip, .hist-row .hr-sha { display: none; }
}
/* (2026-11-04, R-0256) a session's VS Code tab title above its name in the Agents table */
.ag-title { font-weight: 600; color: var(--text); max-width: 28em; overflow: hidden; text-overflow: ellipsis; }
@keyframes act-arrive { 0% { transform: translateY(-8px); opacity: 0; background: var(--accent-soft); } 35% { opacity: 1; background: var(--accent-soft); } 100% { transform: none; } }
@media (max-width: 760px) {
  .act-row { grid-template-columns: 44px minmax(0, 1fr); padding: 10px 12px; }
  .act-row > .av { display: none; }
  .act-fold .sub { grid-template-columns: 44px minmax(0, 1fr); }
  .act-x span { font-size: 9.5px; }
  .act-hour h4 { top: var(--mb-h); }      /* below the phone's sticky slim bar */
}
@media (prefers-reduced-motion: reduce) { .act-row.arrive, .act-live .dot { animation: none; } }

/* ===== The Git page (2026-11-06, R-0256 phase 2, CONTRACT 6.16) =====
   The commits on a rail: the main line's dots on one line, the commits a merge brought in one step to the right; a
   release's bump is a green dot, a merge a filled purple one (purple only as a fill, never an ink). Branches and tags are
   tables, the worktrees cards. */
.git-tabs { margin-bottom: 12px; }
.git-tabs button .num { font-size: 12px; font-weight: 500; }
.git-stale { margin-left: 8px; background: var(--warn-bg); box-shadow: inset 0 0 0 1px var(--warn-border); color: var(--text); }
.git-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0 0 8px; }
.git-legend .gl { display: inline-flex; align-items: center; gap: 5px; }      /* a key never wraps away from its words */
.gd-key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); }
.gd-key.rel { border-color: var(--ok); background: var(--ok); }
.gd-key.merge { border-color: var(--accent); background: var(--accent); }
.gd-key.side { border-style: dashed; }
.git-commits { list-style: none; margin: 0; padding: 0; }
.git-day { margin: 14px 0 6px; font: 640 15px/1.2 var(--display); font-variation-settings: 'wdth' 114; color: var(--text); }
.git-day:first-child { margin-top: 2px; }
.git-row { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 0 10px; padding: 9px 14px 9px 6px; border-radius: var(--radius);
  cursor: pointer; outline: none; }
.git-row:hover { background: var(--row-hover); }
.git-row.sel { background: var(--row-sel); }
.git-row:focus-visible { box-shadow: 0 0 0 2px var(--focus); }
.git-rail { position: relative; align-self: stretch; }
.git-rail::before { content: ''; position: absolute; left: 12px; top: -9px; bottom: -9px; width: 2px; background: var(--border); }
.git-row.side .git-rail::before { left: 12px; }
.git-row.side .git-rail::after { content: ''; position: absolute; left: 22px; top: -9px; bottom: -9px; width: 2px; background: var(--border-strong); opacity: .7; }
.gd { position: absolute; z-index: 1; left: 7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); }
.git-row.side .gd { left: 17px; border-style: dashed; }
.git-row.merge .gd { border-color: var(--accent); background: var(--accent); }
.git-row.rel .gd { border-color: var(--ok); background: var(--ok); }
.git-main { display: grid; gap: 3px; min-width: 0; }
.git-t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; min-width: 0; }
/* (2026-11-06, the fix round, finding 5) a chip holding a long tag or branch name is cut with an ellipsis inside its row or
   card; as an inline-flex box its own overflow and text-overflow did nothing, and it ran across the next card */
.git-t > .chip, .git-wt-b .chip, .git-wt-h .chip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.git-s { min-width: 0; overflow-wrap: anywhere; font-size: 13.5px; color: var(--text); }
.git-m { overflow-wrap: anywhere; }
.chip.git-v { background: rgba(22, 163, 74, .14); color: var(--text); font-family: var(--mono); text-decoration: none; }
.chip.git-v:hover { background: rgba(22, 163, 74, .24); }
.git-table td { vertical-align: top; }
.git-bn { overflow-wrap: anywhere; }
.git-bn .chip { margin-left: 6px; }
.git-ab .ahead { color: var(--text); font-weight: 600; }
.git-ab .behind { color: var(--muted); }
.git-ts { color: var(--text-2); min-width: 18ch; }
.git-note { margin: 0 0 12px; }
.git-wts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; margin-bottom: 12px; }
.git-wt { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 8px; padding: 14px 16px; min-width: 0; }
.git-wt.missing { opacity: .7; }
.git-wt-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.git-wt-h strong { overflow-wrap: anywhere; }
.git-wt-p { overflow-wrap: anywhere; }
.git-wt dl.kv { grid-template-columns: 110px minmax(0, 1fr); }
.git-clean { color: var(--muted); }
.git-dirty { font-weight: 600; color: var(--text); }
.git-full { font-size: 12px; }
.git-files { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.git-files li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 4px 8px; border-radius: 6px; font-size: 12.5px; }
.git-files li:nth-child(odd) { background: var(--surface-2); }
.git-fp { overflow-wrap: anywhere; }
.git-fd { white-space: nowrap; font-variant-numeric: tabular-nums; }
.git-fd .plus { color: color-mix(in srgb, var(--ok) 70%, var(--text)); }      /* mixed toward the text colour: readable in both themes */
.git-fd .minus { color: color-mix(in srgb, var(--bad) 70%, var(--text)); }
@media (max-width: 760px) {
  .git-row { grid-template-columns: 30px minmax(0, 1fr); padding-right: 8px; }
  .git-ts { display: none; }
}

/* ===== The Files page (2026-11-11, R-0256 phase 2, CONTRACT 6.17) =====
   The tree on the left, the folder in focus or the file on the right; the code's colours are the chart series mixed
   toward the text colour, so they read in both themes, and never purple as an ink. */
.files-grid { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.files-tree { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px); max-height: calc(100vh - 120px); overflow: auto; padding: 8px 6px; }
.files-list { display: grid; gap: 1px; }
.files-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: baseline; width: 100%; padding: 4px 8px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.files-row:hover { background: var(--row-hover); }
.files-row.on { background: var(--row-sel); font-weight: 600; }
.files-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.files-row .fr-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files-row .fr-m { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.files-row .fr-caret { display: inline-block; width: 1.1em; color: var(--muted); }
.files-row.file .fr-n { padding-left: 1.1em; }
.files-row[data-depth="1"] { padding-left: 22px; } .files-row[data-depth="2"] { padding-left: 36px; } .files-row[data-depth="3"] { padding-left: 50px; }
.files-row[data-depth="4"] { padding-left: 64px; } .files-row[data-depth="5"] { padding-left: 78px; } .files-row[data-depth="6"] { padding-left: 92px; }
.files-row[data-depth="7"] { padding-left: 106px; } .files-row[data-depth="8"] { padding-left: 120px; } .files-row[data-depth="9"] { padding-left: 134px; }
.files-row[data-depth="10"] { padding-left: 148px; } .files-row[data-depth="11"] { padding-left: 162px; } .files-row[data-depth="12"] { padding-left: 176px; }
.files-none { padding: 6px 8px; }
.files-main { display: grid; gap: 12px; min-width: 0; }
.files-crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; font-size: 13.5px; overflow-wrap: anywhere; }
.files-crumbs .sep { color: var(--muted); }
.files-card { padding: 14px 16px; min-width: 0; }
.files-card h2 { margin: 0 0 6px; font-size: 15px; }
.files-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; align-items: start; }
.files-two > .card, .files-main > .card { margin: 0; }
.files-bars { display: grid; gap: 4px; margin-top: 8px; }
.fb-row { display: grid; grid-template-columns: minmax(0, 14em) minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 3px 6px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text); font: inherit; font-size: 12.5px; text-align: left; }
.fb-row.link { cursor: pointer; }
.fb-row.link:hover { background: var(--row-hover); }
.fb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-t { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.fb-fill { display: block; height: 100%; border-radius: 5px; background: var(--accent); opacity: .75; }
.fb-v { font-size: 12px; color: var(--muted); white-space: nowrap; }
.files-big, .files-maps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.files-big li, .files-maps li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: baseline; font-size: 12.5px; }
.files-big a, .files-maps a { overflow-wrap: anywhere; }
.files-fhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.files-seg button { height: 26px; padding: 0 10px; font-size: 12px; }
.files-md { padding: 18px 22px; max-width: 100%; overflow-x: auto; }
.files-view { display: grid; grid-template-columns: auto minmax(0, 1fr); padding: 0; overflow: hidden; }
.files-gutter, .files-code { margin: 0; padding: 12px 10px; font: 12.5px/1.6 var(--mono); }
.files-gutter { text-align: right; color: var(--muted); background: var(--surface-2); border-right: 1px solid var(--border); user-select: none; }
.files-code { overflow-x: auto; color: var(--text); tab-size: 2; }
.files-code:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.tk-c { color: var(--muted); font-style: italic; }
.tk-s { color: color-mix(in srgb, var(--series-3) 65%, var(--text)); }
.tk-k { color: color-mix(in srgb, var(--series-1) 70%, var(--text)); font-weight: 600; }
.tk-n { color: color-mix(in srgb, var(--series-2) 65%, var(--text)); }
@media (max-width: 900px) {
  .files-grid { grid-template-columns: minmax(0, 1fr); }
  .files-tree { position: static; max-height: 46vh; }
  .fb-row { grid-template-columns: minmax(0, 9em) minmax(0, 1fr) auto; }
}

/* ===== Claude accounts (2026-11-13, CONTRACT.md 6.19 C, R-0282): the Claude Code accounts of each PC =====
   One section per PC: its name and when it reported, a row of chips (account switching, the extension, the launcher,
   Claude Code), a grid of account cards with the normal login's last, then its folders and its recent sessions in the
   page's tables. A card's state is its left edge and its alert, always with words: amber for a token with 30 days or
   fewer left, red for one expired or missing (the Reliability cards' edge, the Usage page's notice). The state colours
   are fills (the edge, the dot, the alert's round mark), never the colour of text; grey chrome, purple only as a fill
   (the "default" tag). On a phone the cards stack and the tables slide sideways inside their own box. */
.acc-pc + .acc-pc { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--border); }
.acc-pchead { display: flex; align-items: center; gap: 12px; min-width: 0; margin: 0 0 10px; }
.acc-pcico { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); }
.acc-pcico .ico { width: 18px; height: 18px; }
.acc-pct { min-width: 0; }
.acc-pct h2 { font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.acc-pct .sub { color: var(--muted); font-size: 12.5px; }
.acc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--s4); }
.acc-chips .chip { overflow: hidden; text-overflow: ellipsis; }
.acc-k { color: var(--muted); font-weight: 500; }
/* (2026-11-14, the Accounts fix round's hostile shots) a chip's value shrinks inside its chip and ends in an ellipsis:
   the chip clipped a long one, but the value's own box still ran past the page's right edge at 400 px (the hostile
   scenario's markup sent as a version: right=481 and 551). A real version is 40 characters at most. */
.acc-kv .acc-k { flex: none; }
.acc-kv > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.acc-sw.on { --dot: var(--ok); }
.acc-sw.off { --dot: var(--idle); }
/* the cards of a row as tall as its tallest (an alert makes a card taller), each card's chart at its foot, so the
   charts of a row line up (seen on the first shots: ragged with the cards' own heights) */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: var(--s4); align-items: stretch; }
.acc-card { display: flex; flex-direction: column; min-width: 0; padding: var(--s4) 18px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.acc-card.warn { box-shadow: inset 3px 0 0 var(--warn), var(--shadow); }
.acc-card.bad { box-shadow: inset 3px 0 0 var(--bad), var(--shadow); }
.acc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; }
.acc-name { min-width: 0; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.acc-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.acc-tag { font-size: 11px; line-height: 18px; padding: 0 8px; }
.acc-default { background: var(--accent); color: var(--on-accent); }
.acc-email { margin-top: 2px; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.acc-alert { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font-size: 12.5px; }
.acc-alert .n-ico { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; color: #ffffff; font-size: 11px; font-weight: 800; }
.acc-alert.warn { border-color: var(--warn-border); background: var(--warn-bg); }
.acc-alert.warn .n-ico { background: var(--warn); }
.acc-alert.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--surface)); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
.acc-alert.bad .n-ico { background: var(--bad); }
.acc-renew { color: var(--text-2); }
.acc-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 10px 0 0; font-size: 12.5px; }
.acc-facts dt { color: var(--muted); }
.acc-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.acc-st { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 6px; }
.acc-st .dot { width: 7px; height: 7px; }
.acc-st.ok { --dot: var(--ok); }
.acc-st.bad { --dot: var(--bad); }
.acc-est { color: var(--text-2); }
.acc-card .chart.flat { margin-top: auto; padding-top: 12px; }
.acc-card .chart.flat .ch-head { margin-bottom: 4px; }
.acc-other { margin: var(--s4) 0 0; }
.acc-sec { margin-top: var(--s4); }
.acc-grid + .acc-sec { margin-top: var(--s5); }
.acc-sec .card-head { margin-bottom: 10px; }
.acc-none { margin: 0; }
.acc-table td.acc-folder { overflow-wrap: anywhere; min-width: 16em; }
.acc-table td.acc-when { white-space: nowrap; }
/* a recent session is one line: on a phone the table slides sideways in its own box (the first 400 px shots squeezed
   "chosen for its folder" over three lines) */
.acc-recent .acc-table th, .acc-recent .acc-table td { white-space: nowrap; }
.acc-more { display: flex; justify-content: center; padding: 12px 0 2px; }
.acc-empty { margin-top: var(--s5); }
/* (2026-11-13, the fix round after the independent attack, finding 4) who sent the report beside when; "Remove this PC" at
   the head's right end (below the name on a phone), and its confirmation in the page, as the Artifacts viewer's delete
   (.art-confirm: the warning's paper and border), never a dialog; a PC whose report could not be drawn is its notice only */
.acc-pct { flex: 1 1 auto; }
.acc-pct .sub, .acc-other { overflow-wrap: anywhere; }
.acc-by { color: var(--muted); }
.acc-remove { flex: none; margin-left: auto; }
.acc-remove .ico { width: 15px; height: 15px; }
.acc-confirm { display: flex; flex-direction: column; gap: 8px; margin: 0 0 var(--s4); padding: 12px var(--s4); background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: var(--radius); }
.acc-confirm-q { margin: 0; font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.acc-confirm .form-row { margin-top: 0; }
.acc-confirm .form-err:empty { display: none; }
@media (max-width: 760px) {
  .acc-pchead { flex-wrap: wrap; }
  .acc-remove { margin-left: 48px; }
}

/* ===== 12h. Artifact boards and search inside every page (2026-11-14, CONTRACT.md 6.23) =====
   The gallery's half of Artifacts 2.0 (app.js 12h): the boards in the left column (a chip each on a phone, as the
   projects are), New board, the form that makes one and the head above a board's cards; a card's "..." menu (fixed to the
   window: a card clips what overflows it) and the marks of a drag; a search's snippet under a card's words, the words
   marked with the purple FILL the Activity page's search uses (never purple ink); a project's topic groups. Grey chrome. */
.art-bd .ico, .art-bnew .ico { width: 18px; height: 18px; margin: 0 2px; color: var(--muted); }
button.art-scope { width: 100%; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.art-bnew .ac-n { font-weight: 500; }
.art-col-note { margin: 2px 10px 6px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.art-col-note.warn { color: var(--text-2); }
.art-scope.drop-on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); color: var(--text); }
.art-bform-host:empty { display: none; }
.art-bform { margin: 0 0 var(--s4); padding: 12px var(--s4); }
.art-bform-h { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.art-bform-h .ico { width: 17px; height: 17px; color: var(--muted); }
.art-bform .form-row .input { flex: 1 1 220px; min-width: 0; }
.art-bform .form-err:empty, .art-brename .form-err:empty, .art-bconfirm .form-err:empty { display: none; }
.art-bhead { flex-wrap: wrap; }
.art-bhead .sh-b { flex: 1 1 220px; }
.art-bacts { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.art-bacts .btn .ico { width: 14px; height: 14px; margin-right: 4px; }
.art-brename { margin-top: 0; }
.art-brename .input { flex: 1 1 200px; min-width: 0; }
.art-bconfirm { margin: 0 0 var(--s4); border: 1px solid var(--warn-border); border-radius: var(--radius); }
/* a card's foot: the boards menu, then the star */
.art-fbtns { display: inline-flex; align-items: center; gap: 0; flex: none; }
.art-more { position: relative; z-index: 2; display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; margin: -4px 0 -4px 0; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.art-more:hover, .art-more[aria-expanded="true"] { background: var(--surface-3); color: var(--text); }
.art-more:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.art-more .ico { width: 17px; height: 17px; }
.art-more .ico svg { stroke-width: 3; }
.menu.art-menu { position: fixed; top: 0; left: 0; z-index: 60; min-width: 220px; }
.art-menu .menu-item:disabled { color: var(--muted); cursor: default; background: transparent; }
.art-mi-check { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; border: 1px solid var(--border-strong); border-radius: 5px; }
.art-mi-board[aria-checked="true"] .art-mi-check { background: var(--accent); border-color: var(--accent); }
.art-mi-board[aria-checked="true"] .art-mi-check .ico { color: var(--on-accent); width: 13px; height: 13px; }
.art-mi-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* dragging: the card being dragged fades; on a board, the card it would go before shows a purple edge at its left */
.art-card.is-dragging { opacity: .45; }
.art-card.drop-before { box-shadow: -4px 0 0 0 var(--accent), var(--shadow-md); }
/* a search's snippet: the page's own words around the first one found, the words marked */
.art-snip { margin: 4px 0 0; color: var(--text-2); font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.art-snip mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.art-snote { margin: -6px 0 12px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.art-snote.warn { color: var(--text-2); }
/* a project's topic groups: the tag as the head, its "#" muted */
.art-thead h2 { display: inline-flex; align-items: baseline; gap: 1px; }
.art-hash { color: var(--muted); font-weight: 600; }
@media (max-width: 760px) {
  /* the boards are chips in the projects' row; New board a chip like them */
  button.art-scope { width: auto; }
  button.art-scope.art-bnew { border: 1px dashed var(--border-strong); background: var(--surface); }
  .art-col-note { display: none; }
  .art-bacts { margin-left: 0; }
}

/* ===== 12i. Artifacts 2.0, the viewer: device frames, compare, pinned comments, present (2026-11-14, CONTRACT.md 6.24) =====
   The strip under the viewer's bar (the device, the size on screen, Compare's choices, Compare, Comment, Present); the
   stage inside the page's box, where each page sits in a layer placed by app.js avxLayout() and scaled by a transform
   (a frame is never moved, so nothing reloads), with the device's frame drawn behind it: a browser window for Desktop
   (and a comment's own width), a dark tablet and phone with their screen's round corners. Pins sit over the page,
   counter-scaled so they keep their size, in purple FILL with white numbers (purple never colours words); a resolved one
   is grey. The small boxes over the page and Present's controls are cards above the layers. Grey chrome throughout. */
.avx-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 6px var(--s4); background: var(--surface); border-bottom: 1px solid var(--border); }
.avx-seg { padding: 2px; }
.avx-seg button { height: 26px; padding: 0 10px; gap: 6px; font-size: 12px; }
.avx-seg .ico { width: 15px; height: 15px; }
.avx-dims { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip.avx-custom { gap: 4px; padding-right: 2px; font-family: var(--mono); font-size: 11.5px; }
.avx-x { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.avx-x:hover { background: var(--surface-3); color: var(--text); }
.avx-x .ico { width: 12px; height: 12px; }
.avx-cmp { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.avx-cl { color: var(--muted); font-size: 12px; }
select.avx-vsel { height: 28px; max-width: 220px; font-size: 12px; font-variant-numeric: tabular-nums; }
label.check.avx-sync { font-size: 12px; white-space: nowrap; }
.avx-acts { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.btn.avx-b { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.avx-b .ico { width: 15px; height: 15px; }
.avx-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; line-height: 18px; text-align: center; }

/* -- the stage -- */
.avx-host { position: absolute; inset: 0; overflow: hidden; isolation: isolate; }   /* its layers' z-indexes stay inside it */
.avx-host.dev { background: radial-gradient(130% 90% at 50% 0%, var(--surface-2) 0%, var(--bg) 72%); }
.avx-host.avx-drag iframe { pointer-events: none; }   /* the slider moving: the frames take no pointer */
.avx-bezel { position: absolute; z-index: 0; box-sizing: border-box; pointer-events: none; }
.avx-bezel .avx-dots, .avx-bezel .avx-ear { display: none; }
.avx-bezel[data-dev="desktop"] { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px 10px 8px 8px; box-shadow: var(--shadow-md); }
.avx-bezel[data-dev="desktop"] .avx-dots { display: flex; gap: 6px; position: absolute; left: 12px; top: 10px; }
.avx-bezel[data-dev="desktop"] .avx-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.avx-bezel[data-dev="tablet"], .avx-bezel[data-dev="phone"] { background: #1f1d26; border: 1px solid rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .07), var(--shadow-lg); }
.avx-bezel[data-dev="tablet"] { border-radius: 26px; }
.avx-bezel[data-dev="phone"] { border-radius: 42px; }
.avx-bezel[data-dev="phone"] .avx-ear { display: block; position: absolute; left: 50%; top: 11px; width: 74px; height: 8px; margin-left: -37px; border-radius: 6px; background: rgba(255, 255, 255, .16); }
.avx-layer { position: absolute; z-index: 1; overflow: hidden; background: var(--surface); }
/* (2026-11-14, the integration fix round, E5) the shown version's layer is .avx-main and the other's .avx-other: as
   "main" it matched the page's own .main rules for <main id="main"> (flex, padding, max-width; position too, had a later
   block given it one), and the integration review measured the layer moving 206 px when ".main { position: relative }"
   was appended to this sheet */
.avx-layer.avx-main { z-index: 2; }
.avx-layer[data-dev="desktop"] { border-radius: 0 0 7px 7px; }
.avx-layer[data-dev="tablet"] { border-radius: 12px; }
.avx-layer[data-dev="phone"] { border-radius: 30px; }
.avx-scaled { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.avx-scaled > iframe.art-page { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--surface); }
/* the names of the two versions over Compare's pages */
.avx-lab { position: absolute; z-index: 5; display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; color: var(--text-2); font-size: 12px; white-space: nowrap; }
.avx-lab b { color: var(--text); font-family: var(--mono); font-size: 12px; }
.avx-lab.r { justify-content: flex-end; }
.avx-lab-s { color: var(--muted); }
/* the slider: a line on the cut, a round grip on it */
.avx-handle { position: absolute; z-index: 6; display: grid; place-items: center; cursor: ew-resize; touch-action: none; }
.avx-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--surface); box-shadow: 0 0 0 1px var(--border-strong), 0 0 10px rgba(0, 0, 0, .25); }
.avx-grip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-md); color: var(--text-2); }
.avx-grip .ico { width: 13px; height: 13px; }
.avx-handle:focus-visible { outline: none; }
.avx-handle:focus-visible .avx-grip { box-shadow: 0 0 0 3px var(--focus); }

/* -- the pins: an anchor at the spot, counter-scaled, its round button's point on the spot -- */
.avx-pins { position: absolute; inset: 0; z-index: 3; overflow: hidden; pointer-events: none; }
.avx-pin { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; }
.avx-pin-b { position: absolute; left: -2px; bottom: -2px; display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border: 2px solid #fff;
  border-radius: 14px 14px 14px 3px; background: var(--accent); color: #fff; font: 700 12px/1 var(--font); box-shadow: 0 2px 8px rgba(30, 16, 70, .35); cursor: pointer; pointer-events: auto; }
.avx-pin-b:hover { filter: brightness(1.08); }
.avx-pin.on .avx-pin-b { box-shadow: 0 0 0 4px var(--accent-soft), 0 2px 8px rgba(30, 16, 70, .35); }
.avx-pin.done .avx-pin-b { background: #8a8696; }
.avx-pin.draft .avx-pin-b { background: var(--surface); color: var(--text); border: 2px dashed var(--accent); cursor: default; }
.avx-catch { position: absolute; inset: 0; z-index: 2; cursor: crosshair; }
.avx-hint { position: absolute; z-index: 7; left: 50%; top: 12px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 24px); padding: 6px 12px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-md); font-size: 12.5px; white-space: nowrap; }
.avx-hint .ico { width: 15px; height: 15px; color: var(--muted); }
.avx-hint > span:not(.ico) { overflow: hidden; text-overflow: ellipsis; }

/* -- the small boxes over the page: the new comment, a pin's card -- */
.avx-pop { position: absolute; z-index: 8; display: flex; flex-direction: column; gap: 8px; width: min(300px, calc(100% - 16px)); padding: 12px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg); }
.avx-pop-h { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.avx-pop-h > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avx-pop-h .ico { width: 15px; height: 15px; color: var(--muted); }
.avx-pop-h time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.avx-pop-s { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.avx-pop-h .avx-pop-s { margin-left: auto; white-space: nowrap; }
.avx-close { margin-left: auto; width: 26px; height: 26px; min-width: 26px; padding: 0; border: 0; }
.avx-compose textarea { min-height: 76px; font-size: 13px; }
.avx-pop-f { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.avx-count { margin-right: auto; color: var(--muted); font-size: 11.5px; }
.avx-pop .form-err:empty { display: none; }
.avx-pop-t { margin: 0; max-height: 220px; overflow: auto; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.avx-pop .form-row { margin-top: 0; }
.avx-num { display: inline-grid; place-items: center; flex: none; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px 11px 11px 3px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.avx-num.done { background: #8a8696; }

/* -- the details panel's list -- */
.avx-cm .art-sec-h { gap: 10px; }
label.check.avx-sr { font-size: 12px; white-space: nowrap; }
.avx-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.avx-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--text);
  font: inherit; text-align: left; cursor: pointer; transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.avx-item:hover { background: var(--row-hover); border-color: var(--border-strong); }
.avx-item.on { background: var(--row-sel); border-color: var(--border-strong); box-shadow: inset 3px 0 0 var(--accent); }
.avx-list li.done .avx-tx { color: var(--muted); }
.avx-it { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.avx-tx { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.avx-mt { color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.avx-ov { margin: 10px 0 0; color: var(--muted); }
.avx-ov a { color: var(--text-2); }
.notice.avx-nh { margin: 0 0 10px; font-size: 12px; }
.avx-empty { margin: 0; }

/* -- Present: the page's box over everything (the browser's own full screen when it allows it), its controls at the
   bottom, faded out after a moment without a move (always on screen where there is no pointer to move) -- */
.art-frame.avx-presenting { position: fixed; inset: 0; z-index: 60; height: auto; min-height: 0; background: #000; }
.art-frame.avx-presenting:focus { outline: none; }
.art-frame.avx-presenting .art-full-exit { display: none; }
body.avx-presenting { overflow: hidden; }
.avx-pctl { position: absolute; z-index: 9; left: 50%; bottom: 18px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; padding: 5px;
  border-radius: 999px; background: rgba(22, 20, 30, .78); color: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); transition: opacity 300ms var(--ease); }
.avx-pctl.idle { opacity: 0; }
.avx-pctl.idle:focus-within, .avx-pctl.idle:hover { opacity: 1; }
.avx-pb { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 38px; height: 38px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent;
  color: #fff; font: 600 13px/1 var(--font); cursor: pointer; }
.avx-pb:hover, .avx-pb:focus-visible { background: rgba(255, 255, 255, .14); }
.avx-pb .ico { width: 18px; height: 18px; }
.avx-pcount { min-width: 54px; padding: 0 4px; text-align: center; font: 600 13px/1 var(--mono); }
.avx-pexit { margin-left: 4px; box-shadow: inset 1px 0 0 rgba(255, 255, 255, .18); border-radius: 0 999px 999px 0; }
@media (hover: none) { .avx-pctl.idle { opacity: 1; } }

/* -- narrower screens -- */
@media (max-width: 1100px) {
  .avx-seg .avx-bl { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .avx-seg button { padding: 0 9px; }
}
@media (max-width: 760px) {
  .avx-strip { padding: 6px var(--s3); }
  .avx-acts { margin-left: 0; flex: 1 1 100%; }
  .avx-acts .btn.avx-b { flex: 1 1 0; min-width: 0; }
  .avx-cmp { flex: 1 1 100%; }
  select.avx-vsel { flex: 1 1 auto; max-width: none; }
  .avx-pop { width: calc(100% - 16px); }
  .avx-hint .avx-hs, .avx-hint kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .avx-pctl, .avx-item { transition: none; }
}

/* ===== 12j. Discussions (2026-11-14, CONTRACT.md 6.25 D, R-0282): every conversation of the PC's mapped workspaces =====
   The list is the page's table (a session's title and folder, its workspace, its messages, when), its filters the
   toolbar's selects; a search's sessions are cards, each with its matching messages as snippets whose words are marked
   with the purple's soft fill (the Activity page's mark). One session is a column of messages: Claude's and other
   sessions' on the left, the operator's on the right on a paler paper, a run of tool calls a line of grey chips between
   them. Words keep their lines (pre-wrap) and break anywhere rather than run past the edge. Purple only as fills (the
   marks, the edge of the message a search opened); grey chrome. On a phone the operator's messages lose their indent,
   the table slides sideways in its own box, and the head's buttons wrap under the title. */
.tk-tools .grow { flex: 1 1 260px; }
.tk-tools select { height: 34px; padding: 0 8px; max-width: 100%; }
.tk-folder-sel { max-width: min(340px, 100%); }
.tk-table td.title { max-width: 560px; }
.tk-table td.tk-when { white-space: nowrap; color: var(--text-2); font-size: 12.5px; }
.tk-wschip { flex: none; }
/* (2026-11-14, the fix round, A4) "sent by <name>" beside a session another user's key sent: grey chrome, a dashed edge
   so it is not read as a workspace's chip; (A6) a turn of pictures and no words says so, muted */
.tk-by { flex: none; margin-left: 4px; background: transparent; border: 1px dashed var(--border); line-height: 18px; }
.tk-pic { color: var(--muted); font-style: italic; }
.tk-more { display: flex; justify-content: center; padding: 12px 0 2px; }
.tk-empty { margin-top: var(--s5); }
.tk-hits { display: flex; flex-direction: column; gap: var(--s4); }
.tk-hit { min-width: 0; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tk-hit-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.tk-hit-t { min-width: 0; font-weight: 700; font-size: 15px; overflow-wrap: anywhere; text-decoration: none; }
.tk-hit-t:hover { text-decoration: underline; }
.tk-hit-f { margin-top: 2px; color: var(--muted); overflow-wrap: anywhere; }
.tk-sn { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tk-sn a { display: block; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); text-decoration: none; overflow-wrap: anywhere; font-size: 13px; }
.tk-sn a:hover { background: var(--surface-3); }
.tk-snh { display: block; margin-bottom: 2px; color: var(--muted); font-size: 12px; }
.tk-snt { white-space: pre-wrap; }
.tk-sn mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.tk-bar { margin: 0 0 12px; }
.tk-bar .ico { width: 15px; height: 15px; }
.tk-head { align-items: flex-start; }
.tk-ht { min-width: 0; flex: 1 1 360px; }
.tk-ht h1 { overflow-wrap: anywhere; }
.tk-ht .sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; overflow-wrap: anywhere; }
.tk-folder { color: var(--text-2); overflow-wrap: anywhere; min-width: 0; }
.tk-meta { font-variant-numeric: tabular-nums; }
.tk-head .head-actions .ico { width: 15px; height: 15px; }
.tk-earlier { display: flex; justify-content: center; margin: 0 0 12px; }
.tk-line { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tk-msg { min-width: 0; max-width: 900px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.tk-user { align-self: flex-end; width: fit-content; max-width: min(820px, 100%); margin-left: 48px; background: var(--surface-2); }
.tk-peer { border-style: dashed; }
.tk-run { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 0 14px; background: transparent; border: 0; box-shadow: none; }
.tk-tl { display: inline-flex; color: var(--muted); }
.tk-tl .ico { width: 14px; height: 14px; }
.tk-tool { font-size: 11.5px; line-height: 18px; }
.tk-x { color: var(--muted); font-variant-numeric: tabular-nums; }
.tk-tt { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.tk-mh { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.tk-who { font-weight: 700; color: var(--text-2); }
.tk-tag { font-size: 11px; line-height: 18px; }
.tk-note { color: var(--muted); }
.tk-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.55; color: var(--text); }
.tk-cut { margin-top: 6px; color: var(--muted); font-size: 12px; }
.tk-focus { box-shadow: inset 3px 0 0 var(--accent), var(--shadow); }
.tk-cont, .tk-confirm { display: flex; flex-direction: column; gap: 8px; margin: 0 0 var(--s4); padding: 12px var(--s4); border-radius: var(--radius); }
.tk-cont { background: var(--surface-2); border: 1px solid var(--border); }
.tk-confirm { background: var(--warn-bg); border: 1px solid var(--warn-border); }
.tk-cont-q, .tk-confirm-q { margin: 0; font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.tk-cont-text { width: 100%; min-height: 120px; padding: 8px 10px; font-family: var(--mono); font-size: 12px; resize: vertical; }
.tk-cont .form-row, .tk-confirm .form-row { margin-top: 0; }
.tk-confirm .form-err:empty { display: none; }
@media (max-width: 760px) {
  .tk-user { margin-left: 0; }
  .tk-msg { padding: 10px 12px; }
  .tk-run { padding: 0 4px; }
}

/* ===== 12k. Machine (2026-11-14, CONTRACT.md 6.27): each PC's disks, memory and processor, markers and locks =====
   One section per PC (its name, when it reported, chips for its processes and what the measure cost), then its disks as
   cards (the free space, a bar of the used part, the trend in words, a 24-hour sparkline), the memory, commit and
   processor tiles and their 24-hour chart (the chart kit, 6.11 C), the battery markers that are up, and the browser slots
   and the heavy lock as a table; the Dev Center's own data disk last. A disk or a lock that needs a look has the WARNING
   (amber) or PROBLEM (red) look: a left edge, an alert, always with words. The state colours are fills (the edge, the
   bar, the dot), never the colour of text; grey chrome, purple only as a fill (a healthy disk's bar). On a phone the
   cards and tiles stack and the locks' table slides sideways inside its own box. */
.mch-warnings { margin: 0 0 var(--s5); }
.mch-warnings .list .item .t { white-space: normal; overflow-wrap: anywhere; font-weight: 500; }
.mch-pc + .mch-pc { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--border); }
.mch-pchead { display: flex; align-items: center; gap: 12px; min-width: 0; margin: 0 0 10px; }
.mch-pcico { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); }
.mch-pcico .ico { width: 18px; height: 18px; }
.mch-pct { flex: 1 1 auto; min-width: 0; }
.mch-pct h2 { font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.mch-pct .sub { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.mch-remove { flex: none; margin-left: auto; }
.mch-remove .ico { width: 15px; height: 15px; }
.mch-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--s4); }
.mch-kv { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mch-kv .mch-k { color: var(--muted); font-weight: 500; }
.mch-h { margin: var(--s5) 0 10px; font-size: 13px; font-weight: 650; letter-spacing: .02em; color: var(--text-2); }
.mch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: var(--s3); }
.mch-disk { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.mch-disk.warn { box-shadow: inset 3px 0 0 var(--warn), var(--shadow); }
.mch-disk.bad { box-shadow: inset 3px 0 0 var(--bad), var(--shadow); }
.mch-dhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mch-dhead h4 { margin: 0; font-family: var(--display); font-size: 18px; font-weight: 700; }
.mch-pctfree { color: var(--text-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mch-free { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.mch-free strong { color: var(--text); font-family: var(--mono); font-weight: 600; }
.mch-bar { position: relative; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.mch-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.mch-disk.warn .mch-fill { background: var(--warn); }
.mch-disk.bad .mch-fill { background: var(--bad); }
.mch-trend { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.mch-trend.falling { color: var(--text); }
.mch-alert { display: flex; gap: 8px; align-items: flex-start; padding: 7px 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font-size: 12.5px; }
.mch-alert .n-ico { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; color: #ffffff; font-size: 11px; font-weight: 800; }
.mch-alert.warn { border-color: var(--warn-border); background: var(--warn-bg); }
.mch-alert.warn .n-ico { background: var(--warn); }
.mch-alert.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--surface)); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
.mch-alert.bad .n-ico { background: var(--bad); }
.mch-todo { color: var(--text-2); }
.mch-spark { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.mch-spark .ch-spark { flex: none; }
.mch-load { display: flex; flex-direction: column; gap: var(--s3); }
.mch-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: var(--s3); }
.mch-tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.mch-tile.warn { box-shadow: inset 3px 0 0 var(--warn), var(--shadow); }
.mch-tl { color: var(--muted); font-size: 12px; font-weight: 600; }
.mch-tv { font-family: var(--display); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mch-ts { color: var(--text-2); font-size: 12px; overflow-wrap: anywhere; }
.mch-sec { padding: 12px var(--s4); }
.mch-none { margin: 0; font-size: 13px; }
.mch-mnote { margin: 0 0 8px; }
.mch-mlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mch-mrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; font-size: 13px; }
.mch-mdot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); align-self: center; }
.mch-mpath { font-weight: 600; overflow-wrap: anywhere; }
.mch-msince { color: var(--text-2); }
.mch-mline { flex: 1 1 100%; padding-left: 19px; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.mch-lsum { margin: 0 0 10px; font-size: 13px; color: var(--text-2); }
.mch-table th, .mch-table td { white-space: nowrap; }
.mch-table td.mch-why { white-space: normal; min-width: 16em; color: var(--text-2); }
.mch-table tr.mch-left td { background: var(--warn-bg); }
.mch-st { display: inline-flex; align-items: center; gap: 6px; }
.mch-st .dot { width: 7px; height: 7px; }
.mch-st.ok { --dot: var(--ok); }
.mch-st.warn { --dot: var(--warn); }
.mch-st.bad { --dot: var(--bad); }
.mch-st.idle { --dot: var(--idle); }
.mch-lnote { margin: 10px 0 0; }
.mch-nofull { margin: var(--s3) 0 0; }
.mch-empty { margin: var(--s4) 0 var(--s5); }
.mch-confirm { display: flex; flex-direction: column; gap: 8px; margin: 0 0 var(--s4); padding: 12px var(--s4); background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: var(--radius); }
.mch-confirm-q { margin: 0; font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.mch-confirm .form-row { margin-top: 0; }
.mch-confirm .form-err:empty { display: none; }
@media (max-width: 760px) {
  .mch-pchead { flex-wrap: wrap; }
  .mch-remove { margin-left: 48px; }
}

/* ===== 12l. Numbers (2026-11-14, CONTRACT.md 6.28): the Number desk =====
   The next free number and why in the page's KPI tiles (the accent tile's icon is the purple fill), the checks as lines
   with a dot of their state (a fill, always beside the words: green none, amber to look at, red a collision, grey
   information), the lookup of one number, and the two tables of grants inside the page's sideways scrollers. Grey chrome;
   numbers and the RESERVED.md line in JetBrains Mono. On a phone the tiles stack and the tables slide inside their box. */
.num-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); min-width: 0; }
.num-body > .card { margin: 0; }
.num-kpis { margin-top: 0; }
.num-next .k-n { font-family: var(--mono); letter-spacing: -.01em; }
.num-next .k-sub { overflow-wrap: anywhere; }
.num-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.num-check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: 13px; line-height: 1.5; }
.num-check .dot, .num-state .dot { position: relative; top: -1px; }
.nc-t { min-width: 0; overflow-wrap: anywhere; }
.num-ok { --dot: var(--ok); }
.num-warn { --dot: var(--warn); }
.num-bad { --dot: var(--bad); }
.num-info { --dot: var(--idle); }
.num-find { display: flex; gap: 8px; flex-wrap: wrap; max-width: 420px; margin: 0 0 10px; }
.num-find .input { flex: 1 1 160px; min-width: 0; }
.num-look { min-width: 0; }
.num-state { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 0; font-size: 13.5px; overflow-wrap: anywhere; }
/* a grid item is as wide as its content unless told otherwise: the first shots had the RESERVED.md line (white-space: pre)
   widen its list item to 3,214 px and the page with it, at every width; minmax(0, 1fr) and min-width: 0 keep it in its
   card, where the line's own box slides sideways */
.num-facts { margin: 8px 0 0; padding-left: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.num-facts > li { min-width: 0; }
.num-line { margin: 6px 0 0; padding: 8px 10px; max-width: 100%; overflow-x: auto; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: 12px/1.5 var(--mono); color: var(--text); white-space: pre; user-select: all; }
.num-none { margin: 0; }
.num-table td { vertical-align: top; }
.num-table td.num-why { min-width: 18em; overflow-wrap: anywhere; }
.num-table td.num-for { min-width: 9em; overflow-wrap: anywhere; }
.num-card .toolbar { margin-bottom: 10px; }
.num-more { display: flex; justify-content: center; padding: 12px 0 2px; }

/* ===== 12m. Sessions: a session's state and "Waiting for you" (2026-11-14, CONTRACT.md 6.20 C) =====
   The Agents page's State column (app.js sesStateCell): a chip whose fill says the state beside its words (the accent
   fill for Waiting for you, as "Requests waiting on you" wears it; a green dot for Working; grey for Closed), the
   reason and since when under it, then the folder and the account. A waiting row carries the accent edge the selected
   row wears; its group heads the table. Purple is a fill only, never ink: the chip's words are --on-accent on it. */
.ses-state { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 11em; max-width: 22em; }
.ses-chip.wait { background: var(--accent); color: var(--on-accent); }
.ses-chip.wait .dot { background: var(--on-accent); }
.ses-chip.work .dot { background: var(--ok); }
.ses-chip.done { color: var(--text-2); }
.ses-chip.done .dot { background: var(--idle); }
.ses-why { font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.ses-meta { overflow-wrap: anywhere; }
table.data tbody tr.ses-wait td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
table.data tr.ses-grp td { color: var(--text-2); }
@media (max-width: 760px) {
  .ses-state { min-width: 9em; }
}

/* ===== 12n. Remote control (2026-11-14, CONTRACT.md 6.21 D, R-0282) =====
   The Remote page (app.js RemoteView): what waits for an answer, each PC's sessions, a start, the rules, the protection and
   the history. Mist: grey chrome, cards on the paper; purple only as a FILL (the primary buttons, the waiting count, the
   Waiting chip from 12m), never as ink. At phone width every row stacks and nothing scrolls sideways but the rules table
   (in its own overflow box); a command and a plan wrap inside their box. */
.rem-body { display: flex; flex-direction: column; gap: var(--s5); }
.rem-sec { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.rem-sec > h2, .rem-hist > summary h2 { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.rem-sec .badge.accent { background: var(--accent); color: var(--on-accent); }
.rem-filter, .rem-none { margin: 0; font-size: 13px; }
.rem-req, .rem-pc { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.rem-req { border-left: 3px solid var(--accent); }
.rem-req-head, .rem-pc-head, .rem-ses-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.rem-pc-head h3 { margin: 0; font-size: 15px; }
.rem-kind { background: var(--surface-3); }
.rem-tool { font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.rem-when { margin-left: auto; }
.rem-req-who { font-size: 13px; overflow-wrap: anywhere; }
.rem-cmd, .rem-plan { margin: 0; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.rem-plan { max-height: 22em; overflow: auto; font-family: inherit; font-size: 13px; }
.rem-desc, .rem-line { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.rem-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rem-reason { flex: 1 1 14em; min-width: 0; height: 34px; padding: 0 10px; }
.rem-q { margin: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.rem-q legend { padding: 0 4px; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.rem-opt { display: flex; align-items: flex-start; gap: 8px; padding: 6px 2px; font-size: 13px; cursor: pointer; overflow-wrap: anywhere; }
.rem-opt input { margin-top: 3px; flex: none; }
.rem-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; color: var(--text-2); }
.rem-field .input, .rem-field select { height: 34px; padding: 0 10px; min-width: 0; }
.rem-field textarea.input, .rem-text { width: 100%; box-sizing: border-box; padding: 8px 10px; resize: vertical; min-height: 3.2em; }
.rem-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rem-sw .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--idle); }
.rem-sw.on .dot { background: var(--ok); }
.rem-ct { box-shadow: inset 0 0 0 1px var(--warn-border, var(--border-strong)); }
.rem-ses { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--border); min-width: 0; }
.rem-ses-name { font-size: 13.5px; overflow-wrap: anywhere; }
.rem-ins { display: flex; flex-direction: column; gap: 6px; }
.rem-order { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.rem-hint { margin: 0; }
.rem-start { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; padding: 14px var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.rem-start .rem-wide, .rem-start .rem-act { grid-column: 1 / -1; }
.rem-recent, .rem-rules, .rem-hist { min-width: 0; }
.rem-recent > summary, .rem-rules > summary, .rem-hist > summary { cursor: pointer; font-size: 13px; color: var(--text-2); }
.rem-rules { padding: 10px var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.rem-rules[open] { display: flex; flex-direction: column; gap: 10px; }
.rem-recent-row, .rem-hrow { padding: 4px 0; font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.rem-scroll { overflow-x: auto; max-width: 100%; }
.rem-rules-t { min-width: 40em; }
.rem-pat { overflow-wrap: anywhere; max-width: 22em; }
.rem-newrule { display: grid; grid-template-columns: 8em 6em minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.rem-newrule .input { height: 30px; padding: 0 8px; min-width: 0; }
.rem-hd { font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.rem-check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.rem-pw { display: flex; flex-direction: column; gap: 8px; }
.rem-pw-form { display: flex; flex-wrap: wrap; gap: 8px; }
.rem-pw-form .input { height: 32px; padding: 0 10px; flex: 1 1 12em; min-width: 0; }
.ses-remote { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 12px; color: var(--text-2); text-decoration: underline; }
.ses-remote .ico { width: 13px; height: 13px; }
@media (max-width: 760px) {
  .rem-start { grid-template-columns: minmax(0, 1fr); }
  .rem-newrule { grid-template-columns: minmax(0, 1fr); }
  .rem-when { margin-left: 0; width: 100%; }
  .rem-act .btn { flex: 1 1 auto; }
  /* (2026-11-16, r284 final integration, FILED 5; RULINGS.txt 2026-11-15 13:27 UTC: touch targets of at least 44 px on the
     operator's phone) this page's OWN controls, as 12q gave the same card and row on the live page and 12r its new ones:
     every button, field, select and text box, an option's or a check's whole row (its label is what a finger touches),
     and each folding section's head (the last hour, a PC's rules, the history), which keeps its disclosure mark (a list
     item, padded, never a flex box); its "Watch live" links are 12q's (44 px). Measured, links included, by
     tests/shots.cjs remote-taps and remote-360 (34 to 36 px before; the first fixed run still found the start form's text
     box at 41.6 px, its own rule `.rem-field textarea.input` outranking `.rem-body .input`, and a form's yes-or-no field,
     a label of 41 px around its check box: `textarea.input` and `.rem-field` below). */
  .rem-body .btn, .rem-body .input, .rem-body select, .rem-body textarea, .rem-body textarea.input { min-height: 44px; }
  .rem-body .rem-opt, .rem-body .rem-check, .rem-body label.check, .rem-body .rem-field { min-height: 44px; }
  .rem-body .rem-opt, .rem-body .rem-check, .rem-body label.check { align-items: center; }
  .rem-body .rem-opt input { margin-top: 0; }
  .rem-recent > summary, .rem-rules > summary, .rem-hist > summary { box-sizing: border-box; min-height: 44px; padding-block: 12px; }
}

/* ===== 12o. Usage and limits by account (2026-11-14, CONTRACT.md 6.22, R-0282 and R-0256 phase 3) =====
   The Usage page's "By account" card (two flat charts of the kit side by side, then a table per account, then the
   rule in words), its sessions table's Account column, and on the Claude accounts page each card's usage: its limit as
   the card's own alert (the warning look while the limit is in force, the plain one once it opened again), then its
   tokens and its sessions now as facts. Colours are fills beside their words; purple only as a fill; grey chrome. On a
   phone the charts stack and the table slides sideways in its own box. */
.u-acu { margin-top: var(--s4); }
.acu-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: var(--s4); align-items: start; margin-bottom: var(--s4); }
.acu-charts > .chart.flat { min-width: 0; }
.acu-table td.title .s { color: var(--muted); }
.acu-rule { margin: 10px 0 0; overflow-wrap: anywhere; }
table.data td.acu-acct { white-space: nowrap; max-width: 22em; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.acu-block { display: flex; flex-direction: column; min-width: 0; }
/* the limit's own alert, drawn as the card's token alert is (.acc-alert) but with a class of its own: the warning look while
   the limit is in force, the plain one (a grey mark) once it opened again */
.acu-limit { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font-size: 12.5px; overflow-wrap: anywhere; }
.acu-limit .n-ico { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; color: #ffffff; font-size: 11px; font-weight: 800; }
.acu-limit.open { border-color: var(--warn-border); background: var(--warn-bg); }
.acu-limit.open .n-ico { background: var(--warn); }
.acu-limit.past .n-ico { background: var(--idle); }
.acu-facts dd { display: flex; flex-direction: column; gap: 1px; }
.acu-tsub { font-size: 12px; }
.acu-now { margin: 2px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--text-2); }
.acu-now li { overflow-wrap: anywhere; }
.acu-wait { margin: 10px 0 0; }

/* ===== 12t. Security (2026-11-15, CONTRACT.md 6.33 D, R-0284): devices, two-factor sign-in, passkeys, the step-up =====
   The Security page (app.js SecurityView), the passkey step-up's dialog and the Remote page's note on it, and the sign-in
   page's new steps (login.html: "Keep me signed in", the code, the setup's QR code and key, the recovery codes). Mist: grey
   chrome, cards on the paper, purple only as a FILL (the primary buttons, from .btn.primary), never as ink. A QR code is
   ALWAYS black on white with its quiet zone, in both themes (a light symbol on a dark ground is not read by every scanner).
   At phone width every row stacks, and every button and box is at least 44 px high (a thumb on the operator's Android). */
.auth-keep, .sec-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.auth-keep input, .sec-check input { margin-top: 2px; flex: none; width: 16px; height: 16px; }
.auth-otp { font-size: 20px; letter-spacing: .3em; text-align: center; }
.auth-alt { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.auth-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13px; color: var(--text-2); }
.qr-box { width: min(240px, 100%); aspect-ratio: 1 / 1; margin: 4px auto; padding: 0; background: #ffffff; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qr-box svg { display: block; width: 100%; height: 100%; }
.auth-secret { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.auth-secret code { padding: 6px 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; letter-spacing: .04em; overflow-wrap: anywhere; text-align: center; }
.rcodes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; margin: 0; padding: 10px 14px 10px 34px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); font-size: 13px; }
.rcodes li { overflow-wrap: anywhere; }
.sec-body { display: flex; flex-direction: column; gap: var(--s4); }
.sec-sec { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sec-line { margin: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.sec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sec-dev, .sec-pk { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); min-width: 0; }
.sec-dev:first-child, .sec-pk:first-child { border-top: 0; }
.sec-dev.current { background: linear-gradient(90deg, var(--surface-2), transparent); }
.sec-dev-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; grid-column: 1 / 2; }
.sec-dev-head strong { font-size: 14px; overflow-wrap: anywhere; }
.sec-facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 2px 12px; margin: 0; grid-column: 1 / 2; font-size: 12.5px; }
.sec-facts dt { color: var(--muted); }
.sec-facts dd { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.sec-dev > .sec-act, .sec-pk > .sec-act { grid-column: 2 / 3; grid-row: 1 / 3; }
.sec-pk > .sec-ask { grid-column: 1 / -1; }
/* (2026-11-15, the auth lane's fix round, G3) a device's "Sign out" asks the password in its own row, full width */
.sec-dev > .sec-ask { grid-column: 1 / -1; }
.sec-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sec-ask { display: flex; flex-direction: column; gap: 10px; max-width: 30em; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); min-width: 0; }
.sec-ask h3, .sec-codes h3 { margin: 0; font-size: 14px; }
.sec-ask .input { min-width: 0; }
.sec-codes { display: flex; flex-direction: column; gap: 10px; max-width: 34em; }
.sec-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.sec-note .ico { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.sec-step-box { display: flex; flex-direction: column; gap: 12px; }
.sec-step-box p { margin: 0; font-size: 13.5px; color: var(--text-2); }
@media (max-width: 760px) {
  .sec-dev, .sec-pk { grid-template-columns: minmax(0, 1fr); }
  .sec-dev > .sec-act, .sec-pk > .sec-act { grid-column: 1 / -1; grid-row: auto; }
  .sec-facts { grid-template-columns: auto minmax(0, 1fr); }
  .rcodes { grid-template-columns: minmax(0, 1fr); }
  .sec-body .btn, .sec-step .btn, .auth-card .btn, .sec-body .input, .sec-body select, .auth-card .input { min-height: 44px; }
  /* (2026-11-15, the fix round, S5) the step-up dialog's boxes too: it hangs off body, outside .sec-body (they were 36 px) */
  .sec-step .input, .sec-step select { min-height: 44px; }
  .auth-keep, .sec-check { min-height: 44px; align-items: center; }
  .sec-ask { max-width: none; }
}

/* ===== 12y. FlexCode signs in: the link page and the FlexCode PCs (2026-11-23, Flex Cloud phase 2, lane page, CONTRACT.md 6.48 D) =====
   The link page is one card in the Mist look: the PC's own claim in a quiet grey box (its name in the mono face, never wider
   than the card: it wraps anywhere), the facts under it, Confirm (the primary fill: purple only as a fill) and Cancel. A
   FlexCode PC's row is a .sec-dev row (the same grid, its sign-out form full width under it); its agent keys are one box each.
   No animation; at 760 px and below every button and box is 44 px tall; the focus ring is :focus-visible's. */
.fcl-body { display: flex; flex-direction: column; gap: var(--s4); max-width: 46em; min-width: 0; }
.fcl-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fcl-card p { margin: 0; font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.fcl-pc { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); min-width: 0; }
.fcl-name { font-size: 15px; overflow-wrap: anywhere; }
.fcl-name strong { font-size: 16px; }
.fcl-meta { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.fcl-act { margin-top: 4px; }
.fc-dev .sec-dev-head strong.mono { font-size: 13.5px; }
.fc-keys { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fc-keys p { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.fc-keys label.check { align-items: flex-start; overflow-wrap: anywhere; min-width: 0; }
.fc-keys label.check input { flex: none; margin-top: 2px; }
.fc-confirmed { margin: 0; grid-column: 1 / 2; color: var(--text-2); overflow-wrap: anywhere; }
.fc-old-h { margin: 6px 0 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.fc-pw-note { margin: 10px 0 0; }
/* (2026-11-26, server 3.13.1, lane page: K2 and SD3; CONTRACT.md 6.48 D) what ticking the remote-report key stops: its own line
   under the key's label, in the warn look (amber edge and wash, grey text: never purple as text); the unreadable list's note
   is a .notice.warn */
.fc-key-stops { display: block; margin-top: 4px; padding: 4px 8px; border-left: 3px solid var(--warn-border); background: var(--warn-bg); color: var(--text); border-radius: 0 var(--radius) var(--radius) 0; }
.fc-unread { margin: 0 0 10px; overflow-wrap: anywhere; }
/* (2026-11-26, server 3.13.1's fix round, page: PAGE-8 and PAGE-1) a key: its box's label, then its K2 line OUTSIDE the label (a
   click on the words ticks nothing), indented to the label's text (the box's 13 px and the label's 6 px gap); the lasting notice
   of a PC signed out whose keys were not revoked: the warn look, the words wrapping, Dismiss at its end */
.fc-key { display: flex; flex-direction: column; min-width: 0; }
.fc-key .fc-key-stops { margin-left: 19px; overflow-wrap: anywhere; }
.fc-keys-left { margin: 0 0 10px; align-items: center; flex-wrap: wrap; }
.fc-keys-left .fc-keys-left-t { flex: 1 1 16em; min-width: 0; overflow-wrap: anywhere; }
.ntf-mx-off .ntf-mx-hit { opacity: .55; cursor: not-allowed; }
@media (max-width: 760px) {
  .fcl-body .btn, .fc-keys label.check { min-height: 44px; }
  .fc-keys label.check { align-items: center; }
  .fc-confirmed { grid-column: 1 / -1; }
}

/* ===== 12x. Settings, the Organization and Home (2026-11-20, Flex Cloud phase 1, lane org, CONTRACT.md 6.45 D and 6.46 D) =====
   Settings: a quiet kicker ("Settings") and the frame's tabs above each tab's own page (its own heading stays its h1). The
   Organization: the members' table (it scrolls in its own box), each team a card, the invitations as lists, an editor
   opening inside its row. Home: four tiles (two per row at phone width), To do and Activity side by side on a wide screen
   and one column on a phone. Mist: grey surfaces, the status colours as dots and edges, purple only as a fill (the primary
   buttons, the selected tab's underline as today's .tabs draw it), never as ink. An invitation's QR code is .qr-box's:
   black on white with its quiet zone in both themes. Every control keeps the focus ring of :focus-visible. */
.settings-frame { display: flex; flex-direction: column; gap: 6px; margin: 0 0 4px; }
.settings-kicker { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.settings-kicker .ico { width: 15px; height: 15px; }
.settings-tabs { margin: 0 0 12px; }
.settings-body { display: flex; flex-direction: column; min-width: 0; }
.org-body { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.org-edit > td { background: var(--surface-2); }
.org-editor { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; min-width: 0; }
.org-team .sec-facts { grid-template-columns: auto minmax(0, 1fr); }
.org-pol { grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; }
.org-pol dd { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }   /* (2026-11-21, OP8) a chip its own size, never a bar across the row */
/* (2026-11-21, the fix round, OP6) the Members table's actions wrap inside their cell (two rows of buttons at 1366 px)
   instead of pushing the table past its box */
.org-body td.org-acts { white-space: normal; min-width: 11em; }
.org-body td.org-acts .row-acts { max-width: 15em; }
.org-qr { margin-top: 10px; }
.org-qr .qr-box { margin: 0; }
.row-acts { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.home-body { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.home-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.home-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.home-tile.amber { box-shadow: inset 3px 0 0 var(--warn), var(--shadow); }
.ht-label { font-size: 12.5px; color: var(--muted); }
.ht-value { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.ht-sub { font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.home-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.home-cols > div { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.home-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.home-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 0; border-top: 1px solid var(--border); min-width: 0; }
.home-item:first-child { border-top: 0; }
.home-item .hi-text { flex: 1 1 12em; min-width: 0; font-size: 13.5px; overflow-wrap: anywhere; color: var(--text); }
.home-item a.hi-text { text-decoration: none; }
.home-item a.hi-text:hover { text-decoration: underline; }
.home-item .sec-ask { flex-basis: 100%; }
.home-next p { margin: 0 0 8px; font-size: 13.5px; color: var(--text-2); }
@media (max-width: 760px) {
  .home-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-cols { grid-template-columns: minmax(0, 1fr); }
  .ht-value { font-size: 24px; }
  .org-body .btn, .org-body .input, .org-body select, .home-body .btn { min-height: 44px; }
  .org-pol { grid-template-columns: minmax(0, 1fr); }
}

/* ===== 12s. Health (2026-11-15, CONTRACT.md 6.32, R-0284): the Dev Center, each PC and each project on one screen =====
   Made for the phone first: one column of cards at phone width (two or three side by side on a wide screen), each group a
   card of rows. A row's level is a dot in its colour and, amber or red, an edge in it, with the level in words beside it
   (Fine, Look, Act now): never colour alone. The words stay ink; the status colours are fills; purple is not used here;
   the chrome is grey. A row that opens a page is a link the whole row wide, at least 56 px tall (touch targets of 44 px
   and more); the buttons are 44 px tall on a phone. */
.hl-body { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.hl-dot { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--idle); }
.l-green > .hl-dot { background: var(--ok); }
.l-amber > .hl-dot { background: var(--warn); }
.l-red > .hl-dot { background: var(--bad); }
.hl-summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.hl-summary > .hl-dot { width: 14px; height: 14px; margin-top: 0; }
.hl-summary.l-amber { box-shadow: inset 3px 0 0 var(--warn), var(--shadow); }
.hl-summary.l-red { box-shadow: inset 3px 0 0 var(--bad), var(--shadow); }
.hl-sumtext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hl-sumline { font-family: var(--display); font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.hl-alerts .list .item .t { white-space: normal; overflow-wrap: anywhere; font-weight: 500; }
.hl-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr)); gap: var(--s4); align-items: start; }
.hl-group { padding: 0; overflow: hidden; min-width: 0; }
.hl-ghead { padding: 14px 16px 0; margin-bottom: 6px; }
.hl-ghead h2 { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.hl-kicker { flex: none; padding: 1px 6px; border: 1px solid var(--border-strong); border-radius: 4px; font-size: 10px; letter-spacing: .06em; color: var(--muted); }
.hl-rows { list-style: none; margin: 0; padding: 0; }
.hl-rows > li { min-width: 0; }
.hl-rows > li + li { border-top: 1px solid var(--border); }
.hl-row { display: flex; gap: 10px; align-items: flex-start; box-sizing: border-box; min-height: 56px; padding: 10px 16px; color: var(--text); text-decoration: none; }
a.hl-row:hover { background: var(--surface-2); }
a.hl-row:focus-visible { outline: 2px solid var(--text-2); outline-offset: -2px; }
.hl-row.l-amber { box-shadow: inset 3px 0 0 var(--warn); }
.hl-row.l-red { box-shadow: inset 3px 0 0 var(--bad); background: rgba(220, 38, 38, .045); }
.hl-main { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
.hl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.hl-title { font-weight: 650; overflow-wrap: anywhere; }
.hl-word { flex: none; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.l-green .hl-word { background: rgba(22, 163, 74, .12); }
.l-amber .hl-word { background: var(--warn-bg); color: var(--text); }
.l-red .hl-word { background: rgba(220, 38, 38, .14); color: var(--text); }
.hl-text { color: var(--text-2); font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.hl-row.l-red .hl-text { color: var(--text); }
.hl-steps { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.hl-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.hl-alertword { color: var(--text-2); font-weight: 600; }
.hl-go { flex: none; align-self: center; color: var(--muted); }
@media (max-width: 760px) {
  .hl-actions { width: 100%; }
  .hl-actions .btn { flex: 1 1 auto; min-height: 44px; }
  .hl-row { padding: 12px 14px; }
  .hl-sumline { font-size: 16px; }
  .hl-head { flex-wrap: wrap; }
}
:root[data-theme="dark"] .hl-row.l-red { background: rgba(220, 38, 38, .09); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hl-row.l-red { background: rgba(220, 38, 38, .09); } }

/* ===== 12p. The phone: the bottom tabs and the Notifications page (2026-11-15, CONTRACT.md 6.29, R-0284) =====
   The operator's phone (Android) is this round's main screen. At 760 px and below (the drawer's width) a bar of five tabs
   sits at the bottom: Waiting (its count in the accent FILL), Sessions, Machine, Releases and More (the full menu, the
   drawer). Each tab is at least 44 px each way (52 px tall); the bar keeps clear of the phone's gesture area
   (env(safe-area-inset-bottom)); the footer, the toasts and the g hint move up above it. It sits under the drawer, its
   scrim and the detail panel, and is hidden in an artifact's viewer and while signed out. Grey chrome; purple only as
   the active tab's bar and the count's fill. The Notifications page is cards like the account page's. */
.ptabs { display: none; }
@media (max-width: 760px) {
  body.signed-in .ptabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    gap: 2px; padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(40, 24, 90, .06); }
  body.signed-out .ptabs, body.art-viewer .ptabs, body.art-full .ptabs, body.avx-presenting .ptabs { display: none; }
  .ptab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 44px; min-height: 52px; padding: 4px 2px;
    border: 0; border-radius: 10px; background: none; color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
    -webkit-tap-highlight-color: transparent; transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
  .ptab .ico { width: 22px; height: 22px; }
  .ptab .pt-l { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ptab:hover, .ptab:focus-visible { color: var(--text); background: var(--sb-hover); }
  .ptab[aria-current="page"] { color: var(--text); }
  .ptab[aria-current="page"]::before { content: ""; position: absolute; top: -4px; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .ptab .badge { position: absolute; top: 3px; left: calc(50% + 5px); min-width: 18px; padding: 0 5px; font-size: 10.5px; line-height: 17px; }
  body.signed-in .foot { padding-bottom: calc(24px + 64px + env(safe-area-inset-bottom, 0px)); }
  body.signed-in .toasts { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  body.signed-in .ghint { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
/* the Notifications page: this device (its state, its buttons, the install), what it receives (a row per kind, each a
   48 px touch row), quiet hours, and the user's devices */
.ntf-body { display: flex; flex-direction: column; gap: var(--s4); max-width: 820px; }
.ntf-body .card + .card { margin-top: 0; }
.ntf-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 4px 0 0; color: var(--text-2); }
.ntf-acts { margin-top: 12px; }
.ntf-acts .btn { min-height: 44px; }
.ntf-install { margin: 12px 0 0; }
.ntf-why { margin: 4px 0 0; }
.ntf-chip.live { --dot: var(--ok); } .ntf-chip.paused { --dot: var(--warn); } .ntf-chip.ended { --dot: var(--idle); } .ntf-chip.broken { --dot: var(--bad); }
.ntf-kinds { display: flex; flex-direction: column; }
.ntf-kind { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 10px 2px; border-top: 1px solid var(--border); cursor: pointer; }
.ntf-kinds .ntf-kind:first-child { border-top: 0; }
.ntf-kind input[type="checkbox"] { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.ntf-kt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ntf-kl { font-weight: 700; color: var(--text); }
.ntf-kd { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.ntf-quiet { margin-top: 8px; padding-top: 4px; border-top: 1px solid var(--border); }
.ntf-quiet > .ntf-kind:first-child { border-top: 0; }
.ntf-times { display: flex; flex-wrap: wrap; gap: 12px; padding: 4px 2px 8px 34px; }
.ntf-times .field { flex: 0 1 160px; }
.ntf-times .input { min-height: 44px; }
.ntf-qt { margin: 6px 0 0 34px; }
.ntf-list { list-style: none; margin: 0; padding: 0; }
.ntf-dev { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-top: 1px solid var(--border); min-width: 0; }
.ntf-dev:first-child { border-top: 0; padding-top: 4px; }
.ntf-dh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.ntf-dn { font-weight: 700; overflow-wrap: anywhere; }
.ntf-dm, .ntf-dw { overflow-wrap: anywhere; }
.ntf-da { margin-top: 4px; }
.ntf-da .btn { min-height: 36px; }
.ntf-none { margin: 4px 0 0; }
@media (max-width: 760px) {
  .ntf-da .btn { min-height: 44px; }
  .ntf-times { padding-left: 0; }
  .ntf-qt { margin-left: 0; }
}
/* (2026-11-20, CONTRACT.md 6.47 A, FlexCode R-0010, lane notify) "What reaches you", the first card of the Notifications page: a
   row per group of notices, the columns Website, Phone and FlexCode (greyed until FlexCode 0.3.0). The table sits in a box of
   its own that scrolls sideways when the screen is narrower than it (at 360 px it fits: three 58 px columns and the words);
   each switch's label fills its cell, a 44 px tap target; the boxes take the accent as their fill only. */
.ntf-mx-sub { margin: 0 0 8px; }
.ntf-mx-wrap { overflow-x: auto; max-width: 100%; }
.ntf-mx { width: 100%; border-collapse: collapse; font-size: 13px; }
.ntf-mx th, .ntf-mx td { padding: 10px 8px; border-top: 1px solid var(--border); vertical-align: top; text-align: left; }
.ntf-mx thead th { border-top: 0; padding-top: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); vertical-align: bottom; }
.ntf-mx .ntf-mx-c { width: 76px; text-align: center; }
.ntf-mx td.ntf-mx-c { padding: 0 4px; vertical-align: middle; }
.ntf-mx-row { font-weight: 400; min-width: 150px; }
.ntf-mx-l { display: block; font-weight: 700; color: var(--text); }
.ntf-mx-d { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.ntf-mx-on { margin-top: 4px; }
.ntf-mx-hit { display: flex; align-items: center; justify-content: center; min-height: 44px; cursor: pointer; }
.ntf-mx input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.ntf-mx input[type="checkbox"]:disabled { cursor: not-allowed; }
.ntf-mx-later { color: var(--muted); opacity: .7; }
.ntf-mx-note { display: block; margin-top: 2px; font-size: 10px; font-weight: 600; text-transform: none; letter-spacing: 0; }
@media (max-width: 760px) {
  .ntf-mx .ntf-mx-c { width: 58px; }
  .ntf-mx-row { min-width: 120px; }
  .ntf-mx input[type="checkbox"] { width: 22px; height: 22px; }
}
/* (2026-11-21, 6.47's fix round, NP6) at 400 px and below the table fits its box (286 px at 360 px): the three columns 44 px
   (the tap target's width), tighter cells, the row's words free to wrap, and the FlexCode column's note under its heading */
@media (max-width: 400px) {
  .ntf-mx th, .ntf-mx td { padding: 8px 4px; }
  .ntf-mx .ntf-mx-c { width: 44px; }
  .ntf-mx td.ntf-mx-c { padding: 0; }
  .ntf-mx-row { min-width: 0; }
  .ntf-mx thead th { font-size: 10px; letter-spacing: .02em; }
  .ntf-mx-note { font-size: 9px; overflow-wrap: anywhere; }
}

/* ===== 12x. The bell (2026-11-20, CONTRACT.md 6.47, FlexCode R-0010, lane notify) =====
   In the header of every page: beside the brand in the sidebar's top row (stacked under the logo on the icon rail), and in
   the bar above the content on a phone (the drawer's copy is hidden there). Its count is the accent FILL with white digits,
   at the button's corner. Its panel is a card floating beside the sidebar (under the bar on a phone, clear of the bottom
   tabs), its list scrolling inside it; an unread notice is marked by a purple DOT (a fill) and its words at full strength,
   a read one in the second text colour. Grey surfaces; purple never as text. */
.bell-btn { position: relative; flex: none; }
.bell-btn .bell-count { position: absolute; top: -6px; right: -7px; min-width: 18px; padding: 0 5px; font-size: 10.5px; line-height: 17px; box-shadow: 0 0 0 2px var(--sidebar); }
.mobilebar .bell-btn .bell-count { box-shadow: 0 0 0 2px var(--surface); }
.bell-panel { position: fixed; z-index: 50; top: 12px; left: calc(var(--sb-w) + 8px); width: min(420px, calc(100vw - var(--sb-w) - 24px)); max-height: calc(100vh - 24px);
  display: flex; flex-direction: column; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.bell-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px 16px; }
.bell-head h2 { flex: 1 1 auto; min-width: 0; font-size: 15px; }
.bell-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 8px; border-bottom: 1px solid var(--border); }
.bell-tab { height: 30px; padding: 0 12px; border: 1px solid transparent; border-radius: 999px; background: none; color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.bell-tab:hover { background: var(--surface-3); color: var(--text); }
.bell-tab[aria-pressed="true"] { background: var(--surface-3); color: var(--text); border-color: var(--border-strong); }
.bell-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.bell-list { list-style: none; margin: 0; padding: 4px 0; }
.bell-item + .bell-item { border-top: 1px solid var(--border); }
.bell-link { display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: 48px; padding: 10px 16px; border: 0; background: none; color: var(--text-2);
  font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.bell-link:hover { background: var(--row-hover); color: var(--text); }
/* (2026-11-21, 6.47's fix round, NP5) the focus ring drawn inside the notice: the panel's scroller clipped its sides */
.bell-link:focus-visible { outline-offset: -2px; }
.bell-item.unread .bell-link { color: var(--text); }
.bell-dot { flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); }
.bell-item.unread .bell-dot { background: var(--accent); box-shadow: none; }
.bell-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bell-text { overflow-wrap: anywhere; }
.bell-item.unread .bell-text { font-weight: 600; }
.bell-meta { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.bell-empty { margin: 0; padding: 20px 16px; text-align: center; }
.bell-more { padding: 8px 16px 12px; }
.bell-foot { padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12.5px; }
.bell-panel .state { margin: 12px; }
@media (min-width: 761px) and (max-width: 1100px) {
  /* the rail: the bell under the logo, both centred (a column would stretch the brand and push its logo to the left).
     (2026-11-21, the fix round, NP3) flex: none: the column of the full-height sidebar shrank this row and cut the logo 5 px
     at the top of the screen; the nav below, which scrolls, takes the shrink */
  .sb-top { flex-direction: column; align-items: center; gap: 8px; flex: none; }
  .bell-panel { left: calc(var(--rail-w) + 8px); width: min(420px, calc(100vw - var(--rail-w) - 24px)); }
}
@media (max-width: 760px) {
  .sb-top .bell-btn { display: none; }
  .bell-panel { top: calc(var(--mb-h) + 6px); left: 8px; right: 8px; width: auto; max-height: calc(100vh - var(--mb-h) - 92px - env(safe-area-inset-bottom, 0px)); }
  .bell-tab { height: 40px; padding: 0 14px; }
  .bell-foot a { display: inline-block; padding: 8px 0; }
}

/* ===== 12q. A session watched live (2026-11-15, CONTRACT.md 6.30, R-0284) =====
   #/session/<id> (app.js LiveView): the header (the title, the sessions lane's state chip, where it runs, running for and
   its tokens), NOW in large type, the requests waiting (12n's own cards), the to-do list, the timeline in its own box
   (the operator's messages on a paler paper to the right, Claude's on the left, a run of tool calls a grey line that opens
   to its steps), then 12n's own session row for an instruction and a stop. Mist: grey chrome, cards on the paper; purple
   only as a FILL (the Now box's edge while the session waits, a doing to-do's mark, 12n's primary buttons and 12m's
   Waiting chip), never as ink. At phone width (the operator's Android phone is this page's main screen) everything is
   one column, nothing scrolls sideways, and every control is at least 44 px tall. */
.lv-head { align-items: flex-start; }
.lv-ht { min-width: 0; flex: 1 1 360px; }
.lv-ht h1 { overflow-wrap: anywhere; }
.lv-ht .sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.lv-why { color: var(--text-2); overflow-wrap: anywhere; }
/* (2026-11-15, RULINGS.txt 13:35 UTC) an idle session's chip: the text's own colour, the idle dot (never the accent).
   (Corrected 2026-11-16, r284/int, the merge of lane sessions2) its look is 12u's .ses-chip.idle, the same on every page:
   a hairline ring and a HOLLOW dot, so Idle never reads as Closed's filled grey dot; this block's filled dot is gone. */
.lv-where { color: var(--muted); overflow-wrap: anywhere; min-width: 0; }
.lv-facts { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.lv-head .head-actions .ico { width: 15px; height: 15px; }
.lv-state:empty { display: none; }
.lv-body { display: flex; flex-direction: column; gap: var(--s5); max-width: 1000px; min-width: 0; }
.lv-body h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 var(--s3); font-size: 16px; }
.lv-now { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.lv-now.wait { box-shadow: inset 4px 0 0 var(--accent), var(--shadow); }
.lv-now.quiet { background: var(--surface-2); box-shadow: none; }
.lv-now-k { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.lv-now-w { font-family: var(--display); font-size: 20px; line-height: 1.3; font-weight: 650; color: var(--text); overflow-wrap: anywhere; }
.lv-now-d { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; white-space: pre-wrap; }
.lv-now-t { font-variant-numeric: tabular-nums; }
.lv-wait { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.lv-wait h2 { margin: 0; }
.lv-todos { min-width: 0; padding: 12px var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.lv-todos h2 { margin-bottom: 8px; }
.lv-todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lv-td { display: flex; align-items: flex-start; gap: 10px; min-width: 0; font-size: 13.5px; line-height: 1.45; }
.lv-td-t { min-width: 0; overflow-wrap: anywhere; }
.lv-td-mark { flex: none; width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; border: 2px solid var(--border-strong); box-sizing: border-box; }
.lv-td.doing .lv-td-mark { border-color: var(--accent); background: var(--accent); }
.lv-td.doing .lv-td-t { font-weight: 650; }
.lv-td.done .lv-td-mark { border-color: var(--ok); background: var(--ok); }
.lv-td.done .lv-td-t { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.lv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lv-tl { position: relative; min-width: 0; }
.lv-scroll { max-height: min(62vh, 760px); overflow-y: auto; overflow-x: hidden; padding: 4px 2px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); overscroll-behavior: contain; }
.lv-line { list-style: none; margin: 0; padding: 8px 0; display: flex; flex-direction: column; gap: 10px; }
.lv-msg { min-width: 0; max-width: 860px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.lv-user { align-self: flex-end; width: fit-content; max-width: min(780px, 100%); margin-left: 48px; background: var(--surface-2); }
.lv-peer { border-style: dashed; }
.lv-mh { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.lv-who { font-weight: 700; color: var(--text-2); }
.lv-tag { font-size: 11px; line-height: 18px; }
.lv-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.55; color: var(--text); }
.lv-cut { margin-top: 6px; }
.lv-run { min-width: 0; padding: 0 14px; }
.lv-run-b { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; max-width: 100%; min-height: 30px; padding: 2px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--chip); color: var(--text-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; text-align: left; }
.lv-run-b:disabled { cursor: default; }
.lv-run-b .ico { width: 14px; height: 14px; color: var(--muted); }
.lv-run-w { min-width: 0; overflow-wrap: anywhere; }
.lv-run.open .lv-run-b { background: var(--surface-3); }
.lv-steps { margin: 6px 0 0; padding: 0 0 0 22px; display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-2); }
.lv-steps li { overflow-wrap: anywhere; }
.lv-t { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lv-none { padding: 6px 14px; font-size: 13px; }
.lv-jump { position: sticky; bottom: 8px; display: flex; margin: 8px auto 0; box-shadow: var(--shadow-md); }
.lv-act { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.lv-act h2 { margin: 0; }
.lv-act .rem-ses { border-top: 0; padding-top: 0; }
.lv-act .rem-ses-head { display: none; }   /* the page's own header names the session already */
.lv-foot { overflow-wrap: anywhere; }
/* (2026-11-15, the fix round, I1 and I4) the PC the instructions go to and who reports it; a ring the server could not check */
.lv-to { overflow-wrap: anywhere; }
.lv-unverified { margin-top: 6px; overflow-wrap: anywhere; }
/* the "Watch live" link beside a session's state (12m, the Agents page) and in a session's head (12n, the Remote page) */
.ses-live { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; color: var(--text-2); font-size: 12px; font-weight: 600; text-decoration: none; }
.ses-live:hover { color: var(--text); text-decoration: underline; }
.ses-live .ico { width: 13px; height: 13px; }
@media (max-width: 760px) {
  .lv-user { margin-left: 0; }
  .lv-msg { padding: 10px 12px; }
  .lv-run { padding: 0 2px; }
  .lv-now-w { font-size: 18px; }
  .lv-scroll { max-height: 58vh; }
  .lv-run-b, .lv-jump, .lv-head .head-actions .btn { min-height: 44px; }
  .ses-live { min-height: 44px; }
  .lv-head .head-actions { width: 100%; }
  .lv-head .head-actions .btn { flex: 1 1 auto; }
  /* (2026-11-15, RULINGS.txt 13:27 UTC: touch targets of at least 44 px, found at 360 px by tests/shots.cjs) 12n's own card
     and session row as drawn on THIS page: their buttons, fields and options at least 44 px tall (12n's page keeps its own) */
  .lv-body .btn, .lv-body .input, .lv-body select { min-height: 44px; }
  .lv-body .rem-opt, .lv-body .rem-check, .lv-body label.check { min-height: 44px; align-items: center; }
  /* (r284/int, 2026-11-15, the merge of lane live) "Jump to the newest" is sticky to the WINDOW's bottom while the timeline
     runs past it, and at this width lane phone's bottom tabs (12p, fixed, about 61 px and the gesture area) cover that
     edge: it stops above them, as 12p moves the toasts and the g hint up */
  body.signed-in .lv-jump { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}

/* ===== 12r. More control: Allow for a while, Trust this session, saved instructions (2026-11-15, CONTRACT.md 6.31, R-0284) =====
   The Remote page's "Allow for" row and its confirmation (the words of the rule before it is sent), a session's trust
   (its badge wears the warning look, a lowered guard, never the accent), the saved instructions' chips under every
   instruction box and their list, a PC's temporary rules with their state, and the note for rules a PC keeps to itself.
   Mist: grey chrome; purple only as the confirm buttons' fill (.btn.primary). At phone width every row wraps and every new
   button and chip is at least 44 px tall (the operator's Android phone is this round's main screen). */
.rem-for, .rem-trust-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; font-size: 13px; }
.rem-for-label { color: var(--text-2); font-size: 12.5px; }
.rem-for-btn.on { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); }
.rem-for-wrap, .rem-trust-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rem-for-confirm { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.rem-for-words { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.rem-for-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.rem-for-no { overflow-wrap: anywhere; }
.rem-mono { padding: 0 4px; font-family: var(--mono); font-size: 12.5px; background: var(--surface-3); border-radius: 4px; overflow-wrap: anywhere; }
.rem-trust { display: inline-flex; align-items: center; gap: 4px; color: var(--text); background: var(--warn-bg, var(--surface-2)); border: 1px solid var(--warn-border, var(--border-strong)); }
.rem-trust .ico { width: 13px; height: 13px; }
.rem-trust.wait, .rem-trust.ending { color: var(--text-2); background: var(--surface-2); }
.rem-saved-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.rem-saved-chips:empty { display: none; }
.rem-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rem-saved-sub { margin: 0; }
.rem-saved-list, .rem-saved-edit { display: flex; flex-direction: column; margin: 0; padding-left: 1.4em; min-width: 0; }
.rem-saved-list { gap: 4px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rem-saved-edit { gap: 10px; }
.rem-saved-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rem-saved-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.rem-temps { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rem-temps-h { font-size: 13px; }
.rem-temp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; font-size: 12.5px; color: var(--text-2); }
.rem-temp-what { min-width: 0; overflow-wrap: anywhere; }
.rem-temp-st.on { color: var(--text); background: var(--warn-bg, var(--surface-2)); border: 1px solid var(--warn-border, var(--border-strong)); }
@media (max-width: 760px) {
  /* (2026-11-15, the fix round, S5) and 44 px WIDE too: "2 h" measured 39 px and the move buttons 28 px at 360 to 412 px */
  .rem-for .btn, .rem-for-acts .btn, .rem-trust-row .btn, .rem-chip, .rem-saved-btns .btn, .rem-saved .rem-act .btn { min-height: 44px; min-width: 44px; }
  .rem-for-acts .btn { flex: 1 1 auto; }
}

/* ===== 12u. Sessions by project, and a "Waiting for you" that is true (2026-11-15, CONTRACT.md 6.35, R-0284) =====
   An IDLE session (its turn ended, a new one, an interrupt) wears a quiet chip: no fill, a hairline ring, and a hollow
   ring for its dot, so it never reads as "Waiting for you" (the accent fill, 12m) nor as Closed (a grey dot). The Remote
   page groups each PC's sessions by project: a small head (the project's name and its counts) over its rows, with a
   hairline between projects. Mist: grey chrome; purple only as a fill. Nothing here is wider than its column at 360 px. */
.ses-chip.idle { background: transparent; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.ses-chip.idle .dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--idle); }
/* (2026-11-15, the third builder, main's ruling of 19:15 UTC: "separate between really waiting for my inputs and just a
   message output") a FINISHED turn: the neutral chip's grey fill (never the accent's), and a check mark for its dot (two
   borders of a rotated box), so it reads apart from Waiting for you (the accent fill) and from Idle (a hairline ring). */
.ses-chip.fin { color: var(--text-2); }
.ses-chip.fin .dot { width: 4px; height: 8px; margin: 0 2px 2px 1px; border-radius: 0; background: transparent; border: solid var(--text-2); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.rem-proj { display: flex; flex-direction: column; min-width: 0; padding-top: 4px; }
.rem-proj + .rem-proj { margin-top: 6px; border-top: 1px dashed var(--border); }
.rem-proj-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; padding: 8px 0 2px; }
.rem-proj-head h4 { margin: 0; font-size: 13.5px; font-weight: 700; overflow-wrap: anywhere; }
.rem-proj-head .muted { overflow-wrap: anywhere; }

/* ===== 12u. Claude accounts: global, the live switch and every account's usage (2026-11-15, CONTRACT.md 6.37, R-0284) =====
   The kind chip, the "Global" badge (the accent as a FILL, white text), the usage windows with a thin bar (the accent fill,
   amber from 80%, red from 95%), "Make it global" and its step-up box. Phone width: the window rows wrap; the buttons get
   44 px touch targets from the rule at the end of this block (corrected 2026-11-16: the page's .btn.sm is 28 px). */
.acl-order { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.acl-order .btn.on { background: var(--accent-soft); border-color: var(--accent); }
.acl-block { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border, rgba(110, 107, 120, .3)); display: flex; flex-direction: column; gap: 6px; }
.acl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.acl-global { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; }
.acl-kind { font-size: 12px; }
.acl-wins { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.acl-win { display: grid; grid-template-columns: minmax(84px, max-content) minmax(60px, 1fr) max-content; gap: 2px 8px; align-items: center; font-size: 13px; }
.acl-wl { overflow-wrap: anywhere; }
.acl-wr { grid-column: 1 / -1; }
.acl-bar { position: relative; display: block; height: 6px; border-radius: 3px; background: var(--accent-soft); overflow: hidden; }
.acl-bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); }
.acl-win.warn .acl-bar > i { background: var(--warn); }
.acl-win.bad .acl-bar > i { background: var(--bad); }
.acl-actions { margin-top: 2px; }
.acl-pw { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 8px; background: var(--warn-bg); border: 1px solid var(--warn-border); }
.acl-pw .input { max-width: 260px; }
.acl-status { color: var(--text-2); overflow-wrap: anywhere; }
/* (2026-11-16, the fix round, S5, I1/I6, S13) "Make it global" asked in the card, with the workspaces that have their own
   account listed and "Clear their choices"; why the button cannot be used now; every button and the box 44 px at phone
   width (the page's .btn.sm is 28 px: the 12u comment said "the page's own .btn rule", which gives none) */
.acl-confirm { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 8px; background: var(--accent-soft); border: 1px solid var(--border, rgba(110, 107, 120, .3)); }
.acl-confirm p { margin: 0; }
.acl-keepers { margin: 0; padding-left: 18px; overflow-wrap: anywhere; }
.acl-check { display: inline-flex; align-items: center; gap: 6px; }
.acl-why { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .acl-win { grid-template-columns: minmax(70px, max-content) 1fr max-content; }
  .acl-order .btn, .acl-actions .btn, .acl-confirm .btn, .acl-pw .btn { min-height: 44px; }
  .acl-check { min-height: 44px; }
  .acl-check input { width: 22px; height: 22px; }
}

/* ===== 12v. The automatic switch never left without a target (2026-11-18, CONTRACT.md 6.40 D, R-0006) =====
   The banner on a PC's section of the Claude accounts page (the page's own .notice, amber with .warn once the global
   account's week is at or above the PC's warning level) and the chip on an account that needs one sign-in before the
   automatic switch can use it (amber as a soft FILL with the text's own ink: purple is never ink). Both wrap at 360 px:
   the chip is not the page's one-line .chip (white-space: nowrap there), and nothing here is a target to touch. */
.accw-banner { align-items: flex-start; }
.accw-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.accw-body p { margin: 0; overflow-wrap: anywhere; }
.accw-list { margin: 2px 0 0; padding-left: 18px; overflow-wrap: anywhere; }
.accw-list li + li { margin-top: 2px; }
.accw-stale { color: var(--text-2); }
.accw-chip { align-self: flex-start; max-width: 100%; margin: 6px 0 2px; padding: 2px 10px; border-radius: 12px; background: var(--warn-bg); box-shadow: inset 0 0 0 1px var(--warn-border); color: var(--text); font-size: 12px; font-weight: 600; line-height: 18px; white-space: normal; overflow-wrap: anywhere; }
