/*
 * Kybernetes OS consoles: the stylesheet shared by the Node console and the vendor console.
 * The responsive rules every page follows are in docs/27 (layout, type, forms, tables, actions, navigation).
 * Order: tokens, base elements, the frame, layout, forms, buttons, tables, components, page pieces.
 * Pages carry no inline styles or scripts (strict CSP): everything visual lives here.
 */

/* 1. Tokens ---------------------------------------------------------------------------------------- */
:root {
  color-scheme: light;
  /* Colour: ink on paper with a bronze accent. Text pairs meet WCAG AA (4.5:1). */
  --ink: #0f2237;
  --ink2: #2a3f55;
  --muted: #5c6b78;
  --line: #d4dad9;
  /* Field and control borders: 3:1 against the surface (WCAG 1.4.11). */
  --line-strong: #7d8b94;
  --bg: #f3f4f2;
  --surface: #fff;
  --surface2: #e9ecea;
  --bronze: #b8732a;
  --bronze-ink: #8a5218;
  /* Filled buttons: the bronze darkened until white text reads at 4.5:1. */
  --accent-fill: #a8641f;
  --on-accent: #fff;
  --ok: #2a7046;
  --ok-bg: #e3f1e8;
  --warn: #8a5512;
  --warn-bg: #f7ecd9;
  --crit: #a23b3b;
  --crit-bg: #f6e1e1;
  --on-crit: #fff;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  /* Source code (code-view.ts, highlight.js classes): GitHub-like colours that keep 4.5:1 on --bg. */
  --code-keyword: #c0254b;
  --code-string: #0a3069;
  --code-number: #0550ae;
  --code-comment: #5d6772;
  --code-title: #6639ba;
  --code-type: #953800;
  --code-attr: #0550ae;
  --code-tag: #116329;
  --code-meta: #5d6772;
  --code-added: #116329;
  --code-added-bg: #dafbe1;
  --code-removed: #82071e;
  --code-removed-bg: #ffebe9;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  /* Type scale (rem: 16px). Body text is 16px on phones (no zoom on focus) and 15px from 48rem. */
  --font-xs: 0.75rem; /* 12px: capitals labels, pills, table heads; nothing is smaller */
  --font-sm: 0.8125rem; /* 13px: secondary text, breadcrumbs, help under fields */
  --font-label: 0.875rem; /* 14px: field labels and legends */
  --font-base: 1rem;
  --font-md: 1.0625rem; /* 17px: lead paragraphs, card titles */
  --font-lg: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); /* h2: 17 to 19px */
  --font-xl: clamp(1.375rem, 1.25rem + 0.6vw, 1.625rem); /* h1: 22 to 26px */
  --font-kpi: clamp(1.125rem, 1rem + 0.6vw, 1.5rem); /* KPI figures: 18 to 24px */
  --leading: 1.5;
  --leading-tight: 1.25;

  /* Spacing: one scale for gaps, paddings and margins. */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  /* The page's side padding: 16px on a phone, up to 32px on wide screens. */
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);

  /* Widths: data pages up to 90rem, prose to a reading measure, forms to 64rem. */
  --page-max: 90rem;
  --measure: 72ch;
  --form-max: 64rem;
  /* The frame lines up with the page: its padding puts its content where main's content starts. */
  --frame-pad: max(var(--gutter), calc((100% - var(--page-max)) / 2 + var(--gutter)));

  /* Controls: 40px tall with a mouse; 44px under a finger and on any screen narrower than 48rem. */
  --control-h: 2.5rem;
  --tap: 2.75rem;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
}
@media (min-width: 48rem) {
  :root {
    --font-base: 0.9375rem;
  }
}
@media (pointer: coarse), (max-width: 47.99rem) {
  :root {
    --control-h: var(--tap);
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #eef1f0;
    --ink2: #c9d2d8;
    --muted: #93a1ac;
    --line: #2a3c4f;
    --line-strong: #5f7387;
    --bg: #0b1826;
    --surface: #122537;
    --surface2: #182f45;
    --bronze: #d59040;
    --bronze-ink: #e6a75c;
    --accent-fill: #d59040;
    --on-accent: #0b1826;
    --ok: #7cc69a;
    --ok-bg: #15352a;
    --warn: #e6b566;
    --warn-bg: #3a2e16;
    --crit: #e68a8a;
    --crit-bg: #3b1e22;
    --on-crit: #0b1826;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    --code-keyword: #ff8fa3;
    --code-string: #a5d6ff;
    --code-number: #79c0ff;
    --code-comment: #9aa7b3;
    --code-title: #d2a8ff;
    --code-type: #ffa657;
    --code-attr: #79c0ff;
    --code-tag: #7ee787;
    --code-meta: #9aa7b3;
    --code-added: #aff5b4;
    --code-added-bg: #033a16;
    --code-removed: #ffdcd7;
    --code-removed-bg: #67060c;
  }
}

/* 2. Base ------------------------------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* In-page links land below the sticky masthead. */
  scroll-padding-top: 7rem;
}
/* The top bar and the project's menu stay in view while the page scrolls; menus and toasts stay above it. */
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--font-base);
  line-height: var(--leading);
  /* Long words, ids and URLs wrap instead of widening the page. */
  overflow-wrap: break-word;
}
/*
 * Nothing grows past its box for content of unexpected length (a long URL, path, id or JSON in an agent's text,
 * 2026-10-17: a deliverable's evidence ran out of its card). Flex and grid children may shrink below their longest
 * word, which then wraps (body's overflow-wrap); a box that must keep a size sets its own min-width (any class rule
 * wins over these). Tables keep their columns and scroll inside .table-wrap.
 */
main :where(*),
.masthead :where(*),
.assistant :where(*),
dialog :where(*) {
  min-width: 0;
}
img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}
img,
video {
  height: auto;
}
a {
  color: var(--bronze-ink);
  text-underline-offset: 0.15em;
}
a:hover {
  text-decoration-thickness: 2px;
}
h1,
h2,
h3,
h4 {
  line-height: var(--leading-tight);
}
h1 {
  font-size: var(--font-xl);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
}
h2 {
  font-size: var(--font-lg);
  margin: var(--space-6) 0 var(--space-3);
}
h3 {
  font-size: var(--font-md);
}
main ul,
main ol {
  padding-left: 1.25rem;
}
code,
kbd,
samp,
pre,
.mono {
  font-family: var(--mono);
}
/*
 * Long tokens without word boundaries (JSON, digests, URLs, tokens) may break anywhere: mark them
 * .break-anywhere (or .url). Ids and short codes stay whole; text everywhere breaks a word only when it
 * cannot fit its line (body's overflow-wrap).
 */
.break-anywhere,
.url {
  overflow-wrap: anywhere;
}
.nowrap {
  white-space: nowrap;
}
/* Hidden means hidden, whatever display a class gives the element (a button shown only while it applies). */
[hidden] {
  display: none !important;
}
/* Code and preformatted text scroll inside themselves, never the page. */
pre {
  max-width: 100%;
  overflow: auto;
}
.lead {
  color: var(--ink2);
  font-size: var(--font-md);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: var(--font-sm);
}
/* Prose keeps a reading measure on wide screens; tables and forms use their own widths. */
main > p:not(.notice):not(.status),
main > ul,
main > ol,
.lead,
.measure {
  max-width: var(--measure);
}
.pre-line {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
/* Content for screen readers only (a select in a table cell named by its column). */
.sr-only,
.visually-hidden,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: absolute;
  z-index: 50;
  top: var(--space-2);
  left: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border: 2px solid var(--bronze);
  border-radius: var(--radius-sm);
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--bronze);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 3. The frame: top bar, project switcher, areas, approvals badge, the menu, area menu, breadcrumb --- */
nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}
nav a {
  color: var(--ink2);
  text-decoration: none;
}
/*
 * The top bar is a grid with named areas. Wide screens (72rem and up) show everything in one row; below,
 * the areas and the person move into the Menu (a native disclosure: no script needed). Below 48rem the
 * project switcher takes a row of its own, with the approvals badge.
 */
.top {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) fit-content(20rem);
  grid-template-areas: "brand areas . who";
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-2) var(--frame-pad);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.top-project {
  grid-template-columns: auto fit-content(22rem) auto minmax(0, 1fr) auto auto fit-content(20rem);
  grid-template-areas: "brand switcher areas . chat badge who";
}
.top > .chat-launch {
  grid-area: chat;
}
.top > .brand {
  grid-area: brand;
}
.top > .switcher {
  grid-area: switcher;
}
.top > .areas {
  grid-area: areas;
}
.top > .badge {
  grid-area: badge;
}
.top > .who {
  grid-area: who;
}
.top > .nav-menu {
  grid-area: menu;
  display: none;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-h);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand img {
  flex: none;
}
/* "OS" in bronze; the rest of the name in the ink colour (the Node console wraps the name in .brand-word). */
.brand span {
  color: var(--bronze);
}
.brand .brand-word {
  color: inherit;
}
.brand em {
  font-style: normal;
  font-family: var(--mono);
  font-size: var(--font-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: 6px;
  font-weight: 500;
}
/* The areas keep one row: the person's address wraps first. */
.top .areas {
  flex-wrap: nowrap;
  gap: var(--space-1);
}
.areas a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-h);
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.areas a:hover {
  background: var(--surface2);
}
.areas a[aria-current="page"] {
  background: var(--surface2);
  color: var(--ink);
}
/* The person: a long address wraps beside "Sign out". */
.who {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  margin: 0;
  color: var(--muted);
  font-size: var(--font-sm);
  min-width: 0;
}
.who span {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}
.who button {
  flex: none;
}
/* The project switcher: a native disclosure; console.js closes it on an outside click or Escape. */
.switcher {
  position: relative;
  min-width: 0;
}
.switcher > summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  line-height: var(--leading-tight);
  min-height: var(--control-h);
  padding: var(--space-1) 2rem var(--space-1) var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  min-width: 10rem;
  max-width: 22rem;
}
.switcher > summary::-webkit-details-marker {
  display: none;
}
.switcher > summary::after {
  content: "\25BE";
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.switcher[open] > summary::after {
  content: "\25B4";
}
.switcher > summary .label {
  font-family: var(--mono);
  font-size: var(--font-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
/* A long project name wraps: it is never cut off. */
.switcher > summary b {
  overflow-wrap: anywhere;
}
.switcher .menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  width: max-content;
  min-width: max(100%, 16rem);
  max-width: min(28rem, calc(100vw - 2 * var(--gutter)));
  max-height: min(60vh, 32rem);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.switcher .menu a {
  display: flex;
  align-items: center;
  min-height: var(--control-h);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.switcher .menu a:hover,
.switcher .menu a:focus-visible {
  background: var(--surface2);
}
.switcher .menu a[aria-current="true"] {
  font-weight: 700;
}
.switcher .menu .sep {
  border-top: 1px solid var(--line);
  border-radius: 0;
  margin-top: var(--space-1);
  color: var(--ink2);
}
.switcher .menu .create {
  color: var(--bronze-ink);
  font-weight: 600;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--control-h);
  color: var(--ink2);
  text-decoration: none;
  white-space: nowrap;
}
.badge[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}
.badge .count {
  background: var(--crit);
  color: var(--on-crit);
  border-radius: 999px;
  padding: 0 7px;
  margin: 0;
  min-width: 1.5em;
  text-align: center;
  font-size: var(--font-xs);
  font-weight: 700;
}
/* The Menu: shown when the top bar is too narrow for the areas and the person. */
.nav-menu > summary,
.navigator > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-h);
  padding: 0 var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--ink);
}
.nav-menu > summary::-webkit-details-marker,
.navigator > summary::-webkit-details-marker {
  display: none;
}
/* Three bars, drawn: no icon font or image needed. */
.nav-menu > summary::before,
.navigator > summary::before {
  content: "";
  width: 1.1rem;
  height: 0.8rem;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}
.nav-menu[open] > summary,
.navigator[open] > summary {
  background: var(--surface2);
}
.nav-menu-panel {
  position: absolute;
  z-index: 40;
  top: 100%;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  max-height: calc(100vh - 6rem);
  /* biome-ignore lint/suspicious/noDuplicateProperties: 100vh is the fallback for browsers without dvh */
  max-height: calc(100dvh - 6rem);
  overflow-y: auto;
  padding: var(--space-3) var(--frame-pad) var(--space-4);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.nav-menu-panel nav {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
  gap: var(--space-1) var(--space-2);
}
.nav-menu-panel nav a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}
.nav-menu-panel nav a:hover {
  background: var(--surface2);
}
.nav-menu-panel nav a[aria-current="page"] {
  background: var(--surface2);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--bronze);
}
.nav-menu-panel .menu-areas a {
  font-weight: 600;
}
.nav-menu-panel .group {
  grid-column: 1 / -1;
  margin-top: var(--space-2);
  font-family: var(--mono);
  font-size: var(--font-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-menu-panel .menu-subnav {
  border-top: 1px solid var(--line);
  padding-top: var(--space-2);
}
.nav-menu-panel .who {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: var(--space-2);
}
.nav-menu-panel .who span {
  text-align: left;
}
/* The area's menu (Project, Configuration with its groups, Account) and the breadcrumb. */
nav.subnav {
  align-items: center;
  gap: 0 var(--space-4);
  padding: 0 var(--frame-pad);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.subnav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-h);
  border-bottom: 2px solid transparent;
}
.subnav a[aria-current="page"] {
  border-bottom-color: var(--bronze);
  color: var(--ink);
}
.subnav .group {
  margin-left: var(--space-3);
  font-family: var(--mono);
  font-size: var(--font-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.subnav .group:first-child {
  margin-left: 0;
}
nav.crumbs {
  gap: 0 6px;
  align-items: center;
  font-size: var(--font-sm);
  color: var(--muted);
  margin: calc(-1 * var(--space-2)) 0 var(--space-3);
}
.crumbs a {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
}
.crumbs a,
.crumbs span {
  overflow-wrap: anywhere;
}
/* Between 48rem and 72rem: brand, switcher, badge and Menu in one row; the area menu stays below. */
@media (max-width: 71.99rem) {
  .top {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand menu";
  }
  .top-project {
    grid-template-columns: auto minmax(0, 22rem) minmax(0, 1fr) auto auto auto;
    grid-template-areas: "brand switcher . chat badge menu";
  }
  .top > .areas,
  .top > .who {
    display: none;
  }
  .top > .nav-menu {
    display: block;
  }
}
@media (min-width: 48rem) {
  /* The area menu is visible from 48rem: the Menu then holds the areas and the person only. */
  .nav-menu-panel .menu-subnav {
    display: none;
  }
}
/* Phones: the switcher and the badge get a row of their own; the area menu moves into the Menu. */
@media (max-width: 47.99rem) {
  .top-project {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand chat menu"
      "switcher switcher badge";
  }
  .top > .switcher > summary {
    min-width: 0;
    max-width: none;
  }
  nav.subnav {
    display: none;
  }
}
/* Phones: the brand's "console" label gives way to the chat button and the Menu. */
@media (max-width: 30rem) {
  .brand em {
    display: none;
  }
}
@media (max-width: 24rem) {
  /* The smallest phones: the Menu shows its icon only (its name stays for screen readers), so the brand, the chat
     button and the Menu share one row. */
  .nav-menu > summary {
    gap: 0;
    padding: 0 var(--space-2);
    min-width: var(--tap);
    justify-content: center;
  }
  .nav-menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
@media (pointer: coarse), (max-width: 47.99rem) {
  .crumbs a,
  .subnav a {
    min-height: var(--tap);
  }
  .crumbs a {
    min-width: var(--tap);
    justify-content: center;
  }
}

/*
 * The Node console's top bar (docs/27; revamped 2026-10-12 at the owner's request): one row at every width. From
 * the left: the brand, the project switcher, the areas (from 64rem; in the Menu below), then on the right the chat,
 * Needs you, the account menu (from 48rem; in the Menu on phones) and the Menu (below 64rem). Long names are cut
 * with an ellipsis, never wrapped: the whole name is in the title and in the menus.
 */
.top.top-node {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-2);
  min-block-size: 3.5rem;
  padding-block: 6px;
}
.top-node > * {
  min-inline-size: 0;
}
.top-node > .brand {
  flex: 0 0 auto;
}
.top-node > .switcher {
  flex: 0 1 19rem;
}
.top-node > .areas {
  flex: 0 0 auto;
}
.top-node > .top-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline-start: auto;
}
.top-node .switcher > summary {
  min-inline-size: 0;
  max-inline-size: none;
  min-block-size: var(--control-h);
  padding-block: 3px;
  border-radius: var(--radius);
}
.top-node .switcher > summary .label {
  line-height: 1.15;
}
.top-node .switcher > summary b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  line-height: 1.25;
}
/* Needs you: a bell and the count; its words beside it on wide screens. */
.top-node .badge {
  position: relative;
  justify-content: center;
  min-inline-size: var(--control-h);
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm);
}
.top-node .badge:hover,
.top-node .badge:focus-visible {
  background: var(--surface2);
  color: var(--ink);
}
.badge-icon {
  flex: none;
}
/* Agentic City: the map on a soft bronze tile, warmer on hover and on its own page. */
.city-link .city-icon {
  box-sizing: content-box;
  padding: 5px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--bronze-ink) 13%, transparent);
  color: var(--bronze-ink);
  transition: background-color 0.15s ease;
}
.city-link:hover .city-icon,
.city-link[aria-current="page"] .city-icon {
  background: color-mix(in srgb, var(--bronze-ink) 22%, transparent);
}
.city-link .badge-label {
  letter-spacing: 0.01em;
}
@media (prefers-reduced-motion: reduce) {
  .city-link .city-icon {
    transition: none;
  }
}
.top-node .badge-label {
  display: none;
}
.top-node .badge .count {
  position: absolute;
  inset-block-start: 1px;
  inset-inline-end: 0;
  line-height: 1.15rem;
}
/* The account menu: the person's initials; their name, address and roles, Sign-in and devices, Sign out. */
.account-menu {
  position: relative;
}
.account-menu > summary {
  list-style: none;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  inline-size: var(--control-h);
  block-size: var(--control-h);
  border-radius: 999px;
}
.account-menu > summary::-webkit-details-marker {
  display: none;
}
.avatar {
  display: inline-grid;
  place-content: center;
  inline-size: 2rem;
  block-size: 2rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bronze) 18%, var(--surface));
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.account-menu > summary:hover .avatar,
.account-menu[open] > summary .avatar {
  box-shadow: 0 0 0 2px var(--line-strong);
}
.account-panel {
  position: absolute;
  z-index: 30;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  inline-size: min(20rem, calc(100vw - 2 * var(--gutter)));
  display: grid;
  gap: 2px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.account-who {
  display: grid;
  gap: 2px;
  margin: 0 0 4px;
  padding: var(--space-2) var(--space-3) var(--space-3);
  border-block-end: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.account-panel a,
.account-panel button {
  display: flex;
  align-items: center;
  inline-size: 100%;
  min-block-size: var(--control-h);
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  text-align: start;
}
.account-panel form {
  margin: 0;
}
/* Sign out reads as an item of the menu, like the link above it (not as the global link-like button). */
.account-panel form button.link {
  justify-content: flex-start;
  padding: 0 var(--space-3);
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
}
.account-panel a:hover,
.account-panel a:focus-visible,
.account-panel button:hover,
.account-panel button:focus-visible {
  background: var(--surface2);
}
/* The Menu, below 64rem: the areas, and on phones the person and Sign out. */
.top-node .nav-menu {
  display: block;
}
.top-node .nav-menu-panel .who {
  display: none;
}
/*
 * The section bar below the top bar (docs/27, 2026-10-13): the section's name, which opens the area's other sections,
 * then the section's pages as tabs in one row that scrolls sideways when it does not fit (the current tab in view).
 */
.top-node ~ nav.subnav {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0 var(--space-3);
}
.subnav-tabs {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0 var(--space-4);
  min-inline-size: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.subnav-tabs::-webkit-scrollbar {
  display: none;
}
.subnav-tabs > a {
  flex: 0 0 auto;
  white-space: nowrap;
}
.section-switch,
.section-name {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding-inline-end: var(--space-3);
  border-inline-end: 1px solid var(--line);
  margin-block: var(--space-2);
}
.section-switch > summary,
.section-name {
  font-family: var(--mono);
  font-size: var(--font-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.section-switch > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  min-block-size: var(--control-h);
  padding: 0 var(--space-2);
  margin-inline-start: calc(-1 * var(--space-2));
  border-radius: var(--radius-sm);
}
.section-switch > summary::-webkit-details-marker {
  display: none;
}
.section-switch > summary::after {
  content: "\25BE";
  letter-spacing: 0;
}
.section-switch[open] > summary::after {
  content: "\25B4";
}
.section-switch > summary:hover,
.section-switch > summary:focus-visible,
.section-switch[open] > summary {
  background: var(--surface2);
  color: var(--ink);
}
.section-switch .menu {
  position: absolute;
  z-index: 30;
  inset-block-start: calc(100% + 4px);
  inset-inline-start: calc(-1 * var(--space-2));
  inline-size: max-content;
  min-inline-size: 14rem;
  max-inline-size: min(26rem, calc(100vw - 2 * var(--gutter)));
  display: grid;
  gap: 2px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.subnav .section-switch .menu a {
  display: grid;
  gap: 1px;
  min-block-size: var(--tap);
  align-content: center;
  padding: var(--space-1) var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
}
.section-switch .menu a span {
  font-size: var(--font-sm);
  color: var(--muted);
  overflow-wrap: anywhere;
}
.section-switch .menu a:hover,
.section-switch .menu a:focus-visible {
  background: var(--surface2);
}
.section-switch .menu a[aria-current="true"] {
  background: var(--surface2);
  box-shadow: inset 3px 0 0 var(--bronze);
}
/*
 * The menu (docs/27, 2026-10-13): every area's sections and pages under the top bar, each page with what it is for.
 * The top bar's areas open it at their sections (from 64rem); below that its button, "Menu", with tabs for the areas.
 */
.top.top-node {
  position: relative;
}
.navigator {
  position: static;
}
.navigator-panel {
  position: absolute;
  z-index: 40;
  inset-block-start: 100%;
  inset-inline: 0;
  display: grid;
  gap: var(--space-4);
  max-block-size: calc(100vh - 4rem);
  /* biome-ignore lint/suspicious/noDuplicateProperties: 100vh is the fallback for browsers without dvh */
  max-block-size: calc(100dvh - 4rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-4) var(--frame-pad) var(--space-5);
  background: var(--surface);
  border-block-end: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.navigator-tabs {
  display: flex;
  gap: var(--space-1);
  overflow-x: auto;
  scrollbar-width: none;
  border-block-end: 1px solid var(--line);
}
.navigator-tabs[hidden],
.navigator-area[hidden] {
  display: none;
}
.navigator-tab {
  appearance: none;
  font: inherit;
  flex: 1 1 auto;
  max-inline-size: 12rem;
  min-block-size: var(--tap);
  padding: 0 var(--space-2);
  line-height: var(--leading-tight);
  white-space: nowrap;
  overflow-wrap: normal;
  border: 0;
  border-block-end: 2px solid transparent;
  background: none;
  color: var(--ink2);
  font-weight: 600;
  cursor: pointer;
}
.navigator-tab:hover {
  color: var(--ink);
}
.navigator-tab[aria-selected="true"] {
  color: var(--ink);
  border-block-end-color: var(--bronze);
}
.navigator-area {
  display: grid;
  gap: var(--space-3);
}
.navigator-name {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--font-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.navigator-name span {
  font-family: var(--body);
  font-size: var(--font-sm);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
/* With the script the tabs name the area; the project's name stays. */
.navigator[data-tabs] .navigator-name {
  display: none;
}
.navigator[data-tabs] #nav-area-project .navigator-name {
  display: block;
}
.navigator-sections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: var(--space-4) var(--space-5);
}
.navigator-section h3 {
  margin: 0 0 var(--space-1);
  padding-inline: var(--space-3);
  font-family: var(--mono);
  font-size: var(--font-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.navigator-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.navigator-section a {
  display: grid;
  gap: 1px;
  align-content: center;
  min-block-size: var(--tap);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
}
.navigator-section a:hover,
.navigator-section a:focus-visible {
  background: var(--surface2);
}
.navigator-section a[aria-current="page"] {
  background: var(--surface2);
  box-shadow: inset 3px 0 0 var(--bronze);
}
.nav-name {
  font-weight: 600;
}
.nav-about {
  font-size: var(--font-sm);
  line-height: var(--leading-tight);
  color: var(--muted);
}
.navigator-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding-block-start: var(--space-3);
  border-block-start: 1px solid var(--line);
}
.navigator-foot .who {
  justify-content: space-between;
  flex: 1 1 auto;
}
.navigator-foot > a {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--tap);
}
.navigator-foot .who span {
  text-align: start;
}
/* The areas in the top bar open the menu: a chevron says so, and the area it shows is marked. */
.top-node .areas a[data-nav-area]::after {
  content: "";
  inline-size: 0.38em;
  block-size: 0.38em;
  margin-inline-start: 0.5em;
  border-inline-end: 1.5px solid currentColor;
  border-block-end: 1.5px solid currentColor;
  transform: translateY(-0.15em) rotate(45deg);
  opacity: 0.55;
}
.top-node .areas a[aria-expanded="true"] {
  background: var(--surface2);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--bronze);
}
.top-node .areas a[aria-expanded="true"]::after {
  transform: translateY(0.1em) rotate(225deg);
}
/* From 48rem the account menu holds the person and Sign out. */
@media (min-width: 48rem) {
  .navigator-foot {
    display: none;
  }
}
/* Phones: the three areas' tabs fit side by side, whole words. */
@media (max-width: 47.99rem) {
  .navigator-tab {
    font-size: var(--font-label);
  }
}
/* From 64rem the areas in the top bar open the menu: its own button and tabs give way. */
@media (min-width: 64rem) {
  .top-node .navigator > summary,
  .top-node .navigator-tabs {
    display: none;
  }
  .navigator[data-tabs] .navigator-area:not([hidden]) .navigator-name {
    display: none;
  }
}
@media (min-width: 64rem) {
  .top-node > .areas {
    display: flex;
  }
  .top-node .badge-label {
    display: inline;
  }
  .top-node .badge .count {
    position: static;
  }
  .top-node .nav-menu {
    display: none;
  }
}
@media (max-width: 63.99rem) {
  .top-node > .areas {
    display: none;
  }
}
@media (max-width: 71.99rem) {
  .top-node .brand em {
    display: none;
  }
}
/* Phones: the switcher takes the room left; the account moves into the Menu; the brand keeps its mark only. */
@media (max-width: 47.99rem) {
  .top.top-node {
    gap: 6px;
    min-block-size: 3.25rem;
  }
  .top-node > .switcher {
    flex: 1 1 auto;
  }
  .top-node .switcher > summary {
    padding-inline-start: var(--space-2);
  }
  .top-node .switcher > summary .label {
    display: none;
  }
  /* The project list opens across the screen under the bar, whatever the switcher's width. */
  .top-node > .switcher {
    position: static;
  }
  .top-node .switcher .menu {
    inset-inline: var(--gutter);
    inline-size: auto;
    min-inline-size: 0;
    max-inline-size: none;
  }
  .top-node .account-menu {
    display: none;
  }
  .top-node .nav-menu-panel .who {
    display: flex;
  }
  .top-node .nav-menu > summary,
  .top-node .navigator > summary {
    gap: 0;
    padding: 0 var(--space-2);
    min-inline-size: var(--tap);
    justify-content: center;
  }
  .top-node .nav-menu-label {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .top-node .badge,
  .top-node .account-menu > summary {
    min-inline-size: var(--tap);
    min-block-size: var(--tap);
  }
}
@media (max-width: 29.99rem) {
  .top-node .brand-word {
    display: none;
  }
  .top-node > .brand {
    justify-content: center;
    min-inline-size: var(--tap);
  }
}
/* The section tabs under a finger: each a full target, the short words too. */
@media (pointer: coarse), (max-width: 47.99rem) {
  .subnav-tabs {
    gap: 0;
  }
  .subnav-tabs a {
    justify-content: center;
    min-inline-size: var(--tap);
    padding-inline: var(--space-2);
  }
  .section-switch > summary {
    min-block-size: var(--tap);
  }
}

/* 4. Layout ---------------------------------------------------------------------------------------- */
main {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-5) var(--gutter) var(--space-7);
}
.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
}
.stack > *,
.cards > *,
.columns > *,
.providers > *,
.kpis > * {
  min-width: 0;
}
.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr));
  gap: var(--space-4) var(--space-5);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: var(--space-3);
}
.providers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: var(--space-3);
}
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.kpis > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3) clamp(var(--space-3), 2vw, var(--space-4));
}
.kpis b {
  display: block;
  font-size: var(--font-kpi);
  line-height: var(--leading-tight);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.kpis span {
  color: var(--muted);
  font-size: var(--font-sm);
}
/* Content that is genuinely wide (a table of many numbers) scrolls inside this box, never the page. */
.scroll-x {
  position: relative;
  overflow-x: auto;
  max-width: 100%;
}

/* 5. Forms ----------------------------------------------------------------------------------------- */
/* A label holds its text above its control; help goes under the control in .help. */
label {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-1);
  align-content: start;
  min-width: 0;
  font-weight: 500;
  font-size: var(--font-label);
}
input,
select,
textarea,
button {
  font: inherit;
}
/* Text fields, selects and text areas fill their container (zero specificity: per-kind widths follow). */
:where(
  input:not(
    [type="checkbox"],
    [type="radio"],
    [type="hidden"],
    [type="submit"],
    [type="button"],
    [type="reset"],
    [type="file"],
    [type="range"],
    [type="color"],
    [type="image"]
  ),
  select,
  textarea
) {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--control-h);
  padding: var(--space-2) 0.625rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--font-base);
  font-weight: 400;
  line-height: 1.4;
}
/* Under a finger and on phones, fields are never below 16px (iOS zooms into smaller ones). */
@media (pointer: coarse), (max-width: 47.99rem) {
  input,
  select,
  textarea {
    font-size: max(1rem, 16px);
  }
}
textarea {
  resize: vertical;
}
/* File fields: the browser's button is a full-size target (44px under a finger and on phones); the name wraps. */
input[type="file"] {
  max-width: 100%;
  min-height: var(--control-h);
  font: inherit;
  color: var(--muted);
}
input[type="file"]::file-selector-button {
  min-height: var(--control-h);
  margin-right: var(--space-3);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
/* Sensible widths by kind: short numbers and dates stay short, single lines stop at 48rem, URLs and text
   areas use the width they are given. Pages can size a field with .field-xs/-s/-m/-l/-full. */
input[type="number"],
input[inputmode="numeric"],
input[inputmode="decimal"] {
  max-width: 12rem;
}
input[type="date"],
input[type="time"],
input[type="month"],
input[type="week"],
input[type="datetime-local"] {
  max-width: 16rem;
}
input:not([type]),
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"] {
  max-width: 48rem;
}
/* Selects draw their own chevron: browsers that style them natively (Safari, iOS) ignore their height. */
select {
  max-width: 36rem;
  /* WebKit counts a long option's hidden text as overflow (sideways page scroll in Safari): keep it inside. */
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 1.05rem) 55%,
    calc(100% - 0.7rem) 55%;
  background-size: 0.35rem 0.35rem;
  background-repeat: no-repeat;
}
select[multiple],
select[size]:not([size="1"]) {
  padding-right: 0.625rem;
  background-image: none;
}
:is(input, select, textarea).field-xs {
  max-width: 7rem;
}
:is(input, select, textarea).field-s {
  max-width: 12rem;
}
:is(input, select, textarea).field-m {
  max-width: 22rem;
}
:is(input, select, textarea).field-l {
  max-width: 36rem;
}
:is(input, select, textarea).field-full {
  max-width: 100%;
}
input[type="checkbox"],
input[type="radio"] {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: var(--accent-fill);
}
.help {
  display: block;
  font-size: var(--font-sm);
  font-weight: 400;
  color: var(--muted);
}
.field-error {
  display: block;
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--crit);
}
[aria-invalid="true"] {
  border-color: var(--crit);
}
fieldset {
  min-width: 0;
  margin: 0;
  padding: var(--space-3) var(--space-4) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
legend {
  padding: 0 var(--space-1);
  font-weight: 600;
  font-size: var(--font-label);
}
/* A checkbox with its label: the whole row is the target; the text wraps beside the box. */
.check {
  display: flex;
  gap: var(--space-1) var(--space-2);
  align-items: center;
  min-height: 1.75rem;
  min-width: 0;
  font-weight: 400;
}
/* Their text (a bare text node too: it cannot be given min-width) breaks anywhere rather than overflow. */
.check,
.choice {
  overflow-wrap: anywhere;
}
.check > *,
.choice > * {
  min-width: 0;
}
@media (pointer: coarse), (max-width: 47.99rem) {
  .check,
  .choice {
    min-height: var(--tap);
  }
  input[type="checkbox"],
  input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
  }
}
/*
 * The grid form: labels above fields, as many columns as fit (one on a phone, up to three at 64rem),
 * fieldsets, wide fields and actions across the whole form.
 */
.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: var(--space-4) var(--space-5);
  align-items: start;
  max-width: var(--form-max);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(var(--space-3), 3vw, var(--space-5));
}
.grid-form > * {
  min-width: 0;
}
.grid-form .wide,
.grid-form > fieldset,
.grid-form > details,
.grid-form > .notice,
.actions {
  grid-column: 1 / -1;
}
/*
 * A person's access (docs/40): Owner or roles, one per row with what each opens; then the projects, in columns that
 * wrap. Inside any form, the add form's grid included.
 */
.access-fields {
  display: grid;
  gap: var(--space-2);
}
.access-list {
  display: grid;
  gap: var(--space-1);
}
.access-roles {
  padding-left: var(--space-4);
}
.access-projects {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  gap: var(--space-1) var(--space-4);
  padding-left: var(--space-4);
}
.access-fields .field-label {
  margin: var(--space-2) 0 0;
}
/* The smallest phones: a form's own padding gives way to its fields. */
@media (max-width: 22.5rem) {
  .grid-form {
    padding: var(--space-2);
  }
}
/* Checkbox lists in columns that wrap; anything else in a fieldset (help, sub-lists) spans it. */
.grid-form fieldset {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: var(--space-2) var(--space-4);
  align-items: start;
}
.grid-form fieldset > :not(label):not(legend) {
  grid-column: 1 / -1;
}
.grid-form .span-all {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: var(--space-4) var(--space-5);
  align-items: start;
  margin-top: var(--space-3);
}
.grid-form .span-all[hidden] {
  display: none;
}
.grid-form .span-all > * {
  min-width: 0;
}
.grid-form fieldset fieldset.sub {
  border: 0;
  padding: 0;
  margin: 0;
}
.grid-form fieldset fieldset.sub legend {
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--muted);
  padding: 0;
  margin-bottom: var(--space-1);
}
/* A list of choices one under the other (Defaults' network for new projects), each with its line beside it. */
.grid-form fieldset.net {
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-1);
}
.grid-form fieldset.net fieldset.net {
  margin-top: var(--space-2);
}
/* A token budget: amount and unit side by side, the explanation under them. */
.grid-form fieldset.budget {
  grid-column: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-2) var(--space-3);
}
.grid-form fieldset.budget > label {
  flex: 1 1 8.5rem;
}
.grid-form fieldset.budget p {
  flex-basis: 100%;
  margin: 0;
}
.grid-form fieldset.budget input {
  max-width: none;
}
/* A row of fields and a button: each field at least 12rem (or the whole row), the button at the end. */
.row-form,
form.inline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: flex-end;
}
.row-form > label,
form.inline > label {
  flex: 1 1 12rem;
}
.row-form > label.grow,
.row-form .grow {
  flex: 999 1 16rem;
  min-width: min(100%, 12rem);
}
.row-form > a {
  align-self: center;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
}
details.edit > summary {
  cursor: pointer;
  font-weight: 600;
  margin: var(--space-3) 0;
}
/* A section that opens (details.edit) directly on a page, holding a form or a text: closed, its title alone; open,
   one card whose header is the title and whose body is what it opened, like a dropdown of the title rather than a
   separate card under it. Sections inside cards keep their plain look. */
main > details.edit[open]:has(> form, > pre) {
  max-width: var(--form-max);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-block: var(--space-4);
}
main > details.edit[open]:has(> form, > pre) > summary {
  margin: 0;
  padding: var(--space-3) clamp(var(--space-3), 3vw, var(--space-5));
  border-bottom: 1px solid var(--line);
  background: var(--surface2);
  border-radius: var(--radius) var(--radius) 0 0;
}
main > details.edit[open] > form.grid-form {
  max-width: none;
  border: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}
main > details.edit[open] > pre.output {
  margin: 0;
  border: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}
/* Blocks directly on a page keep apart: a form, a panel, a card list or a table never touches the next one; panels
   keep the forms' column, so a page's stacked blocks line up. */
main > .charter {
  max-width: var(--form-max);
}
main > .grid-form,
main > .charter,
main > .table-wrap,
main > .confirm,
main > .providers,
main > .cards {
  margin-block: var(--space-4);
}
summary {
  cursor: pointer;
}
@media (pointer: coarse), (max-width: 47.99rem) {
  details:not(.switcher):not(.nav-menu):not(.choices) > summary {
    min-height: var(--tap);
    padding-block: var(--space-2);
  }
}

/* 6. Buttons and actions --------------------------------------------------------------------------- */
button {
  cursor: pointer;
}
/* Buttons: .primary (filled, one per form), .button or a button without a class (outlined), .link. */
button.primary,
button:not([class]),
button.secondary,
a.button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-h);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
button.primary,
a.button.primary {
  background: var(--accent-fill);
  color: var(--on-accent);
  border: 0;
}
button.primary:hover,
a.button.primary:hover {
  filter: brightness(0.95);
}
button.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
button:not([class]),
button.secondary,
a.button,
.button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}
button:not([class]):hover,
button.secondary:hover,
a.button:hover,
.button:hover {
  background: var(--surface2);
}
/* A button that reads like a link (Sign out, Disable, Deny). */
button.link {
  background: none;
  border: 0;
  color: var(--bronze-ink);
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
@media (pointer: coarse), (max-width: 47.99rem) {
  button.link {
    min-height: var(--tap);
    padding: 0 var(--space-1);
  }
}
.row-actions {
  display: flex;
  gap: var(--space-2) var(--space-4);
  align-items: center;
  flex-wrap: wrap;
}
.row-actions form {
  margin: 0;
}
.row-actions.bulk {
  gap: var(--space-2);
}
@media (pointer: coarse), (max-width: 47.99rem) {
  .row-actions > a,
  .actions > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tap);
    min-width: var(--tap);
  }
}
/* Under a finger and on phones, a link or a label alone in a table cell or a card's title is a 44px target
   (a label for screen readers only stays a pixel: it is no target). */
@media (pointer: coarse), (max-width: 47.99rem) {
  td > label:not(.sr-only):not(.visually-hidden),
  td > a,
  td > div > a,
  .card h3 > a,
  .provider h3 > a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    min-width: var(--tap);
  }
}
/* Phones: the primary action takes the whole width. */
@media (max-width: 30rem) {
  button.primary,
  a.button.primary {
    width: 100%;
  }
  .row-actions > form:has(> button.primary),
  .row-form > button.primary {
    flex: 1 1 100%;
  }
}

/* 7. Tables ---------------------------------------------------------------------------------------- */
/*
 * Every table sits in .table-wrap. On a narrow container (48rem or less) a table with data-cards turns into
 * stacked cards, each cell with its column's label (data-label: rendered by the page or the table helper,
 * else filled in by console.js from the table's head). A table in .table-wrap.scroll-x is genuinely wide
 * data: it keeps its columns and scrolls inside its box.
 */
.table-wrap {
  /* Positioned: content placed absolutely inside (screen-reader labels) scrolls with the table. */
  position: relative;
  container-type: inline-size;
  overflow-x: auto;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 0.625rem var(--space-3);
  border-top: 1px solid var(--line);
  vertical-align: top;
}
/*
 * Cells keep words and ids whole: a column is never narrower than its longest word. A long token that may
 * break (JSON, a digest, a URL) is marked .break-anywhere; a short value that must not wrap, .nowrap.
 */
thead th {
  border-top: 0;
  background: var(--surface2);
  font-family: var(--mono);
  font-size: var(--font-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Fields in a table keep their natural width: a column is never squeezed below its select. */
td :where(select, input:not([type="checkbox"], [type="radio"], [type="hidden"])) {
  width: auto;
}
td .grid-form,
td .row-form {
  min-width: 16rem;
}
/* Numbers: right-aligned, digits of equal width, never broken (a breakdown under a number may wrap). */
th.num,
td.num {
  text-align: right;
}
td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow-wrap: normal;
}
td.num > div,
td.num > details {
  white-space: normal;
}
/* A model's copy in another weight format (Models): under its original, joined by a dashed line and set in. */
tr.copy-row > td {
  border-top-style: dashed;
}
tr.copy-row > td:first-child {
  padding-left: calc(var(--space-3) * 2);
}
/*
 * Genuinely wide data scrolls inside its box on a narrow screen: there its columns stay readable (at least
 * 8rem of text) and the first column, which names the row, stays in view.
 */
@container (max-width: 48rem) {
  .scroll-x > table > * > tr > :not(.num) {
    min-width: 8rem;
  }
  .scroll-x > table > * > tr > :first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--surface);
    box-shadow: 1px 0 0 var(--line);
  }
  .scroll-x > table > thead > tr > :first-child {
    background: var(--surface2);
  }
}
/* A table of keys and values (row headers, no head) puts each key above its value in a narrow container. */
@container (max-width: 36rem) {
  table:not([data-cards]):has(> tbody > tr > th[scope="row"]),
  table:not([data-cards]):has(> tbody > tr > th[scope="row"]) > tbody,
  table:not([data-cards]):has(> tbody > tr > th[scope="row"]) > tbody > tr,
  table:not([data-cards]):has(> tbody > tr > th[scope="row"]) > tbody > tr > * {
    display: block;
  }
  table:not([data-cards]) > tbody > tr > th[scope="row"] {
    padding-bottom: 0;
    font-family: var(--mono);
    font-size: var(--font-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  table:not([data-cards]) > tbody > tr > th[scope="row"] + td {
    border-top: 0;
    padding-top: var(--space-1);
  }
}
@container (max-width: 48rem) {
  table[data-cards]
    td
    :where(select, input:not([type="checkbox"], [type="radio"], [type="hidden"]), textarea) {
    width: 100%;
  }
  table[data-cards] td .grid-form,
  table[data-cards] td .row-form {
    min-width: 0;
  }
  table[data-cards] > thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  table[data-cards],
  table[data-cards] > tbody,
  table[data-cards] > tbody > tr,
  table[data-cards] > tbody > tr > td,
  table[data-cards] > tbody > tr > th {
    display: block;
  }
  /* A card lays its fields out in columns of at least 11rem: one column on a phone, more when there is room;
     the first field (what the row is) and a cell across all columns take the whole card. */
  table[data-cards] > tbody > tr {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
    column-gap: var(--space-4);
    padding: var(--space-2) var(--space-3);
    border-top: 1px solid var(--line);
  }
  table[data-cards] > tbody > tr:first-child {
    border-top: 0;
  }
  table[data-cards] > tbody > tr > td,
  table[data-cards] > tbody > tr > th {
    min-width: 0;
    border-top: 0;
    padding: var(--space-1) 0;
    text-align: left;
    white-space: normal;
  }
  table[data-cards] > tbody > tr > :first-child,
  table[data-cards] > tbody > tr > [colspan] {
    grid-column: 1 / -1;
  }
  table[data-cards] > tbody > tr > td:empty {
    display: none;
  }
  /* A field is narrow in a card: a long pill ("connected as ana@example.com") wraps inside it. */
  table[data-cards] td .pill {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  table[data-cards] > tbody > tr > [data-label]:not([data-label=""])::before {
    content: attr(data-label);
    display: block;
    font-family: var(--mono);
    font-size: var(--font-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  /* A model's copy as a card: set in as a whole, joined to its original's card by a dashed line. */
  table[data-cards] > tbody > tr.copy-row {
    border-top-style: dashed;
    padding-left: calc(var(--space-3) * 2);
  }
  table[data-cards] > tbody > tr.copy-row > td:first-child {
    padding-left: 0;
  }
}

/* 8. Components ------------------------------------------------------------------------------------ */
.auth {
  max-width: 28rem;
  margin: clamp(var(--space-4), 5vw, var(--space-7)) auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-4), 5vw, 1.75rem);
}
/* The sign-in page's buttons: full width, easy to tap; the organisation's button first, the passkey under it. */
.auth > .button,
.auth > button {
  display: flex;
  width: 100%;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.auth > .button + button {
  margin-top: var(--space-2);
}
.status {
  min-height: 1.4em;
  color: var(--muted);
}
.status.err {
  color: var(--crit);
}
.status.ok {
  color: var(--ok);
}
.notice {
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: var(--radius-sm);
  padding: 0.625rem var(--space-3);
}
.notice.info {
  background: var(--surface2);
  color: var(--ink2);
}
.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: var(--font-xs);
  line-height: 1.5;
  padding: 1px 8px;
  border-radius: 999px;
  max-width: 100%;
  overflow-wrap: anywhere;
  /* A state without a colour of its own (running, superseded) still reads as a pill. */
  background: var(--surface2);
  color: var(--ink2);
}
td .pill {
  white-space: nowrap;
  overflow-wrap: normal;
}
.pill.ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.pill.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.pill.crit {
  background: var(--crit-bg);
  color: var(--crit);
}
.count {
  font-family: var(--mono);
  font-size: var(--font-xs);
  font-weight: 600;
  background: var(--surface2);
  color: var(--ink2);
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 4px;
}
.token {
  width: 100%;
  font-family: var(--mono);
  font-size: var(--font-sm);
  overflow-wrap: anywhere;
}
pre.output {
  margin: 6px 0;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: var(--font-sm);
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
}
.empty {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: clamp(var(--space-4), 4vw, 1.375rem);
  color: var(--ink2);
}
.card,
.provider {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  align-content: start;
}
.provider {
  gap: 10px;
}
.card > *,
.provider > * {
  min-width: 0;
}
/* A card's own heading starts at its top edge: the card's padding is the space above it. */
.card > h2:first-child,
.card > h3:first-child {
  margin-top: 0;
}
/* The task form's upload (docs/24) and the certificate fields' "Choose files…": the label is the control, its file
   input covers it. */
.task-upload,
.file-pick {
  position: relative;
  cursor: pointer;
}
.task-upload input[type="file"],
.file-pick input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}
.task-upload:focus-within,
.file-pick:focus-within {
  outline: 2px solid var(--bronze);
  outline-offset: 2px;
}
.task-uploads {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.task-uploads progress {
  width: 6rem;
  height: 0.5rem;
}
/* A job's steps (Install a Node, docs/38): a mark per step instead of a number; the running one stands out. */
ol.checklist {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0;
  display: grid;
  gap: 6px;
}
ol.checklist > li {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: var(--space-2);
  align-items: baseline;
}
ol.checklist .mark {
  font-family: var(--mono);
  text-align: center;
}
ol.checklist .step-ok .mark {
  color: var(--ok);
}
ol.checklist .step-skipped .mark {
  color: var(--ink2);
}
ol.checklist .step-failed {
  color: var(--crit);
}
ol.checklist .step-running {
  font-weight: 600;
}
.card h3,
.provider h3 {
  margin: 0;
  font-size: var(--font-md);
  overflow-wrap: anywhere;
}
.provider header {
  display: flex;
  align-items: center;
  gap: var(--space-1) 10px;
  flex-wrap: wrap;
}
.provider header > * {
  min-width: 0;
}
.charter {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--bronze);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
}
.charter ul {
  margin: 4px 0 8px;
}
.confirm {
  background: var(--warn-bg);
  border: 1px solid var(--warn);
  border-radius: var(--radius);
  padding: 14px var(--space-4);
  margin: var(--space-3) 0 18px;
}
.confirm h3 {
  margin: 0 0 6px;
  font-size: var(--font-md);
}
.confirm p {
  margin: 6px 0;
}

/* 9. Page pieces ----------------------------------------------------------------------------------- */
/* A connector's tools in two groups, Reads and Changes, with their bulk actions and the confirmation of one. */
.tool-group {
  margin: 18px 0 var(--space-5);
}
.group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px var(--space-4);
  margin-bottom: var(--space-2);
}
.group-head h3 {
  margin: 0;
  font-size: var(--font-md);
}
.group-head p {
  margin: 0;
  flex: 1;
  min-width: min(100%, 14rem);
}
/* Checkbox lists with a line of explanation per choice, and dropdowns of them (a native disclosure: no script). */
.choice {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  font-weight: 400;
}
.choice input {
  margin-top: 0.2rem;
}
.choice b {
  font-weight: 600;
}
.choice .desc {
  display: block;
}
.choice-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
  gap: 10px 18px;
  width: 100%;
}
/* One choice alone (a single switch such as "Agents decide instead of asking") spans the row, its line at reading width. */
.choice-list:has(> :only-child) {
  grid-template-columns: minmax(0, 1fr);
}
.choice-list:has(> :only-child) .desc {
  max-width: var(--measure);
}
/* A provider's models: the ones to tick show once "Only the ones ticked" is picked. */
.models-rule:has(input[name="mode"][value="all"]:checked) .models-rule-list {
  display: none;
}
/* Within frontier labs (docs/76 B): a project's frontier boxes show while frontier labs (C3) is ticked. */
.where-processed:not(:has(input[name="exposure"][value="C3"]:checked)) .frontier-boxes {
  display: none;
}
.frontier-boxes {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
/* An agent role's Belongs to: the projects to tick show once "Chosen projects" is picked. */
.belongs:has(input[name="scopeMode"][value="every"]:checked) .belongs-projects {
  display: none;
}
.choices > summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--control-h);
  padding: var(--space-2) 2.25rem var(--space-2) 0.625rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.choices > summary::-webkit-details-marker {
  display: none;
}
.choices > summary::after {
  content: "\25BE";
  position: absolute;
  right: var(--space-3);
  color: var(--muted);
}
.choices[open] > summary::after {
  content: "\25B4";
}
.choices-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-3) 2px 2px;
}
.grid-form fieldset.choices-body {
  border: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
}
.choice-group > summary {
  cursor: pointer;
  font-weight: 600;
  margin: 2px 0 6px;
}
.grid-form .choice-group fieldset,
.grid-form fieldset.choice-group {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
  gap: 10px 18px;
}
.grid-form fieldset.choice-group legend {
  font-weight: 600;
  padding: 0;
  margin-bottom: 6px;
}
/*
 * One choice among long names (pickOne, docs/27): a fieldset that reads like a label, and a dropdown of radio
 * cards (a native disclosure) whose summary shows the choice in full, wrapped, never cut off.
 */
fieldset.pick {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.grid-form fieldset.pick {
  display: block;
}
fieldset.pick > legend {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: var(--space-1);
  font-weight: 500;
}
fieldset.pick > legend + * {
  clear: both;
}
.pick-one > summary .picked {
  min-width: 0;
}
.pick-one .choices-body fieldset.choice-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
  gap: 10px 18px;
  margin: 0;
  padding: 0;
  border: 0;
}
.pick-one .choices-body fieldset.choice-group > legend {
  padding: 0;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: var(--font-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.pick-one .choice .desc {
  overflow-wrap: anywhere;
}
fieldset.pick > .help {
  margin-top: var(--space-1);
}
/* "Any model..." when nothing is checked: from the saved state, and live where the browser has :has(). */
.choices .when-some {
  display: none;
}
.choices.some .when-none {
  display: none;
}
.choices.some .when-some {
  display: inline;
}
@supports selector(:has(*)) {
  .choices:has(input:checked) .when-none {
    display: none;
  }
  .choices:has(input:checked) .when-some {
    display: inline;
  }
  .choices:not(:has(input:checked)) .when-none {
    display: inline;
  }
  .choices:not(:has(input:checked)) .when-some {
    display: none;
  }
}
/* Forms of docs/26 (skills, agent profiles, the audited forms). The shared form, table and frame rules above are
   docs/27's; these are the few pieces those forms add. */
/* Parts of a form for one choice (data-when) and filter boxes the script shows: hidden means hidden, whatever the
   element's display. */
[data-when][hidden],
.filter[hidden] {
  display: none !important;
}
/* A skill in the profile form's list: a checkbox with its description, and a link to open the skill. Placed in the
   group's columns like the checkboxes beside it. */
.grid-form .choice-group fieldset > .skill-choice {
  grid-column: auto;
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}
/* A dangerous action behind a confirmation: the summary names it, the form under it says what happens. */
details.confirm-action > summary {
  cursor: pointer;
  color: var(--crit);
  font-weight: 600;
}
details.confirm-action .confirm {
  margin: var(--space-2) 0 0;
}
button.primary.danger {
  background: var(--crit);
  border-color: var(--crit);
  color: var(--on-crit);
}
/* What a skill or a profile is, as a list of facts: label beside value, stacked on phones; long values wrap. */
.facts {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
  gap: var(--space-1) var(--space-3);
  margin: 0;
}
.facts dt {
  font-weight: 600;
}
.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
/* The actions about the facts above them sit a step below, not against the list. */
.facts + .row-actions,
.facts + form {
  margin-top: var(--space-3);
}
ul.plain {
  margin: 0;
  padding-left: 1.1em;
}
/* Links standing alone in these pages' lists (a skill's "Open", the profiles using a skill, the subtask tree) are
   44px targets under a finger and on phones. */
@media (pointer: coarse), (max-width: 47.99rem) {
  .skill-choice > a,
  .facts dd a,
  .subtask-tree a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
  }
}
/* On phones, the sections of these forms keep less padding at their sides: more room for their fields. */
@media (max-width: 30rem) {
  .grid-form fieldset.fields {
    padding-inline: var(--space-2);
  }
}
/* A short number field in a table (a project's caps) keeps its width instead of the column's leftover. */
td > input.field-xs {
  width: 7rem;
}
/* An invisible or direction-changing character in a file shown for review, as its code point. */
mark.hidden-char {
  background: var(--warn-bg);
  color: var(--crit);
  font-weight: 600;
}
@media (max-width: 35rem) {
  .facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .facts dd {
    margin-bottom: var(--space-2);
  }
}
/* People (ADR 0009): a one-time code shown once, large enough to read out, and its link; the account's own pages as
   tabs where the frame has no area menu (the vendor console's Sign-in and Team). */
.code-box {
  max-width: 40rem;
}
input.token.code {
  font-size: var(--font-lg);
  letter-spacing: 0.08em;
}
.code-box .field-label {
  margin: 0;
  font-weight: 500;
  font-size: var(--font-label);
}
/* The link wraps whole, never scrolled or cut off: it is long (the email and the code ride in its fragment). */
.code-link {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  font-family: var(--mono);
  font-size: var(--font-sm);
  overflow-wrap: anywhere;
  background: var(--surface2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  user-select: all;
}
nav.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
}
nav.tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0 var(--space-1);
  border-bottom: 2px solid transparent;
  color: var(--ink2);
}
nav.tabs a[aria-current="page"] {
  border-bottom-color: var(--bronze);
  color: var(--ink);
}

/* Task results (docs/21): one disclosure per file; text wraps and scrolls inside, media stays within the page. */
.result-file {
  margin: var(--space-2) 0;
  padding: var(--space-1) var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.result-file > summary {
  padding-block: var(--space-2);
}
.result-file > summary > .mono {
  font-weight: 600;
}
details.result-more > summary {
  padding-block: var(--space-2);
  cursor: pointer;
}
pre.output.result-text {
  max-height: 60vh;
}
.result-file .doc-source {
  margin-block: var(--space-2);
}
/* Two or more pictures: a gallery. */
/* The task page's Checks (docs/41): coverage, the failing tests, Lighthouse's scores and the CI's checks as rows. */
.check-rows {
  list-style: none;
  margin: 0 0 var(--space-3);
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.check-rows > li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px var(--space-2);
  min-inline-size: 0;
}
.check-rows > li > div {
  flex: 1 1 100%;
}
.evidence-video {
  margin: var(--space-3) 0;
}
.evidence-video video {
  display: block;
  max-inline-size: 100%;
}
@media (pointer: coarse), (max-width: 47.99rem) {
  .check-rows a {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--tap);
  }
}
.result-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: var(--space-3);
  margin-block: var(--space-3);
}
.result-gallery figure {
  margin: 0;
  display: grid;
  gap: var(--space-1);
  align-content: start;
}
.result-gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface2);
}
.result-gallery figcaption {
  font-size: var(--font-sm);
}
/* A document an agent wrote (documents.ts): Markdown rendered at reading width, tables that scroll inside. */
.doc {
  max-width: 72ch;
  margin-block: var(--space-2);
  line-height: var(--leading);
  overflow-wrap: anywhere;
}
.doc h2,
.doc h3,
.doc h4,
.doc h5,
.doc h6 {
  margin: var(--space-4) 0 var(--space-2);
  line-height: var(--leading-tight);
  text-wrap: balance;
}
.doc h2 {
  font-size: var(--font-lg);
}
.doc h3 {
  font-size: var(--font-md);
}
.doc h4,
.doc h5,
.doc h6 {
  font-size: var(--font-base);
}
.doc > :first-child {
  margin-top: 0;
}
.doc p,
.doc ul,
.doc ol {
  margin-block: var(--space-2);
}
.doc li + li {
  margin-top: var(--space-1);
}
.doc blockquote {
  margin: var(--space-2) 0;
  padding-inline-start: var(--space-3);
  border-inline-start: 3px solid var(--line-strong);
  color: var(--ink2);
}
.doc code {
  font-family: var(--mono);
  font-size: 0.92em;
  padding: 0 0.25em;
  border-radius: 3px;
  background: var(--surface2);
}
.doc pre.doc-code {
  max-height: 50vh;
  overflow: auto;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.doc pre.doc-code code {
  padding: 0;
  background: none;
}
.doc hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: var(--space-4);
}
.doc .table-wrap,
.doc-table {
  max-height: 60vh;
  overflow: auto;
}
.doc-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.doc th.al-right,
.doc td.al-right {
  text-align: right;
}
/* The console's guides (Account › Help › Guides): reading width, roomy headings, sections linked from the top. */
.doc.guide {
  max-width: 76ch;
}
.doc.guide h2 {
  margin-block-start: var(--space-6);
  padding-block-start: var(--space-3);
  border-block-start: 1px solid var(--line);
  scroll-margin-block-start: 8rem;
}
.doc.guide h3 {
  margin-block-start: var(--space-5);
  scroll-margin-block-start: 8rem;
}
.doc.guide .table-wrap {
  max-height: none;
}
.guide-toc {
  max-width: 76ch;
  margin-block: var(--space-3) var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.guide-toc b {
  font-family: var(--mono);
  font-size: var(--font-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.guide-toc ul {
  margin: var(--space-2) 0 0;
  padding-inline-start: 1.1rem;
  columns: 2 16rem;
  column-gap: var(--space-5);
}
.guide-toc li {
  break-inside: avoid;
  margin-block-end: var(--space-1);
}
/* Under a finger: each section a full target. */
@media (pointer: coarse), (max-width: 47.99rem) {
  .guide-toc li {
    margin-block-end: 0;
  }
  .guide-toc a {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--tap);
    min-inline-size: var(--tap);
  }
}
.guide-list {
  list-style: none;
  margin: 0 0 var(--space-5);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: var(--space-3);
}
.guide-list a {
  display: grid;
  gap: var(--space-1);
  block-size: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.guide-list a:hover,
.guide-list a:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface2);
}
.guide-list a span {
  font-size: var(--font-sm);
  color: var(--muted);
}
/* The page's guide, at the end of the section bar. */
.subnav-guide {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-inline-start: auto;
  padding-inline: var(--space-2);
  color: var(--ink2);
  text-decoration: none;
  white-space: nowrap;
}
.subnav-guide-mark {
  display: inline-grid;
  place-content: center;
  inline-size: 1.25rem;
  block-size: 1.25rem;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}
.subnav .subnav-guide:hover,
.subnav .subnav-guide:focus-visible {
  color: var(--ink);
}
@media (max-width: 47.99rem) {
  .subnav-guide-label {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .subnav-guide {
    justify-content: center;
    min-inline-size: var(--tap);
  }
}
.doc th.al-center,
.doc td.al-center {
  text-align: center;
}
.doc-check {
  font-family: var(--mono);
}
.result-media {
  display: block;
  margin: var(--space-2) 0;
}
/* Images keep a fixed 16:10 box (no layout shift while they load) and are fitted inside it. */
.result-media img {
  width: 100%;
  max-width: 640px;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: contain;
}
video.result-media {
  max-width: 100%;
  max-height: 70vh;
  height: auto;
}
audio.result-media {
  width: 100%;
}
/* 10. Live updates (docs/28): toasts, rows that appear or change, questions and decisions made in place ----- */
.toasts {
  position: fixed;
  z-index: 40;
  right: var(--gutter);
  bottom: var(--space-4);
  width: min(24rem, calc(100vw - 2 * var(--gutter)));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding: var(--space-2) var(--tap) var(--space-2) var(--space-4);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--bronze);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}
.toast-ok {
  border-left-color: var(--ok);
}
.toast-warn {
  border-left-color: var(--warn);
}
.toast-crit {
  border-left-color: var(--crit);
}
.toast p {
  margin: 0;
  min-width: 0;
}
.toast-title {
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink2);
}
.toast-text a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-weight: 600;
}
.toast-detail {
  font-size: var(--font-sm);
  color: var(--muted);
}
.toast-close {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink2);
  font-size: 1.25rem;
  line-height: 1;
}
.toast-close:hover {
  color: var(--ink);
}
/* Agents' questions with their answer forms (Approvals), and what a decision or an answer made in place says. */
.questions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
}
.question-text {
  margin: 0;
}
.questions .row-form,
.provider .row-form {
  margin: 0;
}
.approvals-pending {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
}
blockquote.answer {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border-left: 3px solid var(--bronze);
  background: var(--surface2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  overflow-wrap: anywhere;
}
.decided {
  border-color: var(--line-strong);
}
.live-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
}
.live-banner button.link {
  min-height: var(--tap);
}
.notify-setting {
  display: grid;
  gap: var(--space-1);
}
@media (prefers-reduced-motion: no-preference) {
  .toast {
    animation: live-toast-in 0.18s ease-out;
  }
  .live-new,
  .live-changed {
    animation: live-flash 2.4s ease-out;
  }
  @keyframes live-toast-in {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
  }
  @keyframes live-flash {
    from {
      background-color: var(--warn-bg);
    }
  }
}

/* 11. A task's conversation as an activity timeline (docs/28; 2026-10-17, the owner: "more natural and self
   explanatory"): one rail, a dot per entry (green done, red failed, amber waiting for someone, grey the rest), a plain
   label and what happened; a command opens to what went in and what came out. -------------------------------- */
.thread {
  list-style: none;
  margin: var(--space-3) 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.thread > li {
  position: relative;
  min-width: 0;
  overflow-wrap: anywhere;
  padding-left: 1.75rem;
}
/* The rail, from each dot to the next. */
.thread > li::after {
  content: "";
  position: absolute;
  left: calc(0.5rem - 1px);
  top: 1.2rem;
  bottom: calc(-1 * var(--space-3) + 0.2rem);
  width: 2px;
  background: var(--line);
}
.thread > li:last-child::after {
  display: none;
}
/* The dot: its colour says how the entry went. */
.thread > li::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0.1875rem;
  top: 0.4rem;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--line-strong);
  box-shadow: 0 0 0 3px var(--bg);
}
.thread > li.evt-ok::before,
.thread > li.turn-card::before,
.thread > li.msg.turn::before {
  background: var(--ok);
}
.thread > li.evt-crit::before,
.thread > li.turn-card.has-failure::before,
.thread > li.msg.turn.failed::before {
  background: var(--crit);
}
.thread > li.evt-warn::before,
.thread > li.msg.agent:not(.turn)::before {
  background: var(--warn);
}
.thread > li.msg.person::before {
  background: var(--bronze);
}
/* Messages: the agent's words as text, a person's set off as theirs, a question waiting for an answer marked. */
.thread .msg {
  max-width: 46rem;
  padding: 0 0 0 1.75rem;
  border: 0;
  border-radius: 0;
}
/* Set off as a box, its dot outside it on the rail. */
.thread .msg.person,
.thread .msg.agent:not(.turn),
.thread .msg.turn.failed {
  padding: var(--space-2) var(--space-3);
  margin-left: 1.75rem;
  border-radius: var(--radius-sm);
}
.thread .msg.person::before,
.thread .msg.agent:not(.turn)::before,
.thread .msg.turn.failed::before {
  left: calc(-1.75rem + 0.1875rem);
}
.thread .msg.person::after,
.thread .msg.agent:not(.turn)::after,
.thread .msg.turn.failed::after {
  left: calc(-1.75rem + 0.5rem - 1px);
}
.thread .msg.person {
  background: var(--surface2);
}
.thread .msg.agent:not(.turn) {
  background: var(--warn-bg);
}
.thread .msg.turn.failed {
  background: var(--crit-bg);
}
/* On the failed turn's tinted ground the grey of secondary text falls under 4.5:1: full ink there. */
.thread .msg.turn.failed .who,
.thread .msg.turn.failed .muted {
  color: var(--ink);
}
.thread .msg p {
  margin: var(--space-1) 0;
}
/* Who wrote it, first like every entry's label (the header's .who aligns right; not here). */
.thread .who {
  display: block;
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}
.thread .step pre.output {
  max-height: 40vh;
}
/* A step of an agent's run (task-activity.ts): what it thought, then each command or tool call it made. */
.thread .turn-card {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}
.turn-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
}
.turn-head time {
  margin-left: auto;
}
.turn-label {
  font-weight: 600;
}
.turn-thought {
  margin: 0;
  color: var(--ink2);
}
/* A long text folded (console-helpers.ts folded): its beginning with "Show all", the whole on demand. */
.fold > summary {
  list-style: none;
  cursor: pointer;
}
.fold > summary::-webkit-details-marker {
  display: none;
}
.fold-toggle {
  color: var(--bronze-ink);
  font-size: var(--font-sm);
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
}
.fold:not([open]) .when-open,
.fold[open] .when-closed {
  display: none;
}
.fold[open] > summary {
  margin-bottom: var(--space-1);
}
.turn-thought[open] > p {
  margin: 0;
}
.turn-cmds,
.turn-notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}
.turn-cmds > li,
.turn-notes > li,
.cmd > details {
  min-width: 0;
}
/* A command or a tool call: one line in a box, its label first; opened, what went in and what came out. */
.cmd > details > summary,
.cmd.tool {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.cmd > details > summary {
  cursor: pointer;
}
.cmd > details[open] > summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.cmd.failed > details > summary {
  border-color: var(--crit);
}
/* A tool call on one line (task-activity.ts toolCallHtml): its name, what it did in words, how it went; a failure or
   the check-before-saving question is only a pill. Opened, its details (an overlay with the page script). */
.tool-row {
  min-width: 0;
}
.tool-row > summary {
  min-width: 0;
  cursor: pointer;
  list-style: none;
}
/* One line on wide screens: the tool, what it did, how it went. Phones: the tool and how it went, the words below. */
.cmd > details:not(.tool-row) > summary,
.cmd > details.tool-row:not(.flagged) > summary,
.tool-row:not(.flagged) > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "name said status";
  align-items: center;
  column-gap: var(--space-2);
  row-gap: 2px;
}
.tool-status {
  grid-area: status;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px var(--space-2);
  white-space: nowrap;
}
.tool-status {
  min-width: 0;
  max-width: 100%;
}
/* What a command wrote, on its own row under the command: in the status column they took the width and left the
   command one letter a line. */
.cmd-writes-list {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--space-2);
  min-width: 0;
}
.cmd-writes-list > .cmd-writes {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.cmd-kind.tool-name {
  font-weight: 400;
  color: var(--muted);
}
.cmd > details > summary > .cmd-line {
  grid-area: said;
  min-width: 0;
}
@media (max-width: 40rem) {
  .cmd > details:not(.tool-row) > summary,
  .cmd > details.tool-row:not(.flagged) > summary,
  .tool-row:not(.flagged) > summary {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name status"
      "said said";
  }
}
.tool-row > summary::-webkit-details-marker {
  display: none;
}
.tool-row:not(.flagged) > summary {
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.tool-row:not(.flagged) > summary:hover {
  border-color: var(--line-strong);
}
.tool-name {
  grid-area: name;
  font-size: var(--font-xs);
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
}
.tool-sentence {
  grid-area: said;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: var(--font-sm);
}
.cmd > details.tool-row.flagged > summary,
.tool-row.flagged > summary {
  display: inline-flex;
  max-width: 100%;
  padding: 2px 12px;
  border: 0;
}
.tool-row.flagged > summary .mono {
  min-width: 0;
  overflow-wrap: anywhere;
}
/* What a step ran, folded into one pill (task-activity.ts runPill): its counts, a preview of the first beside them. */
.run-fold {
  min-width: 0;
}
.run-pill {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  width: fit-content;
  max-width: 100%;
  min-height: 2.25rem;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  cursor: pointer;
  list-style: none;
  min-width: 0;
}
.run-pill::-webkit-details-marker {
  display: none;
}
.run-pill:hover {
  border-color: var(--line-strong);
}
.run-pill:focus-visible {
  outline: 2px solid var(--bronze-ink);
  outline-offset: 2px;
}
.run-n {
  font-size: var(--font-sm);
  font-weight: 600;
  white-space: nowrap;
}
.run-n + .run-n::before {
  content: "·";
  margin-inline-end: 6px;
  color: var(--muted);
  font-weight: 400;
}
.run-n.crit {
  color: var(--crit);
}
.run-n.warn {
  color: var(--warn);
}
.run-preview {
  flex: 0 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--mono);
}
.run-fold[open] > .pill-body {
  margin-top: var(--space-2);
}
.pill-dialog .turn-cmds {
  gap: var(--space-2);
}
/* Consecutive tool, check and git lines between steps, folded on the page (live.js). */
.run-group .run-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-1);
}
.tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 2rem;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: var(--font-sm);
  font-weight: 600;
}
.tool-pill .mono {
  font-weight: 500;
}
.tool-pill.crit {
  background: var(--crit-bg);
  color: var(--crit);
}
.tool-pill.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.tool-pill:focus-visible,
.tool-row > summary:focus-visible {
  outline: 2px solid var(--bronze-ink);
  outline-offset: 2px;
}
.tool-row[open] > .pill-body {
  margin-top: var(--space-1);
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.pill-body {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}
.pill-body > p {
  margin: 0;
}
.tool-said q {
  color: var(--ink2);
}
.tool-validation {
  display: block;
  font-size: var(--font-sm);
}
.tool-validation.ok {
  color: var(--ok);
}
.tool-validation.warn {
  color: var(--warn);
}
.tool-fields {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px var(--space-2);
}
.tool-exact > pre {
  max-height: 40vh;
  overflow: auto;
}
.evt-tool {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}
.evt-tool > .tool-row {
  flex: 1 1 auto;
}
/* Its time keeps its words whole ("26 days ago"): squeezed by a long tool line, it split a word a line. */
.evt-tool > time {
  flex: none;
  white-space: nowrap;
}
/* The overlay a pill opens (console.js), like the chat's. */
.pill-dialog {
  inline-size: min(620px, calc(100vw - 32px));
  max-block-size: min(80vh, 760px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.pill-dialog::backdrop {
  background: rgb(0 0 0 / 0.35);
}
.pill-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 0;
}
.pill-dialog-head h2 {
  outline: none;
  margin: 0;
  font-size: var(--font-md, 1.05rem);
  overflow-wrap: anywhere;
}
.pill-dialog-close {
  min-inline-size: 44px;
  min-block-size: 44px;
  border: 0;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.pill-dialog-body {
  padding: 8px 16px 16px;
  overflow: auto;
  max-block-size: calc(min(80vh, 760px) - 70px);
}

/* A task's decided requests as pills (capabilities/console.ts decidedPill); opened, their details in the overlay. */
.ask-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.ask-pills > [role="listitem"] {
  min-width: 0;
  max-width: 100%;
}
.ask-pill::-webkit-details-marker {
  display: none;
}
.ask-pill {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 2rem;
  padding: 2px 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  font-size: var(--font-sm);
  background: var(--surface2);
  color: var(--ink2);
}
.ask-pill:hover {
  border-color: var(--line-strong);
}
.ask-pill:focus-visible {
  outline: 2px solid var(--bronze-ink);
  outline-offset: 2px;
}
.ask-pill.ok {
  background: var(--ok-bg);
}
.ask-pill.crit {
  background: var(--crit-bg);
}
.ask-pill.warn {
  background: var(--warn-bg);
}
.ask-state {
  flex: none;
  font-weight: 600;
}
.ask-pill.ok .ask-state {
  color: var(--ok);
}
.ask-pill.crit .ask-state {
  color: var(--crit);
}
.ask-pill.warn .ask-state {
  color: var(--warn);
}
/* Wraps instead of cutting (the server keeps it to its first words already). */
.ask-what {
  min-width: 0;
  max-width: 36ch;
  overflow-wrap: anywhere;
  color: var(--ink);
}
.ask-row[open] > .pill-body {
  margin-top: var(--space-1);
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.ask-asked {
  font-size: var(--font-md, 1.05rem);
  font-weight: 600;
  line-height: 1.4;
}
.ask-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--space-2) var(--space-3);
  margin: 0;
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
  font-size: var(--font-sm);
}
.ask-facts dt {
  color: var(--muted);
  font-weight: 600;
}
.ask-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.ask-choices {
  margin: 0;
  padding-left: 1.1em;
}
@media (max-width: 520px) {
  .ask-facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .ask-facts dd {
    margin-bottom: var(--space-1);
  }
}

.cmd-line {
  font-family: var(--mono);
  font-size: var(--font-xs);
  overflow-wrap: anywhere;
}
.cmd.failed .cmd-line {
  color: var(--crit);
}
.io {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}
.io-row {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  align-items: start;
}
.io-row + .io-row {
  border-top: 1px solid var(--line);
}
.io-tag {
  padding: var(--space-2) var(--space-1) var(--space-2) var(--space-2);
  font-family: var(--mono);
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--muted);
}
.io-row > pre,
.io-row > pre.code,
.io-row > pre.output,
.io-row > p {
  margin: 0;
  min-width: 0;
  max-height: 40vh;
  overflow: auto;
  padding: var(--space-2);
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: var(--font-xs);
}
.io-row > p {
  padding: var(--space-2);
}
/* Labels in plain words, the entry's own weight; the dot carries how it went. */
.cmd-kind,
.evt-label {
  font-weight: 600;
  color: var(--ink);
}
.evt-crit .evt-label {
  color: var(--crit);
}
.pill.info {
  color: var(--bronze-ink);
  background: var(--surface2);
}
.console-summary {
  margin: 0 0 var(--space-2);
  color: var(--ink2);
  font-variant-numeric: tabular-nums;
}
/* The conversation as a console: a panel that scrolls inside, oldest first like a chat (docs/54), the reply box under
   it; "Show all" lets it run long. */
.console-panel {
  margin-block: var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.console-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
}
.console-head h2 {
  margin: 0;
}
.console-head .console-expand {
  margin-inline-start: auto;
  min-block-size: 2.75rem;
}
.console-panel .composer {
  margin-block: var(--space-2);
}
.console-panel .thread {
  margin: var(--space-2) 0 0;
  padding: var(--space-2);
  max-block-size: min(65vh, 46rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  /* Its own layer, its drawing kept inside it: scrolling moves what is drawn instead of drawing it again, on the page
     and inside an overlay alike (2026-10-24). */
  will-change: scroll-position;
  contain: content;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.console-panel .thread:focus-visible {
  outline: 2px solid var(--accent-fill);
  outline-offset: 2px;
}
.console-panel.expanded .thread {
  max-block-size: none;
}
.console-panel .thread:empty::before {
  content: "Nothing yet: the agent's steps appear here as it works.";
  color: var(--muted);
  font-size: var(--font-sm);
}
.composer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: flex-end;
  margin: var(--space-3) 0;
}
.composer label {
  flex: 1 1 24rem;
  min-width: 0;
}
.composer textarea {
  width: 100%;
}

/* 12. The file library's explorer and picker (docs/29 A4) --------------------------------------------------------- */
.explorer {
  position: relative;
  display: grid;
  gap: var(--space-3);
  margin-block: var(--space-3);
}
.explorer.dragging {
  outline: 2px dashed var(--accent-fill);
  outline-offset: var(--space-2);
  border-radius: var(--radius);
}
.explorer-bar,
.explorer-tools,
.explorer-selection {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}
.explorer-bar {
  justify-content: space-between;
}
.explorer-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.explorer-path a,
.explorer-path span[aria-current] {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}
.explorer-path > span[aria-hidden] {
  color: var(--muted);
}
.explorer-find {
  display: flex;
  gap: var(--space-2);
  flex: 1 1 16rem;
  max-width: 28rem;
}
.explorer-find input {
  flex: 1 1 auto;
  min-width: 0;
}
label.button.primary {
  background: var(--accent-fill);
  color: var(--on-accent);
  border: 0;
  cursor: pointer;
}
label.button:focus-within {
  outline: 2px solid var(--accent-fill);
  outline-offset: 2px;
}
.explorer-hint {
  margin: 0;
}
.explorer-selection {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.explorer-selection:not(.has-selection) > details > summary {
  opacity: 0.55;
}
.explorer-popover {
  position: relative;
}
.explorer-popover > summary {
  list-style: none;
}
.explorer-popover > summary::-webkit-details-marker {
  display: none;
}
/* An open action takes the whole row: its panel opens below, never off the screen. */
.explorer-popover[open] {
  flex: 1 1 100%;
  min-width: 0;
}
.explorer-panel {
  display: grid;
  gap: var(--space-2);
  box-sizing: border-box;
  width: 100%;
  max-width: 28rem;
  margin-top: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.explorer-panel select,
.explorer-panel input {
  width: 100%;
  min-width: 0;
}
.danger-text {
  color: var(--crit);
}
.explorer-drop {
  margin: 0;
  padding: var(--space-4);
  border: 2px dashed var(--accent-fill);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.explorer-progress {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.explorer-progress li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.explorer-progress li.failed {
  color: var(--crit);
}
.explorer-list td.pick,
.explorer-list th.pick {
  width: 2.5rem;
}
.explorer-list td.pick input,
.explorer-list th.pick input,
.picker-list input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
}
/* The tap area around a row's checkbox. */
.hit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap);
  min-height: var(--tap);
  cursor: pointer;
}
.explorer-list td.name {
  min-width: 12rem;
}
.explorer-list td.name > a {
  font-weight: 600;
}
.explorer-list td.desc {
  min-width: 10rem;
  max-width: 28rem;
}
.ficon {
  width: 1.15rem;
  height: 1.15rem;
  margin-right: var(--space-2);
  vertical-align: -0.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
  color: var(--muted);
}
.row-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-1);
  font-size: var(--font-sm);
}
.row-links a {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
}
.explorer-empty {
  margin: 0;
}
/* Chips: files and folders chosen on the task form. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  max-width: 100%;
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface2);
  font-size: var(--font-sm);
}
.chip-x {
  min-width: var(--tap);
  min-height: var(--tap);
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 1.1rem;
}
.picker-dialog {
  width: min(40rem, calc(100vw - 2rem));
  max-height: min(80vh, 44rem);
  padding: var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  overflow: auto;
}
.picker-dialog::backdrop {
  background: rgb(0 0 0 / 0.35);
}
.picker {
  display: grid;
  gap: var(--space-3);
}
.picker-list {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.picker-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap);
  overflow-wrap: anywhere;
}
.picker-list label {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  min-width: 0;
}
.target-list {
  display: grid;
  gap: var(--space-1);
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.target-list > .choice {
  min-width: 0;
  max-width: 100%;
}
.target-list > .choice > span {
  min-width: 0;
}
@media (pointer: coarse), (max-width: 47.99rem) {
  .row-links a {
    min-height: var(--tap);
    min-width: var(--tap);
    justify-content: center;
  }
}

/* 13. Account › Capacity (docs/31): how full the disk, the database and the stored files are ----------------------- */
.gauges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--space-3);
  margin-block: var(--space-3);
}
.gauge {
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.gauge-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-2);
  font-variant-numeric: tabular-nums;
}
.gauge meter {
  display: block;
  width: 100%;
  height: 0.75rem;
  margin-block: var(--space-2);
}
.gauge p {
  margin: 0;
}

/* 14. The connector change journal (docs/32): one entry per change, its arguments and what was there before ------ */
.change-list {
  list-style: none;
  margin: var(--space-3) 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}
.change {
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}
.change-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  overflow-wrap: anywhere;
}
.change pre.output {
  max-height: 40vh;
}
.guidance-list {
  margin: var(--space-2) 0;
  padding-inline-start: 1.2rem;
  display: grid;
  gap: var(--space-2);
}
.guidance-list form.inline {
  display: inline;
}

/* 15. The chat from any page (chat-launch.js): the header button with its count, the sheet on phones ------------ */
.chat-launch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  border-radius: 999px;
  color: var(--ink2);
  text-decoration: none;
}
.chat-launch:hover,
.chat-launch:focus-visible {
  background: var(--surface2);
  color: var(--ink);
}
.chat-launch.has-unread {
  color: var(--bronze);
}
.chat-launch-count {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: -2px;
  min-inline-size: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--crit);
  color: var(--on-crit);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
}
.chat-launch-count[hidden] {
  display: none;
}
/* Round icon buttons (New chat, Attach, Send, Stop): small to the eye, a full target under a finger. */
.chat-icon {
  flex: 0 0 auto;
  display: inline-grid;
  /* Centred both ways, whatever the element (a label's grid would pack its content at the top). */
  grid-template-columns: none;
  place-content: center;
  place-items: center;
  gap: 0;
  font-size: inherit;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink2);
  cursor: pointer;
}
.chat-icon:hover,
.chat-icon:focus-visible {
  background: var(--surface2);
  color: var(--ink);
}
.chat-icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.chat-send {
  background: var(--accent-fill);
  color: var(--on-accent);
}
.chat-send:hover,
.chat-send:focus-visible {
  background: var(--accent-fill);
  color: var(--on-accent);
  filter: brightness(0.95);
}
.chat-stop {
  border: 1px solid var(--line-strong);
}
@media (pointer: coarse), (max-width: 47.99rem) {
  .chat-icon {
    inline-size: var(--tap);
    block-size: var(--tap);
  }
}
/* Setting a project up with the assistant (docs/24): the card on the welcome page and on its own page. */
.onboarding {
  margin-block: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.onboarding h2 {
  margin-top: 0;
}

/* The assistant on a project's Overview: a place to start a chat; the chat itself opens in the chat box. */
.assistant-card {
  margin-block: var(--space-3) var(--space-5);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: grid;
  gap: var(--space-2);
}
.assistant-card-head a {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.75rem;
}
.assistant-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
}
.assistant-card h2 {
  margin: 0;
}
.assistant-card p {
  margin: 0;
}
/* "Start a new chat": one row, the text and Send, as in the chat itself. */
.assistant-start {
  display: flex;
  gap: 6px;
  align-items: flex-end;
}
.assistant-start textarea {
  flex: 1 1 auto;
  min-inline-size: 0;
  min-height: 2.5rem;
  max-height: 30vh;
  padding: 0.5rem 0.875rem;
  border-radius: 1.25rem;
  line-height: 1.35;
  resize: none;
  /* Grows with what is typed where the browser can (without script); one line otherwise. */
  field-sizing: content;
}
@media (pointer: coarse) {
  .assistant-start textarea {
    min-height: var(--tap);
    padding-block: 0.6rem;
  }
}

/* A connector's credentials in the URL: a name and its value side by side, one pair per row (stacked on phones). */
.query-credentials [data-rows] {
  display: grid;
  gap: var(--space-3);
}
/* Its fields side by side while each has room for its value, else wrapping (a select's words never cut off). */
.query-credentials .query-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: var(--space-2) var(--space-4);
}
.query-credentials button[data-add-row] {
  justify-self: start;
  text-align: left;
}

/* The project board (docs/37): a column per stage, cards that people and agents move. Wide screens show the stages
   side by side (scrolling sideways inside the board when they do not fit); phones stack them, with a jump link to
   each. A stage's top edge says what happens in it: grey waits, bronze is an agent's, slate a person's, green done. */
/* The board's head: its title with the settings cog, and New card on the right, whose form opens below the row; one
   short line under it. The board itself comes right after. */
/* The board's filters (docs/37 §6): one row of short fields above the columns, wrapping on phones. */
.board-filters {
  margin-block: 0 var(--space-3);
}
.board-filters > label {
  flex: 0 1 14rem;
}
.board-filters > label.check {
  flex: 0 0 auto;
  align-self: center;
}
.board-filters > span {
  align-self: center;
}
/* The heading on the left, its buttons on the right; where both do not fit (a phone), the buttons go under it. */
.board-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}
.board-head h1 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  margin: 0;
}
.icon-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
}
.icon-link:hover,
.icon-link:focus-visible {
  background: var(--surface2);
  color: var(--ink);
}
.icon-link svg {
  width: 1.25rem;
  height: 1.25rem;
}
@media (pointer: coarse), (max-width: 47.99rem) {
  .icon-link {
    width: var(--tap);
    height: var(--tap);
  }
}
.board-new {
  justify-self: end;
}
.board-new[open] {
  grid-column: 1 / -1;
  justify-self: stretch;
}
.board-new > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-h);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--accent-fill);
  color: var(--on-accent);
  font-weight: 600;
  line-height: 1.2;
  list-style: none;
  cursor: pointer;
}
.board-new > summary::-webkit-details-marker {
  display: none;
}
.board-new > summary::before {
  content: "+";
  font-size: 1.15em;
  line-height: 1;
}
/* Open, the button stays where it was, on the title's row; the form spans the page under them. */
.board-new[open] > summary {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.board-new[open] > summary::before {
  content: "×";
}
.board-new > form {
  margin-top: var(--space-2);
}
.board-intro {
  margin: var(--space-1) 0 0;
}
.board-wrap {
  margin-block: var(--space-4);
}
.board-jump {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.board-jump a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap);
  padding: 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink2);
  text-decoration: none;
}
.board-jump .count {
  margin-left: 0;
}
.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
}
@media (min-width: 48rem) {
  .board-jump {
    display: none;
  }
  .board {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(14rem, 1fr);
    align-items: start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding-bottom: var(--space-2);
  }
}
.board-stage {
  --stage-mark: var(--line-strong);
  display: grid;
  gap: var(--space-2);
  align-content: start;
  min-width: 0;
  padding: var(--space-3);
  background: var(--surface2);
  border-top: 3px solid var(--stage-mark);
  border-radius: var(--radius-lg);
  scroll-snap-align: start;
  scroll-margin-top: 7rem;
}
.board-stage.kind-agent,
.stage-tag.kind-agent,
.stage-row.kind-agent {
  --stage-mark: var(--bronze);
}
.board-stage.kind-person,
.stage-tag.kind-person,
.stage-row.kind-person {
  --stage-mark: var(--ink2);
}
.board-stage.kind-done,
.stage-tag.kind-done,
.stage-row.kind-done {
  --stage-mark: var(--ok);
}
.board-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.board-stage-head h2 {
  margin: 0;
  font-size: var(--font-base);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.board-stage.full .board-stage-head .count {
  background: var(--warn-bg);
  color: var(--warn);
}
.board-stage-lead {
  display: grid;
  gap: 2px;
  margin: 0;
  color: var(--muted);
  font-size: var(--font-xs);
}
.board-stage-kind {
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.board-stage-note {
  overflow-wrap: anywhere;
}
main ol.board-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.board-card {
  --card-mark: transparent;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--card-mark);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(15, 34, 55, 0.07);
}
.board-card.needs-you {
  --card-mark: var(--warn);
}
.board-card.blocked {
  --card-mark: var(--crit);
}
.board-card > p {
  margin: 0;
  font-size: var(--font-sm);
}
.board-card-title {
  color: var(--ink);
  font-size: var(--font-label);
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.board-card-title:hover,
.board-card-title:focus-visible {
  color: var(--bronze-ink);
  text-decoration: underline;
}
.board-card-meta,
.board-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
}
.board-prio {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--muted);
}
.board-prio::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}
.board-prio.prio-high {
  color: var(--warn);
}
.board-prio.prio-urgent {
  color: var(--crit);
}
.board-due {
  color: var(--muted);
  font-size: var(--font-xs);
  font-variant-numeric: tabular-nums;
}
.board-due.overdue {
  color: var(--crit);
  font-weight: 600;
}
/* A card whose work asks a person for something (2026-10-19): on the tile, linking to the card's "Its agents ask you". */
.board-asks {
  display: inline-flex;
  align-items: center;
  min-block-size: 1.5rem;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: var(--font-xs);
  font-weight: 600;
  text-decoration: none;
}
.board-asks:hover,
.board-asks:focus-visible {
  text-decoration: underline;
}
@media (max-width: 40rem) {
  .board-asks {
    min-block-size: 2.75rem;
    padding-inline: 12px;
  }
}
/* The agentic steps under a card's task: a pill linking to its Subtasks. On a touch screen the link round the pill
   is 44 px high to tap, while the pill keeps its size and the row its height (the padding is taken back). */
.board-steps {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink2);
  text-decoration: none;
}
.board-steps:hover,
.board-steps:focus-visible {
  text-decoration: underline;
}
@media (pointer: coarse), (max-width: 47.99rem) {
  .board-steps {
    min-inline-size: var(--tap);
    min-block-size: var(--tap);
    padding-block: 12px;
    margin-block: -12px;
  }
}
/* What a card's work produced and waits on (2026-10-19): pills linking to the card's Sites, Deliverables, questions. */
a.pill.board-out {
  text-decoration: none;
}
a.pill.board-out:hover,
a.pill.board-out:focus-visible {
  text-decoration: underline;
}
@media (max-width: 40rem) {
  a.pill.board-out {
    display: inline-flex;
    align-items: center;
    min-block-size: 2.75rem;
    padding-inline: 12px;
  }
}
.card-questions {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.board-label {
  display: inline-block;
  max-width: 100%;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink2);
  font-size: var(--font-xs);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
/* Who has the card (2026-10-17: every tile says it): a person's initials or an agent's mark, then the name. */
.board-card-who {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--ink2);
  font-size: var(--font-xs);
}
.board-card-who.muted {
  color: var(--muted);
}
.board-card-who .who-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.board-card-who .avatar {
  flex: none;
  inline-size: 1.6rem;
  block-size: 1.6rem;
  font-size: var(--font-xs);
  letter-spacing: 0;
}
.board-card-who .avatar.agent {
  background: color-mix(in srgb, var(--ink) 12%, var(--surface));
  color: var(--ink2);
}
.board-card-blocked {
  color: var(--crit);
  overflow-wrap: anywhere;
}
.board-card-needs {
  color: var(--warn);
  font-weight: 600;
}
/* A reviewer agent checks it: nothing waits for a person. */
.board-card-needs.by-agent {
  color: var(--bronze-ink);
  font-weight: 500;
}
/* Tiles stay short (2026-10-16): a title longer than three lines is clamped (the whole of it on hover and on the
   card's page), a blocked reason is cut on the server, labels past the third are counted. */
.board-label.more {
  color: var(--muted);
  border-style: dashed;
}
@media (pointer: fine) and (min-width: 48rem) {
  .board-card-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
  }
  /* A long column scrolls by itself: the board stays about a screen tall. */
  main ol.board-cards {
    max-block-size: max(24rem, calc(100vh - 17rem));
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding: 2px;
    margin: -2px;
  }
}
/* A card's page: older history and the forms that change who has it fold away. */
.card-earlier > summary,
.side-more > summary {
  color: var(--ink2);
  font-size: var(--font-sm);
  font-weight: 600;
}
.card-earlier[open] > summary,
.side-more[open] > summary {
  margin-bottom: var(--space-2);
}
.side-more {
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}
.side-more > .side-form:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.board-empty {
  margin: 0;
  padding: var(--space-3);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: var(--font-sm);
  text-align: center;
}
.board-archived {
  margin-block: var(--space-4);
}
/* Moving cards with board.js: the card being dragged fades, a line shows where it lands, the stage under it is
   outlined; a refused move says why above the board. Dragging is for a mouse: under a finger, a card's page moves it. */
.board-card[draggable="true"] {
  cursor: grab;
}
.board-card.dragging {
  opacity: 0.45;
}
main ol.board-cards > .board-drop {
  height: 3px;
  margin: -1px 0;
  border-radius: 2px;
  background: var(--bronze);
}
.board-stage.drop-target {
  outline: 2px dashed var(--bronze);
  outline-offset: 2px;
}
.board-status:empty {
  display: none;
}
.board-status.err {
  color: var(--crit);
}
@media (pointer: coarse) {
  .board-hint {
    display: none !important;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .board-card {
    transition: box-shadow 0.15s ease;
  }
  .board-card[draggable="true"]:hover {
    box-shadow: var(--shadow);
  }
}
/* Links standing alone in the board's lists (a card's work, the cards waiting on Approvals) are 44px targets under a
   finger and on phones. */
@media (pointer: coarse), (max-width: 47.99rem) {
  .card-work > a:first-child,
  .waiting-cards > li > a,
  .board-archived li > a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
  }
}
/* Under a finger and on phones, a card's title is a 44px target however short it is. */
@media (pointer: coarse), (max-width: 47.99rem) {
  .board-card-title {
    display: flex;
    align-items: center;
    min-height: var(--tap);
  }
}

/* A card's page: its description, work and history in the main column; where it is, who has it and the actions in a
   panel beside it (below it on narrower screens). */
.card-where {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
}
.stage-tag {
  --stage-mark: var(--line-strong);
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0 var(--space-3);
  background: var(--surface2);
  border-left: 3px solid var(--stage-mark);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
  margin-block: var(--space-4);
}
@media (min-width: 64rem) {
  .card-layout {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
  }
}
.card-main,
.card-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  align-content: start;
  min-width: 0;
}
.card-main > section > h2:first-child {
  margin-top: 0;
}
.card-main > section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  min-width: 0;
}
.card-main > section > * {
  margin: 0;
}
.card-side {
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.side-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.card-body {
  max-width: var(--measure);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card-summary {
  max-width: var(--measure);
  max-height: 24rem;
  overflow-y: auto;
  padding: var(--space-3);
  background: var(--surface2);
  border-radius: var(--radius-sm);
}
.decision {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius);
}
.decision > h2 {
  margin: 0;
}
.decision > p {
  margin: 0;
}
.decision-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  max-width: var(--measure);
}
.notice .decision-form {
  margin-top: var(--space-3);
}
.notice > p {
  margin: 0;
}
main ol.card-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  max-width: var(--measure);
}
.card-timeline > li {
  padding-left: var(--space-3);
  border-left: 2px solid var(--line);
}
.card-timeline > .card-comment {
  border-left-color: var(--bronze);
}
.card-comment p {
  margin: var(--space-1) 0 0;
}

/* The board's stages, in order: what each does in a line, its form when opened. */
main ol.stage-list {
  list-style: none;
  margin: var(--space-4) 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  max-width: var(--form-max);
}
.stage-row {
  --stage-mark: var(--line-strong);
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--stage-mark);
  border-radius: var(--radius);
}
.stage-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}
.stage-row-text {
  min-width: 0;
}
.stage-row-text h2 {
  margin: 0;
  font-size: var(--font-md);
}
.stage-row-text p {
  margin: 2px 0 0;
}
.stage-row .board-stage-kind {
  color: var(--muted);
  font-size: var(--font-xs);
}
.stage-row details.edit > summary {
  margin-bottom: 0;
}
.stage-row details.edit[open] > summary {
  margin-bottom: var(--space-3);
}
.stage-order form {
  margin: 0;
}

/* 16. Deliverables (docs/47): what a task tree produces and where each goes, its state and where it went ------- */
.deliverables {
  list-style: none;
  margin: var(--space-3) 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}
.deliverable {
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: grid;
  /* One column that never grows past the card: an open form's fields wrap inside it. */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  min-width: 0;
}
.deliverable > * {
  min-width: 0;
}
.deliverable p {
  margin: 0;
}
.deliverable-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  overflow-wrap: anywhere;
}
.deliverable-row {
  padding-block: var(--space-2);
  border-top: 1px solid var(--line);
}
.deliverable-row:first-child {
  border-top: 0;
}
.deliverable [data-deliverable-view] {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}

/* Models by purpose (docs/51): one row per purpose with what it gets now, its best fits and, for owners, a choice. */
.purpose-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
  max-width: var(--form-max);
}
.purpose-list > li {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.purpose-list > li > p {
  margin: 0;
}
/* Each purpose's picker (a pickOne): the full width of its card. */
.purpose-list > li > .purpose-pick {
  margin-top: var(--space-1);
}

/* Source code with its syntax coloured (code-view.ts: highlight.js on the server), Word documents (office-view.ts)
   and PDFs drawn by PDF.js (pdf-view.js), 2026-10-16. */
pre.code {
  margin: var(--space-2) 0;
  max-height: 70vh;
  overflow: auto;
  padding: var(--space-3);
  font-family: var(--mono);
  font-size: var(--font-sm);
  line-height: 1.55;
  tab-size: 2;
  white-space: pre;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
pre.code code {
  padding: 0;
  background: none;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-built_in,
.hljs-literal,
.hljs-doctag {
  color: var(--code-keyword);
}
.hljs-string,
.hljs-regexp,
.hljs-template-tag,
.hljs-template-variable {
  color: var(--code-string);
}
.hljs-number,
.hljs-symbol,
.hljs-variable,
.hljs-bullet {
  color: var(--code-number);
}
.hljs-comment,
.hljs-quote {
  color: var(--code-comment);
  font-style: italic;
}
.hljs-title,
.hljs-title.function_,
.hljs-section {
  color: var(--code-title);
}
.hljs-type,
.hljs-title.class_,
.hljs-class .hljs-title,
.hljs-params {
  color: var(--code-type);
}
.hljs-attr,
.hljs-attribute,
.hljs-property,
.hljs-selector-class,
.hljs-selector-id {
  color: var(--code-attr);
}
.hljs-name,
.hljs-tag,
.hljs-selector-pseudo {
  color: var(--code-tag);
}
.hljs-meta,
.hljs-meta .hljs-keyword {
  color: var(--code-meta);
}
.hljs-addition {
  color: var(--code-added);
  background: var(--code-added-bg);
}
.hljs-deletion {
  color: var(--code-removed);
  background: var(--code-removed-bg);
}
.hljs-emphasis {
  font-style: italic;
}
.hljs-strong {
  font-weight: 700;
}
.doc.docx {
  max-width: 52rem;
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.doc.docx table {
  border-collapse: collapse;
  margin-block: var(--space-3);
}
.doc.docx td,
.doc.docx th {
  border: 1px solid var(--line);
  padding: var(--space-1) var(--space-2);
  vertical-align: top;
}
/* A spreadsheet's sheets as tables (office-xml.ts): column letters and row numbers as the sheet has them. */
.doc.xlsx {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}
.doc.xlsx h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--font-base);
}
.sheet-table {
  border-collapse: collapse;
  font-size: var(--font-sm);
  font-variant-numeric: tabular-nums;
}
.sheet-table th,
.sheet-table td {
  border: 1px solid var(--line);
  padding: 2px var(--space-2);
  vertical-align: top;
  max-width: 24rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.sheet-table th {
  background: var(--surface2);
  color: var(--ink2);
  font-weight: 600;
  text-align: center;
}
.sheet-table td {
  background: var(--surface);
}
.sheet-table td.num {
  text-align: right;
}
/* A deck's slides as their text, in order. */
.doc.pptx .slides {
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
}
.doc.pptx .slide {
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.doc.pptx .slide h3 {
  margin: 0;
  font-size: var(--font-base);
}
.doc.pptx .slide ul {
  margin: var(--space-2) 0 0;
}
.pdf-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pdf-view .pdf-page {
  max-width: 100%;
  height: auto;
  background: #fff;
  box-shadow: var(--shadow);
}

/* The task page in two columns (2026-10-16): the conversation and the work in the main column; the goal, the
   summary, deliverables, result files, access and the details in a side column, each a box that folds. One column
   below 64rem, the main column first. */
.task-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
  margin-block: var(--space-4);
}
@media (min-width: 64rem) {
  .task-layout {
    grid-template-columns: minmax(0, 1fr) minmax(19rem, 26rem);
  }
}
.task-main,
.task-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  align-content: start;
  min-width: 0;
}
.task-main > section > h2:first-child,
.task-side h2 {
  margin-top: 0;
}
.side-box {
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.task-side > section,
.task-side > details {
  min-width: 0;
}
.task-side > section:not(.side-box):not(.access-panel) {
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
details.side-box > summary,
.access-panel > details > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  list-style: none;
  cursor: pointer;
}
details.side-box > summary::-webkit-details-marker,
.access-panel > details > summary::-webkit-details-marker {
  display: none;
}
details.side-box > summary::before,
.access-panel > details > summary::before {
  content: "▸";
  color: var(--muted);
  transition: transform 0.15s;
}
details.side-box[open] > summary::before,
.access-panel > details[open] > summary::before {
  transform: rotate(90deg);
}
details.side-box > summary h2,
.access-panel > details > summary h2 {
  display: inline;
  margin: 0;
  font-size: var(--font-md);
  /* A heading keeps its words whole; what follows it wraps under it in a narrow column. */
  overflow-wrap: normal;
}
details.side-box[open] > summary {
  margin-bottom: var(--space-2);
}
.task-side pre.output {
  max-height: 16rem;
}
.summary-text {
  max-height: 24rem;
  overflow: auto;
}
details.task-more {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
details.task-more > summary {
  font-weight: 600;
}
details.task-tree > summary h2 {
  display: inline;
  margin: 0;
  font-size: var(--font-md);
}
details.task-tree[open] > summary {
  margin-bottom: var(--space-2);
}
/* The task at a glance (the side column's first box): short facts, then the task's actions. */
.task-glance .facts {
  margin-block: var(--space-2);
}
.task-glance .row-actions {
  margin-top: var(--space-3);
}
.task-context,
.asked-from {
  color: var(--ink2);
}

/* The Access panel (access-panel.ts): what a project's or a task's agents can reach, each with where it is changed. */
.access-panel {
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.access-list {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-2) 0;
}
.access-row {
  display: grid;
  grid-template-columns: minmax(6.5rem, max-content) minmax(0, 1fr);
  gap: var(--space-2);
  align-items: baseline;
  padding-block: var(--space-1);
  border-top: 1px solid var(--line);
}
.access-row dt {
  font-weight: 600;
  font-size: var(--font-sm);
}
.access-row dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
/* On phones, a row's name sits above what it holds: its Add forms get the panel's whole width. */
@media (max-width: 30rem) {
  .access-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-1);
  }
}
/* A row's Add list (access-panel.ts): what the project could be given, each with its one-click form. */
.access-add {
  margin-top: var(--space-1);
}
.access-add > summary {
  color: var(--bronze-ink);
  font-size: var(--font-sm);
  font-weight: 600;
}
.access-add > .access-items {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.access-add > .access-items > li {
  padding: var(--space-2) var(--space-3);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}
.access-add-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-1) var(--space-2);
  margin-top: var(--space-2);
}
/* Its choices (environment, access) keep room for their longest option and wrap one under the other on phones. */
.access-add-form > label {
  flex: 1 1 11rem;
  display: grid;
  gap: var(--space-1);
}
.access-add-form > label > select {
  width: 100%;
}
.access-sharing .pill {
  font-size: var(--font-xs);
}
.access-items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}
.access-change {
  white-space: nowrap;
}
@media (pointer: coarse), (max-width: 47.99rem) {
  .access-change {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    min-width: var(--tap);
  }
}
.pill.muted-pill {
  opacity: 0.55;
}
.access-switches fieldset {
  display: grid;
  gap: var(--space-1);
  margin: var(--space-2) 0 0;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
/* A checkbox drawn as a switch (role="switch"). */
label.switch {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-sm);
  cursor: pointer;
}
label.switch input[type="checkbox"] {
  appearance: none;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 1.25rem;
  margin: 0;
  border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}
label.switch input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.25rem - 4px);
  height: calc(1.25rem - 4px);
  border-radius: 50%;
  background: var(--surface);
  transition: transform 0.15s;
}
label.switch input[type="checkbox"]:checked {
  background: var(--ok);
  /* The knob's colour, also the control's text colour: readable on the green. */
  color: var(--surface);
}
label.switch input[type="checkbox"]:checked::after {
  transform: translateX(1rem);
}
label.switch input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 2px;
}
fieldset:disabled label.switch {
  cursor: default;
  opacity: 0.7;
}
/* Under a finger and on phones, a switch's row is a 44px target. */
@media (pointer: coarse), (max-width: 47.99rem) {
  label.switch {
    min-height: var(--tap);
  }
}

/* The preview that opens over any page (preview.js, file-preview.ts). */
dialog.preview-dialog {
  width: min(70rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog.preview-dialog::backdrop {
  background: rgba(8, 16, 26, 0.55);
}
.preview-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  margin: var(--space-2);
  min-width: 2.25rem;
  min-height: 2.25rem;
  font-size: 1.25rem;
  line-height: 1;
}
.preview-frame {
  padding: var(--space-3) var(--space-4) var(--space-4);
  max-height: calc(100vh - 4rem);
  overflow: auto;
}
.preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
}
.preview-actions {
  display: inline-flex;
  gap: var(--space-3);
  margin-left: auto;
}
.preview-body .library-preview {
  max-width: 100%;
  height: auto;
}
.preview-body pre.code,
.preview-body pre.output {
  max-height: none;
}
@media (max-width: 47.99rem) {
  dialog.preview-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .preview-frame {
    max-height: calc(100dvh - 3rem);
  }
}

/* Configuration's resource pages (2026-10-16): how it works in one line, a resource's setup in numbered steps, the
   chosen item to add in a panel, settings folded at the end. */
.steps-line {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
  counter-reset: step;
  color: var(--ink2);
}
.steps-line > li {
  counter-increment: step;
}
.steps-line > li::before {
  content: counter(step) ". ";
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.setup-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--space-2);
  margin: var(--space-3) 0 var(--space-4);
  padding: 0;
  list-style: none;
}
.setup-steps > li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: var(--font-sm);
}
.setup-steps > li.done {
  border-left-color: var(--ok);
}
.setup-steps > li.todo {
  border-left-color: var(--warn);
}
.setup-steps .step-n {
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.setup-steps > li > a {
  margin-left: auto;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}
.add-section {
  margin-top: var(--space-5);
}
.add-panel {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-left: 3px solid var(--bronze);
  border-radius: var(--radius);
  background: var(--surface);
}
.add-panel > h3 {
  margin-top: 0;
}
/* The folded "Settings: …" box on a Git account, connector or service page: a card closed and open, its facts,
   guides, buttons and form inset from its edge like the summary. */
main > details.edit.settings-box {
  max-width: var(--form-max);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-block: var(--space-5) var(--space-4);
}
main > details.edit.settings-box > summary {
  margin: 0;
  padding: var(--space-3) clamp(var(--space-3), 3vw, var(--space-5));
  background: var(--surface2);
  border-radius: var(--radius);
}
main > details.edit.settings-box[open] {
  padding-bottom: var(--space-4);
}
main > details.edit.settings-box[open] > summary {
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  margin-bottom: var(--space-4);
}
main > details.edit.settings-box[open] > :not(summary) {
  margin-inline: clamp(var(--space-3), 3vw, var(--space-5));
}
main > details.edit.settings-box[open] > :not(summary) + :not(summary) {
  margin-top: var(--space-4);
}
main > details.edit.settings-box[open] > form.grid-form {
  padding: 0;
  background: none;
  border: 0;
}
main > details.edit.settings-box details.edit > summary {
  margin: 0 0 var(--space-2);
}
.token-guide table td:first-child {
  white-space: nowrap;
}
/* A project's Tools page (project-connectors-console.ts): a section per kind, what is attached as a short list, what
   could be attached folded under it. */
.tools-jump {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  margin: 0 0 var(--space-3);
  color: var(--ink2);
}
.tools-kind {
  margin-block: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}
.tools-kind > h2 {
  margin-top: 0;
}
.tool-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tool-list > li {
  min-width: 0;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.tool-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
}
.tool-item p {
  margin: var(--space-1) 0 0;
}
.add-more {
  margin-top: var(--space-2);
}
.add-more > summary {
  color: var(--bronze-ink);
  font-weight: 600;
}
.add-more > .access-items,
.add-more > .tool-list {
  margin-top: var(--space-2);
}
.add-more > .access-items {
  display: grid;
  gap: var(--space-2);
}
.add-more > .access-items > li {
  padding: var(--space-2) var(--space-3);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}
.choice.off {
  display: block;
  padding: var(--space-1) 0;
}
/* Under a finger and on phones, the links of the setup steps, the Tools page's jump links and its items' links are
   44px targets. */
@media (pointer: coarse), (max-width: 47.99rem) {
  .setup-steps > li > a,
  .tools-jump > a,
  .tool-list > li > a,
  .tool-item-head > a,
  .access-items > li > a.small {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    min-width: var(--tap);
  }
  .tools-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--space-3);
  }
}

/* Subscription CLIs (docs/57): a person's accounts on Providers, each a card with its state and what to do now. */
.cli-accounts {
  list-style: none;
  margin: var(--space-3) 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
  max-width: var(--form-max);
}
.cli-account {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.cli-account p {
  margin: 0;
}
.cli-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
}
.cli-account[aria-busy] {
  cursor: progress;
}
.cli-alert {
  margin: 0;
  background: var(--crit-bg);
  color: var(--crit);
  border-radius: var(--radius-sm);
  padding: 0.625rem var(--space-3);
  overflow-wrap: anywhere;
}
.cli-section > .cli-alert {
  max-width: var(--form-max);
  margin-block: var(--space-2);
}
/* A sign-in's steps: a mark each (done, under way, late, to come), the one under way in full. */
.cli-progress {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.cli-step {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: var(--space-2);
  align-items: start;
  color: var(--ink2);
}
.cli-step.todo {
  color: var(--muted);
}
.cli-step.active,
.cli-step.late,
.cli-step.yours {
  color: var(--ink);
}
.cli-step-body {
  display: grid;
  gap: var(--space-2);
  overflow-wrap: anywhere;
}
.cli-step-body form {
  margin: 0;
}
.cli-step-mark {
  box-sizing: border-box;
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
}
.cli-step.done .cli-step-mark {
  border-color: var(--ok);
  background: var(--ok);
  box-shadow: inset 0 0 0 2px var(--surface);
}
.cli-step.active .cli-step-mark {
  border-color: var(--bronze);
  border-right-color: transparent;
}
/* Waiting for the person (open the page, paste the code): a still ring with a dot, not a spinner. */
.cli-step.yours .cli-step-mark {
  border-color: var(--bronze);
  background: var(--bronze);
  box-shadow: inset 0 0 0 3px var(--surface);
}
/* The person opened Anthropic's page: that step reads as done while they paste the code. */
.cli-progress.opened > .cli-step.yours:has([data-cli-open]) .cli-step-mark {
  border-color: var(--ok);
  background: var(--ok);
  box-shadow: inset 0 0 0 2px var(--surface);
}
.cli-step.late .cli-step-mark {
  border-color: var(--warn);
  background: var(--warn-bg);
}
@media (prefers-reduced-motion: no-preference) {
  .cli-step.active .cli-step-mark {
    animation: cli-spin 0.9s linear infinite;
  }
  @keyframes cli-spin {
    to {
      transform: rotate(360deg);
    }
  }
}
/* The plan's allowance: a meter per limit. */
/* While a check reads the allowance (the page's script adds it): a small turning ring before the words. */
.cli-reading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cli-reading::before {
  content: "";
  flex: none;
  width: 0.9em;
  height: 0.9em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: cli-spin 0.8s linear infinite;
}
@keyframes cli-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cli-reading::before {
    animation: none;
  }
}
.cli-usage {
  display: grid;
  gap: var(--space-2);
}
.cli-meter-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-2);
  font-variant-numeric: tabular-nums;
}
.cli-meter meter {
  display: block;
  width: 100%;
  height: 0.6rem;
  margin-block: var(--space-1);
}
.cli-pct.warn {
  color: var(--warn);
}
.cli-pct.crit {
  color: var(--crit);
}
.cli-code {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-2);
}
.cli-code label {
  flex: 1 1 14rem;
  display: grid;
  gap: var(--space-1);
}
.cli-code input {
  width: 100%;
  font-family: var(--mono);
}

/* Easy lanes (Lanes page, 2026-10-17): every model without a lane, one row each, created from a small popover. */
.easy-group h3 {
  margin-block: var(--space-3) var(--space-2);
}
.easy-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
  max-width: var(--form-max);
}
.easy-item {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.easy-item.created {
  border-color: var(--ok);
}
.easy-what {
  min-width: 0;
  flex: 1 1 16rem;
  overflow-wrap: anywhere;
}
.easy-pop > summary {
  list-style: none;
}
.easy-pop > summary::-webkit-details-marker {
  display: none;
}
.easy-form {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.easy-form label {
  display: grid;
  gap: var(--space-1);
}
.easy-form label.check {
  display: flex;
}
.easy-suggest,
.easy-done {
  margin: 0;
}
/* Wider screens: the popover floats under its button, over the rows below. */
@media (min-width: 48rem) {
  .easy-pop[open] > .easy-form {
    position: absolute;
    z-index: 5;
    right: var(--space-3);
    top: calc(100% - var(--space-1));
    width: min(24rem, calc(100% - 2 * var(--space-3)));
    box-shadow: var(--shadow);
  }
}
/* Phones: the popover opens in its row, the full width. */
@media (max-width: 47.99rem) {
  .easy-pop {
    flex: 1 1 100%;
  }
}

/* A card or a task over the page (overlay.js, 2026-10-17): its page's view in a dialog, so the page stays as it was. */
dialog.view-overlay {
  width: min(66rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow);
  /* clip, not hidden: a hidden overflow can still be scrolled by a script (a link to a part of the view), which moved
     the bar out of sight and left a blank band at the bottom. */
  overflow: clip;
}
dialog.view-overlay[open] {
  display: flex;
  flex-direction: column;
  animation: view-overlay-in 160ms ease-out;
}
/* No blur behind the overlay (2026-10-24): a blurred backdrop made the browser redraw on every scroll inside the
   overlay, which showed blank patches before the text came. */
dialog.view-overlay::backdrop {
  background: rgb(8 16 26 / 0.55);
}
.view-overlay-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-3);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.view-overlay-back {
  margin-inline-end: auto;
  max-width: 60%;
  overflow-wrap: anywhere;
  text-align: start;
}
.view-overlay-close {
  min-width: 2.25rem;
  min-height: 2.25rem;
  font-size: 1.25rem;
  line-height: 1;
}
.view-overlay-stale {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--warn) 12%, var(--surface));
}
.view-overlay-stale .link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--bronze-ink);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.view-overlay-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: var(--space-3) var(--space-4) var(--space-4);
  /* Scrolled on its own layer: moved, not redrawn. */
  will-change: scroll-position;
}
.view-overlay-body h1 {
  margin-top: 0;
  font-size: 1.45rem;
}
.view-overlay-body h1:focus {
  outline: none;
}
/* In the dialog, the task's own way back (Back to tasks) and the page's wide margins are not needed. */
.view-overlay-body .task-view > h1,
.view-overlay-body .card-view h1 {
  font-size: 1.45rem;
}
@keyframes view-overlay-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  dialog.view-overlay[open] {
    animation: none;
  }
}
@media (max-width: 47.99rem) {
  dialog.view-overlay {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .view-overlay-body {
    padding: var(--space-3);
  }
}

/* A card's view (2026-10-17): its header says where it is and what kind of work, once; its sections follow. */
.card-head .card-where {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
}
.card-tasks {
  display: grid;
  gap: var(--space-1);
  margin: 0 0 var(--space-2);
  padding: 0;
  list-style: none;
}
.card-tasks > li {
  padding: var(--space-1) 0;
  border-bottom: 1px solid var(--line);
}
.card-tasks > li.current > a {
  font-weight: 600;
}
@media (pointer: coarse), (max-width: 47.99rem) {
  .card-tasks > li > a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
  }
}
.card-side > .side-form + .side-form {
  margin-top: var(--space-3);
}
/* The panel's first control needs no line above it. */
.card-side > .side-form:first-child {
  padding-top: 0;
  border-top: 0;
}

/* Two fields that belong together side by side in a fieldset (Defaults › Sandboxes: CPU and memory), stacked on a phone. */
.field-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--space-3) var(--space-5);
  align-items: start;
}

/* Chat settings' fields (2026-10-18): the chat's panel (assistant.css) and Defaults › Chat share them. */
.chat-field {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}
.chat-field > span,
.chat-field > legend,
.chat-reads > legend {
  padding: 0;
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chat-field select {
  inline-size: 100%;
  min-inline-size: 0;
}
/* Segmented choices (effort, the projects it works in): one row of chips, wrapping on phones. */
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.seg-item {
  position: relative;
  display: inline-flex;
}
.seg-item input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.seg-item span {
  display: inline-flex;
  align-items: center;
  min-block-size: 1.75rem;
  min-inline-size: 2.5rem;
  justify-content: center;
  padding: 2px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: var(--font-sm);
  white-space: nowrap;
}
.seg-item.is-default span {
  border-style: dashed;
}
.seg-item input:checked + span {
  border-color: var(--accent-fill);
  background: var(--accent-fill);
  color: var(--on-accent);
}
.seg-item input:focus-visible + span {
  outline: 2px solid var(--bronze);
  outline-offset: 2px;
}
.chat-reads {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
}
.chat-toggle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
}
.chat-toggle input {
  margin-block-start: 3px;
  flex: 0 0 auto;
}
.chat-toggle span {
  display: grid;
  min-inline-size: 0;
}
.chat-toggle small {
  color: var(--muted);
  font-size: var(--font-xs);
}
.chat-toggle:has(input:disabled) {
  opacity: 0.55;
  cursor: default;
}
.chat-reads > p {
  margin: 0;
}
.chat-more > summary {
  cursor: pointer;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.chat-more > summary .muted {
  font-weight: 400;
}
.chat-more-body {
  display: grid;
  gap: var(--space-3);
  padding-block-start: var(--space-2);
}
.chat-projects {
  display: grid;
  gap: 2px;
  max-block-size: 9rem;
  overflow-y: auto;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.chat-projects[hidden] {
  display: none;
}
.chat-projects label {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-wrap: anywhere;
}

/* Report a problem (2026-10-18): the screenshot of the page reported from, before it is attached and on the report. */
.report-shot {
  display: grid;
  gap: var(--space-2);
  margin: 0;
}
.report-shot-image {
  display: block;
  max-inline-size: min(100%, 48rem);
  block-size: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
/* While the screenshot is taken (2026-10-19, the owner: slow systems "hang there waiting with the OS loader cursor"): a
   veil over the page saying what happens, its spinner turned by the compositor so it keeps moving while the page is
   drawn; left out of the picture (data-report-skip). */
.report-veil {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background: rgb(8 16 28 / 0.45);
  animation: report-veil-in 0.12s ease-out;
}
.report-veil-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-inline-size: 26rem;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.report-veil-card p {
  margin: 0;
}
.report-veil-spin {
  flex: 0 0 auto;
  inline-size: 1.75rem;
  block-size: 1.75rem;
  border: 3px solid var(--line);
  border-block-start-color: var(--bronze);
  border-radius: 50%;
  animation: report-veil-spin 0.8s linear infinite;
  will-change: transform;
}
@keyframes report-veil-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes report-veil-in {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .report-veil,
  .report-veil-spin {
    animation-duration: 2.4s;
  }
  .report-veil {
    animation: none;
  }
}
/*
 * The lane form (docs/14 "The lane form", 2026-10-19): a wizard of four steps, their names in a row to go back to;
 * every step in order without the script. The models' dropdown has checkboxes, and above them the line on the GPU
 * memory and GPUs the models ticked need, kept in view while the list scrolls.
 */
.lane-wizard .wizard-nav {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.lane-wizard .wizard-nav button {
  min-height: var(--control-h);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink2);
  font: inherit;
  cursor: pointer;
}
.lane-wizard .wizard-nav button[aria-current="step"] {
  border-color: var(--accent-fill);
  background: var(--accent-fill);
  color: var(--on-accent);
}
.lane-wizard .wizard-nav button:disabled {
  cursor: default;
  opacity: 0.55;
}
.lane-wizard .wizard-step {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: var(--space-4) var(--space-5);
  align-items: start;
  min-width: 0;
}
.lane-wizard .wizard-step[hidden] {
  display: none;
}
.lane-wizard .wizard-step > * {
  min-width: 0;
}
.lane-wizard .wizard-step > h3,
.lane-wizard .wizard-step > fieldset,
.lane-wizard .wizard-step > .wide,
.lane-wizard .wizard-step > .span-all {
  grid-column: 1 / -1;
}
.lane-wizard .wizard-step > h3 {
  margin: 0;
}
.lane-wizard .wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.lane-models .lane-mix-summary {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 1;
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--ink);
  font-weight: 500;
}
.lane-models .choice[hidden],
.lane-models .choice-group[hidden],
.lane-wizard label.check[hidden],
.lane-wizard label[data-needs][hidden] {
  display: none;
}
/* The lane form's prices now (budget step): the button, then what the providers offer for the models ticked. */
.lane-wizard .lane-prices {
  display: grid;
  gap: var(--space-2);
}
.lane-wizard .lane-prices p {
  margin: 0;
}
.lane-wizard .lane-prices td button {
  white-space: nowrap;
}
/* The lane form's preferred GPUs: each GPU type a card with its specs, hidden when the models ticked do not fit it. */
.lane-wizard .gpu-choice[hidden] {
  display: none;
}
.lane-wizard .gpu-choice [data-gpu-need]:not(:empty) {
  display: block;
  margin-top: 2px;
}
/* The lane form asking a provider ticked under Runs on which GPUs it rents: a spinner before the line saying so. */
.lane-wizard [data-lane-gpus][aria-busy="true"] [data-lane-gpus-note]::before {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.45em;
  vertical-align: -0.12em;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent-fill);
  border-radius: 50%;
  animation: lane-gpus-spin 0.8s linear infinite;
}
@keyframes lane-gpus-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .lane-wizard [data-lane-gpus][aria-busy="true"] [data-lane-gpus-note]::before {
    animation-duration: 2.4s;
  }
}

/* A project's home (2026-10-20): its figures, what waits for the person, the places people go most, what needs
   attention and what its agents can reach. Phone first: one column, then two from 64rem. */
.home {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}
.home > * {
  min-width: 0;
}
.home-head {
  display: grid;
  gap: var(--space-3);
  align-items: end;
}
@media (min-width: 64rem) {
  .home-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-5);
  }
}
.home-title h1 {
  margin: 0;
  overflow-wrap: anywhere;
}
.home-desc {
  margin: var(--space-1) 0 0;
  color: var(--ink2);
  max-width: var(--measure);
  overflow-wrap: anywhere;
}
.home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}
@media (min-width: 64rem) {
  .home-stats {
    grid-template-columns: repeat(3, minmax(7.5rem, auto));
  }
}
.home-stat {
  display: grid;
  gap: 2px;
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.home-stat:hover {
  border-color: var(--line-strong);
}
.home-stat b {
  font-size: var(--font-kpi);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.home-stat span {
  font-size: var(--font-xs);
  color: var(--muted);
  overflow-wrap: anywhere;
}
.home-stat.is-hot {
  border-color: var(--accent-fill);
  background: var(--warn-bg);
}
.home-stat.is-hot b {
  color: var(--bronze-ink);
}
.home-stat.is-warn {
  border-color: var(--warn);
}
.home-alerts {
  background: var(--warn-bg);
  border: 1px solid var(--warn);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
}
.home-alerts ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: var(--space-1);
  font-size: var(--font-sm);
  color: var(--ink);
}
.home-grid {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 64rem) {
  .home-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: start;
  }
}
.home-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  min-width: 0;
}
.home-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  margin-bottom: var(--space-3);
}
.home-card-head h2,
.home-charter summary h2 {
  margin: 0;
}
.home-calm,
.home-more {
  margin: 0;
  color: var(--muted);
}
.home-more {
  margin-top: var(--space-3);
}
.home-charter summary {
  cursor: pointer;
  list-style-position: inside;
}
.home-charter summary h2 {
  display: inline;
}
.home-charter[open] summary {
  margin-bottom: var(--space-3);
}

/* What waits for a person, as rows (the home) and in full (Needs you). One badge per kind. */
.need-kind {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: var(--font-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: var(--surface2);
  color: var(--ink2);
}
.need-kind-question {
  background: var(--warn-bg);
  color: var(--warn);
}
.need-kind-approval {
  background: var(--crit-bg);
  color: var(--crit);
}
.need-kind-request {
  background: var(--ok-bg);
  color: var(--ok);
}
.need-age {
  font-size: var(--font-xs);
  color: var(--muted);
  white-space: nowrap;
}
main ol.need-rows,
main ol.needs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.need-rows {
  gap: 0;
}
/* A row: on phones the kind, how long it waits and its action on one line, the title and gist below; from 48rem one
   line, the action at the end. */
.need-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "kind age act"
    "main main main";
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
}
.need-row > .need-kind {
  grid-area: kind;
  justify-self: start;
}
.need-row > .need-age {
  grid-area: age;
}
.need-row > .button {
  grid-area: act;
}
@media (min-width: 48rem) {
  .need-row {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "kind main age act";
  }
}
.need-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.need-row-main {
  grid-area: main;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.need-row-title {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.need-row-gist {
  font-size: var(--font-sm);
  color: var(--ink2);
  overflow-wrap: anywhere;
}
a.button.small-button {
  min-height: 2rem;
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-sm);
}
@media (pointer: coarse), (max-width: 47.99rem) {
  a.button.small-button {
    min-height: var(--tap);
  }
}

/* The places people go most: tiles with what each is for. */
main ul.go-tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
@media (min-width: 48rem) and (max-width: 63.99rem) {
  main ul.go-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.go-tile {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-1) var(--space-3);
  align-items: start;
  align-content: start;
  height: 100%;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  min-height: var(--tap);
}
.go-tile:hover,
.go-tile:focus-visible {
  border-color: var(--accent-fill);
  background: var(--surface);
}
.go-icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--bronze-ink);
}
.go-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.go-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.go-text b {
  font-size: var(--font-base);
}
.go-text span {
  font-size: var(--font-xs);
  color: var(--muted);
  line-height: 1.35;
}
.go-badge {
  justify-self: start;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: var(--font-xs);
  font-weight: 600;
  background: var(--surface2);
  color: var(--ink2);
}
.go-badge.is-hot {
  background: var(--warn-bg);
  color: var(--warn);
}
.home-access .access-panel {
  margin: 0;
}

/* Needs you (2026-10-20): one list of what waits, per project, oldest first; recent decisions folded below. */
.needs-page {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}
.needs-page > * {
  min-width: 0;
}
.needs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
}
.needs-head h1 {
  margin: 0;
  overflow-wrap: anywhere;
}
.needs-lead {
  margin: 0;
}
.needs-region {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}
.need-counts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  font-size: var(--font-sm);
}
.need-count {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
}
.need-projects {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.need-projects a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2rem;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--font-sm);
  text-decoration: none;
  color: var(--ink);
}
.need-project-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent-fill);
  color: var(--on-accent);
  font-size: var(--font-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.need-group {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}
.need-group h2 {
  margin: var(--space-2) 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  overflow-wrap: anywhere;
}
.need-project-link {
  font-weight: 400;
}
.needs {
  gap: var(--space-3);
}
.need {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: var(--radius);
  min-width: 0;
}
.need > * {
  margin: 0;
  min-width: 0;
}
.need-question {
  border-left-color: var(--warn);
}
.need-approval {
  border-left-color: var(--crit);
}
.need-request {
  border-left-color: var(--ok);
}
.need.decided {
  opacity: 0.75;
}
.need-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
}
.need-title {
  flex: 1 1 14rem;
  margin: 0;
  font-size: var(--font-md);
  overflow-wrap: anywhere;
}
.need-text {
  color: var(--ink);
  overflow-wrap: anywhere;
}
.need-meta {
  color: var(--ink2);
}
.need-args pre {
  max-height: 18rem;
  overflow: auto;
}
.need-form {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 40rem) {
  .need-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}
.need-form textarea,
.need-form input:not([type="hidden"]) {
  width: 100%;
  min-width: 0;
}
.need-decide {
  display: grid;
  gap: var(--space-2);
}
@media (min-width: 64rem) {
  .need-decide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.needs-empty {
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4);
  text-align: center;
}
.needs-empty p {
  margin: 0 auto;
  max-width: var(--measure);
}
.needs-empty p + p {
  margin-top: var(--space-1);
}
.needs-history summary {
  cursor: pointer;
}
.needs-history summary h2 {
  display: inline;
  margin: 0;
}
.needs-history[open] summary {
  margin-bottom: var(--space-3);
}
/* Under a finger, every link of the home and Needs you is a full tap target. */
@media (pointer: coarse), (max-width: 47.99rem) {
  .need-row-title,
  .need-title a,
  .home-card-head a,
  .home-more a,
  .needs-head a,
  .need-group h2 a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
  }
  .need-projects a {
    min-height: var(--tap);
  }
}
/* Tiles: the icon above the words on phones (two across), beside them from 30rem. */
@media (min-width: 30rem) {
  .go-tile {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .go-badge {
    grid-column: 2;
  }
}

/* The schedule form's cron builder (2026-10-21): how often, then what that needs, in one wrapping row; the weekdays as
   chips; the expression in words and the next runs below it. */
.cron-builder {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface2);
}
.cron-builder[hidden],
.cron-builder [hidden] {
  display: none;
}
.cron-builder > label {
  display: grid;
  gap: 4px;
  min-inline-size: 0;
}
.cron-builder input[type="number"] {
  inline-size: 5.5rem;
}
.cron-inline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.cron-days {
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}
.cron-days legend {
  padding: 0;
  margin-block-end: 4px;
}
.cron-days .row-actions {
  margin-block-start: 4px;
}
.cron-next {
  flex: 1 0 100%;
  margin: 0;
  color: var(--ink2);
  font-variant-numeric: tabular-nums;
}
.cron-words {
  display: block;
  margin-block-start: 4px;
  color: var(--ink2);
}
.cron-words:empty,
.cron-next:empty {
  display: none;
}

/* The role directory (Agents › Role directory, docs/64): roles by category as cards. */
.role-filter {
  margin-block: var(--space-3);
}
.role-group {
  display: grid;
  gap: var(--space-3);
  margin-block: var(--space-5);
}
.role-group h2 .small {
  font-weight: 400;
  margin-left: var(--space-2);
}
.role-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: var(--space-3);
}
.role-card {
  display: grid;
  gap: var(--space-2);
  align-content: start;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.role-card h3 {
  margin: 0;
  font-size: var(--font-md, 1.05rem);
}
.role-card-head p {
  margin: var(--space-1) 0 0;
}
.role-frameworks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.role-when {
  margin: 0;
  font-size: var(--font-sm);
}
.role-skill-list {
  margin: var(--space-2) 0 0;
  padding-left: var(--space-4);
  font-size: var(--font-sm);
}
.role-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-1);
}
.role-actions form {
  margin: 0;
}
.role-sector {
  margin: var(--space-3) 0 0;
  font-size: var(--font-md);
}

/* Laws behind a setting (docs/69): "Laws: EU · CN … (i)" beside it, and its details in a native popover. */
.ci {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
}
.ci-codes {
  font-variant-numeric: tabular-nums;
}
.ci-i {
  inline-size: 1.35rem;
  block-size: 1.35rem;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font:
    italic 600 0.8rem / 1 Georgia,
    "Times New Roman",
    serif;
  cursor: pointer;
}
.ci-i:hover,
.ci-i:focus-visible {
  border-color: var(--accent-fill);
}
.ci-pop {
  inline-size: min(40rem, calc(100vw - 2rem));
  max-block-size: min(80vh, 48rem);
  overflow: auto;
  margin: auto;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.ci-pop::backdrop {
  background: rgb(0 0 0 / 30%);
}
.ci-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-block-end: 0.5rem;
}
.ci-close {
  min-height: 0;
  padding: 0.1rem 0.55rem;
  font-size: 1.2rem;
  line-height: 1;
}
.ci-laws {
  padding-inline-start: 1.1rem;
  display: grid;
  gap: 0.75rem;
}
.ci-laws li > div + div {
  margin-block-start: 0.15rem;
}
@media (pointer: coarse), (max-width: 47.99rem) {
  .ci-i {
    inline-size: 2.75rem;
    block-size: 2.75rem;
    font-size: 1rem;
  }
  .ci-close {
    min-inline-size: 2.75rem;
    min-block-size: 2.75rem;
  }
}

/* ---- The Agentic Map: its City, Brain and List (docs/74, 2026-10-26) --------------------------------------------- */
/*
 * The Agentic Map's three views of the work: the City (running-map.js, the Running agents map since 2026-10-23), the
 * Brain (brain.js, map-camera.js) and the List, with one panel over the maps (agent-panel.js). Drawn in the console's
 * own colours: cream and white in the light scheme, its dark scheme in the dark. A task's state has one colour on every
 * view (--st-*), a project one accent on both maps (--accent-*), each chosen to read on the console's surfaces.
 */
:root {
  --st-person: #a85f00;
  --st-working: #0a8277;
  --st-agent: #6447cf;
  --st-quiet: #4b7b82;
  --st-failed: #c32f3c;
  --st-paused: #4560c4;
  --st-queued: #6a7090;
  --st-held: #6a7090;
  --st-done: #2b8a4c;
  --st-cancelled: #858296;
  --accent-0: #c2185b;
  --accent-1: #6a4fd6;
  --accent-2: #0b7fae;
  --accent-3: #9a6a00;
  --accent-4: #c94f28;
  --accent-5: #11855f;
  --accent-6: #3a62c4;
  --accent-7: #5a8411;
  /* The brain's canvas: a faint grain, the Node's neutral particles and lines, its glow, a project's watermark. */
  --brain-dust: rgba(15, 34, 55, 0.2);
  --brain-ink: #2a3f55;
  --brain-line: rgba(42, 63, 85, 0.16);
  --brain-glow-a: rgba(184, 115, 42, 0.16);
  --brain-glow-b: rgba(100, 71, 207, 0.08);
  --brain-mark: rgba(15, 34, 55, 0.05);
  --brain-halo: 0.16;
  /* The city by day. */
  --map-agent: #2f6aa8;
  --map-agent-bg: #e1ebf6;
  --map-street: #e4e7e3;
  --map-ground: #eef1ec;
  --map-building: #c9d0cb;
  --map-tree: #b9d8c2;
  --map-window: #ffffff;
  --map-pond: #cfe0ec;
}
@media (prefers-color-scheme: dark) {
  :root {
    --st-person: #ffb547;
    --st-working: #3ee0d0;
    --st-agent: #a98bff;
    --st-quiet: #6fb6c0;
    --st-failed: #ff6b7a;
    --st-paused: #7f9cff;
    --st-queued: #9da3cf;
    --st-held: #9da3cf;
    --st-done: #6fdc8c;
    --st-cancelled: #9a97b4;
    --accent-0: #ff6fb1;
    --accent-1: #a98bff;
    --accent-2: #45d4ff;
    --accent-3: #ffc94d;
    --accent-4: #ff8a65;
    --accent-5: #5fe3b5;
    --accent-6: #7aa8ff;
    --accent-7: #c3e86b;
    --brain-dust: rgba(238, 241, 240, 0.22);
    --brain-ink: #eef1f0;
    --brain-line: rgba(201, 210, 216, 0.14);
    --brain-glow-a: rgba(213, 144, 64, 0.2);
    --brain-glow-b: rgba(127, 177, 230, 0.12);
    --brain-mark: rgba(238, 241, 240, 0.05);
    --brain-halo: 0.3;
  }
  :root:not([data-theme="light"]) {
    --map-agent: #7fb1e6;
    --map-agent-bg: #1c2c3d;
    --map-street: #1e2522;
    --map-ground: #252d29;
    --map-building: #3a4540;
    --map-tree: #2c4a37;
    --map-window: #ffd27a;
    --map-pond: #24384a;
  }
}
:root[data-theme="dark"] {
  --map-agent: #7fb1e6;
  --map-agent-bg: #1c2c3d;
  --map-street: #1e2522;
  --map-ground: #252d29;
  --map-building: #3a4540;
  --map-tree: #2c4a37;
  --map-window: #ffd27a;
  --map-pond: #24384a;
}
/* A state's colour for whatever carries its class: a dot, a chip, a bot, a node. */
.s-person {
  --st: var(--st-person);
}
.s-working {
  --st: var(--st-working);
}
.s-agent {
  --st: var(--st-agent);
}
.s-quiet {
  --st: var(--st-quiet);
}
.s-failed {
  --st: var(--st-failed);
}
.s-paused {
  --st: var(--st-paused);
}
.s-queued {
  --st: var(--st-queued);
}
.s-held {
  --st: var(--st-held);
}
.s-done {
  --st: var(--st-done);
}
.s-cancelled {
  --st: var(--st-cancelled);
}
.accent-0 {
  --acc: var(--accent-0);
}
.accent-1 {
  --acc: var(--accent-1);
}
.accent-2 {
  --acc: var(--accent-2);
}
.accent-3 {
  --acc: var(--accent-3);
}
.accent-4 {
  --acc: var(--accent-4);
}
.accent-5 {
  --acc: var(--accent-5);
}
.accent-6 {
  --acc: var(--accent-6);
}
.accent-7 {
  --acc: var(--accent-7);
}
.state-dot {
  flex: none;
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--st, var(--muted));
}
.s-queued .state-dot,
.s-held .state-dot {
  background: transparent;
  border: 2px dashed var(--st);
}
.s-cancelled .state-dot {
  background: transparent;
  border: 2px solid var(--st);
}
.s-working .state-dot,
.s-person .state-dot {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--st) 22%, transparent);
}

/* City · Brain · List, at the top of the Agentic Map. */
.world-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-block: var(--space-1) var(--space-3);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.world-switch-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 2.25rem;
  padding: 0 var(--space-4);
  border-radius: 999px;
  color: var(--ink2);
  font-weight: 600;
  font-size: var(--font-sm);
  text-decoration: none;
}
.world-switch-item:hover {
  background: var(--surface2);
  color: var(--ink);
}
.world-switch-item[aria-current="page"] {
  background: var(--ink);
  color: var(--surface);
}
/* Its words take their colour from the item's state themselves (the script moves the current one). */
.world-switch-item > span {
  color: var(--ink2);
}
.world-switch-item:hover > span {
  color: var(--ink);
}
.world-switch-item[aria-current="page"] > span {
  color: var(--surface);
}
@media (pointer: coarse), (max-width: 47.99rem) {
  .world-switch-item {
    min-height: var(--tap);
  }
}
.world-icon {
  flex: none;
}
.world-lead {
  margin-block: 0 var(--space-3);
}
.world-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: var(--font-sm);
  color: var(--ink2);
}
.world-legend li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.world-legend b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.world-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink2);
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.world-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}
.world-live.is-live .world-live-dot {
  background: var(--ok);
  animation: world-live 2.2s ease-out infinite;
}
@keyframes world-live {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent);
  }
  70%,
  100% {
    box-shadow: 0 0 0 9px color-mix(in srgb, var(--ok) 0%, transparent);
  }
}

/* ---- the Brain ---- */
.brain {
  position: relative;
  display: grid;
  margin-block: var(--space-2) var(--space-5);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgb(15 34 55 / 0.07);
  overflow: hidden;
}
.brain[hidden] {
  display: none;
}
.brain-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.brain-bar-summary {
  flex: 1 1 14rem;
  margin: 0;
  color: var(--ink);
  font-size: var(--font-sm);
}
.brain-crumbs {
  flex: 1 1 100%;
  order: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  font-size: var(--font-sm);
}
.brain-crumbs[hidden] {
  display: none;
}
button.brain-crumb {
  min-height: 2rem;
  padding: 0 var(--space-2);
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--bronze-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
button.brain-crumb:hover {
  background: var(--surface2);
}
.brain-crumb-sep {
  color: var(--muted);
}
.brain-crumb-here {
  font-weight: 700;
  overflow-wrap: anywhere;
}
.brain-bar-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-inline-start: auto;
}
.brain-find {
  display: block;
}
.brain-find input {
  width: 14rem;
  min-height: 2.25rem;
  padding-inline: var(--space-4);
  border-radius: 999px;
}
button.brain-back {
  min-height: 2.25rem;
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}
button.brain-back:hover {
  background: var(--surface2);
}
/* The stage takes every gesture over it (the wheel, a drag, two fingers): the page does not scroll or zoom there. */
.brain-stage {
  position: relative;
  height: clamp(30rem, 74vh, 56rem);
  background: var(--bg);
  touch-action: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.brain.is-dragging .brain-stage {
  cursor: grabbing;
}
.brain-canvas,
.brain-svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.brain-zoom {
  position: absolute;
  z-index: 4;
  right: var(--space-3);
  bottom: var(--space-3);
  display: flex;
  gap: 4px;
}
.brain-zoom button.secondary {
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0 var(--space-3);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgb(15 34 55 / 0.12);
  font-size: 1rem;
}
@media (pointer: coarse), (max-width: 47.99rem) {
  .brain-zoom button.secondary {
    min-width: var(--tap);
    min-height: var(--tap);
  }
}
.brain-tip,
.agent-map-tip {
  position: absolute;
  z-index: 5;
  max-width: min(320px, calc(100% - 16px));
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  pointer-events: none;
}
.brain-tip b,
.agent-map-tip b {
  overflow-wrap: anywhere;
}
.brain > .world-legend {
  padding: var(--space-3) var(--space-4) var(--space-4);
  border-top: 1px solid var(--line);
  background: var(--surface);
}
@media (max-width: 47.99rem) {
  .brain {
    margin-inline: calc(var(--gutter) * -0.5);
    border-radius: 16px;
  }
  .brain-stage {
    height: 34rem;
  }
  .brain-bar-tools,
  .brain-find,
  .brain-find input {
    width: 100%;
  }
  button.brain-back,
  .brain-find input,
  button.brain-crumb {
    min-height: var(--tap);
  }
}
/* The SVG over the canvas: what is clicked, tabbed to and named. Text keeps a halo of the stage for its contrast. */
.brain-svg text {
  fill: currentColor;
  font-family: var(--body);
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.brain-svg .hidden {
  display: none;
}
.brain-svg [data-id] {
  cursor: pointer;
  outline: none;
}
.brain-svg .faded {
  opacity: 0.14;
}
.brain-svg .dim {
  opacity: 0.4;
}
/* Around a task in focus the other tasks stay as dots: their names give its own the room. */
.brain-svg .dim .b-labels {
  display: none;
}
.b-project {
  color: var(--ink);
}
.b-halo {
  fill: var(--acc);
  opacity: 0.12;
}
.b-ring {
  fill: var(--surface);
  stroke: var(--acc);
  stroke-width: 2.2;
}
.b-core {
  fill: var(--acc);
  opacity: 0.16;
}
.brain-svg .b-initials {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-anchor: middle;
  stroke-width: 0;
}
.brain-svg .big .b-initials {
  font-size: 16px;
}
.brain-svg .b-name {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-anchor: middle;
}
.brain-svg .big .b-name {
  font-size: 14px;
}
.brain-svg .b-sub {
  color: var(--muted);
  font-size: 12px;
  text-anchor: middle;
}
/* What waits for a person: an amber ring with its count or a "!". */
.b-badge circle,
.b-call circle {
  fill: var(--surface);
  stroke: var(--st-person);
  stroke-width: 2;
}
.brain-svg .b-badge text,
.brain-svg .b-call text {
  color: var(--warn);
  font-size: 12px;
  font-weight: 800;
  text-anchor: middle;
  stroke-width: 0;
}
.b-project.waits .b-ring {
  stroke-width: 2.8;
}
.b-dot {
  fill: var(--st);
}
.b-hit {
  fill: transparent;
}
.b-pulse {
  fill: none;
  stroke: var(--st);
  stroke-width: 1.6;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: b-pulse 2.6s ease-out infinite;
}
.s-person .b-pulse {
  animation-duration: 1.9s;
}
.s-agent .b-pulse {
  animation-duration: 3.6s;
}
@keyframes b-pulse {
  0% {
    opacity: 0.75;
    transform: scale(0.55);
  }
  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}
.b-task.s-queued .b-dot,
.b-task.s-held .b-dot {
  fill: var(--surface);
  stroke: var(--st);
  stroke-width: 1.4;
  stroke-dasharray: 2 2;
}
.b-task.s-paused .b-dot {
  fill: var(--surface);
  stroke: var(--st);
  stroke-width: 1.8;
}
.b-task.s-done .b-dot {
  opacity: 0.85;
}
.b-task.s-cancelled .b-dot {
  fill: none;
  stroke: var(--st);
  stroke-width: 1.4;
}
.b-task.you .b-dot {
  stroke: var(--ink);
  stroke-width: 1.4;
}
/* Spread out: a ring in the state's colour around its core, as large as its name needs it. */
.b-task.labelled .b-dot {
  fill: color-mix(in srgb, var(--st) 14%, var(--surface));
  stroke: var(--st);
  stroke-width: 2.5;
}
.b-core-dot {
  fill: var(--st);
}
.b-task.labelled.s-queued .b-core-dot,
.b-task.labelled.s-held .b-core-dot,
.b-task.labelled.s-cancelled .b-core-dot {
  fill: none;
}
/* A task's name, over the lines that reach other tasks: a wide halo of the stage clears them. */
.brain-svg .b-label {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  text-anchor: middle;
  stroke-width: 6px;
}
.brain-svg .b-label.small {
  font-size: 12px;
  font-weight: 500;
  stroke-width: 4px;
}
.brain-svg .b-label-sub {
  color: var(--muted);
  font-size: 12px;
  text-anchor: middle;
  stroke-width: 6px;
}
/* The level of detail: a name shows where the zoom gives it room (brain.js decides which). */
.brain-svg .b-labels.lod {
  display: none;
}
.brain-svg .b-labels.lod.on {
  display: inline;
}
.b-link {
  fill: none;
  stroke: var(--line-strong);
  stroke-opacity: 0.5;
  stroke-width: 1;
}
.b-link.trunk {
  stroke: var(--acc);
  stroke-opacity: 0.55;
  stroke-width: 1.3;
}
.b-link.step {
  stroke-dasharray: 3 3;
}
.brain-svg .b-link.hidden {
  display: none;
}
.b-more-dot {
  fill: var(--surface);
  stroke: var(--line-strong);
  stroke-dasharray: 2 2;
}
.brain-svg .b-more text {
  color: var(--ink2);
  font-size: 12px;
  font-weight: 700;
  text-anchor: middle;
  stroke-width: 0;
}
.brain-svg .b-node-name {
  color: var(--ink2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-anchor: middle;
  stroke-width: 4px;
}
.brain-svg .b-calm text {
  color: var(--ink2);
  font-size: 13px;
  text-anchor: middle;
}
/* The keyboard's place, and the task open in the panel. */
.brain-svg [role="button"]:focus-visible .b-hit {
  stroke: var(--bronze);
  stroke-width: 2.5;
  stroke-dasharray: 4 3;
}
.brain-svg [role="button"]:focus-visible .b-ring {
  stroke-width: 3.2;
}
.b-task.is-selected .b-dot,
.b-project.is-selected .b-ring {
  stroke: var(--ink);
  stroke-width: 2.4;
}
.searching .b-task:not(.match) {
  opacity: 0.18;
}
.searching .b-task.match .b-dot {
  stroke: var(--ink);
  stroke-width: 2;
}
.b-new {
  animation: b-new 0.7s ease-out;
}
@keyframes b-new {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .b-pulse {
    animation: none;
    opacity: 0.4;
    transform: scale(1.25);
  }
  .b-new,
  .world-live.is-live .world-live-dot {
    animation: none;
  }
}

/* The List: the Node, then each project with its tasks. Behind the Brain it stays for screen readers, at the brain's
   own place. */
.brain-world {
  position: relative;
}
.brain-list-wrap {
  margin-block: var(--space-2) var(--space-5);
}
.brain-list-behind {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.brain-list {
  display: grid;
  gap: var(--space-3);
}
/* The lists' pages (brain/paging.ts): the filters above, Previous · where · Next below, a note of newer work. */
.world-filter {
  margin-block: var(--space-3);
}
.world-filter > label {
  flex: 1 1 13rem;
}
.world-filter > button,
.world-filter > a.button {
  flex: none;
}
.world-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  margin-block: var(--space-3);
}
.world-pager.one {
  justify-content: flex-start;
}
.world-pager-where {
  flex: 1 1 12rem;
  margin: 0;
  color: var(--ink2);
  font-size: var(--font-sm);
  text-align: center;
}
.world-pager.one .world-pager-where {
  text-align: start;
}
.world-pager-gap {
  flex: none;
  width: 7.5rem;
}
@media (max-width: 47.99rem) {
  .world-pager > a.button {
    flex: 1 1 8rem;
    min-height: var(--tap);
  }
  .world-pager-where {
    order: -1;
    flex-basis: 100%;
  }
  .world-pager-gap {
    display: none;
  }
}
.world-fresh {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--st-working);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
.world-fresh-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--st-working);
}
.brain-project-cont {
  color: var(--ink2);
  font-size: var(--font-sm);
  font-weight: 500;
}
.brain-quiet {
  margin: 0;
}
.brain-node-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--bronze);
  border-radius: 16px;
  background: var(--surface);
}
.brain-node-orb {
  flex: none;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: radial-gradient(
    circle at 36% 34%,
    #fff 0,
    #f4dcb9 16%,
    #d08b3c 46%,
    #8a5bd0 78%,
    #4a3591 100%
  );
  box-shadow:
    0 0 14px rgb(208 139 60 / 0.45),
    0 0 34px rgb(100 71 207 / 0.18);
}
.brain-node-name {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.brain-node-summary {
  margin: 2px 0 0;
  font-size: var(--font-md);
  font-weight: 600;
}
.brain-node-orchestrator {
  margin: 2px 0 0;
  color: var(--ink2);
  font-size: var(--font-sm);
  overflow-wrap: anywhere;
}
.brain-projects {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr));
  align-items: start;
}
.brain-project {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-3) var(--space-3) var(--space-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--acc);
  border-radius: 14px;
  background: var(--surface);
}
.brain-project-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.brain-project-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid var(--acc);
  border-radius: 50%;
  background: color-mix(in srgb, var(--acc) 12%, var(--surface));
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
}
.brain-project-name {
  min-width: 0;
}
.brain-project-name h3 {
  margin: 0;
  font-size: var(--font-md);
  overflow-wrap: anywhere;
}
.brain-project-name h3 a {
  color: var(--ink);
  text-decoration: none;
}
.brain-project-name h3 a:hover {
  text-decoration: underline;
}
@media (pointer: coarse), (max-width: 47.99rem) {
  .brain-project-name h3 a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
  }
}
.brain-project-name p,
.brain-project-quiet {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-sm);
}
.brain-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
}
.brain-rows .brain-rows {
  margin-inline-start: 13px;
  padding-inline-start: 10px;
  border-inline-start: 1px dashed var(--line-strong);
}
.brain-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--tap);
  padding: 5px var(--space-2);
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brain-row:hover {
  background: var(--surface2);
}
.brain-row-text {
  display: grid;
  min-width: 0;
}
.brain-row-title {
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.depth-1 > .brain-row .brain-row-title,
.depth-2 > .brain-row .brain-row-title {
  font-weight: 500;
}
.brain-row-meta {
  color: var(--muted);
  font-size: var(--font-sm);
  overflow-wrap: anywhere;
}
.brain-row-you {
  flex: none;
  margin-inline-start: auto;
  padding: 1px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--warn);
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brain-row-more {
  padding: var(--space-1) var(--space-2);
  color: var(--muted);
  font-size: var(--font-sm);
}

/* The panel over the maps (agent-panel.js), on the right; the whole screen on a phone. */
.agent-panel {
  position: fixed;
  z-index: 40;
  inset-block: 0;
  inset-inline-end: 0;
  width: min(30rem, 100vw);
  display: flex;
  flex-direction: column;
  border-inline-start: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: -18px 0 50px rgb(15 34 55 / 0.16);
  transition:
    transform 0.22s ease,
    opacity 0.22s ease;
}
.agent-panel[hidden] {
  display: none;
}
.agent-panel.entering {
  transform: translateX(28px);
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .agent-panel {
    transition: none;
  }
}
.agent-panel-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-3);
  border-bottom: 1px solid var(--line);
  background: var(--surface2);
}
.agent-panel-status {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: var(--ink2);
}
button.agent-panel-close {
  min-width: var(--tap);
  min-height: var(--tap);
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
}
button.agent-panel-close:hover,
button.agent-panel-back:hover {
  background: var(--surface);
}
button.agent-panel-back {
  min-height: var(--control-h);
  padding: 0 var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}
.agent-panel-stale {
  margin: 0;
  padding: var(--space-2) var(--space-4);
  background: var(--warn-bg);
  color: var(--warn);
}
.agent-panel-stale .link-button {
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}
.agent-panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-4) var(--space-4) var(--space-6);
}
.agent-panel-loading {
  margin: 0;
}
@media (max-width: 47.99rem) {
  .agent-panel {
    width: 100vw;
    border-inline-start: 0;
  }
}

/* A task's setup at a glance: the panel's content and the task page's card share these. */
.glance {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}
.glance-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin: 0;
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.glance-autonomy {
  color: var(--bronze-ink);
}
.glance-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink2);
  letter-spacing: 0.06em;
}
.glance-title {
  margin: 2px 0 0;
  font-size: var(--font-xl);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
/* The panel moves the focus to its title for screen readers; the title is not a control to outline. */
.glance-title:focus {
  outline: none;
}
.glance-byline {
  margin: 0;
  color: var(--ink2);
  font-size: var(--font-sm);
  overflow-wrap: anywhere;
}
.glance-byline a {
  color: inherit;
}
.glance-purpose {
  margin: 0;
  overflow-wrap: anywhere;
}
.glance-waits {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-1);
  padding: var(--space-3);
  border: 1px solid color-mix(in srgb, var(--st-person) 60%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--st-person) 12%, var(--surface));
}
.glance-waits h3,
.glance-block h3 {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.glance-waits h3 {
  color: var(--warn);
}
.glance-waits ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.glance-waits li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
}
.glance-wait-what {
  min-width: 0;
  font-size: var(--font-sm);
}
/* What a person reviews (2026-10-27): the ask, the goal, what it did and made, where each answer leads. */
.glance-review {
  display: grid;
  gap: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid color-mix(in srgb, var(--st-person) 40%, var(--line));
}
.glance-review p {
  margin: 0;
}
.glance-review ul {
  list-style: disc;
  padding-inline-start: var(--space-4);
}
.glance-review li {
  display: list-item;
}
.glance-question {
  margin: 0;
  padding-inline-start: var(--space-3);
  border-inline-start: 3px solid var(--st-person);
  font-style: italic;
}
.glance-inline-form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
}
.glance-gate,
.glance-reply {
  display: grid;
  gap: var(--space-2);
  margin: 0;
}
.glance-actions {
  margin-top: var(--space-1);
}
.glance-readonly {
  margin: 0;
}
.glance-stack {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}
.glance-block {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}
.glance-block p {
  margin: 0;
}
.glance-chips,
.glance-needs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.glance-chips li,
.glance-needs li {
  max-width: 100%;
  min-width: 0;
}
.glance-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 2rem;
  padding: 3px 12px 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface2);
  color: var(--ink);
  font-size: var(--font-sm);
  text-decoration: none;
}
.glance-chip:hover {
  border-color: var(--st);
}
.glance-chip.dashed {
  border-style: dashed;
  background: transparent;
}
.glance-chip-why {
  flex: none;
  color: var(--muted);
}
.glance-chip-title {
  min-width: 0;
  overflow-wrap: anywhere;
}
.glance-chip-more {
  align-self: center;
  color: var(--muted);
  font-size: var(--font-sm);
}
@media (pointer: coarse), (max-width: 47.99rem) {
  .glance-chip {
    min-height: var(--tap);
  }
}
.glance-needs li {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface2);
  font-size: var(--font-sm);
}
.glance-need-kind {
  color: var(--muted);
}
.glance-stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
}
.glance-stages li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: var(--font-sm);
}
.glance-stages li + li::before {
  content: "";
  width: 1.25rem;
  height: 2px;
  margin-inline: 6px;
  border-radius: 2px;
  background: var(--line-strong);
}
.glance-stage-dot {
  flex: none;
  width: 11px;
  height: 11px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
}
.glance-stages .at-done .glance-stage-dot {
  border-color: var(--st-done);
  background: var(--st-done);
}
.glance-stages .at-done + li::before {
  background: var(--st-done);
}
.glance-stages .at-current {
  color: var(--ink);
  font-weight: 700;
}
.glance-stages .at-current .glance-stage-dot {
  border-color: var(--bronze);
  background: var(--bronze);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--bronze) 28%, transparent);
}
.glance-stages.ended-failed .at-current .glance-stage-dot,
.glance-stages.ended-failed .at-done:last-child .glance-stage-dot {
  border-color: var(--st-failed);
  background: var(--st-failed);
}
.glance-stages.ended-cancelled .at-current .glance-stage-dot,
.glance-stages.ended-cancelled .at-done:last-child .glance-stage-dot {
  border-color: var(--st-cancelled);
  background: var(--st-cancelled);
}
.glance-stage-end {
  margin: 4px 0 0;
  color: var(--muted);
}
.glance-ladder {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.glance-ladder li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: 6px var(--space-2);
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: var(--font-sm);
}
.glance-ladder li.current {
  border-color: color-mix(in srgb, var(--bronze) 50%, transparent);
  background: color-mix(in srgb, var(--bronze) 12%, transparent);
  color: var(--ink);
}
.glance-ladder b {
  color: inherit;
}
.glance-rung {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
}
.glance-ladder li.current .glance-rung {
  border-color: var(--bronze);
  background: var(--bronze);
}
.glance-why {
  display: block;
  margin-top: 2px;
  color: var(--ink2);
}
/* The ladder changed in place (2026-10-28): Edit beside its heading turns the rungs into choices; the one chosen
   shows what saving it does; Save and Cancel below. Read, it looks as before. */
.glance-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-width: 0;
}
.glance-edit {
  min-width: 44px;
  min-height: 44px;
  margin: -12px 0;
  padding: 0 var(--space-2);
  font-size: var(--font-sm);
}
.glance-ladder-form {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}
.glance-ladder-choice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  flex: 1;
  min-width: 0;
}
.glance-ladder-choice > input,
.glance-ladder-effect,
.glance-ladder-actions {
  display: none;
}
.glance-ladder-form.editing .glance-ladder-choice {
  cursor: pointer;
}
.glance-ladder-form.editing .glance-ladder-choice > input {
  display: block;
  flex: none;
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  accent-color: var(--bronze);
}
.glance-ladder-form.editing .glance-rung,
.glance-ladder-form.editing .glance-why {
  display: none;
}
.glance-ladder-form.editing li.current {
  border-color: transparent;
  background: none;
  color: var(--muted);
}
.glance-ladder-form.editing li:hover {
  border-color: var(--line);
}
.glance-ladder-form.editing li:has(input:checked) {
  border-color: color-mix(in srgb, var(--bronze) 50%, transparent);
  background: color-mix(in srgb, var(--bronze) 12%, transparent);
  color: var(--ink);
}
.glance-ladder-form.editing li:has(input:checked) .glance-ladder-effect {
  display: block;
  margin-top: 4px;
  color: var(--ink2);
}
.glance-ladder-effect select {
  max-width: 100%;
  margin-top: 4px;
}
.glance-ladder-keeps {
  display: block;
  margin-top: 4px;
  color: var(--warn);
}
.glance-ladder-form.editing .glance-ladder-actions {
  display: flex;
}
.glance-rule {
  font-weight: 600;
}
.glance-meter {
  display: block;
  height: 8px;
  margin-bottom: 2px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface2);
}
.glance-meter-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--st-working), var(--st-agent));
}
.glance-last {
  font-style: italic;
}
.glance-work {
  margin: var(--space-2) 0 0;
}
/* The card at the top of a task's page: the page's own colours, the state's on its edge. */
.glance-card {
  margin-block: var(--space-3) var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--st);
  border-radius: 14px;
  background: var(--surface);
}
.glance-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px var(--space-4);
}
.glance-card-title {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.glance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: var(--space-4) var(--space-5);
  margin-top: var(--space-2);
}
.glance-grid .glance-progress {
  grid-column: 1 / -1;
}

/* ---- the City (running-map.js): its districts in their projects' accents, by day (at night in the dark scheme) ---- */
.agent-map {
  position: relative;
  display: grid;
  margin-block: var(--space-2) var(--space-6);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgb(15 34 55 / 0.07);
  overflow: hidden;
}
.city-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.city-bar h2 {
  margin: 0;
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.city-bar-summary {
  flex: 1 1 12rem;
  margin: 0;
  color: var(--ink);
  font-size: var(--font-sm);
}
.city-zoom {
  display: inline-flex;
  gap: 4px;
  margin-inline-start: auto;
}
.city-zoom button.secondary {
  min-width: 2.5rem;
  min-height: 2.25rem;
  padding: 0 var(--space-3);
  border-radius: 999px;
  font-size: 1rem;
}
.city-zoom button.secondary:disabled {
  opacity: 0.45;
  cursor: default;
}
@media (pointer: coarse), (max-width: 47.99rem) {
  .city-zoom button.secondary {
    min-width: var(--tap);
    min-height: var(--tap);
  }
}
.city-how {
  margin: 0;
  padding: var(--space-2) var(--space-4) 0;
  color: var(--ink2);
}
.agent-map-canvas {
  min-height: 160px;
  margin: var(--space-3);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--map-street);
  touch-action: pan-x pan-y;
  overflow: hidden;
}
.agent-map.is-zoomed .agent-map-canvas {
  touch-action: none;
  cursor: grab;
}
.agent-map.is-dragging .agent-map-canvas {
  cursor: grabbing;
}
.agent-map-canvas > p {
  margin: 0;
  padding: var(--space-3);
  color: var(--ink2);
}
.agent-map > .world-legend {
  padding: var(--space-3) var(--space-4) var(--space-4);
  border-top: 1px solid var(--line);
  background: var(--surface);
}
@media (max-width: 47.99rem) {
  .agent-map {
    margin-inline: calc(var(--gutter) * -0.5);
    border-radius: 16px;
  }
  .agent-map-canvas {
    margin: var(--space-2);
  }
}
.map-svg {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
}
.map-bg {
  fill: var(--map-street);
}
.map-street {
  fill: var(--map-street);
}
.map-lane {
  stroke: var(--surface);
  stroke-width: 1.4;
  stroke-dasharray: 7 9;
  opacity: 0.7;
}
.map-lamp {
  fill: var(--line-strong);
}
.map-lamp-glow {
  fill: var(--bronze);
  opacity: 0.04;
}
.map-ground {
  fill: var(--map-ground);
  stroke: var(--line);
}
.map-edge {
  fill: none;
  stroke: var(--acc);
  stroke-opacity: 0.5;
  stroke-width: 1.5;
}
.map-city:hover .map-edge {
  stroke-opacity: 0.85;
}
.map-plaza {
  fill: var(--surface);
  stroke: var(--line);
}
.map-plaza-inner {
  fill: none;
  stroke: var(--line);
  stroke-dasharray: 2 5;
}
.bot-hit {
  fill: transparent;
}
.map-building {
  fill: var(--map-building);
}
.map-window {
  fill: var(--map-window);
  opacity: 0.6;
}
.map-window.cool {
  fill: var(--map-agent-bg);
}
.map-tree {
  fill: var(--map-tree);
}
/* A couple of trees and a cat, a dog and a bird on the squares' open places: for the eye only, never a target. */
.map-decor {
  pointer-events: none;
}
.map-trunk {
  fill: color-mix(in srgb, var(--bronze) 45%, var(--map-building));
}
.map-deco.tree .map-tree {
  fill: color-mix(in srgb, var(--map-tree) 70%, var(--st-done));
  opacity: 0.85;
}
.map-animal {
  stroke: none;
}
.map-cat {
  fill: color-mix(in srgb, var(--bronze) 70%, var(--surface));
}
.map-dog {
  fill: color-mix(in srgb, var(--ink2) 45%, var(--surface));
}
.map-dog-ear {
  fill: color-mix(in srgb, var(--ink2) 70%, var(--surface));
}
.map-bird {
  fill: color-mix(in srgb, var(--map-agent) 75%, var(--surface));
}
.map-beak {
  fill: var(--bronze);
}
.map-animal-eye {
  fill: var(--surface);
}
.map-animal-eye.dark {
  fill: var(--ink);
}
.map-animal-line {
  fill: none;
  stroke-width: 1.3;
  stroke-linecap: round;
}
.map-cat-line {
  stroke: color-mix(in srgb, var(--bronze) 70%, var(--surface));
}
.map-dog-line {
  stroke: color-mix(in srgb, var(--ink2) 45%, var(--surface));
}
.map-bird-line {
  stroke: var(--ink2);
  stroke-width: 0.8;
}
.map-grass {
  fill: color-mix(in srgb, var(--map-tree) 22%, var(--map-ground));
  stroke: var(--line);
}
.map-pond {
  fill: var(--map-pond);
  stroke: var(--line);
}
.map-sign-bar {
  fill: var(--acc);
}
.map-name {
  fill: currentColor;
  color: var(--ink);
  font: 700 12.5px var(--body);
  letter-spacing: 0.14em;
}
.map-name-link:focus-visible .map-name,
.map-name-link:hover .map-name {
  text-decoration: underline;
}
.map-sub {
  fill: currentColor;
  color: var(--ink2);
  font: 12px var(--body);
}
.map-more,
.map-calm {
  fill: currentColor;
  color: var(--ink2);
  font: 12px var(--body);
  text-anchor: middle;
}
.map-link {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.4;
  stroke-dasharray: 3 4;
}
.map-car-body {
  fill: var(--line-strong);
}
.map-car.c1 .map-car-body {
  fill: var(--bronze);
}
.map-car.c2 .map-car-body {
  fill: var(--map-agent);
}
.map-car-light {
  fill: var(--surface);
  opacity: 0.85;
}
/* At night (the dark scheme) the lamps and the car lights glow warm. */
@media (prefers-color-scheme: dark) {
  .map-lamp {
    fill: #ffe4a8;
  }
  .map-lamp-glow {
    fill: #ffcf7a;
    opacity: 0.09;
  }
  .map-car-light {
    fill: #ffe9b0;
    opacity: 0.9;
  }
}
.map-bot {
  cursor: pointer;
}
.map-bot:focus-visible {
  outline: none;
}
.map-bot:focus-visible .bot-head {
  stroke: var(--bronze);
  stroke-width: 3;
}
.bot-shadow {
  fill: var(--ink);
  opacity: 0.1;
}
.bot-antenna {
  stroke: var(--ink2);
  stroke-width: 1.4;
}
.bot-head,
.bot-torso {
  fill: color-mix(in srgb, var(--st, var(--line-strong)) 16%, var(--surface));
  stroke: var(--st, var(--line-strong));
  stroke-width: 1.6;
}
.bot-light {
  fill: var(--st, var(--muted));
}
.bot-eye {
  fill: var(--ink);
}
.bot-bubble circle {
  fill: var(--st);
  stroke: var(--surface);
  stroke-width: 1.2;
}
.bot-bubble text {
  fill: var(--surface);
  font: 800 12px var(--body);
  text-anchor: middle;
}
.map-bot.s-queued .bot-head,
.map-bot.s-queued .bot-torso {
  fill: var(--surface);
  stroke-dasharray: 2 2;
}
.map-bot.s-paused .bot-head,
.map-bot.s-paused .bot-torso,
.map-bot.s-cancelled .bot-head,
.map-bot.s-cancelled .bot-torso {
  fill: var(--surface2);
}
.bot-lid,
.bot-mouth,
.bot-arm {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.3;
  stroke-linecap: round;
}
.bot-arm {
  stroke: var(--ink2);
}
.bot-z {
  fill: none;
  stroke: var(--st-paused);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bot-cloud circle,
.bot-cloud rect {
  fill: var(--line-strong);
}
.bot-drop {
  stroke: var(--map-agent);
  stroke-width: 1.2;
  stroke-linecap: round;
}
/* Disappointed: slumped a little to one side. */
.map-bot.s-cancelled .bot-body {
  transform: rotate(-7deg) translateY(1px);
  transform-box: fill-box;
  transform-origin: center bottom;
}
.bot-tag {
  fill: currentColor;
  color: var(--ink2);
  font: 600 6.5px var(--body);
  text-anchor: middle;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 2.5px;
}
.map-svg:not(.zoomed) .bot-tag {
  display: none;
}
/* Working bots bob and blink; one that waits for a person calls with its bubble and its beacon. */
.map-bot.s-working .bot-body {
  animation: bot-bob 1.6s ease-in-out infinite;
}
.map-bot.s-working .bot-light {
  animation: bot-blink 1.2s steps(2, jump-none) infinite;
}
.bot-eyes {
  animation: bot-eyes 4s infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.map-bot.s-working .bot-arms {
  animation: bot-arms 0.9s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center top;
}
.map-bot.s-person .bot-body {
  animation: bot-hop 2.2s ease-in-out infinite;
}
.map-bot.s-agent .bot-bubble text {
  animation: bot-blink 1s steps(2, jump-none) infinite;
}
.map-bot.s-cancelled .bot-body {
  animation: bot-sigh 4.5s ease-in-out infinite;
}
.map-bot.s-person .bot-bubble {
  animation: bot-call 1.4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes bot-eyes {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.1);
  }
}
@keyframes bot-arms {
  from {
    transform: rotate(-10deg);
  }
  to {
    transform: rotate(10deg);
  }
}
@keyframes bot-hop {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  70% {
    transform: translateY(-4px);
  }
  80% {
    transform: translateY(0);
  }
  88% {
    transform: translateY(-2px);
  }
}
@keyframes bot-sigh {
  0%,
  100% {
    transform: rotate(-7deg) translateY(1px);
  }
  50% {
    transform: rotate(-9deg) translateY(2px);
  }
}
@keyframes bot-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1.8px);
  }
}
@keyframes bot-blink {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0.35;
  }
}
@keyframes bot-call {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
}
@media (prefers-reduced-motion: reduce) {
  .map-bot.s-working .bot-body,
  .map-bot.s-working .bot-light,
  .map-bot.s-person .bot-bubble,
  .map-bot.s-person .bot-body,
  .map-bot.s-agent .bot-bubble text,
  .map-bot.s-cancelled .bot-body,
  .map-bot.s-working .bot-arms,
  .bot-eyes {
    animation: none;
  }
}
.glance-meter-fill.w-0 {
  width: 0%;
}
.glance-meter-fill.w-5 {
  width: 5%;
}
.glance-meter-fill.w-10 {
  width: 10%;
}
.glance-meter-fill.w-15 {
  width: 15%;
}
.glance-meter-fill.w-20 {
  width: 20%;
}
.glance-meter-fill.w-25 {
  width: 25%;
}
.glance-meter-fill.w-30 {
  width: 30%;
}
.glance-meter-fill.w-35 {
  width: 35%;
}
.glance-meter-fill.w-40 {
  width: 40%;
}
.glance-meter-fill.w-45 {
  width: 45%;
}
.glance-meter-fill.w-50 {
  width: 50%;
}
.glance-meter-fill.w-55 {
  width: 55%;
}
.glance-meter-fill.w-60 {
  width: 60%;
}
.glance-meter-fill.w-65 {
  width: 65%;
}
.glance-meter-fill.w-70 {
  width: 70%;
}
.glance-meter-fill.w-75 {
  width: 75%;
}
.glance-meter-fill.w-80 {
  width: 80%;
}
.glance-meter-fill.w-85 {
  width: 85%;
}
.glance-meter-fill.w-90 {
  width: 90%;
}
.glance-meter-fill.w-95 {
  width: 95%;
}
.glance-meter-fill.w-100 {
  width: 100%;
}

/* The run order on the Agentic Map (docs/77, run-order.js): a handle to drag a task up or down, where it lands, and
   the question a move that pauses a running task asks. */
table.run-order td.order-cell {
  width: 3rem;
  padding-inline: var(--space-1);
  vertical-align: middle;
}
.order-handle {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: grab;
  touch-action: none;
}
.order-handle:hover,
.order-handle:focus-visible {
  border-color: var(--bronze);
  color: var(--bronze-ink);
}
table.run-order tr.dragging {
  opacity: 0.45;
}
table.run-order tr.order-drop td {
  height: 3px;
  padding: 0;
  background: var(--bronze);
}
.order-top {
  display: inline;
}
dialog.order-confirm {
  width: min(32rem, calc(100vw - 2rem));
  padding: var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}
dialog.order-confirm::backdrop {
  background: rgb(0 0 0 / 0.35);
}
[data-order-status].err {
  color: var(--crit);
}

/* Breaks into as a tree (2026-10-27): each part joined to the one that handed it out, the line in that one's colour,
   each part in its own; a word on where it stands beside it. */
.glance-tree {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.glance-node > .glance-tree {
  --line-st: var(--st, var(--line-strong));
  margin: 6px 0 0 11px;
  padding-left: 14px;
  border-left: 2px solid color-mix(in srgb, var(--line-st) 55%, transparent);
}
.glance-node {
  position: relative;
  min-width: 0;
}
.glance-node > .glance-tree > .glance-node::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 1rem;
  width: 12px;
  border-top: 2px solid color-mix(in srgb, var(--line-st) 55%, transparent);
}
.glance-node > .glance-chip {
  vertical-align: middle;
}
.glance-node-note {
  display: inline-block;
  margin-left: 8px;
  color: var(--muted);
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.glance-node.s-working > .glance-chip .state-dot {
  animation: glance-at-work 1.6s ease-in-out infinite;
}
@keyframes glance-at-work {
  50% {
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--st) 12%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .glance-node.s-working > .glance-chip .state-dot {
    animation: none;
  }
}
.glance-step-in > summary {
  cursor: pointer;
  color: var(--bronze-ink);
  font-weight: 600;
  min-height: var(--tap, 2.75rem);
  display: inline-flex;
  align-items: center;
}
.glance-step-in[open] {
  display: grid;
  gap: var(--space-2);
}

/* Briefs (docs/78 §1): the brief a task was handed and the outcome brief it handed back, compact: a line, then short
   sections side by side on wide screens, one under the other on phones. */
.outcome-brief,
.task-brief {
  display: grid;
  gap: var(--space-2);
}
.outcome-line,
.brief-goal {
  margin: 0;
  font-weight: 600;
}
.outcome-line .pill {
  margin-right: 6px;
}
.brief-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--space-2) var(--space-4);
  margin: 0;
}
.brief-section {
  min-width: 0;
}
.brief-section dt {
  color: var(--muted);
  font-size: var(--font-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.brief-section dd {
  margin: 2px 0 0;
}
.brief-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: var(--font-sm);
}
.brief-list li {
  overflow-wrap: anywhere;
}
.brief-list li + li {
  margin-top: 2px;
}

/* Results people read (docs/79): one Result at the top of a task's page: the outcome, what a person gets with a button
   to open each, short lists, and the rest folded. */
.task-result {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.task-result h2 {
  margin: 0;
}
.task-result h3,
.task-asked h3 {
  margin: 0 0 4px;
  font-size: var(--font-sm);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.result-outcome {
  margin: 0;
  font-weight: 600;
}
.result-outcome .pill {
  margin-right: 6px;
}
.result-gets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: var(--space-2);
}
.result-get {
  display: grid;
  gap: 4px;
  align-content: start;
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface2);
}
.result-get p {
  margin: 0;
  overflow-wrap: anywhere;
}
.result-get-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.result-open a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 14px;
  border-radius: var(--radius-sm);
  /* The primary button's colours: white on the plain bronze was 3.8:1 (2.7:1 dark). */
  background: var(--accent-fill);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.result-open a:hover,
.result-open a:focus-visible {
  filter: brightness(0.92);
}
.result-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-3) var(--space-4);
}
.result-part {
  min-width: 0;
}
.result-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: var(--font-sm);
}
.result-list li {
  overflow-wrap: anywhere;
}
.result-list li + li {
  margin-top: 3px;
}
.result-fold > summary {
  cursor: pointer;
  font-size: var(--font-sm);
  font-weight: 600;
  min-height: var(--tap);
  display: flex;
  align-items: center;
}
.task-asked .brief-goal {
  margin: 0 0 var(--space-2);
  font-weight: 600;
}
