/* "Larger text" option (owner, 21 Oct 2026, for Nigel and any low-vision user).
   Turned on by the header button, which adds .fdp-a11y to <html>; remembered per browser, and
   on by default when the system asks for more contrast. Aims at WCAG 2.2 AAA for text (7:1):
   near-black text, larger plain sans-serif type (all rem sizes scale, because the root size
   changes), looser spacing, underlined links, a thick visible focus ring, stronger borders,
   no fading and no animation. State colours (ok / verify / blocker) stay, only darker.
   Reviewed 21 Oct 2026: scratchpad a11y/REVIEW.md. */

/* --- Fixes that apply in both modes ---------------------------------------- */
/* The AI status badge inherited the accent fill from .topnav a: dark text on brown, 3:1. */
.topnav a.ai-badge { background: var(--surface); }
/* Narrow screens: the rail kept a full-height empty block above the content. */
@media (max-width: 860px) { .rail { position: static; min-height: 0; } }
/* Hidden radio inside the mode cards: show keyboard focus on the card. */
.mode-opt:has(input:focus-visible) { outline: 3px solid #000; outline-offset: 3px; }
/* Review page, both modes: the tables were wider than the 1000px column (more so with browser zoom),
   so the Review now buttons were cut off. Give the page more room and let long statuses wrap. */
.work.solo:has(.rv-tw) { max-width: 1280px; }
.rv-tw .rv-status { white-space: normal; max-width: 13em; border-radius: 10px; line-height: 1.35; }
/* Dates broke at the hyphen ("2026-10-" / "21"): enough width for one date. */
.rv-tw td.rv-kind { min-width: 6.6em; }
.rv-tw .rv-now { white-space: nowrap; }

/* --- The mode ---------------------------------------------------------------- */
html.fdp-a11y {
  font-size: 112.5%;        /* 18px root: every rem size in app.css and review.css grows */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f4f5;
  --ink: #000000;
  --ink-2: #111111;
  --muted: #262626;
  --line: #5c656d;
  --line-2: #c4cacf;
  --accent: #7a4d10;        /* darker flame: white button text 7.2:1 */
  --accent-ink: #6e3700;
  --accent-deep: #4f2700;
  --high: #1b5e36;
  --mod: #5c4800;
  --low: #262626;
  --warn: #5c4800;
  --danger: #6e1f1f;
}
html.fdp-a11y body {
  font-family: Verdana, Tahoma, "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: .01em;
  word-spacing: .04em;
  color: #000;
}
/* Small text: a floor of .9rem (17px), and no faint grey. */
html.fdp-a11y small, html.fdp-a11y .muted, html.fdp-a11y .dsc, html.fdp-a11y .sub,
html.fdp-a11y .role, html.fdp-a11y label, html.fdp-a11y th, html.fdp-a11y td { font-size: 1rem; color: inherit; }
html.fdp-a11y :is(.band, .status-chip, .tag-chip, .pill, .chip, .tag, .rv-status, .rv-pill, .rv-who, .mbadge,
  .rail-head, .eyebrow, .rv-crumb, .kpi-link, .rv-note, .rv-kw, .rv-count, .dims, .legend, .sitefoot,
  .claim-said, .notice, .three ul, .topnav a) { font-size: .9rem; }
html.fdp-a11y .muted, html.fdp-a11y .dsc, html.fdp-a11y .sub, html.fdp-a11y .role { color: #262626; }
html.fdp-a11y h1 { font-size: 1.75rem; }
html.fdp-a11y h2 { font-size: 1.35rem; }
html.fdp-a11y h3, html.fdp-a11y h4 { font-size: 1.15rem; }
html.fdp-a11y h1, html.fdp-a11y h2, html.fdp-a11y h3, html.fdp-a11y h4 { color: #000; letter-spacing: 0; }

/* Reflow: at high zoom a sticky, wrapped header would cover the screen. */
html.fdp-a11y .topbar { position: static; flex-wrap: wrap; row-gap: 8px; height: auto; }
html.fdp-a11y .topnav { flex-wrap: wrap; row-gap: 8px; }
html.fdp-a11y .topnav :is(a, .whoami) { white-space: normal; }
html.fdp-a11y .rail { top: 0; }
/* Fixed widths that larger text would overflow or clip. */
html.fdp-a11y .mbadge { width: auto; min-width: 84px; }
html.fdp-a11y .score-sm { width: auto; min-width: 26px; }
html.fdp-a11y .rv-block { overflow: visible; }
html.fdp-a11y .rv-rowctl { min-width: 0; }
/* Status pills may wrap, so a long status does not squeeze the task name or push dates off screen. */
html.fdp-a11y :is(.rv-status, .rv-pill) { white-space: normal; }
/* Review tables: the task name gets the room; date, reviewer chips and the button stay on one line. */
html.fdp-a11y .rv-tw table { width: 100%; }
html.fdp-a11y .rv-tw td:first-child { width: 30%; min-width: 200px; }
html.fdp-a11y .rv-tw td:has(> .rv-status) { min-width: 9em; }
html.fdp-a11y .rv-tw td.what { min-width: 220px; }
html.fdp-a11y .rv-tw :is(.rv-chips-col, .rv-now) { white-space: nowrap; width: 1%; }
/* Larger text needs the room: use the screen width, not the normal 1000px column. */
html.fdp-a11y .work { max-width: none; padding-left: 24px; padding-right: 24px; }
html.fdp-a11y .work.solo { max-width: 1500px; }
html.fdp-a11y .rv-tw .rv-status { max-width: 18em; border-radius: 10px; }

/* Hard-coded colours in app.css / review.css. */
html.fdp-a11y .fi-working-box p, html.fdp-a11y .band-ruledout, html.fdp-a11y .score-void,
html.fdp-a11y .rv-who.assigned, html.fdp-a11y .rv-who.ontime { color: #262626; }
html.fdp-a11y .rv-who.draft, html.fdp-a11y .rv-who.ontime.started { background: #6e4a0e; color: #fff; }
html.fdp-a11y .rv-who.done { background: #145c32; color: #fff; }
html.fdp-a11y .notice.warn, html.fdp-a11y .notice.draft, html.fdp-a11y .rv-block > h3 .kpi-link strong { color: #4a2600; }
html.fdp-a11y input::placeholder, html.fdp-a11y textarea::placeholder { color: #4d4d4d; opacity: 1; }
/* Ruled-out items were faded to half opacity (3:1); the strike-through still marks them. */
html.fdp-a11y :is(.cand.eliminated, .modeitem.ruled_out_material) { opacity: 1; }

/* Links: always underlined, so they never rely on colour alone. */
html.fdp-a11y main a { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: .08em; }
html.fdp-a11y main a.btn, html.fdp-a11y main .btn, html.fdp-a11y main nav a { text-decoration: none; }
/* Tabs are already boxed; underlining them as well looked like a wall of links. */
html.fdp-a11y .commercial-tabs a.current { text-decoration: underline; }

/* Form fields and boxes: clear edges. */
html.fdp-a11y input, html.fdp-a11y select, html.fdp-a11y textarea {
  font-size: 1rem; color: #000; border: 2px solid #5c656d; }
html.fdp-a11y .card, html.fdp-a11y .rv-block { border: 2px solid #8a939a; box-shadow: none; }
html.fdp-a11y .btn { font-size: 1rem; }

/* A thick focus ring for keyboard users. */
html.fdp-a11y :focus-visible { outline: 3px solid #000 !important; outline-offset: 3px !important; box-shadow: 0 0 0 6px #ffd23f !important; }

/* Fainter watermark so it does not sit over the words; it stays on every page. */
html.fdp-a11y .fdp-watermark { opacity: .035 !important; }

/* No motion. */
html.fdp-a11y *, html.fdp-a11y *::before, html.fdp-a11y *::after {
  transition: none !important; animation: none !important; scroll-behavior: auto !important; }

/* The button itself (shown in both modes). Fixed label; aria-pressed carries the state. */
.a11y-toggle { display: inline-flex; align-items: center; gap: .4em; min-height: 34px; padding: 5px 12px;
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line); border-radius: var(--r-sm, 4px); background: var(--surface, #fff); color: var(--ink, #262a2e); }
.a11y-toggle:hover { background: var(--accent-soft, #fbeedd); }
.a11y-toggle .aa { font-family: Georgia, serif; font-size: 1.15em; line-height: 1; }
.a11y-toggle[aria-pressed="true"] { background: #000; color: #fff; border-color: #000; }
@media print { .a11y-toggle { display: none; } }
