/* AU Now — Record layout (variant B) in the "Hearth" look (MISSION-hearth, 18 Oct 2026).
   Original CSS. The look was measured on a public demo (computed styles only);
   nothing of its code, icons or images is used. Warm cream canvas, cream-white
   cards (radius 20, hairline, soft long shadow), a dark warm-charcoal list rail,
   Manrope 14/500 for text and Bricolage Grotesque for headings (self-hosted
   OFL variable fonts in /static/fonts), one orange accent. Nothing under 12px,
   sentence case, no uppercase labels. Light and dark follow the OS; the palette
   can pin one per browser (html[data-theme]). Contrast (WCAG AA ≥ 4.5:1) is
   measured in the browser by tests/test_record_ui.py. */

/* ───────────────────────────── fonts (self-hosted, OFL) ───────────────────────────── */
@font-face {
  font-family: "Barlow"; font-style: normal; font-weight: 900; font-display: swap;
  src: url("/static/fonts/barlow-latin-ext-900-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow"; font-style: normal; font-weight: 900; font-display: swap;
  src: url("/static/fonts/barlow-latin-900-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/static/fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/static/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/static/fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/static/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ───────────────────────────── palette ─────────────────────────────
   --ember is the brand orange as measured (decoration: ring, progress, marks);
   --accent is the same orange darkened for white text on a filled control;
   --accent-ink is the text-use shade. */
:root {
  --bg: #f3efe8;        --card: #fffdfa;      --sunk: #f7f3ed;      --well: rgba(40,30,20,.055);
  --ink: #1d1915;       --muted: #6b645c;     --faint: #6f675e;
  --line: rgba(40,30,20,.09); --rule: rgba(40,30,20,.16);
  --ember: #e4572e;     --accent: #c4461f;    --accent-ink: #b53f19; --accent-bg: #fbe6dd;
  --accent-edge: rgba(228,87,46,.38); --on-accent: #ffffff;
  --ok: #086b57;        --bad: #a8321a;       --info: #4a41c4;
  --ok-bg: #dcf2ec;     --bad-bg: #fae3dc;    --info-bg: #e8e6fb;
  --chip: rgba(40,30,20,.055); --flag: #8f600a; --flag-bg: #f8ecd2;
  --iris: #5b52d6;      --spruce: #0a8f74;    --saffron: #c98a12;   --stone: #8a8178;
  --stone-bg: rgba(40,30,20,.06);
  --shadow: 0 1px 2px rgba(40,30,20,.04), 0 18px 40px -28px rgba(60,40,20,.28);
  --shadow-s: 0 1px 2px rgba(40,30,20,.06);
  --shadow-pop: 0 24px 60px -18px rgba(40,30,20,.32), 0 2px 6px rgba(40,30,20,.08);
  --btn-glow: 0 8px 18px -10px rgba(196,70,31,.85), inset 0 1px 0 rgba(255,255,255,.2);
  --scrim: rgba(29,25,21,.42);
  --glass: rgba(243,239,232,.86);
  /* the list rail: dark warm charcoal in both themes */
  --side-bg: #1b1714;   --side-ink: #efe9e1;  --side-muted: #a1978d;
  --side-hover: rgba(255,255,255,.05); --side-active: #2e2824; --side-line: rgba(255,255,255,.08);
  --side-well: rgba(255,255,255,.06); --side-pill: rgba(255,255,255,.1);
  --sec-overdue: #a8321a; --sec-decide: #c4461f; --sec-proceeds: #4a41c4;
  --sec-do: #086b57;      --sec-waiting: #8f600a; --sec-coming: #6b645c;
  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 20px; --r-m: 14px; --r-s: 12px; --r-xs: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141210;       --card: #1e1b19;      --sunk: #26221f;      --well: rgba(255,255,255,.06);
    --ink: #f2ede6;      --muted: #a9a198;     --faint: #958d83;
    --line: rgba(255,255,255,.086); --rule: rgba(255,255,255,.16);
    --ember: #e15a33;    --accent: #c4461f;    --accent-ink: #f39a7b; --accent-bg: rgba(225,90,51,.16);
    --accent-edge: rgba(225,90,51,.45); --on-accent: #ffffff;
    --ok: #5ccfb1;       --bad: #f2786a;       --info: #aaa4f5;
    --ok-bg: rgba(31,158,130,.17); --bad-bg: rgba(242,120,106,.14); --info-bg: rgba(122,114,230,.18);
    --chip: rgba(255,255,255,.07); --flag: #e2b866; --flag-bg: rgba(190,138,42,.18);
    --iris: #7a72e6;     --spruce: #1f9e82;    --saffron: #be8a2a;   --stone: #81796f;
    --stone-bg: rgba(255,255,255,.07);
    --shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 18px 40px -28px rgba(0,0,0,.8);
    --shadow-s: inset 0 1px 0 rgba(255,255,255,.04);
    --shadow-pop: 0 24px 60px -18px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.08);
    --btn-glow: 0 8px 18px -10px rgba(196,70,31,.9), inset 0 1px 0 rgba(255,255,255,.18);
    --scrim: rgba(0,0,0,.6);
    --glass: rgba(20,18,16,.86);
    --side-bg: #0f0d0c;  --side-active: #26211d;
    --sec-overdue: #f2786a; --sec-decide: #f39a7b; --sec-proceeds: #aaa4f5;
    --sec-do: #5ccfb1;      --sec-waiting: #e2b866; --sec-coming: #a9a198;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141210;       --card: #1e1b19;      --sunk: #26221f;      --well: rgba(255,255,255,.06);
  --ink: #f2ede6;      --muted: #a9a198;     --faint: #958d83;
  --line: rgba(255,255,255,.086); --rule: rgba(255,255,255,.16);
  --ember: #e15a33;    --accent: #c4461f;    --accent-ink: #f39a7b; --accent-bg: rgba(225,90,51,.16);
  --accent-edge: rgba(225,90,51,.45); --on-accent: #ffffff;
  --ok: #5ccfb1;       --bad: #f2786a;       --info: #aaa4f5;
  --ok-bg: rgba(31,158,130,.17); --bad-bg: rgba(242,120,106,.14); --info-bg: rgba(122,114,230,.18);
  --chip: rgba(255,255,255,.07); --flag: #e2b866; --flag-bg: rgba(190,138,42,.18);
  --iris: #7a72e6;     --spruce: #1f9e82;    --saffron: #be8a2a;   --stone: #81796f;
  --stone-bg: rgba(255,255,255,.07);
  --shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 18px 40px -28px rgba(0,0,0,.8);
  --shadow-s: inset 0 1px 0 rgba(255,255,255,.04);
  --shadow-pop: 0 24px 60px -18px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.08);
  --btn-glow: 0 8px 18px -10px rgba(196,70,31,.9), inset 0 1px 0 rgba(255,255,255,.18);
  --scrim: rgba(0,0,0,.6);
  --glass: rgba(20,18,16,.86);
  --side-bg: #0f0d0c;  --side-active: #26211d;
  --sec-overdue: #f2786a; --sec-decide: #f39a7b; --sec-proceeds: #aaa4f5;
  --sec-do: #5ccfb1;      --sec-waiting: #e2b866; --sec-coming: #a9a198;
  color-scheme: dark;
}
/* the rail re-points the shared tokens, so every control inside it (search,
   kind tabs, project pills, rows, links, sign out) turns light-on-charcoal */
.navigation-content {
  --ink: var(--side-ink); --muted: var(--side-muted); --faint: var(--side-muted);
  --card: var(--side-well); --sunk: var(--side-hover); --well: var(--side-well); --chip: var(--side-pill);
  --line: var(--side-line); --rule: rgba(255,255,255,.14);
  --accent-ink: #f6a487; --accent-bg: rgba(225,90,51,.2); --accent-edge: rgba(255,255,255,.1);
  --ok: #5ccfb1; --info: #aaa4f5; --bad: #f2786a; --flag: #e2b866;
  --ok-bg: rgba(31,158,130,.2); --info-bg: rgba(122,114,230,.24); --flag-bg: rgba(190,138,42,.22);
  --bad-bg: rgba(242,120,106,.18); --stone-bg: rgba(255,255,255,.08);
  --shadow: none; --shadow-s: none;
  color: var(--side-ink);
}

/* ───────────────────────────── base ───────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 500 14px/1.5 var(--sans);
  -webkit-text-size-adjust: 100%; overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 650; letter-spacing: -.01em; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--ember) 28%, transparent); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
#screen { outline: none; }
.wrap { max-width: 760px; margin: 0 auto; padding: 14px 18px 32px; }
.label { font-size: 12.5px; font-weight: 650; color: var(--faint); }
kbd { font: 650 12px/1 var(--sans); color: var(--faint); border: 1px solid var(--line); border-radius: 7px;
      padding: 3px 6px; background: var(--well); white-space: nowrap; }

/* inline icons drawn in app.js (stroke 1.75, round caps) */
.icon { width: 18px; height: 18px; flex: none; display: block; fill: none; stroke: currentColor;
        stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
/* round tinted icon (stat cards, widgets) and the square-ish icon tile (rows) */
.ico, .ti { display: inline-grid; place-items: center; flex: none; border-radius: 50%;
            width: 40px; height: 40px; background: var(--stone-bg); color: var(--stone); }
.ti { width: 30px; height: 30px; border-radius: var(--r-xs); }
.ti .icon { width: 16px; height: 16px; }
.t-ember   { background: var(--accent-bg); color: var(--accent-ink); }
.t-iris    { background: var(--info-bg);   color: var(--info); }
.t-spruce  { background: var(--ok-bg);     color: var(--ok); }
.t-saffron { background: var(--flag-bg);   color: var(--flag); }
.t-red     { background: var(--bad-bg);    color: var(--bad); }
.t-stone   { background: var(--stone-bg);  color: var(--muted); }
/* avatar initials */
.avatar { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
          font: 700 13px/1 var(--display); letter-spacing: 0; color: #fffaf5; background: #8a5a3c;
          box-shadow: 0 0 0 2px var(--card); text-transform: none; }
.avatar.a-isidoro { background: #b8481f; }
.avatar.a-alan    { background: #4a41c4; }
.avatar.a-client  { background: #5f6b4e; }
.avatar.sm { width: 24px; height: 24px; font-size: 12px; box-shadow: none; }
.avatar.lg { width: 44px; height: 44px; font-size: 17px; }

/* top progress bar: the day's progress */
#progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: transparent; z-index: 40;
            pointer-events: none; }
#progress-fill { display: block; height: 100%; width: 0; background: var(--ember); transition: width .18s ease;
                 border-radius: 0 3px 3px 0; }

/* staging marker (commit 8ffc463) — must stay: test data must look like test data */
#stagebar { position: sticky; top: 0; z-index: 60; background: #b3261e; color: #fff;
  text-align: center; font-weight: 700; font-size: 13px; padding: 5px 10px; }

/* ───────────────────────────── buttons ───────────────────────────── */
.btn {
  border: 1px solid var(--rule); background: var(--card); border-radius: var(--r-s);
  padding: 10px 16px; cursor: pointer; font-weight: 700; font-size: 13.5px; min-height: 44px; color: var(--ink);
  transition: background .12s ease, border-color .12s ease, box-shadow .12s ease, filter .12s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { border-color: color-mix(in srgb, var(--ink) 28%, transparent); background: var(--sunk); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:disabled:hover { border-color: var(--rule); background: var(--card); }
/* .btn's display beats the UA [hidden] rule: Stop showed even when idle (bug desk, 26 Oct 2026) */
#stopbtn[hidden] { display: none; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); box-shadow: var(--btn-glow); }
.btn.primary:hover { background: var(--accent); filter: brightness(1.07); border-color: transparent; }
.btn.primary:disabled:hover { filter: none; }
.btn.wide { width: 100%; margin-top: 10px; }
.btn.small { padding: 6px 12px; min-height: 36px; font-size: 12.5px; border-radius: var(--r-xs); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn.ghost:hover { background: var(--well); }
.btn.flag[aria-pressed="true"] { background: var(--flag-bg); border-color: color-mix(in srgb, var(--flag) 45%, transparent); color: var(--flag); }
.btn .icon { width: 16px; height: 16px; }
/* the search field with its ⌘K hint */
.btn.search { color: var(--muted); font-weight: 500; justify-content: flex-start; background: var(--card);
              border-color: var(--line); box-shadow: var(--shadow-s); }
.btn.search .ic { display: inline-grid; place-items: center; }
.btn.search kbd { margin-left: auto; }
.btn.search.full { width: 100%; min-height: 42px; border-radius: var(--r-s); }
.btn.search.full .lbl { flex: 1; text-align: left; font-size: 14px; }
.linkbtn { background: none; border: 0; padding: 4px 0; min-height: 0; cursor: pointer; font: inherit;
  color: var(--accent-ink); font-weight: 700; font-size: 13.5px; }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 2px; }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.consent { flex-basis: 100%; min-width: 0; }
.consent .proposal { white-space: pre-wrap; overflow-wrap: anywhere; }
.consent .proposal.md-msg { white-space: normal; }

/* ───────────────────────────── overview: AU Today (19 Oct 2026) ─────────────────────────────
   A dark warm masthead (the rail's charcoal in both themes) with the six counts, the week
   strip, a sticky filter bar and the walk as numbered cards under coloured sections.
   Section colours are text-safe (≥ 4.5:1 on the cards, light and dark): overdue red,
   decide amber, proceeds teal, do blue, waiting violet, coming grey. */
:root {
  --s-overdue: #a8321a; --s-decide: #8a5a00; --s-proceeds: #086b57;
  --s-do: #1d5fa8;      --s-waiting: #6b3fb8; --s-coming: #6b645c; --s-on: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --s-overdue: #f2786a; --s-decide: #e2b866; --s-proceeds: #5ccfb1;
    --s-do: #84b2f0;      --s-waiting: #c0a2f2; --s-coming: #a9a198; --s-on: #141210;
  }
}
:root[data-theme="dark"] {
  --s-overdue: #f2786a; --s-decide: #e2b866; --s-proceeds: #5ccfb1;
  --s-do: #84b2f0;      --s-waiting: #c0a2f2; --s-coming: #a9a198; --s-on: #141210;
}
.s-overdue { --sc: var(--s-overdue); }  .s-decide  { --sc: var(--s-decide); }
.s-blocked { --sc: var(--s-overdue); }
.s-proceeds { --sc: var(--s-proceeds); } .s-do      { --sc: var(--s-do); }
.s-waiting { --sc: var(--s-waiting); }  .s-coming  { --sc: var(--s-coming); }
/* MISSION-alanfix §2: an operator without late labels (prefs.overdue_labels false) sees the
   overdue section as "Earlier dates" in the neutral do tone — no red, no alert */
body.no-late .s-overdue { --sc: var(--s-do); }
/* MISSION-newbiz: a lead's group on /p/new-business */
.s-lead { --sc: var(--iris); }

.tin { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.today { padding-bottom: 36px; }

/* the agency-unknown.co brand (19 Oct 2026, Isidoro): the overview masthead and
   the rail logo follow the website: ink #0D0D0D, white #F5F5F3, lime #E8FF47,
   the two-line Barlow 900 logo. Everything else stays Hearth. */
.aumark { display: inline-grid; justify-items: start; font: 900 16px/1 "Barlow", var(--display);
          letter-spacing: .12em; color: #f5f5f3; white-space: nowrap; }
.aumark .l2 { color: #e8ff47; }
.brand .aumark { font-size: 15px; }
.brand { gap: 12px; align-items: flex-end; }
.brand .bsub { padding-bottom: 1px; }
.mast .mmark { margin-right: 6px; }

/* the masthead: charcoal band, light text, the orange accent */
.mast {
  --ink: var(--side-ink); --muted: var(--side-muted); --faint: var(--side-muted);
  --card: rgba(255,255,255,.06); --sunk: rgba(255,255,255,.1); --well: rgba(255,255,255,.1);
  --line: var(--side-line); --rule: rgba(255,255,255,.16); --shadow-s: none;
  --accent-ink: #f6a487; --accent-bg: rgba(225,90,51,.2); --bad: #f2786a; --spruce: #5ccfb1;
  --ok-bg: rgba(31,158,130,.24);
  --s-overdue: #f2786a; --s-decide: #e2b866; --s-proceeds: #5ccfb1;
  --s-do: #84b2f0;      --s-waiting: #c0a2f2; --s-coming: #a9a198;
  --accent: #e8ff47; --on-accent: #0d0d0d; --ember: #e8ff47; --btn-glow: none;
  --accent-edge: rgba(232,255,71,.45);
  background: #0d0d0d; color: #f5f5f3; padding: 20px 0 22px; border-bottom: 1px solid rgba(255,255,255,.07);
}
.mast .btn.primary:hover { filter: brightness(1.05); }
.mast .btn.primary:focus-visible { outline-color: #e8ff47; }
.mrow { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.mast #freshness { margin: 0; }
.mtools { display: flex; gap: 8px; margin-left: auto; }
.mtools .search { min-width: 240px; min-height: 40px; }
.mtools .search .lbl { flex: 1; text-align: left; }
.mtools .helpbtn { width: 40px; min-height: 40px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.mhero { display: flex; align-items: flex-end; gap: 14px 20px; margin-top: 14px; }
.mhero .who { flex: 1; min-width: 0; }
.mhero h1 { font: 650 40px/1.05 var(--display); letter-spacing: -.02em; color: var(--ink); overflow-wrap: anywhere; }
.mhero .date { color: var(--muted); font-size: 15px; margin-top: 6px; }
.macts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.macts .btn.wide { width: auto; margin: 0; min-height: 40px; }
.macts .btn:not(.primary) { background: var(--card); border-color: var(--rule); color: var(--ink); }
.macts .btn:not(.primary):hover { background: var(--sunk); }
.mast .ring, .mast .ring svg { width: 74px; height: 74px; }
.mast .ring .n b { font-size: 14px; }
.mast .ring .n i { font-size: 12px; }

.ttiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.ttile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 76px; width: 100%;
  text-align: left; cursor: pointer; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-top: 3px solid var(--sc); border-radius: 14px; padding: 10px 12px 12px;
  transition: background .12s ease;
}
.ttile:hover { background: var(--sunk); }
.ttile:disabled { cursor: default; background: var(--card); }
.ttile .tc { font: 650 26px/1 var(--display); font-variant-numeric: tabular-nums; }
.ttile .tlab { font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.3; }
/* stall alerts (25 Oct 2026): "n blocked", red, beside the counts; absent at 0 */
.blockpill {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 16px; min-height: 36px;
  padding: 6px 14px 6px 10px; border: 0; border-radius: 999px; cursor: pointer;
  background: #b3261e; color: #ffffff; font: 700 14px/1.2 var(--sans);
  box-shadow: 0 0 0 3px rgba(242,120,106,.28);
}
.blockpill:hover { background: #9c1f18; }
.blockpill:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.blockpill .icon { width: 18px; height: 18px; stroke: currentColor; }
.blockpill + .ttiles { margin-top: 12px; }
.delta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.delta b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.delta .wm b { color: var(--accent-ink); }

/* the week: late · today · the next 7 days */
.weekbox { margin-top: 18px; }
.week { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; }
.wday {
  display: flex; flex-direction: column; align-items: stretch; min-height: 92px; min-width: 0;
  text-align: left; cursor: pointer; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px 10px; box-shadow: var(--shadow-s);
}
.wday:hover { border-color: var(--rule); }
.wday:disabled { cursor: default; }
.wday:disabled:hover { border-color: var(--line); }
.wday .wh { display: flex; justify-content: space-between; gap: 4px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.wday .wc { font-variant-numeric: tabular-nums; font-weight: 700; }
.wday .dom { font: 650 22px/1.1 var(--display); margin-top: 2px; }
.wday .dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto; padding-top: 6px; }
.wday .dot { width: 8px; height: 8px; border-radius: 3px; background: var(--sc); }
.wday.late { border-color: color-mix(in srgb, var(--s-overdue) 55%, transparent); }
.wday.late .dow, .wday.late .wc { color: var(--s-overdue); }
.wday.weekend { background: var(--sunk); box-shadow: none; }
.wday.weekend .dom { color: var(--muted); }
.wday.today { background: var(--accent); border-color: transparent; color: #fff; }
.wday.today .wh { color: #fff; }
.wday.today .dot { box-shadow: 0 0 0 1.5px #fff; }
.wday[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }

/* the filter bar sticks under the staging bar while the list scrolls */
.fbar { position: sticky; top: var(--stage-height, 0px); z-index: 30; margin-top: 16px; padding: 10px 0;
        background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--line); }
.fbin { display: flex; flex-direction: column; gap: 8px; }
.frow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-width: 0; }
.fbar .projbar { margin: 0; }
.fbar .projbar + .projbar { padding-left: 14px; border-left: 1px solid var(--rule); }
.newbar { gap: 6px; }
.proj.daychip { background: var(--accent); border-color: transparent; color: var(--on-accent); padding-right: 10px; }
.proj.daychip .x { font: 700 16px/1 var(--sans); }

/* sections and cards */
.tsec, .tcard, .tback { scroll-margin-top: calc(var(--stage-height, 0px) + var(--fbar-h, 58px) + 14px); }
.tbody { padding-top: 6px; }
.tbody > .filterline { margin-top: 16px; }
.tsec { margin-top: 26px; }
.tsh { border-left: 4px solid var(--sc); padding: 2px 0 2px 14px; margin-bottom: 12px; }
.tsh h2, .tback h2 { display: flex; align-items: center; gap: 10px; font: 650 20px/1.25 var(--display); }
.tsh h2:focus { outline: none; }
.tsh h2:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 6px; }
.tsh .count, .tback .count {
  font: 700 12.5px/1 var(--sans); color: var(--sc, var(--muted)); border-radius: 999px; padding: 4px 9px;
  background: color-mix(in srgb, var(--sc, var(--muted)) 12%, var(--card)); font-variant-numeric: tabular-nums;
}
.tsh .hint, .tback .hint { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); }
.tsh { cursor: pointer; user-select: none; }
.tfold { margin-left: auto; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--muted); font: inherit; }
.tfold::before { content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .15s ease; }
.tsec.folded .tfold::before { transform: translateX(-2px) rotate(-45deg); }
.tfold:hover { color: var(--ink); border-color: var(--rule); }
.tfold:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.tsec.folded .tsh { margin-bottom: 0; }
.tsec.folded .tsh .hint { display: none; }
/* Isidoro, 28 Oct 2026: a tab-only project's tabs in its New business group header (FOM's Plan / Dev) */
.tsh .tabonly { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.tsh .tabonly-link { display: inline-block; min-height: 32px; line-height: 32px; font-weight: 700; color: var(--accent-ink, var(--ink)); text-decoration: underline; text-underline-offset: 3px; }
/* MISSION-alanfix §5: the overview's one-line quick update, under the masthead */
.quickbar { padding-top: 16px; }
.quickform { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: var(--r-m);
             border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-s); }
.quicklab { font-weight: 700; color: var(--ink); white-space: nowrap; }
.quickform input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 14px; min-height: 46px;
                   border: 1px solid var(--rule); border-radius: var(--r-s); background: var(--bg); color: var(--ink); }
.quickform input::placeholder { color: var(--muted); }
.quickform input:focus { border-color: var(--ember); outline: none; box-shadow: 0 0 0 3px var(--accent-bg); }
.quickform .btn { min-height: 46px; }
@media (max-width: 600px) {
  .quickform { flex-wrap: wrap; padding: 10px; }
  .quicklab { flex-basis: 100%; }
}
/* the quick update's sheet: the box and Send on top, the thread under them */
.quick-sheet .quick-composer { border-top: 0; border-bottom: 1px solid var(--line); }
.quick-sheet .quick-working { color: var(--muted); }
/* MISSION-alanfix §1: the day cap's one bar above the cards */
.capbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 16px; padding: 10px 14px;
          border-radius: var(--r-m); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-s);
          font-weight: 650; color: var(--ink); }
.capbar .sep { color: var(--muted); }
.capbar + .tfoldall { margin-top: 10px; }
.tfoldall { display: flex; justify-content: flex-end; margin-top: 16px; }
.tfoldall + .tsec { margin-top: 6px; }
.tcard {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 14px; align-items: start; width: 100%;
  margin-top: 10px; padding: 16px 18px; text-align: left; cursor: pointer; color: var(--ink); font: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.tcard:hover { border-color: var(--rule); transform: translateY(-1px); }
.tcard:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.tnum { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
        background: var(--sc); color: var(--s-on); font: 700 15px/1 var(--display); font-variant-numeric: tabular-nums; }
.tmain { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12.5px; line-height: 1.5; }
.tclient { background: var(--chip); border-radius: 7px; padding: 1px 8px; font-weight: 700; color: var(--ink); }
.twhen b { font-weight: 700; }
.twhen small { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.twhen.late b, .twhen.late small { color: var(--s-overdue); }
.twhen.proceed b { color: var(--s-proceeds); }
.tflag { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: var(--stone-bg); color: var(--muted); }
.tflag.new { background: var(--info-bg); color: var(--info); }
.tflag.redated, .tflag.marked { background: var(--flag-bg); color: var(--flag); }
.tflag.nobrief, .tflag.failed { background: var(--bad-bg); color: var(--bad); }
.tflag.tick { background: var(--ok-bg); color: var(--ok); }
.tflag.pending { background: var(--info-bg); color: var(--info); }
.tflag.secname { background: color-mix(in srgb, var(--sc) 14%, var(--card)); color: var(--ink); }
/* "Lead: <name>" (MISSION-newbiz): a link to the lead's row in Notion, new tab */
.leadchip { display: inline-block; max-width: 100%; border-radius: 7px; padding: 1px 8px; font-weight: 700;
            background: var(--info-bg); color: var(--info); text-decoration: none; overflow-wrap: anywhere; }
a.leadchip:hover { text-decoration: underline; }
a.leadchip:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.strip .leadchip { font-size: 13px; padding: 2px 9px; border-radius: 999px; }
/* MISSION-alanfix: the store link (↗ <host>) and "Follow-up of: <parent>" on the card and the record */
.linkchip { display: inline-block; max-width: 100%; border-radius: 7px; padding: 1px 8px; font-weight: 700;
            background: var(--info-bg); color: var(--info); text-decoration: none; overflow-wrap: anywhere; }
a.linkchip:hover { text-decoration: underline; }
a.linkchip:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.strip .linkchip { font-size: 13px; padding: 2px 9px; border-radius: 999px; }
.followup { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin-top: 4px; color: var(--muted);
            font-size: 13px; font-weight: 600; }
.followup a { color: var(--accent-ink); font-weight: 700; }
.followup .tflag { margin-left: 2px; }
.rhead .followup { font-size: 14px; margin-top: 8px; }
.task-heading-details { margin: 8px 0 12px; font: 400 14px/1.55 var(--sans); color: var(--muted);
  white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.task-source-title { display: block; font-weight: 600; }
a.task-source-title { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
a.task-source-title:hover { text-decoration-thickness: 2px; }
a.task-source-title:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 3px; }
.task-source-ask { margin: 6px 0 0; color: var(--ink); }
.tcard .task-heading-details { margin: 4px 0 0; font-size: 13px; }
.ttitle { font: 700 16px/1.35 var(--sans); overflow-wrap: anywhere; }
.tline { font-size: 14px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; max-width: 110ch; }
.tline.trec { color: var(--ink); border-left: 3px solid var(--sc); padding-left: 10px; margin-top: 2px; }
.tline .tag { font-size: 12px; font-weight: 800; color: var(--sc); margin-right: 8px; letter-spacing: .03em; }
.tgo { align-self: center; font-size: 24px; line-height: 1; color: var(--faint); }

/* the backlog, collapsed */
.tback { margin-top: 30px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
         box-shadow: var(--shadow); padding: 16px 18px; }
.tback summary { cursor: pointer; list-style: none; }
.tback summary::-webkit-details-marker { display: none; }
.tback h2::after { content: '+'; margin-left: auto; font: 700 20px/1 var(--sans); color: var(--muted); }
.tback[open] h2::after { content: '–'; }
.tblist { list-style: none; margin: 12px 0 0; padding: 0; }
.tblist li { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.tblist a { font-weight: 650; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.tblist a:hover { text-decoration: underline; text-underline-offset: 2px; }
.tblist .c { font-size: 13px; color: var(--muted); }
.tempty { margin-top: 26px; padding: 22px; text-align: center; background: var(--card); border: 1px solid var(--line);
          border-radius: var(--r); color: var(--muted); }
.tempty p { margin: 0 0 12px; }
.how { margin: 26px 0 0; font-size: 13.5px; color: var(--muted); }
.how b { color: var(--ink); }
.tlinks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tfoot { margin: 18px 0 0; font-size: 12.5px; color: var(--faint); }
.tfoot b { color: var(--ink); }

@media (max-width: 899px) {
  .ttiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .week { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; scrollbar-width: thin; }
  .wday { flex: 0 0 78px; scroll-snap-align: start; }
}
@media (max-width: 600px) {
  .tin { padding: 0 16px; }
  .mast { padding: 14px 0 16px; }
  .mtools .search { min-width: 0; width: 40px; padding: 0; justify-content: center; }
  .mtools .search .lbl, .mtools .search kbd { display: none; }
  .mast #freshness { order: 3; }
  .mhero { flex-wrap: wrap; margin-top: 10px; }
  .mhero h1 { font-size: 30px; }
  .mhero .date { font-size: 14px; }
  .macts { order: 3; flex-basis: 100%; justify-content: stretch; }
  .macts .btn.wide { flex: 1 1 auto; }
  .ttiles { gap: 8px; margin-top: 14px; }
  .ttile { min-height: 66px; padding: 8px 10px 10px; }
  .ttile .tc { font-size: 22px; }
  .delta { gap: 4px 14px; font-size: 13px; }
  .wday { flex-basis: 64px; min-height: 86px; padding: 7px 8px 9px; }
  .fbar { padding: 8px 0; }
  .fbin { gap: 6px; }
  .frow { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .frow::-webkit-scrollbar { display: none; }
  .fbar .projbar { flex-wrap: nowrap; flex: none; }
  .fbar .proj { flex: none; }
  .tsec { margin-top: 22px; }
  .tsh h2, .tback h2 { font-size: 18px; }
  .tcard { grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: 18px; }
  .tnum { width: 30px; height: 30px; font-size: 13.5px; }
  .tgo { display: none; }
  .ttitle { font-size: 15px; }
  .tline { font-size: 13.5px; }
}

/* shared by the overview and the rail */
.filterline { gap: 10px; }

/* the answered / total ring */
.ring { width: 76px; height: 76px; flex: none; position: relative; }
.ring svg { display: block; transform: rotate(-90deg); width: 76px; height: 76px; }
.ring .track { stroke: var(--well); }
.ring .fill { stroke: var(--ember); transition: stroke-dasharray .4s ease; }
.ring .n { position: absolute; inset: 0; display: flex; flex-direction: column;
           align-items: center; justify-content: center; line-height: 1; }
.ring .n b { font: 650 16px/1 var(--display); font-variant-numeric: tabular-nums; }
.ring .n i { font-style: normal; font-size: 12px; color: var(--faint); margin-top: 3px; }
.freshness { font-size: 13px; color: var(--faint); display: flex; align-items: center;
             gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.freshness .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--spruce); flex: none;
                  box-shadow: 0 0 0 3px var(--ok-bg); }
.freshness.stale .dot { background: var(--ember); box-shadow: 0 0 0 3px var(--accent-bg); animation: pulse 1.2s ease-in-out infinite; }
.freshness .warn { color: var(--bad); }
#freshness { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px;
             padding: 3px 4px 3px 12px; color: var(--muted); font-weight: 600; }
#freshness .btn { min-height: 30px; padding: 4px 10px; border-radius: 999px; }

.toggle { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px;
          font-size: 14px; color: var(--muted); cursor: pointer; min-height: 44px; font-weight: 600; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.toggle.small { margin: 0; min-height: 36px; font-size: 13.5px; }

/* project filter: one pill per project, the chosen one filled */
.projbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.proj {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px;
  padding: 0 6px 0 13px; border-radius: 999px; cursor: pointer;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  font: 600 13px/1 var(--sans);
}
.proj:hover { background: var(--sunk); }
.proj .pc { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 12px;
            background: var(--well); border-radius: 999px; padding: 4px 8px; min-width: 24px; text-align: center; }
.proj[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.proj[aria-pressed="true"] .pc { color: var(--bg); background: color-mix(in srgb, var(--bg) 18%, transparent); }
.projtag { font-size: 12.5px; font-weight: 700; color: var(--accent-ink);
           background: var(--accent-bg); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }

/* "About today": the day's properties */
.railhead { font: 650 15px/1.3 var(--display); margin: 0 0 8px; }
.plist { margin: 0; display: grid; gap: 0; }
.prow { padding: 8px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.prow:last-child { border-bottom: 0; }
.prow dt { font-size: 12.5px; color: var(--faint); font-weight: 600; }
.prow dd { margin: 1px 0 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.prow .pv { display: block; }
.prow .fhist { font-size: 12.5px; font-weight: 600; padding: 2px 0 0; }

/* ───────────────────────────── pages: backlog, review, done, history ───────────── */
.topbar {
  position: sticky; top: var(--stage-height, 0px); z-index: 20; background: var(--glass);
  -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px);
  display: flex; align-items: center; gap: 8px; padding: 12px 0;
}
.topbar .pos { font: 650 16px/1 var(--display); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.topbar .secname { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--well);
                   border-radius: 999px; padding: 4px 11px;
                   white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar .sp { flex: 1; }
.topbar .btn.small { min-height: 40px; border-radius: var(--r-s); border-color: var(--line); }
.topbar .search { min-width: 0; }
.topbar .search.tb { min-width: 200px; }
.nav { border: 1px solid var(--line); background: var(--card); border-radius: var(--r-s); color: var(--ink);
       width: 40px; height: 40px; cursor: pointer; font-size: 16px; line-height: 1; flex: none;
       display: inline-grid; place-items: center; padding: 0; }
.nav:hover { background: var(--sunk); border-color: var(--rule); }
.nav:disabled { opacity: .35; cursor: default; }
.pagehead { font: 650 28px/1.15 var(--display); letter-spacing: -.02em; margin: 10px 0 4px; }
.list { margin: 10px 0 0; padding: 0; list-style: none; }
.list li { border-bottom: 1px solid var(--line); padding: 11px 0; font-size: 14px; }
.list li:last-child { border-bottom: 0; }
.list li .c { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.list li > a { font-weight: 650; text-decoration: none; }
.list li > a:hover { text-decoration: underline; text-underline-offset: 2px; }
/* task-list rows (backlog): icon tile, title, meta line, avatar */
.list.rows li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 12px 4px; }
.list.rows li .ti { grid-row: 1 / span 2; }
.list.rows li > a { grid-column: 2; overflow-wrap: anywhere; }
.list.rows li .c { grid-column: 2; margin: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.list.rows li .c .icon { width: 13px; height: 13px; }
.list.rows li .avatar { grid-column: 3; grid-row: 1 / span 2; }
.wrap > .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px;
                box-shadow: var(--shadow); }
.wrap > .card .ask { margin-top: 0; }
.wrap > .card .sub { margin-top: 16px; }
.empty { color: var(--faint); font-size: 13.5px; padding: 8px 2px; }
.activity-list li { padding: 12px 0; }
.activity-entry > a { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.activity-entry .message-time { display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 13.5px; margin: 6px 0 18px; }
.legend span::before { content: ''; display: inline-block; width: 14px; height: 14px; border-radius: 50%;
                       margin-right: 6px; vertical-align: -2px; border: 1.5px solid var(--rule); background: var(--card); }
.legend .la::before { background: var(--spruce); border-color: var(--spruce); }
.legend .lp::before { background: var(--info-bg); border-color: var(--info); }
.legend .lf::before { background: var(--saffron); border-color: var(--saffron); }
.gridsec { margin: 0 0 20px; }
.gridsec .label { margin-bottom: 8px; }
.cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 8px; }
.cell { position: relative; height: 50px; border-radius: var(--r-m); border: 1px solid var(--line); color: var(--ink);
        background: var(--card); font: 650 15px/1 var(--display); cursor: pointer; font-variant-numeric: tabular-nums;
        box-shadow: var(--shadow-s); }
.cell:hover { border-color: var(--rule); background: var(--sunk); }
.cell.a { background: var(--spruce); border-color: var(--spruce); color: #fff; }
:root[data-theme="dark"] .cell.a { color: #0f0d0c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cell.a { color: #0f0d0c; } }
.cell.p { background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 50%, transparent); color: var(--info); }
.cell.f::after { content: ''; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px;
                 border-radius: 50%; background: var(--saffron); box-shadow: 0 0 0 2px var(--card); }
.skel { height: 14px; border-radius: 7px; background: var(--well); margin: 12px 0;
        animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
.err { border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); background: var(--bad-bg);
       border-radius: var(--r); padding: 20px; }
.err h2 { color: var(--bad); font-size: 18px; margin-bottom: 6px; }
.err pre { white-space: pre-wrap; font-size: 13px; color: var(--muted); margin: 6px 0 12px; }
#toast { position: fixed; left: 50%; transform: translateX(-50%); top: 14px; z-index: 70;
         pointer-events: none;   /* must never eat a tap meant for a control */
         background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px;
         font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-pop); max-width: 90vw; }

/* ───────────────────────────── item shell: list | record | thread ───────────── */
.navigation-panel { background: var(--side-bg); color: var(--side-ink); min-width: 0; padding: 14px; }
.navigation-content { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; min-width: 0;
                      container-type: inline-size; container-name: rail; }
.nav-closed .navigation-content { display: none; }
.navtoggle { color: var(--side-muted); background: transparent; border: 1px solid var(--side-line); }
.navtoggle:hover { background: var(--side-hover); border-color: var(--side-line); color: var(--side-ink); }
.navhead { display: grid; gap: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 2px 0;
         cursor: pointer; font: 650 16px/1.15 var(--display); justify-self: start; color: var(--ink); text-align: left; }
.brand .bsub { display: block; font: 500 12px/1.3 var(--sans); color: var(--muted); }
.brand .logo { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-s);
               background: var(--ember); color: #fffaf5; font: 700 13px/1 var(--display); letter-spacing: .02em;
               box-shadow: 0 8px 18px -10px rgba(228,87,46,.9), inset 0 1px 0 rgba(255,255,255,.25); }
.navprog { font-size: 12.5px; color: var(--muted); display: grid; gap: 6px; }
.mini { display: block; height: 4px; border-radius: 4px; background: var(--well); overflow: hidden; }
.mini i { display: block; height: 100%; background: var(--ember); border-radius: 4px; }
.navigation-content .btn.search { background: var(--side-well); border-color: var(--side-line); color: var(--side-muted); }
.navigation-content .btn.search:hover { background: rgba(255,255,255,.09); }
.navigation-content kbd { background: rgba(255,255,255,.06); border-color: var(--side-line); color: var(--side-muted); }
/* kind tabs: a segmented control */
.kindtabs { display: flex; flex-wrap: wrap; gap: 2px; background: var(--well); border-radius: var(--r-s); padding: 3px; }
.ktab { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 9px; cursor: pointer;
        border-radius: 9px; border: 0; background: transparent; color: var(--muted);
        font: 650 12.5px/1 var(--sans); flex: 1 1 auto; justify-content: center; }
.ktab:hover { color: var(--ink); }
.ktab .kc, .navsec .kc { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 12px;
  background: var(--chip); color: var(--ink); border-radius: 999px; padding: 2px 7px; min-width: 22px; text-align: center; }
.ktab[aria-pressed="true"] { background: var(--side-active); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.navigation-content .projbar { display: flex; flex-direction: column; margin: 0; gap: 2px; }
.navigation-content .proj { justify-content: space-between; text-align: left; font-size: 13.5px; min-height: 36px; line-height: 1.25;
                            padding: 0 8px 0 12px; border-radius: var(--r-s); color: var(--muted);
                            border-color: transparent; background: transparent; font-weight: 600; }
.navigation-content .proj:hover { background: var(--side-hover); color: var(--ink); }
.navigation-content .proj .pc { background: var(--side-pill); color: var(--ink); }
.navigation-content .proj[aria-pressed="true"] { background: var(--side-active); border-color: transparent; color: var(--ink);
                                                 box-shadow: inset 3px 0 0 var(--ember); }
.navigation-content .proj[aria-pressed="true"] .pc { background: var(--ember); color: #fffaf5; }
.navsec { display: grid; gap: 2px; }
.navsec .label { display: flex; justify-content: space-between; align-items: center; margin: 8px 8px 4px; color: var(--muted); }
/* task-list rows: a round state marker, the kind's icon tile, title + meta line, avatar */
.task-link { display: grid; grid-template-columns: 18px auto minmax(0, 1fr) auto auto; gap: 2px 9px; align-items: center;
  background: transparent; border: 0; border-radius: var(--r-s); padding: 7px 8px; text-align: left;
  font-size: 13.5px; line-height: 1.35; cursor: pointer; color: var(--ink); min-width: 0; position: relative; }
.task-link:hover { background: var(--side-hover); }
.task-link.current { background: var(--side-active); color: var(--ink); }
.task-link.current::before { content: ''; position: absolute; left: -6px; top: 10px; bottom: 10px; width: 3px;
                             border-radius: 3px; background: var(--ember); }
.task-link .tk { grid-row: 1 / span 2; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--rule);
                 display: grid; place-items: center; font-size: 12px; font-weight: 800; line-height: 1; }
.task-link .tk.ok { border-color: var(--ok); background: var(--ok); color: var(--side-bg); }
.task-link .tk.pend { border-color: var(--info); color: var(--info); }
.task-link .tk.bad { border-color: var(--bad); color: var(--bad); }
.task-link .ti { grid-row: 1 / span 2; width: 28px; height: 28px; border-radius: 9px; }
.task-link .tt { grid-column: 3; font-weight: 650; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2;
                 -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.task-link .tm { grid-column: 3; grid-row: 2; display: flex; gap: 6px; align-items: center; min-width: 0;
                 font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.task-link .tm .icon { width: 12px; height: 12px; }
.task-link .tm .tw { overflow: hidden; text-overflow: ellipsis; }
.task-link .tn { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 700; }
.task-link .tm .late { color: var(--bad); }
.task-link .tf { grid-column: 4; grid-row: 1 / span 2; color: var(--flag); }
.task-link .avatar { grid-column: 5; grid-row: 1 / span 2; }
/* the narrow rail (the default 224 px) drops the tile and the avatar first */
@container rail (max-width: 250px) {
  .kindtabs { display: grid; grid-template-columns: 1fr 1fr; }
  .ktab[data-k="marked"] { grid-column: 1 / -1; }
  .btn.search.full .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
  .task-link { grid-template-columns: 18px minmax(0, 1fr) auto; }
  .task-link .ti, .task-link .avatar { display: none; }
  .task-link .tt, .task-link .tm { grid-column: 2; }
  .task-link .tf { grid-column: 3; }
}
.navlinks { display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.navlinks .btn { justify-content: flex-start; background: transparent; border-color: transparent; color: var(--muted);
                 font-size: 14px; font-weight: 600; min-height: 38px; padding: 0 12px; border-radius: var(--r-s); box-shadow: none; }
.navlinks .btn:hover { background: var(--side-hover); color: var(--ink); }
.navlinks .btn .icon { width: 18px; height: 18px; }
.navigation-content .signout { border-top: 1px solid var(--line); padding-top: 12px; }
.navigation-content .toggle { color: var(--muted); }
.navigation-content .empty { color: var(--muted); }
/* the operator at the foot of the rail */
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: var(--side-well); }
.me .mn { display: grid; min-width: 0; }
.me .mn b { font-weight: 700; font-size: 14px; }
.me .mn span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .avatar { box-shadow: none; }
.nav-backdrop { display: none; }
.chat-return, .chat-divider, .navigation-divider { display: none; }

/* ───────────────────────────── the record ───────────────────────────── */
.card { background: transparent; border: 0; padding: 0 0 18px; min-width: 0; }
.card.done .rhead > :not(.answer-area), .card.done .hl-wrap, .card.done .rbody { opacity: .62; }
.rhead { padding: 22px 24px; margin-top: 6px; min-width: 0; background: var(--card); border: 1px solid var(--line);
         border-radius: var(--r); box-shadow: var(--shadow); }
.ask { font: 650 26px/1.2 var(--display); margin: 0; overflow-wrap: break-word;
       letter-spacing: -.02em; text-wrap: pretty; }
.ask.plain { font-size: 24px; }
.ask.long  { font-size: 21px; line-height: 1.3; }
/* kind · client · date */
.strip { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 12px;
         font-size: 13px; color: var(--muted); font-weight: 600; }
.strip .kind { font-weight: 700; color: var(--accent-ink); white-space: nowrap; background: var(--accent-bg);
               border-radius: 999px; padding: 3px 10px; }
.strip .sep { color: var(--rule); }
.strip .who { min-width: 0; overflow-wrap: anywhere; }
.strip .when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.strip .when.late { color: var(--bad); font-weight: 700; }
.strip .when.soon { color: var(--accent-ink); font-weight: 700; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; line-height: 1.5;
         padding: 2px 10px; border-radius: 999px; background: var(--chip); color: var(--muted); }
.badge::first-letter { text-transform: uppercase; }
.badge.new      { background: var(--info-bg); color: var(--info); }
.badge.overdue  { background: var(--bad-bg); color: var(--bad); }
.badge.redated  { background: var(--flag-bg); color: var(--flag); }
.badge.tick     { background: var(--ok-bg); color: var(--ok); }
.badge.pending  { background: var(--info-bg); color: var(--info); }
.badge.failed   { background: var(--bad-bg); color: var(--bad); }
.badge.flagged  { background: var(--flag-bg); color: var(--flag); }

/* the answer area: the recommendation, the choices, the note, the state */
.answer-area { margin-top: 18px; min-width: 0; }
.rec { background: var(--accent-bg); border: 1px solid var(--accent-edge);
       border-radius: var(--r-m); padding: 14px 16px; }
.rec .label { color: var(--accent-ink); display: flex; align-items: center; gap: 6px; }
.rec p { margin: 4px 0 0; font-size: 15px; line-height: 1.55; font-weight: 600; overflow-wrap: break-word; }
.rec .recommendation-go { margin-top: 12px; }
/* "+ New"-style placement: the main answer action sits right of the recommendation */
@container center (min-width: 640px) {
  .rec:has(> .recommendation-go) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 18px; align-items: center; }
  .rec:has(> .recommendation-go) > .label, .rec:has(> .recommendation-go) > p { grid-column: 1; }
  .rec > .recommendation-go { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
}
.answerbar { min-width: 0; }
.actionbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 0; }
.act { display: flex; flex-direction: row; align-items: flex-start; gap: 11px; flex: 1 1 150px; color: var(--ink);
       text-align: left; border: 1px solid var(--line); background: var(--card);
       border-radius: var(--r-m); padding: 11px 14px; cursor: pointer; min-height: 50px; min-width: 0;
       box-shadow: var(--shadow-s); transition: border-color .12s ease, background .12s ease; }
.act:hover { border-color: var(--rule); background: var(--sunk); }
/* the tile letter is a round checkbox-like marker */
.act .k { font: 700 12px/1 var(--sans); color: var(--muted); border: 1.5px solid var(--rule); border-radius: 50%;
          width: 24px; height: 24px; display: inline-grid; place-items: center; padding: 0;
          background: transparent; flex: none; margin-top: 0; }
.act .t { font: 650 14px/1.4 var(--sans); overflow-wrap: anywhere; min-width: 0; flex: 1; padding-top: 2px; }
.act .lg { display: inline; }
.act .sm { display: none; }
/* the preferred choice is highlighted (Isidoro, 20 Oct 2026); .on (selected) still wins */
/* light green = "this is the recommendation" signal (Isidoro, 20 Oct 2026) */
:root { --rec-bg: #e6f7dc; --rec-edge: #3a7a1d; --rec-ink: #2b5e12; --rec-on: #ffffff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --rec-bg: rgba(126,206,88,.16); --rec-edge: #86d465; --rec-ink: #a9e68c; --rec-on: #10200a; }
}
:root[data-theme="dark"] { --rec-bg: rgba(126,206,88,.16); --rec-edge: #86d465; --rec-ink: #a9e68c; --rec-on: #10200a; }
.act.isrec { border-color: var(--rec-edge); background: var(--rec-bg); box-shadow: 0 0 0 1px var(--rec-edge); }
.act.isrec:hover { border-color: var(--rec-edge); background: var(--rec-bg); filter: brightness(.98); }
.act.isrec .k { color: var(--rec-on); border-color: var(--rec-edge); background: var(--rec-edge); }
.act.isrec .action-title { color: var(--rec-ink); }
.act.on .action-title { color: var(--on-accent); }
.act[data-a="no"] .t, .act[data-a="veto"] .t, .act[data-a="blocked"] .t { color: var(--bad); }
.act[data-a="choice"] .t, .act[data-a="chase"] .t, .act[data-a="notnow"] .t { color: var(--muted); }
.act.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: var(--btn-glow); }
.act.on .k, .act.on .t, .act.on .rtag { color: var(--on-accent) !important; }
.act.on .k { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.5); }
.act:disabled { opacity: .5; cursor: default; }
.act .action-title { display: block; font-weight: 700; }
.act .action-detail, .act .option-text { display: block;
  margin-top: 2px; font-weight: 500; font-size: 13.5px; line-height: 1.45;
  white-space: normal; overflow-wrap: anywhere; color: var(--muted); }
.act.on .action-detail, .act.on .option-text { color: var(--on-accent); }
.act .option-text { color: var(--ink); }
.actionbar .act[data-a="option"], .actionbar .act.isrec, .decision-actions .act[data-a="yes"] { flex-basis: 100%; }
.decision-actions .act { flex-basis: 200px; }
.rtag { display: inline-block; margin-left: 6px; font: 700 12px/1.6 var(--sans); color: var(--accent-ink);
        background: var(--accent-bg); border-radius: 999px; padding: 0 8px; }
.answerbar > .state { margin: 12px 0 0; }
/* the note / preview under the choices */
.notebox { border: 1px solid var(--line); border-radius: var(--r-m); margin-top: 12px; padding: 14px; background: var(--sunk); }
.notebox label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.notebox input { width: 100%; font: inherit; font-size: 16px; padding: 10px 14px; min-height: 46px;
                 border: 1px solid var(--rule); border-radius: var(--r-s); background: var(--card); color: var(--ink); }
.notebox input:focus { border-color: var(--ember); outline: none; box-shadow: 0 0 0 3px var(--accent-bg); }
.notebox .row { display: flex; gap: 8px; margin-top: 10px; }
.notebox .row .btn { flex: 1; }
.confirmation-help { margin: 0 0 8px; font-size: 13px; color: var(--faint); }
.preview { margin-top: 10px; background: var(--card); border: 1px dashed var(--rule); border-radius: var(--r-xs); padding: 8px 12px;
           font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.preview b { color: var(--ink); font-weight: 650; }
.preview .l { display: block; font-size: 12px; color: var(--faint); font-weight: 650; margin-bottom: 2px; }
/* answered / pending / failed state */
.state { border-radius: var(--r-m); padding: 12px 14px; font-size: 14px;
         display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap;
         background: var(--ok-bg); border: 1px solid color-mix(in srgb, var(--ok) 26%, transparent); }
.state.pending { background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 26%, transparent); }
.state.failed  { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
/* au-pm asked a question instead of saving (LIVE): the operator's move, no spinner */
.state.pending.asking { background: var(--flag-bg); border-color: color-mix(in srgb, var(--flag) 34%, transparent); }
.state.pending.asking .l { color: var(--ink); }
.state .txt { flex: 1; min-width: 160px; overflow-wrap: anywhere; }
.state .l { color: var(--muted); display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 2px; }
.spin { width: 14px; height: 14px; border-radius: 50%; flex: none; margin-top: 3px;
        border: 2px solid color-mix(in srgb, var(--info) 35%, transparent);
        border-top-color: var(--info); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tickmark { color: var(--ok); font-weight: 800; font-size: 18px; line-height: 1; }
/* MISSION-saving: "Saving… m:ss", the latest step, the slow notice; "Not saved — answer again" + tiles */
.state.saving .saving-clock { color: var(--info); font-variant-numeric: tabular-nums; }
.saving-step { display: block; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.saving-slow { display: block; font-size: 13px; font-weight: 600; color: var(--flag); margin: 2px 0; }
.saving-step[hidden], .saving-slow[hidden] { display: none; }
.badge.saving { font-variant-numeric: tabular-nums; }
.answerbar > .failed-wrap > .state { margin: 12px 0 0; }
/* MISSION-close: "Closed · Undo", the screenshot warning, the backlog row's Done */
.close-state .btn { align-self: center; }
.close-warn { flex-basis: 100%; margin: 4px 0 0; font-size: 13px; font-weight: 600; color: var(--flag);
              background: var(--flag-bg); border-radius: var(--r-xs); padding: 6px 10px; }
.close-error { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--bad); flex-basis: 100%; }
.bl-close { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.bl-close .bl-done { font-size: 13px; font-weight: 700; color: var(--ok); }
.bl-close .bl-note { margin-top: 6px; flex-basis: 100%; }
.tblist li .bl-close { flex-basis: 100%; }
.list.rows li .bl-close { grid-column: 2 / span 2; }
li.closed > a { text-decoration: line-through; color: var(--muted); }
/* MISSION-doneevidence: the evidence box — the row's Done when (read-only) above the one required line */
.evidence-dw { margin: 0 0 10px; padding: 8px 12px; background: var(--card); border: 1px solid var(--line);
               border-left: 3px solid var(--rule); border-radius: var(--r-xs); }
.evidence-dw .l { display: block; font-size: 13px; font-weight: 650; color: var(--muted); margin-bottom: 2px; }
.evidence-dw-t { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere;
                 max-height: 9em; overflow-y: auto; }
.evidence-dw-t.none { color: var(--muted); font-style: italic; }
.evidence-hint { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.evidence-hint.ready { color: var(--ink); }
.map-evidence { margin: 0 0 14px; }
@media (max-width: 699px) {
  .evidence-dw { padding: 6px 10px; margin-bottom: 8px; }
  .evidence-dw-t { max-height: 4.4em; }      /* the line stays in sight above the keyboard */
}
/* Light's sizes (V: text ≥ 15 px, taps ≥ 48 px) */
.lt-dock .lt-evid { margin: 0; background: var(--bg); }
.lt-evid .confirmation-help, .lt-evid .evidence-hint, .lt-evid .evidence-dw .l { font-size: 15px; }
.lt-evid .evidence-dw-t { font-size: 16px; }
.lt-evid label { font-size: 16px; color: var(--ink); }
.lt-evid input { font-size: 17px; min-height: 52px; }
.lt-evid .row .btn { min-height: 52px; font-size: 17px; }
/* MISSION-direct: "Answered · Undo" after a write the server made itself */
.direct-state .btn { align-self: center; }
.notebox.direct .preview { border-color: color-mix(in srgb, var(--ok) 30%, transparent); }

/* six highlight widgets: stat cards with a round tinted icon */
.hl-wrap { margin-top: 14px; min-width: 0; }
.highlights { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.widget { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 14px;
          min-width: 0; box-shadow: var(--shadow); display: grid; grid-template-columns: auto minmax(0, 1fr);
          column-gap: 11px; align-content: start; }
.widget > * { grid-column: 2; }
.widget > .wi { grid-column: 1; grid-row: 1 / span 4; width: 36px; height: 36px; margin-top: 2px; }
.widget > .wi .icon { width: 17px; height: 17px; }
.widget .wl { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.widget .wv { font: 650 16px/1.3 var(--display); margin-top: 1px; white-space: nowrap; overflow: hidden;
              text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.widget .ws { font-size: 12px; color: var(--faint); margin-top: 2px; overflow: hidden; display: -webkit-box;
              -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.widget.late .wv { color: var(--bad); }
.widget.soon .wv { color: var(--accent-ink); }
.widget .meter { height: 5px; border-radius: 5px; background: var(--well); margin-top: 8px; overflow: hidden; }
.widget .meter i { display: block; height: 100%; width: 0; background: var(--ember); border-radius: 5px; }
.widget.over .meter i { background: var(--saffron); }
/* edit a date or the Decider on the record (MISSION-fieldedit): a small pencil in the
   card's corner (the card keeps its size) and an inline editor under the cards */
.widget.editable { position: relative; padding-right: 40px; }
.fe-pencil { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; padding: 0; display: inline-grid;
             place-items: center; border: 1px solid transparent; border-radius: var(--r-xs); background: transparent;
             color: var(--muted); cursor: pointer; }
.fe-pencil::after { content: ''; position: absolute; inset: -6px; }     /* a bigger touch target, same layout */
.fe-pencil .icon { width: 15px; height: 15px; }
.fe-pencil:hover { background: var(--well); border-color: var(--line); color: var(--accent-ink); }
.fe-pencil:focus-visible, .fe-rowedit:focus-visible, .fe-input:focus-visible {
  outline: 2px solid var(--ember); outline-offset: 1px; }
.fe-pencil[aria-expanded="true"] { background: var(--accent-bg); color: var(--accent-ink); }
.widget.editing { border-color: var(--accent-edge); box-shadow: 0 0 0 3px var(--accent-bg); }
.fedit { margin: 10px 0 0; padding: 12px 14px; border: 1px solid var(--accent-edge); border-radius: var(--r-m);
         background: var(--card); box-shadow: var(--shadow); min-width: 0; }
.prow .fedit { margin: 8px 0 2px; box-shadow: none; }
.fe-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 13px; }
.fe-label { font-weight: 700; color: var(--ink); }
.fe-was { color: var(--muted); }
.fe-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.fe-input { flex: 1 1 160px; max-width: 240px; min-width: 0; min-height: 40px; padding: 6px 10px;
            font: 600 14px/1.2 var(--sans); color: var(--ink); background: var(--sunk);
            border: 1px solid var(--rule); border-radius: var(--r-xs); }
.fe-input:disabled { opacity: .6; }
.fe-msg { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.fe-msg:empty { display: none; }
.fe-msg.warn { color: var(--flag); font-weight: 650; }
.fe-msg.err { color: var(--bad); font-weight: 650; }
.fe-note { margin: 6px 0 0; font-size: 12px; color: var(--faint); }
.prow .fe-rowedit { display: inline-flex; align-items: center; gap: 4px; margin: 0 14px 0 0; padding: 2px 0 0;
                    font-size: 12.5px; font-weight: 600; }
.fe-rowedit .icon { width: 13px; height: 13px; }
/* time on the card (MISSION-timer): the indicator is the widget's value */
.timeline .tl-text { display: block; width: 100%; background: none; border: 0; padding: 1px 0; margin: 1px 0 0;
  cursor: pointer; color: var(--ink); font: 650 15px/1.35 var(--display); font-variant-numeric: tabular-nums;
  text-align: left; min-height: 0; overflow-wrap: anywhere; }
.timeline .tl-text:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.timeline[data-state="counting"] .tl-text { color: var(--ok); }
.timeline[data-state="held"] .tl-text { color: var(--flag); }
.timeline[data-state="held"] .timew { border-color: color-mix(in srgb, var(--flag) 50%, transparent); }
.timepanel { margin: 10px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-m);
             background: var(--card); color: var(--muted); font-size: 14px; box-shadow: var(--shadow); }
.timepanel .tp-rows { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; }
.timepanel dt { color: var(--faint); }
.timepanel dd { margin: 0; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.timepanel .tp-note { margin: 8px 0 0; }
.timepanel .tp-acts { display: flex; gap: 8px; margin-top: 10px; }
.timepanel .tp-skip { display: inline-block; margin-top: 8px; color: var(--accent-ink); font-weight: 700; }

/* the Details tab: every field open, in columns when the record is wide */
.rbody { container-type: inline-size; container-name: record; margin-top: 18px; min-width: 0; }
.rgrid { display: block; min-width: 0; }
.props { background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
         padding: 8px 18px 16px; box-shadow: var(--shadow); }
@container record (min-width: 500px) {
  .props .plist { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: 28px; }
  .props .prow:last-child { border-bottom: 1px solid var(--line); }
}
.props .links { margin-top: 12px; }
.links { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.links a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; font-weight: 700;
           border: 1px solid var(--rule); border-radius: var(--r-xs); text-decoration: none; color: var(--ink); background: var(--card); }
.links a:hover { background: var(--sunk); }
.mode { font-size: 12.5px; color: var(--faint); margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); font-weight: 600; }

/* tabs: pill tabs on a well, the chosen one lifted */
.rtabbox { min-width: 0; }
.rtabs { scroll-margin-top: 76px; display: flex; gap: 2px; background: var(--well); border-radius: var(--r-s);
         padding: 4px; overflow-x: auto; scrollbar-width: none; }
.rtabs::-webkit-scrollbar { display: none; }
.rtab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: none; border: 0;
        border-radius: 9px; padding: 6px 14px; min-height: 36px; flex: 1 1 auto;
        font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.rtab:hover { color: var(--ink); }
.rtab[aria-selected="true"] { color: var(--ink); background: var(--card);
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 10px -4px rgba(0,0,0,.14); }
.rtab .hcount, .rtab .tcount { min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--chip);
  color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.rtab .hcount:empty, .rtab .tcount:empty { display: none; }
.rpanel { padding-top: 14px; min-width: 0; }

/* Overview */
.ovw > * + * { margin-top: 14px; }
.options { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.options li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start;
              padding: 12px 14px; background: var(--card); border: 1px solid var(--line);
              border-radius: var(--r-m); font-size: 14.5px; line-height: 1.55; color: var(--ink); box-shadow: var(--shadow-s); }
.options li.isrec { border-color: var(--accent-edge); }
.options .k { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--rule); background: transparent;
              display: grid; place-items: center; font: 700 12.5px/1 var(--sans); color: var(--muted); margin-top: 0; }
.options li.isrec .k { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.options .t { overflow-wrap: anywhere; }
.options .mk { font-weight: 700; }
.recnote { background: var(--accent-bg); border: 1px solid var(--accent-edge); border-radius: var(--r-m); padding: 13px 16px; }
.recnote .label { color: var(--accent-ink); }
.recnote p { margin: 4px 0 0; font-size: 14.5px; font-weight: 600; overflow-wrap: break-word; }
.recnote.dup { display: none; }
.yours { padding: 13px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-s); }
.yours p { margin: 4px 0 0; font-size: 14.5px; overflow-wrap: break-word; }
.ctx { display: flex; flex-direction: column; gap: 14px; }
.sub p { margin: 4px 0 0; font-size: 14.5px; color: var(--muted); line-height: 1.6;
         display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; }
.sub p.full { -webkit-line-clamp: unset; display: block; }
.sub p[data-clip="1"] { cursor: pointer; }
details.more { border-top: 1px solid var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; font-size: 13.5px; color: var(--accent-ink); font-weight: 700;
                       list-style: none; min-height: 34px; display: flex; align-items: center; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: '+ '; white-space: pre; }
details.more[open] summary::before { content: '– '; }
details.more .kv { margin-top: 10px; }
details.more .kv p { margin: 2px 0 0; font-size: 14px; white-space: pre-wrap; color: var(--muted); overflow-wrap: anywhere; }
.recent { border-top: 1px solid var(--line); padding-top: 12px; }
.recent h3 { font-size: 15px; margin-bottom: 4px; }
.recentline { margin: 4px 0; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.recentline b { color: var(--ink); font-weight: 650; }

/* Activity: one merged timeline */
.tlfilters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tlf { min-height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
       font: 650 12.5px/1 var(--sans); color: var(--muted); cursor: pointer; }
.tlf:hover { color: var(--ink); background: var(--sunk); }
.tlf[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tl { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 1.5px solid var(--line); display: grid; gap: 10px; }
.tle { position: relative; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m);
       min-width: 0; box-shadow: var(--shadow-s); }
.tle::before { content: ''; position: absolute; left: -24px; top: 14px; width: 12px; height: 12px; border-radius: 50%;
               background: var(--bg); border: 2px solid var(--rule); }
.tle[data-kind="conv"]::before { border-color: var(--ember); }
.tle[data-kind="answer"]::before { border-color: var(--spruce); }
.tle[data-kind="change"]::before { border-color: var(--iris); }
.tle[data-kind="time"]::before { border-color: var(--saffron); }
.tle.auto { background: var(--sunk); box-shadow: none; }
.tlh { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; font-size: 13px; }
.tlh .tltitle { color: var(--muted); }
.tlh .message-time { margin: 0 0 0 auto; }
.tlt { margin-top: 3px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink);
       display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.tlauto { margin-top: 10px; }

/* per-field edit history */
.fieldhist { border: 1px solid var(--accent-edge); border-radius: var(--r-m); padding: 14px; margin-bottom: 16px;
             background: var(--accent-bg); }
.fhhead { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.fhhead h3 { font-size: 16px; }
.fhlist { margin-top: 10px; }
.histhead { margin-bottom: 4px; }
.histhead h3 { font-size: 16px; }
.histhead .hmuted { display: block; }

/* ───────────────────────────── thread (right panel / full-screen sheet) ───────── */
.dock { position: static; margin-top: 20px; min-width: 0; background: var(--bg); padding-bottom: env(safe-area-inset-bottom); }
.side { border-top: 1px solid var(--line); background: var(--card); }
.sheethandle { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; color: var(--ink);
               background: transparent; border: 0; padding: 10px 16px; cursor: pointer; min-height: 46px; }
.sheethandle .hico { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none;
                     background: var(--accent-bg); color: var(--accent-ink); }
.sheethandle .hico .icon { width: 15px; height: 15px; }
.sheethandle .ttl { font: 650 14px/1.2 var(--display); color: var(--ink); flex: none; }
.sheethandle .last { flex: 1; min-width: 0; font-size: 13px; color: var(--muted);
                     white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheethandle .chev { color: var(--faint); font-size: 12px; flex: none; }
.unread { background: var(--ember); color: #fffaf5; border-radius: 999px; font-size: 12px;
          font-weight: 800; padding: 1px 8px; flex: none; }
.sheetbody { display: none; flex-direction: column; min-height: 0; }
body.sheet-open .sheetbody { display: flex; }
.msgs { display: flex; flex-direction: column; gap: 10px; padding: 8px 16px 12px; overflow-y: auto; max-height: 42vh; }
.msg { border-radius: 16px; padding: 10px 14px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-time { display: block; margin-top: 6px; color: var(--muted); font-size: 12px;
  line-height: 1.4; white-space: normal; font-variant-numeric: tabular-nums; font-weight: 500; }
.msg.user { background: var(--accent-bg); align-self: flex-end; max-width: 92%; border-bottom-right-radius: 6px; }
.msg.assistant { background: var(--sunk); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.answer { background: var(--accent-bg); border: 1px solid var(--accent-edge); color: var(--accent-ink);
              font-weight: 700; align-self: flex-end; padding: 7px 14px; font-size: 13px; border-radius: 999px; }
.msg.tool, .msg.status { background: transparent; color: var(--faint); font-size: 12.5px; padding: 0 2px; }
.msg.error { background: var(--bad-bg); color: var(--bad); }
.msg.working { align-self: flex-start; display: flex; align-items: center; gap: 8px; background: var(--sunk);
               border: 1px dashed var(--line); border-bottom-left-radius: 6px; color: var(--muted);
               font-size: 13px; font-weight: 600; white-space: normal; }
.msg.working .wk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ember); flex: none;
                       animation: pulse 1.2s ease-in-out infinite; }
.msg.working .wk-time { font-variant-numeric: tabular-nums; color: var(--faint); }
@media (prefers-reduced-motion: reduce) { .msg.working .wk-dot { animation: none; } }
/* Rendered au-pm Markdown (app.js mdRender): document rhythm, not raw text. */
.md-msg { white-space: normal; line-height: 1.55; }
.md-msg .md > :first-child, .md-msg .md-callout > :first-child, .md-msg .md-quote > :first-child { margin-top: 0; }
.md-msg .md > :last-child, .md-msg .md-callout > :last-child, .md-msg .md-quote > :last-child { margin-bottom: 0; }
.md-msg .md-p, .md-msg .md-h { margin: 0 0 10px; }
.md-msg .md-h { font-weight: 750; }
.md-msg strong { font-weight: 700; }
.md-msg .md-list { margin: 0 0 10px; padding-left: 22px; }
.md-msg .md-list .md-list { margin: 4px 0 2px; padding-left: 20px; }
.md-msg .md-list li { margin: 3px 0; padding-left: 2px; }
.md-msg ul.md-list > li::marker { color: var(--muted); }
.md-msg ol.md-list > li::marker { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.md-msg .md-link { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.md-msg .md-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em;
  background: var(--well); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; overflow-wrap: anywhere; }
.md-msg .md-hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.md-msg .md-quote, .md-msg .md-callout { margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid var(--rule);
  border-radius: 0 var(--r-xs) var(--r-xs) 0; }
.md-msg .md-quote { color: var(--muted); }
.md-msg .md-callout.md-info { border-left-color: var(--info); background: var(--info-bg); }
.md-msg .md-callout.md-ok { border-left-color: var(--ok); background: var(--ok-bg); }
.md-msg .md-callout.md-flag { border-left-color: var(--flag); background: var(--flag-bg); }
.md-msg .md-callout.md-bad { border-left-color: var(--bad); background: var(--bad-bg); }
.composer { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding: 10px 12px 12px;
            border-top: 1px solid var(--line); background: var(--card); }
.composer textarea { flex: 1; font: inherit; font-size: 16px; resize: none; min-height: 44px; min-width: 0;
                     max-height: 110px; padding: 10px 14px; border: 1px solid var(--rule);
                     border-radius: var(--r-s); background: var(--bg); color: var(--ink); }
.composer textarea:focus { border-color: var(--ember); outline: none; box-shadow: 0 0 0 3px var(--accent-bg); }
.composer #attachbtn { min-height: 44px; }
.attachment-area { flex: none; padding: 6px 14px; border-top: 1px solid var(--line); min-width: 0; }
.attachment-help { color: var(--faint); font-size: 12px; }
.attachment-status { color: var(--bad); font-size: 12.5px; overflow-wrap: anywhere; }
.attachment-drafts { max-height: min(150px, 22dvh); overflow-y: auto; }
.attachment-draft { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.attachment-draft > :first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12.5px; }
.message-attachment { display: block; margin: 4px 0; overflow-wrap: anywhere; }
.message-attachment img { display: block; max-width: 100%; max-height: 180px; border-radius: var(--r-xs); object-fit: contain; }
.attachment-draft img { max-height: 56px; }
@media (max-width: 599px) {
  .composer textarea { flex-basis: calc(100% - 88px); }
  .composer #sendbtn { margin-left: auto; }
}

/* ───────────────────────────── desktop shell (≥ 900 px) ───────────────────────────── */
@media (min-width: 900px) {
  body { padding-bottom: 0 !important; }
  .wrap { padding-top: 22px; }
  .pane { position: relative; display: grid; grid-template-columns: var(--nav-width, 224px) minmax(0, 1fr) 56px;
    max-width: none; width: 100%; margin: 0; padding: 0;
    height: calc(100dvh - var(--stage-height, 0px)); grid-template-rows: minmax(0, 1fr); overflow: hidden; }
  body.sheet-open .pane { grid-template-columns: var(--nav-width, 224px) minmax(0, 1fr) var(--chat-width, 43vw); }
  .pane.nav-closed { grid-template-columns: 56px minmax(0, 1fr) 56px; }
  body.sheet-open .pane.nav-closed { grid-template-columns: 56px minmax(0, 1fr) var(--chat-width, 43vw); }
  .navigation-panel { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }
  .nav-closed .navigation-panel { padding: 14px 8px; }
  .navtoggle { width: 40px; min-height: 36px; padding: 0; }
  .navigation-divider { display: block; position: absolute; left: calc(var(--nav-width, 224px) - 4px);
    top: 0; bottom: 0; width: 9px; cursor: col-resize; touch-action: none; z-index: 25; }
  .nav-closed .navigation-divider { display: none; }
  .navigation-divider:hover, .navigation-divider.dragging, .navigation-divider:focus-visible { background: rgba(228,87,46,.35); }
  body.sheet-open .chat-divider { display: block; position: absolute; left: -4px; top: 0; bottom: 0;
    width: 9px; cursor: col-resize; touch-action: none; z-index: 25; }
  .chat-divider:hover, .chat-divider.dragging, .chat-divider:focus-visible { background: rgba(228,87,46,.35); }
  .task-center { min-width: 0; overflow-y: auto; padding: 0 20px; container-type: inline-size; container-name: center; }
  /* no cap: the record fills whatever the list and the thread leave free (his ask, 19 Oct 2026) */
  .main { min-width: 0; max-width: none; }
  /* cards span the width; running text keeps a readable measure (his choice, 19 Oct 2026) */
  .main p { max-width: 110ch; }
  .pane .topbar { top: 0; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0 -20px; padding: 12px 20px; }
  .pane .dock { position: relative; margin: 0; min-width: 0; height: 100%; }
  .pane .side { height: 100%; border: 0; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
  .pane .sheethandle { border-bottom: 1px solid var(--line); min-height: 65px; }
  .pane .sheetbody { flex: 1; min-height: 0; }
  .pane .msgs { flex: 1; min-height: 0; max-height: none; padding-top: 18px; }
  .pane .composer { flex: none; }
  body:not(.sheet-open) .pane .sheethandle { height: 100%; flex-direction: column; padding: 16px 8px; justify-content: flex-start; }
  body:not(.sheet-open) .pane .sheethandle .last { display: none; }
  body:not(.sheet-open) .pane .sheethandle .ttl { writing-mode: vertical-rl; }
  .ask { font-size: 32px; line-height: 1.15; }
  .ask.long { font-size: 25px; line-height: 1.25; }
  .ask.plain { font-size: 28px; }
}
/* a narrow record column (the thread open on a laptop): labels give way first */
@container center (max-width: 700px) {
  .topbar .search .lbl, .topbar .search kbd, .topbar .flag .lbl { display: none; }
  .topbar .search.tb { min-width: 0; }
}
@container center (max-width: 560px) {
  .topbar .nextun .lbl, .topbar .secname { display: none; }
}
/* the thread open on a 900-1100 px screen: Overview (the list's brand) and the
   palette (Ctrl K, the list's search) are one step away, Previous / Next stay */
@container center (max-width: 440px) {
  .topbar .homebtn, .topbar .search { display: none; }
  .pane .topbar { gap: 4px; flex-wrap: nowrap; }
}

/* ───────────────────────────── narrower than 900 px: drawer + bottom thread ───────────── */
@media (max-width: 899px) {
  .pane { max-width: none; padding: 0 16px; }
  .topbar { padding-left: 52px; }
  .topbar .homebtn { display: none; }
  /* the list toggle sits in the topbar's first slot; the list opens as a drawer */
  .navigation-panel { position: sticky; top: var(--stage-height, 0px); height: 0; z-index: 56; padding: 0; background: none; }
  .navtoggle { position: absolute; left: 0; top: 12px; width: 40px; min-height: 40px; height: 40px; padding: 0; z-index: 2;
               background: var(--card); border-color: var(--line); color: var(--ink); border-radius: var(--r-s); }
  .navtoggle:hover { background: var(--sunk); border-color: var(--rule); color: var(--ink); }
  .navigation-content { display: none; }
  .pane:not(.nav-closed) .navigation-content {
    display: flex; position: fixed; z-index: 1; top: var(--stage-height, 0px); left: 0; bottom: 0;
    width: min(86vw, 340px); overflow-y: auto; margin: 0; padding: 64px 14px 24px 14px;
    background: var(--side-bg); border-right: 1px solid var(--side-line); box-shadow: var(--shadow-pop); }
  .pane:not(.nav-closed) .navtoggle { position: fixed; left: 16px; top: calc(var(--stage-height, 0px) + 12px);
    background: var(--side-active); border-color: var(--side-line); color: var(--side-ink); }
  .pane:not(.nav-closed) .nav-backdrop { display: block; position: fixed; z-index: 55; top: var(--stage-height, 0px);
    left: 0; right: 0; bottom: 0; background: var(--scrim); }
  .pane .dock { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; margin: 0; }
  .pane .side { box-shadow: 0 -8px 24px -18px rgba(40,30,20,.35); }
  body.sheet-open { overflow: hidden; }
  body.sheet-open .pane .dock { top: var(--stage-height, 0px); height: calc(100dvh - var(--stage-height, 0px)); }
  body.sheet-open .pane .side { height: 100%; display: flex; flex-direction: column; }
  body.sheet-open .pane .sheetbody { flex: 1; min-height: 0; }
  body.sheet-open .pane .msgs { flex: 1; min-height: 0; max-height: none; }
  .chat-return { display: block; margin: 8px 12px; align-self: flex-start; }
  body.sheet-open .task-center, body.sheet-open .navigation-panel { visibility: hidden; }
}

/* ───────────────────────────── phone (≤ 600 px) ───────────────────────────── */
@media (max-width: 600px) {
  body { font-size: 14px; }
  .wrap { padding: 10px 16px 28px; }
  .topbar { gap: 6px; padding-top: 12px; padding-bottom: 10px; }
  .topbar .secname, .topbar .projtag, .topbar .lbl, .topbar kbd { display: none; }
  .topbar .btn.small { min-width: 40px; padding: 6px 9px; }
  .topbar .search.tb { min-width: 0; }
  .rhead { padding: 16px 16px 18px; border-radius: 18px; }
  .ask { font-size: 22px; line-height: 1.22; }
  .ask.long { font-size: 18px; line-height: 1.3; }
  .ask.plain { font-size: 21px; }
  .strip { margin-top: 10px; }
  .badges { margin-top: 8px; }
  /* the date gets its own line: a client name and "in 5 d" cannot share one at 390 */
  .strip .sep:nth-last-child(2) { display: none; }
  .strip .when { flex-basis: 100%; }
  /* the six widgets become one scrollable chip row (weak point 3 of B) */
  .hl-wrap { margin-top: 12px; }
  .highlights { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
                margin: 0 -16px; padding: 0 16px 2px; }
  .highlights::-webkit-scrollbar { display: none; }
  .widget { flex: none; display: flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px; white-space: nowrap;
            box-shadow: none; max-width: 76vw; border-radius: 999px; }
  .widget > .wi { width: 26px; height: 26px; margin: 0; }
  .widget > .wi .icon { width: 14px; height: 14px; }
  .widget .wl { font-size: 12px; }
  .widget .wv { font: 650 13.5px/1.3 var(--sans); margin: 0; }
  .widget .ws, .widget .meter { display: none; }
  .widget.timew .wl { display: none; }
  /* a chip: the pencil closes it instead of the padding, so it barely grows */
  .widget.editable { padding-right: 3px; }
  .fe-pencil { position: relative; top: auto; right: auto; width: 26px; height: 26px; flex: none; border-radius: 50%; }
  .fe-pencil .icon { width: 13px; height: 13px; }
  .fedit { padding: 12px; }
  .fe-input { max-width: none; flex-basis: 100%; }
  .timeline .tl-text { font: 650 13.5px/1.3 var(--sans); margin: 0; white-space: nowrap; }
  /* segmented tabs */
  .rbody { margin-top: 14px; }
  .rtab { padding: 6px 4px; font-size: 13px; }
  /* Long answers flow with the page, rather than hiding the task and last
     choice inside a fixed, height-capped overlay with a second scrollbar. */
  .answer-area { position: static; margin: 18px 0 0; max-height: none; overflow: visible; padding: 0; }
  .answer-area .rec { display: none; }
  .recnote.dup { display: block; }
  .actionbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0; }
  .actionbar.decision-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actionbar .act[data-a="option"], .actionbar .act.isrec, .decision-actions .act[data-a="yes"] { grid-column: 1 / -1; }
  .act { min-height: 46px; padding: 7px 10px; gap: 8px; align-items: center; border-radius: var(--r-s); box-shadow: none; }
  .act .k { width: 22px; height: 22px; }
  .act .t { font-size: 13.5px; padding-top: 0; }
  .act .action-detail, .act .option-text { font-size: 13px; }
  .act .rtag { display: none; }
  .actionbar.many { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* phone decisions: one full-width row per choice (Isidoro, 19 Oct 2026 — three
     narrow columns broke words and pushed E out of the sheet) */
  .actionbar.decision-actions { grid-template-columns: 1fr; gap: 6px; }
  .decision-actions .act { min-height: 0; padding: 8px 10px; align-items: flex-start; }
  .decision-actions .act .t { overflow-wrap: break-word; }
  .decision-actions .act:not([data-a="yes"]) .action-detail { font-size: 12.5px; line-height: 1.4; }
  /* Full consequences stay readable with normal page scrolling. */
  .decision-actions .act:not([data-a="yes"]) .action-title { font-size: 13.5px; }
  .answerbar > .state, .answerbar > .failed-wrap > .state { margin: 0; max-height: 40vh; overflow-y: auto; }
  .answerbar > .failed-wrap > .state { max-height: 22vh; }
  /* while a note is open the bar keeps only the picked tile: Cancel brings the rest back */
  .answerbar:has(> .notebox) .actionbar .act:not(.on) { display: none; }
  .answerbar:has(> .notebox) .actionbar { grid-template-columns: 1fr; }
  .notebox { margin-top: 8px; padding: 10px; }
  .options li { grid-template-columns: 26px 1fr; gap: 9px; padding: 10px 12px; line-height: 1.5; }
  .wrap > .card { padding: 18px 16px; }
}

/* ───────────────────────────── palette and help ───────────────────────────── */
.palette-back, .help-back { position: fixed; inset: 0; z-index: 66; background: var(--scrim);
  display: flex; align-items: flex-start; justify-content: center; padding: 10vh 14px 14px; }
.palette, .helpbox { width: 100%; max-width: 600px; background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; max-height: 76vh; min-height: 0; }
#palette-input { font: inherit; font-size: 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  color: var(--ink); padding: 16px 18px; outline: none; border-radius: var(--r) var(--r) 0 0; }
.pal-list { overflow-y: auto; padding: 6px; min-height: 0; }
.pal-group { font-size: 12.5px; font-weight: 700; color: var(--faint); padding: 10px 12px 4px; }
.pal-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; width: 100%; text-align: left; color: var(--ink);
  background: transparent; border: 0; border-radius: var(--r-s); padding: 9px 12px; cursor: pointer; min-height: 42px; }
.pal-item.on { background: var(--accent-bg); }
.pal-item .pt { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-item .ps { grid-column: 1; font-size: 12.5px; color: var(--faint); }
.pal-item kbd { grid-column: 2; grid-row: 1; align-self: center; }
.pal-foot { font-size: 12.5px; color: var(--faint); padding: 10px 16px; border-top: 1px solid var(--line); }
.helpbox { padding: 22px; gap: 12px; max-width: 520px; overflow-y: auto; }
.helpbox h3 { font-size: 18px; }
.keys { margin: 0; display: grid; gap: 0; }
.krow { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.krow dt { font-weight: 700; font-variant-numeric: tabular-nums; }
.krow dd { margin: 0; color: var(--muted); }
#help-close { align-self: flex-end; }

/* ───────────────────────────── sign-in (MISSION-login) ─────────────────────────────
   /login is standalone (no app.js) and reuses the palette and fonts above, so
   light and dark follow the OS like the app. No external asset. */
.login-page { min-height: 100vh; min-height: 100dvh;
  background: radial-gradient(900px 480px at 85% -10%, color-mix(in srgb, var(--ember) 14%, transparent), transparent 70%), var(--bg); }
.login { min-height: 100vh; min-height: 100dvh; display: flex; align-items: flex-start; justify-content: center;
  padding: max(12vh, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); }
.login-card { width: 100%; max-width: 380px; display: grid; gap: 16px; }
.login-brand { text-align: center; margin-bottom: 14px; display: grid; justify-items: center; gap: 2px; }
.login-brand .logo { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; margin-bottom: 14px;
  background: var(--ember); color: #fffaf5; font: 700 17px/1 var(--display); letter-spacing: .02em;
  box-shadow: 0 10px 22px -12px rgba(228,87,46,.9), inset 0 1px 0 rgba(255,255,255,.25); }
.wordmark { font: 650 32px/1.1 var(--display); letter-spacing: -.02em; color: var(--ink); }
.login-sub { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.login-field { display: grid; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.login-field input { font: inherit; font-size: 16px; font-weight: 500; color: var(--ink);
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-s);
  padding: 12px 14px; min-height: 48px; width: 100%; }
.login-field input:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px var(--accent-bg); }
.login-submit { margin-top: 6px; min-height: 48px; font-size: 14px; }
.login-error { margin: 0; padding: 10px 14px; border-radius: var(--r-s); font-size: 14px; font-weight: 650;
  color: var(--bad); background: var(--bad-bg); }
@media (min-width: 700px) {
  .login { align-items: center; padding-top: 24px; }
  .login-card { max-width: 420px; padding: 40px 38px 36px; background: var(--card);
    border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
  .wordmark { font-size: 36px; }
}

/* 19 Oct 2026 (Isidoro): the sign-in page follows agency-unknown.co in both
   themes: ink #0D0D0D page, #161616 card, the AGENCY / UNKNOWN logo, lime Sign in. */
body.login-page {
  --bg: #0d0d0d; --ink: #f5f5f3; --muted: #a8a8a4; --faint: #8a8a86;
  --card: #161616; --line: rgba(255,255,255,.07); --rule: rgba(255,255,255,.14);
  --accent: #e8ff47; --on-accent: #0d0d0d; --ember: #e8ff47; --btn-glow: none;
  --accent-bg: rgba(232,255,71,.18); --accent-edge: rgba(232,255,71,.45);
  --bad: #f2786a; --bad-bg: rgba(242,120,106,.14); --shadow: 0 24px 48px -28px rgba(0,0,0,.9);
  background: #0d0d0d; color: #f5f5f3; color-scheme: dark;
}
.login-mark { font-size: 30px; letter-spacing: .12em; margin: 0; }
.login-page .login-sub { margin-top: 12px; }
.login-page .login-field input { background: #1f1f1f; }
@media (min-width: 700px) { .login-mark { font-size: 34px; } }

/* signed-in operator + Sign out (app auth mode only) */
.signout { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; font-size: 13.5px; color: var(--muted); }
.signout .as b { color: var(--ink); font-weight: 700; }
.signout .linkbtn { text-decoration: underline; text-underline-offset: 2px; }
.signout .linkbtn.quiet { color: var(--faint); font-weight: 600; }
.wrap > .signout, .tbody > .signout { justify-content: center; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ───────────────────────────── version history (MISSION-history) ───────────────────────────── */
.hbody { min-width: 0; }
.hlist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.hentry { border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 14px; background: var(--card); min-width: 0;
          box-shadow: var(--shadow-s); }
.hentry.latest { border-color: var(--accent-edge); }
.hhead { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13.5px; }
.hv { font-weight: 800; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.hwhen { color: var(--muted); font-variant-numeric: tabular-nums; }
.hnow { font-size: 12px; font-weight: 700; background: var(--accent-bg); color: var(--accent-ink); border-radius: 999px; padding: 0 8px; }
.hwho { font-size: 13.5px; color: var(--muted); margin-top: 1px; }
.hwho b { color: var(--ink); font-weight: 700; }
.hnote, .hbase, .hmuted { font-size: 13px; color: var(--faint); margin: 4px 0 0; overflow-wrap: anywhere; }
.hbase { font-style: italic; }
.hbad { color: var(--bad); }
.hchanges { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 5px; font-size: 14px; }
.hch, .hplan li { overflow-wrap: anywhere; min-width: 0; }
.hf { font-weight: 700; }
.hold { color: var(--muted); }
.hnew { color: var(--ink); font-weight: 600; }
.harrow { color: var(--faint); }
.hch.full .hold, .hch.full .hnew { white-space: pre-wrap; }
.linkbtn.hexp, .linkbtn.hview { padding: 2px 0 2px 8px; font-size: 13px; }
.linkbtn.hview { padding-left: 0; }
.hbodyline { margin-top: 8px; font-size: 13.5px; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.htext { white-space: pre-wrap; overflow-wrap: anywhere; font: 500 13.5px/1.5 var(--sans); background: var(--sunk);
  color: var(--ink); border-radius: var(--r-xs); padding: 10px 12px; max-height: 280px; overflow: auto; margin: 6px 0 8px; }
.hacts { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.hmodal-back { position: fixed; inset: 0; z-index: 65; background: var(--scrim);
  display: flex; align-items: flex-end; justify-content: center; }
.hmodal { background: var(--card); color: var(--ink); width: 100%; max-width: 560px; max-height: 86vh; overflow: auto;
  border-radius: var(--r) var(--r) 0 0; padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  border: 1px solid var(--line); box-shadow: var(--shadow-pop); }
.hmodal h3 { font-size: 19px; margin-bottom: 4px; }
.hmeta { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; }
.hplan { list-style: none; padding: 0; margin: 6px 0 14px; display: grid; gap: 6px; }
.hplan li { border: 1px solid var(--line); border-radius: var(--r-xs); padding: 8px 12px; font-size: 14px; }
.hplan.hnr li { color: var(--muted); font-size: 13.5px; }
.hwarn { background: var(--info-bg); color: var(--info); border-radius: var(--r-xs); padding: 10px 12px; font-size: 13.5px; margin: 0 0 12px; }
.hwarn.err { background: var(--bad-bg); color: var(--bad); }
.hbodynote { border-top: 1px solid var(--line); padding-top: 10px; font-size: 13.5px; color: var(--muted); }
.hbodynote p { margin: 0 0 4px; }
.hmbtns { justify-content: flex-end; margin-top: 16px; }
@media (min-width: 600px) {
  .hmodal-back { align-items: center; padding: 24px; }
  .hmodal { border-radius: var(--r); padding: 24px; }
}

/* ───────── MISSION-portal (22 Oct 2026): the project portal and the header link ─────────
   The bare URL lists one large tile per project; /p/<slug> is the app scoped to
   it. Logos are self-hosted ink marks (dark on transparent); on a dark ground
   (dark theme, the charcoal rail) they are inverted to cream. AU is an opaque
   lime square and reads on both. */
.ptiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
.ptile, .infra-tile {
  display: grid; grid-template-rows: 84px auto; gap: 16px; align-content: start; position: relative;
  padding: 22px 22px 20px; min-height: 196px; color: var(--ink); text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.ptile:hover, .infra-tile:hover { border-color: var(--rule); transform: translateY(-1px); }
.ptile:focus-visible, .infra-tile:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.ptile .tgo, .infra-tile .tgo { position: absolute; right: 20px; top: 20px; }
.plogo { display: flex; align-items: center; justify-content: flex-start; min-width: 0; height: 84px; }
.plogo img { display: block; max-width: min(100%, 220px); max-height: 72px; width: auto; height: auto; object-fit: contain; }
.plogo.l-fuel img { max-height: 84px; }
.plogo.l-au img { width: 72px; height: 72px; border-radius: 16px; }
.plogo .icon, .plogo .pinit { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 18px;
  background: var(--well); color: var(--ink); font: 700 26px/1 var(--display); }
.plogo .icon { padding: 18px; box-sizing: border-box; }
.ptext { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pname { font: 650 20px/1.2 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.pcounts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); }
.pcounts b { color: var(--ink); font: 700 16px/1 var(--display); font-variant-numeric: tabular-nums; }
.pcounts .pd.late b { color: var(--s-overdue); }
.pcounts .pnone { color: var(--muted); font-weight: 600; }
.pnotice { margin: 22px 0 0; padding: 12px 16px; border-radius: var(--r-s); background: var(--bad-bg); color: var(--bad);
  font-weight: 650; }
.pscope { margin: 18px 0 0; font-size: 13.5px; color: var(--muted); }
.portal .tfoot { margin-top: 26px; }

/* the active project, where the pills were: a link back to the portal */
.projhome { display: inline-flex; align-items: center; gap: 10px; min-height: 38px; padding: 3px 12px 3px 6px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  text-decoration: none; font: 650 13.5px/1 var(--sans); flex: none; }
.projhome:hover { background: var(--sunk); border-color: var(--rule); }
.projhome:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.projhome .pn { padding-left: 8px; white-space: nowrap; }
.projhome .pn.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; }
.projhome .plogo.sm { height: 30px; padding-left: 6px; }
.projhome .plogo.sm img { height: 24px; width: auto; max-width: none; max-height: none; }
.projhome .plogo.sm.l-fuel img { height: 30px; }
.projhome .plogo.sm.l-fom img { height: 22px; }
.projhome .plogo.sm.l-au img { width: 28px; height: 28px; border-radius: 7px; }
.projhome .plogo.sm.l-au { padding-left: 0; }
.projhome .pswitch { color: var(--muted); font-weight: 600; font-size: 12.5px; padding-left: 10px;
  border-left: 1px solid var(--rule); white-space: nowrap; }
.projhome .pswitch::before { content: '‹ '; }
.navigation-content .projhome { margin: 2px 0; align-self: flex-start; max-width: 100%; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .plogo.l-ironman img,
  :root:not([data-theme="light"]) .plogo.l-fuel img,
  :root:not([data-theme="light"]) .plogo.l-fom img,
  :root:not([data-theme="light"]) .plogo.l-mm img { filter: invert(1); }
}
:root[data-theme="dark"] .plogo.l-ironman img,
:root[data-theme="dark"] .plogo.l-fuel img,
:root[data-theme="dark"] .plogo.l-fom img,
:root[data-theme="dark"] .plogo.l-mm img,
.navigation-content .plogo.l-ironman img,
.navigation-content .plogo.l-fuel img,
.navigation-content .plogo.l-fom img,
.navigation-content .plogo.l-mm img { filter: invert(1); }

@media (max-width: 899px) {
  .ptiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .ptiles { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 18px; }
  .ptile, .infra-tile { grid-template-rows: 64px auto; min-height: 0; padding: 18px; gap: 12px; border-radius: 18px; }
  .plogo { height: 64px; }
  .plogo img { max-height: 54px; max-width: min(100%, 200px); }
  .plogo.l-fuel img { max-height: 64px; }
  .plogo.l-au img, .plogo .icon, .plogo .pinit { width: 56px; height: 56px; border-radius: 14px; }
  .plogo .icon { padding: 14px; }
  .pname { font-size: 18px; }
}

/* ───────────────────────────── client tabs: Plan · Dashboard (MISSION-plan, 23 Oct 2026) ─────────────────────────────
   A tab bar under the header of /p/<slug> for clients with a plan: Tasks · Plan · Dashboard. It sticks under
   the staging bar and scrolls sideways on the phone. Plan = phase strip, KPI cards by lane with their actions,
   dependencies and docs aside (below on narrow screens). Dashboard = a shell over the KPI export. */
.ptabs { position: sticky; top: var(--stage-height, 0px); z-index: 32; background: var(--glass);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.ptin { display: flex; gap: 6px; padding-top: 8px; padding-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
.ptin::-webkit-scrollbar { display: none; }
.ptab { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none; border: 1px solid transparent; white-space: nowrap; }
.ptab:hover { color: var(--ink); background: var(--well); }
.ptab.on { color: var(--on-accent); background: var(--accent); box-shadow: var(--btn-glow); }
.ptab:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
/* the overview's filter bar sits under the tabs when both stick */
.ptabs ~ .fbar { top: calc(var(--stage-height, 0px) + 57px); }
.mast.slim { padding: 16px 0 18px; }
.mast.slim .mhero { margin-top: 10px; }
.mast.slim .mhero h1 { font-size: 30px; }
.mast .projhome.in-ctab { color: var(--ink); text-decoration: none; }
.mast .projhome.in-ctab .plogo img { filter: invert(1); }
.cbody { padding-top: 4px; }
.cfresh { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pwarn { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--r-s); background: var(--flag-bg); color: var(--flag); font-weight: 600; }

/* status pills */
.spill { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700;
  white-space: nowrap; background: var(--stone-bg); color: var(--muted); }
.spill.st-ok { background: var(--ok-bg); color: var(--ok); }
.spill.st-info { background: var(--info-bg); color: var(--info); }
.spill.st-flag { background: var(--flag-bg); color: var(--flag); }
.spill.st-bad { background: var(--bad-bg); color: var(--bad); }

/* links to Notion rows */
.nlink, .kname, .aname, .phname { color: var(--ink); text-decoration: none; font-weight: 700; overflow-wrap: anywhere; }
a.nlink:hover, a.kname:hover, a.aname:hover, a.phname:hover { text-decoration: underline; text-underline-offset: 2px; }

/* folds */
.pfold { margin-top: 8px; }
.pfold > summary { cursor: pointer; font-weight: 700; color: var(--accent-ink); font-size: 13.5px; width: max-content;
  list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.pfold > summary::-webkit-details-marker { display: none; }
.pfold > summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s ease; }
.pfold[open] > summary::before { transform: rotate(45deg); }
.pfin { padding: 6px 0 2px 13px; border-left: 2px solid var(--line); margin-top: 4px; }
.ppara + .ppara { margin-top: 8px; }
.ppara b { font-size: 12.5px; color: var(--muted); }
.ppara p, .kformula { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.clamp { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); }
.clamp.open { display: block; -webkit-line-clamp: unset; }
.morebtn { font-size: 12.5px; padding: 2px 0; }

/* phase strip */
.phasebar { margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 16px 18px; }
.pcur .plabel { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.pcur .pname { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font: 650 20px/1.3 var(--display); margin-top: 2px; }
.pmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.ptimeline { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(120px, 1fr);
  gap: 6px; overflow-x: auto; scrollbar-width: thin; }
.ph { min-width: 0; font-size: 12.5px; }
.ph .phname { display: block; font-weight: 700; font-size: 13px; }
.ph .phst { display: block; color: var(--muted); }
/* phases as chevrons (24 Oct 2026): done = green ✓, current = accent, next = outlined */
.pchev { grid-auto-columns: minmax(118px, 1fr); gap: 0; padding-bottom: 4px; }
.pchev .ph { display: flex; flex-direction: column; gap: 6px; }
.pchev .chv { --cb: var(--stone-bg); --cf: var(--muted); position: relative; display: flex; align-items: center; justify-content: center;
  gap: 5px; height: 40px; padding: 0 14px 0 24px; background: var(--cb); color: var(--cf); margin-right: -6px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%); }
.pchev .ph:first-child .chv { padding-left: 14px; border-radius: 10px 0 0 10px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); }
.pchev .ph:last-child .chv { margin-right: 0; }
.pchev .chv .phname { color: inherit; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pchev .ph.done .chv { --cb: var(--ok-bg); --cf: var(--ok); }
.pchev .ph.past .chv { --cb: var(--stone-bg); --cf: var(--muted); }
.pchev .ph.cur .chv { --cb: var(--ember); --cf: #fff; height: 46px; margin-top: -3px; }
.pchev .ph.cur .chv .phname { font-size: 14px; }
.pchev .ph.next .chv { --cf: var(--muted); }
.pchev .ph.next .chv { background: repeating-linear-gradient(135deg, var(--stone-bg) 0 6px, transparent 6px 12px); }
.pchev .chk { font-weight: 800; font-size: 13px; }
.pchev .phst { padding-left: 16px; font-size: 12px; }
.pchev .ph.cur .phst { color: var(--accent-ink); font-weight: 700; }
.pchev .ph.done .phst { color: var(--ok); }

/* the plan's layout: KPIs, and dependencies + docs aside */
.pgrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.pside { position: sticky; top: calc(var(--stage-height, 0px) + 72px); display: flex; flex-direction: column; gap: 14px; margin-top: 26px; }
.plane { margin-top: 26px; }
.plane > .tsh { display: flex; align-items: center; gap: 10px; font: 650 20px/1.25 var(--display); cursor: default;
  --sc: var(--ember); border-left: 4px solid var(--sc); }
.plane[data-lane="Structural"] > .tsh { --sc: var(--iris); }
.plane[data-lane=""] > .tsh, .ploose > .tsh { --sc: var(--stone); }
.pempty { margin-top: 26px; }
.kcard { margin-top: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 0; scroll-margin-top: calc(var(--stage-height, 0px) + 72px); }
.kbody { padding: 0 18px 16px; }
.khead { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.khead h3 { font: 650 18px/1.3 var(--display); min-width: 0; }
/* plan folds: KPI cards and side boxes open from a real button */
.ktog, .pboxtog { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: flex; align-items: center; gap: 8px 14px;
  flex-wrap: wrap; padding: 14px 44px 14px 18px; position: relative; border-radius: var(--r); min-height: 52px; }
.ktog:focus-visible, .pboxtog:focus-visible { outline: 2px solid var(--accent-edge, var(--ember)); outline-offset: 2px; }
.ktog:hover, .pboxtog:hover { background: var(--stone-bg); }
.ktog .ktitle { flex: 1 1 260px; font: 650 17px/1.3 var(--display); }
.kline { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.kmini { font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.kmini .kmt { color: var(--accent-ink); }
.kchev { position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s ease; }
.open > .ktog .kchev, .open > .pboxtog .kchev { transform: rotate(-135deg); margin-top: -2px; }
.kcard.open > .ktog { border-radius: var(--r) var(--r) 0 0; }
.kplain { margin-top: 2px; padding: 12px 14px; background: var(--accent-bg); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; }
.kplain p { margin: 0; line-height: 1.5; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; }
.kplain .kpl { font-size: 12.5px; font-weight: 700; color: var(--muted); padding-top: 1px; }
.kplain .kpt b { font-weight: 750; color: var(--ink); }
.kplain .kstale { display: block; font-size: 12px; color: var(--muted); }
.knotion { margin-top: 8px; min-height: 32px; display: inline-flex; align-items: center; font-size: 13.5px; }
.pbox { padding: 0 !important; }
.pboxtog { padding: 12px 40px 12px 16px; min-height: 46px; }
.pboxtog h3 { margin: 0; }
.pboxbody { padding: 0 16px 12px; }
.kobj { margin: 4px 0 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbt { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; }
.kv { display: flex; flex-direction: column; min-width: 0; }
.kv small { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.kv b { font: 650 28px/1.1 var(--display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kv b.ktarget { color: var(--accent-ink); }
.kv i { font-style: normal; font-size: 12.5px; color: var(--muted); }
.kv .kperiod { max-width: 62ch; font-size: 12.5px; }
.karrow { font: 650 24px/1 var(--display); color: var(--faint); }
.kmeta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; font-size: 13px; }
.kmeta div { min-width: 0; }
.kmeta dt { color: var(--muted); font-size: 12.5px; font-weight: 650; }
.kmeta dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.kchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.kchip { background: var(--chip); border-radius: 7px; padding: 1px 8px; font-size: 12.5px; font-weight: 700; }
.kfolds { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 18px; margin-top: 4px; }
.kfolds .pfold[open] { flex-basis: 100%; }
.ktrend { margin-top: 8px; min-height: 32px; display: inline-flex; align-items: center; text-decoration: none; }
.kacts { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.kacts h4 { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.alist { list-style: none; margin: 0; padding: 0; }
.arow { padding: 10px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.kacts h4 + .alist .arow:first-child, .kcard > .alist .arow:first-child { border-top: 0; }
/* 2 Nov 2026 (Isidoro: "el texto está muy pegado al borde"): a list straight inside a card (Actions with no KPI)
   gets the card's inner margin; inside a KPI card the list already sits in the padded body */
.kcard > .alist { padding: 6px 22px 8px; }
.kcard > .alist .arow { padding: 14px 0; }
@media (max-width: 600px) { .kcard > .alist { padding: 4px 16px 6px; } }
.atop { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.atype { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.adates { margin: 0; font-size: 12.5px; color: var(--muted); }
.aresult { margin: 0; font-size: 13px; }
.pnone { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.pbox { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; }
.pbox h3 { font: 650 16px/1.3 var(--display); }
.plist { list-style: none; margin: 6px 0 0; padding: 0; }
.plist li { padding: 9px 0; border-top: 1px solid var(--line); }
.plist li:first-child { border-top: 0; }
.pblocks { margin-top: 4px; font-size: 13px; }
.pclient { margin: 0; font-size: 13px; }

/* KPI card v3 (25 Oct 2026): tiles, chart, status bar, facts */
.kico { display: inline-flex; width: 18px; height: 18px; flex: none; color: var(--muted); }
.kico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ktog .ktbox { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ktog .ktbox .ktitle { flex: none; }
.ksub { font-size: 12.5px; color: var(--muted); font-weight: 500; line-height: 1.35; }
.ktrack { position: relative; height: 8px; border-radius: 99px; background: var(--stone-bg); overflow: hidden; width: 84px; flex: none; }
.ktrack .ktfill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--ember); border-radius: 99px; }
.ktrack.done .ktfill { background: var(--ok); }
.ktrack.behind { background: var(--bad-bg); box-shadow: inset 0 0 0 1px var(--bad); }
.ktends .kcur.behind { color: var(--bad); }
.ktends .kcur.done { color: var(--ok); }
.ktrack.nocur, .ktrack.noscale { background: repeating-linear-gradient(135deg, var(--stone-bg) 0 5px, transparent 5px 9px); box-shadow: inset 0 0 0 1px var(--line); }
.ktrack.big { width: 100%; height: 14px; margin-top: 14px; }
.ktrack.big::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 3px; background: var(--accent-ink); }
.kgapchip { font-weight: 750; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.kdl { white-space: nowrap; }
.kdl.late, .kdays.late b { color: var(--bad); }
.kcard .kplain { margin-top: 2px; padding: 0; background: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kplain .kp { --kc: var(--ember); --kb: var(--accent-bg); margin: 0; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px;
  background: var(--kb); border-radius: 12px; border-top: 3px solid var(--kc); line-height: 1.5; }
.kplain .kp-how { --kc: var(--iris); --kb: var(--info-bg, var(--stone-bg)); }
.kplain .kp-stop { --kc: var(--bad); --kb: var(--bad-bg); }
.kplain .kp .kico { color: var(--kc); width: 20px; height: 20px; }
.kplain .kp .kpl { font-size: 12.5px; font-weight: 750; color: var(--ink); padding: 0; }
.kplain .kp .kpt { font-size: 14px; color: var(--ink); }
.kplain .kstale { grid-column: 1 / -1; }
.kviz { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.kviz .kbt { margin-top: 0; gap: 8px 22px; }
.kv.kgap b, .kv.kdays b { font-size: 20px; padding-top: 6px; }
.kv.kgap b { color: var(--accent-ink); }
.ktends { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ktends .kcur { text-align: center; color: var(--ink); font-weight: 650; }
.ktends .kcur.none { color: var(--muted); font-weight: 500; font-style: italic; }
.ktends .ktt { color: var(--accent-ink); font-weight: 700; }
.kbasewhy { margin: 12px 0 0; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; font-size: 13.5px; line-height: 1.5; }
.kbasewhy .kpl { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.kbasewhy b { font-weight: 750; }
.kviz .kperiod { margin-top: 10px; font-size: 13px; }
.kaseg { margin: 8px 0 4px; }
.kasbar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; gap: 2px; }
.kas { flex: 1 1 0; min-width: 6px; background: var(--stone); }
.kas.k-run, .kasl.k-run i { background: var(--ember); }
.kas.k-meas, .kasl.k-meas i { background: var(--iris); }
.kas.k-appr, .kasl.k-appr i { background: var(--info); }
.kas.k-prop, .kasl.k-prop i { background: var(--flag); }
.kas.k-other, .kasl.k-other i { background: var(--stone); }
.kas.k-closed, .kasl.k-closed i { background: var(--ok); }
.kacts { margin-top: 16px; }
.aresult .clamp { color: var(--ink); }
.spill.astatus.k-run { background: var(--accent-bg); color: var(--accent-ink); }
.spill.astatus.k-meas { background: var(--info-bg); color: var(--iris); }
.spill.astatus.k-appr { background: var(--info-bg); color: var(--info); }
.spill.astatus.k-prop { background: var(--flag-bg); color: var(--flag); }
.spill.astatus.k-closed { background: var(--ok-bg); color: var(--ok); }
.kaslegend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.kasl { display: inline-flex; align-items: center; gap: 5px; }
.kasl i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.kasl b { color: var(--ink); }
.kacts .arow .aname { font-weight: 650; }
.kfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.kfact { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--stone-bg); border-radius: 12px; min-width: 0; }
.kfact .kico { margin-top: 2px; }
.kft { min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.kft small { font-size: 12px; font-weight: 650; color: var(--muted); }
.kft b { font-weight: 650; overflow-wrap: anywhere; }
.kft .kchips { margin-top: 2px; }
.kft .clamp { color: var(--ink); }
.kfolds { margin-top: 10px; }
@media (max-width: 760px) {
  .kcard .kplain { grid-template-columns: minmax(0, 1fr); }
  .kplain .kp { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 8px; }
  .kplain .kp .kpt { grid-column: 1 / -1; }
  .kbasewhy { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kviz { padding: 12px; }
  .ktends .kcur { font-size: 12px; }
}

/* dashboard shell */
.dwait { margin-top: 22px; }
.dwait p { margin: 0 0 8px; color: var(--ink); font-weight: 650; }
.dwait .dsub { color: var(--muted); font-weight: 500; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 14px; }
.dcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px;
  scroll-margin-top: calc(var(--stage-height, 0px) + 72px); min-width: 0; }
.dcard.hit { border-color: var(--accent-edge); box-shadow: 0 0 0 2px var(--accent-edge), var(--shadow); }
.dcard h3 { font: 650 17px/1.3 var(--display); }
.dcard.dpend { box-shadow: none; background: transparent; border-style: dashed; }
.dnums { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; }
.dnum { display: flex; flex-direction: column; }
.dnum small { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.dnum b { font: 650 18px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.dnum.last b { font-size: 26px; }
.dnum i { font-style: normal; font-size: 12.5px; color: var(--muted); }
.spark { margin-top: 10px; }
.sparksvg { display: block; width: 100%; height: 72px; overflow: visible; }
.sparksvg .sline { fill: none; stroke: var(--ember); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sparksvg .ref { stroke: var(--faint); stroke-width: 1; }
.sparksvg .ref.target { stroke-dasharray: 6 4; }
.sparksvg .ref.base { stroke-dasharray: 2 3; }
.sparksvg .cross { stroke: var(--rule); stroke-width: 1; }
.slegend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.slegend .sread { margin-left: auto; color: var(--ink); font-weight: 650; }

@media (max-width: 1000px) {
  .pgrid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pside { position: static; }
}
@media (max-width: 600px) {
  .ptabs ~ .fbar { top: calc(var(--stage-height, 0px) + 55px); }
  .ptin { margin: 0; }
  .ptab { min-height: 38px; padding: 0 14px; }
  .mast.slim .mhero h1 { font-size: 24px; }
  .phasebar, .dcard { padding: 14px; border-radius: 18px; }
  .kcard { border-radius: 18px; }
  .kbody { padding: 0 14px 14px; }
  .ktog { padding: 12px 40px 12px 14px; }
  .kplain p { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kv b { font-size: 24px; }
  .plane > .tsh { font-size: 18px; }
  .dgrid { grid-template-columns: minmax(0, 1fr); }
}
.ptabs ~ .tbody .tsec, .ptabs ~ .tbody .tcard, .ptabs ~ .tbody .tback {
  scroll-margin-top: calc(var(--stage-height, 0px) + 57px + var(--fbar-h, 58px) + 14px); }
@media (max-width: 600px) {
  .mast.slim .projhome .pswitch { display: none; }
  .ptimeline.pchev { grid-auto-flow: column; grid-auto-columns: minmax(112px, 1fr); grid-template-columns: none; gap: 0; overflow-x: auto; }
}

/* ── MISSION-dev (26 Oct 2026): the Dev tab — the delivery board, then the agents ── */
.devline { justify-content: space-between; }
.devbtnwrap { display: inline-flex; }
.devframe { display: block; width: 100%; min-height: 320px; margin-top: 12px; border: 1px solid var(--line);
  border-radius: var(--r-m); background: #fff; box-shadow: var(--shadow); }
.devempty .dsub { margin: 0; color: var(--muted); font-size: 13px; }
.devagents { margin: 30px 0 48px; scroll-margin-top: calc(var(--stage-height, 0px) + 72px); }
.devagents .agother { scroll-margin-top: calc(var(--stage-height, 0px) + 72px); }
.devagents > .tsh { margin-bottom: 0; }
.devsub { margin: 4px 0 12px; color: var(--muted); font-size: 13px; }
.aggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.agcard { min-width: 0; padding: 14px 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow); }
.aghead h3 { margin: 0; font-family: var(--display); font-size: 17px; font-weight: 650; overflow-wrap: anywhere; }
.agmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.agjobs { list-style: none; margin: 10px 0 0; padding: 0; }
.agjob { min-width: 0; padding: 9px 0; border-top: 1px solid var(--line); }
.agj1 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.agname { font-weight: 700; overflow-wrap: anywhere; }
.agj2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.agstreak { color: var(--bad); font-weight: 700; }
.agerr { display: block; width: 100%; margin-top: 6px; padding: 4px 8px; border: 0; border-radius: 8px; cursor: pointer;
  font: inherit; font-size: 12.5px; text-align: left; color: var(--bad); background: var(--bad-bg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agerr.open { white-space: pre-wrap; overflow-wrap: anywhere; }
.agerr:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
/* a paused job: greyed, still readable (≥ 4.5:1) */
.agjob.paused .agname, .agjob.paused .agj2, .agjob.paused .agsched { color: var(--faint); font-weight: 600; }
.agjob.paused .agname { text-decoration: none; }
.agother { margin-top: 18px; }
.agother > summary { padding: 10px 0; cursor: pointer; font-weight: 700; }
.agother > summary:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 6px; }
.agmore { margin-top: 8px; }
@media (max-width: 600px) {
  .aggrid { grid-template-columns: minmax(0, 1fr); }
  .devframe { width: calc(100% + 32px); margin-left: -16px; margin-right: -16px; border-left: 0; border-right: 0; border-radius: 0; }
}
/* MISSION-dev: phase-aware Plan — a Draft KPI's chip, and the folded "Paused — <phase>" sections */
.kdraft { align-self: flex-start; display: inline-flex; align-items: center; margin-top: 2px; padding: 1px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--flag); background: var(--flag-bg); }
.ppaused { margin-top: 26px; background: var(--sunk); border: 1px dashed var(--rule); border-radius: var(--r); }
.ppaused > .pboxtog h2 { margin: 0; font: 650 18px/1.3 var(--display); }
.ppaused > .pboxtog .pcount { font-size: 13px; color: var(--muted); }
.ppaused > .pboxbody > .pnone { margin: 0 0 4px; }
.ppaused .ppdeps { margin: 18px 0 6px; font: 650 15px/1.3 var(--display); }

/* ───────────────────────────── Light view (MISSION-light, 27 Oct 2026) ─────────────────────────────
   The port of the Light prototype's variant B "One at a time" on the Hearth tokens above: cream canvas,
   cream-white cards, one orange accent, Manrope / Bricolage (self-hosted). Body text 18px, every tap
   target ≥ 48px, light and dark. Everything is under body.light or an .lt- class: Pro is untouched. */

/* [Light | Pro] in Pro's top band: inside the STAGING bar, or a slim band of its own when there is none */
.lt-switch.lt-band { display: inline-flex; vertical-align: middle; margin-left: 12px; gap: 2px; padding: 2px;
                     border-radius: 999px; border: 1px solid rgba(255,255,255,.7); }
.lt-switch.lt-band .lt-sw { border: 0; background: none; color: #fff; font: 700 12.5px/1 var(--sans);
                            padding: 4px 11px; border-radius: 999px; cursor: pointer; min-height: 24px; }
.lt-switch.lt-band .lt-sw.on { background: #fff; color: #b3261e; }
#modebar { position: sticky; top: 0; z-index: 60; display: flex; justify-content: flex-end; align-items: center;
           padding: 4px 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
#modebar .lt-switch.lt-band { border-color: var(--rule); }
#modebar .lt-switch.lt-band .lt-sw { color: var(--muted); }
#modebar .lt-switch.lt-band .lt-sw.on { background: var(--ink); color: var(--bg); }
body.light #progress, body.light #toast, body.light #modebar, body.light #stagebar .lt-switch { display: none !important; }
/* MISSION-focus1: [Classic | Focus] right after [Light | Pro] in the same band, the same look
   (new class only: no Classic element's style changes). In Focus, focus.css restyles it. */
.focus-switch { display: inline-flex; vertical-align: middle; margin-left: 8px; gap: 2px; padding: 2px;
                border-radius: 999px; border: 1px solid rgba(255,255,255,.7); }
.focus-switch .focus-sw { border: 0; background: none; color: #fff; font: 700 12.5px/1 var(--sans);
                          padding: 4px 11px; border-radius: 999px; cursor: pointer; min-height: 24px; }
.focus-switch .focus-sw.on { background: #fff; color: #b3261e; }
#modebar .focus-switch { border-color: var(--rule); }
#modebar .focus-switch .focus-sw { color: var(--muted); }
#modebar .focus-switch .focus-sw.on { background: var(--ink); color: var(--bg); }
/* the STAGING bar stays on top of the chat sheet and its scrim */
body.light #stagebar { z-index: 85; }
/* bus 1425: Isidoro's [Show all (N hidden)] / [Only what needs me], first in the band;
   the same pill as the switches (new class only) */
.viewall { border: 1px solid rgba(255,255,255,.7); background: none; color: #fff; font: 700 12.5px/1 var(--sans);
           padding: 5px 12px; border-radius: 999px; cursor: pointer; min-height: 26px; margin-right: 8px;
           vertical-align: middle; }
.viewall.on { background: #fff; color: #b3261e; }
#stagebar .viewall { margin-left: 10px; }
#modebar .viewall { border-color: var(--rule); color: var(--ink); margin-right: auto; }
#modebar .viewall.on { background: var(--ink); color: var(--bg); }
.lt-nav .viewall { border-color: var(--rule); color: var(--ink); font-size: 14px; min-height: 36px; margin: 0 4px; }
.lt-nav .viewall.on { background: var(--ink); color: var(--bg); }
.delta .vhidden .linkbtn { font-size: inherit; }
/* a phone: the band stays one line as before; the toggle is the masthead line (#vhidden) */
@media (max-width: 600px) { #stagebar .viewall, #modebar .viewall, .lt-nav .viewall { display: none; } }
/* Phone, Pro + Classic: [Light | Pro] [Classic | Focus] [Infra N] [bug] need 427 px and the band is
   justify-content: flex-end, so on a 390 px phone [Light] was clipped off the left edge (unreachable).
   Tighter gaps/padding fit one row down to 375 px; narrower screens wrap instead of clipping. */
@media (max-width: 600px) {
  body:not(.focus) #modebar { flex-wrap: wrap; row-gap: 4px; padding: 4px 8px; }
  body:not(.focus) #modebar > * { margin-left: 6px; }
  body:not(.focus) #modebar > .lt-switch.lt-band { margin-left: 0; }
  body:not(.focus) #modebar .lt-switch.lt-band .lt-sw, body:not(.focus) #modebar .focus-switch .focus-sw { padding: 4px 8px; }
  body:not(.focus) #modebar .infra-band { padding: 0 10px; }
}
@media (max-width: 372px) {   /* 360 px Androids: one row still (else the bug button wraps alone) */
  body:not(.focus) #modebar { padding: 4px 6px; }
  body:not(.focus) #modebar .lt-switch.lt-band .lt-sw, body:not(.focus) #modebar .focus-switch .focus-sw { padding: 4px 6px; }
}

body.light { font-size: 18px; line-height: 1.5; font-weight: 500; }
body.light :focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }
.lt-root svg.icon { width: 22px; height: 22px; }
.lt-root button, .lt-sheet-root button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lt-root h1, .lt-root h2, .lt-root h3 { text-wrap: balance; }
.lt-root p { margin: 0; text-wrap: pretty; }

/* the nav bar (MISSION-lightnav): ‹ Back · Home · Projects · [Light | Pro], one row, sticky under the STAGING bar */
.lt-top { position: sticky; top: var(--stage-height, 0px); z-index: 40; padding: 4px 8px;
          background: var(--bg); border-bottom: 1px solid var(--line); }
.lt-nav-in { display: flex; align-items: center; gap: 2px; max-width: 980px; margin: 0 auto; }
.lt-nb { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 48px; min-width: 48px;
         padding: 0 9px; border: 0; border-radius: 999px; background: none; color: var(--ink);
         font: 650 16px/1 var(--sans); white-space: nowrap; }
.lt-root .lt-nb svg.icon { width: 20px; height: 20px; flex: none; }
.lt-nb:hover:not(.off) { background: var(--well); }
.lt-nb[aria-current="page"] { background: var(--sunk); box-shadow: inset 0 0 0 1px var(--rule); }
.lt-nb.off { color: var(--muted); cursor: default; }
.lt-nav .lt-switch { margin-left: auto; flex: none; }
.lt-nav .lt-switch:not(.lt-band) .lt-sw { min-width: 52px; padding: 0 11px; }
/* MISSION-focus5: [Classic | Focus] (focus.js's focusSwitch) at the end of the bar, in [Light | Pro]'s own look,
   48 px like its neighbours. The row of controls (.lt-nav-in) is as before; the switch follows it on the same
   line when there is room (desktop), else on a line of its own under it, at the right (a phone). */
body.light .lt-top.lt-nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 8px; row-gap: 4px; }
body.light .lt-nav .lt-nav-in { flex: 0 1 980px; min-width: 0; margin: 0; }
body.light .lt-nav .focus-switch { display: flex; align-items: center; flex: none; margin: 0 0 0 auto; gap: 0; padding: 3px;
                                   border: 1px solid var(--rule); border-radius: 999px; }
body.light .lt-nav .focus-switch .focus-sw { min-height: 48px; min-width: 64px; padding: 0 14px; border: 0; border-radius: 999px;
                                             background: none; color: var(--muted); font: 650 16px/1 var(--sans); }
body.light .lt-nav .focus-switch .focus-sw.on { background: var(--ink); color: var(--bg); }
@media (max-width: 359px) {
  /* a very narrow phone: the three nav buttons keep their icon, the word is read out only */
  .lt-nb .lt-nbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* a project's mark: Pro's logo files, inverted on dark grounds like the portal's */
.lt-logo { display: inline-flex; align-items: center; flex: none; min-width: 0; }
.lt-logo img { display: block; width: auto; object-fit: contain; }
.lt-logo.big { height: 44px; max-width: 100%; }
.lt-logo.big img { max-height: 40px; max-width: 100%; }
.lt-logo.big.l-fuel img { max-height: 44px; }
.lt-logo.big.l-au img { width: 40px; height: 40px; border-radius: 10px; }
.lt-logo.small { height: 30px; }
.lt-logo.small img { max-height: 26px; max-width: 130px; }
.lt-logo.small.l-fuel img { max-height: 30px; }
.lt-logo.small.l-au img { width: 28px; height: 28px; border-radius: 7px; }
.lt-logo .icon, .lt-logo .lt-init { display: grid; place-items: center; border-radius: 12px; background: var(--well);
                                    color: var(--ink); font: 700 18px/1 var(--display); box-sizing: border-box; }
.lt-root .lt-logo.big .icon, .lt-logo.big .lt-init { width: 44px; height: 44px; padding: 10px; }
.lt-root .lt-logo.small .icon, .lt-logo.small .lt-init { width: 30px; height: 30px; padding: 6px; border-radius: 8px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lt-logo.l-ironman img,
  :root:not([data-theme="light"]) .lt-logo.l-fuel img,
  :root:not([data-theme="light"]) .lt-logo.l-fom img { filter: invert(1); }
}
:root[data-theme="dark"] .lt-logo.l-ironman img,
:root[data-theme="dark"] .lt-logo.l-fuel img,
:root[data-theme="dark"] .lt-logo.l-fom img { filter: invert(1); }

/* the picker: "Which project?", one big tile per project with ONE number */
.lt-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.lt-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 176px;
           padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); color: var(--ink);
           text-decoration: none; box-shadow: var(--shadow); -webkit-tap-highlight-color: transparent; }
.lt-tile:hover { border-color: var(--rule); }
.lt-tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; width: 100%; min-height: 44px; }
.lt-tnum { margin-top: auto; font: 750 46px/1 var(--display); letter-spacing: -.03em; color: var(--accent-ink);
           font-variant-numeric: tabular-nums; }
.lt-tname { font: 650 19px/1.2 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.lt-tsub { font-size: 16px; line-height: 1.3; color: var(--muted); }
.lt-tlast { flex: none; padding: 4px 8px; border-radius: 999px; background: var(--accent-bg); color: var(--accent-ink);
            font: 650 15px/1.1 var(--sans); white-space: nowrap; }
.lt-tile.last { border: 2px solid var(--accent); padding: 15px; }
.lt-tile.zero { background: var(--sunk); box-shadow: none; }
.lt-tile.zero .lt-tnum { color: var(--muted); }
.lt-tile.zero .lt-logo { filter: grayscale(1); opacity: .55; }
.lt-notice { margin-top: 18px; }
@media (min-width: 900px) {
  .lt-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .lt-tile { min-height: 200px; padding: 22px; }
  .lt-tile.last { padding: 21px; }
  .lt-picker .lt-hello { text-align: center; }
}

/* the project's logo + name on its home, walk and end screens */
.lt-proj { display: flex; align-items: center; gap: 10px; min-height: 36px; margin: -4px 0 14px; }
.lt-pname { font: 650 18px/1.2 var(--display); letter-spacing: -.01em; min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 900px) { .lt-home ~ .lt-proj, .lt-main > .lt-proj { justify-content: center; } }

/* a card reached with Back that is already answered */
.lt-answered { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; margin: 0 0 18px; padding: 14px;
               border-radius: var(--r-m); background: var(--ok-bg); }
.lt-answered h3 { font: 650 19px/1.3 var(--display); color: var(--ok); }
.lt-answered p { font-size: 17px; margin-top: 2px; color: var(--ink); }
.lt-acheck { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: var(--card); }
.lt-root .lt-acheck svg.icon { width: 24px; height: 24px; stroke-width: 2.4; }
.lt-switch:not(.lt-band) { display: flex; align-items: center; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; }
.lt-switch:not(.lt-band) .lt-sw { min-height: 48px; min-width: 64px; padding: 0 16px; border: 0; border-radius: 999px;
                                  background: none; color: var(--muted); font: 650 16px/1 var(--sans); }
.lt-switch:not(.lt-band) .lt-sw.on { background: var(--ink); color: var(--bg); }

.lt-main { max-width: 760px; margin: 0 auto; padding: 20px 16px 40px; overflow-x: clip; }
.lt-main.walking { padding-bottom: 0; }

/* home: greeting, three big blocks, Start */
.lt-hello h1 { font: 650 30px/1.15 var(--display); letter-spacing: -.02em; }
.lt-hello p { color: var(--muted); margin-top: 6px; font-size: 18px; }
.lt-blocks { display: grid; gap: 12px; margin-top: 22px; }
.lt-block { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 16px; width: 100%; min-height: 96px;
            padding: 16px 18px; text-align: left; border-radius: var(--r); border: 1px solid var(--line);
            background: var(--card); color: var(--ink); box-shadow: var(--shadow); font: inherit; }
.lt-block:hover { border-color: var(--rule); }
.lt-count { font: 750 40px/1 var(--display); min-width: 64px; height: 64px; border-radius: 18px; display: grid;
            place-items: center; letter-spacing: -.03em; padding: 0 8px; }
.lt-bname { display: block; font: 650 21px/1.25 var(--display); letter-spacing: -.01em; }
.lt-bsub { display: block; color: var(--muted); font-size: 17px; margin-top: 2px; }
.lt-b-decide .lt-count, .lt-chip.k-decide { background: var(--accent-bg); color: var(--accent-ink); }
.lt-b-do .lt-count, .lt-chip.k-do { background: var(--ok-bg); color: var(--ok); }
.lt-b-waiting .lt-count, .lt-chip.k-waiting { background: var(--flag-bg); color: var(--flag); }
.lt-block.empty { cursor: default; }
.lt-block.empty .lt-count { background: var(--sunk); color: var(--muted); }
.lt-start { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 76px; margin-top: 16px;
            border: 0; border-radius: var(--r-m); background: var(--accent); color: var(--on-accent); box-shadow: var(--btn-glow);
            font: inherit; }
.lt-start .lt-stack { text-align: center; }
.lt-start-l { display: block; font: 700 23px/1.2 var(--display); }
.lt-start small { display: block; font: 600 16px/1.3 var(--sans); }
.lt-done-banner { margin-top: 20px; padding: 18px 20px; border-radius: var(--r); background: var(--ok-bg); color: var(--ok); }
.lt-done-banner h2 { font-size: 24px; }
.lt-done-banner p { color: var(--ink); margin-top: 4px; }
.lt-linkish { border: 0; background: none; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px;
              font: 650 17px/1.3 var(--sans); min-height: 48px; padding: 0 6px; }
.lt-await { display: block; margin: 18px auto 0; text-align: center; }
/* MISSION-alanfix: the day cap's headline, the quiet "N more" link, Quick update under Start */
.lt-headline { margin-top: 20px; font: 650 24px/1.2 var(--display); letter-spacing: -.01em; }
.lt-headline + .lt-blocks { margin-top: 12px; }
.lt-more { display: block; margin: 10px auto 0; text-align: center; color: var(--muted); }
.lt-quick { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 64px;
            margin-top: 12px; border-radius: var(--r-m); border: 2px solid var(--rule); background: var(--card);
            color: var(--ink); font: 700 20px/1.2 var(--display); }
.lt-quick:hover { border-color: var(--accent); }
.lt-quick svg { width: 22px; height: 22px; }
@media (min-width: 900px) {
  .lt-headline { text-align: center; }
  .lt-quick { max-width: 420px; margin: 12px auto 0; }
  .lt-main { max-width: 980px; }
  .lt-blocks { grid-template-columns: repeat(3, 1fr); }
  .lt-block { grid-template-columns: 1fr; align-content: start; min-height: 190px; gap: 12px; padding: 22px; }
  .lt-count { justify-self: start; }
  .lt-start { max-width: 420px; margin: 22px auto 0; }
  .lt-hello { text-align: center; }
}

/* the walk: progress row, one big card, the dock */
.lt-walk { max-width: 720px; margin: 0 auto; }
.lt-walk-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.lt-progress { flex: 1; display: flex; align-items: center; gap: 6px; }
.lt-dot { flex: 1; height: 10px; border-radius: 999px; background: var(--rule); }
.lt-dot.done { background: var(--ok); }
.lt-dot.now { background: var(--ember); }
.lt-pcount { font: 650 16px/1 var(--sans); color: var(--muted); white-space: nowrap; }
.lt-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
           padding: 22px 20px 20px; outline: none; animation: lt-enter .24s ease-out both; }
@keyframes lt-enter { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
.lt-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.lt-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 3px 11px; border-radius: 999px;
           font: 650 15px/1.2 var(--sans); }
.lt-chip.lt-client { background: var(--info-bg); color: var(--info); }
.lt-chip.lt-when { background: var(--sunk); color: var(--muted); border: 1px solid var(--line); }
.lt-chip.lt-when.late { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.lt-chip.lt-when.today { background: var(--ink); color: var(--bg); border-color: transparent; }
.lt-line + .lt-line { margin-top: 16px; }
/* MISSION-alanfix: a stale summary, the store link, "Follow-up of:" */
.lt-updating { margin-top: 4px; color: var(--muted); font: 600 16px/1.3 var(--sans); }
.lt-updating + .lt-line { margin-top: 12px; }
a.lt-open { display: flex; align-items: center; justify-content: center; width: 100%; margin-top: 18px;
            text-decoration: none; text-align: center; overflow-wrap: anywhere; }
a.lt-open:hover { border-color: var(--accent); }
.lt-follow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: -4px 0 14px; }
.lt-fl { color: var(--muted); font: 650 16px/1.3 var(--sans); }
.lt-flink { min-height: 48px; padding: 0 4px; border: 0; background: none; color: var(--accent-ink); text-align: left;
            font: 650 17px/1.3 var(--sans); text-decoration: underline; text-underline-offset: 3px; }
.lt-chip.lt-new { background: var(--ok-bg); color: var(--ok); }
.lt-line h3 { font: 650 16px/1.3 var(--sans); color: var(--muted); letter-spacing: 0; margin-bottom: 3px; }
.lt-line p { font-size: 18px; line-height: 1.5; }
.lt-l-todo p { font: 650 23px/1.3 var(--display); letter-spacing: -.015em; }
.lt-l-advice { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; padding: 14px;
               border-radius: var(--r-m); background: var(--info-bg); }
.lt-l-advice h3 { color: var(--info); }
.lt-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
             background: var(--info); color: var(--card); font: 750 18px/1 var(--display); }
.lt-missing { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 14px; border-radius: var(--r-s);
              border: 1px dashed var(--rule); background: var(--sunk); color: var(--muted); font: italic 500 17px/1.3 var(--sans);
              text-align: left; }
.lt-l-todo .lt-missing { font-size: 17px; }
.lt-err { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-s); background: var(--bad-bg); color: var(--bad);
          font-weight: 650; }
.lt-wait { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-s); background: var(--sunk); color: var(--ink);
           font-weight: 600; }
.lt-answers { display: grid; gap: 10px; margin-top: 20px; }
.lt-ans { position: relative; display: block; width: 100%; min-height: 60px; padding: 12px 16px; text-align: left;
          border-radius: var(--r-m); border: 2px solid var(--rule); background: var(--card); color: var(--ink); font: inherit; }
.lt-ans:hover:not(:disabled) { border-color: var(--ink); }
.lt-ans:disabled { opacity: .55; cursor: progress; }
.lt-ans-l { display: block; font: 700 19px/1.25 var(--display); letter-spacing: -.01em; }
.lt-ans-s { display: block; font-size: 17px; line-height: 1.35; color: var(--muted); margin-top: 2px; }
.lt-ans-tag { display: inline-block; margin-top: 8px; font: 650 15px/1 var(--sans); padding: 6px 9px; border-radius: 999px;
              background: var(--card); color: var(--accent-ink); }
.lt-ans.rec { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.lt-ans.rec .lt-ans-s { color: var(--on-accent); }
.lt-ans.route { border-style: dashed; }
.lt-answers.huge .lt-ans { min-height: 76px; padding: 14px 18px; }
.lt-answers.huge .lt-ans-l { font-size: 22px; }
.lt-answers.extra { margin-top: 10px; gap: 8px; }
.lt-answers.extra .lt-ans { min-height: 52px; padding: 10px 14px; border-width: 1px; }
.lt-answers.extra .lt-ans-l { font-size: 18px; }
.lt-extra-label { margin-top: 18px; font: 650 16px/1.3 var(--sans); color: var(--muted); }
.lt-ask { font: 650 19px/1.3 var(--display); }
.lt-talk { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; margin-top: 12px;
           border: 0; background: none; color: var(--info); font: 650 17px/1.2 var(--sans); }
.lt-dock { position: sticky; bottom: 0; z-index: 30; margin: 14px -16px 0;
           padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line);
           box-shadow: 0 -14px 24px -18px rgba(40,30,20,.35); }
.lt-dock .lt-answers { margin-top: 0; gap: 8px; }
.lt-dock .lt-answers.huge .lt-ans { min-height: 64px; padding: 10px 14px; }
.lt-dock .lt-answers.huge .lt-ans-l { font-size: 21px; }
.lt-dock .lt-answers.n2 { grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) {
  .lt-dock { margin: 14px 0 0; border-radius: var(--r) var(--r) 0 0; border: 1px solid var(--line); border-bottom: 0; }
  .lt-dock .lt-answers.huge.n3 { grid-template-columns: repeat(3, 1fr); }
  .lt-dock .lt-answers.lt-days { grid-template-columns: repeat(3, 1fr); }
  .lt-dock .lt-answers.lt-days .lt-ask, .lt-dock .lt-answers.lt-days .lt-linkish { grid-column: 1 / -1; }
}

/* end screens */
.lt-end { position: relative; text-align: center; padding: 40px 8px 20px; outline: none; }
.lt-end h1 { font: 650 34px/1.15 var(--display); margin-top: 18px; }
.lt-end p { color: var(--muted); margin-top: 8px; font-size: 18px; }
.lt-bigcheck { width: 112px; height: 112px; margin: 0 auto; border-radius: 50%; background: var(--ok); color: var(--card);
               display: grid; place-items: center; animation: lt-pop .45s cubic-bezier(.2,1.4,.4,1) both; }
.lt-bigcheck svg.icon { width: 60px; height: 60px; stroke-width: 2.6; }
.lt-actions { display: grid; gap: 10px; max-width: 420px; margin: 26px auto 0; }
.lt-btn { min-height: 56px; border-radius: var(--r-m); border: 2px solid var(--rule); background: var(--card); color: var(--ink);
          font: 700 19px/1.2 var(--display); padding: 0 18px; }
.lt-btn.primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
@keyframes lt-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.lt-burst { position: absolute; left: 50%; top: 96px; width: 0; height: 0; pointer-events: none; }
.lt-burst i { position: absolute; width: 10px; height: 10px; border-radius: 3px; opacity: 0; animation: lt-fly 1s ease-out .15s both; }
@keyframes lt-fly { 0% { opacity: 1; transform: translate(0,0) rotate(0); }
                    100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(200deg); } }

/* "Done · Undo": just above the dock (placed by lightPlaceToast), never over the header or the progress row */
.lt-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90;
            display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 6px 8px 6px 18px;
            border-radius: 14px; background: var(--ink); color: var(--bg); font: 650 17px/1.3 var(--sans); box-shadow: var(--shadow-pop); }
.lt-toast:not(:has(button)) { padding: 12px 18px; }
.lt-toast.in-dock { position: static; transform: none; width: fit-content; margin: 0 auto 10px; box-shadow: none; }
.lt-toast-undo { min-height: 48px; min-width: 72px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--bg);
                 color: var(--ink); font: 700 17px/1 var(--sans); }

/* Talk to Hermes: full screen on the phone, a side sheet on desktop */
.lt-scrim { position: fixed; inset: 0; z-index: 80; background: var(--scrim); }
.lt-chat { position: fixed; z-index: 81; left: 0; right: 0; bottom: 0; top: var(--stage-height, 0px); display: flex;
           flex-direction: column; background: var(--card); color: var(--ink); font-size: 18px; box-shadow: var(--shadow-pop); }
@media (min-width: 900px) {
  .lt-chat { left: auto; width: 460px; border-radius: 22px 0 0 22px; }
}
.lt-chat-top { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.lt-who { flex: 1; min-width: 0; }
.lt-who b { display: block; font: 700 18px/1.2 var(--display); }
.lt-who span { display: block; color: var(--muted); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-close { min-height: 48px; min-width: 72px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--sunk);
            color: var(--ink); font: 650 16px/1 var(--sans); }
.lt-chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.lt-hmsg { align-self: flex-start; max-width: 90%; padding: 11px 14px; border-radius: 18px; border-bottom-left-radius: 6px;
           background: var(--info-bg); font-size: 17px; line-height: 1.45; margin: 0; }
.lt-intro, .lt-consent { display: flex; flex-direction: column; gap: 10px; }
.lt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lt-chipbtn { min-height: 48px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--info); background: var(--card);
              color: var(--info); font: 650 17px/1 var(--sans); }
.lt-chipbtn[aria-pressed="true"] { background: var(--info); color: var(--card); }
.lt-msgs { display: flex; flex-direction: column; gap: 10px; }
.lt-msgs .msg { max-width: 90%; padding: 11px 14px; border-radius: 18px; font-size: 17px; line-height: 1.45; }
.lt-msgs .msg.user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.lt-msgs .msg.assistant, .lt-msgs .msg.error { align-self: flex-start; background: var(--sunk); border-bottom-left-radius: 6px; }
.lt-msgs .message-text, .lt-msgs .message-text * { font-size: 17px; line-height: 1.45; }
.lt-msgs .msg .message-time { display: block; font-size: 15px; margin-top: 4px; color: var(--muted); }
.lt-msgs .msg.user .message-time { color: var(--on-accent); }
.lt-msgs .empty { color: var(--muted); font-size: 16px; }
.lt-composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
               border-top: 1px solid var(--line); }
.lt-composer textarea { flex: 1; min-height: 52px; max-height: 140px; padding: 12px 14px; border-radius: 14px; resize: none;
                        border: 1px solid var(--rule); background: var(--bg); color: var(--ink); font: 500 18px/1.4 var(--sans); }
.lt-send, .lt-stop { min-height: 52px; min-width: 72px; border: 0; border-radius: 14px; font: 700 17px/1 var(--sans); }
.lt-send { background: var(--info); color: var(--card); }
.lt-send:disabled { opacity: .55; }
.lt-stop { background: var(--sunk); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .lt-card, .lt-bigcheck, .lt-burst i { animation: none !important; }
}

/* ───────────────────────────── Report & fix issues (MISSION-issues, 28 Oct 2026) ─────────────────────────────
   The bug icon: Pro's top band (beside [Light | Pro]), Light's nav bar. The panel: a sheet on the phone, a right
   drawer from 700 px. Only the app's tokens: no new font, light + dark, text ≥ 4.5:1. */
.issue-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
             border: 0; background: none; color: inherit; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; }
.issue-btn .icon { width: 18px; height: 18px; }
.issue-btn:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }
.issue-badge { position: absolute; top: -4px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
               display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
               background: var(--accent); color: var(--on-accent); font: 700 12px/1 var(--sans); }
.issue-badge[hidden], .issue-root [hidden], #toast.issue-toast[hidden] { display: none !important; }
/* in the band: the STAGING bar (white on red) or #modebar (the page's colours) */
.issue-band { width: 32px; height: 32px; margin-left: 8px; vertical-align: middle; border-radius: 999px;
              border: 1px solid rgba(255,255,255,.7); color: #fff; }
.issue-band:hover { background: rgba(255,255,255,.14); }
#stagebar .issue-band .issue-badge { background: #fff; color: #b3261e; }
#modebar .issue-band { border-color: var(--rule); color: var(--ink); }
#modebar .issue-band:hover { background: var(--well); }
@media (max-width: 600px) {
  .issue-band { width: 44px; height: 44px; }
  .issue-band .icon { width: 20px; height: 20px; }
}
/* in Light's nav: a 48 px tap like its neighbours */
.lt-issue { min-width: 48px; min-height: 48px; border-radius: 999px; color: var(--ink); }
/* five 48 px controls on one row: at 390 px Back · Home keep their words and Projects is its icon (the
   aria-label stays); below 390 px all three are icons, as below 360 px without the bug (BLOCKERS-issues) */
@media (max-width: 430px) {
  .lt-nav.has-issue .lt-nb { padding: 0 8px; }
  .lt-nav.has-issue #light-projects .lt-nbl { position: absolute; width: 1px; height: 1px; overflow: hidden;
                                               clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 389px) {
  .lt-nav.has-issue .lt-nb .lt-nbl { position: absolute; width: 1px; height: 1px; overflow: hidden;
                                      clip: rect(0 0 0 0); white-space: nowrap; }
}
.lt-root .lt-issue svg.icon { width: 22px; height: 22px; }
.lt-issue:hover { background: var(--well); }
.lt-issue .issue-badge { top: 2px; right: 0; min-width: 22px; height: 22px; font-size: 15px; }

/* the panel */
.issue-root { position: fixed; inset: var(--stage-height, 0px) 0 0 0; z-index: 95; }   /* the STAGING bar stays visible */
.issue-scrim { position: absolute; inset: 0; background: var(--scrim); }
.issue-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100% - 24px);
               display: flex; flex-direction: column; background: var(--card); color: var(--ink);
               border-radius: 22px 22px 0 0; box-shadow: var(--shadow-pop); font-size: 14.5px; line-height: 1.45; }
@media (min-width: 700px) {
  .issue-panel { left: auto; top: 0; width: min(460px, 100%); max-height: none;
                 border-radius: 22px 0 0 22px; }
}
.issue-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 10px 20px; border-bottom: 1px solid var(--line); }
.issue-title { flex: 1; margin: 0; font: 650 20px/1.2 var(--display); letter-spacing: -.01em; }
.issue-x { min-width: 44px; min-height: 44px; border: 0; border-radius: var(--r-s); background: none; color: var(--ink);
           font: 600 18px/1 var(--sans); cursor: pointer; }
.issue-x:hover { background: var(--well); }
.issue-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 20px 28px; }
.issue-test { display: inline-block; margin: 0 0 12px; padding: 5px 10px; border-radius: var(--r-xs);
              background: var(--flag-bg); color: var(--flag); font-weight: 700; font-size: 13px; }
.issue-form { display: flex; flex-direction: column; gap: 8px; }
.issue-label { font-weight: 700; }
.issue-ta { width: 100%; box-sizing: border-box; min-height: 104px; resize: vertical; padding: 10px 12px;
            border: 1px solid var(--rule); border-radius: var(--r-s); background: var(--sunk); color: var(--ink);
            font: 500 15px/1.45 var(--sans); }
.issue-ta:focus, .issue-why:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px var(--accent-bg); }
.issue-file { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.issue-file-in { font: 500 14px var(--sans); color: var(--muted); max-width: 100%; }
.issue-file-in::file-selector-button { min-height: 40px; margin-right: 10px; padding: 0 14px; border: 1px solid var(--rule);
                                        border-radius: var(--r-s); background: var(--card); color: var(--ink);
                                        font: 700 13.5px var(--sans); cursor: pointer; }
.issue-fname, .issue-ctx { margin: 0; color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.issue-err { margin: 0; color: var(--bad); font-weight: 600; font-size: 14px; }
.issue-send { width: 100%; margin-top: 4px; }
.issue-lh { margin: 24px 0 10px; font: 650 16px/1.2 var(--display); }
.issue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.issue-empty { color: var(--muted); }
.issue-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--sunk); outline: none; }
.issue-item.issue-focus { box-shadow: 0 0 0 2px var(--ember); }
.issue-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.issue-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 700 12.5px/1.35 var(--sans); }
.issue-chip.c-neutral { background: var(--chip); color: var(--ink); }
.issue-chip.c-good { background: var(--ok-bg); color: var(--ok); }
.issue-chip.c-wait { background: var(--flag-bg); color: var(--flag); }
.issue-chip.c-muted { background: none; box-shadow: inset 0 0 0 1px var(--rule); color: var(--muted); }
.issue-op { font-weight: 700; font-size: 13px; }
.issue-when { margin-left: auto; color: var(--muted); font-size: 13px; }
.issue-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; width: 100%;
              margin: 8px 0 0; padding: 0; border: 0; background: none; color: var(--ink); text-align: left;
              font: 500 14.5px/1.45 var(--sans); cursor: pointer; white-space: pre-wrap; overflow-wrap: anywhere; }
.issue-text.open { display: block; -webkit-line-clamp: unset; }
.issue-sum { margin: 6px 0 0; color: var(--ink); font-weight: 600; }
.issue-shotlink { display: inline-block; margin-top: 6px; color: var(--accent-ink); font-weight: 700; font-size: 13.5px;
                  text-decoration: underline; text-underline-offset: 3px; }
.issue-decide { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.issue-note { margin: 0 0 8px; color: var(--muted); }
.issue-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.issue-confirm { flex: 1 1 100%; margin: 0; font-weight: 600; }
.issue-why { flex: 1 1 100%; min-height: 44px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--rule);
             border-radius: var(--r-s); background: var(--card); color: var(--ink); font: 500 15px var(--sans); }
.issue-rowerr { margin-top: 6px; }
/* Light: its own type and tap sizes (body 18 px, nothing under 15 px, taps ≥ 48 px) */
.issue-light .issue-panel { font-size: 17px; }
.issue-light .issue-title { font-size: 22px; }
.issue-light .issue-x, .issue-light .btn, .issue-light .issue-text { min-height: 48px; }
.issue-light .issue-x { min-width: 48px; }
.issue-light .issue-ta { font-size: 18px; }
.issue-light .issue-test, .issue-light .issue-fname, .issue-light .issue-ctx, .issue-light .issue-err,
.issue-light .issue-chip, .issue-light .issue-op, .issue-light .issue-when, .issue-light .issue-shotlink,
.issue-light .issue-file-in { font-size: 15px; }
.issue-light .issue-file-in::file-selector-button { min-height: 48px; font-size: 16px; }
.issue-light .issue-text { font-size: 17px; }
.issue-light .issue-shotlink { display: inline-flex; align-items: center; min-height: 48px; }
.issue-light .issue-why { min-height: 48px; font-size: 17px; }
.issue-light .btn { font-size: 16px; }

/* the toast with a "See" action: Pro reuses #toast (it takes taps only while it carries the action) */
#toast.issue-toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px;
                     top: calc(var(--stage-height, 0px) + 10px); border-radius: 14px; text-align: left; }
#toast.issue-toast .issue-see, .issue-ltoast .issue-see { flex: none; }
#toast .issue-see { min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--r-xs); background: var(--bg);
                    color: var(--ink); font: 700 14px/1 var(--sans); cursor: pointer; }
@media (max-width: 600px) { #toast .issue-see { min-height: 44px; } }
/* 2 Nov 2026: the deploy notice is green (white on #067647 = 5.9:1), in Pro / Focus and in Light */
#toast.issue-toast.issue-deploy, .lt-toast.issue-deploy { background: #067647; color: #FFFFFF; }
#toast.issue-toast.issue-deploy { padding: 10px 8px 10px 18px; font-size: 14.5px; line-height: 1.35; max-width: min(760px, 92vw); }
#toast.issue-toast.issue-deploy:not(:has(button)) { padding-right: 18px; }
#toast.issue-deploy .issue-see, .lt-toast.issue-deploy .issue-see { background: #FFFFFF; color: #054F31; }
/* ───────────────────────────── Map tab (MISSION-map, 28 Oct 2026) ─────────────────────────────
   The Drill prototype's variant B, its rules scoped under .mapbody (copied from
   reference/drill-prototype/template.html, which copied its values from this file). */
.mapbody .crumbs { position: sticky; top: 44px; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.mapbody .crumbs ol { list-style: none; margin: 0 auto; padding: 0 18px; max-width: 1240px; display: flex; flex-wrap: wrap; align-items: center; min-height: 48px; }
.mapbody .crumbs li { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; font-size: 14.5px; font-weight: 650; }
.mapbody .crumbs li + li::before { content: "›"; color: var(--faint); padding: 0 6px; font-weight: 600; }
.mapbody .crumbs a, .mapbody .crumbs span.cur { display: inline-block; min-height: 44px; min-width: 44px; text-align: center; line-height: 44px; padding: 0 4px; max-width: 34ch;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; border-radius: 8px; }
.mapbody .crumbs a { color: var(--accent-ink); }
.mapbody .crumbs a:hover { background: var(--well); }
.mapbody .crumbs span.cur { color: var(--ink); }
.mapbody .crumbs li.lvl::before { content: none; }
.mapbody .crumbs .lvl { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: auto; padding-left: 12px; white-space: nowrap; }/* ───────── stage: one pane (A, and B below 700px) or Miller columns (B ≥ 700px) ───────── */


.mapbody #map-stage { position: relative; }
.mapbody #map-stage.single .mpane { max-width: 1240px; margin: 0 auto; padding: 18px 18px 120px; }
.mapbody #map-stage.cols { display: grid; grid-auto-flow: column; overflow-x: auto; height: calc(100vh - var(--bars)); }
.mapbody #map-stage.cols .col { overflow-y: auto; border-right: 1px solid var(--line); padding: 14px 14px 110px; min-width: 0; }
.mapbody #map-stage.cols .col:not(.last) { background: color-mix(in srgb, var(--sunk) 55%, var(--bg)); }
.mapbody #map-stage.cols .col.last { background: var(--bg); padding: 18px 22px 110px; }
.mapbody .mpane { container: pane / inline-size; min-width: 0; }
.mapbody .col:not(.last) .xo { display: none !important; }
.mapbody .mpane.zin { animation: zin 150ms ease-out; }
.mapbody .mpane.zout { animation: zout 150ms ease-out; }
@keyframes zin { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes zout { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mapbody .mpane.zin, .mapbody .mpane.zout { animation: none; } }
.mapbody .colempty { display: grid; place-items: center; text-align: center; color: var(--muted); padding: 40px 20px; }/* ───────── headings of a level ───────── */


.mapbody .lhead { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.mapbody .kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13.5px; color: var(--muted); font-weight: 650; }
.mapbody .lhead h1 { font: 650 26px/1.2 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.mapbody .col:not(.last) .lhead h1 { font-size: 19px; }
.mapbody .lsub { color: var(--muted); font-size: 15px; }
.mapbody h2.sec { font: 650 17px/1.3 var(--display); margin: 22px 0 8px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.mapbody h2.sec small { font: 600 13.5px/1 var(--sans); color: var(--muted); }
.mapbody .col:not(.last) h2.sec { font-size: 15.5px; margin-top: 16px; }/* ───────── doors: every element at a level opens the next ───────── */


.mapbody .doors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@container pane (min-width: 720px) { .mapbody .doors.grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); } }
.mapbody .door { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 56px; padding: 11px 40px 11px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-s);
  text-decoration: none; color: var(--ink); transition: background .12s ease, border-color .12s ease; }
.mapbody .door::after { content: ""; position: absolute; right: 17px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-right: 2px solid var(--faint); border-top: 2px solid var(--faint); transform: rotate(45deg); }
.mapbody .door:hover { background: var(--sunk); border-color: var(--rule); }
.mapbody .door.sel { background: var(--accent-bg); border-color: var(--accent-edge); box-shadow: inset 3px 0 0 var(--accent); }
.mapbody .door.sel::after { border-color: var(--accent-ink); }
.mapbody .door.sel .badge:not([class*=" s-"]):not(.lane):not(.proposed) { background: var(--card); }
.mapbody .dt { font-weight: 650; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.mapbody .dm { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13.5px; color: var(--muted); }
.mapbody .dm .late { color: var(--bad); font-weight: 700; }
.mapbody .dm .soon { color: var(--accent-ink); font-weight: 700; }
.mapbody .kids { margin: 2px 0 0; }
.mapbody .prog { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.mapbody .bar { flex: 1; max-width: 220px; height: 6px; border-radius: 99px; background: var(--stone-bg); overflow: hidden; }
.mapbody .bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }

.mapbody .badge { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; line-height: 1.5;
  padding: 1px 9px; border-radius: 999px; background: var(--chip); color: var(--muted); white-space: nowrap; }
.mapbody .badge.s-prog { background: var(--info-bg); color: var(--info); }
.mapbody .badge.s-next { background: var(--flag-bg); color: var(--flag); }
.mapbody .badge.s-done { background: var(--ok-bg); color: var(--ok); }
.mapbody .badge.s-cancel { text-decoration: line-through; }
.mapbody .badge.s-bad { background: var(--bad-bg); color: var(--bad); }
.mapbody .badge.s-ok { background: var(--ok-bg); color: var(--ok); }
.mapbody .badge.s-flag { background: var(--flag-bg); color: var(--flag); }
.mapbody .badge.lane { background: transparent; border: 1px solid var(--rule); color: var(--muted); }
.mapbody .badge.proposed { background: transparent; border: 1.5px dashed var(--muted); color: var(--muted); }
.mapbody .badge.confirmed { background: var(--ok-bg); color: var(--ok); }
.mapbody .badge.proto-done { background: var(--ok-bg); color: var(--ok); }/* folds */


.mapbody details.fold { margin-top: 10px; }
.mapbody details.fold > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 0 12px; border-radius: var(--r-s); font-weight: 700; font-size: 14.5px; color: var(--muted); }
.mapbody details.fold > summary::-webkit-details-marker { display: none; }
.mapbody details.fold > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .12s ease; }
.mapbody details.fold[open] > summary::before { transform: rotate(45deg); }
.mapbody details.fold > summary:hover { background: var(--well); }
.mapbody details.fold > .doors, .mapbody details.fold > .rows, .mapbody details.fold > .ftxt { margin-top: 6px; }/* panels and rows */


.mapbody .panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; }
.mapbody .panel + .panel { margin-top: 12px; }
.mapbody .rows { list-style: none; margin: 0; padding: 0; }
.mapbody .rows > li { padding: 11px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.mapbody .rows > li:first-child { border-top: 0; }
.mapbody .rt { font-weight: 650; font-size: 15px; overflow-wrap: anywhere; }
.mapbody .rx { font-size: 15px; color: var(--ink); overflow-wrap: anywhere; white-space: pre-wrap; }
.mapbody .empty { color: var(--muted); font-size: 15px; padding: 12px 14px; border: 1px dashed var(--rule); border-radius: var(--r-m); }
.mapbody .note { color: var(--muted); font-size: 15px; margin-top: 6px; }
.mapbody .extl { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 650; color: var(--accent-ink); text-decoration: none; }
.mapbody .extl:hover { text-decoration: underline; }/* buttons */


.mapbody .btn { border: 1px solid var(--rule); background: var(--card); border-radius: var(--r-s); padding: 10px 16px; cursor: pointer;
  font-weight: 700; font-size: 14.5px; min-height: 44px; color: var(--ink); display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; text-decoration: none; transition: background .12s ease, border-color .12s ease; }
.mapbody .btn:hover { background: var(--sunk); border-color: color-mix(in srgb, var(--ink) 28%, transparent); }
.mapbody .btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent);
  box-shadow: 0 8px 18px -10px rgba(196,70,31,.85), inset 0 1px 0 rgba(255,255,255,.2); }
.mapbody .btn.primary:hover { filter: brightness(1.07); }
.mapbody .btn.ghost { background: transparent; border-color: transparent; color: var(--accent-ink); }
.mapbody .btn.ghost:hover { background: var(--well); }
.mapbody .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }/* ───────── L0: the photo ───────── */


.mapbody .ctrs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@container pane (min-width: 720px) { .mapbody .ctrs { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; } }
.mapbody .ctr { display: flex; flex-direction: column; justify-content: center; gap: 0; min-height: 60px; padding: 7px 36px 7px 14px; }
.mapbody .ctr .n { font: 650 28px/1.05 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.mapbody .ctr .l { font-size: 14px; font-weight: 650; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mapbody .ctr.hot .n { color: var(--bad); }
.mapbody .ctr.out { background: transparent; border-style: dashed; box-shadow: none; }
.mapbody .ctr.out .n small { font-size: 16px; color: var(--muted); font-weight: 600; }
.mapbody .col:not(.last) .ctrs { gap: 6px; }
.mapbody .col:not(.last) .ctr { min-height: 58px; padding: 6px 30px 6px 12px; }
.mapbody .col:not(.last) .ctr .n { font-size: 22px; }
.mapbody .col:not(.last) .ctr .l { white-space: normal; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mapbody .col:not(.last) .ctr .n small { font-size: 13.5px; }/* phases: vertical steps in a narrow pane, chevrons in a wide one */


.mapbody .phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.mapbody .ph a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 40px 8px 12px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); position: relative; }
.mapbody .ph a::after { content: ""; position: absolute; right: 17px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-right: 2px solid var(--faint); border-top: 2px solid var(--faint); transform: rotate(45deg); }
.mapbody .ph a:hover { background: var(--sunk); }
.mapbody .ph .dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800;
  background: var(--stone-bg); color: var(--muted); }
.mapbody .ph.done .dot { background: var(--ok-bg); color: var(--ok); }
.mapbody .ph.cur .dot { background: var(--accent); color: #fff; }
.mapbody .ph .pn { display: flex; flex-direction: column; min-width: 0; }
.mapbody .ph .pn b { font-weight: 650; font-size: 15px; overflow-wrap: anywhere; }
.mapbody .ph .pn i { font-style: normal; font-size: 13.5px; color: var(--muted); }
.mapbody .ph.cur .pn i { color: var(--accent-ink); font-weight: 700; }
.mapbody .ph a.sel { background: var(--accent-bg); border-color: var(--accent-edge); box-shadow: inset 3px 0 0 var(--accent); }
@container pane (min-width: 720px) {
  .mapbody .phases.chev { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; }
  .mapbody .phases.chev .ph a { flex-direction: column; align-items: stretch; gap: 6px; padding: 0; background: none; border: 0; border-radius: 0; min-height: 0; }
  .mapbody .phases.chev .ph a::after { display: none; }
  .mapbody .phases.chev .ph .dot { display: none; }
  .mapbody .phases.chev .chv { --cb: var(--stone-bg); --cf: var(--muted); display: flex; align-items: center; justify-content: center; height: 44px;
    padding: 0 16px 0 24px; margin-right: -6px; background: var(--cb); color: var(--cf); font-weight: 700; font-size: 14px;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%); }
  .mapbody .phases.chev .ph:first-child .chv { padding-left: 14px; border-radius: 10px 0 0 10px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); }
  .mapbody .phases.chev .ph:last-child .chv { margin-right: 0; }
  .mapbody .phases.chev .chv span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .mapbody .phases.chev .ph.done .chv { --cb: var(--ok-bg); --cf: var(--ok); }
  .mapbody .phases.chev .ph.cur .chv { --cb: var(--accent); --cf: #fff; }
  .mapbody .phases.chev .ph.next .chv { background: repeating-linear-gradient(135deg, var(--stone-bg) 0 6px, transparent 6px 12px); }
  .mapbody .phases.chev .ph a:hover .chv { filter: brightness(.96); }
  .mapbody .phases.chev .ph .pn { padding: 0 8px 0 16px; }
  .mapbody .phases.chev .ph .pn b { display: none; }
  .mapbody .phases.chev .ph .pn .nst { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mapbody .phases.chev .ph .pn i { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mapbody .phases.chev .ph a.sel { background: none; box-shadow: none; }
  .mapbody .phases.chev .ph a.sel .chv { outline: 2px solid var(--ink); outline-offset: -2px; }
}
.mapbody .chv { display: none; }
@container pane (min-width: 720px) { .mapbody .phases.chev .chv { display: flex; } }

.mapbody .l0grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.mapbody .l0top { display: flex; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; }
.mapbody .l0top { margin-bottom: 8px; }
.mapbody .l0top h1 { font-size: 24px; }
.mapbody .l0top .kicker { order: 2; }
.mapbody .ksec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 2px; }
.mapbody .ksec > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.mapbody .ksec > header h2 { font: 650 17px/1.3 var(--display); }
.mapbody .sentence { color: var(--muted); font-size: 15px; }
.mapbody .kcols { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.mapbody .kcols > li.kg { font-size: 14px; font-weight: 700; color: var(--muted); padding-top: 2px; }
@container pane (min-width: 720px) { .mapbody .kcols { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); } .mapbody .kcols > li.kg { grid-column: 1 / -1; } }
.mapbody .kcard { padding-top: 9px; padding-bottom: 9px; gap: 2px; }
.mapbody .kcard.l0 .dt { -webkit-line-clamp: 1; }
.mapbody .kcard.l0 .kl3 { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mapbody .kcard.l0 .kl3 .st-bad { color: var(--bad); font-weight: 700; }
.mapbody .kcard.l0 .kl3 .st-flag { color: var(--flag); font-weight: 700; }
.mapbody .kcard.l0 .kl3 .st-ok { color: var(--ok); font-weight: 700; }
.mapbody .l0top .sentence { margin-left: auto; order: 3; }
.mapbody .kval { font-size: 15px; font-weight: 650; color: var(--ink); }
.mapbody .kval.wait { color: var(--muted); font-weight: 600; }
.mapbody .kval b { font-variant-numeric: tabular-nums; }/* ───────── L1 KPI ───────── */


.mapbody .kv3 { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 22px; }
.mapbody .kv3 .v { display: flex; flex-direction: column; min-width: 0; }
.mapbody .kv3 .v small { font-size: 13.5px; font-weight: 650; color: var(--muted); }
.mapbody .kv3 .v b { font: 650 28px/1.15 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.mapbody .kv3 .v.t b { color: var(--accent-ink); }
.mapbody .kv3 .v i { font-style: normal; font-size: 13.5px; color: var(--muted); }
.mapbody .kv3 .arr { font: 650 22px/1.3 var(--display); color: var(--faint); padding-top: 22px; }
.mapbody .await { font: 650 22px/1.2 var(--display); color: var(--muted); }
.mapbody .spark { margin-top: 12px; position: relative; }
.mapbody .spark svg { display: block; width: 100%; height: 132px; overflow: visible; }
.mapbody .spark .tip { position: absolute; top: -6px; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 650;
  padding: 3px 8px; border-radius: 8px; white-space: nowrap; pointer-events: none; }
.mapbody .spark .axis { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 2px; }
.mapbody .meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 18px; margin: 14px 0 0; }
.mapbody .meta div { min-width: 0; }
.mapbody .meta dt { font-size: 13.5px; font-weight: 650; color: var(--muted); }
.mapbody .meta dd { margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.mapbody .ftxt { display: grid; gap: 10px; }
.mapbody .ftxt div b { display: block; font-size: 13.5px; color: var(--muted); }
.mapbody .ftxt div p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.mapbody .tlist + .tlist { margin-top: 18px; }
.mapbody .tlist > h3 { font: 650 15.5px/1.3 var(--display); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.mapbody .tlist > p.why { font-size: 15px; color: var(--muted); margin-bottom: 8px; }
.mapbody .prow { display: grid; gap: 6px; }
.mapbody .prow .door { border-style: dashed; border-width: 1.5px; }
.mapbody .pctl { display: flex; gap: 6px; flex-wrap: wrap; padding-left: 4px; }
.mapbody .pctl .btn { min-height: 44px; padding: 6px 12px; font-size: 14px; }
.mapbody .list-proposed .doors { gap: 12px; }/* ───────── L3 task ───────── */


.mapbody .md { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.mapbody .md h3, .mapbody .md h4, .mapbody .md h5 { font: 650 16px/1.35 var(--display); margin: 14px 0 4px; }
.mapbody .md p { margin: 6px 0; white-space: pre-wrap; }
.mapbody .md ul, .mapbody .md ol { margin: 6px 0; padding-left: 22px; }
.mapbody .md li { margin: 2px 0; }
.mapbody .md a { color: var(--accent-ink); }
.mapbody .md code { font: 600 14px/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--well); padding: 1px 5px; border-radius: 6px; }
.mapbody .md pre { white-space: pre-wrap; background: var(--well); padding: 10px 12px; border-radius: 10px; font: 14px/1.5 ui-monospace, Consolas, monospace; }
.mapbody .wwd { display: grid; gap: 12px; }
.mapbody .wwd b { display: block; font-size: 13.5px; color: var(--muted); }
.mapbody .wwd p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.mapbody .statusline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mapbody .task-status { font-size: 14px; padding: 2px 12px; }


@media (max-width: 699px) {
  .mapbody .crumbs .lvl { display: none; } .mapbody .lhead h1 { font-size: 23px; }
  .mapbody .crumbs ol { padding: 0 4px; }
  .mapbody .crumbs li { font-size: 14px; }
  .mapbody .crumbs li + li::before { padding: 0 3px; }
  .mapbody .crumbs a, .mapbody .crumbs span.cur { max-width: 40vw; padding: 0 3px; }
}

/* Map: the app's own frame around the ported rules */
.mapbody { max-width: none; padding: 0 0 24px; min-width: 0; }
.mapbody .mapfresh { max-width: 1240px; margin: 10px auto 0; padding: 0 18px; display: flex; flex-wrap: wrap; align-items: center;
  gap: 4px 12px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.mapbody .mapfresh .btn.small { min-height: 44px; font-size: 13.5px; color: var(--accent-ink); }
.mapbody .mapmode { padding: 1px 9px; border-radius: 999px; background: var(--chip); color: var(--muted); font-size: 13px; }
.mapbody .mapwarn { max-width: 1204px; margin: 8px auto 0; padding: 10px 14px; border-radius: var(--r-m); background: var(--flag-bg);
  color: var(--flag); font-weight: 650; font-size: 14.5px; }
@media (max-width: 1240px) { .mapbody .mapwarn { margin-left: 18px; margin-right: 18px; } }
.mapbody #map-error { margin: 18px; }
.mapbody .crumbs { position: static; background: transparent; }
.mapbody .crumbs ol { padding: 0 18px; }
.mapbody #map-stage.cols { height: calc(100vh - 160px); }
.mapbody #map-stage.single .mpane { padding-bottom: 60px; }
.mapbody .badge.map-set { outline: 2px solid currentColor; outline-offset: 1px; }
.mapbody .note.inl { margin: 0; font-size: 13.5px; }
.mapbody .sec.first { margin-top: 0; }
.mapbody .meta.panel { margin-top: 14px; }
.mapbody .wwd.panel { margin-top: 12px; }
.mapbody .ftxt { margin-top: 12px; }
.mapbody .kstate { margin-top: 8px; }
.mapbody .rows.panel { padding: 4px 18px; }   /* 2 Nov 2026: `.mapbody .rows { padding: 0 }` wiped the panel's side padding, the text sat on the border */
.mapbody .ubl { display: grid; gap: 6px; margin-top: 4px; }
.mapbody .doors.decs { gap: 12px; }
.mapbody .doors.decs > li { list-style: none; padding: 12px 14px; }
.mapbody .doors.decs .dm { margin: 4px 0 8px; }
.mapbody .ksec h2 .muted { font-size: 15px; }
.mapbody .tlist > h3 small { font-weight: 600; font-size: 13.5px; }
.mapbody .pctl { margin-top: 6px; }
.mapbody .btn.showall { margin-top: 10px; }
.mapbody .gprog-line { font-size: 15px; }
.mapbody #map-body-md .md { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; font-size: 15px; }
#maptoast { position: fixed; left: 50%; bottom: 16px; transform: translate(-50%, 140%); z-index: 70; visibility: hidden; display: flex; align-items: center; gap: 12px;
  background: var(--side-bg); color: var(--side-ink); border-radius: var(--r-m); padding: 8px 8px 8px 16px; box-shadow: var(--shadow-pop);
  width: max-content; max-width: min(560px, calc(100vw - 24px)); font-size: 14.5px; font-weight: 600; transition: transform .18s ease; }
#maptoast.on { transform: translate(-50%, 0); visibility: visible; }
#maptoast button { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: transparent;
  color: #f6a487; font: inherit; font-weight: 800; cursor: pointer; }
#maptoast button[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { #maptoast { transition: none; } }

/* ───────────────────────────── Infra asks (MISSION-infra, 31 Oct 2026) ─────────────────────────────
   The tile last on the portal (a .ptile look, not a project), "Infra N" in Pro's top band, the page
   /p/infra. App tokens only, light + dark; text ≥ 13 px, taps ≥ 44 px, contrast ≥ 4.5:1. */
.infra-band { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; margin-left: 8px;
              border: 1px solid rgba(255,255,255,.7); border-radius: 999px; color: #fff; text-decoration: none;
              font: 700 13px/1 var(--sans); vertical-align: middle; flex: none; }
.infra-band:hover { background: rgba(255,255,255,.14); }
.infra-band:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }
.infra-band .infra-bn { min-width: 18px; padding: 3px 6px; box-sizing: border-box; border-radius: 999px; text-align: center;
                        background: #fff; color: #b3261e; font: 700 13px/1 var(--sans); }
#modebar .infra-band { border-color: var(--rule); color: var(--ink); }
#modebar .infra-band:hover { background: var(--well); }
#modebar .infra-band .infra-bn { background: var(--accent); color: var(--on-accent); }
@media (max-width: 600px) { .infra-band { min-height: 44px; } }

.infra .mhero .infra-lede { max-width: 62ch; }
.btn.small.infra-back { margin-top: 22px; text-decoration: none; min-height: 44px; padding: 0 14px; font-size: 13.5px; }
.infra-body { display: flex; flex-direction: column; gap: 28px; margin-top: 20px; }
.infra-sec { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.infra-h { margin: 0; font: 650 20px/1.2 var(--display); letter-spacing: -.01em; color: var(--ink); }
summary.infra-h { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; }
summary.infra-h::-webkit-details-marker { display: none; }
summary.infra-h::before { content: '›'; display: inline-block; color: var(--muted); font-size: 22px; transition: transform .15s ease; }
.infra-done[open] > summary.infra-h::before { transform: rotate(90deg); }
summary.infra-h:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: var(--r-xs); }
.infra-done { gap: 0; }
.infra-empty, .infra-loading { margin: 0; color: var(--muted); font-size: 15px; }
.infra-loaderr { padding: 14px 16px; border-radius: var(--r-m); background: var(--bad-bg); color: var(--bad); font-weight: 600; }
.infra-loaderr p { margin: 0 0 10px; }
.infra-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 18px 20px; background: var(--card);
              border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.infra-card.pending { border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.infra-q { margin: 0; font: 650 18px/1.3 var(--display); letter-spacing: -.005em; color: var(--ink); overflow-wrap: anywhere; }
.infra-line { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.infra-lab { font-weight: 700; color: var(--muted); margin-right: 2px; }
.infra-lab::after { content: ':'; }
.infra-meta { margin: 0; font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.infra-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; max-width: 560px; }
.infra-ans { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 52px;
             padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--r-m); background: var(--card); color: var(--ink);
             font: 700 16px/1.2 var(--sans); cursor: pointer; box-shadow: var(--shadow-s); min-width: 0;
             transition: border-color .12s ease, background .12s ease; }
.infra-ans:hover { background: var(--sunk); border-color: color-mix(in srgb, var(--ink) 28%, transparent); }
.infra-ans:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }
.infra-ans[data-v="later"] { color: var(--muted); }
/* the recommended answer: the record's light-green "this is the recommendation" signal (.act.isrec) */
.infra-ans.isrec { border-color: var(--rec-edge); background: var(--rec-bg); box-shadow: 0 0 0 1px var(--rec-edge); color: var(--rec-ink); }
.infra-ans.isrec:hover { border-color: var(--rec-edge); background: var(--rec-bg); filter: brightness(.98); }
.infra-ans .infra-rtag { margin: 0; font-size: 13px; background: var(--rec-edge); color: var(--rec-on); }
.btn.small.infra-notebtn { align-self: flex-start; min-height: 44px; font-size: 13.5px; padding: 0 10px; margin-left: -10px; color: var(--muted); }
.infra-note { width: 100%; max-width: 560px; box-sizing: border-box; min-height: 64px; resize: vertical; padding: 10px 12px;
              border: 1px solid var(--rule); border-radius: var(--r-s); background: var(--sunk); color: var(--ink);
              font: 500 15px/1.45 var(--sans); }
.infra-note:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px var(--accent-bg); }
.infra-note[hidden] { display: none; }
.infra-err { margin: 0; color: var(--bad); font-weight: 650; font-size: 14px; }
.infra-pending { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; max-width: 560px; margin-top: 6px; }
.infra-pending .infra-left { font-weight: 650; font-variant-numeric: tabular-nums; }
.infra-pending .l { color: var(--ink); font-size: 13px; }
.btn.small.infra-undo { min-height: 44px; padding: 0 18px; font-size: 14px; }
.infra-ansline { margin: 0; font-size: 15px; color: var(--ink); }
.infra-sum { margin: 0; font-size: 14.5px; color: var(--ink); overflow-wrap: anywhere; }
.infra-stuck { margin: 0; padding: 10px 12px; border-radius: var(--r-s); background: var(--flag-bg); color: var(--flag);
               font-weight: 650; font-size: 14.5px; overflow-wrap: anywhere; }
.infra-card.stuck { border-color: color-mix(in srgb, var(--flag) 40%, transparent); }
.infra-donelist { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.infra-doneitem { display: flex; flex-direction: column; gap: 3px; padding: 12px 16px; border: 1px solid var(--line);
                  border-radius: var(--r-m); background: var(--sunk); min-width: 0; }
.infra-dq { font-weight: 650; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .infra-card { padding: 16px; border-radius: 18px; }
  .infra-q { font-size: 17px; }
  .infra-h { font-size: 18px; }
}

/* 3 Nov 2026: a select / status edit is an open list of its values; the value opens its editor */
.fe-input.fe-list { height: auto; max-width: 320px; padding: 4px; overflow-y: auto; }
.fe-list option { padding: 7px 10px; border-radius: 6px; }
.pv.pv-edit { cursor: pointer; }
.pv.pv-edit:hover { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }

/* V2-14 (30 Nov 2026): What the assistant sees */
.ctx-pack-btn { align-self: flex-start; margin: 6px 12px 0; min-height: 44px; }
/* .btn.small (36 px, 12.5 px) outranks the single class: the 44 px / 13 px floor needs the same weight */
.btn.small.ctx-pack-btn { min-height: 44px; font-size: 13.5px; }
.ctx-pack { margin: 6px 12px; padding: 10px 12px; max-height: 40vh; overflow: auto; white-space: pre-wrap;
  word-break: break-word; font-size: 12px; line-height: 1.45; background: #F4F4F1; border: 1px solid #E6E6E1;
  border-radius: 12px; color: #0E1220; }
.ctx-pack[hidden] { display: none; }
