/* Heading font (24 Sep 2026, owner's pick): Instrument Serif ships one weight only, so every bold
   heading was a browser-faked bold that read squashed. Newsreader has real weights and stays a
   readable editorial serif. The logo wordmark keeps Instrument Serif. Imported here rather than in
   dashboard_base.html so the page markup (and its render goldens) is unchanged. */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600;6..72,700&display=swap');

/* EasyDocs dashboard design system — single source of truth for portal styling.
   Pages extend templates/dashboard_base.html and rely on these classes;
   page-specific rules stay in a {% block head_extra %} on that page. */

:root {
  --paper: #FBF8F1; --white: #FFFDF8; --cream: #F4EEE1; --chip: #F1EADA;
  --rule: #E4DDCB; --rule-l: #DCD4C1;
  --ink: #1B1A17; --ink2: #4E4B44; --ink3: #615D54; --ink4: #857F72;
  --red: #A8291F; --red-d: #7C1D16; --red-l: #F8E3DF;
  --amber: #7E6A0F; --amber-l: #FBE87F;
  --green: #1F4A33; --green-l: #DFEDE2;
  --blue: #2E4E75; --blue-l: #E2EAF3;
  --dark: #17160F; --gold: #E8C74E;
  --shadow: 0 1px 3px rgba(27,26,23,0.06), 0 1px 2px rgba(27,26,23,0.04);
  --font-display: 'Newsreader', Georgia, serif;
  --font-body: Archivo, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* ── House style tokens (2026-09-28 UI-consistency pass, HOUSE-STYLE.md) ──
     Additive only: every value above stays exactly as it was (895 inline
     styles and 85 per-page <style> blocks still reference them by name).
     These name the small set of sizes/spacing/radii the app already mostly
     uses, so a NEW page has an easy, obvious value to reach for instead of
     inventing another 13.5px. */
  --text-xs: 0.75rem;    /* 12px  - badges, kickers, table headers, fine print */
  --text-sm: 0.875rem;   /* 14px  - table cells, form labels/hints, secondary body */
  --text-base: 1rem;     /* 16px  - default body text */
  --text-md: 1.125rem;   /* 18px  - card/section h2, emphasis */
  --text-lg: 1.75rem;    /* 28px  - stat numbers, sub-hero */
  --text-xl: 2.75rem;    /* 44px  - page hero h1 */

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 32px; --space-8: 48px;

  --radius-sm: 4px;  /* buttons, inputs, badges, tabs - was 2px/3px/4px mixed */
  --radius-md: 8px;  /* cards, panels, the document-preview sheet */
  --shadow-card: var(--shadow);
  --shadow-pop: 4px 4px 0 rgba(27,26,23,0.18); /* the existing card/metric hover lift, named */

  --color-text: var(--ink);      --color-text-muted: var(--ink3);
  --color-border: var(--rule);   --color-surface: var(--white);
  --color-bg: var(--paper);      --color-primary: var(--red);
  --color-success: var(--green); --color-warn: var(--amber); --color-danger: var(--red-d);

  /* Motion: the shared stylesheet had ZERO transitions before this pass -
     every hover/tab/focus was an instant snap (VISUAL-REVIEW.md finding #1,
     the single biggest contributor to "not smooth"). Two speeds only. */
  --transition-fast: 120ms ease-out;  /* colour/background/border */
  --transition-base: 180ms ease-out;  /* transform/shadow */
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; }
body { font-family: var(--font-body); background: var(--paper); color: var(--ink); font-size: 16px;
       animation: body-fade-in var(--transition-base) 1; }
@keyframes body-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ── Top navigation ─────────────────────────────────────────────── */
/* Two-row dark masthead (port 4/4, reskin design 2026-08-07): row 1 carries
   the drawn-paper logo + primary nav, row 2 carries search + firm identity.
   Kept as one .topnav element so the existing sticky/z-index behaviour and
   every {% if not hide_nav %} guard in dashboard_base.html still applies. */
.topnav { background: var(--dark); position: sticky; top: 0; z-index: 50; }
.topnav-inner { max-width: 1360px; margin: 0 auto; padding: 10px 24px 0; }
.topnav-row { display: flex; align-items: center; gap: 18px; min-width: 0; }
.topnav-row.row1 { padding-bottom: 10px; }
.topnav-row.row2 { padding: 10px 0; border-top: 1px solid #2A2820; gap: 14px; }
.topnav .logo-text { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; }
.topnav .logo-text .logo-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.topnav .logo-text .logo-mark { font-family: 'Instrument Serif', Georgia, serif; /* the wordmark keeps its own face whatever the heading font */ font-size: 26px; color: #FBF8F1; line-height: 1; }
.topnav .logo-text .logo-sub { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: #857F72; line-height: 1; }
.topnav .logo-text span { color: var(--red); }
/* Drawn paper logo: a folded sheet, a highlight stroke, a signed-off tick. */
.logo-icon { position: relative; width: 30px; height: 38px; flex: none; transform: rotate(-3.5deg); display: inline-block; }
.logo-icon .li-sheet { position: absolute; inset: 0; background: #FFFDF8; border: 1.5px solid #FFFDF8; border-radius: 2px; }
.logo-icon .li-fold { position: absolute; top: 0; right: 0; width: 8px; height: 8px; background: var(--dark); border-left: 1.5px solid #857F72; border-bottom: 1.5px solid #857F72; }
.logo-icon .li-hl { position: absolute; left: 4px; top: 12px; width: 12px; height: 5px; background: var(--gold); }
.logo-icon .li-line { position: absolute; left: 4px; top: 19px; width: 9px; height: 1.5px; background: #B5AF9F; }
.logo-icon .li-tick { position: absolute; right: -6px; bottom: -5px; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--red); background: #FFFDF8; color: var(--red); font-size: 7px; font-weight: 700; font-family: var(--font-mono); display: flex; align-items: center; justify-content: center; line-height: 1; }
.topnav nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; min-width: 0; }
.topnav nav a { color: #C9C3B4; text-decoration: none; font-size: 0.86rem; font-weight: 600; padding: 7px 10px; border-radius: 4px; white-space: nowrap; transition: color var(--transition-fast), background var(--transition-fast); }
.topnav nav a:hover { color: #FBF8F1; background: rgba(255,253,248,0.08); }
.topnav nav a.active { color: var(--ink); background: #FBF8F1; font-weight: 600; }
.topnav .nav-search { width: 220px; min-width: 100px; padding: 7px 12px; border: 1px solid #4B463C; border-radius: 4px; font-size: 0.85rem; background: rgba(255,253,248,0.08); color: #FBF8F1; font-family: var(--font-body); }
.topnav .nav-search::placeholder { color: #857F72; }
.topnav .nav-search:focus { outline: none; border-color: #857F72; background: rgba(255,253,248,0.12); }
.topnav .nav-user { font-size: 0.8rem; color: #FBF8F1; white-space: nowrap; display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--dark); font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-firmname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
/* Mobile nav collapse (2026-09-28, VISUAL-REVIEW.md finding #2): below 641px the
   two nav rows + the profile scope bar used to just WRAP, eating roughly the top
   third of a phone screen before any page content appeared. .nav-toggle is a
   plain button injected once in dashboard_base.html (shared base template); a
   few lines of inline JS there toggle body.nav-open. Nothing route-level or
   per-page changed - every one of the 153 pages inherits this from the base
   template. Falls back gracefully with JS disabled: nav stays visible, exactly
   today's (wrapped) behaviour, never hidden-and-unreachable. */
.nav-toggle { display: none; }
@media (max-width: 640px) {
  .topnav-inner { padding: 8px 14px 0; }
  .topnav-row { gap: 10px; }
  .topnav .nav-search { display: none; }
  .topnav nav { gap: 0; }

  .nav-toggle { display: flex; align-items: center; gap: 6px; margin-left: auto;
    background: transparent; border: 1px solid #4B463C; border-radius: var(--radius-sm);
    color: #C9C3B4; font-family: var(--font-mono); font-size: var(--text-xs);
    letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 10px; cursor: pointer; }
  .nav-toggle:hover { color: #FBF8F1; border-color: #857F72; }

  /* 2026-09-29 correction: a horizontal-scroll scope bar reads as "cut off" in
     a static screenshot (and to a first-time phone user) since nothing shows
     there IS more to scroll to. Wrapping to 2 rows costs a little height but
     nothing is ever hidden - same trade the original CSS already made here,
     kept. */
  .scopebar-inner { flex-wrap: wrap; }

  .topnav-row.row1 nav, .topnav-row.row2 { display: none; }
  body.nav-open .topnav-row.row1 nav { display: flex; flex-direction: column; align-items: stretch;
    width: 100%; flex-basis: 100%; order: 3; margin-top: 8px; gap: 2px; }
  body.nav-open .topnav-row.row2 { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
  body.nav-open .topnav-row.row1 { flex-wrap: wrap; }
}

/* ── Mobile horizontal-overflow fixes (2026-09-29, owner review of the 28 Sep
   before/after) ──────────────────────────────────────────────────────────
   Root-caused with a Playwright probe (`.harness/visual/diag_overflow.py`)
   that measures document.scrollWidth at 390px and reports the exact
   offending element per page. Two real causes found, both fixed below, plus
   a belt-and-braces guard against a third we have not seen but cannot rule
   out on 153 templates we did not individually audit:
   1. `.topnav-row.row2` (Insights/Managed/Services/.../the firm-name badge)
      had NO flex-wrap and never collapsed on mobile at all - flagged above,
      already fixed by the nav-toggle block.
   2. Bespoke forms outside `.form-row` (e.g. the "Link Companies House
      number" input+button on the client overview tab) size their text input
      to browser intrinsic width rather than the container, so `flex-wrap`
      on the form was not enough - the input itself refused to shrink.
   3. `<table>` with `table-layout: auto` (the default) grows past its own
      `width: 100%` to fit unbreakable header/cell text (client detail's
      People table, ~514px against a 390px viewport). Given a card's own
      width, its own scroll is correct here (ticket: "tables should scroll
      inside their own container or stack as cards") - no markup change
      needed, `display:block` on the table element itself turns the table
      into its own scroll container. */
@media (max-width: 640px) {
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

  input[type="text"], input[type="email"], input[type="search"], input[type="tel"],
  input[type="number"], input[type="password"], textarea, select {
    max-width: 100%; min-width: 0; box-sizing: border-box;
  }
  form { flex-wrap: wrap; max-width: 100%; }

  /* Belt-and-braces: this pass reviewed 6 of 153 templates in depth. Nothing
     below should ever fire on a well-behaved page - it exists so an
     unaudited page's one-off <pre>/long-URL/fixed-width element clips or
     scrolls INSIDE itself rather than pushing the whole document sideways,
     which is the actual bug the owner reported (every before/mobile PNG
     wider than its own 390px viewport). */
  html, body { overflow-x: hidden; max-width: 100vw; }
  pre, code { overflow-x: auto; max-width: 100%; }
  img, svg { max-width: 100%; height: auto; }
}

/* ── Layout ─────────────────────────────────────────────────────── */
.container { max-width: 1240px; margin: 40px auto 32px; padding: 0 20px; }
.container-narrow { max-width: 720px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
h1 { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; letter-spacing: -0.01em; }
/* 2026-08-13 (Zaff, walking the client overview): "the text for those headings
   is too close to the boxes - the heading text is squished". The global reset
   above zeroes every margin and h2 only ever set margin-bottom, so a section
   heading that follows a card sat flush against the box above it. Section
   headings now get room above; a heading that OPENS a card or the page hero
   keeps its tight spacing, because the container's own padding is the gap
   there and doubling it looks like a mistake in the other direction. */
h2 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600;
     margin-top: 30px; margin-bottom: 12px; }
h2:first-child,
.card h2,
.card-head h2,
.page-hero h2,
.stat-card h2 { margin-top: 0; }
.page-sub { color: var(--ink3); font-size: 0.9rem; margin-top: 4px; }

/* ── Cards & sections ───────────────────────────────────────────── */
.card { background: var(--white); border: 1px solid var(--rule); border-radius: 3px; padding: 24px; margin-bottom: 16px; transition: transform var(--transition-base), box-shadow var(--transition-base); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.card-head h2 { margin-bottom: 0; }
.card[data-href]:hover, a.card:hover { transform: translate(-1px, -2px); box-shadow: var(--shadow-pop); cursor: pointer; }

/* ── Metric ribbon (daily home) ─────────────────────────────────── */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.metric { background: var(--white); border: 1px solid var(--rule); border-radius: 3px; padding: 14px 16px; text-decoration: none; display: block; transition: transform var(--transition-base), box-shadow var(--transition-base); }
.metric:hover { transform: translate(-1px, -2px); box-shadow: var(--shadow-pop); }
.metric .num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--ink); line-height: 1.1; }
.metric .num.warn { color: var(--amber); }
.metric .num.bad { color: var(--red-d); }
.metric .label { font-size: 0.84rem; color: var(--ink3); font-weight: 600; margin-top: 2px; }

/* ── Tables ─────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
th { text-align: left; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink3); padding: 11px 14px; background: var(--cream); border-bottom: 1px solid var(--rule); }
td { padding: 11px 14px; border-bottom: 1px dashed var(--rule-l); font-size: 0.9rem; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--paper); }

/* ── Badges / status chips ──────────────────────────────────────── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 2px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.badge-good { background: #DFEDE2; color: #1F4A33; }
.badge-attention, .badge-warn { background: #FBE87F; color: #7E6A0F; }
.badge-urgent, .badge-bad { background: #F8E3DF; color: #8C1F16; }
.badge-info { background: #E2EAF3; color: #2E4E75; }
.badge-none { background: var(--chip); color: var(--ink3); }

/* ── Buttons ────────────────────────────────────────────────────── */
/* Transparent 1px border so a solid button is the same height as the bordered .btn-outline beside it. */
.btn { background: var(--red); color: var(--white); border: 1px solid transparent; padding: 10px 20px; font-size: 0.9rem; font-weight: 700; border-radius: 4px; cursor: pointer; text-decoration: none; display: inline-block; font-family: var(--font-body); box-shadow: 3px 3px 0 var(--ink); transition: background var(--transition-fast); }
.btn:hover { background: var(--red-d); box-shadow: 3px 3px 0 var(--ink); }
.btn-outline { background: var(--white); color: var(--ink); border: 1px solid var(--ink); box-shadow: none; transition: background var(--transition-fast); }
.btn-outline:hover { background: var(--cream); box-shadow: none; }
/* Client page: clear the tab bar below (the red button's shadow sat on it). */
.client-header .actions-row { margin-bottom: 18px; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-quiet { background: none; border: none; color: var(--ink3); font-size: 0.85rem; font-weight: 600; cursor: pointer; text-decoration: underline; box-shadow: none; }
.btn-quiet:hover { background: none; box-shadow: none; }

/* ── Action menu (replaces link clutter in table rows) ──────────── */
.actions-menu { position: relative; display: inline-block; }
.actions-menu summary { list-style: none; cursor: pointer; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 3px; font-size: 0.8rem; font-weight: 600; color: var(--ink2); background: var(--white); }
.actions-menu summary::-webkit-details-marker { display: none; }
.actions-menu[open] summary { background: var(--cream); }
.actions-menu .menu { position: absolute; right: 0; top: calc(100% + 4px); background: var(--white); border: 1px solid var(--rule); border-radius: 3px; box-shadow: 0 4px 14px rgba(27,26,23,0.1); min-width: 180px; z-index: 40; padding: 6px; }
.actions-menu .menu a { display: block; padding: 8px 10px; border-radius: 3px; color: var(--ink); text-decoration: none; font-size: 0.85rem; }
.actions-menu .menu a:hover { background: var(--cream); }

/* ── Tabs (client detail) ───────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 9px 16px; color: var(--ink3); text-decoration: none; font-size: 0.9rem; font-weight: 600; border: 1px solid transparent; border-bottom-color: transparent; margin-bottom: -1px; border-radius: 3px 3px 0 0; transition: color var(--transition-fast), background var(--transition-fast); }
.tabs a:hover { color: var(--ink); background: var(--chip); }
.tabs a.active { color: var(--ink); background: var(--white); border: 1px solid var(--rule); border-bottom-color: var(--white); margin-bottom: -1px; }

/* ── Forms ──────────────────────────────────────────────────────── */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink2); margin-bottom: 5px; }
.form-row input, .form-row select, .form-row textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--rule); border-radius: 4px; font-size: 0.9rem; font-family: var(--font-body); background: var(--paper); transition: border-color var(--transition-fast); }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--ink); }
.form-hint { font-size: 0.84rem; color: var(--ink3); margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ── Empty states ───────────────────────────────────────────────── */
.empty-state { background: var(--white); border: 1px dashed var(--rule); border-radius: 3px; padding: 40px 24px; text-align: center; color: var(--ink3); }
.empty-state h2 { font-size: 1.05rem; color: var(--ink); margin-bottom: 6px; }
.empty-state p { font-size: 0.9rem; margin-bottom: 14px; }

/* ── Utility ────────────────────────────────────────────────────── */
.muted { color: var(--ink3); font-size: 0.85rem; }
.mono { font-family: var(--font-mono); font-size: 0.82rem; }
.kicker { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink3); }
.flash { padding: 12px 16px; border-radius: 3px; margin-bottom: 16px; font-size: 0.9rem; font-weight: 600;
  animation: flash-in var(--transition-base) 1; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.flash-ok { background: #DFEDE2; color: #1F4A33; }
.flash-err { background: #F8E3DF; color: #8C1F16; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ── Clickable table rows (client list) ─────────────────────────── */
tr[data-href] { cursor: pointer; }
.client-link { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--ink4); }
.client-link:hover { color: var(--red-d); border-bottom-color: var(--red-d); }

/* ── Design-system components transcribed from Zaff's reskin (design-dom/
   portal-screens/*.html), 2026-08-06. These are the SHARED chrome classes the
   design uses on every screen: page hero, stat cards, the gold overnight
   panel, chips and queue rows. Pages use these instead of per-page CSS so the
   flow is one system rather than a dozen dialects. ── */

.page-hero { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin: 28px 0 22px; }
/* Back links in the brand red (owner, 24 Sep). a.back-link outranks the per-page .back-link rules. */
a.back-link, a.back-link:visited { color: var(--red); }
a.back-link:hover { color: var(--red-d); }
/* A "Back to..." link directly above the hero: its own 14px plus the hero's 28px left a 42px hole. */
.back-link + .page-hero { margin-top: 4px; }
.page-hero .eyebrow { font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink3); }
.page-hero h1 { font-family: var(--font-display); font-weight: 400; font-size: 44px;
  line-height: 1.02; letter-spacing: -0.022em; margin: 10px 0 0; }
.page-hero .hero-sub { font-size: 16px; color: var(--ink2); margin: 8px 0 0; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-ghost { border: 1px solid var(--dark); background: var(--white); color: var(--dark);
  font-size: 14.5px; font-weight: 600; padding: 11px 18px; border-radius: 4px;
  cursor: pointer; text-decoration: none; display: inline-block; }
.btn-ghost:hover { background: var(--cream); }
.btn-primary-hard { background: var(--red); color: #fff; border: 0; font-size: 14.5px;
  font-weight: 600; padding: 11px 18px; border-radius: 4px; cursor: pointer;
  box-shadow: 3px 3px 0 var(--dark); text-decoration: none; display: inline-block; }
.btn-primary-hard:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--dark); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px; margin-bottom: 22px; }
.stat-card { background: var(--white); border: 1px solid var(--rule); border-radius: 4px;
  padding: 18px 20px; text-decoration: none; display: block; color: inherit;
  transition: border-color var(--transition-fast); }
.stat-card:hover { border-color: var(--dark); }
.stat-card .stat-label { font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: 0.11em; text-transform: uppercase; color: var(--ink3); }
.stat-card .stat-num { font-family: var(--font-display); font-size: 40px; line-height: 1;
  margin: 10px 0 0; }
.stat-card .stat-num.warn { color: var(--amber); }
.stat-card .stat-num.bad { color: var(--red); }
.stat-card .stat-note { font-size: 13.5px; color: var(--ink2); margin: 8px 0 0; }

.split-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 20px; align-items: start; }
@media (max-width: 900px) { .split-main { grid-template-columns: 1fr; } }

.panel-gold { background: var(--gold); border-radius: 4px; padding: 20px 22px; }
.panel-gold .panel-eyebrow { font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: 0.11em; text-transform: uppercase; color: rgba(27,26,23,0.65); }
.panel-gold h3 { font-family: var(--font-display); font-weight: 400; font-size: 26px;
  line-height: 1.12; margin: 8px 0 14px; }
.panel-gold .panel-row { display: flex; justify-content: space-between; gap: 12px;
  padding: 6px 0; font-size: 14px; }
.panel-gold .panel-row + .panel-row { border-top: 1px solid rgba(27,26,23,0.13); }
.panel-note { background: var(--white); border: 1px solid var(--rule); border-radius: 4px;
  padding: 16px 18px; margin-top: 16px; font-size: 13.5px; color: var(--ink2); }
.panel-note .panel-eyebrow { font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: 0.11em; text-transform: uppercase; color: var(--ink3);
  display: block; margin-bottom: 8px; }

.queue-row { display: flex; align-items: center; gap: 14px; padding: 13px 0;
  border-bottom: 1px dotted var(--rule); flex-wrap: wrap; }
.queue-row:last-child { border-bottom: none; }
.queue-row .q-client { flex: 0 0 190px; font-weight: 600; font-size: 14.5px; }
.queue-row .q-client a { color: var(--ink); text-decoration: none; }
.queue-row .q-client a:hover { text-decoration: underline; }
.queue-row .q-what { flex: 1 1 220px; font-size: 14px; color: var(--ink2); }
.chip { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.09em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 3px;
  background: var(--cream); color: var(--ink2); white-space: nowrap; }
.chip.chip-overdue { background: var(--red-l); color: var(--red-d); }
.chip.chip-review { background: var(--amber-l); color: var(--amber); }
.chip.chip-info { background: var(--blue-l); color: var(--blue); }
.card-foot-link { margin-top: 14px; text-align: right; font-size: 14px; }

/* Quiet secondary links in the masthead second row (Support / Account). */
.nav-quiet { color: #B5AF9F; font-size: 13px; text-decoration: none; margin-right: 14px; }
/* Hover must stay LIGHT: this sits on the dark masthead, and var(--ink) is
   near-black here — hovering made the link vanish (Zaff, 2026-08-07). */
.nav-quiet:hover { color: #FBF8F1; text-decoration: underline; }

/* Long-list containment (2026-08-07): pages must not grow with their data.
   The updates feed and the document-bank rail scroll inside themselves. */
.upd-scroll { max-height: 560px; overflow-y: auto; padding-right: 10px; }
.bank-rail { max-height: 78vh; overflow-y: auto; position: sticky; top: 90px; }
