/*
 * Jarvis: the app's stylesheet (requirements/ui/*.md), in parts linked in this order (index.html): app.css (tokens,
 * base elements, round 1's components), shell.css, layouts.css (and e-ink), additions.css, work.css. "This file"
 * below means them all, read in that order (test/fixtures/css.ts).
 * Layout: one shell (.app-frame, a size container) laid out phone-first;
 * @container shell queries add the tablet rail, the desktop sidebar and wide columns.
 * E-ink is a display mode over any layout: tokens and a few rules late in this file.
 * Order: tokens → base elements → components (the app's own classes) → shell and
 * layouts → container queries → e-ink → each area's additions (last, so they win).
 *
 * Whose rules: every section header names its area, "/* ---- <area>: what ---- *\/":
 * foundation and shell (tokens, base, tabs, badges, pages, the popover, toasts, header, sidebar, rail,
 * bottom bar, palette), chat, projects, settings, notepad, shared (rules of several areas by size or
 * e-ink). An area changes the rules under its own headers; what it adds goes into its section of
 * "additions" at the end of the file, where it wins over the layouts and e-ink rules above.
 * Colours only from the tokens on :root (no hex outside them).
 */
/* Anything marked hidden stays hidden, whatever display a class sets. */
[hidden] { display: none !important; }

/* ---- tokens: colour (light) ---- */
:root {
  --bg: #f4f9fa; --surface: #ffffff; --surface-sunken: #ebf2f4; --surface-hover: #e2ebee; --surface-raised: #ffffff;
  --line: #d7e1e4; --line-strong: #b5c4ca; --line-input: #808f96;
  --ink: #111c24; --ink-2: #38444d; --muted: #59656d;
  --accent: #007297; --accent-strong: #005b7c; --accent-ink: #ffffff; --accent-soft: #d8f2fb;
  --user-bg: #d4eff9;
  --ok: #21763c; --ok-soft: #dff6e2;
  --warn: #945a00; --warn-fill: #c68206; --warn-soft: #fdefd2;
  --err: #b1322a; --err-soft: #ffeae8;
  --star: #c38300; --violet: #6b4fc8; --violet-soft: #ece7fb; --teal: #2a8a80; --pink: #c2418f; --brown: #8a5a2b;
  /* An artifact's page is drawn as it would be on its own: on white, in a dark theme too. */
  --frame-bg: #ffffff;
  --focus: var(--accent);
  --sel-bg: var(--accent-soft); --sel-ink: var(--accent-strong);
  --primary-bg: var(--accent); --primary-ink: var(--accent-ink); --primary-hover: var(--accent-strong);
  --scrim: rgb(17 28 36 / .32);
  --shadow-color: rgb(17 28 36 / .10);
  --shadow-2: 0 4px 16px rgb(17 28 36 / .12), 0 1px 3px rgb(17 28 36 / .08);
  --shadow-3: 0 16px 48px rgb(17 28 36 / .22);
  --mark: #b9e6f5; --grid-dot: #c3ced3; --qr-bg: #ffffff;
  /* Diffs in JetBrains' colours (IntelliJ Light): added green, removed grey; the changed part stronger. */
  --diff-add: #d5f2dc; --diff-add-part: #a6dfb3; --diff-del: #e6e6e6; --diff-del-part: #c9c9c9; --diff-plus: #2f8a3f; --diff-minus: #8c8c8c;
  /* Notepad colours (public/js/notepad.js): pens, then highlighters. */
  --pad-red: #d62828; --pad-blue: #1d4ed8; --pad-green: #15803d; --pad-orange: #ea580c; --pad-purple: #7c3aed; --pad-grey: #6b7280;
  --pad-hl-yellow: #facc15; --pad-hl-green: #4ade80; --pad-hl-pink: #f472b6; --pad-hl-blue: #60a5fa; --pad-hl-orange: #fb923c;
  /* The status dot's glow: the one place (with .primary in dark) that still glows. */
  --glow: 0 0 0 3px var(--accent-soft); --glow-strong: none;
  /* Old names, kept while JS and CSS still use them. */
  --panel: var(--surface); --tool-bg: var(--surface-sunken); --online: var(--ok);

  /* ---- tokens: type, space, shape, motion ---- */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --font-eink: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, "DejaVu Sans", sans-serif;
  --text-2xs: 11px; --text-xs: 12px; --text-sm: 13px; --text-sm2: 14px; --text-md: 15px; --text-lg: 17px; --text-xl: 20px; --text-2xl: 24px;
  --fs-small: 12px; --lh: 1.6;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-14: 56px;
  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 18px; --r-full: 999px;
  --radius: var(--r-lg);
  --bw: 1px; --focus-w: 2px;
  --dur-fast: 120ms; --dur: 200ms; --ease: cubic-bezier(.2, 0, 0, 1);
  /* Layers, low to high: sticky bars in a page, the header, the bottom bar, floating bars (update, e-ink paging),
     the Work item's panel, the scrim, the drawer, sheets and popovers, the sign-in. Nothing in a page goes above --z-sticky + 1. */
  --z-sticky: 3; --z-header: 5; --z-bottom: 6; --z-float: 7; --z-panel: 8; --z-drawer: 10; --z-sheet: 60; --z-auth: 1000;
  /* Safe areas, one place. */
  /* The browser's safe areas, or those Jarvis's Android app tells its WebView (--app-inset-*: drawn edge to edge). */
  --safe-top: max(env(safe-area-inset-top, 0px), var(--app-inset-top, 0px)); --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--app-inset-bottom, 0px));
  --safe-left: max(env(safe-area-inset-left, 0px), var(--app-inset-left, 0px)); --safe-right: max(env(safe-area-inset-right, 0px), var(--app-inset-right, 0px));
  color-scheme: light;
}
/* ---- tokens: colour (dark), for the system's dark mode and for data-theme="dark" ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070d12; --surface: #0d151a; --surface-sunken: #04080c; --surface-hover: #172229; --surface-raised: #141e24;
    --line: #202a32; --line-strong: #35424a; --line-input: #586770;
    --ink: #e4ebee; --ink-2: #bdc6ca; --muted: #8e9ba1;
    --accent: #39d0fc; --accent-strong: #75e2ff; --accent-ink: #02111b; --accent-soft: #092b38;
    --user-bg: #0a303f;
    --ok: #61cb7c; --ok-soft: #132a1b; --warn: #e9b452; --warn-fill: #e9b452; --warn-soft: #31240e;
    --err: #f47c6e; --err-soft: #3b1c1a; --star: #f0bb3b; --violet: #b29cff; --violet-soft: #221a3d; --teal: #4fc0b3; --pink: #f08cc8; --brown: #d0a070;
    --scrim: rgb(0 0 0 / .55); --shadow-color: rgb(0 0 0 / .4);
    --shadow-2: 0 8px 24px rgb(0 0 0 / .5); --shadow-3: 0 16px 48px rgb(0 0 0 / .6);
    --mark: #0f4a5e; --grid-dot: #26323a; --qr-bg: #ffffff;
    --glow: 0 0 0 3px var(--accent-soft), 0 0 12px rgb(57 208 252 / .35); --glow-strong: 0 0 16px rgb(57 208 252 / .35);
    --diff-add: #294436; --diff-add-part: #3d6b4d; --diff-del: #484a4a; --diff-del-part: #63666a; --diff-plus: #6a9e5d; --diff-minus: #9a9da1;
    --pad-red: #ff6b6b; --pad-blue: #6ea8ff; --pad-green: #4ade80; --pad-orange: #fb923c; --pad-purple: #b794ff; --pad-grey: #9ca3af;
    --pad-hl-yellow: #fde047; --pad-hl-green: #86efac; --pad-hl-pink: #f9a8d4; --pad-hl-blue: #93c5fd; --pad-hl-orange: #fdba74;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070d12; --surface: #0d151a; --surface-sunken: #04080c; --surface-hover: #172229; --surface-raised: #141e24;
  --line: #202a32; --line-strong: #35424a; --line-input: #586770;
  --ink: #e4ebee; --ink-2: #bdc6ca; --muted: #8e9ba1;
  --accent: #39d0fc; --accent-strong: #75e2ff; --accent-ink: #02111b; --accent-soft: #092b38;
  --user-bg: #0a303f;
  --ok: #61cb7c; --ok-soft: #132a1b; --warn: #e9b452; --warn-fill: #e9b452; --warn-soft: #31240e;
  --err: #f47c6e; --err-soft: #3b1c1a; --star: #f0bb3b; --violet: #b29cff; --violet-soft: #221a3d; --teal: #4fc0b3; --pink: #f08cc8; --brown: #d0a070;
  --scrim: rgb(0 0 0 / .55); --shadow-color: rgb(0 0 0 / .4);
  --shadow-2: 0 8px 24px rgb(0 0 0 / .5); --shadow-3: 0 16px 48px rgb(0 0 0 / .6);
  --mark: #0f4a5e; --grid-dot: #26323a; --qr-bg: #ffffff;
  --glow: 0 0 0 3px var(--accent-soft), 0 0 12px rgb(57 208 252 / .35); --glow-strong: 0 0 16px rgb(57 208 252 / .35);
  --diff-add: #294436; --diff-add-part: #3d6b4d; --diff-del: #484a4a; --diff-del-part: #63666a; --diff-plus: #6a9e5d; --diff-minus: #9a9da1;
  --pad-red: #ff6b6b; --pad-blue: #6ea8ff; --pad-green: #4ade80; --pad-orange: #fb923c; --pad-purple: #b794ff; --pad-grey: #9ca3af;
  --pad-hl-yellow: #fde047; --pad-hl-green: #86efac; --pad-hl-pink: #f9a8d4; --pad-hl-blue: #93c5fd; --pad-hl-orange: #fdba74;
  color-scheme: dark;
}

/* ---- tokens: density, by pointer (not by width) ---- */
.app-frame {
  --tap: 32px; --tap-sm: 28px; --tap-gap: 4px; --control-h: 32px; --control-h-sm: 26px; --row-h: 36px; --input-fs: var(--text-md);
  --reveal: 0; /* opacity of what shows on hover only */
  /* Layout tokens: the @container shell queries change them on .app (a container query never matches its container). */
  --header-h: 52px; --bottom-h: 56px; --rail-w: 72px; --side-w: 280px; --gutter: 16px;
  --chat-max: 100%; --log-pad: 12px; --inner-max: none; --icon-stroke: 1.8;
  /* A page's padding at its top and bottom (.page-view sets them): sticky bars offset by them. 0 outside a page. */
  --page-pad-top: 0px; --page-pad-bottom: 0px;
}
/* Touch: every target 44 px (WCAG 2.5.5); a compact look stays where a ::after widens the hit area. */
@media (pointer: coarse) {
  .app-frame { --tap: 44px; --tap-sm: 44px; --tap-gap: 8px; --control-h: 44px; --control-h-sm: 44px; --row-h: 44px; --input-fs: 16px; }
}
@media (hover: none) { .app-frame { --reveal: 1; } }

/* ---- foundation: base elements ---- */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/var(--lh) var(--font-sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
@media (pointer: coarse) { body { font-size: 16px; } }
:where(h1, h2, h3, h4) { text-wrap: balance; }
:where(a, button, [tabindex], summary, select, input, textarea):focus-visible { outline: var(--focus-w) solid var(--focus); outline-offset: 2px; }
::selection { background: var(--mark); color: var(--ink); }
code, kbd, pre, samp { font-family: var(--font-mono); }
kbd { font-size: var(--text-2xs); padding: 1px 5px; border: 1px solid var(--line-strong); border-radius: var(--r-xs); color: var(--muted); background: var(--surface); }
.spacer, .grow { flex: 1; }

/* Element rules skip Monaco (the Code page's editor): it styles its own hidden textarea and widgets. */
button:where(:not(.monaco-editor *)) {
  font: inherit; font-size: var(--text-sm); font-weight: 500; line-height: 1.2; color: var(--ink);
  background: var(--surface); border: var(--bw) solid var(--line-strong); border-radius: var(--r-md);
  min-height: var(--control-h); padding: 0 14px; cursor: pointer;
  transition: color var(--dur-fast), background-color var(--dur-fast), border-color var(--dur-fast);
}
@media (hover: hover) {
  button:where(:not(.monaco-editor *)):hover:not(:disabled) { background: var(--surface-hover); border-color: var(--line-strong); }
}
button:where(:not(.monaco-editor *)):active:not(:disabled) { background: var(--surface-hover); }
button:disabled { color: var(--muted); border-color: var(--line); cursor: not-allowed; }
button[aria-busy="true"]::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; margin-right: 6px; vertical-align: -2px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.primary, button.primary {
  background: var(--primary-bg); color: var(--primary-ink); border-color: var(--primary-bg); font-weight: 600;
}
@media (hover: hover) { .primary:hover:not(:disabled), button.primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-ink); box-shadow: var(--glow-strong); } }
.primary:disabled { background: var(--surface-sunken); border-color: var(--line); color: var(--muted); }
button.danger, .danger { color: var(--err); }
@media (hover: hover) { button.danger:hover:not(:disabled) { background: var(--err-soft); } }
/* Ghost: header icons, small actions. */
.icon-btn, button.icon-btn {
  border: none; background: none; color: var(--ink-2); min-width: var(--tap); min-height: var(--tap); padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; line-height: 1;
}
@media (hover: hover) { .icon-btn:hover:not(:disabled) { background: var(--surface-hover); color: var(--ink); } }
.ico, .icon-btn svg, .hbtn svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; }

/* Fields: the surface, a 3:1 border, the accent on focus. */
:where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file]), select, textarea):where(:not(.monaco-editor *)) {
  font: inherit; font-size: var(--input-fs); color: var(--ink); background: var(--surface);
  border: var(--bw) solid var(--line-input); border-radius: var(--r-md); min-height: var(--control-h); padding: 0 10px; max-width: 100%;
}
:where(textarea):where(:not(.monaco-editor *)) { padding: 8px 10px; line-height: 1.5; resize: vertical; }
:where(input, select, textarea):where(:not(.monaco-editor *)):focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); outline-offset: 0; }
:where(input[type=checkbox], input[type=radio], input[type=range]) { accent-color: var(--accent); }
:where(input[type=checkbox], input[type=radio]) { width: 18px; height: 18px; }
::placeholder { color: var(--muted); opacity: 1; }
/* The Conversations page. */
.conv-tools { display: flex; gap: 10px; margin: 16px 0 6px; flex-wrap: wrap; }
.conv-tools input { flex: 1; min-width: 200px; }
.conv-section { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.conv-section > h2 { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: var(--text-sm); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.conv-section > h2 .count { font-size: var(--text-2xs); font-weight: 600; background: var(--tool-bg); border-radius: 10px; padding: 1px 7px; letter-spacing: 0; }
.conv-card { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; transition: border-color .15s; }
.conv-card:hover { border-color: var(--accent); }
.conv-card .conv-star { opacity: 1; font-size: 18px; line-height: 1; padding: 2px 2px 0; }
.conv-card .body { min-width: 0; }
.conv-card .name { font-size: 15px; font-weight: 600; font-family: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-card .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--text-xs); color: var(--muted); margin-top: 3px; }
.conv-card .preview { font-size: var(--text-sm); color: var(--muted); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.conv-card .acts { display: flex; gap: 6px; }
.conv-card .acts button { font-size: var(--text-xs); padding: 3px 10px; }
@container shell (width < 600px) { .conv-card { grid-template-columns: auto 1fr; } .conv-card .acts { grid-column: 1 / -1; justify-content: flex-end; } }
/* Element rules skip Monaco (the Code page's editor): it styles its own hidden textarea and widgets. */
/* Markdown (render in markdown.js): chat bubbles, notifications, the editor's agent. */
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md blockquote, .md pre, .md .md-table, .md hr { margin: 0 0 .7em; }
.md h1, .md h2, .md h3, .md h4, .md h5, .md h6 { margin: 1em 0 .4em; line-height: 1.3; }
.md h1 { font-size: 1.3em; } .md h2 { font-size: 1.18em; } .md h3 { font-size: 1.06em; }
.md h4, .md h5, .md h6 { font-size: 1em; }
.md ul, .md ol { padding-left: 1.5em; }
.md li > ul, .md li > ol { margin: .2em 0 0; }
.md li + li { margin-top: .2em; }
.md li.task { list-style: none; margin-left: -1.3em; }
.md li.task input { margin: 0 .35em 0 0; vertical-align: -1px; }
.md blockquote { padding: 2px 0 2px 12px; border-left: 3px solid var(--line); color: var(--muted); }
.md pre { white-space: pre; }
/* A code block: its language and Copy above the code (coloured by Monaco, markdown.js). */
.md .code-block { margin: 0 0 .7em; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.md .code-block > pre { margin: 0; border-radius: 0; }
.md .code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 6px 3px 10px; background: var(--tool-bg); border-bottom: 1px solid var(--line); font-size: var(--text-2xs); color: var(--muted); }
.md .code-copy { padding: 1px 8px; font-size: var(--text-2xs); }
.md pre code[data-coloured] { font-variant-ligatures: none; }
/* A quick artifact (markdown.js): a page, drawing or document shown rendered, its source behind Source. */
.md .artifact { margin: 0 0 .7em; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.md .artifact-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 6px 3px 10px; background: var(--tool-bg); border-bottom: 1px solid var(--line); font-size: var(--text-2xs); color: var(--muted); }
.md .artifact-name { font-weight: 600; overflow-wrap: anywhere; }
.md .artifact-acts { display: flex; gap: 4px; flex: none; }
.md .artifact-acts button { padding: 1px 8px; font-size: var(--text-2xs); }
.md .artifact-body { background: var(--surface); }
.md .artifact-frame { display: block; width: 100%; height: 60cqh; max-height: 60vh; border: 0; background: var(--frame-bg); }
.md .artifact-doc { padding: 10px 12px; max-height: 60vh; overflow-y: auto; }
.md .artifact > pre { margin: 0; border-radius: 0; }
/* While it streams (no closing fence yet) only its source shows; afterwards the preview, until Source. */
.md .artifact:not([data-open]):not([data-view="source"]) > .artifact-code { display: none; }
.md .artifact[data-open] > .artifact-body, .md .artifact[data-view="source"] > .artifact-body { display: none; }
.md .artifact[data-open] .artifact-acts { visibility: hidden; }
/* Full screen (⤢): over the whole app, closed by ✕, Escape, the scrim and Back. */
.artifact-full { position: fixed; inset: 0; z-index: calc(var(--z-sheet) + 1); background: var(--scrim); display: flex; flex-direction: column; padding: max(12px, var(--safe-top)) 12px calc(12px + var(--safe-bottom)); gap: 0; }
.artifact-full .artifact-head { border: 1px solid var(--line); border-radius: 8px 8px 0 0; background: var(--surface); font-size: var(--text-sm); padding: 6px 8px 6px 12px; }
.artifact-full .artifact-name { font-weight: 600; }
.artifact-full .artifact-close { padding: 1px 10px; }
.artifact-full :is(.artifact-frame, .artifact-doc) { flex: 1; width: 100%; max-height: none; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; background: var(--surface); overflow-y: auto; }
.artifact-full .artifact-frame { background: var(--frame-bg); }
/* A diff (markdown.js), as CLion shows one: per file its name and counts, old and new line numbers, lines tinted. */
.md .diff-file { display: flex; align-items: center; gap: 10px; padding: 4px 10px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: var(--text-xs); }
.md .diff-name { font-family: var(--font-mono); font-weight: 600; overflow-wrap: anywhere; }
.md .diff-stat { display: flex; gap: 6px; font-size: var(--text-2xs); }
.md .diff-plus { color: var(--diff-plus); }
.md .diff-minus { color: var(--diff-minus); }
.md .diff-scroll { overflow-x: auto; background: var(--tool-bg); }
.md .diff-scroll + .diff-file { border-top: 1px solid var(--line); }
.md .diff-table { border-collapse: collapse; min-width: 100%; font-family: var(--font-mono); font-size: var(--text-sm); line-height: 1.45; }
.md .diff-table td { padding: 0 8px; border: none; vertical-align: top; }
.md .diff-table .ln { width: 1%; min-width: 2.5em; text-align: right; color: var(--muted); user-select: none; font-size: var(--text-xs); opacity: .8; }
.md .diff-table .ln + .ln { border-right: 1px solid var(--line); }
.md .diff-code { white-space: pre; }
.md .diff-add > td { background: var(--diff-add); }
.md .diff-del > td { background: var(--diff-del); }
.md .diff-add .diff-word { background: var(--diff-add-part); border-radius: 2px; }
.md .diff-del .diff-word { background: var(--diff-del-part); border-radius: 2px; }
/* Where a hunk starts, and notes ("No newline at end of file"): quiet separators. */
.md :is(.diff-hunk, .diff-note) > td { color: var(--muted); font-size: var(--text-xs); padding-top: 2px; padding-bottom: 2px; background: var(--surface-sunken); }
.md :not(pre) > code { background: var(--tool-bg); padding: 1px 5px; border-radius: 5px; }
.md hr { border: 0; border-top: 1px solid var(--line); }
.md a { color: var(--accent); }
.md .md-table { overflow-x: auto; }
.md table { border-collapse: collapse; font-size: .95em; }
.md th, .md td { border: 1px solid var(--line); padding: 5px 9px; text-align: left; vertical-align: top; }
.md th { background: var(--tool-bg); }
.md .al-center { text-align: center; } .md .al-right { text-align: right; }
.error .bubble { border-color: var(--err); color: var(--err); }
.note {
  font-size: var(--text-xs); color: var(--muted); text-align: center;
  border-top: 1px dashed var(--line); padding-top: 10px;
}
.banner {
  background: var(--tool-bg); border: 1px solid var(--accent);
  border-radius: var(--radius); padding: 10px 14px; font-size: var(--text-sm2);
}
.push-box { display: flex; flex-direction: column; gap: 8px; font-size: var(--text-sm); }
.push-box .state { color: var(--muted); }
.push-box .state strong { color: var(--ink); font-weight: 600; }
.push-box .btns { display: flex; gap: 6px; flex-wrap: wrap; }
.push-box .btns button { font-size: var(--text-xs); padding: 4px 10px; }
.settings { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.settings section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
/* The Agents page: an agent's form in place of its card, its parts one under another. */
.agent-form h3 { margin: 0; font-size: 16px; }
.agent-form .agent-part { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.agent-form .agent-part h4 { margin: 0; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.agent-form label.check-row { flex-direction: row; align-items: center; gap: 8px; }
.settings h3 { font-size: var(--text-sm2); margin: 0 0 10px; }
/* Signing in: covers the app until there's a session. */
.auth-screen { position: fixed; inset: 0; z-index: var(--z-auth); background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 16px; }
.auth-screen[hidden] { display: none; }
.auth-card { width: 100%; max-width: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.auth-card h2 { margin: 0; font-size: 20px; }
.auth-card label { font-size: var(--text-xs); color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.auth-card input { font: inherit; font-size: var(--input-fs); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.auth-card input:focus { outline: none; border-color: var(--accent); }
.auth-card .err { color: var(--err); font-size: var(--text-sm); min-height: 1em; }
.auth-card button { padding: 9px; }
/* What only an admin sees. */
body.role-user .admin-only { display: none !important; }
.user-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.user-list li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: var(--text-sm); }
.user-list .name { font-weight: 600; flex: 1; min-width: 120px; }
.user-list .meta { color: var(--muted); font-size: var(--text-xs); }
.user-list button { font-size: var(--text-xs); padding: 3px 8px; }
.user-list select { font-size: var(--input-fs); padding: 3px 8px; }
.settings h4 { margin: 8px 0 0; font-size: var(--text-sm); }
.plan-usage { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.limit-row { display: grid; grid-template-columns: minmax(140px, 220px) 1fr auto; gap: 10px; align-items: center; font-size: var(--text-sm); }
.limit-row .meter { height: 8px; border-radius: 4px; background: var(--tool-bg); overflow: hidden; }
.limit-row .meter > span { display: block; height: 100%; background: var(--accent); }
.limit-row.warning .meter > span { background: var(--warn-fill); }
.limit-row.critical .meter > span { background: var(--err); }
.limit-row .when { font-size: var(--text-xs); color: var(--muted); white-space: nowrap; }
@container shell (width < 600px) { .limit-row { grid-template-columns: 1fr auto; } .limit-row .meter { grid-column: 1 / -1; grid-row: 2; } }
.usage-head { display: flex; align-items: center; gap: 8px; }
.usage-head .tabs { flex: 1; margin-bottom: 0; }
.usage-head select { font: inherit; font-size: var(--text-sm); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; max-width: 220px; }
/* A provider's card (Settings → Agents → Providers): signing in, below its status. */
.provider-actions { margin-top: 8px; justify-content: flex-start; }
.provider-login { margin: 8px 0 0; }
/* A worker's card (Settings → Workers): its token once, its IDEs, a port to open, its hardware. */
.badge.off { background: var(--tool-bg); color: var(--err); }
.worker-token { margin: 8px 0; }
.worker-compose { font-size: var(--text-xs); background: var(--tool-bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; overflow-x: auto; white-space: pre; }
/* The work Jarvis gives a worker, each a checkbox. */
.worker-work { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 6px; font-size: var(--text-sm); }
.worker-work-item { display: inline-flex; align-items: center; gap: 4px; }
.worker-work-item input { accent-color: var(--accent); }
.worker-work-item.cannot { color: var(--muted); }
.worker-port-form { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.worker-port-form .worker-port { width: 140px; }
.worker-hardware h4 { margin: 10px 0 4px; font-size: var(--text-sm); }
.worker-hardware ul.plain, .worker-live ul.plain { list-style: none; padding: 0; margin: 0; font-size: var(--text-sm); display: flex; flex-direction: column; gap: 4px; }
.link-btn { background: none; border: none; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
/* A provider's card above the chart: its sign-in, model, last call, errors and 429s, a plan's limits over time. */
.usage-card { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.usage-card .usage-facts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--text-sm); }
.usage-card p { margin: 0; }
.usage-card .usage-trouble { color: var(--err); }
.limit-history svg { width: 100%; height: 70px; display: block; }
.limit-history polyline { fill: none; stroke-width: 1.5; }
.limit-history .top { stroke: var(--line); stroke-dasharray: 3 3; }
.limit-history .w-5h { stroke: var(--accent); fill: var(--accent); } .limit-history polyline.w-5h { fill: none; }
.limit-history .w-week { stroke: var(--violet); fill: var(--violet); } .limit-history polyline.w-week { fill: none; }
.limit-history .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.limit-history .sw.w-5h { background: var(--accent); } .limit-history .sw.w-week { background: var(--violet); }
.usage-chart svg { width: 100%; height: 180px; display: block; }
.usage-chart .in { fill: var(--accent); }
.usage-chart .out { fill: var(--violet); }
/* Cache in (written) and cache out (read) apart: an expensive write, cheap reads. */
.usage-chart .cache-in { fill: var(--teal); }
.usage-chart .cache-out { fill: var(--muted); opacity: .35; }
.usage-chart text { fill: var(--muted); font-size: var(--text-2xs); }
.usage-legend { display: flex; gap: 6px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.usage-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 6px; }
.usage-legend .sw.in { background: var(--accent); } .usage-legend .sw.out { background: var(--violet); }
.usage-legend .sw.cache-in { background: var(--teal); } .usage-legend .sw.cache-out { background: var(--muted); opacity: .35; }
.ollama-models { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.ollama-models h4 { margin: 0; font-size: var(--text-sm); }
/* The part drawn again while a model pulls (the pull form above it stays put). */
.ollama-body { display: flex; flex-direction: column; gap: 8px; }
.ollama-pull { display: flex; gap: 8px; }
.ollama-pull input { flex: 1; }
.ollama-pull-row { display: grid; grid-template-columns: minmax(0, 12em) 1fr minmax(0, 18em); gap: 8px; align-items: center; font-size: var(--text-xs); }
.ollama-pull-row progress { width: 100%; }
.model-table { display: flex; flex-direction: column; gap: 4px; font-size: var(--text-xs); overflow-x: auto; }
.model-row { display: grid; grid-template-columns: minmax(10em, 1fr) repeat(6, 5.6em) auto; gap: 8px; align-items: center; min-width: 640px; }
.model-row.head { color: var(--muted); font-weight: 600; }
.model-row .n { text-align: right; font-variant-numeric: tabular-nums; }
.model-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-row .actions { display: flex; gap: 4px; justify-content: flex-end; }
/* A bar takes a click (or Enter): its column behind the stack, marked while its turns are listed. */
.usage-chart g.bar { cursor: pointer; outline: none; }
.usage-chart .hit { fill: transparent; }
.usage-chart g.bar:hover .hit { fill: var(--surface-sunken); }
.usage-chart g.bar.sel .hit { fill: var(--accent-soft); }
.usage-chart g.bar:focus-visible .hit { stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.usage-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.usage-filter[hidden], .usage-turns[hidden] { display: none; }
.usage-turns { margin-top: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: var(--text-xs); }
.usage-turns-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.usage-turns-head .chip-x { border: none; background: none; min-height: var(--tap-sm); padding: 2px 8px; font-size: var(--text-sm); }
.usage-turn-list { display: flex; flex-direction: column; gap: 6px; }
.usage-turn { display: grid; grid-template-columns: 7em minmax(0, 1fr) 5em 5.5em; gap: 8px; align-items: baseline; }
.usage-turn .what { display: flex; flex-direction: column; min-width: 0; }
.usage-turn .what > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-turn .n { text-align: right; font-variant-numeric: tabular-nums; }
.usage-more { font-size: var(--text-xs); min-height: var(--tap-sm); }
.usage-breakdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr)); gap: 12px; margin-top: 10px; font-size: var(--text-xs); }
.usage-breakdown h5 { margin: 0; font-size: var(--text-xs); color: var(--muted); font-weight: 600; }
.usage-breakdown .usage-top-head { grid-column: 1 / -1; margin: 6px 0 0; font-size: var(--text-sm); }
.usage-breakdown div.r { display: grid; grid-template-columns: minmax(0, 1fr) repeat(8, 3.4em); gap: 6px; align-items: baseline; }
.usage-breakdown div.r.pick { cursor: pointer; border-radius: 4px; }
.usage-breakdown div.r.pick:hover, .usage-breakdown div.r.pick:focus-visible { background: var(--surface-sunken); }
.usage-breakdown div.r.on { font-weight: 600; }
.usage-breakdown div.r.on .name::before { content: "✓ "; }
.usage-breakdown div.r.head { margin-bottom: 4px; }
.usage-breakdown div.r.head .n { color: var(--muted); }
.usage-breakdown .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-breakdown .n { text-align: right; font-variant-numeric: tabular-nums; }
.settings .item-form { border: none; padding: 0; margin: 0; background: none; }
/* A provider's (and a voice service's) form stands in for its card in the list (as on the other pages): framed like them. */
.settings #provider-form, .settings #vs-form { border: 1px solid var(--accent); border-radius: var(--radius); padding: 14px; margin: 12px 0 0; background: var(--panel); }
.settings .hint-text { font-size: var(--text-xs); color: var(--muted); }
.settings .hint-text.warn-text { color: var(--err); }
.settings select {
  font: inherit; font-size: var(--text-sm2); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
}
.settings .ok { color: var(--accent); font-size: var(--text-sm); }
#integrations { margin-top: 18px; }
.audit-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 12px; }
.audit-filters select, .audit-filters input {
  font: inherit; font-size: var(--text-sm); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px;
}
.audit-filters input { flex: 1; min-width: 180px; }
.audit-filters input:focus, .audit-filters select:focus { outline: none; border-color: var(--accent); }
.audit-list { display: flex; flex-direction: column; gap: 6px; }
.audit-entry { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 14px; font-size: var(--text-sm); }
.audit-entry .line { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.audit-entry .when { color: var(--muted); font-size: var(--text-xs); min-width: 110px; }
.audit-entry .what { font-family: var(--font-mono); font-size: var(--text-xs); }
.audit-entry .who { color: var(--muted); font-size: var(--text-xs); margin-left: auto; }
.audit-entry .sum { color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-entry details { margin-top: 6px; }
.audit-entry summary { cursor: pointer; font-size: var(--text-xs); color: var(--muted); }
.project-devcontainer .dc-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 16px; }
.project-devcontainer .dc-status .badge { margin-right: 6px; }
.project-devcontainer .dc-log { background: var(--tool-bg); border-radius: 8px; padding: 10px; font-size: var(--text-xs); line-height: 1.45; white-space: pre-wrap; word-break: break-word; max-height: 65cqh; overflow: auto; margin: 6px 0 0; }
.project-devcontainer .dc-approve { border: 1px solid var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.project-devcontainer .dc-file summary { cursor: pointer; font-family: var(--mono, monospace); font-size: var(--text-sm); margin-top: 6px; }
.audit-entry pre { background: var(--tool-bg); border-radius: 8px; padding: 8px 10px; margin: 6px 0 0; font-size: var(--text-xs); white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; }
.badge.ok-badge { background: var(--accent-soft); color: var(--accent); }
.badge.err-badge { background: var(--err-soft); color: var(--err); }
#audit-more { margin: 12px auto 0; display: block; }
#audit-more[hidden] { display: none; }
.integration-group { display: flex; flex-direction: column; gap: 8px; }
/* Collapsed card: one line (name, type, state); everything else on click. */
.integration.collapsible > .head { cursor: pointer; user-select: none; }
.integration.collapsible > .head .chevron { width: 14px; flex-shrink: 0; color: var(--muted); transition: transform .15s; }
.integration.collapsible:not(.collapsed) > .head .chevron { transform: rotate(90deg); }
.integration.collapsed { padding: 10px 16px; }
.integration.collapsed > .integration-body { display: none; }
.integration-body { margin-top: 10px; }
.om-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 10px 0; }
.om-qr .code { width: min(280px, 70cqw); background: var(--qr-bg); padding: 10px; border-radius: 12px; }
.om-qr .code svg { display: block; width: 100%; height: auto; }
.om-qr .emoji { font-size: 64px; line-height: 1.1; }
.wf-section + .wf-section { margin-top: 24px; }
.wf-section-head { margin: 8px 0 2px; }
.om-log { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--muted); background: var(--tool-bg); border-radius: 8px; padding: 6px 8px; white-space: pre-wrap; max-height: 140px; overflow: auto; }
.om-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.remote-tools .remote-tool { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0; }
.integration-body .manage { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.integration-group + .integration-group { margin-top: 4px; }
.page-view .integration-group > h2 {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: var(--text-2xs); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600;
}
.page-view .integration-group > h2 .count { font-size: var(--text-2xs); font-weight: 600; color: var(--muted); background: var(--tool-bg); border-radius: 10px; padding: 1px 7px; letter-spacing: 0; }
.integration { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.integration .head { display: flex; align-items: center; gap: 10px; }
.integration .head h3 { margin: 0; font-size: 15px; flex: 1; }
.integration .head h3 .type-name { font-size: var(--text-xs); font-weight: 400; color: var(--muted); margin-left: 8px; }
.integration .head button { font-size: var(--text-xs); padding: 2px 9px; }
#integration-form { margin-bottom: 14px; }
#integrations-message:empty, #projects-message:empty { display: none; }
.integration .actions.manage { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
/* The projects overview: folders, as in a file browser; a form takes a whole row. */
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
/* Touch and e-ink: 44–48 px targets in the bands, so bigger squares keep room for the project. */
@media (pointer: coarse) { .folder-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
@container shell (width >= 600px) { :root[data-display^="eink"] .folder-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
.folder-grid > form, .folder-grid > .empty { grid-column: 1 / -1; }
/* A square in four bands, top to bottom: where it runs and its buttons, the project, what waits for the owner, its git. */
.folder-tile { position: relative; aspect-ratio: 1; display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 6px 10px 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; overflow: hidden; }
.folder-tile:hover, .folder-tile:focus-within { border-color: var(--line-strong); }
.folder-tile .folder-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 28px; flex: none; }
.folder-tile .folder-open { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink); text-decoration: none; }
/* Its buttons: Settings, and VS Code. */
.folder-tile .folder-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.folder-tile .folder-actions .icon-btn { padding: 4px; }
.folder-tile .folder-settings svg { width: 18px; height: 18px; display: block; fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
.folder-tile .folder-ide svg { width: 20px; height: 20px; display: block; }
.folder-tile .folder-work { position: relative; }
.folder-tile .folder-work svg { width: 18px; height: 18px; display: block; fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linejoin: round; }
/* Items waiting for the owner on its board: a small count on the icon's corner. */
.folder-tile .folder-work .count { position: absolute; top: 0; right: 0; min-width: 16px; padding: 0 4px; border-radius: var(--r-full); background: var(--warn); color: var(--surface); font-size: var(--text-2xs); font-weight: 600; line-height: 16px; font-variant-numeric: tabular-nums; }
.folder-tile .folder-ide:hover { transform: scale(1.12); }
/* What waits for the owner (needs, to review), else ＋ Task: one row, always in the same place. */
.folder-tile .folder-status { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap-sm); flex: none; }
.folder-tile .folder-slot { min-height: var(--tap-sm); padding: 0 10px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; font-size: var(--text-xs); color: var(--muted); text-decoration: none; white-space: nowrap; }
.folder-tile a.folder-slot:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.folder-tile .folder-slot.unused { visibility: hidden; }
/* The branch: the tile's bottom strip, to the project's git page. */
.folder-tile .folder-branch { flex: none; display: block; min-height: var(--tap-sm); line-height: calc(var(--tap-sm) - 12px); margin: 0 -10px; padding: 6px 10px; border-top: 1px solid var(--line); font-size: var(--text-xs); color: var(--muted); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder-tile .folder-branch:hover { color: var(--accent); background: var(--accent-soft); }
.folder-tile .folder-ico { flex: none; font-size: 32px; line-height: 1; }
.folder-tile .folder-ico .pi-img { width: 32px; height: 32px; }
.folder-tile .folder-name { max-width: 100%; font-size: var(--text-sm); font-weight: 600; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.folder-tile .folder-desc { max-width: 100%; font-size: var(--text-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Where it runs (a worker by its name), and the dot while an agent works on it. */
.folder-tile .folder-flags { display: flex; align-items: center; gap: 6px; min-width: 0; }
.folder-tile .folder-flags .badge { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The phone: two small squares a row. Settings and the editor down the right edge, one under the other, the rest beside
   them; ＋ Task left to opening it (only what needs the owner stays), the description to the tooltip; each band only
   when it has something. */
@container shell (width < 600px) {
  .folder-grid, :root[data-display^="eink"] .folder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .folder-tile { gap: 4px; padding: 4px calc(var(--tap) + 2px) 0 8px; }
  /* Down to the branch's strip: the buttons share that height (three of them don't fit 44 px each in a small square). */
  .folder-tile .folder-actions { position: absolute; top: 0; right: 0; bottom: max(var(--tap-sm), 28px); flex-direction: column; align-items: stretch; gap: 0; }
  .folder-tile .folder-actions .icon-btn { flex: 1 1 0; min-height: 0; max-height: var(--tap); padding: 0; }
  .folder-tile .folder-desc, .folder-tile .folder-slot:not(.needs) { display: none; }
  /* The head's box gone, not the head: its buttons stay, down the edge; where it runs only when there's something. */
  .folder-tile .folder-head { display: contents; }
  .folder-tile .folder-flags { min-height: 20px; }
  .folder-tile .folder-flags:empty { display: none; }
  .folder-tile .folder-status:not(:has(.needs, .folder-review:not([hidden]))) { display: none; }
  .folder-tile .folder-open { gap: 2px; }
  .folder-tile .folder-ico { font-size: 24px; }
  .folder-tile .folder-ico .pi-img { width: 24px; height: 24px; }
  .folder-tile .folder-branch { position: relative; margin: 0 calc(-1 * (var(--tap) + 2px)) 0 -8px; padding: 6px 8px; }
}
/* E-ink, at any width: the buttons down the right edge too, as on the phone (a row of them over the name was heavy). */
:root[data-display^="eink"] .folder-tile { padding-right: calc(var(--tap) + 2px); }
:root[data-display^="eink"] .folder-tile .folder-head { display: contents; }
:root[data-display^="eink"] .folder-tile .folder-flags { min-height: 20px; }
:root[data-display^="eink"] .folder-tile .folder-flags:empty { display: none; }
:root[data-display^="eink"] .folder-tile .folder-actions { position: absolute; top: 0; right: 0; bottom: max(var(--tap-sm), 28px); flex-direction: column; align-items: stretch; gap: 0; }
:root[data-display^="eink"] .folder-tile .folder-actions .icon-btn { flex: 1 1 0; min-height: 0; max-height: var(--tap); padding: 0; }
:root[data-display^="eink"] .folder-tile .folder-branch { position: relative; margin-right: calc(-1 * (var(--tap) + 2px)); }
:root[data-display^="eink"] .folder-tile .folder-actions .icon-btn svg { width: 28px; height: 28px; }
/* The project's icon bigger on its 260 px square (not on a narrow reader's small ones). */
@container shell (width >= 600px) {
  :root[data-display^="eink"] .folder-tile .folder-ico { font-size: 48px; }
  :root[data-display^="eink"] .folder-tile .folder-ico .pi-img { width: 48px; height: 48px; }
}
/* On a worker: green while it's connected, red while it isn't. */
.badge.remote.online { background: var(--ok-soft); color: var(--ok); }
.badge.remote.offline { background: var(--err-soft); color: var(--err); }
.folder-tile .busy { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: blink 1s step-end infinite; }
/* A project's git page: the branch bar, what changed, merging, the history as a graph. */
.git-branch select { font-weight: 600; }
#git-page button.danger { color: var(--err); }
#git-page .actions .spacer { flex: 1; }
#git-page button.danger:hover:not(:disabled) { border-color: var(--err); background: none; box-shadow: none; }
.git-files { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; max-height: 260px; overflow-y: auto; }
.git-file { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); color: var(--ink); }
.git-status { min-width: 30px; text-align: center; font-size: var(--text-2xs); color: var(--accent); }
.git-status.s-new, .git-status.s-A { color: var(--diff-plus); }
.git-status.s-D { color: var(--err); }
.git-branches { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }
.git-branch-row { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-top: 1px solid var(--line); font-size: var(--text-sm); }
.git-branch-row:first-child { border-top: none; }
.git-branch-row > .grow { flex: 1; min-width: 0; }
.git-branch-row .badge { margin-left: 8px; }
.git-branch-row button { font-size: var(--text-xs); padding: 3px 10px; }
.git-branch-row .hint-text { overflow-wrap: anywhere; }
.git-log { font-size: var(--text-xs); overflow-x: auto; margin-top: 8px; }
.git-log-row { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; line-height: 1.6; }
.git-graph { font-family: var(--font-mono); white-space: pre; color: var(--accent); }
.git-sha { color: var(--muted); }
.git-log-row .badge { font-size: var(--text-2xs); padding: 0 7px; }
.git-subject { color: var(--ink); }
.git-meta { color: var(--muted); }
.project-agent { margin-top: 10px; }
.project-agent .item-form { margin: 8px 0; }
.project-agent .run { margin-top: 8px; }
.item-form label.inline { flex-direction: row; align-items: center; gap: 6px; }
.item-form .group-members-field { gap: 6px; align-items: flex-start; }
.group-members { display: flex; flex-direction: column; gap: 6px; align-self: stretch; }
.group-member { display: flex; gap: 6px; align-items: center; }
.group-member input { flex: 1; min-width: 0; }
.item-form label.check { flex-direction: row; align-items: center; gap: 8px; font-size: var(--text-sm); color: var(--ink); }
.integration .desc { font-size: var(--text-sm); color: var(--muted); margin: 6px 0 12px; }
.integration ol { font-size: var(--text-sm); padding-left: 20px; margin: 8px 0 12px; display: flex; flex-direction: column; gap: 6px; }
.integration ol a { color: var(--accent); }
.copy-row { display: flex; gap: 6px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.copy-row code { background: var(--tool-bg); padding: 3px 7px; border-radius: 6px; font-size: var(--text-xs); word-break: break-all; }
.copy-row button { font-size: var(--text-2xs); padding: 2px 8px; }
.integration .warn { font-size: var(--text-sm); color: var(--err); margin: 8px 0; }
.integration .item-form { border: none; padding: 0; margin: 0 0 8px; background: none; }
.integration .actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.clickable { cursor: pointer; }
/* An account's services (Google's, Teams'): a tick each, and what a ticked one gives. */
.services { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.service { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; }
.service .service-head { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.service .service-head .hint-text { margin-left: auto; }
.service .service-body { margin-top: 6px; }
.cal-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--text-sm); }
.cal-list li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cal-list .swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; align-self: center; background: var(--line); }
.cal-list .name { font-weight: 600; }
.cal-list .meta { color: var(--muted); font-size: var(--text-xs); }
.cal-list code { font-size: var(--text-2xs); color: var(--muted); word-break: break-all; }
.cal-tools { display: flex; gap: 10px; align-items: center; font-size: var(--text-xs); color: var(--muted); margin-top: 6px; }
/* A voice and its Try button (Settings → Voice): its select shrinks with the page. */
.voice-pick { display: flex; gap: 6px; min-width: 0; } .voice-pick select { flex: 1; min-width: 0; }
/* Model pickers: type any id, or pick from a scrollable list (comboPicker). */
.combo { position: relative; display: flex; min-width: 0; }
.combo input { flex: 1; min-width: 0; padding-right: 30px; }
.combo > button { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); border: none; background: none; box-shadow: none; padding: 4px 8px; color: var(--muted); }
.combo-list { position: absolute; z-index: calc(var(--z-sticky) + 1); left: 0; right: 0; top: calc(100% + 4px); max-height: 240px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-2); padding: 4px; }
.combo-list div { padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: var(--text-sm); display: flex; justify-content: space-between; gap: 10px; }
.combo-list div .sub { color: var(--muted); font-size: var(--text-xs); }
.combo-list div.on, .combo-list div:hover { background: var(--accent-soft); }
.combo-list div.current { font-weight: 600; }
.combo-list .none { color: var(--muted); cursor: default; background: none; }
.range-row { display: flex; gap: 10px; align-items: center; }
.range-row input[type=range] { flex: 1; accent-color: var(--accent); }
.check-row { display: flex; gap: 8px; align-items: center; font-size: var(--text-sm2); }
.lang-checks { display: flex; gap: 6px 18px; flex-wrap: wrap; margin: 4px 0; }
.check-row input { accent-color: var(--accent); }
.runs { margin-top: 8px; }
.run-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.run { border-left: 3px solid var(--line); padding-left: 10px; }
.run.ok { border-color: var(--accent); }
.run.error { border-color: var(--err); }
.run.running { border-color: var(--accent); margin-top: 8px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { border-color: var(--line); } }
.run-output { font-size: var(--text-sm); white-space: pre-wrap; word-wrap: break-word; }
.run-summary { font-size: var(--text-sm2); color: var(--ink); margin-bottom: 4px; }
.card .title .badge { font-size: var(--text-2xs); vertical-align: middle; }
.reply-chip {
  max-width: var(--chat-width, var(--chat-max)); margin: 0 auto 8px; display: flex; gap: 8px; align-items: center;
  font-size: var(--text-sm); color: var(--muted); background: var(--tool-bg); border-radius: 8px; padding: 6px 10px;
}
.reply-chip[hidden] { display: none; }
.reply-chip span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-chip strong { color: var(--ink); font-weight: 500; }
.reply-chip button { border: none; padding: 0 4px; }
.banner { display: flex; flex-direction: column; gap: 6px; }
.banner .b-title { font-weight: 600; }
.banner .b-body { white-space: pre-wrap; }
.banner .b-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.banner .b-actions button { font-size: var(--text-xs); padding: 3px 10px; }
.project-page-card .head h3 { font-size: 18px; }
/* A project's pages share one header: its name, then a tab per page (each a link), VS Code on the right. */
.project-head { margin-bottom: 16px; }
/* In a page's .settings column, its gap is the space below. */
.settings > .project-head { margin-bottom: 0; }
.project-head-title { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 8px; }
.project-head-name { display: flex; align-items: center; min-width: 0; font-size: 22px; font-weight: 700; color: var(--ink); text-decoration: none; }
.project-head-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-head-name:hover { color: var(--accent); }
.project-head .busy { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: blink 1s step-end infinite; }
.project-head-desc { flex-basis: 100%; }
.project-head .project-tabs { align-items: center; margin-bottom: 0; overflow-x: auto; scrollbar-width: none; }
.project-tabs::-webkit-scrollbar { display: none; }
.project-tabs .tab { text-decoration: none; white-space: nowrap; }
.project-tabs .tab:hover:not(.active) { color: var(--ink); }
.project-head-ide { display: inline-flex; align-items: center; gap: 6px; flex: none; margin: 0 0 4px auto; padding: 3px 10px; font-size: var(--text-sm); }
.project-head-ide svg { width: 15px; height: 15px; }
/* "Open in app" (the IDE app) and its download page. */
.app-open { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.project-head .app-open { margin: 0 0 4px 6px; }
.project-head-app { padding: 3px 10px; font-size: var(--text-sm); }
.app-get { padding: 2px 5px; color: var(--muted); text-decoration: none; font-size: var(--text-sm); }
.app-get:hover { color: var(--accent); }
.git-details { margin: 0; }
.project-overview .integration { margin-bottom: 14px; }
.project-overview .integration > .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-overview .project-agent > summary { display: none; }
@container shell (width < 600px) {
  .project-head-name { font-size: 18px; }
  .project-head-ide span { display: none; }
}
.project-page-card { margin-bottom: 14px; }
.code-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.code-bar label.inline { display: flex; gap: 6px; align-items: center; font-size: var(--text-xs); color: var(--muted); }
.code-bar select, .code-comments select {
  max-width: 260px; font: inherit; font-size: var(--text-sm); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px;
}
.code-comments select { max-width: none; width: 100%; }
.code-edit-tools { display: inline-flex; gap: 6px; align-items: center; }
/* The editor's agent panel (beside the comments). */
.code-pane-tabs { margin-bottom: 6px; }
.code-agent { display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 1; }
.code-agent[hidden] { display: none; }
.code-agent-top { display: flex; gap: 6px; }
.code-agent-top select { flex: 1; min-width: 0; }
.code-agent-log { flex: 1; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; font-size: var(--text-sm); }
.code-agent-log .m, .notif-replies .m { padding: 7px 10px; border-radius: 8px; word-wrap: break-word; }
.code-agent-log .m.user, .notif-replies .m.user { background: var(--user-bg); align-self: flex-end; max-width: 90%; white-space: pre-wrap; }
.code-agent-log .m.assistant, .notif-replies .m.assistant { background: var(--tool-bg); }
.code-agent-log .m pre { overflow-x: auto; font-size: var(--text-xs); }
.code-agent-log .m p, .notif-replies .m p { margin: 4px 0; }
.code-agent-log .tool, .notif-replies .tool { font-size: var(--text-2xs); color: var(--muted); font-family: var(--font-mono); }
.code-agent-log .err { font-size: var(--text-xs); }
.code-agent-ctx { font-size: var(--text-2xs); color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.code-agent-ctx label { display: inline-flex; gap: 4px; align-items: center; }
/* Dragging the corner sets their height: as flex items (flex: 1 from the global textarea rule) they'd ignore it. */
.code-agent textarea, .code-comments textarea { flex: none; resize: vertical; min-height: 60px; max-height: 60cqh; }
.code-agent textarea { font-size: var(--input-fs); resize: none; }
/* Above the agent's message box: drag it up to make the box taller (code.js). */
.code-agent .grip { height: 8px; margin: -4px 0; cursor: ns-resize; touch-action: none; position: relative; flex: none; }
.code-agent .grip::after { content: ""; position: absolute; left: 50%; top: 2px; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--line); }
.code-agent .grip:hover::after { background: var(--accent); }
/* Changes against the last commit, in the editor's gutter (click: the original lines, Revert). */
.dirty-add, .dirty-mod { width: 4px !important; margin-left: 4px; cursor: pointer; }
.dirty-add { background: var(--ok); } .dirty-mod { background: var(--warn); }
.dirty-del { cursor: pointer; margin-left: 2px; width: 0 !important; height: 0 !important; border-left: 6px solid var(--err); border-top: 5px solid transparent; border-bottom: 5px solid transparent; margin-top: -5px; }
.dirty-peek { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font: var(--text-xs) var(--font-mono); overflow: auto; }
.dirty-peek .bar { display: flex; gap: 8px; align-items: center; padding: 3px 8px; font-family: inherit; background: var(--tool-bg); }
.dirty-peek .bar span { flex: 1; color: var(--muted); }
.dirty-peek .bar button { font-size: var(--text-2xs); padding: 1px 8px; }
.dirty-peek pre { margin: 0; padding: 2px 8px 4px 8px; white-space: pre; background: var(--err-soft); color: var(--ink); line-height: 19px; }
.code-edit-tools #code-dirty { color: var(--accent); }
.code-bar select:focus, .code-comments select:focus { outline: none; border-color: var(--accent); }
.code-bar .grow { flex: 1; }
.code-bar #code-ref-info { font-size: var(--text-xs); max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code-main { flex: 1; display: grid; grid-template-columns: 260px 1fr 360px; min-height: 0; }
.code-side, .code-comments { overflow: auto; padding: 10px; font-size: var(--text-sm); border-right: 1px solid var(--line); }
/* position: relative puts the grip on this pane's edge; the pane inside scrolls, so this one needn't clip. */
.code-comments { border-right: none; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; overflow: visible; position: relative; }
#code-comments-pane { overflow-y: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
#code-comments-pane[hidden] { display: none; }
.code-comments h4 { margin: 0; font-size: var(--text-sm); }
.code-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.code-path { flex-shrink: 0; padding: 6px 12px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); border-bottom: 1px solid var(--line); min-height: 14px; }
.code-editor { flex: 1; min-height: 0; }
.code-empty { padding: 20px; }
.code-tree-level { list-style: none; margin: 0; padding-left: 12px; }
#code-tree > .code-tree-level { padding-left: 0; }
.code-tree-level li > ul { display: none; }
.code-tree-level li.open > ul { display: block; }
.tree-dir, .tree-file { display: block; padding: 2px 4px; border-radius: 4px; color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-dir::before { content: "▸ "; color: var(--muted); }
li.open > .tree-dir::before { content: "▾ "; }
.tree-file:hover, .tree-dir:hover { background: var(--tool-bg); }
.tree-file.active { background: var(--accent-soft); color: var(--accent); }
.tree-file .st { display: inline-block; width: 16px; font-weight: 700; }
/* The working copy: new, changed, deleted (and folders with changes in them). */
.tree-file.wt-A { color: var(--ok); } .tree-file.wt-M { color: var(--warn); } .tree-file.wt-D { color: var(--err); text-decoration: line-through; opacity: .8; cursor: default; }
.tree-dir.wt-M { color: var(--warn); }
/* A submodule: another repository at a commit, shown with it and not opened. */
.tree-submodule { display: block; padding: 2px 4px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.tree-submodule::before { content: "⎘ "; color: var(--muted); }
.tree-submodule .sha { color: var(--muted); font-family: var(--font-mono); font-size: var(--text-2xs); }
.tree-submodule.wt-A, .tree-submodule.wt-M { color: var(--warn); }
.tree-dir.wt-M::after, .tree-file.wt-A::after, .tree-file.wt-M::after { content: " ●"; font-size: var(--text-2xs); vertical-align: middle; }
.tree-file.status-A .st { color: var(--ok); } .tree-file.status-D .st { color: var(--err); } .tree-file.status-M .st { color: var(--warn-fill); } .tree-file.status-R .st { color: var(--violet); }
.code-comment { border-left: 3px solid var(--accent); padding: 4px 8px; display: flex; flex-direction: column; gap: 3px; }
.code-comment.sent { border-color: var(--violet); } .code-comment.resolved { border-color: var(--line); opacity: .6; }
.code-comment .where { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--accent); }
.code-comment .body { white-space: pre-wrap; }
.code-comment .actions { display: flex; gap: 6px; } .code-comment .actions button { font-size: var(--text-2xs); padding: 2px 8px; }
.code-comment-thread { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; align-items: flex-start; }
.code-comment-r { border-left: 2px solid var(--line); padding: 2px 8px; display: flex; flex-direction: column; gap: 2px; align-self: stretch; }
.code-comment-r .body { white-space: pre-wrap; }
.code-comment-reply { display: flex; flex-direction: column; gap: 4px; align-self: stretch; }
.code-comment-reply .actions { justify-content: flex-end; align-items: center; }
.code-commit-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 6px max(14px, var(--safe-left)); border-bottom: 1px solid var(--line); font-size: var(--text-sm); }
.code-commit-note button { min-height: var(--control-h-sm); font-size: var(--text-xs); }
.rb-item { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; font-weight: 600; }
.rb-item button { min-height: var(--control-h-sm); font-size: var(--text-xs); }
.code-comments .item-form { margin: 0; padding: 10px; }
.code-commented { background: var(--accent-soft); }
.code-comment-glyph::before { content: "💬"; font-size: var(--text-xs); }
/* What the Code tab shows: the code, the agent (and comments), or both; the files beside them or not (code.js sets the columns). */
.project-link .busy { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1s step-end infinite; }
.agent-log { display: flex; flex-direction: column; gap: 16px; }
.agent-log[hidden] { display: none; }
/* Its own look also when it opens in the list, in place of a card (.settings strips forms). */
.agent-card .head h3 a { color: inherit; text-decoration: none; }
.agent-card .head h3 a:hover { color: var(--accent); }
.agent-card .facts { font-size: var(--text-xs); color: var(--muted); margin: 4px 0 10px; }
fieldset.access { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
fieldset.access legend { font-size: var(--text-xs); color: var(--muted); padding: 0 4px; }
.check-grid { display: flex; flex-wrap: wrap; gap: 4px 16px; padding-left: 24px; font-size: var(--text-sm); }
.check-grid label { display: flex; gap: 6px; align-items: center; }
.check-grid input, fieldset.access input { accent-color: var(--accent); }
.policy-grid { display: grid; grid-template-columns: 1fr minmax(0, 220px); gap: 6px 12px; align-items: center; font-size: var(--text-sm); }
.policy-grid h5 { grid-column: 1 / -1; margin: 10px 0 0; font-size: var(--text-xs); color: var(--muted); font-weight: 600; }
.policy-grid h5:first-child { margin-top: 0; }
.policy-grid .sub { color: var(--muted); font-size: var(--text-xs); }
.policy-grid select.custom { border-color: var(--accent); }
.scratch { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.scratch-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.scratch-bar input[type=date] {
  font: inherit; font-size: var(--text-sm); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px;
}
.scratch-day { font-weight: 600; margin-left: 6px; }
#scratch-text {
  min-height: 55cqh; flex: 1; resize: vertical; font: inherit; font-size: 15px; line-height: 1.6;
  color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
#scratch-text:focus { outline: none; border-color: var(--accent); }
/* Notepad: a page drawn on with a pen (public/js/notepad.js). */
/* The page is endless: the canvas fills the view, nothing scrolls. */
#view-notepad { overflow: hidden; padding-bottom: 12px; display: flex; flex-direction: column; }
.notepad { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; width: 100%; }
.notepad-bar, .notepad-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.notepad-bar select {
  max-width: 260px; font: inherit; font-size: var(--text-sm); color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px;
}
#notepad-zoom-level { min-width: 4.2em; font-variant-numeric: tabular-nums; }
.notepad-tools .tool-group { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.notepad-tools .tool-group button { border: none; background: none; padding: 5px 10px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; }
.notepad-tools .tool-group button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
.notepad-tools .tool-group button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.notepad-tools .size-dot { display: inline-block; border-radius: 50%; background: currentColor; }
.notepad-tools .tool-group button { padding: 5px 8px; }
.notepad-tools .size-0 { width: 3px; height: 3px; }
.notepad-tools .size-1 { width: 5px; height: 5px; }
.notepad-tools .size-2 { width: 8px; height: 8px; }
.notepad-tools .size-3 { width: 12px; height: 12px; }
.notepad-tools .size-4 { width: 16px; height: 16px; }
.notepad-tools .swatch { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line); }
.notepad-tools .swatch.c-ink { background: var(--ink); }
.notepad-tools .swatch.c-red { background: var(--pad-red); }
.notepad-tools .swatch.c-blue { background: var(--pad-blue); }
.notepad-tools .swatch.c-green { background: var(--pad-green); }
.notepad-tools .swatch.c-orange { background: var(--pad-orange); }
.notepad-tools .swatch.c-purple { background: var(--pad-purple); }
.notepad-tools .swatch.c-grey { background: var(--pad-grey); }
.notepad-tools .swatch.c-hl-yellow { background: var(--pad-hl-yellow); }
.notepad-tools .swatch.c-hl-green { background: var(--pad-hl-green); }
.notepad-tools .swatch.c-hl-pink { background: var(--pad-hl-pink); }
.notepad-tools .swatch.c-hl-blue { background: var(--pad-hl-blue); }
.notepad-tools .swatch.c-hl-orange { background: var(--pad-hl-orange); }
.notepad-tools #notepad-colors button[aria-pressed="true"] .swatch { outline: 2px solid var(--accent); outline-offset: 1px; }
.notepad-tools .tool-group .ico { display: inline-flex; }
.notepad-sheet {
  position: relative; flex: 1; min-height: 240px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  /* Dots that move and scale with the page (notepad.js sets where). */
  background-color: var(--panel);
  background-image: radial-gradient(circle, var(--grid-dot) 1px, transparent 1.2px);
  background-size: var(--grid, 40px) var(--grid, 40px);
  background-position: var(--grid-x, 0) var(--grid-y, 0);
}
/* E-ink: the sheet white whatever the theme. */
:root[data-display^="eink"] .notepad-sheet { background-color: var(--bg); }
.notepad-hint { margin: 0; }
/* Settings → Current device → Pen pressure: the test area. */
.pen-test { display: block; width: 100%; height: 150px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); touch-action: none; cursor: crosshair; margin: 6px 0; }
.pen-reading { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pen-reading meter { flex: 1; min-width: 120px; height: 10px; }
.settings .row-btns .grow { flex: 1; }
/* Settings → Logs: the server's lines, newest first, each level its own mark. */
.log-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 8px 0; }
.log-filters label { display: flex; gap: 6px; align-items: center; }
.log-filters .grow { flex: 1; min-width: 180px; }
.log-list { font-family: var(--font-mono); font-size: var(--text-xs); border: 1px solid var(--line); border-radius: 8px; background: var(--panel); max-height: 70cqh; overflow: auto; }
.log-entry { display: grid; grid-template-columns: max-content max-content max-content 1fr; gap: 0 10px; padding: 3px 10px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.log-entry:last-child { border-bottom: none; }
.log-entry .at, .log-entry .scope { color: var(--muted); white-space: nowrap; }
.log-entry .lvl { font-weight: 600; text-transform: uppercase; font-size: var(--text-2xs); padding-top: 1px; }
.log-entry .msg { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.log-entry .extra { grid-column: 1 / -1; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); margin: 2px 0 0; max-height: 14em; overflow: auto; }
.log-entry.debug { opacity: .7; }
.log-entry.warn { border-left-color: var(--pad-orange); }
.log-entry.warn .lvl { color: var(--pad-orange); }
.log-entry.error { border-left-color: var(--err); background: var(--err-soft); }
.log-entry.error .lvl { color: var(--err); }
@container shell (width < 600px) { .log-entry { grid-template-columns: max-content 1fr; } .log-entry .scope { grid-column: 2; } .log-entry .msg { grid-column: 1 / -1; } }
.pen-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 12px; margin-bottom: 8px; }
.notepad-sheet canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.notepad-sheet #notepad-overlay { pointer-events: none; }
/* Moved and scaled as a whole while the page moves (notepad.js), by the GPU. */
#notepad-canvas { transform-origin: 0 0; will-change: transform; }
/* A highlighter stroke being drawn: solid on the overlay, the overlay see-through (as it will look). */
.notepad-sheet.see-through #notepad-overlay { opacity: var(--pad-hl-alpha, .35); }
.notepad-sheet[data-tool="eraser"] canvas { cursor: cell; }
.notepad-sheet[data-tool="lasso"] canvas { cursor: alias; }
.notepad-sheet[data-tool="move"] canvas { cursor: grab; }
.notepad-sheet.moving canvas { cursor: grabbing; }
#scratch-days { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
#scratch-days a {
  display: flex; gap: 12px; padding: 5px 8px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: var(--text-sm);
}
#scratch-days a:hover { background: var(--tool-bg); }
#scratch-days a.current { background: var(--user-bg); }
#scratch-days .d { width: 110px; flex-shrink: 0; font-weight: 600; }
#scratch-days .p { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#scratch-conflict { flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; }
.card .person-name { flex: 1; font-weight: 600; font-size: 15px; }
.card .contacts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: var(--text-sm); }
.card .contacts a { color: var(--accent); text-decoration: none; }
.card .contacts a:hover { text-decoration: underline; }
.memory-search {
  width: 100%; margin-top: 14px; font: inherit; font-size: var(--text-sm2); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
}
.memory-search:focus { outline: none; border-color: var(--accent); }
.card .fact-key { flex: 1; font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600; word-break: break-all; }
.card .fact-value { font-size: var(--text-sm2); margin-top: 6px; white-space: pre-wrap; word-wrap: break-word; }
/* [[key]]: a link to another fact (memory.js factValueHtml); one to a fact that isn't there struck through. */
.fact-value .fact-link { font-family: var(--font-mono); }
.fact-value .fact-link.missing { color: var(--muted); text-decoration: line-through dotted; }
.card .fact-meta { font-size: var(--text-2xs); color: var(--muted); margin-top: 6px; }
/* Recording a person's voice, on their card. */
.card .voice-samples { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: var(--text-sm); }
.card .voice-sample { display: flex; gap: 8px; align-items: center; }
.card .voice-sample a { color: var(--accent); }
.card .voice-sample audio { display: block; width: 100%; max-width: 360px; height: 32px; margin-top: 4px; }
.card .voice-sample.off { border-left: 3px solid var(--err); padding-left: 8px; }
.card .voice-sample.off .fact-meta { color: var(--err); }
.card .voice-rec { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.card .voice-rec blockquote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--tool-bg); border-radius: 6px; font-size: var(--text-sm2); line-height: 1.5; }
.card .voice-rec .actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.card .voice-rec .actions .err, .card .voice-rec .actions .hint-text:not(:first-child) { flex: 1; }
.card .fact-meta button { font-size: var(--text-2xs); padding: 1px 8px; vertical-align: baseline; }
.card mark { background: var(--mark); color: inherit; border-radius: 2px; }
.auth-choice { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; font-size: var(--text-sm2); }
.auth-choice label { display: flex; gap: 8px; align-items: baseline; cursor: pointer; }
.auth-choice label.disabled { opacity: .5; cursor: default; }
.auth-choice input { accent-color: var(--accent); }
.settings .actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.status-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: var(--text-sm); }
.status-list li { display: flex; gap: 10px; align-items: baseline; }
.status-list .label { width: 120px; flex-shrink: 0; font-weight: 600; }
#push-devices { margin-top: 10px; }
#push-devices li { flex-wrap: wrap; }
#push-devices .label { width: auto; min-width: 180px; }
#push-devices button { font-size: var(--text-xs); padding: 2px 9px; }
.status-list .val { color: var(--muted); }
.status-list .on { color: var(--accent); font-weight: 600; }
.settings .row-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.settings a.button, .meeting-today a.button, .event-card a.button, .work-body a.button {
  font-size: var(--text-sm); color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 14px; min-height: var(--control-h); display: inline-flex; align-items: center;
}
.settings a.button:hover, .meeting-today a.button:hover, .event-card a.button:hover, .work-body a.button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.empty { font-size: var(--text-sm); color: var(--muted); }
.card .row input[type=checkbox] { accent-color: var(--accent); cursor: pointer; align-self: center; }
.card.done .title { text-decoration: line-through; color: var(--muted); }
.card .title { flex: 1; font-weight: 600; font-size: var(--text-sm2); word-wrap: break-word; min-width: 0; }
.card .meta { font-size: var(--text-xs); color: var(--muted); margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; }
.card .meta .overdue { color: var(--err); }
.item-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.item-form .three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.speaker-thresholds { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
/* A group of fields in a form under one small label (an event's sources, conditions, grouping). */
.field-group { display: flex; flex-direction: column; gap: 4px; }
.field-group .field-label { font-size: var(--text-xs); color: var(--muted); }
.field-group .check-grid { padding-left: 0; }
.field-group .check-grid label { flex-direction: row; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--ink); }
/* An event's actions on its card: "Then", one row each, and their form in place. */
.evactions-wrap { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.evactions-wrap .field-label { font-size: var(--text-xs); color: var(--muted); }
.evactions { display: flex; flex-direction: column; gap: 6px; }
.evaction { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--text-sm); }
.evaction .evaction-what { flex: 1; min-width: 200px; }
.evaction.disabled .evaction-what { color: var(--muted); }
.evaction .evaction-buttons { display: flex; gap: 6px; align-items: center; }
.evaction-part { display: flex; flex-direction: column; gap: 8px; }
.evaction-inputs { display: flex; flex-direction: column; gap: 6px; }
.evaction-inputs label > span { font-size: var(--text-sm); }
/* An event's conditions: field, comparison, value, remove; the value takes the rest of the row. */
.evdef-conditions { display: flex; flex-direction: column; gap: 6px; }
.evdef-cond { display: grid; grid-template-columns: minmax(120px, 170px) minmax(120px, 190px) 1fr auto; gap: 6px; align-items: center; }
.evdef-cond .evdef-value input { width: 100%; padding-top: 4px; padding-bottom: 4px; }
.evdef-cond .check-grid { padding-left: 0; }
.evdef-cond .check-grid label { flex-direction: row; white-space: nowrap; font-size: var(--text-sm); color: var(--ink); }
@container shell (width < 600px) {
  .evdef-cond { grid-template-columns: 1fr 1fr auto; }
  .evdef-cond .evdef-value { grid-column: 1 / -1; grid-row: 2; }
}
.card.disabled > :not(.row) { opacity: .6; }
@container shell (width < 600px) { .item-form .two, .item-form .three { grid-template-columns: 1fr; } .page-top { flex-wrap: wrap; } }
.agent-emoji { font-size: 16px; line-height: 1; }
.project-icon { margin-right: 6px; }
.name-icon { display: grid; grid-template-columns: 64px 1fr; gap: 8px; }
.name-icon .icon-input { text-align: center; font-size: 18px; }
.icon-picks { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 0 0; }
.icon-pick { font-size: 16px; line-height: 1; padding: 4px 6px; border-radius: 8px; min-width: var(--tap-sm); min-height: var(--tap-sm); }
.pi { display: inline-flex; align-items: center; justify-content: center; }
.pi-img { width: 1.15em; height: 1.15em; object-fit: contain; border-radius: 4px; }
.nav-ico .pi-img, .nav-ico.pi .pi-img { width: 18px; height: 18px; }
.icon-image { display: flex; flex-direction: column; gap: 6px; }
.icon-image .label-text { font-size: var(--text-sm); color: var(--muted); }
.icon-image-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.icon-preview { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px dashed var(--line); border-radius: 10px; }
.icon-preview img { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; }
.icon-url { display: flex; gap: 6px; flex: 1; min-width: 240px; }
.icon-url input { flex: 1; }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
/* Meetings: the list, the recording, speakers and the transcript. */
.meeting-card { display: block; color: inherit; text-decoration: none; }
/* Today's meetings from the calendar, above the recordings. */
.meeting-today { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.meeting-today h3 { margin: 0; font-size: var(--text-sm2); }
.today-meeting.now { border-color: var(--accent); }
.today-meeting .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.today-meeting .title { flex: 1; min-width: 200px; white-space: pre-wrap; }
.today-meeting .title > .badge { margin-left: 8px; }
.meeting-today .hint-text { font-size: var(--text-xs); color: var(--muted); margin: 0; }
.meeting-marks { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.today-meeting .title .meeting-marks { margin-left: 8px; }
.meeting-marks:empty { display: none; }
/* Past ones with nothing recorded step back. */
.today-meeting[data-event]:not(.has-recording) .title { color: var(--muted); }
.meeting-today .err { color: var(--err); font-size: var(--text-sm); margin: 0; }
.meeting-card:hover { border-color: var(--accent); }
/* The search over the list: its results instead of the list while there's a query. */
.meeting-search { margin: 0 0 14px; }
.meeting-today.searching { display: none; }
#meeting-results:not([hidden]) { margin-bottom: 18px; }
.meeting-said-head { margin: 8px 0 0; font-size: var(--text-sm2); }
.meeting-card .preview { font-size: var(--text-sm); margin-top: 4px; }
/* The line a search result opened the meeting at. */
.seg.found { box-shadow: inset 3px 0 0 var(--accent); background: var(--accent-soft); }
.meeting-card .title .badge { margin-left: 8px; }
.meeting-back { display: inline-block; margin-bottom: 8px; font-size: var(--text-sm); color: var(--muted); text-decoration: none; }
.meeting-back:hover { color: var(--accent); }
.page-view h2.meeting-title { font-size: 20px; letter-spacing: 0; text-transform: none; color: var(--ink); margin: 0 0 2px; }
.meeting-actions { justify-content: flex-start; flex-wrap: wrap; margin: 10px 0 16px; }
.meeting-attendees { margin-top: 8px; }
.meeting-progress { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.meeting-progress .busy { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: blink 1s step-end infinite; }
.rec-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 14px 16px; margin-bottom: 16px; }
.rec-panel > p:first-child { margin-top: 0; }
.rec-panel p.err:empty { display: none; }
.rec-head { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--err); animation: blink 1s step-end infinite; }
.rec-state { font-variant-numeric: tabular-nums; }
/* How loud the microphone hears it: --level (0 to 1) set as it records. */
.rec-level { height: 6px; border-radius: 3px; background: var(--tool-bg); margin: 12px 0 8px; overflow: hidden; }
.rec-level span { display: block; height: 100%; width: calc(var(--level, 0) * 100%); background: var(--accent); transition: width .1s linear; }
.meeting-audio { width: 100%; margin: 4px 0 8px; }
.speaker-list { display: flex; flex-direction: column; gap: 6px; }
.speaker-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.speaker-row .speaker-name { flex: 1; min-width: 140px; }
.speaker-row select { max-width: 180px; }
.speaker-row > span:last-child:not(:empty) { flex-basis: 100%; font-size: var(--text-xs); }
.spk-dot { width: 12px; height: 12px; border-radius: 50%; background: currentColor; flex: none; }
/* Speakers in the notepad's pen colours, so they follow the theme (and e-ink). */
.spk-0 { color: var(--pad-blue); } .spk-1 { color: var(--pad-orange); } .spk-2 { color: var(--pad-green); }
.spk-3 { color: var(--pad-purple); } .spk-4 { color: var(--pad-red); } .spk-5 { color: var(--pad-grey); }
.spk-none { color: var(--muted); }
.transcript { display: flex; flex-direction: column; }
.seg { display: grid; grid-template-columns: 52px 130px 1fr; gap: 8px; align-items: baseline; padding: 4px 6px; border-radius: 6px; }
.seg.playing { background: var(--accent-soft); }
.seg-time { border: none; background: none; padding: 0; font: inherit; font-size: var(--text-xs); color: var(--muted); font-variant-numeric: tabular-nums; cursor: pointer; text-align: left; }
.seg-time:hover:not(:disabled) { color: var(--accent); }
.seg-time:disabled { cursor: default; }
.seg-who { border: none; background: none; padding: 0; font: inherit; font-weight: 600; font-size: var(--text-sm); cursor: pointer; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The same speaker again: their name only once, still there to click. */
.seg-who.again { opacity: 0; }
.seg:hover .seg-who.again, .seg-who.again:focus-visible { opacity: .5; }
.seg-text { line-height: 1.45; }
.seg-text.untold { color: var(--muted); font-size: var(--text-xs); }
#speaker-model-comparison { overflow-x: auto; }
.speaker-compare { border-collapse: collapse; font-size: var(--text-sm); margin-top: 6px; width: 100%; }
.speaker-compare th, .speaker-compare td { border-bottom: 1px solid var(--line); padding: 5px 8px; text-align: left; }
.speaker-compare tr.best td { font-weight: 600; }
.transcript-head { display: flex; align-items: center; gap: 10px; }
.transcript-head h3 { margin-right: auto; }
/* A meeting's summary (meetings.js meetingSummaryPart): Markdown above its transcript. */
.meeting-summary { margin: 18px 0 6px; display: flex; flex-direction: column; gap: 8px; }
.meeting-summary-text { line-height: 1.55; }
.meeting-summary-text :is(ul, ol) { padding-left: 22px; margin: 4px 0; }
.meeting-summary-text :is(h1, h2, h3, h4) { font-size: var(--text-md); margin: 10px 0 4px; }
.meeting-summary .actions { flex-wrap: wrap; justify-content: flex-start; }
.cut-bar { position: sticky; top: calc(-1 * var(--page-pad-top)); z-index: 2; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; margin-bottom: 8px; border: 1px solid var(--err); border-radius: 8px; background: var(--bg); font-size: var(--text-sm); }
.cut-tune { display: inline-flex; align-items: center; gap: 6px; }
.cut-edge { width: 76px; padding: 3px 6px; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.transcript.cutting .seg { cursor: pointer; }
.transcript.cutting .seg:hover { background: var(--tool-bg); }
.transcript.cutting .seg-time, .transcript.cutting .seg-who { pointer-events: none; }
.seg.cut, .transcript.cutting .seg.cut:hover { background: var(--err-soft); text-decoration: line-through; text-decoration-color: var(--err); }
@container shell (width < 600px) {
  .seg { grid-template-columns: 44px 1fr; }
  .seg-text { grid-column: 1 / -1; padding-left: 52px; margin-top: -2px; }
  .seg:has(.seg-who.again) .seg-who { display: none; }
  .seg:has(.seg-who.again) .seg-text { grid-column: 2; padding-left: 0; margin-top: 0; }
}
/* The notifications page: cards that open in place, with a reply under them. */
.card.notif-item { padding: 0; }
.notif-item .notif-head { display: block; padding: 10px 14px; color: inherit; text-decoration: none; }
.notif-item:hover, .notif-item.chosen { border-color: var(--accent); }
.notif-item .t { font-weight: 500; font-size: var(--text-sm2); }
/* Unread (never opened nor acted on): bold, marked; the card makes room for its × (Dismiss). */
.card.notif-item { position: relative; }
.notif-item .notif-head { padding-right: 40px; }
.notif-item.unread .t { font-weight: 700; }
.notif-item.unread .t::before { content: "● "; color: var(--accent); }
.notif-item .notif-x { position: absolute; top: 6px; right: 6px; }
.notif-from a { color: var(--accent); }
/* Needs you: one row per thing waiting, its answers and Open beside it. */
.need-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.need-item .need-main { flex: 1 1 260px; min-width: 0; }
.need-item .t { font-weight: 600; font-size: var(--text-sm2); }
.need-item .b { font-size: var(--text-sm); color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.need-item .m { font-size: var(--text-xs); color: var(--muted); margin-top: 2px; }
.need-item .need-acts { flex-wrap: wrap; justify-content: flex-end; }
.need-item.trouble { border-left: 3px solid var(--warn-fill); }
#inbox-tabs { margin-bottom: 12px; }
/* A notification's toast: its title, then the start of what it says; its buttons under it. */
.toast-notif { display: flex; flex-direction: column; gap: 2px; }
.toast-notif .toast-notif-b { color: var(--muted); font-size: var(--text-xs); }
.toast .toast-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 55%; }
.notif-item .m { font-size: var(--text-xs); color: var(--muted); }
.notif-item .b { font-size: var(--text-sm); color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-full { padding: 0 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.notif-full .assistant .bubble { padding: 0; border: none; background: none; }
.notif-full .notif-actions { justify-content: flex-start; flex-wrap: wrap; }
.notif-full .notif-answer { justify-content: flex-start; flex-wrap: wrap; }
.notif-typed { display: inline-flex; gap: 6px; flex: 1 1 260px; }
.notif-typed input { flex: 1; min-width: 0; }
/* Opened in the drawer over the list, as a work item is: no card's padding there. */
.notif-drawer .notif-full { padding: 0; }
.notif-drawer .work-drawer-head .sev { flex: none; }
.notif-replies { display: flex; flex-direction: column; gap: 6px; }
.notif-replies:empty { display: none; }
.notif-reply { display: flex; flex-direction: column; gap: 6px; }
.notif-reply textarea { min-height: 54px; }
.banner .b-title.link { cursor: pointer; }
/* Severity (notifications): high and critical stand out. */
.sev { display: inline-block; font-size: var(--text-2xs); font-weight: 600; border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; border: 1px solid currentColor; }
.sev-low { color: var(--muted); }
.sev-high { color: var(--warn); }
.sev-critical { color: var(--err); }
.banner.sev-high { border-left: 3px solid var(--warn-fill); }
.banner.sev-critical { border-left: 3px solid var(--err); }
.notif-item.sev-high { border-left: 3px solid var(--warn-fill); }
.notif-item.sev-critical { border-left: 3px solid var(--err); }
.banner .b-title.link:hover { text-decoration: underline; }
.card .name { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600; }
.card .desc { font-size: var(--text-sm); color: var(--muted); margin-top: 4px; }
/* Events: the accounts checked, and what happened. */
.event-history { margin-top: 28px; }
.event-interval { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 8px; font-size: var(--text-sm); color: var(--muted); }
.event-interval input { width: 90px; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }
.event-sources { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: var(--text-sm); }
.event-sources .err { color: var(--err); font-size: var(--text-xs); }
.event-card .title { overflow-wrap: anywhere; }
.event-runs { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; font-size: var(--text-sm); }
.event-run { border-left: 3px solid var(--line); padding-left: 8px; }
.event-run.done { border-left-color: var(--accent); }
.event-run.failed { border-left-color: var(--err); }
.event-action { font-size: var(--text-xs); color: var(--muted); }
.event-action.err, .event-card > .err { color: var(--err); }
.event-fields { margin-top: 6px; font-size: var(--text-xs); display: flex; flex-direction: column; gap: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.card .row { display: flex; align-items: baseline; gap: 8px; }
.card .row .name { flex: 1; }
.card .row button { font-size: var(--text-xs); padding: 2px 9px; }
.card .body {
  font-family: var(--font-mono); font-size: var(--text-xs);
  background: var(--tool-bg); border-radius: 8px; padding: 8px 10px; margin-top: 8px;
  white-space: pre-wrap; word-wrap: break-word; max-height: 160px; overflow: auto;
}
details.builtins { margin-top: 32px; }
details.builtins summary {
  cursor: pointer; font-size: var(--text-2xs); letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
/* An answer the owner stopped: what it had said by then. */
.stopped-mark {
  margin-left: 8px; padding: 0 6px; border-radius: 999px; font-size: var(--text-2xs);
  color: var(--err); border: 1px solid var(--err); text-transform: none;
}
