/*
 * The "Ledger" look of Your Agentors (designed with Abdulrahman on the canvas, 2026-11-22): a bottle-green
 * desk with paper sheets on it, ink on the paper, gold for "you", IBM Plex for words and numbers.
 * The header is always the dark green. The page's own content sits on paper (the surfaces below);
 * only notes and buttons beside the cards sit on the desk. Dark keeps the desk and turns the paper green.
 * Colours come only from these variables; the switch in the header saves a choice (data-theme on <html>).
 */
:root {
  color-scheme: light;
  /* The desk: what shows between the sheets. */
  --bg: #1f3b36;
  --dots: #23433d;
  --header-bg: #1a332f;
  --panel: #2a4a44;
  --raised: #2a4a44;
  --sunk: #1a332f;
  --field: #1a332f;
  --line: #335a52;
  --line-2: #2d5049;
  --line-3: #7da49b;
  --text: #eef5f2;
  --text-2: #d3e2dd;
  --muted: #a9c2bb;
  --faint: #9ab5ad;
  --sep: #5b8078;
  --active: #2a4a44;
  --chip: #2a4a44;
  --track: #335a52;
  --accent: #f6d77a;
  --on-accent: #1f3b36;
  --strong: #f6d77a;
  --accent-text: #f6d77a;
  --soft: rgba(246, 215, 122, 0.12);
  --soft-line: rgba(246, 215, 122, 0.45);
  --ring: none;
  --shadow: none;
  --sheet-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --bad: #ffa396;
  --bad-bg: rgba(255, 163, 150, 0.14);
  --bad-line: rgba(255, 163, 150, 0.4);
  --warn: #f6d77a;
  --warn-bg: rgba(246, 215, 122, 0.14);
  --good: #8ae6b0;
  --good-bg: rgba(138, 230, 176, 0.14);
  --info: #9fd3e0;
  --info-bg: rgba(159, 211, 224, 0.14);
  --add-bg: rgba(138, 230, 176, 0.1);
  --del-bg: rgba(255, 163, 150, 0.1);
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}
/* The paper: every card, list and form, and the page's main column. Ink on paper, the action in bottle green. */
:where(.main, .side:not(.stack), .side.stack > :not(.note, .btn), .sheet) {
  --panel: #fbfaf4;
  --raised: #fbfaf4;
  --sunk: #f3f1e8;
  --field: #ffffff;
  --line: #dedbcf;
  --line-2: #e9e6db;
  --line-3: #b9b5a6;
  --text: #22262a;
  --text-2: #3d434a;
  --muted: #5c636b;
  --faint: #60666d;
  --sep: #b9b5a6;
  --active: #efece2;
  --chip: #ebe8dc;
  --track: #e2dfd3;
  --accent: #1f3b36;
  --on-accent: #fbfaf4;
  --strong: #1f3b36;
  --accent-text: #1f3b36;
  --soft: rgba(246, 215, 122, 0.24);
  --soft-line: #d9b74f;
  --ring: none;
  --shadow: 0 1px 2px rgba(34, 38, 42, 0.06);
  --bad: #b42318;
  --bad-bg: #fde8e4;
  --bad-line: #f4c7bf;
  --warn: #8a5a14;
  --warn-bg: #fbefd6;
  --good: #1d6b45;
  --good-bg: #e3f1e8;
  --info: #1b5e73;
  --info-bg: #e2eff2;
  --add-bg: #e3f1e8;
  --del-bg: #fde8e4;
  color: var(--text);
}
/* Dark, twice: once when chosen with the switch, once when the computer asks and nothing was chosen.
   The desk goes deeper and the paper becomes the panel green, so ink turns light everywhere. */
:root[data-theme="dark"],
:root[data-theme="dark"] :is(.main, .side:not(.stack), .side.stack > :not(.note, .btn), .sheet) {
  color-scheme: dark;
  --panel: #1f3b36;
  --raised: #24443e;
  --sunk: #1a332f;
  --field: #1a332f;
  --line: #335a52;
  --line-2: #2b4c45;
  --line-3: #5b8078;
  --text: #eef5f2;
  --text-2: #d3e2dd;
  --muted: #a9c2bb;
  --faint: #94b0a8;
  --sep: #5b8078;
  --active: #2a4a44;
  --chip: #2a4a44;
  --track: #335a52;
  --accent: #f6d77a;
  --on-accent: #1f3b36;
  --strong: #f6d77a;
  --accent-text: #f6d77a;
  --soft: rgba(246, 215, 122, 0.1);
  --soft-line: rgba(246, 215, 122, 0.4);
  --shadow: none;
  --bad: #ffa396;
  --bad-bg: rgba(255, 163, 150, 0.14);
  --bad-line: rgba(255, 163, 150, 0.4);
  --warn: #f6d77a;
  --warn-bg: rgba(246, 215, 122, 0.14);
  --good: #8ae6b0;
  --good-bg: rgba(138, 230, 176, 0.14);
  --info: #9fd3e0;
  --info-bg: rgba(159, 211, 224, 0.14);
  --add-bg: rgba(138, 230, 176, 0.1);
  --del-bg: rgba(255, 163, 150, 0.1);
}
:root[data-theme="dark"] { --bg: #142a26; --dots: #18302b; --header-bg: #10221f; --sheet-shadow: 0 18px 40px rgba(0, 0, 0, 0.4); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]),
  :root:not([data-theme="light"]) :is(.main, .side:not(.stack), .side.stack > :not(.note, .btn), .sheet) {
    color-scheme: dark;
    --panel: #1f3b36;
    --raised: #24443e;
    --sunk: #1a332f;
    --field: #1a332f;
    --line: #335a52;
    --line-2: #2b4c45;
    --line-3: #5b8078;
    --text: #eef5f2;
    --text-2: #d3e2dd;
    --muted: #a9c2bb;
    --faint: #94b0a8;
    --sep: #5b8078;
    --active: #2a4a44;
    --chip: #2a4a44;
    --track: #335a52;
    --accent: #f6d77a;
    --on-accent: #1f3b36;
    --strong: #f6d77a;
    --accent-text: #f6d77a;
    --soft: rgba(246, 215, 122, 0.1);
    --soft-line: rgba(246, 215, 122, 0.4);
    --shadow: none;
    --bad: #ffa396;
    --bad-bg: rgba(255, 163, 150, 0.14);
    --bad-line: rgba(255, 163, 150, 0.4);
    --warn: #f6d77a;
    --warn-bg: rgba(246, 215, 122, 0.14);
    --good: #8ae6b0;
    --good-bg: rgba(138, 230, 176, 0.14);
    --info: #9fd3e0;
    --info-bg: rgba(159, 211, 224, 0.14);
    --add-bg: rgba(138, 230, 176, 0.1);
    --del-bg: rgba(255, 163, 150, 0.1);
  }
  :root:not([data-theme="light"]) { --bg: #142a26; --dots: #18302b; --header-bg: #10221f; --sheet-shadow: 0 18px 40px rgba(0, 0, 0, 0.4); }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background-color: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dots) 1px, transparent 1px);
  background-size: 22px 22px;
  display: flex;
  flex-direction: column;
}
a { color: var(--text); text-underline-offset: 3px; }
a:hover { color: var(--muted); }
h1, h2, h3, p { margin: 0; }
button, select, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--strong); outline-offset: 2px; }

/* ---------------------------------------------------------------- header */

/* Always the dark green, in both looks: ink turns light and the action turns gold. */
.top {
  --text: #eef5f2;
  --muted: #a9c2bb;
  --active: rgba(238, 245, 242, 0.08);
  --line-3: #7da49b;
  --raised: transparent;
  --track: #335a52;
  --strong: #f6d77a;
  --accent: #f6d77a;
  --on-accent: #1f3b36;
  min-height: 68px;
  padding: 10px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  background: var(--header-bg);
  border-bottom: 1px solid #335a52;
  color: var(--text);
}
/* The name in two words, then the bottle bot standing at the end (the chosen logo). */
.brand {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  min-height: 44px;
  padding-bottom: 8px;
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fbfaf4;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: #fbfaf4; }
.brand .bot { flex: none; width: 27px; height: 27px; margin-bottom: -2px; overflow: visible; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; }
.nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 11px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
}
.nav a:hover { color: var(--text); background: var(--active); }
/* The page you are on: light words with a gold rule under them, like a ticked line. */
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 5px; height: 3px; border-radius: 2px; background: #f6d77a; }
.spacer { flex: 1 1 auto; }
.spend { display: flex; flex-direction: column; gap: 6px; min-width: 150px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.spend-bar { display: block; height: 4px; border-radius: 4px; background: var(--track); overflow: hidden; }
.spend-bar i { display: block; width: 0; height: 100%; border-radius: 4px; background: var(--strong); }
.theme {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-3);
  border-radius: 10px;
  background: var(--raised);
  color: var(--text);
  cursor: pointer;
}
.theme:hover { background: var(--active); }
/* A circle, half filled: the usual sign for light and dark. */
.theme::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line-3);
  background: var(--raised);
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--active); color: var(--text); }
.btn.primary { border-color: transparent; background: var(--accent); color: var(--on-accent); font-weight: 600; box-shadow: var(--ring); }
.btn.primary:hover { background: var(--accent); color: var(--on-accent); filter: brightness(0.95); }
.btn.big { min-height: 48px; padding: 0 20px; }
.btn.chosen { border-color: var(--strong); box-shadow: inset 0 0 0 1px var(--strong); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.linkbtn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--text-2);
  font-weight: 500;
  font-size: 14px;
  text-decoration: underline;
  text-decoration-color: var(--line-3);
  text-underline-offset: 4px;
  cursor: pointer;
  min-height: 44px;
  /* Long file paths wrap instead of widening the page on a phone. */
  text-align: left;
  overflow-wrap: anywhere;
}
.linkbtn:hover { color: var(--text); text-decoration-color: currentColor; }

/* ---------------------------------------------------------------- layout */

.view {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px 24px 56px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  /* Wrapped rows sit together at the top instead of spreading over a tall screen. */
  align-content: flex-start;
  gap: 24px;
}
.side {
  flex: 1 1 320px;
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--sheet-shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.side.wide { flex-basis: 440px; }
/* A side column of separate cards, with a quiet note under them. */
.side.stack { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; gap: 16px; }
.side.stack > .card { padding: 26px; gap: 8px; box-shadow: var(--sheet-shadow); }
.side.stack > .steps.card { padding: 10px; gap: 2px; }
.side.stack > .card > .facts { margin-top: 10px; }
/* A note beside the cards sits on the desk itself. */
.side.stack > .note { padding: 0 6px; color: var(--muted); }
.side.stack > .note.lock { padding-left: 26px; }
.card.big { padding: 32px; gap: 22px; border-radius: 16px; }
.card .form, .card .facts, .card .notice { max-width: none; }
/* A small mono label over a section: "New review", "Problem 1 of 3". */
.caps { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
/* A drawn padlock before a line that says DevCrew only reads. */
.lock { position: relative; padding-left: 26px; }
.lock::before, .lock::after { content: ""; position: absolute; top: 0.78em; }
.lock::before { left: 8px; width: 8px; height: 7px; margin-top: -7px; border: 2px solid currentColor; border-bottom: 0; border-radius: 5px 5px 0 0; }
.lock::after { left: 6px; width: 12px; height: 8px; margin-top: -1px; border-radius: 2px; background: currentColor; }
/* The main column is a sheet of paper laid on the desk. */
.main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 18px; padding: 28px; border-radius: 16px; background: var(--panel); box-shadow: var(--sheet-shadow); }
.kicker { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.display { font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -0.025em; }
.lede { font-size: 15px; color: var(--muted); }
.title { font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.body { font-size: 16px; color: var(--text-2); max-width: 760px; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.check-label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.prose-list { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; }
.prose-list strong { color: var(--text); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rows { display: flex; flex-direction: column; }
.rows > * { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.strong { font-weight: 600; }
.grow { flex: 1 1 auto; min-width: 0; }
.state { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.state.warn::before, .state.bad::before { border-radius: 2px; }
.good { color: var(--good); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 12px; border-radius: 10px; }
.steps li.on { background: var(--active); }
.steps .n {
  flex: 0 0 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--chip);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12px;
}
.steps li.on .n { background: var(--accent); color: var(--on-accent); box-shadow: var(--ring); }
.steps .t { display: block; font-weight: 500; }
.steps .d { display: block; font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- forms */

.form { max-width: 760px; display: flex; flex-direction: column; gap: 22px; }
.main > .form {
  max-width: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.field { display: flex; flex-direction: column; gap: 8px; flex: 1 1 240px; }
.field label, .field .label { font-size: 13px; font-weight: 500; color: var(--muted); }
.field select, .field input {
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-3);
  border-radius: 10px;
  background-color: var(--field);
  color: var(--text);
  font-size: 15px;
  width: 100%;
}
/* A drawn chevron: the page's policy allows no image files or data addresses. */
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
/* A dropdown on its own, outside a field (History's project filter): the same box and drawn chevron. */
.view select:not(.field select) {
  appearance: none;
  -webkit-appearance: none;
  height: 40px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line-3);
  border-radius: 10px;
  background-color: var(--field);
  color: var(--text);
  font-size: 14px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.field textarea {
  padding: 12px 14px;
  border: 1px solid var(--line-3);
  border-radius: 10px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1.55;
  width: 100%;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field label > select, .field label > input { display: block; margin-top: 8px; font-weight: 400; color: var(--text); }
/* A box with its button beside it: the box takes the room, the button keeps its size. */
.field .row > input { flex: 1 1 140px; width: auto; min-width: 0; }
.field .row > .btn { flex: none; min-height: 46px; }
/* "Add a check": a dashed outline, an empty slot waiting to be filled. */
.btn.add { border-style: dashed; background: transparent; }
.plan-card:empty { display: none; }
/* A thin bar for "how much of the limit is used". */
.meter { display: block; height: 4px; border-radius: 4px; background: var(--track); overflow: hidden; }
.meter i { display: block; width: 0; height: 100%; border-radius: 4px; background: var(--strong); }
.divider { width: 100%; height: 1px; margin: 0; border: 0; background: var(--line-2); }
.mono { font-family: var(--mono) !important; font-size: 13px !important; }
.form.wide { max-width: 900px; }
.main > .form.wide { max-width: none; }
.field.narrow { flex: 0 1 220px; }
.checks { display: flex; flex-direction: column; gap: 14px; }
.card.check { padding: 18px; gap: 12px; background: var(--sunk); box-shadow: none; }
.card.check > .field, .card.check .pair > .field { flex: 1 1 200px; height: auto; }
.card.check > .field { flex: none; }
.card.check .field input, .card.check .field select { height: 42px; }
.quote { padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--sunk); color: var(--text-2); overflow-wrap: anywhere; }
/* In the column, a field is as tall as its content; flex-basis would make it 240px tall. */
.form > .field, .card > .field { flex: none; }
.pair { display: flex; flex-wrap: wrap; gap: 16px; }

/* Facts: small boxes in a grid, a mono label over a mono value. */
.facts {
  max-width: 760px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--sunk);
}
/* Lines drawn by each box, so a short last row leaves no grey gap. */
.facts > div { padding: 12px 14px; background: var(--sunk); min-width: 0; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.side .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* When the columns stack, a side that only supports the page goes under the main content. */
@media (max-width: 1000px) { .side.after { order: 1; } }
.facts .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.facts .v { margin-top: 2px; font-family: var(--mono); font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.notice { max-width: 760px; overflow-wrap: anywhere; padding: 14px 16px; border: 1px solid transparent; border-radius: 10px; background: var(--warn-bg); color: var(--text); font-weight: 500; }
.notice.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.notice.good-notice { background: var(--good-bg); color: var(--good); }

/* ---------------------------------------------------------------- review */

.progress { flex: 0 1 120px; display: flex; gap: 4px; }
.progress span { flex: 1 1 0; height: 4px; border-radius: 4px; background: var(--track); }
.progress span.on { background: var(--strong); }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.tag.blue { background: var(--info-bg); color: var(--info); }
.tag.ok { background: var(--good-bg); color: var(--good); }
/* The gold tint is laid over paper, so it reads the same on a sheet and beside one on the desk. */
.fix { max-width: 760px; padding: 18px 20px; border-radius: 12px; border: 1px solid var(--soft-line); background: linear-gradient(var(--soft), var(--soft)), var(--panel); }
.fix .k { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.fix .v { margin-top: 6px; font-size: 15px; color: var(--text); overflow-wrap: anywhere; }
.code {
  max-width: 100%;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--sunk);
  color: var(--text-2);
  font: 13px/1.7 var(--mono);
  overflow-x: auto;
  white-space: pre;
}
code.inline {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--chip);
  color: var(--text);
  font: 0.88em/1.4 var(--mono);
  overflow-wrap: anywhere;
}
.fix code.inline { background: var(--panel); border: 1px solid var(--line); }
.also { max-width: 760px; padding-top: 12px; border-top: 1px solid var(--line-2); }

.card {
  padding: 24px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.card h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.bar { height: 4px; border-radius: 4px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 4px; width: 35%; border-radius: 4px; background: var(--strong); animation: slide 1.4s ease-in-out infinite alternate; }
@keyframes slide { from { margin-left: 0; } to { margin-left: 65%; } }
/* A bar that knows how far it is: filled to its share, moving smoothly between polls. */
.bar.known i { animation: none; width: 0; margin-left: 0; background: var(--strong); transition: width 1.2s linear; }
.progress-block { display: flex; flex-direction: column; gap: 8px; }
.progress-line { margin: 0; }
.box-progress { display: inline-flex; flex-direction: column; gap: 4px; min-width: 200px; vertical-align: middle; }
.boxes-progress { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; max-width: 420px; }
.boxes-progress p { margin: 0; }
@media (prefers-reduced-motion: reduce) { .bar i { animation: none; width: 100%; opacity: 0.5; } }

/* ---------------------------------------------------------------- settings and lists */

.settings { display: flex; flex-direction: column; gap: 14px; max-width: 860px; }
.main > .settings, .main > .keys, .main > .keys .settings { max-width: none; }
.spent { display: flex; flex-direction: column; gap: 6px; }
/* Which DevCrew pays with: a blue note, information rather than a warning. */
.notice.info { max-width: none; background: var(--info-bg); color: var(--text); font-weight: 400; font-size: 14px; }
/* A key's state: a green dot when set, a grey one when not. */
.set-dot { display: inline-flex; align-items: center; gap: 8px; }
.set-dot::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--line-3); }
.set-dot.on::before { background: var(--good); }
.setting { padding: 18px 22px; gap: 12px; }
/* The value stays beside its description, however long the text. */
.setting > .row:first-child { flex-wrap: nowrap; align-items: flex-start; }
@media (max-width: 720px) { .setting > .row:first-child { flex-wrap: wrap; } }
.setting-label { font-size: 16px; font-weight: 600; }
.setting-input { position: relative; flex: 0 0 180px; }
.setting-input input {
  width: 100%;
  height: 44px;
  padding: 0 12px 0 28px;
  border: 1px solid var(--line-3);
  border-radius: 10px;
  background: var(--field);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
}
.setting-input input:disabled { border-color: var(--line-2); background: var(--sunk); color: var(--muted); }
.setting-input .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-family: var(--mono); color: var(--muted); }
.list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.list a, .list button.item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  min-height: 72px;
  padding: 14px 20px;
  border: 0;
  border-top: 1px solid var(--line-2);
  background: none;
  color: var(--text);
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.list > :first-child { border-top: 0; }
.list a:hover, .list button.item:hover { background: var(--active); color: var(--text); }
.list .grow { flex: 1 1 220px; min-width: 0; }
.list .t { display: block; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.list .d { display: block; font-size: 13px; color: var(--muted); }
/* In History each row is named by its branch, so the name is in mono. */
.list.history .t { font-family: var(--mono); font-size: 14px; }
.list .cost { flex: 0 0 70px; text-align: right; font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.list .state, .rows .state { flex: 0 0 auto; white-space: nowrap; }
/* In a list the result is a pill on its own tint, like the design's status chips. */
.list .state, .section .state { height: 26px; padding: 0 10px; border-radius: 999px; background: var(--chip); font-size: 12px; font-weight: 600; }
.list .state.good, .section .state.good { background: var(--good-bg); }
.list .state.warn, .section .state.warn { background: var(--warn-bg); }
.list .state.bad, .section .state.bad { background: var(--bad-bg); }
.rows .state { font-family: var(--mono); font-size: 12px; }
/* A row's action ("Use this issue", "Change") keeps its words on one line beside the row's text. */
.rows > * > .linkbtn { flex: none; white-space: nowrap; }
/* A list inside a card: a sunken box, each row ending in a small arrow. */
.card .list { background: var(--sunk); box-shadow: none; border-radius: 12px; }
.card .list a::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
}
/* A quiet heading at the top of a card: "The three reviewers". */
.card > .card-title { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
/* Inside a card the rows need no line above the first or space under the last. */
.card > .rows > :first-child { border-top: 0; padding-top: 0; }
.card > .rows > :last-child { padding-bottom: 0; }

/* ---------------------------------------------------------------- projects and proposals */

.tests { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
/* One suite's tests on a proposal page, when a project has several (v5). */
.suite { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.suite > .card-title { margin: 0; font-size: 13px; font-weight: 500; color: var(--muted); overflow-wrap: anywhere; }
/* The suites found on the last scan: one mono line each, then what was left out. */
.found-box { display: flex; flex-direction: column; gap: 8px; }
.found { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.found li { font-family: var(--mono); font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.found li.note { font-family: inherit; font-size: 13px; color: var(--muted); }
/* A project card: the name and its state stacked, the buttons on the right. */
.card.project { padding: 24px 26px; gap: 18px; }
.card.project .grow { display: flex; flex-direction: column; gap: 4px; }
.card.project h2 { font-size: 22px; line-height: 1.2; }
.section { display: flex; flex-direction: column; gap: 12px; max-width: 900px; min-width: 0; overflow-wrap: anywhere; }
.main > .section {
  max-width: none;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.subtitle { font-size: 16px; font-weight: 600; }
/* The pull request box in a side column: a card, lime-tinted while it offers to open one. */
.side.stack > .pr-box {
  max-width: none;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.side.stack > .pr-box:has(.btn.primary) { border-color: var(--soft-line); background: var(--soft); box-shadow: none; }
.pr-box .rows > :first-child { border-top: 0; padding-top: 0; }
/* A heading that starts with a coloured dot for its status ("Ready to look at."). */
.state-dot { display: flex; align-items: center; gap: 12px; }
.state-dot::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.state-dot.good::before { background: var(--good); }
.state-dot.warn::before { background: var(--warn); border-radius: 2px; }
.state-dot.bad::before { background: var(--bad); border-radius: 2px; }
.state-dot.good, .state-dot.warn, .state-dot.bad { color: var(--text); }
.section > .rows > :first-child { border-top: 0; padding-top: 0; }
.section .finding { padding: 16px 18px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--sunk); }
.section > .subtitle { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.rows .grow, .rows .break { overflow-wrap: anywhere; min-width: 0; text-align: right; }
.rows .grow { text-align: left; }
.finding { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.finding-title { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
code.inline.cmd { display: block; padding: 10px 12px; border: 1px solid var(--line-2); background: var(--sunk); font-size: 13px; overflow-wrap: anywhere; user-select: all; }
.diff { padding: 10px 0; }
.diff .ln { display: block; padding: 0 16px; min-height: 1.7em; }
.diff .add { background: var(--add-bg); color: var(--text); }
.diff .del { background: var(--del-bg); color: var(--text); }
.diff .hunk { color: var(--info); }
.diff .meta { color: var(--muted); font-weight: 600; }

@media (max-width: 720px) {
  .top { padding: 8px 16px; gap: 6px 12px; }
  /* Every tab stays in sight on a phone: the menu takes its own row and wraps, instead of scrolling sideways unseen. */
  .nav { flex: 1 1 100%; flex-wrap: wrap; order: 5; }
  .nav a { flex: 0 0 auto; padding: 0 10px; min-height: 40px; }
  .spend { min-width: 0; flex: 1 1 140px; }
  .view { padding: 20px 16px 40px; gap: 16px; }
  .display { font-size: 26px; }
  .title { font-size: 24px; }
  .main { padding: 18px; }
  .main > .form, .main > .section { padding: 20px; }
  .side { padding: 20px; }
}
.fix .v.notes { font-size: 14px; }

/* Plans: one card per spec, and per result (v3 3.3). */
.row.between { justify-content: space-between; flex-wrap: nowrap; }
.row.between > strong { min-width: 0; overflow-wrap: anywhere; }
.card.spec-card { padding: 20px 22px; gap: 10px; }
.card.spec-card strong { font-size: 16px; font-weight: 600; }
/* A spec that has to wait: a dashed outline, not yet a full card. */
.card.waits { border-style: dashed; border-color: var(--line-3); background: transparent; box-shadow: none; }
.main > .field .quote { background: var(--panel); border-color: var(--line); }
.card.spec-card .mono { overflow-wrap: anywhere; }

/* Keys and tokens on the Settings page: a wider box for pasting, plain text weight, and room above the section. */
.keys { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; max-width: 860px; }
.keys .settings { margin-top: 8px; }
.setting-input.key { flex: 0 0 300px; }
.setting-input.key input { padding: 0 12px; font-size: 13px; font-weight: 400; }
@media (max-width: 720px) { .setting-input.key { flex: 1 1 100%; } }

/* What a running job is doing, as it goes (job page): stages and tool calls, newest last. */
/* Chapters (one per stage, per spec), each with its looks and edits on a rail; what changed files stands out. */
.activity-card { gap: 12px; }
.activity { list-style: none; margin: 0; padding: 0 4px 0 0; max-height: 520px; overflow-y: auto; font-size: 13px; line-height: 1.45; }
.activity ol { list-style: none; margin: 0; padding: 0; }
.activity .at { flex: none; width: 40px; font-family: var(--mono); font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }

.activity-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.activity-filter:empty { display: none; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--text-2);
  font: 500 13px var(--sans); cursor: pointer;
}
.chip-btn:hover { border-color: var(--line-3); }
.chip-btn[aria-pressed="true"] { background: var(--strong); border-color: var(--strong); color: var(--panel); }
.chip-state { font-size: 12px; font-weight: 400; color: var(--faint); }
.chip-btn[aria-pressed="true"] .chip-state { color: inherit; opacity: 0.7; }
.chip-state.done { color: var(--good); }
.chip-state.stopped { color: var(--bad); }

.chapter { border-top: 1px solid var(--line-2); }
.chapter:first-child { border-top: 0; }
.chapter-head { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; min-width: 0; }
summary.chapter-head { cursor: pointer; list-style: none; border-radius: 6px; }
summary.chapter-head::-webkit-details-marker { display: none; }
summary.chapter-head:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.chapter-head .mark { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line-3); transform: translateY(-1px); }
.chapter-title { min-width: 0; flex: 1; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.chapter-counts { flex: none; margin-left: auto; color: var(--faint); font-size: 12px; }
details:not([open]) > .chapter-head .chapter-title { font-weight: 500; color: var(--text-2); }
/* What a step came to: under its title, in from the mark and the time. */
.chapter-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.chapter-main .chapter-title { flex: none; }
.chapter-notes { display: flex; flex-direction: column; gap: 2px; color: var(--text-2); font-weight: 400; }
.chapter-notes .note { overflow-wrap: anywhere; }
.chapter.milestone .chapter-title { white-space: pre-line; }
.agent-chip { flex: none; padding: 1px 7px; border-radius: 6px; background: var(--chip); color: var(--text-2); font: 500 12px var(--mono); }

/* The step it is on now: the one place the accent is used. */
.chapter.now > .chapter-head .mark,
.chapter.now > details > .chapter-head .mark { background: var(--accent); box-shadow: 0 0 0 3px var(--soft), 0 0 0 4px var(--soft-line); }
.chapter.milestone .chapter-title { font-weight: 500; color: var(--text-2); }
.chapter.milestone.good .mark { background: var(--good); }
.chapter.milestone.good .chapter-title { color: var(--good); }
.chapter.milestone.bad .mark { background: var(--bad); border-radius: 2px; }
.chapter.milestone.bad .chapter-title { color: var(--bad); }

/* The looks and edits: a rail from the chapter's mark, the action first, then the file. */
.activity .trail { margin: -2px 0 10px 3px; padding-left: 15px; border-left: 1px solid var(--line); }
.trail-step { display: grid; grid-template-columns: 40px 64px minmax(0, 1fr); gap: 2px 10px; padding: 3px 8px 3px 0; position: relative; }
.trail-step .verb { color: var(--faint); }
.trail-step .what { min-width: 0; overflow-wrap: anywhere; color: var(--muted); }
.trail-step .dir { color: var(--faint); font-size: 12px; }
.trail-step .file { color: var(--text-2); }
.trail-step .pattern { color: var(--text-2); font-family: var(--mono); font-size: 12px; }
.trail-step .detail { margin-left: 8px; color: var(--faint); font-size: 12px; white-space: nowrap; }
/* What it changed, said loudest: a bar on the rail and a tint. Outside the spec in amber, refused in red. */
.trail-step.edit, .trail-step.outside, .trail-step.refused { margin: 2px 0; border-radius: 0 6px 6px 0; }
.trail-step.edit { background: var(--good-bg); }
.trail-step.edit::before, .trail-step.outside::before, .trail-step.refused::before { content: ""; position: absolute; left: -17px; top: 0; bottom: 0; width: 3px; border-radius: 2px; background: var(--good); }
.trail-step.edit .verb, .trail-step.edit .file { color: var(--good); font-weight: 600; }
.trail-step.outside { background: var(--warn-bg); }
.trail-step.outside::before { background: var(--warn); }
.trail-step.outside .verb, .trail-step.outside .file, .trail-step.outside .detail { color: var(--warn); }
.trail-step.outside .verb, .trail-step.outside .file { font-weight: 600; }
.trail-step.refused { background: var(--bad-bg); }
.trail-step.refused::before { background: var(--bad); }
.trail-step.refused .verb, .trail-step.refused .detail { color: var(--bad); }
.trail-step.refused .detail { white-space: normal; }
@media (max-width: 560px) {
  .trail-step { grid-template-columns: 40px minmax(0, 1fr); }
  .trail-step .verb { grid-column: 2; }
  .trail-step .what { grid-column: 2; }
  .chapter-counts { display: none; }
}

/* Where a job is in the whole journey: a vertical timeline beside the progress bar. */
.timeline { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; }
.tl { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 0 0 14px; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ""; position: absolute; left: 8px; top: 16px; bottom: -2px; width: 2px; background: var(--line-2); }
.tl:last-child::before { display: none; }
.tl.done::before { background: var(--strong); }
.tl-dot { width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; border: 2px solid var(--line-3); background: var(--surface, transparent); box-sizing: border-box; }
.tl.done .tl-dot { background: var(--strong); border-color: var(--strong); }
.tl.running .tl-dot { border-color: var(--strong); box-shadow: 0 0 0 4px var(--track); }
.tl.next .tl-dot { border-color: var(--strong); }
.tl-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tl-label { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.tl.done .tl-label { color: var(--text-2); }
.tl.running .tl-label, .tl.next .tl-label { color: var(--text); font-weight: 600; }
.tl-time { font-family: var(--mono); font-size: 12px; color: var(--muted); }
/* Questions only the person can answer, before a spec runs. */
.decisions { gap: 14px; }
.decision { border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.decision legend { padding: 0 6px; margin-left: -6px; }
.decision .options { display: flex; flex-direction: column; gap: 6px; }
.decision .option { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 32px; }
.decision .option input[type="radio"] { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--strong); }
.decision .option.own .own-answer { flex: 1 1 auto; min-width: 0; }
.decide-note { margin: 0; }
/* A plan run's agents: one row per spec, each its own agent (decision D11). */
.agents { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.agent { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.agent p { margin: 0; }
.agent-last { overflow-wrap: anywhere; }

/* The test step as it runs, and what fails (asked for by Abdulrahman, 2026-11-22). Names and errors are the project's text. */
.live-tests { display: flex; flex-direction: column; gap: 10px; }
.live-suite { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.live-suite:first-child { border-top: 0; padding-top: 0; }
.live-suite .break { overflow-wrap: anywhere; min-width: 0; }
.live-run { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; background: var(--sunk); border-radius: 8px; }
.live-run p { margin: 0; }
.live-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fail-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.fail > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.fail-name { overflow-wrap: anywhere; min-width: 0; font-family: var(--mono); font-size: 12px; }
.fail > summary .tag { flex: none; }
.fail-msg { margin: 6px 0 0; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 12em; overflow: auto; }

/* ---------------------------------------------------------------- icons and the bot (web/icons.js) */
/* Fewer words, shown instead (asked for by Abdulrahman, 2026-11-22). How things move: every icon stamps in once when
   its page is drawn; only what is happening now keeps moving (the bot at work); the rest plays one beat when pointed at. */
.icon, .bot-figure { flex: none; display: block; }
.icon.stamp-in { animation: stamp-in 0.45s cubic-bezier(0.3, 0, 0.2, 1) both; }
@keyframes stamp-in {
  0% { transform: scale(1.28); opacity: 0; }
  40% { opacity: 1; }
  60% { transform: scale(0.94); }
  100% { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .icon.stamp-in { animation: none; } }
.nav a { gap: 8px; }
.with-icon { display: inline-flex; align-items: center; gap: 8px; }
.state.with-icon::before { display: none; }

/* House rules as stamps beside the cards, on the desk: the icon and a few words; the sentence on hover. */
.rules { list-style: none; margin: 0; display: flex; flex-wrap: wrap; gap: 12px 20px; }
.side.stack > .rules.note { padding: 2px 6px; }
.rules li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: help; }

/* The crew in order, ending with you: stamps on a dashed line, a word under each. */
.crew-flow { list-style: none; margin: 6px 0 0; padding: 0; display: flex; align-items: flex-start; gap: 6px; }
.crew-flow li { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; line-height: 1.2; }
.crew-flow li + li::before { content: ""; position: absolute; top: 22px; left: calc(-50% + 21px); width: calc(100% - 48px); border-top: 2px dashed var(--line-3); }
.crew-flow li:last-child { color: var(--text); }

/* The bot on a job's page and beside a proposal's result. */
.job-hero { align-items: flex-start; }
.job-bot { margin: -4px 0 2px -6px; }
.hero-row { display: flex; align-items: center; gap: 12px; }
.hero-row .bot-figure { margin: -6px 0 -6px -8px; }

/* ---------------------------------------------------------------- Ledger pages (the canvas designs, 2026-11-22) */
/* A page laid straight on the desk: a big title, then sheets of paper with square corners, like receipts. */
.page { flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; }
.page-title { font-size: 44px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
.page > .rules.note { padding: 0; }
.desk-form { display: flex; gap: 8px; flex: 0 1 520px; min-width: 0; }
.desk-form input {
  flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 14px;
  border: 1px solid var(--line-3); border-radius: 8px; background: var(--field); color: var(--text); font: 400 14px var(--mono);
}
.desk-form input::placeholder { color: var(--faint); }
.sheet { min-width: 0; padding: 24px 28px; border-radius: 3px; background: var(--panel); box-shadow: var(--sheet-shadow); display: flex; flex-direction: column; gap: 16px; }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 540px), 1fr)); gap: 24px; align-items: start; }
hr.tear { width: 100%; margin: 0; border: 0; border-top: 2px dashed var(--line-3); }
/* A rubber stamp: a word in a box, inked and tilted. */
.ledger-stamp { flex: none; display: inline-flex; padding: 5px 12px; border: 2px solid currentColor; border-radius: 4px; font: 700 13px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; transform: rotate(-4deg); cursor: help; }
.btn.dashed { border-style: dashed; border-width: 2px; }
.btn .icon { margin-left: -2px; }

/* Projects: the name in mono, the stamp, a dot per review, the suites as parcels. */
.project-sheet { gap: 18px; }
.project-name { font: 700 26px var(--mono); overflow-wrap: anywhere; }
.project-stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.project-stats > div { display: flex; flex-direction: column; gap: 8px; }
.stat { display: flex; align-items: baseline; gap: 8px; }
.stat strong { font: 700 28px var(--mono); }
.stat span { font-size: 13px; color: var(--muted); }
.dots { display: flex; flex-wrap: wrap; gap: 4px; max-width: 240px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--strong); }
.project-sheet .tests { padding-top: 0; border-top: 0; }
.parcels { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.parcel { width: 104px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; cursor: help; }
.parcel-box { height: 78px; display: flex; align-items: flex-end; }
.parcel strong { font-size: 13px; font-weight: 600; }
.parcel-where { max-width: 100%; font: 400 11px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.parcel-state { font: 500 12px var(--mono); }
.parcel-state.muted { color: var(--muted); }

/* Charts: bars of ink on paper, each grown in once. */
.chart-bars { display: flex; flex-direction: column; gap: 12px; font-family: var(--mono); }
.chart-row { display: grid; grid-template-columns: minmax(70px, 150px) minmax(0, 1fr) 72px; align-items: center; gap: 12px; }
.chart-label { font-size: 14px; overflow-wrap: anywhere; }
.chart-track { display: block; height: 26px; }
.chart-track i { display: block; height: 100%; background: var(--strong); transform-origin: left; animation: grow-x 0.6s cubic-bezier(0.3, 0, 0.2, 1) both; }
.chart-track i.tone-amber { background: var(--warn); }
.chart-track i.tone-grey { background: var(--line-3); }
.chart-value { text-align: right; font-size: 14px; font-weight: 500; }
.chart-foot { align-self: flex-end; font: 12px var(--mono); color: var(--muted); }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .chart-track i { animation: none; } }
@media (max-width: 720px) {
  .page-title { font-size: 34px; }
  .sheet { padding: 20px; }
  .chart-row { grid-template-columns: 70px minmax(0, 1fr) 56px; gap: 8px; }
}
.found-box:empty { display: none; }

/* Implement: what runs now, a column chart of costs, and one ledger row per proposal. */
.running-strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 22px; border-radius: 14px; background: var(--panel); color: var(--text); text-decoration: none; }
.running-strip:hover { color: var(--text); background: var(--active); }
.running-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.running-text .small { color: var(--muted); }
.running-cost { font: 700 18px var(--mono); color: var(--strong); }
.pulse-dot { width: 14px; height: 14px; border-radius: 50%; background: #f6d77a; box-shadow: 0 0 0 5px rgba(246, 215, 122, 0.22); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(246, 215, 122, 0.08); } }
@media (prefers-reduced-motion: reduce) { .pulse-dot { animation: none; } }
.chart-head { align-items: baseline; flex-wrap: wrap; }
.chart-total { font: 700 26px var(--mono); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font: 12px var(--mono); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; }
.chart-columns { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 8px; border-bottom: 2px solid var(--strong); }
.chart-col { flex: 1 1 0; min-width: 4px; height: 100%; display: flex; align-items: flex-end; }
.chart-col i { display: block; width: 100%; transform-origin: bottom; animation: grow-y 0.6s cubic-bezier(0.3, 0, 0.2, 1) both; }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .chart-col i { animation: none; } }
.chart-axis { font: 12px var(--mono); color: var(--muted); }
/* The outcome colours: ready in ink, a pull request in gold, not ready hatched grey, stopped in red. */
.tone-ready { background: var(--good); }
.tone-pr { background: #e9b949; box-shadow: inset 0 0 0 1px var(--strong); }
.tone-not-ready { background: repeating-linear-gradient(135deg, #80868d 0 2px, var(--chip) 2px 4px); box-shadow: inset 0 0 0 1px var(--strong); }
.tone-failed { background: var(--bad); }
.ledger-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ledger-row {
  --edge: var(--line-3);
  display: grid; grid-template-columns: minmax(0, 1fr) 110px 150px 140px 130px; gap: 18px; align-items: center;
  padding: 14px 20px; border-left: 6px solid var(--edge); border-radius: 3px; background: var(--panel); color: var(--text); text-decoration: none; box-shadow: var(--shadow);
}
:where(.ledger-row) { --panel: #fbfaf4; --text: #22262a; --muted: #5c636b; --chip: #ebe8dc; --strong: #1f3b36; --good: #1d6b45; --warn: #8a5a14; --bad: #b42318; --line-3: #b9b5a6; --active: #efece2; }
:root[data-theme="dark"] :where(.ledger-row) { --panel: #1f3b36; --text: #eef5f2; --muted: #a9c2bb; --chip: #2a4a44; --strong: #f6d77a; --good: #8ae6b0; --warn: #f6d77a; --bad: #ffa396; --line-3: #5b8078; --active: #2a4a44; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :where(.ledger-row) { --panel: #1f3b36; --text: #eef5f2; --muted: #a9c2bb; --chip: #2a4a44; --strong: #f6d77a; --good: #8ae6b0; --warn: #f6d77a; --bad: #ffa396; --line-3: #5b8078; --active: #2a4a44; } }
.ledger-row:hover { color: var(--text); background: var(--active); }
.ledger-row.edge-ready { --edge: var(--good); }
.ledger-row.edge-pr { --edge: #e9b949; }
.ledger-row.edge-not-ready { --edge: #80868d; }
.ledger-row.edge-failed { --edge: var(--bad); }
.ledger-row-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ledger-row-name strong { font-size: 16px; overflow-wrap: anywhere; }
.ledger-row-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font: 12px var(--mono); color: var(--muted); }
.chip { padding: 1px 6px; background: var(--chip); color: var(--text); }
.check-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.check-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--good); }
.check-dots i.fail { background: transparent; box-shadow: inset 0 0 0 2px var(--bad); }
.file-squares { display: flex; flex-wrap: wrap; gap: 3px; max-width: 150px; }
.file-squares i { width: 9px; height: 9px; background: var(--muted); }
.row-cost { display: flex; flex-direction: column; gap: 4px; font: 700 14px var(--mono); }
.cost-bar { display: block; height: 5px; background: var(--chip); }
.cost-bar i { display: block; height: 100%; background: var(--strong); }
.ledger-row .ledger-stamp { justify-self: end; font-size: 12px; padding: 4px 10px; }
@media (max-width: 900px) {
  .ledger-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ledger-row .check-dots, .ledger-row .file-squares { display: none; }
  .ledger-row .row-cost { grid-column: 1; }
}

/* The job page's head: who worked, what it cost. */
.proposal-verdict { flex: none; display: flex; align-items: center; gap: 16px; }
.cost-box { display: flex; flex-direction: column; align-items: flex-end; font: 12px var(--mono); color: var(--muted); }
.cost-box strong { font: 700 26px var(--mono); color: var(--text); }
.squares { display: flex; flex-wrap: wrap; gap: 4px; }
.squares i, .legend i.sq-new, .legend i.sq-changed, .legend i.sq-outside, .file-list > li > i { width: 14px; height: 14px; flex: none; }
.sq-new { background: var(--good); }
.sq-changed { background: var(--strong); }
.sq-outside { background: #e9b949; box-shadow: inset 0 0 0 1px var(--strong); }
.proposal-cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.proposal-main, .proposal-next { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 1000px) { .proposal-cols { grid-template-columns: minmax(0, 1fr); } .proposal-next { order: -1; } }
.sheet.section { max-width: none; }
.sheet-k { font: 600 12px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sheet-k.with-icon { gap: 10px; }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.file-list > li { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px dashed var(--line); font: 13px var(--mono); min-width: 0; }
.file-list > li:first-child { border-top: 0; }
.file-path { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.file-path .dir { color: var(--muted); }
.diff-box > summary { list-style: none; }
.diff-box > summary::-webkit-details-marker { display: none; }
.diff-box[open] > summary { margin-bottom: 10px; }

/* Review: the stats beside the title, the form in one line, the crew as big stamps, the latest reviews. */
.head-stats { display: flex; gap: 28px; }
.head-stats .stat span { color: var(--muted); }
.review-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto minmax(0, 1.2fr) auto; gap: 14px; align-items: end; }
.review-line .field { flex: none; }
.review-arrow { padding-bottom: 10px; font: 700 20px var(--mono); color: var(--muted); }
.review-line > .btn { min-height: 46px; }
@media (max-width: 900px) { .review-line { grid-template-columns: minmax(0, 1fr); } .review-arrow { display: none; } }
.crew-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 720px) { .crew-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.crew-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--panel); }
.crew-card > span { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.crew-card strong { font-size: 16px; }
.crew-card.you { border: 2px dashed #f6d77a; background: transparent; }
.thirds { display: flex; gap: 3px; }
.thirds i { width: 18px; height: 6px; background: var(--track); }
.thirds i.on { background: #f6d77a; }
.latest { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.latest a { display: grid; grid-template-columns: 150px auto minmax(0, 1fr) 140px; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px dashed var(--line); color: var(--text); text-decoration: none; }
.latest li:first-child a { border-top: 0; }
.latest a:hover { color: var(--text); background: var(--active); }
.latest-when { font: 12px var(--mono); color: var(--muted); }
.latest-name { font: 600 14px var(--mono); overflow-wrap: anywhere; }
@media (max-width: 720px) { .latest a { grid-template-columns: minmax(0, 1fr) auto; } .latest-when, .latest .chip { display: none; } }
.latest .chip, .ledger-row-meta .chip { font: 12px var(--mono); }

/* History: the month as a stacked bar on paper, spend per day on the desk, the runs by kind, then every review. */
.history-filters { flex-wrap: wrap; }
.history-filters .check-label { color: var(--text-2); }
.history-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
@media (max-width: 900px) { .history-top { grid-template-columns: minmax(0, 1fr); } }
.month-total { font: 14px var(--mono); color: var(--muted); }
.month-total strong { font-size: 26px; color: var(--text); }
.stack-bar { display: flex; height: 34px; background: var(--chip); box-shadow: inset 0 0 0 1px var(--line-3); }
.stack-bar i { display: block; height: 100%; transform-origin: left; animation: grow-x 0.6s cubic-bezier(0.3, 0, 0.2, 1) both; }
@media (prefers-reduced-motion: reduce) { .stack-bar i { animation: none; } }
.desk-panel { min-width: 0; padding: 20px 22px; border-radius: 14px; background: var(--panel); display: flex; flex-direction: column; gap: 12px; }
.desk-panel .chart-columns { height: 140px; border-bottom-color: var(--line-3); }
.chart-col i.tone-day { background: #8fb3aa; }
.chart-col i.tone-today { background: #f6d77a; }
.kinds { display: flex; flex-wrap: wrap; gap: 12px; }
.kinds > div { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; background: var(--panel); }
.kinds strong { font: 700 22px var(--mono); }
.kinds span { color: var(--muted); font-size: 14px; }
.history-note { color: var(--text-2); }
.history-list a { grid-template-columns: 140px auto minmax(0, 1fr) 130px 120px; }
.history-list .ledger-stamp { justify-self: end; font-size: 11px; padding: 3px 8px; }
.latest-sub { display: block; font: 400 12px var(--sans); color: var(--muted); }
@media (max-width: 720px) { .history-list a { grid-template-columns: minmax(0, 1fr) auto; } .history-list .row-cost { display: none; } }

/* Settings: each limit as a ledger row with its stamp, then the house rules as stamps, then keys and tokens. */
.settings > .limit-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 180px; gap: 6px 16px; align-items: center; padding: 16px 0; border-top: 1px dashed var(--line); }
.settings > .limit-row:first-child { border-top: 0; padding-top: 4px; }
.limit-icon { grid-row: span 2; align-self: start; }
.limit-text { min-width: 0; }
.limit-state { grid-column: 2 / -1; }
.limit-row > .spent, .limit-row > .notice { grid-column: 2 / -1; max-width: none; }
@media (max-width: 720px) { .settings > .limit-row { grid-template-columns: 44px minmax(0, 1fr); } .limit-row .setting-input { grid-column: 2; flex: none; } }
.house-rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 18px; }
.house-rules li { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; cursor: help; }
.house-rules strong { font-size: 14px; }
.sheet .keys { margin-top: 0; max-width: none; }
.sheet .settings { max-width: none; }

/* The job on duty, in the header on every page while one runs: the bot at work and what it is doing. */
.on-duty { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 6px; border-radius: 22px; border: 1px solid #f6d77a; color: #fbfaf4; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.on-duty:hover { color: #fbfaf4; background: rgba(246, 215, 122, 0.12); }
.on-duty span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

/* A job's page: what it is, on the desk; its progress and its work on paper; where it is, beside them. */
.job-head { align-items: flex-start; flex-wrap: nowrap; }
.job-name { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.job-title { font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.job-name .lede { color: var(--text-2); max-width: 780px; }
.job-leave { color: var(--muted); }
.spent-of { font: 12px var(--mono); color: var(--muted); }
@media (max-width: 900px) { .job-head { flex-wrap: wrap; } }

/* The other pages, laid out the Ledger way by the router: the title on the desk, the main column as a sheet,
   the side's cards beside it. */
.ledger-head .page-title { font-size: 40px; }
.ledger-head .crew-flow { max-width: 460px; }
.ledger-cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.ledger-one { display: flex; flex-direction: column; }
@media (max-width: 1000px) { .ledger-cols { grid-template-columns: minmax(0, 1fr); } }
.page .main { flex: none; border-radius: 3px; }
.side.ledger-aside { flex: none; min-width: 0; }
.side.ledger-aside > .card { border-radius: 3px; }

/* ---------------------------------------------------------------- the header as on the canvas (2026-11-22) */
/* The line of work as a route: four stations on a dashed line, the page you are on in gold; then Settings, a dashed
   square apart. */
.top { min-height: 84px; }
.route { display: flex; align-items: center; gap: 14px; }
.stations { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-start; }
.stations li { position: relative; }
.stations li:not(:last-child)::after { content: ""; position: absolute; top: 19px; left: calc(50% + 19px); width: calc(100% - 38px); border-top: 2px dashed #5b8078; }
.route a { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 86px; padding: 4px 4px 2px; border-radius: 10px; color: #eef5f2; font-size: 13px; font-weight: 600; text-decoration: none; }
.route a:hover { color: #fbfaf4; }
.route .dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #7da49b; background: var(--header-bg); display: grid; place-items: center; color: #eef5f2; transition: border-color 0.15s ease; }
.route a:hover .dot { border-color: #f6d77a; }
.route a[aria-current="page"] { color: #f6d77a; font-weight: 700; }
.route a[aria-current="page"] .dot { background: #f6d77a; border-color: #f6d77a; box-shadow: 0 0 0 4px rgba(246, 215, 122, 0.22); color: #1f3b36; }
.route .settings-stop .dot { border-radius: 7px; border-style: dashed; }
.route-sep { width: 1px; height: 40px; background: #335a52; }
.route a::after { display: none; }

/* The crew on duty: six stamps; those at work ringed in gold. It opens the running job, or History at rest. */
.crew-duty { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 6px; border-radius: 10px; color: #a9c2bb; text-decoration: none; }
.crew-duty:hover { color: #eef5f2; background: rgba(238, 245, 242, 0.06); }
.crew-stamps { display: flex; align-items: center; }
.crew-stamps > span { display: flex; border-radius: 50%; opacity: 0.8; }
.crew-stamps > span + span { margin-left: -6px; }
.crew-duty.busy .crew-stamps > span { opacity: 0.45; }
.crew-duty.busy .crew-stamps > span.at-work { opacity: 1; box-shadow: 0 0 0 2px #f6d77a, 0 0 0 5px rgba(246, 215, 122, 0.25); position: relative; z-index: 1; }
.crew-caption { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 11px var(--mono); }
.crew-duty.busy .crew-caption { color: #f6d77a; }
/* You, in gold: how many reviews wait for your decisions. */
.to-decide { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 4px; border-radius: 24px; background: #f6d77a; color: #1f3b36; font-weight: 700; text-decoration: none; white-space: nowrap; }
.to-decide:hover { color: #1f3b36; filter: brightness(1.05); }
.top .spend { min-width: 130px; }
@media (max-width: 1240px) { .crew-caption { display: none; } .route a { min-width: 74px; } }
@media (max-width: 1100px) { .top .spend { display: none; } }
@media (max-width: 720px) {
  .route { order: 5; flex: 1 1 100%; justify-content: space-between; gap: 6px; }
  .stations { flex: 1; justify-content: space-between; }
  .route a { min-width: 0; font-size: 12px; }
  .route-sep { display: none; }
  .crew-duty { display: none; }
}
/* Fitting it all on one line at a laptop's width: smaller stamps, tighter gaps, the spend in short. */
.top { gap: 10px 14px; }
.route a { min-width: 76px; }
.crew-stamps .icon { width: 26px; height: 26px; }
.top .spend { min-width: 104px; }
@media (max-width: 1400px) { .crew-caption { display: none; } }
.to-decide strong { font-weight: 700; }
.to-decide-words { white-space: pre; }
@media (max-width: 1180px) { .to-decide-words { display: none; } .to-decide { padding-right: 12px; } }
@media (max-width: 1000px) { .crew-duty { display: none; } }
/* Narrower than a laptop: the header's New button goes; each page keeps its own (Proposals, the Review form). */
@media (max-width: 1100px) { .top #start { display: none; } }

/* ---------------------------------------------------------------- the header on a phone: a side drawer (design A) */
/* Wide screens: the drawer is no box (its parts are items of the bar, in this order); its phone-only parts are hidden. */
.drawer, .drawer-actions { display: contents; }
.drawer-head, .drawer-k, .menu-btn, .route .cap { display: none; }
.top > .brand { order: 0; }
.top .route { order: 1; }
.top > .spacer { order: 2; }
.top .crew-duty { order: 3; }
.top > .to-decide { order: 4; }
.top .spend { order: 5; }
.top .theme { order: 6; }
.top #start { order: 7; }
.scrim { position: fixed; inset: 0; z-index: 25; background: rgba(6, 14, 13, 0.55); }

@media (max-width: 720px) {
  /* The bar: the name, the gold count, the menu button. */
  .top { flex-wrap: nowrap; min-height: 60px; padding: 8px 14px; gap: 10px; }
  .top > .spacer { order: 1; }
  .top > .to-decide { order: 2; min-height: 40px; }
  .menu-btn {
    order: 3; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 44px; height: 44px; padding: 0; border: 1px solid #7da49b; border-radius: 10px; background: transparent; cursor: pointer;
  }
  .menu-btn span { width: 18px; height: 2px; border-radius: 2px; background: #eef5f2; }
  .menu-btn span:last-child { width: 12px; margin-left: -6px; background: #f6d77a; }
  /* The drawer slides in from the left, over the dimmed page. */
  .drawer {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 30; width: min(320px, 86vw); box-sizing: border-box;
    display: flex; flex-direction: column; gap: 14px; padding: 16px 20px 22px; overflow-y: auto;
    background: var(--header-bg); color: #eef5f2; box-shadow: 16px 0 40px rgba(0, 0, 0, 0.45);
    transform: translateX(-100%); visibility: hidden; transition: transform 0.25s ease, visibility 0s linear 0.25s;
  }
  body.drawer-open .drawer { transform: none; visibility: visible; transition: transform 0.25s ease; }
  .drawer-head { display: flex; align-items: center; justify-content: space-between; }
  .drawer-name { font-size: 18px; font-weight: 700; letter-spacing: -0.03em; color: #fbfaf4; }
  .drawer-close { width: 40px; height: 40px; border: 1px solid #7da49b; border-radius: 10px; background: transparent; color: #eef5f2; font: 700 20px/1 var(--mono); cursor: pointer; }
  .drawer-k { display: block; font: 600 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: #a9c2bb; }
  /* The line of work going down: a dot, the station and what the crew does there, joined by a dashed line. */
  .top .route { order: 0; flex: none; flex-direction: column; align-items: stretch; gap: 0; }
  .stations { flex: none; flex-direction: column; justify-content: flex-start; }
  .stations li:not(:last-child)::after { top: 44px; left: 21px; width: 0; height: 22px; border-top: 0; border-left: 2px dashed #5b8078; }
  .route a { flex-direction: row; justify-content: flex-start; gap: 14px; min-width: 0; min-height: 60px; padding: 4px; font-size: 15px; }
  .route .dot { flex: none; width: 36px; height: 36px; }
  .route .lbl { display: flex; flex-direction: column; text-align: left; }
  .route .cap { display: block; font: 400 11px var(--mono); color: #a9c2bb; }
  .route a[aria-current="page"] .cap { color: #f6d77a; }
  .route-sep { display: block; width: 100%; height: 1px; margin: 6px 0; }
  /* The crew, the spend, and at the bottom, at thumb height, light or dark and New. */
  .top .drawer .crew-duty { display: flex; align-items: flex-start; padding: 0; }
  .drawer .crew-caption { display: block; max-width: none; }
  .top .drawer .spend { display: flex; min-width: 0; }
  .drawer-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 10px; }
  .top .drawer #start { display: inline-flex; flex: 1; }
}
@media (max-width: 720px) and (prefers-reduced-motion: reduce) { .drawer, body.drawer-open .drawer { transition: none; } }
.to-decide { gap: 6px; }
.to-decide-words { white-space: nowrap; }
/* Inside the drawer the parts keep the order they are written in (the bar's order is for wide screens). */
@media (max-width: 720px) { .top .drawer .crew-duty, .top .drawer .spend, .top .drawer .route { order: 0; } }

/* ---------------------------------------------------------------- dropdowns (asked for by Abdulrahman, 2026-11-22) */
/* Open, a dropdown is a small sheet of the page it is on: paper on paper, the panel green on the desk; rows split by
   dashed lines, the chosen one in bold with an ink tick, group names in small mono capitals. Browsers that cannot
   style a dropdown's list (customizable select, Chrome 135 and later) keep their own list; the closed box looks the
   same either way. */
select option { background-color: var(--field); color: var(--text); }
@supports (appearance: base-select) {
  select, ::picker(select) { appearance: base-select; }
  .field select, .view select:not(.field select) { appearance: base-select; -webkit-appearance: base-select; display: flex; align-items: center; gap: 10px; background-image: none; padding-right: 14px; cursor: pointer; }
  select::picker-icon {
    content: ""; flex: none; width: 7px; height: 7px; margin-left: auto;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: translateY(-2px) rotate(45deg); transition: transform 0.15s ease;
  }
  select:open::picker-icon { transform: translateY(2px) rotate(225deg); }
  select:hover, select:open { border-color: var(--strong); }
  ::picker(select) {
    margin-top: 6px; padding: 6px; max-height: min(380px, 70vh);
    border: 1px solid var(--line-3); border-radius: 3px; background: var(--panel); color: var(--text);
    box-shadow: var(--sheet-shadow);
    opacity: 1; transition: opacity 0.12s ease, translate 0.12s ease, display 0.12s allow-discrete, overlay 0.12s allow-discrete;
  }
  @starting-style { ::picker(select):popover-open { opacity: 0; translate: 0 -4px; } }
  select option {
    display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px; border-radius: 2px;
    background: transparent; color: var(--text); font: 400 15px var(--sans); cursor: pointer;
  }
  select option + option { border-top: 1px dashed var(--line); }
  select option:hover, select option:focus-visible { background: var(--active); outline: none; }
  select option:focus-visible { box-shadow: inset 3px 0 0 var(--strong); }
  select option:checked { font-weight: 600; }
  select option::checkmark { order: 1; margin-left: auto; color: var(--strong); font-weight: 700; }
  select option:disabled { color: var(--faint); cursor: not-allowed; }
  select optgroup { display: block; padding-top: 6px; font: 600 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
  select optgroup + optgroup { margin-top: 6px; border-top: 2px dashed var(--line-3); }
  select optgroup option { letter-spacing: 0; text-transform: none; }
  @media (prefers-reduced-motion: reduce) { ::picker(select) { transition: none; } }
}
/* History's month bar: questions in pale green, plans and specs in a deeper one (beside reviews, changes and tests). */
.tone-questions { background: #8fb3aa; box-shadow: inset 0 0 0 1px var(--strong); }
.tone-plans { background: #4f8a7e; }


/* A proposal, design C (asked for by Abdulrahman, 2026-11-23, after "a lot of text"): one line of facts and one big
   sentence on the desk, one paper card with what stands in the way and what to do, the details folded into tabs.
   Gold is "you" in both themes. */
.pc-page { --gold: #f6d77a; --gold-ink: #1f3b36; gap: 26px; }
.pc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font: 13px var(--mono); color: var(--muted); }
.pc-name { font: 600 15px var(--sans); color: var(--text); }
.pc-tree a, .pc-meta > a { color: var(--gold); text-decoration: none; border-bottom: 1px dashed var(--gold); }
.pc-cost { margin-left: auto; background: #fbfaf4; color: #22262a; padding: 6px 12px; transform: rotate(2deg); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3); font: 700 16px var(--mono); display: inline-flex; gap: 8px; align-items: baseline; }
.pc-cost span { font: 500 11px var(--mono); color: #5c636b; letter-spacing: 0.06em; text-transform: uppercase; }
.pc-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.pc-say { flex: 1 1 420px; min-width: 0; margin: 0; font: 700 clamp(30px, 4.6vw, 48px)/1.06 var(--sans); letter-spacing: -0.025em; text-wrap: balance; color: var(--text); }
.pc-side { display: flex; align-items: center; gap: 18px; flex: none; }
.pc-you-stamp { display: inline-flex; padding: 8px; border-radius: 50%; background: #fbfaf4; box-shadow: 0 0 0 3px var(--gold); }
.pc-card { display: flex; flex-direction: column; gap: 20px; max-width: none; padding: 26px 28px 28px; }
.pc-item { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.pc-item + .pc-item { border-top: 1px dashed var(--line); padding-top: 18px; }
.pc-item-body { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pc-must { align-self: flex-start; font: 700 12px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 9px; border: 2.5px solid var(--bad); color: var(--bad); border-radius: 5px; transform: rotate(-3deg); }
.pc-title { margin: 2px 0 0; font: 700 24px/1.18 var(--sans); text-wrap: balance; overflow-wrap: anywhere; }
.pc-where { font: 12px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.pc-full > summary { cursor: pointer; font-weight: 600; color: var(--accent-text); min-height: 32px; display: inline-flex; align-items: center; }
.pc-full > div { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; max-width: 76ch; }
.pc-track { display: flex; align-items: center; flex: none; }
.pc-dot { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 700 13px var(--mono); flex: none; border: 0; background: transparent; color: var(--text); }
.pc-dot.kept { background: var(--gold); color: var(--gold-ink); }
.pc-dot.lost { border: 2px dashed var(--bad); color: var(--bad); }
.pc-dot.more { border: 2px solid var(--line-3); color: var(--muted); }
button.pc-dot { cursor: pointer; }
.pc-seg { width: 30px; border-top: 2px dashed var(--line-3); }
.pc-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.pc-choice { border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; text-align: left; min-height: 140px; border: 2px solid var(--accent); background: var(--sunk); color: var(--text); font: inherit; cursor: pointer; }
.pc-choice strong { font-size: 18px; }
.pc-choice span { font: 500 13px var(--mono); color: var(--muted); }
.pc-choice.b { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pc-choice.b span { color: var(--on-accent); opacity: 0.85; }
.pc-choice.c { border: 2px dashed var(--line-3); background: var(--soft); }
.pc-choice[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--panel), 0 0 0 6px var(--gold); }
@media (prefers-reduced-motion: no-preference) { .pc-choice { transition: transform 0.15s ease; } .pc-choice:hover { transform: translateY(-2px); } }
.pc-panel { border-top: 2px dashed var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.pc-panel .field { flex: none; }
.pc-panel textarea { width: 100%; }
.pc-wait { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 0; }
.pc-pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--gold); }
@media (prefers-reduced-motion: no-preference) { .pc-pulse { animation: pc-pulse 1.2s infinite; } }
@keyframes pc-pulse { 0% { box-shadow: 0 0 0 0 rgba(246, 215, 122, 0.6); } 70% { box-shadow: 0 0 0 10px rgba(246, 215, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(246, 215, 122, 0); } }
.pc-why { margin: 0; font-weight: 600; max-width: 76ch; }
.pc-you { background: var(--warn-bg); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.pc-you strong { font: 700 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--warn); }
.pc-you ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.pc-note { white-space: pre-wrap; font-size: 14px; line-height: 1.55; background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; max-height: 300px; overflow: auto; }
.pc-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pc-check li { display: flex; gap: 10px; align-items: flex-start; }
.pc-check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.pc-reasons { margin: 0; padding-left: 20px; font-weight: 600; }
.pc-lede { margin: 0; color: var(--text-2); max-width: 80ch; }
.pc-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; align-items: start; }
.pc-next .pr-box, .pr-box-wrap .pr-box { max-width: none; gap: 14px; }
.pc-apply { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pc-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; border-bottom: 2px solid var(--line-3); }
.pc-tab { flex: none; min-height: 48px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font: 600 14px var(--sans); border-radius: 10px 10px 0 0; border: 0; background: transparent; cursor: pointer; }
.pc-tab b { font: 500 13px var(--mono); color: var(--gold); }
.pc-tab[aria-selected="true"] { background: #fbfaf4; color: #22262a; }
.pc-tab[aria-selected="true"] b { color: #1f3b36; }
:root[data-theme="dark"] .pc-tab[aria-selected="true"] { background: #1f3b36; color: #eef5f2; }
:root[data-theme="dark"] .pc-tab[aria-selected="true"] b { color: var(--gold); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pc-tab[aria-selected="true"] { background: #1f3b36; color: #eef5f2; }
  :root:not([data-theme="light"]) .pc-tab[aria-selected="true"] b { color: var(--gold); }
}
.pc-details { display: flex; flex-direction: column; }
.pc-sheet { max-width: none; border-radius: 0 0 6px 6px; gap: 16px; }
.pc-rounds { display: flex; flex-direction: column; }
.pc-round { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px dashed var(--line); }
.pc-round:first-child { border-top: 0; padding-top: 0; }
.pc-round-body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pc-asked { margin: 0; padding-left: 18px; overflow-wrap: anywhere; }
.pc-goal { margin: 0; font-size: 18px; line-height: 1.55; max-width: 70ch; }
.pc-spec-files { columns: 2 320px; column-gap: 24px; margin: 0; padding: 0; list-style: none; font: 13px var(--mono); }
.pc-spec-files li { padding: 3px 0; break-inside: avoid; overflow-wrap: anywhere; }
.pc-back { align-self: flex-start; }
@media (max-width: 760px) {
  .pc-card { padding: 20px 18px 22px; }
  .pc-cost { margin-left: 0; }
  .pc-choice { min-height: 0; }
}
