/* FirstFiveMin — Nocturne asset layer (redesign slice R1).
 *
 * Source of truth: the two authoritative skins in the "Brand redesign and logo
 * strategy" design project (Redesign.dc.html = dark, Redesign Light.dc.html =
 * light) and the Nocturne design system's styles.css. The dark skin carries
 * ZERO token overrides — it IS Nocturne's native :root — so that block is the
 * baseline here; the light skin's one :root block (36 --color-* + 3 --shadow-*
 * overrides, plus one a:hover rule) is re-homed under [data-theme="light"].
 * Neither comp used a switching mechanism; the data-theme attribute (set
 * server-side by stl-shell.php from the ffm_theme cookie) is the net-new part.
 *
 * Deliberate deviation: the Nocturne DESIGN SOURCE @imports Google Fonts;
 * this shipped file deliberately does NOT (verified: zero @import / zero font
 * hosts in these bytes — suite 215 F3 pins zero third-party font hosts in
 * every indexable render). No third-party request rides any pageview (same
 * first-party rationale as the in-house QR encoder), and the app CSP's
 * font-src is 'self' data: anyway. Inter applies where installed; the stack
 * falls back to system-ui. Self-hosted Inter woff2 is a follow-up asset —
 * if it ever lands, it self-hosts with font-display: swap, never a webfont
 * fetch (SEO-GEO dispatch §1.7; the CWV stake).
 */

/* ── 1. Tokens — dark ground (Nocturne native) ─────────────────────────── */
:root {
  --color-bg: #161826;
  --color-surface: #232532;
  --color-text: #e9e9ed;
  --color-accent: #9184d9;
  --color-accent-2: #a7a1db;
  --color-divider: color-mix(in srgb, #e9e9ed 16%, transparent);

  --color-neutral-100: #f3f5fe;
  --color-neutral-200: #e4e7f5;
  --color-neutral-300: #cfd3e5;
  --color-neutral-400: #b2b6ca;
  --color-neutral-500: #9397ab;
  --color-neutral-600: #75798c;
  --color-neutral-700: #595d6c;
  --color-neutral-800: #3f424d;
  --color-neutral-900: #292b31;

  --color-accent-100: #f5f4ff;
  --color-accent-200: #e7e5fe;
  --color-accent-300: #d2cefd;
  --color-accent-400: #b5abfc;
  --color-accent-500: #968ae0;
  --color-accent-600: #796cbf;
  --color-accent-700: #5d5294;
  --color-accent-800: #423a6a;
  --color-accent-900: #2b2741;

  --color-accent-2-100: #f5f4ff;
  --color-accent-2-200: #e7e5fe;
  --color-accent-2-300: #d2cefd;
  --color-accent-2-400: #b5afe8;
  --color-accent-2-500: #9690c9;
  --color-accent-2-600: #7972a9;
  --color-accent-2-700: #5c5783;
  --color-accent-2-800: #423e5d;
  --color-accent-2-900: #2b293a;

  --color-section: #262a60;
  --color-section-glow: #353b80;
  --color-section-ghost: #4c5397;

  --font-heading: "Inter", system-ui, sans-serif;
  --font-heading-weight: 500;
  --font-body: "Inter", system-ui, sans-serif;

  --space-1: 2.8px;
  --space-2: 5.6px;
  --space-3: 8.4px;
  --space-4: 11.2px;
  --space-6: 16.8px;
  --space-8: 22.4px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --shadow-sm: 0 0 0 1px #3f424d;
  --shadow-md: 0 0 0 1px #595d6c, 0 6px 18px rgba(0,0,0,0.55);
  --shadow-lg: 0 0 0 1px #9397ab, 0 16px 40px rgba(0,0,0,0.65);
}

/* ── 2. Tokens — light ground (the light skin's :root, verbatim) ───────── */
:root[data-theme="light"] {
  --color-bg: #ffffff;
  --color-surface: #f8f9fd;
  --color-text: #191b24;
  --color-accent: #5a4fc0;
  --color-accent-2: #6d68a8;
  --color-divider: color-mix(in srgb, #191b24 14%, transparent);

  --color-neutral-100: #24262e;
  --color-neutral-200: #383b45;
  --color-neutral-300: #4f5361;
  --color-neutral-400: #6b6f80;
  --color-neutral-500: #8a8e9f;
  --color-neutral-600: #a8acbd;
  --color-neutral-700: #c8cbda;
  --color-neutral-800: #e2e5ef;
  --color-neutral-900: #f2f4fa;

  --color-accent-100: #2c2569;
  --color-accent-200: #3a3183;
  --color-accent-300: #4a3f9e;
  --color-accent-400: #5f52bd;
  --color-accent-500: #7a6dd6;
  --color-accent-600: #9a90e4;
  --color-accent-700: #bab2f0;
  --color-accent-800: #d8d3f8;
  --color-accent-900: #eeecfd;

  --color-accent-2-100: #2c2a45;
  --color-accent-2-200: #3b3956;
  --color-accent-2-300: #4d4a6b;
  --color-accent-2-400: #666185;
  --color-accent-2-500: #857fa4;
  --color-accent-2-600: #a5a0bf;
  --color-accent-2-700: #c6c2d8;
  --color-accent-2-800: #e1dfea;
  --color-accent-2-900: #f1f0f6;

  --color-section: #f1f2fb;
  --color-section-glow: #c7cbec;
  --color-section-ghost: #a8ade1;

  --shadow-sm: 0 0 0 1px rgba(25,27,36,0.10);
  --shadow-md: 0 0 0 1px rgba(25,27,36,0.10), 0 6px 18px rgba(25,27,36,0.07);
  --shadow-lg: 0 0 0 1px rgba(25,27,36,0.13), 0 16px 40px rgba(25,27,36,0.13);
}
:root[data-theme="light"] a:hover { color: var(--color-accent-300); }

/* ── 3. Base elements (Nocturne) ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55; font-weight: 400;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 var(--space-2);
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }
h6 { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
figcaption { font-size: 11px; margin-top: var(--space-1); color: color-mix(in srgb, var(--color-text) 64%, transparent); }
.text-muted { color: color-mix(in srgb, var(--color-text) 64%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* ── 4. Nocturne components (verbatim vocabulary for converted surfaces) ── */
.hr {
  height: 1px; border: 0; margin: var(--space-4) 0;
  background: linear-gradient(to right,
    transparent, var(--color-divider) 48px,
    var(--color-divider) calc(100% - 48px), transparent);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn svg { display: block; }
/* F-HIDDENBTN-1 (2026-10-11): .btn sets display, which beats the UA's [hidden]{display:none} — a hidden button stayed on screen (the test-call
   page showed Stop beside Start before any call). A [hidden] .btn is gone. */
.btn[hidden] { display: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { color: var(--color-accent); border-color: var(--color-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--color-accent) 12%, transparent); }
.btn-primary:active { background: color-mix(in srgb, var(--color-accent) 22%, transparent); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-accent); padding-inline: var(--space-1); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-block { width: 100%; margin-top: var(--space-2); }

.field > label {
  display: block; font-size: 12px; margin-bottom: 5px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.input {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit;
  font-size: 14px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }
.radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.radio input, .seg-opt input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.radio .dot { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1.5px solid var(--color-divider); }
.radio:hover .dot { border-color: var(--color-accent); }
.radio input:checked + .dot {
  border-color: var(--color-accent); background: var(--color-accent);
  box-shadow: inset 0 0 0 4px var(--color-bg);
}
.radio input:focus-visible + .dot { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.seg { display: inline-flex; overflow: hidden; border: 1px solid var(--color-divider); border-radius: var(--radius-md); }
.seg-opt { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt:has(input:checked) { color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.seg-opt:not(:has(input:checked)):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: -2px; }

.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface);
}
.card-kicker { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); }
.card-title { font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 17px; line-height: 1.2; }
.card-body { margin: 0; font-size: 13px; opacity: 0.8; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: color-mix(in srgb, var(--color-text) 64%, transparent); }
.elev-sm { box-shadow: var(--shadow-sm); }
.elev-md { box-shadow: var(--shadow-md); }
.elev-lg { box-shadow: var(--shadow-lg); }

.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px;
  border-radius: calc(var(--radius-md) * 0.75);
}
.tag-accent { background: var(--color-accent-800); color: var(--color-accent-100); }
.tag-accent-2 { background: var(--color-accent-2-800); color: var(--color-accent-2-100); }
.tag-neutral { background: var(--color-neutral-800); color: var(--color-neutral-100); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }

.nav { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-4); border-bottom: none; }
.nav-brand { font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 18px; margin-right: auto; }
.nav a { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--color-accent); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 64%, transparent);
  padding: var(--space-2); border-bottom: 1px solid transparent;
}
.table td { padding: var(--space-2); border-bottom: 1px solid transparent; }
.table thead tr {
  background: linear-gradient(to right,
    transparent, var(--color-divider) 48px,
    var(--color-divider) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}
.table tbody tr {
  background: linear-gradient(to right,
    transparent, color-mix(in srgb, var(--color-text) 8%, transparent) 48px,
    color-mix(in srgb, var(--color-text) 8%, transparent) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}
.table tbody tr:hover {
  background:
    linear-gradient(color-mix(in srgb, var(--color-text) 4%, transparent),
                    color-mix(in srgb, var(--color-text) 4%, transparent)) no-repeat 0 0 / 100% 100%,
    linear-gradient(to right,
      transparent, color-mix(in srgb, var(--color-text) 8%, transparent) 48px,
      color-mix(in srgb, var(--color-text) 8%, transparent) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}

.dialog-backdrop {
  position: fixed; inset: 0; display: grid; place-items: center;
  padding: var(--space-4);
  background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent);
}
.dialog {
  width: min(440px, 100%); display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--color-surface); box-shadow: var(--shadow-lg);
}
.dialog-title { font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 20px; }
.dialog-body { font-size: 14px; opacity: 0.85; }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-2); }

.lighten { mix-blend-mode: lighten; background-color: transparent; }

/* ── 5. FFM app chrome (the stl-* contract, restyled on the tokens) ────── */

/* Ink opacities — shared shorthand for page-level CSS (R3). Derived from
   --color-text, so both themes resolve automatically. --ink-1 is the FULL step
   (pages and the shell's re-auth dialog reference it; an undefined custom
   property silently uses its var() fallback, which is how light-theme #111
   rendered on the dark ground, 2026-08-22). --line-2 is the control-border
   line at 50% ink — 30% measured BELOW the 3:1 non-text minimum (1.4.11) on
   the dark ground; suite 98 §B measures it. The danger pair is THEME-POLAR (soft
   ground + loud border for the rejected-A2P panel); defining it in one block
   only would regress the other theme, suite 169 I5 pins both. */
:root {
  --ink-1: #e9e9ed;
  --ink-2: color-mix(in srgb, #e9e9ed 80%, transparent);
  --ink-3: color-mix(in srgb, #e9e9ed 70%, transparent);
  --ink-4: color-mix(in srgb, #e9e9ed 62%, transparent);
  --line-2: color-mix(in srgb, #e9e9ed 50%, transparent);
  --color-danger: #f87171;
  --color-danger-soft: #3b1213;
  /* F-KEYBOX-1 (2026-09-06): the warn pair for one-time reveals and notices (soft ground + loud
     border). The light values ARE the pale yellow the reveal box used to hard-code inline; the
     dark values are what it never had. Suite 98 §B measures both, §J censuses the callouts. */
  --color-warn: #fbbf24;
  --color-warn-soft: #2e2408;
}
:root[data-theme="light"] {
  --ink-1: #191b24;
  --ink-2: color-mix(in srgb, #191b24 80%, transparent);
  --ink-3: color-mix(in srgb, #191b24 70%, transparent);
  --ink-4: color-mix(in srgb, #191b24 62%, transparent);
  --line-2: color-mix(in srgb, #191b24 50%, transparent);
  --color-danger: #b91c1c;
  --color-danger-soft: #fef2f2;
  --color-warn: #92400e;
  --color-warn-soft: #fdf3e2;
}

/* F-KEYBOX-1 (operator, dogfood 2026-09-06: "this is almost unreadable, I thought it was broken"): the
   one-time reveal box was styled inline with light-theme colours, so on the dark shell a connection key
   rendered as light text on a pale-yellow ground. Every callout a shell page emits now rides these
   rules (tokens above, both themes); the secret is a monospace block with a Copy button. Suite 98 §J
   censuses inline hex backgrounds on the shell pages so no other reveal can regress this way. */
.stl-callout { background: var(--color-warn-soft); border: 1px solid var(--color-warn); border-radius: var(--radius-md);
  padding: 10px 12px; margin: 10px 0; font-size: 13px; color: var(--color-text); }
.stl-callout.is-danger { background: var(--color-danger-soft); border-color: var(--color-danger); border-left-width: 4px; }
.stl-secret { display: block; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 6px;
  background: var(--color-bg); color: var(--color-text); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; word-break: break-all; user-select: all; }
.stl-copy { display: inline-flex; align-items: center; min-height: 36px; margin-top: 8px; padding: 0 12px;
  border: 1px solid var(--color-accent); border-radius: 6px; background: transparent; color: var(--color-accent);
  font-weight: 600; font-size: 13px; cursor: pointer; }
.stl-copy:hover { background: var(--color-accent-800); color: var(--color-accent-100); }

/* Skip link — visually hidden until keyboard focus (WCAG 2.4.1). */
.stl-skip {
  position: absolute; left: -9999px; top: var(--space-2); z-index: 100;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-md);
  background: var(--color-surface); color: var(--color-accent);
  border: 1px solid var(--color-accent); text-decoration: none; font-size: 14px;
}
.stl-skip:focus, .stl-skip:focus-visible { left: var(--space-2); }

/* App frame: sidebar (session mode) + content column. */
.stl-app { display: flex; min-height: 100vh; align-items: stretch; }
.stl-content { flex: 1; min-width: 0; overflow-wrap: break-word; }
/* F-LEADDETAIL-MOBILE-1, 1.2.45: a long unbreakable string — a comma-joined event list, a URL with a query string in an
   imported fact — spilled out of its box and dragged the whole page sideways on a phone (integrations 669 px, settings
   520 px on production). break-word (inherited by every signed-in page) breaks such a run only when it would otherwise
   overflow. Deliberately NOT `anywhere`: that also shrinks min-content, so tables would split words mid-letter instead
   of scrolling inside their .ffm-scroll-x region. */
.stl-content:focus { outline: none; }

/* Brand — "First Five Min" beside the clock-slice mark (comp line 334). */
.stl-brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 16px; color: var(--color-text); text-decoration: none;
}
.stl-brand .stl-mark {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--color-accent) 0deg 30deg, var(--color-neutral-700) 30deg 360deg);
}
.stl-brand b { font-weight: 400; color: var(--color-accent); }

/* Sidebar nav (session mode). Keeps the literal class token "stl-nav" —
   suite 39 asserts it in every session render. */
.stl-nav.stl-side {
  width: 224px; flex: none; display: flex; flex-direction: column;
  padding: var(--space-6) 0; background: var(--color-neutral-900);
  min-height: 100vh;
  /* F-LOGOUT-3 (operator 2026-09-04: "had to go all the way to the bottom to hit log out"): the sidebar
     is STICKY and viewport-tall, so the account footer (language, theme, Help, Log out) stays on screen
     on a long page; a nav taller than the viewport scrolls inside the sidebar. The <=920px row layout
     below opts out (a sticky full-width bar would eat the phone's screen). Suite 216 H2 pins it. */
  position: sticky; top: 0; max-height: 100vh; overflow-y: auto; align-self: flex-start; box-sizing: border-box;
}
.stl-nav.stl-side .stl-brand { padding: 0 var(--space-6) var(--space-8); }
.stl-navlist { display: flex; flex-direction: column; }
.stl-navi { position: relative; }
.stl-nav.stl-side a.item {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-6); font-size: 14px;
  color: var(--color-text); opacity: .65; text-decoration: none;
}
.stl-nav.stl-side a.item:hover { opacity: 1; color: var(--color-accent); }
.stl-nav.stl-side a.item[aria-current="page"] {
  opacity: 1; color: var(--color-accent);
  box-shadow: inset 2px 0 0 var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
}
.stl-side-foot {
  margin-top: auto; padding: var(--space-6) var(--space-6) 0;
  border-top: 1px solid var(--color-divider);
  display: flex; flex-direction: column; gap: var(--space-4);
}
.stl-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--color-accent-800); color: var(--color-accent-100);
  font-size: 11px; display: inline-flex; align-items: center; justify-content: center;
}
.stl-ident { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.stl-ident .who { opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Nav tooltips — visible on hover AND keyboard focus, Esc-dismissible
   (WCAG 1.4.13: dismissable / hoverable / persistent). */
.stl-tip {
  position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%);
  width: max-content; max-width: 240px; z-index: 60;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-md);
  background: var(--color-surface); color: var(--color-text);
  font-size: 12px; line-height: 1.45; box-shadow: var(--shadow-md);
  visibility: hidden; opacity: 0; transition: opacity .12s linear;
}
.stl-navi:hover .stl-tip, .stl-navi:focus-within .stl-tip { visibility: visible; opacity: 1; }
body.stl-tips-off .stl-tip { visibility: hidden !important; opacity: 0 !important; }

/* Top bar (link / bare modes — deep-link visitors and onboarding). */
.stl-nav.stl-topbar {
  display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap;
  min-height: 52px; padding: 0 var(--space-6);
  background: var(--color-neutral-900); border-bottom: 1px solid var(--color-divider);
}
.stl-nav.stl-topbar .sp { flex: 1; }
/* F-LOGOUT-2 (2026-09-04, operator: "logout button does not work"): the footer row
   holds language + theme + the "? Help" launcher (1.2.1) + Log out. With flex-wrap
   at its default (nowrap) the launcher's width pushed Log out PAST the sidebar
   edge into the content column, which painted over it — the click never reached
   the button on any shell page since 1.2.1 (nginx: zero browser logouts after
   2026-08-22; every session expired instead of being revoked). The row WRAPS. */
.stl-switch { display:flex; flex-direction:column; gap:4px; font-size:.78rem; color:var(--ink-3); padding:6px 0; }
.stl-switch select { width:100%; max-width:200px; padding:6px 8px; border:1px solid var(--color-divider); border-radius:6px; background:var(--color-surface); color:var(--color-text); font-size:.85rem; }
.stl-addbiz { display:inline-block; font-size:.8rem; color:var(--color-accent); text-decoration:none; padding:4px 0; }
.stl-nav .acct { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; min-width: 0; }
/* CONSOLE-CANVAS-1: the sidebar lead meter (Redesign 1b) */
.stl-meter { display: block; text-decoration: none; color: inherit; margin: 0 0 var(--space-3); }
.stl-meter .k { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.stl-meter .v { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.stl-meter .v b { font-size: 20px; color: var(--ink-1); font-weight: 600; }
.stl-meter .bar { display: block; height: 3px; background: var(--color-neutral-800); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.stl-meter .bar span { display: block; height: 100%; background: var(--color-accent); }
.stl-nav .acct b { font-weight: 600; }
.stl-nav .lang { display: inline-flex; gap: 2px; }
.stl-nav .lang a {
  color: var(--color-text); opacity: .7; text-decoration: none;
  font-size: 12px; padding: 2px 6px; border-radius: var(--radius-sm);
}
.stl-nav .lang a.on {
  opacity: 1; color: var(--color-accent);
  box-shadow: inset 0 0 0 1px var(--color-accent); font-weight: 600;
}
.stl-nav button.lo, .stl-nav button.stl-theme {
  background: transparent; border: 1px solid var(--color-divider);
  color: var(--color-text); border-radius: var(--radius-md);
  padding: 5px 10px; font-size: 12px; cursor: pointer; font-family: var(--font-body);
}
.stl-nav button.lo:hover, .stl-nav button.stl-theme:hover {
  color: var(--color-accent); border-color: var(--color-accent);
}
.stl-nav .signin {
  font-size: 12.5px; color: var(--color-accent); text-decoration: none;
  border: 1px solid var(--color-accent); border-radius: var(--radius-md); padding: 6px 12px;
}
.stl-nav .signin:hover { background: color-mix(in srgb, var(--color-accent) 12%, transparent); }

/* Legacy page containers, mapped conservatively onto the tokens (pages keep
   their own inner CSS until their slice converts them — no display changes). */
.stl-main { max-width: 900px; margin: 0 auto; padding: var(--space-6); }
.stl-card {
  background: var(--color-surface); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: var(--space-6); margin-bottom: var(--space-4);
}

/* ── 6. Motion ─────────────────────────────────────────────────────────── */
@keyframes ffm-sweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.stl-mark.sweep { animation: ffm-sweep 6s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}

/* F-MOBNAV-1 (2026-09-06): the phone menu button. Hidden everywhere by default; the <=920px block
   shows it only under .stl-collapsible (set by the shell's script). Suite 216 §I. */
.stl-menu-btn { display: none; min-height: 44px; align-items: center; gap: 8px; margin-left: auto; padding: 0 14px;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: transparent; color: var(--color-text);
  font-weight: 600; font-size: 13px; cursor: pointer; }
.stl-menu-btn .stl-menu-cur { font-weight: 400; opacity: .75; }
.stl-menu-btn .stl-menu-cur:not(:empty)::before { content: "· "; }
.stl-menu-btn[aria-expanded="true"] { border-color: var(--color-accent); color: var(--color-accent); }

/* ── 7. Narrow viewports — sidebar folds to a wrapping bar ─────────────── */
@media (max-width: 920px) {
  .stl-app { flex-direction: column; }
  .stl-nav.stl-side { width: 100%; min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; padding: var(--space-3) var(--space-4); position: static; max-height: none; overflow: visible; }
  .stl-nav.stl-side .stl-brand { padding: 0 var(--space-4) 0 0; }
  .stl-navlist { flex-direction: row; flex-wrap: wrap; }
  .stl-nav.stl-side a.item[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--color-accent); }
  .stl-side-foot { margin-top: 0; border-top: none; padding: 0 0 0 var(--space-4); flex-direction: row; align-items: center; }
  /* F-MOBNAV-1 (operator 2026-09-06: "the menu on my phone extends horizontally"): with the shell's script
     running (.stl-collapsible) the twelve links + the footer collapse behind the Menu button and open as a
     VERTICAL list with 44px tap targets; without script the wrapping bar above stays — never unreachable. */
  .stl-nav.stl-side.stl-collapsible .stl-menu-btn { display: inline-flex; }
  .stl-nav.stl-side.stl-collapsible .stl-navlist, .stl-nav.stl-side.stl-collapsible .stl-side-foot { display: none; }
  .stl-nav.stl-side.stl-collapsible.is-open .stl-navlist { display: flex; flex: 1 0 100%; flex-direction: column; margin-top: var(--space-3); padding-top: var(--space-2); border-top: 1px solid var(--color-divider); }
  .stl-nav.stl-side.stl-collapsible.is-open .stl-navlist a.item { min-height: 44px; padding: var(--space-3) var(--space-4); }
  .stl-nav.stl-side.stl-collapsible.is-open .stl-navlist a.item[aria-current="page"] { box-shadow: inset 2px 0 0 var(--color-accent); }
  .stl-nav.stl-side.stl-collapsible.is-open .stl-side-foot { display: flex; flex: 1 0 100%; flex-wrap: wrap; gap: var(--space-3); padding: var(--space-3) var(--space-4) 0; border-top: 1px solid var(--color-divider); }
  .stl-tip { display: none; }
}

/* ADDENDUM-2 M4 / M7 (console sweep, 2026-10-11): on a phone every control the owner taps is a THUMB target, whatever page styling it carries - the sweep (smoke/e2e/console-sweep.js) found buttons and fields
   21-23 px tall (Resend confirmation email, Do-not-contact, Delete their data, Save the policy, Save spend, the number fields) and stand-alone links of 21-23 px. WCAG 2.5.8 asks 24 px; the house target is 44.
   The round "?" marks (24 px, their own size) and the Menu button keep theirs. */
@media (max-width: 640px) {
  .stl-app button:not(.stl-help-q):not(.stl-menu-btn),
  .stl-app select, .stl-app textarea,
  .stl-app input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=file]):not([type=color]) { min-height: 44px; box-sizing: border-box; }
  .stl-gs-body a { display: inline-flex; align-items: center; min-height: 44px; }
  .stl-app summary { min-height: 44px; box-sizing: border-box; padding-top: 11px; padding-bottom: 11px; }
}

/* Help system (2026-09-02): the per-feature "?" marks, the "? Help" launcher,
   the slide-over panel, and the getting-started checklist card. Tokens only. */
.stl-help-q { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-left: 6px;
  border-radius: 50%; border: 1px solid var(--color-divider); background: transparent; color: var(--color-accent);
  font-weight: 700; font-size: 13px; line-height: 1; cursor: pointer; vertical-align: middle; }
.stl-help-q:hover, .stl-help-q:focus-visible { background: color-mix(in srgb, var(--color-accent) 14%, transparent); outline: 2px solid var(--color-accent); outline-offset: 1px; }
.stl-help-btn { min-height: 44px; border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: transparent;
  color: var(--color-text); font-weight: 600; font-size: 13px; padding: 0 12px; cursor: pointer; white-space: nowrap; }
.stl-help-btn:hover, .stl-help-btn:focus-visible { border-color: var(--color-accent); color: var(--color-accent); }
.stl-help-panel { position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%); z-index: 70; overflow: auto;
  background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-lg);
  padding: var(--space-4) var(--space-6); box-sizing: border-box; }
.stl-help-panel[hidden] { display: none; }
.stl-help-head { display: flex; align-items: center; gap: 8px; }
.stl-help-head h2 { flex: 1; font-size: 1.05rem; margin: 0; }
.stl-help-head button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--color-text); font-size: 22px; cursor: pointer; }
.stl-help-pages { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.stl-help-pages a { font-size: 12px; border: 1px solid var(--color-divider); border-radius: 999px; padding: 3px 10px; color: var(--color-text); text-decoration: none; }
.stl-help-body h2, .stl-help-body h3, .stl-help-body h4 { font-size: .95rem; margin: 12px 0 4px; }
.stl-help-body p, .stl-help-body li { font-size: .9rem; line-height: 1.5; }
.stl-help-body a { color: var(--color-accent); }
.stl-help-body code { background: var(--color-neutral-900); border-radius: 4px; padding: 1px 4px; }
.stl-help-ask { border-top: 1px solid var(--color-divider); margin-top: 12px; padding-top: 10px; display: grid; gap: 6px; }
.stl-help-ask label { font-weight: 600; font-size: .85rem; }
.stl-help-ask textarea { width: 100%; box-sizing: border-box; padding: 8px; border: 1px solid var(--color-divider); border-radius: var(--radius-sm);
  background: var(--color-bg); color: var(--color-text); font-size: .9rem; }
.stl-help-ask button { justify-self: start; min-height: 44px; border: 0; border-radius: var(--radius-md); padding: 0 16px;
  background: var(--color-accent); color: var(--color-bg); font-weight: 700; cursor: pointer; }
.stl-help-note { font-size: .78rem; color: var(--color-neutral-500); margin: 2px 0 0; }
.stl-help-answer p { font-size: .9rem; line-height: 1.5; }
.stl-help-answer ul { padding-left: 18px; font-size: .85rem; }
.stl-help-answer a { color: var(--color-accent); }
.stl-help-foot { font-size: .85rem; margin-top: 10px; }
.stl-help-foot a { color: var(--color-accent); }
.stl-gs-head { display: flex; align-items: center; gap: 8px; }
.stl-gs-head h2 { flex: 1; font-size: 1rem; margin: 0; }
.stl-gs-count { font-size: .75rem; font-weight: 600; border-radius: 999px; padding: 2px 10px; background: var(--color-neutral-800); color: var(--color-neutral-100); }
.stl-gs-list { list-style: none; margin: 10px 0 0; padding: 0; }
.stl-gs-list li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--color-divider); }
.stl-gs-list li.done .stl-gs-body { opacity: .6; }
.stl-gs-list li.done .stl-gs-body a { text-decoration: line-through; }
.stl-gs-mark { width: 22px; flex: none; font-weight: 700; color: var(--color-accent); }
.stl-gs-body { flex: 1; display: grid; gap: 2px; }
.stl-gs-body a { color: var(--color-text); font-weight: 600; text-decoration: none; }
.stl-gs-hint { font-size: .8rem; color: var(--color-neutral-500); }

/* F-LEADDETAIL-MOBILE-1 (2026-09-25): ONE rule for every data table on a signed-in page. A table wider
   than its card scrolls inside this region instead of dragging the whole page sideways on a phone.
   The markup carries tabindex="0" + role="region" + a name (aria-labelledby its heading) so a keyboard
   user can scroll it too (WCAG 2.1.1); the focus ring is the global :focus-visible rule above.
   overscroll-behavior-x stops a swipe past the table's edge from becoming browser back-navigation. */
.ffm-scroll-x { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
