/* FILE READY theme — additive advancement stylesheet.
   Palette (locked 2026-11-01, owner direction): black, white, and
   electric blue in both modes. DARK: canvas #121212, panels #1E1E1E,
   text #F2F2F2, accent #00B4FF (buttons #0095D9 so white labels stay
   readable). LIGHT is the exact opposite with the same colors: white
   canvas, near-black text, the same electric blue, and the same black
   brand bars (top bar, production header, sign-in backdrop) in both
   modes. Green, amber, and red are reserved for status meaning only.
   The light layer below supersedes the original v96 lavender light
   look at the owner's direction; the v96 source stylesheets themselves
   are unmodified. */

.fr-theme-toggle { background: transparent; border: 1px solid rgba(255, 255, 255, .5); color: #fff; border-radius: 20px; padding: 6px 13px; font-size: 12.5px; cursor: pointer; margin-left: 14px; }
.fr-theme-toggle:hover { background: rgba(0, 180, 255, .25); }
.fr-theme-toggle-float { position: fixed; top: 10px; right: 10px; z-index: 50; background: #0095d9; margin: 0; }

/* ---- Brand: how FILE READY is shown in dark mode ---- */
html[data-theme="dark"] .brandmark { color: #f2f2f2; }
html[data-theme="dark"] .brandmark span,
html[data-theme="dark"] .brand span { color: #00b4ff; }

/* ---- Processor workspace family (production.css) ---- */
html.fr-prod[data-theme="dark"] { --ink: #f2f2f2; --purple: #0095d9; --bg: #121212; --border: #2e2e2e; }
html.fr-prod[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
html.fr-prod[data-theme="dark"] header { background: #0a0a0a; color: #f2f2f2; }
html.fr-prod[data-theme="dark"] header b { color: #f2f2f2; }
html.fr-prod[data-theme="dark"] header .mode { border-color: #00b4ff; color: #00b4ff; }
html.fr-prod[data-theme="dark"] a { color: #00b4ff; }
html.fr-prod[data-theme="dark"] .launch-note { background: #1a1a1a; border-color: var(--border); color: #a6a6a6; }
html.fr-prod[data-theme="dark"] .card,
html.fr-prod[data-theme="dark"] details,
html.fr-prod[data-theme="dark"] fieldset,
html.fr-prod[data-theme="dark"] dialog,
html.fr-prod[data-theme="dark"] #service-status,
html.fr-prod[data-theme="dark"] .attention-group { background: #1e1e1e; border-color: var(--border); color: var(--ink); }
html.fr-prod[data-theme="dark"] .notice,
html.fr-prod[data-theme="dark"] .badge { background: #16232c; color: var(--ink); }
html.fr-prod[data-theme="dark"] .sticky-actions { background: #121212; }
html.fr-prod[data-theme="dark"] .qc-returned { background: #33200a; border-color: #e86a00 !important; }
html.fr-prod[data-theme="dark"] .queue-card.qc-returned .badge { background: #e86a00; color: #fff; }
html.fr-prod[data-theme="dark"] .qc-feedback-card { background: #33200a; border-color: #e86a00; }
html.fr-prod[data-theme="dark"] .qc-return-note { background: #4a2c0d; color: var(--ink); }
.qc-feedback-label { flex: 1 1 320px; }
.qc-feedback-label textarea { width: 100%; margin-top: 5px; font: inherit; }
html.fr-prod[data-theme="dark"] input,
html.fr-prod[data-theme="dark"] select,
html.fr-prod[data-theme="dark"] textarea,
html.fr-prod[data-theme="dark"] .memo-template textarea { background: #1a1a1a; color: #f2f2f2; border-color: #3a3a3a; }
html.fr-prod[data-theme="dark"] button.secondary { background: #1a1a1a; color: #7fd4ff; border-color: #3a3a3a; }
html.fr-prod[data-theme="dark"] .status-option { background: #1a1a1a !important; color: #f2f2f2 !important; border-color: #3a3a3a !important; }
html.fr-prod[data-theme="dark"] .choice-toggle { background: #1e1e1e; color: var(--ink); border-color: #3a3a3a; }
html.fr-prod[data-theme="dark"] .choice-options { background: #1a1a1a; border-color: #3a3a3a; }
html.fr-prod[data-theme="dark"] .choice-options button { background: #1e1e1e; color: var(--ink); border-color: #3a3a3a; }
html.fr-prod[data-theme="dark"] .choice-options button:hover,
html.fr-prod[data-theme="dark"] .choice-options button[aria-pressed="true"] { background: #16232c; border-color: #00b4ff; }
html.fr-prod[data-theme="dark"] .processor-help { background: #1a1a1a; }
html.fr-prod[data-theme="dark"] .pending-source { background: #2a2118; }
html.fr-prod[data-theme="dark"] .action-feedback { background: #14231a; color: #bfe9cf; border-color: #2fbf71; }
html.fr-prod[data-theme="dark"] .action-feedback[data-state="loading"] { background: #16232c; color: #cfeaff; border-color: #00b4ff; }
html.fr-prod[data-theme="dark"] .action-feedback[data-state="error"] { background: #2a1718; color: #ffc9c9; border-color: #ff5252; }
html.fr-prod[data-theme="dark"] .action-spinner { border-color: #3a3a3a; border-top-color: #00b4ff; }
html.fr-prod[data-theme="dark"] th { background: #242424; }
html.fr-prod[data-theme="dark"] td, html.fr-prod[data-theme="dark"] th { border-color: var(--border); }
html.fr-prod[data-theme="dark"] .small { color: #a6a6a6; }
html.fr-prod[data-theme="dark"] .section-count { color: #a6a6a6; }
html.fr-prod[data-theme="dark"] .success { color: #2fbf71; }
html.fr-prod[data-theme="dark"] .error { color: #ff5252; }
html.fr-prod[data-theme="dark"] footer { color: #a6a6a6 !important; border-color: #2e2e2e !important; }

/* ---- Academy family (processor-training.css) ---- */
html.fr-acad[data-theme="dark"] { --ink: #f2f2f2; --bg: #121212; --line: #2e2e2e; --muted: #a6a6a6; --dark: #0a0a0a; --teal: #0095d9; }
html.fr-acad[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
html.fr-acad[data-theme="dark"] a { color: #00b4ff; }
html.fr-acad[data-theme="dark"] button { background: #0095d9; border-color: #0095d9; }
html.fr-acad[data-theme="dark"] .hero { background: linear-gradient(115deg, #000000, #0d2f45); }
html.fr-acad[data-theme="dark"] .hero .eyebrow { color: #7fd4ff; }
html.fr-acad[data-theme="dark"] .hero button { background: #00b4ff; border-color: #00b4ff; color: #06222f; }
html.fr-acad[data-theme="dark"] .panel,
html.fr-acad[data-theme="dark"] .module-card,
html.fr-acad[data-theme="dark"] .question,
html.fr-acad[data-theme="dark"] .stat,
html.fr-acad[data-theme="dark"] aside,
html.fr-acad[data-theme="dark"] details,
html.fr-acad[data-theme="dark"] .terms div,
html.fr-acad[data-theme="dark"] .training-document { background: #1e1e1e; border-color: var(--line); color: var(--ink); }
html.fr-acad[data-theme="dark"] .side-link { color: var(--ink); }
html.fr-acad[data-theme="dark"] .side-link[aria-current="page"],
html.fr-acad[data-theme="dark"] .side-link:hover { background: #16232c; color: #7fd4ff; }
html.fr-acad[data-theme="dark"] .training-boundary { background: #1a1a1a; border-color: var(--line); }
html.fr-acad[data-theme="dark"] .note { background: #1a1a1a; }
html.fr-acad[data-theme="dark"] .progress { background: #2e2e2e; }
html.fr-acad[data-theme="dark"] .progress span { background: #00b4ff; }
html.fr-acad[data-theme="dark"] input,
html.fr-acad[data-theme="dark"] select,
html.fr-acad[data-theme="dark"] textarea { background: #1a1a1a; color: #f2f2f2; border: 1px solid #3a3a3a; }
html.fr-acad[data-theme="dark"] .choice { background: #1e1e1e; color: var(--ink); border-color: #3a3a3a; }
html.fr-acad[data-theme="dark"] .choice:hover { background: #16232c; }
html.fr-acad[data-theme="dark"] .feedback,
html.fr-acad[data-theme="dark"] .caution,
html.fr-acad[data-theme="dark"] .feedback.try-again,
html.fr-acad[data-theme="dark"] .choice.selected-wrong,
html.fr-acad[data-theme="dark"] .reset-box { background: #1e1e1e; border-color: var(--line); color: #f2f2f2; }
html.fr-acad[data-theme="dark"] #training-status { background: #0d2f45; }
html.fr-acad[data-theme="dark"] .outline,
html.fr-acad[data-theme="dark"] .tab { background: #1e1e1e; color: #7fd4ff; border-color: #3a3a3a; }
html.fr-acad[data-theme="dark"] .tab[aria-pressed="true"] { background: #0095d9; color: #fff; }

/* ---- App shell (style.css) ---- */
html.fr-shell[data-theme="dark"] { --ink: #f2f2f2; --panel: #0b0b0b; --panel2: #000000; --line: #2e2e2e; --paper: #121212; --card: #1e1e1e; --text: #f2f2f2; --muted: #a6a6a6; --accent: #00b4ff; --accent2: #0095d9; --warn: #ffb020; --bad: #ff5252; }
html.fr-shell[data-theme="dark"] body { background: #121212; color: #e8eef2; }
html.fr-shell[data-theme="dark"] .authwrap { background: linear-gradient(160deg, #000000, #121212 55%, #06334d 130%); }
html.fr-shell[data-theme="dark"] .authcard { background: #1e1e1e; color: #f2f2f2; }
html.fr-shell[data-theme="dark"] [class*="card"],
html.fr-shell[data-theme="dark"] .panel { background: #1e1e1e; border-color: #2e2e2e; color: #f2f2f2; }
html.fr-shell[data-theme="dark"] input,
html.fr-shell[data-theme="dark"] select,
html.fr-shell[data-theme="dark"] textarea { background: #1a1a1a; color: #f2f2f2; border-color: #3a3a3a; }
html.fr-shell[data-theme="dark"] label { color: #f2f2f2; }
html.fr-shell[data-theme="dark"] .btn.secondary { background: #242424; color: #7fd4ff; }
html.fr-shell[data-theme="dark"] .note { background: #1a1a1a; border-color: #2e2e2e; }
html.fr-shell[data-theme="dark"] .meta, html.fr-shell[data-theme="dark"] .mini { color: #a6a6a6; }
html.fr-shell[data-theme="dark"] td, html.fr-shell[data-theme="dark"] th { border-color: #2e2e2e; }
html.fr-shell[data-theme="dark"] .res-coltitle.adv { color: #00b4ff; border-color: #00b4ff; }
html.fr-shell[data-theme="dark"] .res-coltitle.news { color: #ffb020; border-color: #ffb020; }
html.fr-shell[data-theme="dark"] .res-coltitle.links { color: #7fd4ff; border-color: #7fd4ff; }
html.fr-shell[data-theme="dark"] .res-card { background: #1e1e1e; border-color: #2e2e2e; color: #f2f2f2; }
html.fr-shell[data-theme="dark"] .res-pin { background: #242424; }
html.fr-shell[data-theme="dark"] .res-link { border-color: #2e2e2e; }
html.fr-shell[data-theme="dark"] .res-link a { color: #00b4ff; }
html.fr-shell[data-theme="dark"] .dashnavbtn { background: #1e1e1e; border-color: #2e2e2e; color: #f2f2f2; }
html.fr-shell[data-theme="dark"] .dashnavbtn.on { background: #0095d9; border-color: #0095d9; color: #fff; }
html.fr-shell[data-theme="dark"] .filecard { border-color: #2e2e2e; }
html.fr-shell[data-theme="dark"] .ref { background: #242424; color: #7fd4ff; }
html.fr-shell[data-theme="dark"] .chip { background: #242424; color: #f2f2f2; }
html.fr-shell[data-theme="dark"] .chip.qc { background: #2a2118; color: #ffb020; }
html.fr-shell[data-theme="dark"] .chip.complete { background: #14231a; color: #2fbf71; }
html.fr-shell[data-theme="dark"] .chip.overdue { background: #2a1718; color: #ff5252; }
html.fr-shell[data-theme="dark"] .progressbar { background: #2e2e2e; }
html.fr-shell[data-theme="dark"] .testerbanner { background: #0d2f45; }
html.fr-shell[data-theme="dark"] .gatebanner { background: #3a2410; color: #ffd9ae; border-color: #e86a00; }
html.fr-shell[data-theme="dark"] .lesson { background: #1e1e1e; border-color: #2e2e2e; color: #f2f2f2; }
html.fr-shell[data-theme="dark"] .docpanel { background: #1e1e1e; border-color: #8a7433; color: #f2f2f2; }
html.fr-shell[data-theme="dark"] .sect > h3 { background: #242424; color: #f2f2f2; }
html.fr-shell[data-theme="dark"] .blockers { background: #2a1718; border-color: #5a2b2e; color: #f2f2f2; }
html.fr-shell[data-theme="dark"] .attest { background: #14231a; border-color: #24503a; color: #f2f2f2; }

/* ---- Ask File Ready help panel ---- */
html[data-theme="dark"] .help-panel { background: #1e1e1e; color: #f2f2f2; border-color: #2e2e2e; }
html[data-theme="dark"] .help-card { background: #242424; border-color: #2e2e2e; color: #f2f2f2; }
html[data-theme="dark"] .help-fab { background: #0095d9; }
html[data-theme="dark"] .help-input { background: #1a1a1a; color: #f2f2f2; border-color: #3a3a3a; }
html[data-theme="dark"] .help-source, html[data-theme="dark"] .help-note { color: #a6a6a6; }
html[data-theme="dark"] .help-link { color: #00b4ff; }

/* ================= LIGHT MODE: the opposite of dark, same colors ====
   White canvas, near-black text, electric blue accents, black brand
   bars. Applies whenever Dark mode is off. */

/* ---- Brand in light mode ---- */
html:not([data-theme="dark"]) .brandmark span,
html:not([data-theme="dark"]) .brand span { color: #00b4ff; }

/* ---- Processor workspace family ---- */
html.fr-prod:not([data-theme="dark"]) { --ink: #111418; --purple: #0095d9; --bg: #f7fafd; --border: #d7e3ec; }
html.fr-prod:not([data-theme="dark"]) body { background: var(--bg); color: var(--ink); }
html.fr-prod:not([data-theme="dark"]) header { background: #0a0a0a; color: #f2f2f2; }
html.fr-prod:not([data-theme="dark"]) header b { color: #f2f2f2; }
html.fr-prod:not([data-theme="dark"]) header .mode { border-color: #00b4ff; color: #00b4ff; }
html.fr-prod:not([data-theme="dark"]) header a { color: #f2f2f2; }
html.fr-prod:not([data-theme="dark"]) a { color: #0095d9; }
html.fr-prod:not([data-theme="dark"]) .launch-note { background: #eaf4fb; border-color: var(--border); color: #44525e; }
html.fr-prod:not([data-theme="dark"]) .notice,
html.fr-prod:not([data-theme="dark"]) .badge { background: #eaf4fb; }
html.fr-prod:not([data-theme="dark"]) .processor-help { background: #f2f9fd; border-left-color: #0095d9; }
html.fr-prod:not([data-theme="dark"]) th { background: #eef5fa; }
html.fr-prod:not([data-theme="dark"]) .small, html.fr-prod:not([data-theme="dark"]) .section-count { color: #55636e; }
html.fr-prod:not([data-theme="dark"]) button.secondary { color: #0077b6; border-color: #b9cfdd; }
html.fr-prod:not([data-theme="dark"]) footer { color: #55636e !important; border-color: #d7e3ec !important; }

/* ---- Academy family ---- */
html.fr-acad:not([data-theme="dark"]) { --ink: #10181f; --bg: #f7fafd; --line: #d7e3ec; --muted: #55636e; --dark: #0a0a0a; --teal: #0095d9; }
html.fr-acad:not([data-theme="dark"]) body { background: var(--bg); color: var(--ink); }
html.fr-acad:not([data-theme="dark"]) a { color: #0095d9; }
html.fr-acad:not([data-theme="dark"]) .hero { background: linear-gradient(115deg, #000000, #0d2f45); }
html.fr-acad:not([data-theme="dark"]) .hero .eyebrow { color: #7fd4ff; }
html.fr-acad:not([data-theme="dark"]) .hero button { background: #00b4ff; border-color: #00b4ff; color: #06222f; }
html.fr-acad:not([data-theme="dark"]) .note { background: #eaf4fb; border-left-color: #0095d9; }
html.fr-acad:not([data-theme="dark"]) .eyebrow { color: #0095d9; }
html.fr-acad:not([data-theme="dark"]) #training-status { background: #0d2f45; }

/* ---- App shell ---- */
html.fr-shell:not([data-theme="dark"]) { --ink: #0a0a0a; --panel: #0b0b0b; --panel2: #000000; --line: #d7e3ec; --paper: #f7fafd; --card: #ffffff; --text: #10181f; --muted: #55636e; --accent: #0095d9; --accent2: #0077b6; }
html.fr-shell:not([data-theme="dark"]) body { background: #f7fafd; color: #10181f; }
html.fr-shell:not([data-theme="dark"]) .authwrap { background: linear-gradient(160deg, #000000, #121212 55%, #06334d 130%); }
html.fr-shell:not([data-theme="dark"]) .brandmark { color: #0a0a0a; }
html.fr-shell:not([data-theme="dark"]) .brandmark.small { color: #fff; }
html.fr-shell:not([data-theme="dark"]) .topbar .brandmark span { color: #00b4ff; }
html.fr-shell:not([data-theme="dark"]) .authcard .brandmark span { color: #0095d9; }
html.fr-shell:not([data-theme="dark"]) .res-coltitle.adv { color: #0095d9; border-color: #0095d9; }
html.fr-shell:not([data-theme="dark"]) .res-coltitle.links { color: #0077b6; border-color: #0077b6; }
html.fr-shell:not([data-theme="dark"]) .res-link a { color: #0095d9; }
html.fr-shell:not([data-theme="dark"]) .testerbanner { background: #0d2f45; }
html.fr-shell:not([data-theme="dark"]) .lesson { background: #ffffff; border-color: #d7e3ec; }
html.fr-shell:not([data-theme="dark"]) .docpanel { background: #ffffff; border-color: #b9cfdd; }

/* ---- Ask File Ready help panel ---- */
html:not([data-theme="dark"]) .help-fab { background: #0095d9; }
html:not([data-theme="dark"]) .help-link { color: #0095d9; }

/* ================= BRANDING SWEEP (2026-11-01 full color audit) ====
   Every remaining lavender, purple, teal, gold, and cream in the
   source stylesheets, remapped to the black + electric blue palette
   in both modes. Status colors (green pass, red missing/error, amber
   waiting) are the app's working language and stay untouched. */

/* ---- dark: production ---- */
html.fr-prod[data-theme="dark"] :focus-visible { outline-color: #00b4ff; }
html.fr-prod[data-theme="dark"] .save-status[data-state="saving"] { background: #16232c; color: #7fd4ff; border-color: #00b4ff; }
html.fr-prod[data-theme="dark"] .current-review { outline-color: #00b4ff; }
html.fr-prod[data-theme="dark"] .section-links [aria-current="step"] { outline-color: #00b4ff; }
html.fr-prod[data-theme="dark"] dialog::backdrop { background: rgba(5, 8, 10, .66); }
html.fr-prod[data-theme="dark"] .source-note,
html.fr-prod[data-theme="dark"] .beginner-time,
html.fr-prod[data-theme="dark"] .processor-links small,
html.fr-prod[data-theme="dark"] .review-note small { color: #a6a6a6; }
html.fr-prod[data-theme="dark"] .audit-followups,
html.fr-prod[data-theme="dark"] .audit-document-help,
html.fr-prod[data-theme="dark"] .shared-review-help,
html.fr-prod[data-theme="dark"] .section-note { background: #1a1a1a; border-color: #2e2e2e; color: #f2f2f2; }
html.fr-prod[data-theme="dark"] .help-topic { border-color: #2e2e2e; }

/* ---- dark: academy ---- */
html.fr-acad[data-theme="dark"] :focus-visible { outline-color: #00b4ff; }
html.fr-acad[data-theme="dark"] .terms dt { color: #7fd4ff; }
html.fr-acad[data-theme="dark"] .mode { border-color: #00b4ff; color: #7fd4ff; }
html.fr-acad[data-theme="dark"] .tag { background: #242424; color: #a6a6a6; }
html.fr-acad[data-theme="dark"] .watermark { color: #ffb020; border-color: #ffb020; }
html.fr-acad[data-theme="dark"] .complete-tag { background: #14231a; color: #2fbf71; }
html.fr-acad[data-theme="dark"] .scenario { border-left-color: #0095d9; }
html.fr-acad[data-theme="dark"] button[aria-pressed="true"] { box-shadow: 0 0 0 2px #00b4ff; }

/* ---- dark: shell ---- */
html.fr-shell[data-theme="dark"] :focus-visible { outline-color: #00b4ff; }
html.fr-shell[data-theme="dark"] th { background: #242424; }
html.fr-shell[data-theme="dark"] .item { background: #1e1e1e; }
html.fr-shell[data-theme="dark"] .who { color: #a6a6a6; }
html.fr-shell[data-theme="dark"] .modcard { background: #1e1e1e; border-color: #2e2e2e; }

/* ---- dark: Ask File Ready (body-prefixed to beat help.css's own dark rules) ---- */
html[data-theme="dark"] body .help-panel { background: #1e1e1e; border-color: #2e2e2e; color: #f2f2f2; }
html[data-theme="dark"] body .help-head { background: #0a0a0a; color: #fff; }
html[data-theme="dark"] body .help-card { background: #242424; border-color: #2e2e2e; color: #f2f2f2; }
html[data-theme="dark"] body .help-chip { background: #242424; border-color: #3a3a3a; color: #7fd4ff; }
html[data-theme="dark"] body .help-chip:hover { background: #16232c; }
html[data-theme="dark"] body .help-user { background: #16232c; color: #f2f2f2; }
html[data-theme="dark"] body .help-user b,
html[data-theme="dark"] body .help-link,
html[data-theme="dark"] body .help-suggest p { color: #00b4ff; }
html[data-theme="dark"] body .help-cat,
html[data-theme="dark"] body .help-source,
html[data-theme="dark"] body .help-note { color: #a6a6a6; }
html[data-theme="dark"] body .help-form,
html[data-theme="dark"] body .help-note { background: #1e1e1e; }
html[data-theme="dark"] body .help-input { background: #1a1a1a; border-color: #3a3a3a; color: #f2f2f2; }
html[data-theme="dark"] body .help-fab { background: #0095d9; }
html[data-theme="dark"] body .help-fab:hover { background: #00b4ff; }
html[data-theme="dark"] body .help-notice { color: #ffb020; }

/* ---- dark: worksheet practice page (inline styles in workspace.html) ---- */
html[data-theme="dark"] .worksheet-section { background: #16232c; }
html[data-theme="dark"] .worksheet-clarify { color: #7fd4ff; }

/* ---- light: production ---- */
html.fr-prod:not([data-theme="dark"]) :focus-visible { outline-color: #00b4ff; }
html.fr-prod:not([data-theme="dark"]) .save-status[data-state="saving"] { background: #eaf4fb; color: #0077b6; border-color: #7fd4ff; }
html.fr-prod:not([data-theme="dark"]) .current-review { outline-color: #0095d9; }
html.fr-prod:not([data-theme="dark"]) .section-links [aria-current="step"] { outline-color: #0095d9; }
html.fr-prod:not([data-theme="dark"]) .sticky-actions { background: #f7fafd; }
html.fr-prod:not([data-theme="dark"]) .choice-options { background: #f2f9fd; border-color: #b9cfdd; }
html.fr-prod:not([data-theme="dark"]) .choice-options button:hover,
html.fr-prod:not([data-theme="dark"]) .choice-options button[aria-pressed="true"] { background: #eaf4fb; border-color: #0095d9; }
html.fr-prod:not([data-theme="dark"]) .source-note,
html.fr-prod:not([data-theme="dark"]) .beginner-time,
html.fr-prod:not([data-theme="dark"]) .processor-links small,
html.fr-prod:not([data-theme="dark"]) .review-note small { color: #55636e; }
html.fr-prod:not([data-theme="dark"]) .help-topic { border-color: #d7e3ec; }

/* ---- light: academy ---- */
html.fr-acad:not([data-theme="dark"]) :focus-visible { outline-color: #00b4ff; }
html.fr-acad:not([data-theme="dark"]) .terms dt { color: #0077b6; }
html.fr-acad:not([data-theme="dark"]) .side-link[aria-current="page"],
html.fr-acad:not([data-theme="dark"]) .side-link:hover { background: #eaf4fb; color: #0077b6; }
html.fr-acad:not([data-theme="dark"]) .mode { border-color: #0095d9; color: #0077b6; }
html.fr-acad:not([data-theme="dark"]) .training-boundary { background: #eaf4fb; border-color: #d7e3ec; }
html.fr-acad:not([data-theme="dark"]) .training-document { border-color: #b9cfdd; }
html.fr-acad:not([data-theme="dark"]) .watermark { color: #9a6a00; border-color: #c9a227; }
html.fr-acad:not([data-theme="dark"]) .tag { background: #eef5fa; color: #44525e; }
html.fr-acad:not([data-theme="dark"]) .choice:hover { background: #f2f9fd; }
html.fr-acad:not([data-theme="dark"]) .scenario { border-left-color: #0095d9; }
html.fr-acad:not([data-theme="dark"]) .outline,
html.fr-acad:not([data-theme="dark"]) .download-link { border-color: #b9cfdd; color: #0077b6; }

/* ---- light: shell ---- */
html.fr-shell:not([data-theme="dark"]) :focus-visible { outline-color: #00b4ff; }
html.fr-shell:not([data-theme="dark"]) .modcard { border-color: #d7e3ec; }

/* ---- light: Ask File Ready ---- */
html:not([data-theme="dark"]) body .help-head { background: #0a0a0a; }
html:not([data-theme="dark"]) body .help-fab { background: #0095d9; }
html:not([data-theme="dark"]) body .help-fab:hover { background: #00b4ff; }
html:not([data-theme="dark"]) body .help-chip { background: #f2f9fd; border-color: #b9cfdd; color: #0077b6; }
html:not([data-theme="dark"]) body .help-user { background: #eaf4fb; }
html:not([data-theme="dark"]) body .help-cat,
html:not([data-theme="dark"]) body .help-source,
html:not([data-theme="dark"]) body .help-note { color: #55636e; }

/* ---- branding sweep, residual items from the verification scan ---- */
html.fr-prod[data-theme="dark"] details[data-section][data-active="true"][open] > summary::after { color: #00b4ff; }
html.fr-prod:not([data-theme="dark"]) details[data-section][data-active="true"][open] > summary::after { color: #0095d9; }
html.fr-prod[data-theme="dark"] .help-eyebrow { color: #7fd4ff; }
html.fr-prod:not([data-theme="dark"]) .help-eyebrow { color: #0095d9; }
html.fr-prod[data-theme="dark"] .outstanding-list li { border-color: #2e2e2e; }
html.fr-prod:not([data-theme="dark"]) .outstanding-list li { border-color: #d7e3ec; }
html.fr-prod:not([data-theme="dark"]) .member-check-table tbody th { background: #eef5fa; }
html.fr-acad:not([data-theme="dark"]) button[aria-pressed="true"] { box-shadow: 0 0 0 2px #00b4ff; }
html.fr-acad[data-theme="dark"] .choice.selected-answer { background: #16232c; border-color: #00b4ff; }
html.fr-acad:not([data-theme="dark"]) .choice.selected-answer { background: #eaf4fb; border-color: #0095d9; }
html[data-theme="dark"] body .help-open,
html[data-theme="dark"] body .help-send { background: #0095d9; color: #fff; }
html:not([data-theme="dark"]) body .help-open,
html:not([data-theme="dark"]) body .help-send { background: #0095d9; color: #fff; }

/* Green status toast: shows at the TOP of the workspace (owner
   direction) and dismisses itself (timer lives in the app code). */
#action-feedback { top: 76px; bottom: auto; right: 20px; }
@media (max-width: 560px) { #action-feedback { top: 66px; right: 12px; left: 12px; max-width: none; } }

/* Clean, beginner-friendly document lists in the checklist. */
.doclist { margin: 6px 0 6px 20px; padding: 0; line-height: 1.55; }
.doclist li { margin: 3px 0; }

/* Nova's reply bubble follows the electric-blue brand. */
.help-bubble { border-left-color: #00B4FF; }
html[data-theme="dark"] .help-bubble { border-color: #3a3a3a; border-left-color: #00B4FF; }

/* ---- dark: processing state glows (audit fix 2026-11-01) ----
   The original stylesheet paints processing states with pale
   tints made for light mode (pale green, pale red, white panels).
   In dark mode those surfaces stayed pale while the text went
   light, so whole cards and the File sections tab washed out.
   Here every state surface gets a dark tint in the same status
   color, with the glow the app's rules call for: green for
   verified / not required / present, red for missing / not
   reviewed / needs clarification (unresolved work), blue for the
   current step. Light mode keeps the original tints untouched. */
html.fr-prod[data-theme="dark"] .section-navigation { background: #1e1e1e; border-color: #2e2e2e; color: #f2f2f2; }
html.fr-prod[data-theme="dark"] .section-navigation h2 { color: #f2f2f2; }
html.fr-prod[data-theme="dark"] .section-links button { background: #1a1a1a; color: #f2f2f2; border: 1px solid #3a3a3a; }
html.fr-prod[data-theme="dark"] .workflow-step { background: #1e1e1e; color: #f2f2f2; border-color: #2e2e2e; }
html.fr-prod[data-theme="dark"] :is(article, section, details, .card, fieldset, .workflow-step, .box-status, button, .section-links button, .attention-count, .member-result, .signature-member, .audit-answer-row, .unit-comparison-row, .member-check-option):is(.verified, .not-applicable, .present-readable),
html.fr-prod[data-theme="dark"] .audit-answer-row[data-document-state="present-readable"],
html.fr-prod[data-theme="dark"] .status-guide li.verified { background: #14231a; border-color: #2fbf71; color: #f2f2f2; box-shadow: 0 0 12px rgba(47, 191, 113, .28); }
html.fr-prod[data-theme="dark"] :is(article, section, details, .card, fieldset, .workflow-step, .box-status, button, .section-links button, .attention-count, .member-result, .signature-member, .audit-answer-row, .unit-comparison-row, .member-check-option):is(.missing, .not-reviewed, .needs-clarification),
html.fr-prod[data-theme="dark"] .status-guide li.missing { background: #2b1717; border-color: #ff5252; color: #f2f2f2; box-shadow: 0 0 12px rgba(255, 82, 82, .28); }
html.fr-prod[data-theme="dark"] .missing { background: #2b1717; border-color: #ff5252 !important; color: #f2f2f2; }
html.fr-prod[data-theme="dark"] .needs-clarification { background: #2b1717; color: #f2f2f2; }
html.fr-prod[data-theme="dark"] .status-guide li { background: #1a1a1a; color: #f2f2f2; border: 1px solid #3a3a3a; }
html.fr-prod[data-theme="dark"] .status-option[aria-pressed="true"]:is(.verified, .not-applicable) { background: #14231a !important; border-color: #2fbf71 !important; color: #f2f2f2 !important; box-shadow: 0 0 12px rgba(47, 191, 113, .35); }
html.fr-prod[data-theme="dark"] .status-option[aria-pressed="true"]:is(.missing, .not-reviewed, .needs-clarification) { background: #2b1717 !important; border-color: #ff5252 !important; color: #f2f2f2 !important; box-shadow: 0 0 12px rgba(255, 82, 82, .35); }
html.fr-prod[data-theme="dark"] .section-links [aria-current="step"] { border-color: #00b4ff; box-shadow: 0 0 12px rgba(0, 180, 255, .40); }
html.fr-prod[data-theme="dark"] .save-status { background: #14231a; color: #bfe9cf; border-color: #2fbf71; }
html.fr-prod[data-theme="dark"] .save-status[data-state="error"] { background: #2b1717; color: #ffc9c9; border-color: #ff5252; }
html.fr-prod[data-theme="dark"] .action-feedback[data-state="loading"] { background: #16232c; color: #bfe6ff; border-color: #00b4ff; }
html.fr-prod[data-theme="dark"] .action-feedback[data-state="error"] { background: #2b1717; color: #ffc9c9; border-color: #ff5252; }
html.fr-prod[data-theme="dark"] .linked-audit-review { background: #14231a; border-color: #2fbf71; color: #f2f2f2; }

/* two screens: File Overview / Processing Workspace (2026-11-01) */
.file-view-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0 4px}
.file-view-tabs button{border-radius:999px;padding:9px 18px;font-weight:600}
.file-view-tabs button.active{background:#00B4FF;border-color:#00B4FF;color:#fff}
.overview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:14px;margin:14px 0}
.overview-card h3{margin-top:0}
.overview-list{margin:6px 0;padding-left:20px}
.overview-list li{margin:5px 0}
.progress-meter{height:10px;border-radius:6px;background:#E3EAF2;overflow:hidden;margin:8px 0}
.progress-meter i{display:block;height:100%;background:#00B4FF;border-radius:6px}
html[data-theme="dark"] .progress-meter{background:#333}
@media (max-width:750px){.overview-grid{grid-template-columns:1fr}.file-view-tabs button{flex:1}}

/* top navigation menus (2026-11-01) */
.mainnav{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.navmenu{position:relative}
.navmenu summary{list-style:none;cursor:pointer;padding:8px 14px;border-radius:999px;font-weight:600;color:#fff;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.25);white-space:nowrap}
.navmenu summary::-webkit-details-marker{display:none}
.navmenu summary:hover{background:rgba(255,255,255,.22)}
.navcal{cursor:pointer;padding:8px 14px;border-radius:999px;font-weight:600;color:#fff;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.25);white-space:nowrap;font:inherit}
.navcal:hover{background:rgba(255,255,255,.22)}
.navmenu[open ] summary{background:#00B4FF;border-color:#00B4FF}
.navdrop{position:absolute;top:calc(100% + 8px);left:0;min-width:230px;background:#fff;border:1px solid #D8E2EC;border-radius:12px;box-shadow:0 14px 34px rgba(10,25,47,.22);padding:8px;z-index:1300}
.navdrop a,.navdrop button{display:block;width:100%;text-align:left;padding:9px 12px;border-radius:8px;color:#14213D;background:none;border:none;font:inherit;cursor:pointer;text-decoration:none;box-sizing:border-box}
.navdrop a:hover,.navdrop button:hover{background:#EAF6FE}
.navdrop .mini{padding:6px 12px;margin:0}
html[data-theme="dark"] .navdrop{background:#1E1E1E;border-color:#3A3A3A}
html[data-theme="dark"] .navdrop a,html[data-theme="dark"] .navdrop button{color:#F2F2F2}
html[data-theme="dark"] .navdrop a:hover,html[data-theme="dark"] .navdrop button:hover{background:#263544}
@media (max-width:750px){.mainnav{gap:4px}.navmenu summary{padding:7px 10px}.navdrop{min-width:200px}}

/* landing page (signed-out front door, 2026-11-01) */
section#authView.landing{display:block;padding:0;text-align:left}
.landing-in{max-width:1120px;margin:0 auto;padding:22px 20px 0}
.landing-top{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}
.landing-top .brandmark{color:#fff;font-size:24px}
.landing-topnav{display:flex;gap:16px;align-items:center}
.landing-topnav a{color:#D7E9F7;text-decoration:none;font-weight:600}
.landing-topnav a.landing-signin{background:#00B4FF;color:#fff;padding:9px 18px;border-radius:999px;white-space:nowrap}
@media (max-width:860px){table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}}
.landing-hero{display:grid;grid-template-columns:1.12fr .88fr;gap:30px;align-items:start;margin-top:34px}
.landing-pitch h1{color:#fff;font-size:34px;line-height:1.16;margin:6px 0 14px}
.landing-sub{color:#CFE2F2;font-size:17px;line-height:1.55;margin:0 0 6px}
.landing-photo{width:100%;border-radius:14px;border:1px solid rgba(255,255,255,.18);display:block}
.landing-pitch .landing-photo{margin-top:20px}
.landing .authcard{width:100%;max-width:440px;justify-self:end}
.landing-sec{max-width:1120px;margin:46px auto 0;padding:0 20px}
.landing-sec h2{color:#fff;font-size:24px;margin:0 0 16px}
.landing-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(245px,1fr));gap:14px}
.landing-card{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.15);border-radius:14px;padding:16px 18px;color:#DCE9F5}
.landing-card h3{color:#fff;margin:0 0 8px;font-size:16px}
.landing-card p{margin:0 0 8px;line-height:1.5}
.landing-card p:last-child{margin-bottom:0}
.landing-caption{color:#fff;text-align:center;font-size:17px;font-weight:600;margin:14px 0 0}
.landing-note{color:#CFE2F2;margin:16px 0 0;line-height:1.5}
.landing-foot{max-width:1120px;margin:52px auto 0;padding:18px 20px 26px;border-top:1px solid rgba(255,255,255,.16);color:#AFC9DE;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:13px}
.landing-foot a{color:#9FD8F5;text-decoration:none}
@media (max-width:860px){.landing-hero{grid-template-columns:1fr}.landing .authcard{justify-self:stretch;max-width:none}.landing-pitch h1{font-size:27px}}

/* Calendar page: month grid for dated checks */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { font-size: .78rem; font-weight: 700; text-align: center; opacity: .75; padding: 2px 0; }
.cal-cell { min-height: 74px; border: 1px solid rgba(128, 140, 160, .35); border-radius: 10px; padding: 5px; }
.cal-cell.empty { border-style: dashed; opacity: .35; }
.cal-cell.today { outline: 2px solid #0095D9; outline-offset: -2px; }
.cal-d { font-weight: 700; font-size: .85rem; }
.cal-ev { display: block; font-size: .68rem; line-height: 1.25; margin-top: 2px; padding: 1px 5px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(0, 149, 217, .16); }
.cal-ev.k-don { background: rgba(255, 82, 82, .2); }
.cal-ev.k-followup { background: rgba(255, 176, 32, .22); }
.cal-more { display: block; font-size: .68rem; opacity: .75; margin-top: 2px; }
@media (max-width: 640px) { .cal-cell { min-height: 56px; } .cal-ev { font-size: .6rem; } }

/* Sign-in doors and invite code entry */
.doorrow { display: flex; gap: 6px; margin-bottom: 10px; }
.doorbtn { flex: 1; padding: 9px 4px; border-radius: 10px; border: 1px solid rgba(128, 140, 160, .45); background: transparent; color: inherit; font-weight: 700; cursor: pointer; font-size: .86rem; }
.doorbtn.on { background: #0095D9; border-color: #0095D9; color: #fff; }
.invitebox { margin-top: 16px; border-top: 1px solid rgba(128, 140, 160, .3); padding-top: 12px; }

/* Landing top bar: FILE reads white on the black bar, READY stays blue */
.landing-top .brandmark { color: #fff; }
.landing-top .brandmark span { color: #00b4ff; }

/* The logo, everywhere: FILE in white, READY in electric blue,
   heavy weight, READY slanted (owner-supplied reference) */
.brandmark { color: #fff; font-weight: 900; font-style: italic; letter-spacing: .01em; }
.brandmark span { color: #00b4ff; display: inline-block; transform: skewX(-10deg); }
.landing-top .brandmark, .topbar .brandmark { color: #fff; }
.topbar .brand, .brand { color: #fff; font-weight: 900; font-style: italic; }
.brand .rdy { color: #00b4ff; display: inline-block; transform: skewX(-10deg); }
.brand span:not(.rdy) { font-style: normal; }

/* One navigation header across the whole training environment */
.trainnav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #000; color: #fff; padding: 10px 16px; }
header.topbar.trainnav .brand { color: #fff; text-decoration: none; font-size: 1.05rem; }
.trainnav .brand span:not(.rdy) { font-size: .72rem; letter-spacing: .08em; opacity: .85; margin-left: 8px; font-weight: 700; font-style: normal; }
.trainnav .mode { font-size: .72rem; letter-spacing: .08em; border: 1px solid rgba(0, 180, 255, .6); color: #00b4ff; border-radius: 999px; padding: 3px 9px; }
.trainnav nav { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; }
.trainnav nav a { color: #fff; text-decoration: none; font-size: .9rem; }
.trainnav nav a:hover { text-decoration: underline; }
.trainnav nav a[aria-disabled="true"] { opacity: .45; pointer-events: none; }
@media (max-width: 760px) { .trainnav nav { margin-left: 0; } }

/* FINAL logo colors, by surface: on the black bars FILE is white
   in BOTH themes; anywhere the logo sits on a light surface the
   light-theme rules keep FILE black. READY is electric blue and
   slanted on both. */
html.fr-shell:not([data-theme="dark"]) .landing-top .brandmark,
html.fr-shell:not([data-theme="dark"]) .topbar .brandmark,
html.fr-shell[data-theme="dark"] .landing-top .brandmark,
html.fr-shell[data-theme="dark"] .topbar .brandmark,
html.fr-prod .brandmark,
html.fr-acad .brandmark { color: #fff; }

/* Visual audit fixes: stacked control groups and aligned option rows */
.ctl-group{margin:14px 0 18px;padding-top:10px;border-top:1px solid var(--line,#d7dee6)}
.ctl-group .ctl-label{font-weight:700;margin-bottom:6px}
.ctl-opt{display:flex !important;flex-direction:row !important;align-items:flex-start;gap:8px;margin:7px 0;font-weight:400;cursor:pointer}
.ctl-opt input{margin-top:3px;flex:none;width:auto}
.ctl-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:6px}

/* Visual audit Phase 2: secondary buttons must not read as disabled */
.btn.secondary { background: #ffffff; border: 1.5px solid #8fb6d9; color: #0a4d75; }
html.fr-shell[data-theme="dark"] .btn.secondary { background: #242424; border: 1.5px solid #3d5a73; color: #7fd4ff; }
.module-card button:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.5); }

/* Visual audit Phase 3: collapsed panels, price book grid, plan select, training brand */
details.panel > summary.panel-summary { font-size: 1.02rem; font-weight: 800; cursor: pointer; padding: 2px 0; }
.pbrow { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 14px; align-items: end; margin: 10px 0; }
.pbrow label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.pbrow .pbname { padding-bottom: 10px; }
#agPlan { min-width: 230px; }
header.topbar.trainnav .brand { white-space: nowrap; font-size: 1.25rem; }
header.topbar.trainnav .brand span:not(.rdy) { display: inline-block; border: 1.5px solid #00b4ff; border-radius: 999px; padding: 1px 8px; font-size: .68rem; vertical-align: middle; margin-left: 10px; }


/* Unified app header (2026-11-02): the same top bar on every page, so the
   brand, the menus, and the controls sit in the same place throughout the
   app. The main shell, the processor workspace, the training pages, and
   the info pages all render this one header. */
header.appnav { position: sticky; top: 0; z-index: 1200; background: #0a0a0a; color: #fff; display: flex; align-items: center; justify-content: flex-start; gap: 14px; padding: 10px 16px; flex-wrap: wrap; }
header.appnav .brandmark { font-size: 19px; color: #fff; text-decoration: none; }
header.appnav .brandmark span { color: #00b4ff; }
header.appnav .mode { font-size: .72rem; letter-spacing: .08em; border: 1px solid rgba(0, 180, 255, .6); color: #7fd4ff; border-radius: 999px; padding: 3px 9px; white-space: nowrap; margin: 0; background: none; }
header.appnav .topright { margin-left: auto; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
header.appnav .topright .linkbtn { background: none; border: 0; color: #bcd6ea; font-weight: 700; cursor: pointer; font-size: 13.5px; padding: 4px 6px; min-height: 0; }
header.appnav .who { font-size: 12.5px; color: #9fb8cc; margin-right: 8px; }
header.appnav .hidden { display: none !important; }
header.appnav details.navmenu { background: transparent; border: 0; padding: 0; margin: 0; border-radius: 0; }
header.appnav nav.mainnav { gap: 6px; }
header.appnav .fr-theme-toggle { margin-left: 8px; min-height: 0; }
header.appnav .fr-view-switch { margin-left: 8px; }
header.appnav .fr-view-switch button { min-height: 0; }
header.appnav .who { white-space: nowrap; }
header.appnav .navdrop a[aria-disabled="true"] { opacity: .45; }
header.appnav .navdrop a, header.appnav .navdrop button { color: #14213D; }
html.fr-prod:not([data-theme="dark"]) header.appnav .navdrop a, html.fr-prod:not([data-theme="dark"]) header.appnav .navdrop button { color: #14213D; }
html[data-theme="dark"] header.appnav .navdrop a, html[data-theme="dark"] header.appnav .navdrop button { color: #F2F2F2; }
/* Sign-in flash guard: a signed-in browser never paints the sign-in
   screen while the shell checks the session. The boot splash carries
   the same header, and app.js lifts the guard as soon as it decides
   which screen belongs up. */
#bootSplash { display: none; }
html.fr-boot-authed #bootSplash { display: block; }
html.fr-boot-authed #authView, html.fr-boot-authed #changeView { display: none !important; }
#bootSplash.hidden { display: none !important; }
.boot-splash .navfake { padding: 8px 14px; border-radius: 999px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); white-space: nowrap; }
.boot-note { padding: 16px 20px; color: #43566b; font-size: 14px; margin: 0; }
html[data-theme="dark"] .boot-note { color: #a9bfd2; }

/* Sticky footer: the page footer locks to the bottom of the screen
   on short pages instead of floating up under the content. */
body{display:flex;flex-direction:column;min-height:100vh}
body>main{flex:1 0 auto}
body>footer{margin-top:auto}

/* VIEWING AS label (Nov 2, 2026, her direction): while the platform
   owner is managing an agency or previewing a role's workspace, a
   really big label sits at the top right so the current view is
   never a guess. */
#viewAsBar { text-align: right; padding: 14px 2px 2px; }
#viewAsBar .va-chip { display: inline-block; background: #000; color: #fff; font-size: 1.5rem; font-weight: 800; letter-spacing: .02em; line-height: 1.25; padding: 10px 18px; border-radius: 12px; }
#viewAsBar .va-agency { color: #57b6ff; }

/* Agency Setup: clean step cards with unmistakable status chips, and
   the Agency Log as its own tabbed view (Nov 2, 2026). */
.tabrow { display: flex; gap: 8px; margin: 10px 0 14px; }
.stepcard { border: 1px solid #ddd; border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; background: #fff; }
.stephead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stepchip { font-weight: 800; font-size: 0.8rem; letter-spacing: 0.04em; color: #fff; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.stepchip.done { background: #1a7f37; }
.stepchip.todo { background: #c81e1e; }
.logrow { border-bottom: 1px solid #eee; padding: 8px 2px; }
