/* ws-theme.css — INDEPENDENT COPY of the stylesheet served by Lynda's Events Scout dashboard (agentsdev.webspiders.com, GET /login,
   fetched read-only 2026-11-17 08:05Z, sha256 of the extracted <style> block: 44327b18b55f9b30).
   Lynda's files are untouched; this copy is owned by the outreach UI and may diverge. Overrides live in ui.css. */

  :root {
    /* The content field is near-white with a violet bias rather than a
       neutral grey — a pure grey under a purple rail reads as unfinished. */
    --bg:#FAF9FE; --bg-glow: radial-gradient(1100px 550px at 20% -10%, #F1ECFD 0%, transparent 62%);
    --surface:#FFFFFF; --surface-2:#F5F3FC; --border:#1B103812;
    --ink:#1F2430; --ink-muted:#6B6880; --ink-faint:#9B98AC;
    --accent:#A21CAF; --accent-soft:#A21CAF14; --accent-glow:#C026D340;
    /* The brand surface: always this, in either theme. */
    --rail:linear-gradient(180deg,#2E0B62 0%,#1B0640 100%);
    --rail-top:#2E0B62;
    --rail-ink:#EDE7FA; --rail-ink-dim:#A99AC9; --rail-line:#FFFFFF1F;
    /* One accent gradient, used by every primary control on the page. */
    --grad:linear-gradient(135deg,#EC4899 0%,#C026D3 100%);
    --tile-sel:#1F2430;
    --chip-bg:#EFEDFC; --chip-ink:#4B3BD1;
    --chip-warn-bg:#FEF3C7; --chip-warn-ink:#92610A;
    --chip-ok-bg:#DCFCE7; --chip-ok-ink:#146C43;
    --chip-no-bg:#FEE2E2; --chip-no-ink:#9B1C1C;
    --r-card:16px; --r-ctl:10px;
    --shadow-card:0 1px 2px rgba(27,16,56,.05), 0 8px 24px -12px rgba(27,16,56,.16);
    --dots:radial-gradient(circle, #1B103814 1px, transparent 1px);
    --cool:#2BB3A3; --cool-soft:#2BB3A31A;
    --good:#22A66B; --good-soft:#22A66B1A; --warn:#B8860B; --warn-soft:#B8860B1A;
    --bad:#D14343; --bad-soft:#D143431A;
    --shadow: 0 1px 2px #00000010, 0 8px 20px -12px #00000022;
    --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 22px;
    --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 28px;
    --ease: cubic-bezier(.2,.8,.2,1);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg:#0D0A16; --bg-glow: radial-gradient(1200px 600px at 15% -12%, #241640 0%, transparent 60%);
      --surface:#171226; --surface-2:#1F1932; --border:#FFFFFF14;
      --ink:#EDE9F6; --ink-muted:#A6A0BC; --ink-faint:#6E6889;
      --accent:#D946EF; --accent-soft:#D946EF24; --accent-glow:#D946EF50;
      --chip-bg:#2A2246; --chip-ink:#C4B5FD;
      --chip-warn-bg:#3B2C10; --chip-warn-ink:#FCD34D;
      --chip-ok-bg:#12331F; --chip-ok-ink:#86EFAC;
      --chip-no-bg:#3A1A1A; --chip-no-ink:#FCA5A5;
      --shadow-card:0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
      --dots:radial-gradient(circle, #FFFFFF12 1px, transparent 1px);
      --cool:#3DD9C4; --cool-soft:#3DD9C422;
      --good:#3DDC84; --good-soft:#3DDC8422; --warn:#F5B94D; --warn-soft:#F5B94D22;
      --bad:#FF5C6C; --bad-soft:#FF5C6C22;
      --shadow: 0 1px 2px #00000060, 0 12px 28px -14px #000000B0;
    }
  }
  :root[data-theme="dark"] {
    --bg:#0D0A16; --bg-glow: radial-gradient(1200px 600px at 15% -12%, #241640 0%, transparent 60%);
    --surface:#171226; --surface-2:#1F1932; --border:#FFFFFF14;
    --ink:#EDE9F6; --ink-muted:#A6A0BC; --ink-faint:#6E6889;
    --accent:#D946EF; --accent-soft:#D946EF24; --accent-glow:#D946EF50;
    --chip-bg:#2A2246; --chip-ink:#C4B5FD;
    --chip-warn-bg:#3B2C10; --chip-warn-ink:#FCD34D;
    --chip-ok-bg:#12331F; --chip-ok-ink:#86EFAC;
    --chip-no-bg:#3A1A1A; --chip-no-ink:#FCA5A5;
    --shadow-card:0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
    --dots:radial-gradient(circle, #FFFFFF12 1px, transparent 1px);
    --cool:#3DD9C4; --cool-soft:#3DD9C422;
    --good:#3DDC84; --good-soft:#3DDC8422; --warn:#F5B94D; --warn-soft:#F5B94D22;
    --bad:#FF5C6C; --bad-soft:#FF5C6C22;
    --shadow: 0 1px 2px #00000060, 0 12px 28px -14px #000000B0;
  }
  * { box-sizing: border-box; }
  body { margin:0; background: var(--bg-glow), var(--bg); color:var(--ink);
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size: 16px; line-height:1.5; min-height:100vh; }
  body.office-mode { height:100vh; overflow:hidden; }
  .wrap { max-width: 880px; margin: 0 auto; padding: 28px 20px 100px; }
  .auth-wrap { max-width: 400px; margin: 90px auto; padding: 0 20px; }

  /* ---------- branded auth pages ---------- */
  /* Two panels: a dusk-glazing hero echoing the Pixel Office, and a light
     card carrying the form. The logo sits on the LIGHT side deliberately —
     ws-logo.svg declares no fill on its wordmark, so it renders black and
     is only legible on a light surface. That was learned the hard way when
     it went "garbled" on dark chrome. */
  .auth-body { margin:0; min-height:100vh; background: var(--bg); }
  .auth-body .auth-panel { color-scheme: light; }
  .auth-split { display:grid; grid-template-columns: 1.05fr 1fr; min-height:100vh; }
  .auth-hero { position:relative; overflow:hidden; background:#170538; display:flex;
    align-items:flex-end; min-height: 260px; }
  .auth-sky { position:absolute; inset:0; width:100%; height:100%; display:block; }
  /* Scrim behind the copy: the skyline has lit windows scattered right
     where the text sits, and white-on-window was unreadable. */
  .auth-hero-copy { position:relative; padding: clamp(24px, 5vw, 56px); max-width: 34rem; width:100%;
    /* Purple-black, not navy-black: this wash was mixed for the old navy
       skyline, and over the purple one it read as a different colour of
       shadow sitting on the artwork rather than part of it. */
    background: linear-gradient(to top, rgba(13,4,30,0.94) 0%, rgba(13,4,30,0.80) 55%, rgba(13,4,30,0) 100%); }
  .auth-hero-kicker { font-family: ui-monospace, "SF Mono", monospace; font-size: 12px;
    letter-spacing:.16em; text-transform:uppercase; color:#FFD98A; margin-bottom:10px; }
  .auth-hero-line { color:#EAF0FA; font-size: clamp(16px, 2vw, 20px); line-height:1.5; margin:0;
    text-wrap: balance; text-shadow: 0 1px 12px rgba(0,0,0,0.45); }

  /* The panel commits to light in BOTH themes, on purpose. ws-logo.svg's
     wordmark declares no fill, so it paints black — on a dark-theme
     surface it all but disappears (the same "garbled logo" failure as the
     dark chrome). A branded splash is allowed to pick one look; every
     colour below is stated outright rather than taken from the theme
     tokens, so a theme switch can't quietly break the contrast. */
  .auth-panel { display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap: 18px; padding: clamp(24px, 5vw, 56px); background:#FFFFFF; color:#1B1A22; }
  /* Specificity bumped with .auth-body on purpose: the dark-theme rules
     live later in this stylesheet, so at equal weight they were winning on
     source order and the input kept rendering dark inside the white card.
     color-scheme was NOT the cause — checked the computed value first. */
  .auth-body .auth-panel .auth-h1 { color:#1B1A22; }
  .auth-body .auth-panel .muted,
  .auth-body .auth-panel .auth-foot,
  .auth-body .auth-panel .auth-back { color:#5C5A6B; }
  .auth-body .auth-panel label { color:#5C5A6B; }
  .auth-body .auth-panel input { background:#FFFFFF; color:#1B1A22; border:1px solid #00000022; }
  .auth-body .auth-panel input::placeholder { color:#9A97A8; }
  .auth-body .auth-panel input:focus { border-color:#e03533;
    outline:2px solid rgba(224,53,51,0.18); outline-offset:1px; }
  .auth-body .auth-panel .auth-cta { background:linear-gradient(135deg,#EC4899 0%,#C026D3 100%);
    border-color:transparent; color:#fff; }
  .auth-body .auth-panel .auth-cta:hover { filter:brightness(1.06); }
  .auth-card { width:100%; max-width: 380px; }
  .auth-logo { height: 54px; width:auto; display:block; margin-bottom: 18px; }
  .auth-rule { width: 46px; height: 3px; border-radius:2px; background: #e03533; margin-bottom: 20px; }
  .auth-h1 { font-size: 26px; font-weight:700; letter-spacing:-0.015em; margin:0 0 6px; }
  .auth-sub { margin: 0 0 20px; }
  .auth-card label { margin-top: 4px; }
  .auth-card input { width:100%; }
  .auth-cta { width:100%; margin-top: 16px; background: linear-gradient(135deg,#EC4899 0%,#C026D3 100%);
    border-color: transparent; box-shadow:0 6px 16px -8px #C026D3CC;
    font-size: 15px; padding: 12px 16px; }
  .auth-cta:hover { filter:brightness(1.06); }
  .auth-code { font-family: ui-monospace, monospace; font-size: 22px; letter-spacing: .38em;
    text-align:center; padding: 12px 14px; }
  /* One box per digit. 16px minimum on the font: iOS zooms the whole page
     when a focused input is smaller, which mid-login is especially nasty. */
  .otp-boxes { display:flex; gap:8px; margin-top:6px; }
  .auth-body .auth-panel .otp-box { flex:1 1 0; min-width:0; text-align:center;
    font-family: ui-monospace, monospace; font-size:22px; font-weight:600;
    padding:12px 0; min-height:54px; border:1px solid #00000022; border-radius:10px;
    background:#FFFFFF; color:#1B1A22; }
  .auth-body .auth-panel .otp-box:focus { border-color:#e03533;
    outline:2px solid rgba(224,53,51,0.18); outline-offset:1px; }
  @media (max-width: 400px) { .otp-boxes { gap:6px; }
    .auth-body .auth-panel .otp-box { font-size:18px; min-height:48px; } }
  .auth-error { margin: 0 0 16px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 13.5px;
    background: rgba(224,53,51,0.10); color: #97201F; border-left: 3px solid #e03533; }
  .auth-back { display:inline-block; margin-top: 16px; font-size: 13px; color: var(--ink-muted); }
  .auth-foot { font-size: 11.5px; color: var(--ink-faint); margin: 0; text-align:center; }

  /* Phone: the hero becomes a banner rather than half the screen — the
     form is what someone came here to use. */
  @media (max-width: 860px) {
    .auth-split { grid-template-columns: 1fr; min-height:100dvh; }
    .auth-hero { min-height: 190px; max-height: 30vh; align-items:flex-end; }
    .auth-hero-copy { padding: 20px 22px 22px; }
    .auth-hero-line { font-size: 15px; }
    .auth-panel { justify-content:flex-start; padding: 28px 22px 36px; }
    .auth-logo { height: 44px; }

    /* Two things a desktop viewport hides completely, both found by
       measuring at a real 375x812:
       1. iOS Safari force-zooms the whole page when a focused input has a
          font-size under 16px. At 14px, tapping the email field zoomed and
          shifted the layout out from under the user. 16px is the floor —
          this is a functional fix, not a typographic preference.
       2. The input (38px) and button (41px) were both under the 44px
          minimum touch target. They looked fine on desktop and fine in a
          2x screenshot; only the measurement showed it. */
    .auth-body .auth-panel input { font-size: 16px; min-height: 48px; }
    .auth-body .auth-panel .auth-cta { min-height: 48px; font-size: 16px; }
    .auth-body .auth-panel .auth-code { font-size: 20px; }
    .auth-body .auth-panel .auth-back { display:inline-block; min-height: 44px; line-height: 44px; }
  }

  h1 { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
  h2 { font-size: 15.5px; font-weight: 650; margin: 0 0 var(--sp-3) 0; display:flex; align-items:center; gap:8px; }
  a { color: var(--accent); }
  .eyebrow { font-family: ui-monospace, "SF Mono", monospace; font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); white-space:nowrap; }
  .muted { color: var(--ink-muted); font-size: 14px; }
  code { font-family: ui-monospace, monospace; white-space: nowrap; }

  /* Desktop: use the full available width (auth pages only — the
     dashboard itself is the fullscreen office stage below, not a
     .wrap-constrained document). */
  @media (min-width: 980px) { .wrap { max-width: 1320px; padding: 32px 32px 100px; } }
  @media (min-width: 1400px) { .wrap { max-width: 1520px; } }

  /* Full-screen Pixel Office stage: the permanent "home" behind
     everything else. Chrome (topbar/nav) and every other section float
     as overlays/popups on top of it rather than replacing it in a
     scrolling document — the office scene never goes away. */
  /* The stage pads out a "clear zone" — chrome height at the top, the
     status bubble's lane at the bottom — and the scene is sized to fit
     entirely inside it. Without this the scene centred on the raw
     viewport and its top third sat underneath the chrome overlay. */
  /* Edge to edge: no padding/clear-zone and no contain-fit letterbox.
     The canvas fills the viewport exactly and its internal resolution is
     re-derived from the viewport's aspect ratio (see PIXEL_OFFICE_SCRIPT),
     so the scene grows more sky instead of being cropped or stretched. */
  /* ---------- the SpiderX shell ---------- */
  /* Rail and topbar are chrome; everything else lives in the field to their
     right. The office canvas sizes itself from its element, so insetting the
     stage was enough to move it out from under them. */
  :root { --rail-w:84px; --top-h:56px; --chrome-h:68px; }
  .es-rail { position:fixed; left:0; top:0; bottom:0; width:var(--rail-w);
    z-index:30; background:var(--rail); border-right:1px solid var(--rail-line);
    display:flex; flex-direction:column; align-items:center; gap:4px;
    padding:10px 0 14px; overflow-y:auto; scrollbar-width:none; }
  .es-rail::-webkit-scrollbar { display:none; }
  .rail-logo { display:flex; align-items:center; justify-content:center;
    width:44px; height:44px; margin-bottom:10px; flex-shrink:0; }
  .rail-logo img { width:26px; height:26px; filter:brightness(0) invert(1); }
  /* The rail could not carry a count: .segment was not positioned. Anchor
     the badge to the segment's centre rather than its right edge — the rail
     is 62px-wide buttons on a desktop but equal flex columns on a phone,
     where it becomes the bottom bar and is the only place the count
     survives at all (.stats-hud is display:none below 860px). */
  .es-rail .segment[data-count]:not([data-count="0"])::after {
    content:attr(data-count); position:absolute; top:6px; left:50%;
    margin-left:5px; min-width:16px; height:16px; padding:0 4px;
    box-sizing:border-box; border-radius:999px; background:#b3261e;
    color:#fff; text-align:center;
    font:700 10px/16px ui-monospace,SFMono-Regular,Menlo,monospace; }
  .es-rail .segment { position:relative; display:flex; flex-direction:column;
    align-items:center;
    justify-content:center; gap:5px; width:62px; padding:10px 2px;
    border:0; border-radius:14px; background:transparent; cursor:pointer;
    color:var(--rail-ink-dim); font:inherit; flex-shrink:0;
    transition:background .15s, color .15s; }
  .es-rail .segment:hover { background:#FFFFFF12; color:var(--rail-ink); }
  .es-rail .segment .ri-lab { font-size:10.5px; font-weight:600;
    letter-spacing:.01em; line-height:1; }
  .es-rail .segment svg { width:20px; height:20px; display:block;
    fill:none; stroke:currentColor; stroke-width:1.7;
    stroke-linecap:round; stroke-linejoin:round; }
  .es-rail .segment.sel { background:var(--grad); color:#fff;
    box-shadow:0 6px 16px -6px #C026D3AA; }
  .es-rail .segment:focus-visible { outline:2px solid #fff; outline-offset:2px; }
  .rail-spacer { flex:1 1 auto; }
  /* The phone rules used to sit here, above the rules they override, where
     three of their declarations were silently dropped. They live at the end
     of this sheet now — a media query carries no extra specificity, so it has
     to come last to win. */

  .office-stage { position:fixed; left:var(--rail-w); right:0;
    top:var(--top-h); bottom:0; z-index:0; overflow:hidden;
    background:var(--bg); }
  /* Explicit contain-fit: `width:auto` + max-width only ever shrinks a
     canvas below its intrinsic attribute size, so the scene rendered at
     a fixed 600x248 in the middle of a huge empty viewport. Computing
     the width as min(available width, height-derived width) scales it
     UP to fill too, which is the whole point of a full-screen stage. */
  #pixel-office { position:absolute; inset:0; width:100%; height:100%; display:block; image-rendering: pixelated; }
  .office-bubble { position:fixed; bottom: var(--sp-5);
    left:calc(50% + var(--rail-w) / 2); transform:translateX(-50%);
    background: rgba(255,255,255,0.74); -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15);
    border:1px solid rgba(255,255,255,0.6); color: #1B1A22; font-size: 13px; padding: var(--sp-2) var(--sp-4);
    border-radius: var(--r-lg); box-shadow: 0 8px 24px -14px rgba(0,0,0,0.4); max-width: min(480px, 86vw); text-align:center; z-index:10; }

  /* The logo is a wide horizontal lockup (1858x526, ~3.5:1) whose
     wordmark stacks "WEB SPIDERS" over "GROUP" — below ~34px tall each
     of those lines renders under 9px and turns to mush. 38px keeps it
     legible without letting it dominate the bar. */
  .ws-logo { height: 58px; width:auto; display:block; flex-shrink:0; }
  .logo-divider { width:1px; height:22px; background: rgba(255,255,255,0.18); flex-shrink:0; }
  @media (max-width: 700px) { .ws-logo { height: 42px; } }

  /* Chrome overlay floats over the pixel artwork, so every control inside
     it is scoped to a light palette regardless of the page theme — the
     overlay and the scene have to agree with each other, and the scene's
     palette is fixed artwork rather than themed CSS. Modals and the chat
     panel are separate surfaces and still follow the real theme. */
  .chrome-overlay { position:fixed; top:0; left:0; right:0; z-index:20; padding: var(--sp-4) var(--sp-5) var(--sp-4);
    /* Transparent, per explicit request: the menu strip (and the brand/
       account panels) should float over the scene, not sit on one big
       opaque bar. Each child already carries its own frosted surface —
       .topbar-left/.topbar-right and .segmented — so removing this
       shared white fill reveals those rather than leaving anything
       unreadable underneath. */
    background: transparent;
    --surface: #FFFFFF; --surface-2: rgba(20,18,40,0.06); --border: rgba(20,18,40,0.12);
    --ink: #1B1A22; --ink-muted: #5C5A6B; --ink-faint: #8B889A;
    color: var(--ink); }

  /* Stats HUD: Lynda's identity + numbers, always visible in a corner
     while the office scene keeps playing behind it — a game HUD, not a
     document section competing with the scene for the same screen.
     Dark-scoped for the same reason as the chrome overlay. */
  /* Collapsed to a small capsule by default (avatar, name, live dot) so
     it never competes with the scene for space; hover (or keyboard
     focus, for anyone tabbing to it) expands it into the full card. The
     capsule and the expanded card are the same element — only its size,
     radius and the visibility of the detail block change — so there's
     no layout jump to a differently-positioned panel. */
  .stats-hud { position:fixed; left: calc(var(--rail-w) + var(--sp-4)); bottom: var(--sp-5); z-index:15; width: 210px; max-height: 52px;
    background: rgba(255,255,255,0.82); -webkit-backdrop-filter: blur(16px) saturate(1.15); backdrop-filter: blur(16px) saturate(1.15);
    border:1px solid rgba(255,255,255,0.6); border-radius: 999px; padding: var(--sp-2) var(--sp-4) var(--sp-2) var(--sp-2);
    box-shadow: 0 10px 26px -16px rgba(20,18,40,0.4); overflow:hidden; cursor:pointer;
    transition: width .28s var(--ease), max-height .28s var(--ease), border-radius .28s var(--ease), padding .28s var(--ease);
    --surface-2: rgba(20,18,40,0.05); --border: rgba(20,18,40,0.10);
    --ink: #1B1A22; --ink-muted: #5C5A6B; --ink-faint: #8B889A; color: var(--ink); }
  /* Grows to its content, but never past the screen: the card is anchored
     bottom-left and expands upward, so on a short viewport an unclamped
     card would run off the top and the content would be unreachable.
     Scrolling here is the last resort, not the default. */
  .stats-hud:hover, .stats-hud:focus, .stats-hud:focus-within { width: 340px;
    max-height: calc(100vh - 2 * var(--sp-5)); overflow-y:auto;
    border-radius: var(--r-lg); padding: var(--sp-4); outline:none; }
  /* Lynda-only blocks. Hidden for any other agent rather than filled with
     her numbers under their name. */
  .stats-hud.other-agent .bot-stats-row,
  .stats-hud.other-agent .platform-row,
  .stats-hud.other-agent .probe-row,
  .stats-hud.other-agent #sparkline-wrap { display:none !important; }
  .hud-nodata:empty { display:none; }
  .hud-nodata { font-size:11.5px; line-height:1.45; opacity:.6; margin-top:10px; }
  .stats-hud .office-hero-header { margin-bottom:0; }
  .stats-hud .bot-avatar { width:32px; height:32px; font-size:14px; flex-shrink:0; }
  .stats-hud .bot-name { font-size:14.5px; }
  .stats-hud .bot-meta, .stats-hud .model-badge { display:none; }   /* capsule keeps only name + status */
  .stats-hud:hover .bot-meta, .stats-hud:focus .bot-meta, .stats-hud:focus-within .bot-meta { display:block; }
  .stats-hud:hover .model-badge, .stats-hud:focus .model-badge, .stats-hud:focus-within .model-badge { display:inline-block; }
  /* Grows to whatever it contains. A fixed max-height meant new rows
     either clipped or forced an inner scrollbar; `grid-template-rows:
     0fr -> 1fr` animates open to the content's own height, so adding
     information here never needs the cap re-tuned. */
  .hud-details { display:grid; grid-template-rows: 0fr; opacity:0;
    transition: grid-template-rows .28s var(--ease), opacity .2s var(--ease); }
  .hud-details > .hud-inner { overflow:hidden; min-height:0; }
  .stats-hud:hover .hud-details, .stats-hud:focus .hud-details, .stats-hud:focus-within .hud-details { grid-template-rows: 1fr; opacity:1; margin-top: var(--sp-4); }
  .stats-hud .bot-stats-row { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3) var(--sp-2); margin-bottom: var(--sp-3); }
  .stats-hud .bot-stat .num { font-size: 20px; }
  .stats-hud .bot-meta { white-space:nowrap; }
  .stats-hud .model-badge { font-size: 11px; padding: 4px 9px; }
  @media (max-width: 860px) { .stats-hud { display:none; } } /* below this the scene itself is the priority */
  @media (max-width: 700px) {
    .chrome-overlay { padding: var(--sp-3) var(--sp-3) var(--sp-3); }
    .topbar-right .muted { display:none; }   /* email is the first thing to go on a phone */
    /* The breadcrumb was taking a whole wrapped line to name the group that
       the bottom bar is already showing as selected, and the drawer repeats
       in its own header. Three chrome rows on a 812px phone is too many;
       this is the one whose job is done twice elsewhere. */
    .crumb-group { display:none; }
    /* The wordmark and its divider cost ~110px, which is exactly what pushed
       the theme and sign-out buttons onto a line of their own — three wrapped
       rows of chrome on an 812px phone. The logo mark stays, the agent
       selector immediately beside it says what you are looking at, and the
       page title carries the name. */
    .topbar-left .eyebrow, .topbar-left .logo-divider { display:none; }
    .modal { padding: var(--sp-4); width: 94vw; max-height: 86vh; }
    /* No stats HUD on a phone, so the bottom only reserves the status
       bubble's lane. Top reserve is measured, not guessed (see
       --chrome-h in CHROME_SYNC_SCRIPT). */
    .office-stage { --stage-bottom: 66px; }
    /* Static config facts (agent id, model) are the lowest-value things
       on a phone and were costing ~2 wrapped pill rows of a 720px-tall
       screen — the model is already on Lynda's card, and the agent id
       never changes. Cron health and data freshness stay: both change. */
    .pill-static { display:none; }
  }

  /* Popups: Cron jobs / Sessions / Sent mail / Memory open as drawers
     over the (still-animating) office scene rather than replacing it. */
  /* Drawers are the standard container for every data panel and are
     styled to match monday.com's own board panel: white surface, a
     monday-blue accent, light-gray hairline borders, uppercase table
     headers, status text as coloured pills. This palette is pinned
     with local custom-property overrides the same way .chrome-overlay
     pins its own — deliberately NOT following --theme/prefers-color-
     scheme, because monday's UI doesn't go dark with the OS either;
     a drawer that inherited this app's dark mode read as a bug (solid
     near-black panel) rather than the intended light monday look. */
  /* Standard skip link: off-screen until focused, then the first thing in
     the tab order. With no landmarks and no headings on the landing view
     there was no way past the chrome at all. */
  .skip-link { position:absolute; left:-9999px; top:0; z-index:100;
    background:#1B0640; color:#FFFFFF; padding:10px 14px;
    border-radius:0 0 8px 0; font-size:13px; text-decoration:none; }
  .skip-link:focus { left:0; }
  #office-main:focus { outline:none; }
  /* Visually hidden but present for assistive tech. The dashboard had no
     such class, which is why 177 inputs shared 14 labels between them —
     there was nowhere to put a name that did not also change the layout. */
  .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px;
    overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; border:0; }
  /* A clipped 1x1 box is fine to READ and wrong to FOCUS — tabbing into it
     puts a focus ring around nothing. Anything focusable un-hides itself. */
  a.sr-only:focus-visible, button.sr-only:focus-visible, .sr-only:focus-visible {
    position:static; width:auto; height:auto; margin:0; overflow:visible;
    clip:auto; clip-path:none; white-space:normal;
    background:#1B0640; color:#FFFFFF; padding:6px 10px; border-radius:6px;
    outline:2px solid #FFFFFF; outline-offset:2px; }
  /* Cron jobs whose last run failed. Positioned below the chrome and above
     the office scene — before this they had no styling at all and were
     drawn behind the topbar, unreadable and unclickable. */
  .job-alerts { position:fixed; left:calc(var(--rail-w) + 14px);
    top:calc(var(--chrome-h) + 12px); z-index:24;
    display:flex; flex-direction:column; gap:8px;
    max-width:min(360px, calc(100vw - var(--rail-w) - 28px));
    /* Eight failing jobs made a 486px column that covered the first two
       floors of the office. It scrolls rather than growing. */
    max-height:min(46vh, 340px); overflow-y:auto; padding-right:2px; }
  .job-alert { appearance:none; -webkit-appearance:none; width:100%;
    font:inherit; background:#FFFFFF; border:1px solid #E6E9EF;
    border-left:3px solid #8A5A00; border-radius:10px;
    padding:9px 12px; cursor:pointer; text-align:left;
    box-shadow:0 8px 22px -14px rgba(20,18,40,.45); }
  .job-alert:hover { border-color:#8A5A00; }
  .job-alert:focus-visible { outline:2px solid var(--accent);
    outline-offset:2px; }
  .ja-title { display:block; font-size:12.5px; font-weight:700;
    color:#8A5A00; line-height:1.3; }
  .ja-meta { display:block; font-size:11.5px; color:#5B5870;
    margin-top:2px; line-height:1.35; }
  @media (max-width: 700px) {
    .job-alerts { left:10px; right:10px; max-width:none;
      top:calc(var(--chrome-h) + 8px); }
  }
  @media (prefers-color-scheme: dark) {
    /* border-color is a shorthand and was wiping the amber border-left
       that says "failure" — 5.93:1 in light, 1.31:1 here. The stripe is
       restated so the cue survives the theme. */
    :root:not([data-theme="light"]) .job-alert { background:#241B3A;
      border-color:#3A2D57; border-left-color:#F0B95C; }
    :root:not([data-theme="light"]) .ja-title { color:#F0B95C; }
    :root:not([data-theme="light"]) .ja-meta { color:#C9C3DC; }
  }
  :root[data-theme="dark"] .job-alert { background:#241B3A;
    border-color:#3A2D57; border-left-color:#F0B95C; }
  :root[data-theme="dark"] .ja-title { color:#F0B95C; }
  :root[data-theme="dark"] .ja-meta { color:#C9C3DC; }
  /* Shown only when the 20s poll has stopped. Everything else on the page
     is a page-load value at that point, including the freshness stamp,
     which is exactly why this has to be loud. */
  /* left/right rather than left:50% + transform: a shrink-to-fit box
     anchored at 50% can only ever be half the viewport wide, so the
     max-width never engaged and this rendered 188px on a phone. */
  .poll-warning { position:fixed; left:0; right:0; margin:0 auto;
    width:fit-content; bottom:18px; z-index:60; max-width:min(560px, 92vw);
    background:#8A5A00; color:#FFFFFF; font-size:13px; line-height:1.45;
    padding:10px 14px; border-radius:8px; box-shadow:0 6px 20px -8px rgba(20,18,40,.55); }
  .poll-warning.is-out { background:#A2231D; }
  /* Dismissible: it is position:fixed and on a phone it landed on top of
     the detail pane's own controls with no way to move it. */
  .poll-warning { display:flex; align-items:flex-start; gap:8px; }
  /* 24x24 minimum. This is the control that gets the bar off the detail
     pane on a phone, where the bar is fixed over it by design. */
  .poll-warning .pw-x { flex:0 0 auto; margin-left:auto; background:none;
    border:0; color:inherit; font:inherit; cursor:pointer; opacity:.85;
    min-width:24px; min-height:24px; line-height:24px; padding:0 4px;
    border-radius:6px; }
  .poll-warning .pw-x:focus-visible { outline:2px solid #FFFFFF;
    outline-offset:2px; opacity:1; }
  @media (pointer: coarse) {
    .poll-warning .pw-x { min-width:44px; min-height:44px; line-height:44px; }
  }
  .poll-warning .pw-x:hover { opacity:1; }
  @media (max-width: 700px) { .poll-warning { bottom:70px; } }
  /* Honour a reduced-motion preference across the board. Only the mic dot
     did before this, and the office canvas runs a full-viewport rAF loop
     forever, which is precisely what 2.2.2 is about. */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: .01ms !important; animation-iteration-count: 1 !important;
      transition-duration: .01ms !important; scroll-behavior: auto !important; }
  }
  .drawer-backdrop { position:fixed; inset:0; background: rgba(15,18,26,0.35); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    z-index:30; opacity:0; pointer-events:none; transition: opacity .22s var(--ease); }
  .drawer-backdrop.open { opacity:1; pointer-events:auto; }
  .drawer { position:fixed; top:0; right:0; bottom:0; z-index:31; width:min(920px, 96vw);
    background:#FFFFFF; border-left:1px solid #E6E9EF; box-shadow: -12px 0 28px -18px rgba(20,18,40,0.4);
    display:flex; flex-direction:column; transform: translateX(100%);
    transition: transform .26s var(--ease), visibility 0s linear .26s;
    visibility:hidden; pointer-events:none; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
    --surface:#FFFFFF; --surface-2:#F5F6F8; --border:#E6E9EF;
    --ink:#323338; --ink-muted:#676879;
    /* #9699A6 measured 2.84:1 on the drawer's white — under the 4.5 AA needs
       for normal text, and it is the colour of every empty state, row count
       and hint in the product ("Nothing open, and nothing decided here yet",
       "4 shown"). Darkened to 4.84:1. Still clearly the faintest of the three
       inks against --ink at #323338; it is now merely quiet rather than
       almost absent. */
    --ink-faint:#6E7180;
    --accent:#A21CAF; --accent-soft:#A21CAF14; --accent-glow:#A21CAF33;
    --good:#00C875; --good-soft:#00C8751A; --warn:#FDAB3D; --warn-soft:#FDAB3D24;
    --bad:#E2445C; --bad-soft:#E2445C1A;
    color: var(--ink); }
  /* SOP diagram is landscape (1700x860) — needs real width to read as a
     flowchart, not just theme colors. Scoped to this one view so Approvals/
     Flags/Sessions/etc keep their normal drawer width. */
  .drawer[data-view="sop"] { width:min(1600px, 96vw); }
  .drawer.open { transform: translateX(0); pointer-events:auto;
    visibility:visible; transition: transform .26s var(--ease), visibility 0s; }
  .drawer-header { display:flex; align-items:center; gap: var(--sp-3); padding: 18px var(--sp-5); border-bottom:1px solid var(--border); flex-shrink:0; }
  .drawer-header h2 { margin:0; font-size:19px; font-weight:700; color:#323338; letter-spacing:-.01em; }
  .drawer-close { margin-left:auto; }
  .drawer-sub { font-size:13px; color: var(--ink-muted); padding: 0 var(--sp-5) 14px; margin:0; flex-shrink:0; }
  .drawer-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding: 0 var(--sp-5) 14px; flex-shrink:0; }
  .drawer-toolbar input, .drawer-toolbar select { margin-bottom:0; font-size:13px; padding:8px 12px; border:1px solid var(--border);
    border-radius: 8px; background: var(--surface-2); color: var(--ink); font-family:inherit; }
  .drawer-toolbar input:focus, .drawer-toolbar select:focus { outline:none; background:#fff; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .drawer-toolbar input.dr-search { flex:1; min-width:170px; padding-left:32px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239699A6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat:no-repeat; background-position:10px center; }
  .dr-dates { display:flex; align-items:center; gap:6px; }
  .dr-dates input { color-scheme: light; }
  .dr-dash { color: var(--ink-faint); font-size:12px; }
  .dr-count { font-size:12px; color: var(--ink-faint); font-weight:600; white-space:nowrap; }
  .drawer-body { flex:1; overflow-y:auto; padding: 0 14px var(--sp-5) var(--sp-5); }
  .dr-empty { padding: var(--sp-5) 0; color: var(--ink-faint); font-style:italic; font-size:13.5px; }
  .drawer .ghost-btn:hover, .drawer .icon-btn:hover { background: var(--border); }
  /* A classic (non-overlay) scrollbar with its own lane, styled to sit
     quietly in the monday palette. Without this, macOS/Chrome's default
     translucent overlay scrollbar floats directly on top of the last
     table column and reads as a stray dark shadow smeared across the
     TOKENS/DATE column rather than as a scrollbar. */
  .drawer-body::-webkit-scrollbar { width:11px; }
  .drawer-body::-webkit-scrollbar-track { background: transparent; }
  .drawer-body::-webkit-scrollbar-thumb { background: #D0D4DC; border-radius:999px; border:3px solid #fff; background-clip:padding-box; }
  .drawer-body::-webkit-scrollbar-thumb:hover { background:#B7BCC7; background-clip:padding-box; }
  .drawer-body { scrollbar-width: thin; scrollbar-color: #D0D4DC transparent; }
  @media (max-width: 700px) { .drawer { width:100vw; } .dr-dates { width:100%; } }

  /* Table inside a drawer: an Excel/monday board-grid look — sticky
     uppercase header row, roomy row height and padding (not a cramped
     admin-panel table), thin vertical gridlines between columns the
     way a spreadsheet or monday's own board reads, tabular figures so
     numeric columns line up, and a light-blue hover row. Scoped under
     .drawer so it doesn't reach any other table in the page (there
     currently isn't one). */
  /* :not(.ab-table) matters. The scroll wrapper is now applied to every
     table by esWrapTables, and this rule out-specifies `.ab-table`, so
     without the exclusion wrapping a table for scrolling also restyled its
     borders — a layout change nobody asked for. */
  .drawer .table-wrap table:not(.ab-table):not(.ab-tbl) { border-collapse:separate;
    border-spacing:0; width:100%; font-variant-numeric: tabular-nums; }
  .drawer .table-wrap table.ab-table,
  .drawer .table-wrap table.ab-tbl { font-variant-numeric: tabular-nums; }
  .drawer th { position:sticky; top:0; z-index:1; background:#F5F6F8; font-family:inherit; font-size:11.5px;
    letter-spacing:.05em; text-transform:uppercase; color:#676879; font-weight:700; padding:14px 18px;
    border-bottom:1px solid var(--border); border-right:1px solid var(--border); white-space:nowrap; text-align:left; }
  .drawer td { padding:16px 18px; border-bottom:1px solid var(--border); border-right:1px solid var(--border);
    font-size:14px; line-height:1.45; color:#323338; vertical-align:middle; white-space:nowrap; }
  .drawer th:last-child, .drawer td:last-child { border-right:none; }
  /* Short, fixed-shape values (dates, pills, token counts, emails)
     should never wrap — that's what was making the Sent-mail and
     Sessions tables ragged, with "8:26 PM" or an email address
     breaking onto a second line while there was plenty of width to
     spare. td/th default to nowrap above; only the one genuinely
     variable-length column per table (job name, session label, mail
     subject) opts back into wrapping via .wrap, so the browser's
     table layout gives that column the leftover width instead of
     splitting it evenly across all columns. */
  .drawer td.wrap { white-space:normal; max-width:360px; }
  .drawer tbody tr { transition: background .12s var(--ease); }
  .drawer tbody tr:hover td { background:#F5F8FF; }
  .drawer tr:last-child td { border-bottom:none; }
  /* Status text ("OK", "ERROR", "DONE"...) as a monday-style pill —
     reuses the existing .pill/.pill.ok/.error/.bad classes; they pick
     up monday's own green/orange/red automatically via the --good/
     --warn/--bad overrides above. */
  .drawer .pill { font-weight:700; padding:4px 11px; font-size:11px; }

  /* Approvals and flags render as a mail-style list (_split / .inbox-item)
     with the detail inline under the selected row. The Copy and "Ask Lynda
     about this" actions live in that detail pane as .id-tools — always
     visible rather than hover-revealed, because a hover affordance is
     untappable. esAskAbout in CHAT_WIDGET_SCRIPT opens the real chat panel
     and prefills the question. */
  .drawer.inbox { width: min(1240px, 98vw); }   /* sent mail still has two panes */
  /* Decision queues are a single column, so they don't need three-pane width. */
  .drawer.inbox.single { width: min(880px, 96vw); }
  .drawer.inbox.single .drawer-toolbar { flex-wrap:wrap; row-gap:8px; }
  @media (max-width: 700px) { .dr-queues { width:100%; } .dr-queues .ir-item { flex:1; } }
  .inbox-single { height:100%; min-height:0; overflow-y:auto;
    border-top:1px solid var(--border); }
  .inbox-single .inbox-list { width:100%; border-right:none; overflow:visible; }
  /* Inline detail: reads as an expansion of the row above it, not a pane. */
  .inbox-single .inbox-detail { padding: var(--sp-4) var(--sp-5);
    background: var(--surface-2); border-top:1px solid var(--border);
    border-bottom:1px solid var(--border); box-shadow: inset 3px 0 0 var(--accent); }
  .inbox-single .inbox-detail:empty { display:none; }
  /* Queue switcher + hide-decided, relocated into the toolbar. */
  .dr-queues { display:flex; gap:4px; flex-shrink:0; }
  .dr-queues .ir-item { width:auto; gap:7px; padding:6px 11px; border-radius: var(--r-sm);
    background: var(--surface-2); font-size:12.5px; }
  .dr-hide { display:flex; align-items:center; gap:6px; font-size:12px;
    color: var(--ink-muted); cursor:pointer; white-space:nowrap; flex-shrink:0; }
  .ir-count.muted { background: rgba(0,0,0,0.06); color: var(--ink-faint); }
  .inbox-split { display:flex; height:100%; min-height:0; border-top:1px solid var(--border); }
  .inbox-list { width: 40%; min-width:240px; overflow-y:auto; border-right:1px solid var(--border); }
  .inbox-item { padding: 12px 14px; border-bottom:1px solid var(--border); cursor:pointer; }
  .inbox-item:hover { background: var(--surface-2); }
  .inbox-item.sel { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
  .inbox-item .ii-title { font-size:13.5px; font-weight:600; line-height:1.35;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .inbox-item .ii-meta { font-size:11px; color: var(--ink-faint); margin-top:4px; font-family: ui-monospace, monospace; }
  /* --- decision queues: single column; .ir-* now live in the toolbar --- */
  .ir-item { display:flex; align-items:center; justify-content:space-between; gap:8px;
    width:100%; text-align:left; background:transparent; border:none; cursor:pointer;
    padding:8px 10px; border-radius: var(--r-sm); font-size:13px; color: var(--ink); }
  .ir-item:hover { background: var(--surface); }
  .ir-item.sel { background: var(--accent); color:#fff; font-weight:600; }
  .ir-count { font-size:11.5px; padding:1px 7px; border-radius:999px;
    background: rgba(0,0,0,0.10); font-variant-numeric: tabular-nums; }
  .ir-item.sel .ir-count { background: rgba(255,255,255,0.25); }
  .inbox-item.is-past { cursor:default; opacity:0.72; }
  .inbox-item.is-past .ii-bar { background: var(--ink-faint); }
  .inbox-item.is-decided { display:none; }
  /* Parked is not decided: it stays in the list, tinted, and keeps its
     place in the count. */
  .inbox-item.is-parked { display:block; background: var(--warn-soft); }
  .inbox-item.is-parked .ii-when::after { content:' b7 awaiting detail'; color: var(--warn); }
  .inbox-list.show-decided .inbox-item.is-decided { display:block; opacity:0.55; }
  .inbox-item.is-decided .ii-title::after { content:' ¹3'; color: var(--good); }

  /* --- decision receipt --- */
  .id-receipt { margin-top: var(--sp-4); border:1px solid var(--good);
    border-radius: var(--r-sm); overflow:hidden; }
  .idr-head { background: rgba(27,127,76,0.10); color:#1B7F4C; font-weight:700;
    font-size:13.5px; padding:9px 12px; display:flex; align-items:center; gap:8px; }
  .idr-tick { font-size:15px; }
  .idr-effect { font-size:13.5px; line-height:1.55; padding:10px 12px; }
  .idr-label { font-size:10.5px; letter-spacing:0.07em; text-transform:uppercase;
    color: var(--ink-faint); padding:0 12px 4px; }
  .idr-line { margin:0 12px 10px; padding:9px 10px; background: var(--surface-2);
    border-radius: var(--r-sm); font-size:11.5px; line-height:1.5;
    white-space:pre-wrap; word-break:break-word; font-family: ui-monospace, monospace; }
  .idr-foot { font-size:11.5px; color: var(--ink-muted); padding:0 12px 10px; line-height:1.5; }
  .inbox-detail { flex:1; min-width:0; overflow-y:auto; padding: var(--sp-4) var(--sp-5); }
  .inbox-detail .id-title { font-size:15.5px; font-weight:700; line-height:1.4; margin: 10px 0 4px; }
  .inbox-detail .id-ask { font-size:13.5px; line-height:1.5; padding:10px 12px; margin: 8px 0 12px;
    background: var(--accent-soft); border-left:3px solid var(--accent); border-radius: var(--r-sm); }
  /* ---------- conversations (sent mail) ---------- */
  /* Widened from 42%/300px at Dipesh's request (2026-08-20) so subject
     lines/previews have real room; keeps the 760px mobile breakpoint
     below and adds one tablet-range step so a mid-size viewport doesn't
     jump straight from 55% to full-width. */
  .mail-split .ml-list { width: 55%; min-width: 340px; max-width: 560px; }
  @media (max-width: 1000px) { .mail-split .ml-list { width: 46%; min-width: 300px; } }
  .ml-group { position:sticky; top:0; z-index:1; background: var(--surface-2);
    padding: 6px 14px; font-size: 11px; font-weight:700; letter-spacing:.05em;
    text-transform:uppercase; color: var(--ink-muted); border-bottom:1px solid var(--border); }
  .ml-item { appearance:none; -webkit-appearance:none; width:100%;
    text-align:left; font:inherit; color:inherit; background:transparent;
    border:0; border-radius:0; border-bottom:1px solid var(--border);
    display:flex; gap:11px; padding: 11px 14px;
    cursor:pointer; align-items:flex-start; }
  .ml-item:hover { background: var(--surface-2); }
  .ml-item.sel { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
  .ml-av { width:34px; height:34px; border-radius:50%; flex-shrink:0; background:#1A7B70;
    color:#fff; display:flex; align-items:center; justify-content:center;
    font-size:12.5px; font-weight:700; }
  .ml-tx { display:flex; flex-direction:column; min-width:0; flex:1; gap:1px; }
  .ml-r1 { display:flex; align-items:baseline; gap:8px; }
  .ml-r1 b { font-size:13px; font-weight:650; white-space:nowrap; overflow:hidden;
    text-overflow:ellipsis; }
  .ml-when { margin-left:auto; font-size:11px; color: var(--ink-faint); white-space:nowrap; }
  .ml-subj { font-size:12.5px; font-weight:600; color: var(--ink);
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .ml-count { display:inline-block; margin-left:6px; font-size:10.5px; font-weight:700;
    background: var(--surface-2); border:1px solid var(--border); border-radius:999px; padding:0 6px; }
  .ml-prev { font-size:11.5px; color: var(--ink-muted); white-space:nowrap; overflow:hidden;
    text-overflow:ellipsis; }
  .ml-badge { align-self:flex-start; margin-top:3px; font-size:10px; font-weight:700;
    padding:1px 7px; border-radius:999px; }
  .ml-badge.replied { background: rgba(27,127,76,0.13); color:#1B7F4C; }
  .ml-badge.sent { background: var(--surface-2); color: var(--ink-muted); }

  .mt-msg { border:1px solid var(--border); border-radius: var(--r-sm); padding: 12px 14px;
    margin-bottom: var(--sp-4); background: var(--surface); }
  .mt-msg.in { background: var(--surface-2); }
  .mt-head { display:flex; align-items:center; gap:10px; margin-bottom:9px; }
  .mt-av { width:28px; height:28px; border-radius:50%; flex-shrink:0; background: var(--cool);
    color:#fff; display:flex; align-items:center; justify-content:center; font-size:11.5px; font-weight:700; }
  .mt-av.me { background: var(--accent); }
  .mt-who { display:flex; flex-direction:column; min-width:0; }
  .mt-who b { font-size:12.5px; }
  .mt-who em { font-style:normal; font-size:11px; color: var(--ink-muted);
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mt-when { margin-left:auto; font-size:11px; color: var(--ink-faint); white-space:nowrap; }
  .mt-body { font-size:13px; line-height:1.6; white-space:pre-wrap; word-break:break-word; }
  .id-status.ok { background: rgba(27,127,76,0.13); color:#1B7F4C; }
  @media (max-width: 760px) { .mail-split .ml-list { width:100%; min-width:0; } }
  /* ---------- mail-client inbox ---------- */
  .inbox-item { appearance:none; -webkit-appearance:none; display:block; width:100%;
    text-align:left; font:inherit; color:inherit; background:transparent; border:0;
    border-radius:0;
    position:relative; padding: 10px 14px 11px 18px; border-bottom:1px solid var(--border);
    cursor:pointer; }
  .inbox-item:hover { background: var(--surface-2); }
  .inbox-item.sel { background: var(--accent-soft); }
  .ii-bar { position:absolute; left:0; top:0; bottom:0; width:3px; background:transparent; }
  .inbox-item.sel .ii-bar { background: var(--accent); }
  .ii-row1 { display:flex; align-items:center; gap:7px; margin-bottom:2px; }
  .ii-dot { width:7px; height:7px; border-radius:50%; background: var(--accent); flex-shrink:0; }
  .inbox-item.is-decided .ii-dot { background: var(--good); }
  .ii-from { font-size:12.5px; font-weight:650; color: var(--ink); white-space:nowrap;
    overflow:hidden; text-overflow:ellipsis; }
  .ii-when { margin-left:auto; font-size:11px; color: var(--ink-faint); white-space:nowrap; }
  /* These are spans inside a <button> (phrasing content), so the block
     layout they used to get from being <div>s is restored here. ii-row1
     keeps the flex it already had — a blanket display:block would out-
     specify .ii-row1 above and stack the dot, section and status. */
  .inbox-item .ii-title, .inbox-item .ii-prev { display:block; }
  .inbox-item .ii-row1 { display:flex; }
  .inbox-item .ii-title { font-size:13.5px; font-weight:600; line-height:1.35; color: var(--ink);
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .ii-prev { font-size:12px; color: var(--ink-muted); line-height:1.4; margin-top:2px;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

  /* Reading pane: fixed header (subject + from + actions), scrolling body. */
  .inbox-detail { display:flex; flex-direction:column; padding:0; }
  .id-head { padding: var(--sp-4) var(--sp-5) var(--sp-3); border-bottom:1px solid var(--border);
    flex-shrink:0; background: var(--surface); }
  .id-head .id-title { font-size:17px; font-weight:700; line-height:1.35; margin:0 0 10px; }
  .id-from { display:flex; align-items:center; gap:10px; margin-bottom: var(--sp-3); }
  .id-avatar { width:30px; height:30px; border-radius:50%; background: var(--accent); color:#fff;
    display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; flex-shrink:0; }
  .id-fromtx { display:flex; flex-direction:column; min-width:0; }
  .id-fromtx b { font-size:13px; }
  .id-fromtx em { font-style:normal; font-size:11.5px; color: var(--ink-muted); }
  .id-status { margin-left:auto; font-size:11px; font-weight:650; padding:3px 9px; border-radius:999px; white-space:nowrap; }
  .id-status.appr { background: rgba(196,59,59,0.12); color:#97201F; }
  .id-status.flag { background: rgba(192,138,18,0.14); color:#7A5504; }
  .id-head .inbox-actions { margin-top:0; padding-top:0; border-top:none; }
  .id-head .id-note { margin-top: var(--sp-3); width:100%; }
  .id-scroll { flex:1; min-height:0; overflow-y:auto; padding: var(--sp-4) var(--sp-5) var(--sp-5); }
  .inbox-detail .id-body { font-size:14px; line-height:1.65; }
  /* mdFormat() output -- real <p>/<ul>/<ol>/<b>/<i>/<code>, not escaped
     asterisks and literal newlines, in both the detail body and the
     quoted-sentence callout above it. */
  .inbox-detail .id-body p, .inbox-detail .id-ask p,
  .inbox-detail .id-body ul, .inbox-detail .id-ask ul,
  .inbox-detail .id-body ol, .inbox-detail .id-ask ol { margin:0 0 10px; }
  .inbox-detail .id-body p:last-child, .inbox-detail .id-ask p:last-child,
  .inbox-detail .id-body ul:last-child, .inbox-detail .id-ask ul:last-child,
  .inbox-detail .id-body ol:last-child, .inbox-detail .id-ask ol:last-child { margin-bottom:0; }
  .inbox-detail .id-body ul, .inbox-detail .id-ask ul,
  .inbox-detail .id-body ol, .inbox-detail .id-ask ol { padding-left:22px; }
  .inbox-detail .id-body li, .inbox-detail .id-ask li { margin-bottom:4px; }
  .inbox-detail .id-body b, .inbox-detail .id-ask b { font-weight:700; color: var(--ink); }
  .inbox-detail .id-body code, .inbox-detail .id-ask code { background: var(--surface-2);
    padding:1px 6px; border-radius:5px; font-size:0.92em; }
  .inbox-detail .id-mail { display:inline-flex; align-items:center; gap:7px; margin-top: var(--sp-4);
    font-size:13px; font-weight:600; text-decoration:none; padding:8px 13px;
    border:1px solid var(--border); border-radius: var(--r-sm); color: var(--accent);
    background: var(--surface); max-width:100%; word-break:break-word; }
  .inbox-detail .id-mail:hover { border-color: var(--accent); background: var(--accent-soft); }
  .inbox-detail .id-mail:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
  /* a guessed search reads quieter than a known correspondent's thread */
  .inbox-detail .id-mail.is-search { color: var(--ink-muted); font-weight:500; }
  .inbox-actions { display:flex; flex-wrap:wrap; gap: var(--sp-2); margin-top: var(--sp-5);
    padding-top: var(--sp-4); border-top:1px solid var(--border); }
  .inbox-actions button { font-size:13px; padding:9px 14px; }
  .btn-approve { background: var(--good); }
  .btn-reject { background: var(--bad); }
  .btn-info, .btn-resolve { background: var(--surface-2); color: var(--ink); border:1px solid var(--border); box-shadow:none; }
  .id-note { width:100%; margin-top: var(--sp-3); }
  .id-done { margin-top: var(--sp-3); font-size:13px; color: var(--good); font-weight:600; }
  .inbox-empty { padding: var(--sp-5); color: var(--ink-faint); font-style:italic; }
  /* Settings drawer: a real form, not a data table — grouped fields with
     inline help text under each one so a person editing who gets CC'd on
     outreach mail understands the consequence right there, not in a
     separate doc. */
  .settings-group { margin-bottom: var(--sp-6); }
  .settings-group:last-of-type { margin-bottom: var(--sp-4); }
  .settings-group h3 { font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
    color: var(--ink-faint); margin: 0 0 var(--sp-4); padding-bottom: var(--sp-2); border-bottom:1px solid var(--border); }
  .settings-field { margin-bottom: var(--sp-5); }
  .settings-field label { font-size:13.5px; font-weight:600; color: var(--ink); margin-bottom:6px; }
  .settings-field textarea, .settings-field input[type=email], .settings-field input[type=number],
  .settings-field input[type=text] {
    width:100%; font-family: inherit; font-size:13.5px; padding:9px 12px; border:1px solid var(--border);
    border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); resize: vertical; margin-bottom:0; }
  .settings-field textarea { font-family: ui-monospace, monospace; line-height:1.6; }
  .settings-field textarea:focus, .settings-field input:focus { border-color: var(--accent); outline:none; }
  .settings-help { margin: 6px 0 0; font-size:12px; color: var(--ink-faint); line-height:1.5; }
  .settings-actions { display:flex; align-items:center; gap: var(--sp-3); margin-top: var(--sp-5);
    padding-top: var(--sp-4); border-top:1px solid var(--border); }
  .settings-save { font-size:14px; padding:10px 20px; }
  .settings-save:disabled { opacity:.6; cursor:default; }
  .settings-status { font-size:13px; font-weight:600; }
  .settings-status.ok { color: var(--good); }
  .settings-status.err { color: var(--bad); }
  .wh-intro { margin-bottom: var(--sp-4); }
  .wh-grid { display:flex; flex-direction:column; gap: var(--sp-3); }
  .wh-row { display:flex; align-items:center; gap:10px; }
  .wh-region { width:64px; flex-shrink:0; font-size:13px; font-weight:650; color: var(--ink); }
  .wh-tz { flex:1; min-width:0; font-family: inherit; font-size:13px; padding:7px 10px; border:1px solid var(--border);
    border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); }
  .wh-hour { width:56px; flex-shrink:0; font-family: inherit; font-size:13px; padding:7px 8px; border:1px solid var(--border);
    border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); text-align:center; }
  .wh-to { font-size:12px; color: var(--ink-faint); flex-shrink:0; }
  @media (max-width: 760px) { .inbox-split { flex-direction:column; } .inbox-list { width:100%; max-height:38%; border-right:none; border-bottom:1px solid var(--border); } }

  .queue-list { list-style:none; margin: var(--sp-3) 0 0; padding:0; display:flex; flex-direction:column; gap: 12px; }
  .qc-top { display:flex; align-items:center; gap:9px; margin-bottom:9px; }
  .qc-icon { width:24px; height:24px; border-radius:7px; display:flex; align-items:center; justify-content:center;
    font-size:12px; flex-shrink:0; }
  .qc-icon::before { content: "\2022"; }
  .queue-list[data-kind="approval"] .qc-icon { background: var(--accent-soft); color: var(--accent); }
  .queue-list[data-kind="approval"] .qc-icon::before { content: "\25D4"; }
  .queue-list[data-kind="flag"] .qc-icon { background: var(--warn-soft); color: var(--warn); }
  .queue-list[data-kind="flag"] .qc-icon::before { content: "\2691"; }
  .qc-index { font-family: ui-monospace, monospace; font-size:11px; color: var(--ink-faint); letter-spacing:.02em; }
  /* On the detail pane these sit beside the verdict buttons rather than
     appearing on hover, so they are reachable on a touch screen. */
  .id-tools { display:flex; gap:6px; margin:8px 0 0; }
  /* 26px is well under the 44px touch minimum. The glyph stays its size;
     the hit area grows around it. */
  @media (pointer: coarse) {
    .id-tools .qc-btn { width:44px; height:44px; }
  }
  .qc-btn { width:26px; height:26px; border-radius:7px; border:1px solid var(--border); background: var(--surface-2);
    color: var(--ink-muted); display:flex; align-items:center; justify-content:center; font-size:12px; cursor:pointer;
    padding:0; transition: background .12s var(--ease), color .12s var(--ease); }
  .qc-btn:hover { background: var(--border); color: var(--ink); }
  .qc-btn.qc-copied { background: var(--good-soft); color: var(--good); }
  .qc-body { font-size:14px; line-height:1.65; color:#323338; }
  .queue-list li.queue-empty { list-style:none; display:flex; flex-direction:column; align-items:center;
    justify-content:center; gap:8px; padding: 52px 20px; border:1px dashed var(--border); border-radius:12px;
    color: var(--ink-faint); text-align:center; }
  .queue-list li.queue-empty .qes-icon { font-size:26px; }
  .queue-list li.queue-empty .qes-text { font-size:13.5px; font-style:italic; }

  /* Navigation: Pixel Office is the landing view. A true segmented
     control (one grouped track, a single sliding selection thumb) picks
     between the five real views — this is the standard HIG pattern for
     "one mutually-exclusive choice among a handful," and it reads very
     differently from a row of independent buttons: the motion itself
     tells you which state you left and which you're entering. "Ask
     Lynda" is deliberately NOT a segment — it doesn't change what's on
     screen, it opens an overlay, so it sits apart as its own action
     rather than pretending to be a sixth mutually-exclusive state. */
  /* The track hugs its segments (max-content) instead of stretching —
     a segmented control spanning 1100px of empty space reads as a
     stretched toolbar, not a compact choice among five options. */
  .nav-row { display:flex; align-items:center; justify-content:center; gap: var(--sp-3); flex-wrap:wrap; }
  /* Top chrome, second pass. Was three stacked rows eating 28% of a 720px
     viewport, with three different control heights (30 / 38 / 44) sitting
     next to each other — that mismatch is most of what read as unfinished.
     Now two rows on one shared 40px control rhythm, and the two static
     values (agent id, model) moved into the Lynda card: they never change,
     so they were spending prime space to say nothing. */
  .topbar-status { display:flex; align-items:center; gap: 7px; flex-wrap:wrap; min-width:0; }
  .pill-row { display:none; }
  .nav-row { align-items:stretch; }
  .segmented, .ask-lynda-nav { height: 40px; }
  .segmented { align-items:center; }
  .ask-lynda-nav { display:inline-flex; align-items:center; min-height:40px; padding:0 16px; }
  .fact-pill { display:inline-flex; align-items:center; min-height:30px;
    box-shadow: 0 1px 3px -1px rgba(20,18,40,0.18); }
  .segmented, .ask-lynda-nav { box-shadow: 0 2px 8px -3px rgba(20,18,40,0.22); }
  /* topbar-left/-right (logo through the sign-out button) no longer need
     their own lift shadow — that was compensating for floating directly
     on the scene when .chrome-overlay was transparent; now that the bar
     itself is solid white, a shadow on top of it just looks like a
     stray line rather than a floating capsule. */
  .topbar-left, .topbar-right { box-shadow: none; }
  /* Row 1 sits on ONE height. The brand panel was 72px against the account
     panel's 46px — two panels on the same line with a 26px height
     difference is what made the row look assembled rather than designed.
     The logo stays large (Dipesh asked for that when it was too small to
     read) but is sized to the row instead of setting it. */
  .topbar-left, .topbar-right { height: 56px; display:flex; align-items:center; }
  .ws-logo { height: 42px; }
  .topbar-right { gap: 10px; }
  .hf-mono { font-family: ui-monospace, monospace; font-size:11px; }
  /* Phones: the desktop layout wrapped into three stacked lines and took
     32% of a 780px-tall screen — worse than the 19% it costs on desktop,
     on the device with the least room to spare. The scene is the point of
     this view, so the chrome gives ground: shorter brand lockup, no email
     address (the sign-out button is the thing you actually reach for), and
     the two panels share a line with the status chip. */
  @media (max-width: 760px) {
    .chrome-overlay { padding: 8px 10px; }
    .topbar { gap: 6px 8px; margin-bottom: 8px; }
    .topbar-left, .topbar-right { height: 42px; padding: 4px 9px; }
    .ws-logo { height: 30px; }
    .topbar-right .muted { display:none; }
    .topbar-status { order: 3; width: 100%; }
    .fact-pill { min-height: 26px; font-size: 11px; padding: 4px 9px; }
    .segmented, .ask-lynda-nav { height: 36px; min-height: 36px; }
    .segment { font-size: 12.5px; padding: 6px 11px; }
    .ask-lynda-nav { font-size: 12.5px; padding: 0 12px; }
    .nav-row { gap: 8px; }
    /* Both strips scroll horizontally via touch momentum already — the
       fade is just so that's visible instead of looking like a hard
       clip. Real screens with a real snapshot are why this is a fixed
       28px band rather than a percentage: on the eight real nav labels,
       a percentage-based fade either barely showed on wide phones or
       ate half of "Settings" on narrow ones. */
    .segmented { mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%);
      -webkit-mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%); }
    .table-wrap { mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%);
      -webkit-mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%); }
    /* The SOP diagram (viewBox 2000x860) has an inline width:100% so it
       fills the desktop drawer (tuned to 1600px — already a deliberate
       0.8x scale, about as far as that diagram reads). On a phone the
       same rule shrinks it to ~325px, small enough that no text in it is
       legible at any zoom the drawer offers. !important is the only way
       to beat that inline style from here; overriding to the diagram's
       own native width lets the existing overflow-x:auto wrapper do a
       real horizontal+vertical scroll at a size the labels can be read
       at, instead of a shrink nobody can read. */
  }

  /* Fill the drawer, and scroll at native size once the drawer is too
     narrow for that to be legible.

     An unconditional min-width:1600px was worse than the breakpoint it
     replaced: the drawer caps at min(1600px,96vw) and the body eats ~34px
     of padding, so 1600 never fitted and every desktop got a permanent
     horizontal scrollbar for 2.2% more diagram — and it reintroduced a 25%
     size jump at exactly 900px. width:100% fits whatever the drawer gives
     it; below 1100px of viewport that is under ~0.5x, where the labels stop
     reading, so there it goes to native size and the wrapper scrolls. */
  .drawer[data-view="sop"] svg { width:100% !important; height:auto !important;
    min-width:0 !important; }
  @media (max-width: 1100px) {
    .drawer[data-view="sop"] svg { width:2000px !important; min-width:2000px !important; }
  }


  .segmented { position:relative; display:flex; width:max-content; max-width:100%;
    background: #F2F2F6; border:1px solid rgba(20,18,40,0.12);
    border-radius: var(--r-lg); padding: 3px; gap:2px; overflow-x:auto; -webkit-overflow-scrolling:touch; min-width:0; }
  .segmented-thumb { position:absolute; top:3px; bottom:3px; left:3px; width:0; border-radius: calc(var(--r-lg) - 3px);
    background: var(--surface); box-shadow: 0 2px 10px -4px rgba(20,18,40,0.30);
    transition: transform .28s var(--ease), width .28s var(--ease); z-index:0; }
  .segment { position:relative; z-index:1; flex-shrink:0; font-size:13.5px; font-weight:600; padding:8px 15px;
    border-radius: calc(var(--r-lg) - 3px); background:transparent; color:var(--ink-muted); border:none; cursor:pointer;
    white-space:nowrap; min-height:36px; transition: color .2s var(--ease); }
  .segment.active { color: var(--ink); }
  .ask-lynda-nav { flex-shrink:0; font-size:13.5px; font-weight:600; padding:9px 16px; border-radius: var(--r-lg);
    background: #EBE8FB; color: #4B3BC4; border:1px solid rgba(20,18,40,0.10);
    cursor:pointer; white-space:nowrap; min-height:36px; }
  .card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
  label { display:block; font-size: 12px; color: var(--ink-muted); margin-bottom: 6px; }
  input[type=email], input[type=text] { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface-2); color: var(--ink); font-size: 14px; margin-bottom: 14px; outline: none; }
  input[type=email]:focus, input[type=text]:focus { border-color: var(--accent); }
  button { background: var(--accent); color: #fff; border: none; padding: 10px 18px; border-radius: 8px; font-size: 14px;
    font-weight: 600; cursor: pointer; box-shadow: 0 4px 14px -6px var(--accent-glow); }
  button:hover { filter: brightness(1.08); }
  .ghost-btn { background: var(--surface-2); color: var(--ink-muted); border: 1px solid var(--border); box-shadow:none; font-weight:500; font-size:12px; padding: 6px 12px; }
  .icon-btn { background: var(--surface-2); color: var(--ink-muted); border: 1px solid var(--border); width: 32px; height: 32px;
    border-radius: 8px; display:flex; align-items:center; justify-content:center; box-shadow:none; padding:0; font-size:14px; }

  /* Topbar */
  .topbar { display:flex; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-bottom: var(--sp-3); gap: 10px 16px; }
  /* .chrome-overlay itself is fully transparent now (the scene shows
     through everywhere), which left the logo and the email/theme/
     sign-out cluster sitting with no backing at all — legible against a
     light patch of sky, not against skyline or a cloud. Same frosted
     treatment as .office-bubble (translucent white + blur), just as a
     backing panel behind these two groups instead of a standalone pill. */
  .topbar-left, .topbar-right { border-radius: var(--r-lg);
    background: rgba(255,255,255,0.6); -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15);
    border: 1px solid rgba(255,255,255,0.5); padding: 6px 12px; }
  .topbar-left { display:flex; align-items:center; gap: 10px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--cool));
    display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:14px; flex-shrink:0; }
  .topbar-right { display:flex; align-items:center; gap: 8px; flex-shrink:0; }
  .pill-row { display:flex; flex-wrap:wrap; gap: 7px; margin-bottom: var(--sp-3); }
  /* Each control is its own chip rather than one unifying bar, so the
     skyline keeps showing between them. The chip fills are OPAQUE, not
     frosted: the sky is now driven by real weather and goes properly dark
     at night, and a translucent light fill over a night sky left this
     dark-on-dark and unreadable. Contrast can't depend on the scene when
     the scene is live data. */
  .fact-pill { font-family: ui-monospace, monospace; font-size: 12px; padding: 5px 11px; border-radius: 999px;
    background: #E6F4EE; color: #14694A; border: 1px solid rgba(20,18,40,0.10); }
  .fact-pill.alarm { background: #FBE3E3; color: #98211F; border-color: rgba(209,67,67,0.38); font-weight:700; }
  .fact-pill.info { background: #F2F2F6; color: #3D3B4D; }
  .fact-pill.alarm { background: #FBE3E3; color: #98211F; border-color: rgba(209,67,67,0.35); font-weight:700; }

  /* Bot hero card */
  .bot-card-top { display:flex; align-items:center; gap: 14px; margin-bottom: 14px; }
  .bot-avatar { width: 52px; height: 52px; border-radius: 13px; background: linear-gradient(135deg, var(--accent), var(--cool));
    display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:21px; flex-shrink:0; }
  .bot-name-row { display:flex; align-items:center; gap:8px; }
  .bot-name { font-size: 19px; font-weight: 700; }
  .bot-meta { font-size: 13px; color: var(--ink-faint); font-family: ui-monospace, monospace; margin-top:3px; }
  .status-pill { font-family: ui-monospace, monospace; font-size: 11px; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing:.03em; display:inline-flex; align-items:center; gap:5px; }
  .status-pill.ok { background: var(--good-soft); color:#0A7A4A; }
  .status-pill.warn { background: var(--warn-soft); color: var(--warn); }
  .model-badge { margin-left:auto; font-family: ui-monospace, monospace; font-size: 12px; padding: 6px 11px; border-radius: 8px;
    background: var(--accent-soft); color: var(--accent); white-space:nowrap; }
  .dot { width:7px; height:7px; border-radius:50%; display:inline-block; }
  .dot.ok { background: var(--good); box-shadow: 0 0 0 2.5px var(--good-soft); }
  .dot.warn { background: var(--warn); box-shadow: 0 0 0 2.5px var(--warn-soft); }
  .dot.bad { background: var(--bad); box-shadow: 0 0 0 2.5px var(--bad-soft); }
  .platform-row { display:flex; flex-wrap:wrap; gap: 8px; margin-bottom: 16px; }
  .platform-pill { display:flex; align-items:center; gap:6px; font-size: 13px; padding: 6px 11px; border-radius: 8px; background: var(--surface-2); color: var(--ink-muted); }
  .bot-stats-row { display:grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
  .bot-stat .num { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height:1.1; }
  .bot-stat .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); margin-top: 4px; }
  @media (max-width: 560px) { .bot-stats-row { grid-template-columns: repeat(2, 1fr); } }
  .sparkline { width: 100%; height: 36px; display:block; }
  .sparkline-caption { font-size: 11px; color: var(--ink-faint); text-align:right; margin-top:3px; }
  .sparkline polyline { fill:none; stroke: var(--accent); stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

  /* Cron/staleness alerts live inside the stats-hud capsule now (see
     .hud-alert below) rather than a page-wide banner. */
  .hud-now { font-size:12.5px; line-height:1.45; color: var(--ink); margin-bottom: var(--sp-3); }
  .hud-now .hn-label { display:block; font-size:10px; letter-spacing:0.08em; text-transform:uppercase;
    color: var(--ink-faint); margin-bottom:2px; }
  .hud-facts { display:flex; flex-direction:column; gap:4px; margin-bottom: var(--sp-3);
    padding-bottom: var(--sp-3); border-bottom:1px solid var(--border); }
  .hud-facts .hf { display:flex; justify-content:space-between; align-items:baseline; gap:10px; font-size:12px; }
  .hud-facts .hf span { color: var(--ink-muted); }
  .hud-facts .hf b { font-variant-numeric: tabular-nums; }
  /* The capsule is a glance and a door now, not a container. Its detail
     moved into the Status screen rather than being copied there: two
     copies would mean duplicate sparkline/probe ids, and the 20s poll
     only updates the first match — the second would sit quietly going
     stale. Moving it also makes this reachable on a phone, where
     .stats-hud is display:none. */
  .status-screen .bot-stats-row { grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); margin: var(--sp-4) 0; }
  .status-screen .bot-stat .num { font-size: 26px; }
  .status-screen .hud-now { font-size: 14.5px; }
  .status-screen .hud-facts { border-bottom:1px solid var(--border); }
  @media (max-width: 720px) { .status-screen .bot-stats-row { grid-template-columns: repeat(2, 1fr); } }

  /* Top facts/branding strip: solid white, as asked. Deliberately the
     OPPOSITE of the nav row directly beneath it, which stays frosted glass
     so the skyline shows through — two adjacent strips, two treatments, on
     purpose rather than by accident.
     Colours are stated outright instead of themed: this strip is white in
     both themes, so its contents must not inherit dark-theme ink and
     disappear on it. */
  .topbar { background:#FFFFFF; border:1px solid rgba(20,18,40,0.10);
    border-radius: var(--r-lg); padding: 8px 14px;
    box-shadow: 0 2px 10px -4px rgba(20,18,40,0.20); }

  /* The needs-you row. Sits under the topbar, inside .chrome-overlay, so it
     is present on every screen — the two places this used to live were the
     stats-hud capsule (display:none below 860px) and the `status` drawer,
     which is the last sub-tab of a group nobody opens looking for work.

     Fixed light colours, not theme tokens, on purpose: .chrome-overlay
     floats over artwork whose palette does not follow the theme, and it
     locally redefines --surface/--border for exactly that reason. It carries
     its own opaque fill for the same reason .topbar does — over a skyline,
     text with no backing is unreadable about half the time.

     The empty state is styled, not hidden. "Nothing needs you" has to be
     something the reader can see is being asserted; an element that
     disappears when there is no work looks the same as one that broke. */
  /* Inside the topbar now, so it carries no surface of its own — the bar
     is the surface. A white card here split the rail-and-topbar "L" in two. */
  .needs { display:flex; align-items:center; gap:9px; flex-wrap:wrap;
    margin:0; padding:0; background:transparent; border:0; border-radius:0;
    box-shadow:none; min-width:0; }
  /* State reads as a dot, not a rule: a 4px left border needs a card to sit
     against, and there is no card any more. */
  .needs::before { content:""; flex:0 0 auto; width:7px; height:7px;
    border-radius:50%; background:currentColor; opacity:.75; }
  .needs[data-state="clear"]::before { display:none; }
  .needs-say { margin:0; min-width:0; font-size:12.5px; line-height:1.3;
    font-weight:600; white-space:nowrap; overflow:hidden;
    text-overflow:ellipsis; }
  .needs[data-state="clear"]   { color:var(--rail-ink-dim); }
  .needs[data-state="clear"] .needs-say { font-weight:500; }
  .needs[data-state="open"]    { color:#FFC24B; }
  .needs[data-state="blocked"] { color:#FF8A80; }
  .needs-go, .needs-alt { flex:0 0 auto; border-radius: var(--r-ctl);
    padding:4px 11px; font:600 11.5px/1.2 inherit; cursor:pointer;
    border:1px solid transparent; white-space:nowrap; }
  .needs-go { background:#FFFFFF; color:#2A2740; }
  .needs-go:hover { background:#EFEDF6; }
  .needs[data-state="blocked"] .needs-go { background:#B3261E; color:#FFF; }
  .needs[data-state="blocked"] .needs-go:hover { background:#8C1D18; }
  .needs-alt { background:transparent; color:inherit;
    border-color:currentColor; opacity:.85; }
  .needs-alt:hover { opacity:1; background:#FFFFFF14; }
  .needs-go:focus-visible, .needs-alt:focus-visible {
    outline:2px solid #FFFFFF; outline-offset:2px; }
  @media (max-width: 700px) {
    /* The sentence gets the row to itself and the buttons sit under it,
       rather than the sentence being squeezed to two words a line. */
    .needs { padding:8px 11px; gap:8px; }
    .needs-say { flex:1 1 100%; font-size:13px;
      white-space:normal; overflow:visible; text-overflow:clip; }
  }
  /* The brand and account groups were frosted panels because the strip
     behind them was transparent. On a white bar that reads as panels on a
     panel, so they flatten into it. */
  .topbar-left, .topbar-right { background: transparent; border: none;
    -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none;
    padding: 0; height: auto; }
  /* The account cluster stays right-aligned even when the status pills
     push it onto a second line — it was wrapping to x=35, directly under
     the logo, which read as a mistake. The long LLM-alert pill makes that
     wrap likely on anything under ~1500px, so it has to look deliberate.
     The status group is allowed to shrink and scroll rather than force
     the wrap in the first place. */
  .topbar-right { margin-left: auto; }
  .topbar-status { flex: 1 1 auto; min-width: 0; overflow-x: auto;
    scrollbar-width: none; flex-wrap: nowrap; }
  .topbar-status::-webkit-scrollbar { display: none; }
  .topbar-right .muted { color:#5C5A6B; }
  .topbar .icon-btn { background:#F2F2F6; color:#3D3B4D; border:1px solid rgba(20,18,40,0.12); }
  .topbar .eyebrow { color: var(--accent); }
  /* Office view switcher. Same glass material as the nav strip so it reads
     as part of the same control layer floating over the scene. */
  .office-view-toggle { position:fixed; right: var(--sp-5); bottom: 88px; z-index:16;
    display:flex; gap:2px; padding:3px; border-radius:999px;
    background: rgba(255,255,255,0.72); border:1px solid rgba(255,255,255,0.55);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 8px 32px -8px rgba(20,18,40,0.28), inset 0 1px 0 rgba(255,255,255,0.75); }
  .ov-btn { font-size:12px; font-weight:600; padding:6px 13px; border-radius:999px;
    border:none; background:transparent; color:#3D3B4D; cursor:pointer; white-space:nowrap; }
  .ov-btn.on { background:#fff; color:#1B1A22;
    box-shadow: 0 2px 8px -2px rgba(20,18,40,0.30); }
  /* Only meaningful on the office view — every other view is a drawer on
     top of it, where switching the scene underneath does nothing useful. */
  body:not(.view-office) .office-view-toggle { display:none; }
  @media (max-width: 560px) { .office-view-toggle { bottom: 80px; right: var(--sp-3); } }
  .stats-hud { cursor: pointer; }
  .stats-hud .probe-row, .stats-hud .probe-btn { cursor: auto; }
  .stats-hud .probe-btn { cursor: pointer; }
  /* ---------- overview / hub screen ---------- */
  .hub { display:flex; flex-direction:column; gap: var(--sp-4); }
  .hub-hero { display:flex; align-items:flex-start; justify-content:space-between; gap: var(--sp-4); }
  .hub-now { font-size: 17px; font-weight:600; line-height:1.4; margin-top:2px; text-wrap:balance; }
  .hub-tiles { display:grid; grid-template-columns: repeat(6, 1fr); gap: var(--sp-3); }
  .hub-tile { background: var(--surface-2); border:1px solid var(--border); border-radius: var(--r-sm);
    padding: 12px 14px; }
  .ht-n { font-size: 22px; font-weight:700; font-variant-numeric: tabular-nums; line-height:1.15; }
  .ht-l { font-size: 11px; color: var(--ink-muted); margin-top:3px; }
  .hub-facts { display:grid; grid-template-columns: repeat(2, 1fr); gap: 6px var(--sp-5); }
  /* .hf only gets its flex layout under .hud-facts, so inside the hub the
     label and value collapsed into one run of text ("Next scouting passin
     1h 44m"). Restate it here rather than widening the original selector,
     which the capsule depends on. */
  .hub-facts .hf { display:flex; align-items:baseline; justify-content:space-between;
    gap: 10px; font-size: 12.5px; }
  .hub-facts .hf span { color: var(--ink-muted); }
  .hub-facts .hf b { color: var(--ink); text-align:right; }
  .hub-sec { font-size: 10.5px; letter-spacing:.08em; text-transform:uppercase; color: var(--ink-faint);
    margin-top: var(--sp-2); }
  .hub-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
  .hub-card { display:flex; align-items:center; gap: 12px; text-align:left; width:100%;
    background: var(--surface); border:1px solid var(--border); border-radius: var(--r-sm);
    padding: 13px 14px; cursor:pointer; min-height:56px; transition: border-color .16s var(--ease), transform .16s var(--ease); }
  .hub-card:hover { border-color: var(--accent); transform: translateY(-1px); }
  .hub-card:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
  .hub-ic { font-size: 19px; flex-shrink:0; }
  .hub-tx { display:flex; flex-direction:column; min-width:0; }
  /* Explicit colour: a broader `b` rule elsewhere in this stylesheet paints
     bold text white (it was written for a dark surface), so the card titles
     were rendering white-on-white and looked simply absent. */
  .hub-tx b { font-size: 13.5px; font-weight:650; color: var(--ink); }
  .hub-tx em { font-style:normal; font-size: 11.5px; color: var(--ink-muted); margin-top:1px; }
  .hub-go { margin-left:auto; color: var(--ink-faint); }
  @media (max-width: 900px) { .hub-tiles { grid-template-columns: repeat(3, 1fr); } }
  @media (max-width: 620px) {
    .hub-tiles { grid-template-columns: repeat(2, 1fr); }
    .hub-grid, .hub-facts { grid-template-columns: 1fr; }
    .hub .probe-btn { min-height: 44px; }
  }

  /* Menu strip: no solid fill. Same frosted treatment as the brand and
     account panels, which stays legible over both the day sky and the
     night skyline — a fully transparent strip would leave dark segment
     text sitting on a dark building. */
  /* Apple-style glass material. The parts that make it read as glass
     rather than as a translucent box:
       - saturate(180%) BEFORE the blur, which is what gives the colour
         bleed-through its lift; blur alone just looks like frosted vinyl
       - a hairline top highlight (inset white) for the lit edge
       - a soft, wide, low-opacity shadow so it floats above the scene
     The fill stays light because the segment labels are dark ink and the
     skyline behind them goes properly dark at night. */
  .segmented {
    background: rgba(255,255,255,0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255,255,255,0.55);
    box-shadow: 0 8px 32px -8px rgba(20,18,40,0.28),
                inset 0 1px 0 rgba(255,255,255,0.75);
  }
  .segmented-thumb {
    background: rgba(255,255,255,0.96);
    box-shadow: 0 2px 8px -2px rgba(20,18,40,0.30),
                inset 0 1px 0 rgba(255,255,255,0.9);
  }
  /* Without backdrop-filter the fill is just 72% white over a busy
     skyline, which is unreadable. Fall back to something nearly opaque
     rather than shipping the see-through version to those browsers. */
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .segmented { background: rgba(255,255,255,0.95); }
  }
  .probe-row { display:flex; align-items:center; gap: var(--sp-3); flex-wrap:wrap; margin-top: var(--sp-3);
    padding-top: var(--sp-3); border-top:1px solid var(--border); }
  .probe-btn { font-size:12px; padding:6px 11px; white-space:nowrap; }
  .probe-out { font-size:11.5px; color: var(--ink-muted); font-family: ui-monospace, monospace; line-height:1.35; }
  .probe-out.ok { color:#1B7F4C; } .probe-out.bad { color:#97201F; }
  .hud-alert { display:flex; align-items:flex-start; gap: 7px; padding: 7px 10px; border-radius: var(--r-sm);
    margin-bottom: var(--sp-2); background: rgba(255,244,214,0.85); border: 1px solid rgba(255,255,255,0.55);
    color: #7A5504; font-size: 12.5px; line-height:1.35; }
  .hud-alert.bad { background: rgba(255,226,226,0.9); color: #97201F; }
  .stats-hud.has-alert .bot-avatar { position:relative; }
  .stats-hud.has-alert .bot-avatar::after { content:''; position:absolute; top:-3px; right:-3px; width:11px; height:11px;
    border-radius:50%; background:#E0A012; border:2px solid rgba(255,255,255,0.9); }
  .stats-hud.has-alert.has-alert-bad .bot-avatar::after { background:#D6362F; }

  table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 14px; }
  .table-wrap { overflow-x: auto; }
  th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: top; word-break: break-word; }
  th { font-family: ui-monospace, monospace; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); font-weight:600; white-space:nowrap; }
  tr:last-child td { border-bottom: none; }
  .pill { font-family: ui-monospace, monospace; font-size: 10.5px; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing:.03em; white-space:nowrap; display:inline-block; }
  .pill.t-cron { background: rgba(108,92,231,0.14); color: #4B3BC4; }
  .pill.t-agent { background: rgba(43,179,163,0.16); color: #0F5C52; }
  .pill.t-ask { background: rgba(184,134,11,0.16); color: #7A5504; }
  .pill.t-direct { background: rgba(20,18,40,0.08); color: #5C5A6B; }
  .pill.ok { background: var(--good-soft); color:#0A7A4A; }
  .pill.error { background: var(--warn-soft); color:#8A5A00; }
  .pill.bad { background: var(--bad-soft); color: var(--bad); }
  pre { white-space: pre-wrap; font-size: 13px; background: var(--surface-2); padding: 14px; border-radius: 8px; max-height: 420px; overflow-y: auto; margin:0; }
  /* MEMORY.md is shown verbatim — every character reaches the page
     unedited, including the raw "##"/"- " markers, since this is
     supposed to be what the agent actually holds, not a paraphrase.
     The only thing added is visual weight per line (bold headings, a
     thin accent rail down bullet lines) so a long real file reads as
     a document instead of one flat monospace wall — no text is
     stripped, reordered, or replaced by a redrawn marker. */
  /* ---------- prompts / memory editor ---------- */
  .drawer[data-view="prompts"] { width: min(1100px, 96vw); }
  .pr-wrap { display:flex; flex-direction:column; gap:10px; height:100%; min-height:0;
    padding: var(--sp-4) var(--sp-5); box-sizing:border-box; }
  .pr-tabs { display:flex; gap:4px; flex-wrap:wrap; }
  .pr-tab { border:1px solid var(--border); background: var(--surface-2); color: var(--ink);
    padding:6px 11px; border-radius: var(--r-sm); font-size:12.5px; cursor:pointer;
    font-family: ui-monospace, monospace; }
  .pr-tab:hover { background: var(--surface); }
  .pr-tab.sel { background: var(--accent); border-color: var(--accent); color:#fff; font-weight:600; }
  .pr-meta { display:flex; justify-content:space-between; gap:12px;
    font-size:11.5px; color: var(--ink-muted); }
  .pr-edit { flex:1; min-height:300px; width:100%; box-sizing:border-box; resize:vertical;
    font-family: ui-monospace, "SF Mono", monospace; font-size:12.5px; line-height:1.55;
    padding:12px; border:1px solid var(--border); border-radius: var(--r-sm);
    background: var(--surface); color: var(--ink); white-space:pre; overflow:auto; }
  .pr-bar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
  .pr-primary { border-color: var(--accent); color: var(--accent); font-weight:600; }
  .pr-primary.is-dirty { background: var(--accent); color:#fff; }
  .pr-status { font-size:12px; color: var(--ink-muted); }
  .pr-status.is-warn { color: #C08A12; }
  .pr-status.is-bad { color: var(--bad); }
  .mem-pre { white-space: normal; font-family: ui-monospace, monospace; font-size: 13px; background: var(--surface-2); padding: 14px; border-radius: 8px; margin:0; }
  .mem-line { white-space: pre-wrap; }
  .mem-line:empty::before { content: "\00a0"; }
  .mem-line.mem-h { font-weight:700; font-size:13.5px; color: var(--ink); margin-top:14px; }
  .mem-line.mem-h:first-child { margin-top:0; }
  .mem-line.mem-bullet { padding-left:10px; margin-left:2px; border-left:2px solid var(--accent-soft); color: var(--ink); }

  .office-hero-header { display:flex; align-items:center; gap: var(--sp-3); margin-bottom: var(--sp-3); }

  /* Floating chat widget */
  /* A labelled capsule, not a bare icon. A lone 💬 circle relies on the
     user guessing what it opens; the name is the affordance. Lives only
     here now — the duplicate in the top nav was removed. */
  .chat-bubble { position: fixed; bottom: 22px; right: 22px; height: 52px; border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--cool)); color:#fff; border:none;
    box-shadow: 0 8px 24px -6px var(--accent-glow); cursor:pointer; z-index: 40;
    display:flex; align-items:center; gap:10px; padding: 4px 20px 4px 4px;
    font-size: 14.5px; font-weight:600; letter-spacing:0.01em;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
  .chat-bubble:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -6px var(--accent-glow); }
  .chat-bubble:focus-visible { outline:2px solid #fff; outline-offset:2px; }
  .cb-face { width:44px; height:44px; border-radius:50%; flex-shrink:0; display:block;
    background:#EFE9FB; box-shadow: 0 0 0 2px rgba(255,255,255,0.85); }
  .cb-label { white-space:nowrap; }
  /* Narrow screens: the face alone, back to a circle — the label would
     crowd a phone's bottom bar. */
  @media (max-width: 560px) {
    .chat-bubble { padding: 4px; gap: 0; }
    .cb-label { display:none; }
  }
  .chat-bubble .unread-dot { position:absolute; top:2px; right:2px; width:11px; height:11px; border-radius:50%; background: var(--bad); border:2px solid var(--bg); display:none; }
  .chat-bubble.has-unread .unread-dot { display:block; }
  .chat-panel { position: fixed; bottom: 88px; right: 22px; width: 400px; max-width: calc(100vw - 40px); height: 520px; max-height: calc(100vh - 130px);
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 20px 50px -14px #00000060;
    display:flex; flex-direction:column; overflow:hidden; z-index: 39; }
  .chat-panel.hidden { display:none; }
  .chat-panel-header { display:flex; align-items:center; gap:10px; padding: 14px 16px; border-bottom: 1px solid var(--border); flex-shrink:0; }
  .chat-panel-header .bot-avatar { width:32px; height:32px; font-size:14px; border-radius:8px; }
  .chat-hd-face { width:32px; height:32px; border-radius:8px; flex-shrink:0; display:block;
    object-fit:cover; background:#EFE9FB; }
  .cb-face { object-fit: cover; }
  .chat-panel-title { font-size: 14.5px; font-weight: 700; }
  .chat-panel-sub { font-size: 11.5px; color: var(--ink-faint); }
  /* Only shown when the agent you are looking at is not the agent that
     answers. Amber rather than red: it is a fact worth knowing before you
     type, not a failure. */
  .chat-panel-note { margin-top:4px; font-size:11.5px; line-height:1.35;
    color:var(--chip-warn-ink, #92610A); background:var(--chip-warn-bg, #FEF3C7);
    border-radius:6px; padding:4px 7px; }
  .chat-panel-note[hidden] { display:none; }
  .chat-panel-close { margin-left:auto; }
  .ask-mic { flex-shrink:0; width:38px; height:38px; padding:0; display:flex; align-items:center;
    justify-content:center; border-radius:10px; background: var(--surface-2); color: var(--ink-muted);
    border:1px solid var(--border); cursor:pointer; }
  .ask-mic:hover { color: var(--ink); }
  .ask-mic[hidden] { display:none; }
  .ask-mic.listening { background:#e03533; border-color:#e03533; color:#fff;
    animation: micPulse 1.3s ease-in-out infinite; }
  @keyframes micPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(224,53,51,0.55); }
                        50% { box-shadow: 0 0 0 7px rgba(224,53,51,0); } }
  @media (prefers-reduced-motion: reduce) { .ask-mic.listening { animation: none; } }
  .ask-mic-note { font-size: 11.5px; color: var(--ink-faint); padding: 0 16px 8px; display:none; }
  .ask-mic-note.show { display:block; }

  .ask-log { flex:1; overflow-y: auto; padding: 16px; display:flex; flex-direction:column; gap: 12px; }
  .ask-turn { display:flex; flex-direction:column; gap: 6px; }
  .ask-q, .ask-a { padding: 10px 13px; border-radius: 12px; font-size: 14px; max-width: 88%; }
  .ask-q { background: var(--accent-soft); color: var(--ink); align-self: flex-end; border-bottom-right-radius:3px; white-space: pre-wrap; }
  .ask-a { background: var(--surface-2); color: var(--ink); align-self: flex-start; border: 1px solid var(--border); border-bottom-left-radius:3px; }
  .ask-a.pending { color: var(--ink-muted); font-style: italic; }
  /* mdFormat() output for the agent's own answer -- see the matching
     .inbox-detail rules above for why these exist. */
  .ask-a p, .ask-a ul, .ask-a ol { margin:0 0 8px; }
  .ask-a p:last-child, .ask-a ul:last-child, .ask-a ol:last-child { margin-bottom:0; }
  .ask-a ul, .ask-a ol { padding-left:20px; }
  .ask-a li { margin-bottom:3px; }
  .ask-a b { font-weight:700; }
  .ask-a code { background: var(--surface); padding:1px 5px; border-radius:4px; font-size:0.92em; }
  .ask-row { display:flex; gap: 8px; padding: 14px; border-top: 1px solid var(--border); flex-shrink:0; }
  .ask-row input { flex: 1; margin-bottom: 0; }
  .ask-empty { color: var(--ink-faint); font-size: 13.5px; font-style: italic; padding: 4px 0; }

  /* ---- part 04 screens: record, judgements, console ---- */
  .ab-age { font-size:12px; color:var(--ink-muted); margin:0 0 8px; }
  .ab-hint { font-size:12px; color:var(--ink-muted); margin:8px 0 0; }
  .ab-empty { padding:14px 16px; border:1px dashed var(--border);
              border-radius:10px; color:var(--ink-muted); font-size:13.5px; }
  /* Every panel renders through these. Restyling here is what makes the
     twenty screens one product rather than twenty. */
  /* NOT `left` on .drawer. It hides by sliding off the right edge, so it has
     to stay right-anchored — setting left as well drops `right`, and the
     closed position lands in the middle of the screen instead of outside it.
     Capping the width is what keeps a panel clear of the rail. */
  .drawer { max-width:calc(100vw - var(--rail-w) - 8px); }
  #drawer-backdrop { left:var(--rail-w); }
  /* `--bg` is the PAGE background, and in dark mode that is #0D0A16 — while
     `.drawer` is hardcoded #FFFFFF on purpose, so the panel keeps the light
     monday look whatever the OS is doing. The two disagreed: the header and
     toolbar painted their own white, and everything below them went black,
     with the empty-state text left dark-on-dark. A drawer with nothing in it
     — Flagged, Decisions with no queue — was the whole panel.

     So the field comes from the drawer's own surface, which is white in both
     themes, and the dots are pinned to their light value rather than
     inheriting a pale dot that would vanish on it. */
  /* A scroll container with nothing focusable inside is unreachable by
     keyboard, so these take tabindex=0 and scroll with the arrow keys.
     They still need a visible focus indicator: suppressing the outline
     traded a 2.1.1 failure for a 2.4.7 one, 23 elements wide. The ring is
     inset so it reads as "this region has focus" rather than as a control. */
  .drawer-body:focus, .id-scroll:focus, .ask-log:focus { outline:none; }
  .drawer-body:focus-visible, .id-scroll:focus-visible, .ask-log:focus-visible {
    outline:2px solid var(--accent); outline-offset:-2px; }
  .drawer-body { background:var(--surface, #FFFFFF);
    background-image:radial-gradient(circle, #1B103814 1px, transparent 1px);
    background-size:22px 22px; }
  /* Panels were written against a white drawer. On the dotted field they
     need to be cards, or the dots run under the text. */
  .drawer-body > .ab-pane, .drawer-body > div > .ab-pane { background:transparent; }
  /* overflow:hidden here never clipped anything — a table is not a scroll
     container. The rounding it was protecting is kept on the wrapper. */
  .table-wrap { border-radius:var(--r-card); }
  .ab-table { background:var(--surface); border-radius:var(--r-card);
    overflow:hidden; box-shadow:var(--shadow-card); }
  .ab-table th { background:var(--surface-2); }
  .ab-bar, .cfg-grid, .tp-form { font-size:13.5px; }
  .ab-tabs { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 14px; }
  .ab-tab { padding:5px 12px; border-radius:999px; font-size:12.5px;
            border:1px solid var(--border); background:transparent;
            color:inherit; cursor:pointer; font-family:inherit; }
  .ab-tab.sel { background:var(--tile-sel); color:#fff;
                border-color:var(--tile-sel); font-weight:600; }
  /* Status chips, one vocabulary. DRAFT/READY in the reference screens are
     the same two shapes as our own ok/warn, so they share a class. */
  .chip { display:inline-block; padding:3px 9px; border-radius:6px;
    font-size:10.5px; font-weight:700; letter-spacing:.06em;
    text-transform:uppercase; background:var(--chip-bg); color:var(--chip-ink); }
  .chip.warn { background:var(--chip-warn-bg); color:var(--chip-warn-ink); }
  .chip.ok   { background:var(--chip-ok-bg);   color:var(--chip-ok-ink); }
  .chip.no   { background:var(--chip-no-bg);   color:var(--chip-no-ink); }
  .ab-stats { display:flex; flex-wrap:wrap; gap:18px; margin:4px 0 14px; }
  .ab-stats div { display:flex; flex-direction:column; }
  .ab-stats b { font-size:20px; line-height:1.1; }
  .ab-stats span { font-size:11.5px; color:var(--ink-muted); }
  .ab-table { width:100%; border-collapse:collapse; font-size:13px; }
  /* 11.5px/600 uppercase at opacity .6 measured 2.38:1 — the worst text on
     the page, and it is every table's column headings. */
  .ab-table th { text-align:left; padding:6px 8px; font-size:11.5px;
                 text-transform:uppercase; letter-spacing:.05em;
                 color:var(--ink-muted);
                 border-bottom:1px solid var(--border); }
  .ab-table td { padding:6px 8px; border-bottom:1px solid var(--border);
                 vertical-align:top; }
  .ab-subj { max-width:340px; }
  .ab-ok   { color:#0b6b3a; }
  .ab-no   { color:#8a2f2f; }
  .ab-warn { color:#8a5a12; }
  .ab-dim  { color:var(--ink-faint); }
  /* Container opacity was the other half of the contrast problem: the leaf
     colours are fine and an ancestor at .8 or .72 blended them back below
     4.5:1. Muting is done with colour on the text itself, not by fading
     whole blocks. */
  .ab-bar li, .inbox-item.is-past { opacity:1; }
  .inbox-item.is-past .ii-when, .inbox-item.is-past .ii-prev,
  .inbox-item.is-past .ii-from { color:var(--ink-muted); }
  .inbox-item.is-past .ii-title { color:var(--ink); }
  .inbox-list.show-decided .inbox-item.is-decided { opacity:1; }
  .inbox-list.show-decided .inbox-item.is-decided .ii-title,
  .inbox-list.show-decided .inbox-item.is-decided .ii-prev {
    color:var(--ink-muted); }
  .ab-bar { border:1px solid var(--border); border-radius:var(--r-card);
            padding:14px 18px; margin:0 0 16px; font-size:13px;
            background:var(--surface); box-shadow:var(--shadow-card); }
  .ab-bar ul { margin:6px 0 0; padding-left:18px; }
  .ab-bar li { margin:2px 0; }
  .ab-run { margin-top:16px; display:flex; align-items:center; gap:12px;
            flex-wrap:wrap; }
  .ab-run-out { font-size:12.5px; color:var(--ink-muted); width:100%; }
  /* 115 of these are headings now, so they are navigation targets as well
     as labels — they have to be comfortably readable. */
  .ab-fn { font-size:12px; text-transform:uppercase; letter-spacing:.07em;
           color:var(--ink-muted); margin:18px 0 6px; font-weight:600; }
  /* ---- the topbar, in the rail's purple ---- */
  .chrome-overlay { left:var(--rail-w); }
  .topbar { background:var(--rail); border-bottom:1px solid var(--rail-line);
    /* min-, not fixed: this row wraps on a narrow screen, and a fixed
       height put the wrapped line outside the box where it painted under
       the content below. */
    min-height:var(--top-h); box-sizing:border-box; color:var(--rail-ink);
    display:flex; align-items:center; gap:14px; padding:0 18px; }
  .topbar .muted, .topbar .eyebrow { color:var(--rail-ink-dim); }
  .topbar .ws-logo { filter:brightness(0) invert(1); }
  .topbar .logo-divider { background:var(--rail-line); }
  .topbar .icon-btn { color:var(--rail-ink); border-color:var(--rail-line);
    background:#FFFFFF10; }
  .topbar .icon-btn:hover { background:#FFFFFF1F; }
  .topbar .fact-pill { background:#FFFFFF14; border-color:var(--rail-line);
    color:var(--rail-ink); }
  .nav-row { display:none; }        /* the strip moved into the rail */
  /* Flush: the padding here dates from a floating capsule over a full-bleed
     scene. Against a rail it leaves the bar hanging with scene around it. */
  .chrome-overlay { padding:0; }
  /* The capsule -- 18px radius, 60% white, a border -- is left over from
     when the chrome floated over the office scene. On a solid rail-coloured
     bar it reads as a chip stuck onto the nav instead of part of it. */
  .topbar-left, .topbar-right { height:auto; box-shadow:none;
    border-radius:0; background:transparent; border:0; padding:0; }
  /* --rail is a 180deg gradient: across the full-height rail it moves
     slowly, inside a 56px bar it runs the whole ramp, so the same variable
     renders as two colours where they meet. The bar takes the rail's top
     stop flat; the rail keeps darkening below it. */
  .topbar { background:var(--rail-top); }
  /* The rail carries the mark. A second one in the bar was both a repeat and
     58px of logo in a 56px bar, which is what bled over the top edge. */
  .topbar-left .ws-logo, .topbar-left .logo-divider { display:none; }
  .topbar-left .eyebrow { font-size:13px; font-weight:600; letter-spacing:0;
    text-transform:none; font-family:inherit; color:var(--rail-ink); }
  .topbar-left .eyebrow::after { content:" ›"; color:var(--rail-ink-dim);
    margin-left:6px; }
  .topbar-agent { margin-right:auto; }
  /* Sub-tabs belong to the screen, not the chrome. On the purple they read
     as a second level of navigation competing with the rail. */
  .sub-row { justify-content:flex-start; padding:10px 20px;
    background:var(--surface); border-bottom:1px solid var(--border);
    position:fixed; top:var(--chrome-h); left:var(--rail-w); right:0; z-index:19;
    margin:0; }
  body:has(.sub-row:not([hidden])) .office-stage { top:calc(var(--chrome-h) + 45px); }
  /* Deliberately not restyling .sub-tab here — the definition below is the
     only one, so the two cannot disagree about what "selected" looks like. */

  /* ---- five groups, one strip ---- */
  .topbar-agent { display:flex; align-items:center; }
  /* Completes "WS Agents > agent > group". Without it a rail click reads
     as a redirect to some view; with it, it reads as arriving somewhere. */
  /* ---- command palette ---- */
  /* Theme tokens, not the fixed chrome palette: this floats over the
     drawers, which follow the real theme, rather than over the artwork. */
  /* Outreach: the bucket/state chips and the reason a person is stopped. */
  .ab-chips { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0 2px; }
  .ab-chip.role { background:var(--chip-bg, #EFEDFC);
    color:var(--chip-ink, #4B3BD1); }
  .ab-chip.state { background:var(--surface-2, #F5F3FC);
    color:var(--ink-muted, #6B6880); }
  .ab-chip.role, .ab-chip.state { border-radius:999px; padding:3px 10px;
    font-size:11.5px; font-weight:600; }
  .ab-why { color:var(--ink-faint, #9B98AC); font-weight:400; }
  /* Seven columns did not fit the drawer, so "Next" sat off the right edge —
     reachable by scrolling, but a column nobody knows is there. Names and
     organisations are the two that can give up width without losing meaning. */
  .ab-pane[data-view="outreach"] .ab-table td:nth-child(1),
  .ab-pane[data-view="outreach"] .ab-table td:nth-child(2) {
    max-width:132px; overflow:hidden; text-overflow:ellipsis;
    white-space:nowrap; }
  /* Measured, not guessed: the names were 120 and 132px, and the column
     actually pushing "Next" off the edge was State at 370 — stretched by the
     reason a person is stopped. Capped and ellipsised; the full reason is
     still there on hover via the title attribute. */
  .ab-pane[data-view="outreach"] .ab-table td:nth-child(5) {
    max-width:190px; overflow:hidden; text-overflow:ellipsis;
    white-space:nowrap; }
  .ab-pane[data-view="outreach"] .ab-table th,
  .ab-pane[data-view="outreach"] .ab-table td { padding-left:9px;
    padding-right:9px; }

  .pal-wrap[hidden] { display:none; }
  .pal-wrap { position:fixed; inset:0; z-index:60; display:flex;
    justify-content:center; align-items:flex-start; }
  .pal-back { position:absolute; inset:0; background:rgba(12,10,26,0.42);
    backdrop-filter:blur(2px); }
  /* Every colour here is a token this stylesheet actually defines, with a
     literal fallback behind it. The first draft used --panel/--line/--muted,
     which belong to the builder and agent pages, not to this one — they
     resolved to nothing and the panel rendered fully transparent with the
     office scene showing through the results. */
  .pal { position:relative; margin-top:12vh; width:min(520px, 92vw);
    background:var(--surface, #FFFFFF); color:var(--ink, #1F2430);
    border:1px solid var(--border, #1B103812);
    border-radius:var(--r-card, 16px);
    box-shadow:0 24px 60px -20px rgba(12,10,26,0.55); overflow:hidden; }
  #pal-input { width:100%; box-sizing:border-box; border:0; outline:0;
    background:transparent; color:var(--ink, #1F2430); font:inherit;
    font-size:15px; padding:15px 17px;
    border-bottom:1px solid var(--border, #1B103812); }
  #pal-input::placeholder { color:var(--ink-faint, #9B98AC); }
  .pal-list { list-style:none; margin:0; padding:5px; max-height:46vh;
    overflow-y:auto; }
  .pal-item { display:flex; align-items:baseline; gap:9px; padding:8px 12px;
    border-radius:var(--r-ctl, 10px); cursor:pointer; }
  .pal-item.sel { background:var(--accent-soft, #A21CAF14); }
  .pal-lab { font-size:13.5px; font-weight:600; }
  .pal-item.sel .pal-lab { color:var(--accent, #A21CAF); }
  .pal-grp { font-size:11.5px; color:var(--ink-muted, #6B6880);
    margin-left:auto; }
  .pal-empty { padding:14px 12px; font-size:13px;
    color:var(--ink-muted, #6B6880); }

  .crumb-group { font-size:12.5px; font-weight:600; color:var(--rail-ink);
    white-space:nowrap; }
  .crumb-group:empty { display:none; }
  .crumb-group::before { content:"A"; margin:0 7px 0 3px; opacity:.45;
    font-weight:400; }
  .agent-select { font:inherit; font-size:13px; font-weight:600;
    padding:7px 30px 7px 14px;
    max-width:min(240px, 45vw); text-overflow:ellipsis;
    border-radius:999px; border:1px solid var(--rail-line);
    background:#FFFFFF14; color:var(--rail-ink); cursor:pointer;
    appearance:none; -webkit-appearance:none;
    background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),
                     linear-gradient(135deg,currentColor 50%,transparent 50%);
    background-position:calc(100% - 15px) 50%, calc(100% - 10px) 50%;
    background-size:5px 5px, 5px 5px; background-repeat:no-repeat; }
  .agent-select:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
  .new-agent-btn { font:inherit; font-size:13px; font-weight:600;
    padding:8px 16px; border-radius:999px; border:0;
    background:var(--grad); color:#fff; cursor:pointer; white-space:nowrap;
    box-shadow:0 6px 16px -8px #C026D3CC; }
  .new-agent-btn:hover { filter:brightness(1.06); }
  .sub-row { display:flex; justify-content:center; gap:4px; flex-wrap:wrap;
    padding:6px 12px 0; }
  /* `display:flex` above outranks the user-agent [hidden] rule, so the strip
     never actually hid — it shipped as a 10px purple sliver on every screen,
     including the ones with no group open at all. */
  .sub-row[hidden] { display:none; }
  .sub-tab { font:inherit; font-size:12.5px; padding:5px 13px;
    border-radius:999px; border:1px solid transparent; background:transparent;
    color:inherit; opacity:.62; cursor:pointer; }
  .sub-tab:hover { opacity:.9; }
  .sub-tab.sel { opacity:1; border-color:var(--tile-sel);
    background:var(--tile-sel); color:#fff; font-weight:600; }
  .segmented-old { display:none; }
  .segment.sel { font-weight:600; }
  /* ---- the workspace grid ---- */
  .ws-bar { display:flex; align-items:center; gap:12px; flex-wrap:wrap;
    margin:0 0 16px; }
  .ws-sort { display:flex; align-items:center; gap:8px; margin-right:auto; }
  .ws-sort label { font-size:12px; opacity:.6; }
  .ws-sort .agent-select { background:var(--surface); color:inherit;
    border-color:var(--border); }
  .ws-toggle { display:flex; gap:2px; padding:3px; border-radius:10px;
    background:var(--surface-2); }
  .ws-tg { font:inherit; font-size:12.5px; font-weight:600; padding:6px 13px;
    border:0; border-radius:8px; background:transparent; color:inherit;
    cursor:pointer; opacity:.65; }
  .ws-tg.on { background:var(--tile-sel); color:#fff; opacity:1; }
  .ws-grid { display:grid; gap:18px;
    grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); }

  .ws-new { border:1.5px dashed var(--border); border-radius:var(--r-card);
    background:var(--surface-2); padding:20px; cursor:pointer;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    text-align:center; gap:10px; min-height:250px; }
  .ws-new:hover { border-color:var(--accent); }
  .ws-new-frame { position:relative; width:100%; max-width:190px; height:96px;
    display:grid; grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr;
    gap:8px; }
  .ws-new-frame::before, .ws-new-frame::after { content:""; border-radius:8px;
    background:var(--surface); }
  .ws-new-frame span.ws-plus { position:absolute; inset:0; margin:auto;
    width:46px; height:46px; border-radius:50%; background:var(--grad);
    color:#fff; font-size:26px; line-height:46px; text-align:center;
    box-shadow:0 8px 20px -8px #C026D3CC; }
  .ws-new-frame { position:relative; }
  .ws-new-lab { font-weight:600; font-size:15px; color:var(--ink); }
  .ws-new-sub { font-size:11.5px; opacity:.6; line-height:1.45; }

  .ws-card { border:1px solid var(--border); border-radius:var(--r-card);
    background:var(--surface); padding:12px; display:flex;
    flex-direction:column; gap:10px; box-shadow:var(--shadow-card);
    transition:border-color .15s, transform .15s; }
  .ws-card:hover { border-color:var(--accent); transform:translateY(-2px); }
  .ws-card.drift { border-color:var(--chip-warn-ink); }
  .ws-hit { display:block; text-decoration:none; color:inherit; }
  .ws-mosaic { display:grid; gap:8px; }
  .ws-mosaic-1 { grid-template-columns:1fr; }
  .ws-mosaic-2 { grid-template-columns:1fr 1fr; }
  .ws-mosaic-3, .ws-mosaic-4 { grid-template-columns:1fr 1fr; }
  .ws-tile { display:flex; align-items:flex-end; min-height:64px; padding:7px 9px;
    border-radius:10px; font-size:10.5px; font-weight:600; letter-spacing:.04em;
    text-transform:uppercase; color:#fff;
    background:linear-gradient(150deg, color-mix(in srgb, var(--t) 78%, #000 0%),
                                       color-mix(in srgb, var(--t) 42%, #000 22%));
    opacity:.55; }
  .ws-tile.on { opacity:1; }
  .ws-tile em { font-style:normal; opacity:.85; text-transform:none;
    letter-spacing:0; }
  .ws-mosaic-3 .ws-tile:first-child { grid-column:1 / -1; }
  .ws-foot { display:flex; align-items:flex-start; gap:8px; }
  .ws-nm { min-width:0; flex:1; }
  .ws-nm b { display:block; font-size:14.5px; color:var(--ink);
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .ws-nm span { font-size:11.5px; opacity:.6; }
  .ws-meta { font-size:12px; opacity:.7; }
  .ws-menu { position:relative; }
  .ws-menu summary { list-style:none; cursor:pointer; padding:2px 7px;
    border-radius:7px; opacity:.55; font-size:15px; line-height:1; }
  .ws-menu summary::-webkit-details-marker { display:none; }
  .ws-menu[open] summary, .ws-menu summary:hover { opacity:1;
    background:var(--surface-2); }
  .ws-menu-pop { position:absolute; right:0; top:26px; z-index:5; min-width:160px;
    background:var(--surface); border:1px solid var(--border);
    border-radius:12px; box-shadow:var(--shadow-card); padding:5px;
    display:flex; flex-direction:column; }
  .ws-menu-pop a, .ws-menu-pop button { font:inherit; font-size:12.5px;
    text-align:left; padding:7px 10px; border:0; border-radius:8px;
    background:transparent; color:inherit; cursor:pointer;
    text-decoration:none; white-space:nowrap; }
  .ws-menu-pop a:hover, .ws-menu-pop button:hover { background:var(--surface-2); }

  .cfg-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:12px; margin-bottom:6px; align-items:start; }
  /* Below the row, not inside a cell: full width, one line per field. */
  .cfg-note { font-size:12px; line-height:1.5; margin-top:8px; }
  .cfg-note + .cfg-note { margin-top:4px; }
  .cfg-note b { font-weight:600; opacity:.8; }
  /* Hidden here rather than by type: see _cfg_chips. */
  .cfg-shadow { display:none; }
  .rate { display:inline-flex; gap:3px; }
  .rate-b { font:inherit; font-size:12px; width:24px; height:24px; padding:0;
    border-radius:6px; border:1px solid var(--border);
    background:var(--surface); color:inherit; cursor:pointer; }
  .rate-b:hover { border-color:var(--accent); background:var(--accent-soft); }
  .rate-b:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
  .rate-done { font-size:12px; }
  .cfg-f { display:flex; flex-direction:column; gap:3px; }
  .cfg-f label { font-size:12px; opacity:.75; }
  .cfg-in { font:inherit; font-size:13px; padding:9px 12px;
    border-radius:var(--r-ctl);
    border:1px solid var(--border); background:var(--surface); color:inherit; }
  .cfg-in:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
  .cfg-in:disabled { opacity:.55; cursor:not-allowed; }
  .cfg-f .why { font-size:11.5px; }
  .tp-form { display:flex; flex-direction:column; gap:10px; margin-top:10px; }
  .tp-form label { display:flex; flex-direction:column; gap:4px;
    font-size:12.5px; opacity:.8; }
  .tp-form textarea, .tp-form input { font:inherit; font-size:13px;
    padding:8px 10px; border-radius:8px; border:1px solid var(--border);
    background:var(--surface); color:inherit; resize:vertical; }
  .tp-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
  .ab-pbrow { cursor:pointer; }
  .ab-pbrow:hover { background:var(--surface-2,#f2f0fa); }

  /* ---- the roster and its figure (Agents view) ----
     .ab-card, .ab-pill, .ab-tbl and .ab-err were only ever declared inside
     _render_builder_panel's own <style>, which nothing on this page emits —
     so the Agents view was drawing borderless cards and unbordered pills.
     Declared here, against --border, because --line is a /builder variable
     and does not exist on this page: every `var(--line,#d6dae0)` above is
     silently taking the light fallback even in dark mode. */
  .ab-card { border:1px solid var(--border); border-radius:10px;
             padding:12px 14px; margin:8px 0; background:var(--surface); }
  .ab-pill { display:inline-block; padding:1px 8px; border-radius:999px;
             font-size:11.5px; border:1px solid var(--border);
             white-space:nowrap; }
  .ab-tbl { width:100%; border-collapse:collapse; font-size:13px; }
  .ab-tbl th, .ab-tbl td { text-align:left; padding:6px 8px;
             border-bottom:1px solid var(--border); vertical-align:top; }
  .ab-tbl th { font-size:11.5px; text-transform:uppercase;
             letter-spacing:.05em; opacity:.6; }
  .ab-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
  .ab-err { color:var(--bad); background:var(--bad-soft);
            border:1px solid var(--bad); border-radius:10px;
            padding:10px 14px; font-size:13px; }
  /* The figure scrolls sideways rather than shrinking: below about 640px the
     arrow labels stop being readable, and an illegible diagram is worse than
     one the reader has to drag. */
  .ab-fig { margin:0 0 20px; padding:14px 16px; border:1px solid var(--border);
            border-radius:12px; background:var(--surface); overflow-x:auto; }
  .ab-fig svg { display:block; width:100%; min-width:640px; height:auto; }
  .ab-figcap { font-size:12px; opacity:.65; margin:12px 0 0; }
  .ab-chips { display:flex; flex-wrap:wrap; align-items:center; gap:6px;
              margin:10px 0 0; }
  .ab-chip { padding:3px 10px; border-radius:999px; font-size:11.5px;
             border:1px solid var(--border); white-space:nowrap; }
  .ab-chip-sep { opacity:.4; font-size:11.5px; }
  .ab-new { border-style:dashed; cursor:pointer; }
  .ab-new:hover { background:var(--surface-2); }
  .ab-new:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
  .ab-idle { border:1px solid var(--warn); background:var(--warn-soft);
             border-radius:8px; padding:6px 10px; margin:8px 0 0;
             font-size:12.5px; }

  /* ---------- one L, not two bars ----------
     Appended last on purpose: these override rules declared earlier, and a
     media query or a later plain rule would otherwise win silently. */
  :root { --well-r:22px; --well-top:var(--chrome-h); }
  /* The seam between the two menus. Removing both borders is what makes the
     rail and the bar read as a single surface turning a corner. */
  .es-rail { border-right:0; }
  /* Flat, like the builder's `.top`. The base rule still carries the radius,
     border and shadow from when this was a white panel floating over the
     scene; on the purple they make it read as a pill sitting ON the rail
     rather than as one surface turning a corner — which is what this whole
     block exists to achieve. The builder never had them, and its top is the
     reference. */
  .topbar { border-bottom:0; border:0; border-radius:0; box-shadow:none;
    padding:0 20px;
    /* No margin under the bar. The chip strip is pinned to --chrome-h, which
       is the overlay's measured height — so a 12px bottom margin on the bar
       became 12px of transparent overlay between the two, and the page behind
       showed through it as a white seam across the full width. The margin
       dates from when this was a floating white panel that needed to clear
       the row below; on a continuous purple L there is nothing to clear. */
    margin-bottom:0; }

  /* The secondary menu, on the same purple as the primary — its own
     background rather than a sheet behind both rows. One element spanning
     from top:0 covered the bar and, because .sub-row is a child of
     .chrome-overlay with a positive z-index, intercepted every click on it. */
  .topbar { background:var(--rail-top); }
  .sub-row { background:var(--rail); border-bottom:0; padding:0 20px 10px;
    top:var(--chrome-h); }
  .sub-tab { color:var(--rail-ink-dim); border-color:transparent; opacity:1; }
  .sub-tab:hover { color:var(--rail-ink); background:#FFFFFF14; }
  .sub-tab.sel { background:var(--surface); color:var(--ink);
    border-color:transparent; }

  /* The well. Its top-left radius, with the chrome behind it, IS the curve. */
  body:has(.sub-row:not([hidden])) { --well-top:calc(var(--chrome-h) + 45px); }
  .office-stage { top:var(--well-top);
    border-top-left-radius:var(--well-r); overflow:hidden; }
  .drawer { top:var(--well-top); border-top-left-radius:var(--well-r);
    border-left:0; }
  #drawer-backdrop { top:var(--well-top); }
  /* Rounding the canvas box alone leaves the bitmap square underneath it. */
  #pixel-office { border-top-left-radius:var(--well-r); }

  /* ---------- phone layout ----------
     A media query adds no specificity, so this has to be the last thing in
     the sheet. The copy earlier in the file has three dead declarations for
     exactly this reason; these are the ones that take effect. */
  @media (max-width: 700px) {
    :root { --rail-w:0px; --well-r:0px; }
    /* Above the drawer (z-31), not under it. As the bottom bar this IS the
       navigation, and it was being covered the moment anything opened —
       leaving the ✕ as the only way out of any screen. */
    .es-rail { z-index:32;
      top:auto; left:0; right:0; bottom:0; width:auto; height:60px;
      flex-direction:row; justify-content:space-around; padding:4px 6px;
      border-right:0; border-top:1px solid var(--rail-line); }
    .rail-logo, .rail-spacer { display:none; }
    .es-rail .segment { width:auto; flex:1 1 0; padding:6px 2px; gap:3px; }
    .es-rail .segment .ri-lab { font-size:9.5px; }
    .office-stage { bottom:60px; }
    .stats-hud { display:none; }
    /* All three of these were anchored to a bottom edge that now has a bar
       on it, and all three were being dropped from the earlier block. */
    .office-view-toggle { bottom:132px; }
    .office-bubble { bottom:72px; left:50%; }
    /* `.chat-bubble` is what the Ask-Lynda launcher is actually called; the
       two selectors below it match nothing, so the launcher kept its 22px
       offset and sat 38px over the bottom bar at z-40 against the rail's
       z-32 — covering the "New" button outright on a phone. */
    .chat-bubble { bottom:72px; }
    .ask-lynda, .ask-lynda-fab { bottom:72px; }
  }

  /* ---------- the configure drawer's controls ---------- */
  .cfg-lab { display:block; font-size:12px; opacity:.75; margin-bottom:3px; }
  .cfg-chips { display:flex; flex-wrap:wrap; gap:6px; margin:2px 0 4px; }
  .cfg-chip { font:inherit; font-size:12px; padding:5px 11px; border-radius:999px;
    border:1px solid var(--border); background:var(--surface); color:inherit;
    cursor:pointer; opacity:.7; transition:background .12s, opacity .12s; }
  .cfg-chip:hover { opacity:1; border-color:var(--accent); }
  /* Held. The lit state has to survive both themes, so it takes the same
     token the rest of the page uses for "chosen" rather than a literal. */
  .cfg-chip.on { background:var(--tile-sel); border-color:var(--tile-sel);
    color:#fff; opacity:1; font-weight:600; }
  /* Recommended but not held: worth marking, and worth NOT looking granted.
     A dotted edge reads as "available and suggested" where a filled one
     would read as "on", which is the one thing this panel must not blur. */
  .cfg-chip.rec:not(.on) { border-style:dashed; border-color:var(--accent);
    opacity:.85; }
  .cfg-chip:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

  .cfg-group { border:1px solid var(--border); border-radius:var(--r-card);
    padding:12px 14px; margin:0 0 12px; background:var(--surface); }
  .cfg-group > h4 { margin:0 0 8px; font-size:12px; text-transform:uppercase;
    letter-spacing:.06em; opacity:.6; font-weight:700; }

  .cfg-list { margin:2px 0 0; padding-left:18px; font-size:12.5px; }
  .cfg-list li { margin:2px 0; }
  .cfg-f textarea.cfg-in { resize:vertical; }
