/* Confidential Reporting — module-owned additions to the design system.
   Loaded AFTER assets/reporting.css and consuming its :root tokens.

   WHY A SECOND FILE: reporting.css is a drop-in artefact from the design
   handoff (handoff/PORTING.md) and is replaced wholesale when a new one
   arrives. Anything we add there is lost on the next drop. These rules cover
   the two screens PORTING.md deliberately left out — "What is deliberately
   not in here": the management dashboard, and the procedure beyond its
   fill-in fields — so they belong to the module, not to the handoff.

   If a future handoff styles these properly, delete the matching block here
   rather than letting the two files fight. */

/* ── Page width ─────────────────────────────────────────────────────────── */

/* reporting.css ships its max-widths commented out, so every page ran the
   full window width. Form pages read best at one comfortable column; the
   management dashboard is a register and stays wide; documents are set
   below. Modifier rules follow this one so they win at equal specificity. */
.cs-cr-page { max-width:760px; }
.cs-cr-page--wide { max-width:1440px; }
/* Two-column pages (signup: pitch + form) need room for both columns; at 760px
   they were squeezed into two narrow strips. :has() catches any page that
   uses the two-column .cs-cr-layout but has no width modifier; it must not
   override --wide (the dashboard) or --doc. */
.cs-cr-page--layout,
.cs-cr-page:not([class*="cs-cr-page--"]):has(> .cs-cr-layout) { max-width:1200px; }

/* ── Form rhythm ────────────────────────────────────────────────────────── */

/* Submit buttons sat flush against the field above them. */
.cs-cr-card form > p { margin-top:20px; }
.cs-cr-card form > p.cs-cr-small,
.cs-cr-card form > p.cs-cr-hint { margin-top:10px; }

/* ── Contrast (WCAG AA 4.5:1 on their tints) ────────────────────────────── */

/* reporting.css's muted grey (#6b7986) was 4.46:1 on white; the ok and warn
   text colours were 4.0:1 and 4.4:1 on their backgrounds. */
:root { --text-muted:#5b6874; }
.cs-cr-notice--ok, .cs-cr-pill--closed { color:#016b3d; }
.cs-cr-notice--warn, .cs-cr-pill--assessing, .cs-cr-pill--due-amber { color:#7a4d04; }

/* Visually hidden label, for a field whose card heading already names it. */
.cs-cr-sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* ── Document page width ────────────────────────────────────────────────── */

/* Overrides reporting.css's .cs-cr-page--doc { max-width:900px }. Carried
   here from a hand-edit made directly to reporting.css on 2026-08-08, which
   the next handoff drop would have silently reverted.
   900px approximates A4 on screen, so what you see matches what prints;
   1200px reads wider on a desktop but the printed A4 is unchanged either way.
   Set this back to 900px to restore the as-delivered document width. */
.cs-cr-page--doc { max-width:1200px; }

/* ── Dashboard ──────────────────────────────────────────────────────────── */

/* The register is the job; settings are not. Three tiles that need acting on
   sit at full size, the two historical counts read as a caption instead of
   competing with them at equal weight. */
.cs-cr-tiles--key { grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); }
.cs-cr-tally { margin:-8px 0 20px; font-size:13px; color:var(--text-muted); }
.cs-cr-tally strong { font-family:var(--font-heading); font-weight:600; color:var(--text-body); }

/* Settings stop being five full-width cards down a 1440px page. */
.cs-cr-settings { margin-top:8px; }
.cs-cr-settings-head { display:flex; align-items:baseline; gap:12px; margin:28px 0 14px; }
.cs-cr-settings-head h2 { font-family:var(--font-heading); font-size:15px; font-weight:700; letter-spacing:.02em; color:var(--text-strong); }
.cs-cr-settings-head span { font-size:13px; color:var(--text-muted); }
.cs-cr-settings .cs-cr-card h2 { font-size:16px; }

/* ── Procedure document ─────────────────────────────────────────────────── */

/* Masthead — company as a blue kicker, our wordmark opposite it, title under
   both. The site's name leads because the site issues this document. */
.cs-cr-doc-head { display:flex; align-items:center; justify-content:space-between; gap:24px; }
.cs-cr-doc-ident { display:flex; align-items:center; gap:14px; min-width:0; }
.cs-cr-doc-org { font-family:var(--font-heading); font-size:12px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--cs-blue); margin:0; }
.cs-cr-doc-logo { margin:0; max-height:40px; }
.cs-cr-doc-mark { flex:0 0 auto; }
.cs-cr-doc-title { font-family:var(--font-heading); font-size:30px; font-weight:700; letter-spacing:-.025em; line-height:1.15; color:var(--text-strong); margin:14px 0 26px; }

/* Document control — four fields across, label above value. */
.cs-cr-doc-control { border-radius:10px; }
.cs-cr-doc-control td { padding:13px 16px; vertical-align:top; }
.cs-cr-doc-lbl { display:block; font-family:var(--font-heading); font-size:10px; font-weight:700; letter-spacing:.11em; text-transform:uppercase; color:var(--text-muted); margin-bottom:7px; }
.cs-cr-doc-control .cs-cr-fill { font-size:14px; }
.cs-cr-doc-control .cs-cr-fill-line { min-width:150px; }

/* Numbered sections hang off a left gutter; body text aligns to the heading,
   not to the number. */
.cs-cr-doc-body { padding-left:52px; margin-top:30px; }
.cs-cr-doc-body h2 { position:relative; margin:30px 0 8px; }
.cs-cr-doc-body h2:first-child { margin-top:0; }
.cs-cr-doc-n { position:absolute; left:-52px; top:0; width:40px; font-family:var(--font-heading); font-size:15px; font-weight:700; color:var(--cs-blue); }
.cs-cr-doc-body h3 { margin:20px 0 6px; }

/* The reporting address reads as a field, not as a navy-boxed callout. */
.cs-cr-doc-urlrow { align-items:stretch; gap:20px; margin:14px 0; }
.cs-cr-doc-body .cs-cr-urlbox { display:flex; align-items:center; border:1px solid var(--border-strong); background:var(--cs-gray-50); font-size:14.5px; margin:0; }
.cs-cr-doc-qr svg { width:104px; height:104px; }

@media (max-width:700px) {
	.cs-cr-doc-head { flex-direction:column; align-items:flex-start; gap:12px; }
	.cs-cr-doc-title { font-size:22px; margin:10px 0 20px; }
	/* Gutter costs more than it gives on a phone: numbers go inline. */
	.cs-cr-doc-body { padding-left:0; }
	.cs-cr-doc-n { position:static; width:auto; margin-right:8px; }
}

@media print {
	.cs-cr-page, .cs-cr-page--wide, .cs-cr-page--doc, .cs-cr-page--layout { max-width:none; }
	/* The masthead prints — a controlled document has to say whose it is —
	   but at document weight, not web weight. */
	.cs-cr-doc-title { font-size:19px; margin:10px 0 16px; }
	.cs-cr-doc-body { padding-left:44px; margin-top:22px; }
	.cs-cr-doc-n { left:-44px; }
	/* reporting.css collapses every .cs-cr-doc-control descendant to a row
	   group before restoring td; the label spans inside them must stay blocks
	   or the label and value run together on one line. */
	.cs-cr-doc-lbl { display:block !important; }
	.cs-cr-doc-body h2 { break-after:avoid; }
	.cs-cr-settings-head, .cs-cr-tally { display:none !important; }
}

/* Submit-once guard (report + message forms): the button is disabled while
   the POST is in flight so a double tap can't send twice. */
.cs-cr-btn:disabled { opacity:.65; cursor:default; filter:none; transform:none; }

/* Register: case refs (CR-XXXX-XXXX) and dates must not break across lines. */
.cs-cr-table .cs-cr-nowrap { white-space:nowrap; }

/* Grid columns default to min-width:auto, so on a phone the register column
   grew to the table's width (780px) instead of letting .cs-cr-tablewrap
   scroll. Let columns shrink; the table scrolls inside its wrapper. */
.cs-cr-layout > *,
.cs-cr-two > *,
.cs-cr-qrrow > * { min-width:0; }
/* File inputs have a wide intrinsic size (the Company logo upload pushed the
   settings column to 560px on a phone). */
.cs-cr-card input[type=file] { max-width:100%; min-width:0; }

/* Case page: whether the reporter can see each timeline entry, and the
   "also send to the reporter" option on the internal assessment form. */
.cs-cr-vis { display:inline-block; margin-left:6px; padding:1px 8px; border-radius:999px; font-size:10.5px; letter-spacing:.04em; vertical-align:1px; }
.cs-cr-vis--internal { background:var(--cs-gray-100); color:var(--cs-gray-600); }
.cs-cr-vis--seen { background:var(--cs-green-100); color:#02894e; }
.cs-cr-check { display:flex; align-items:flex-start; gap:8px; margin:14px 0 4px; font-size:14px; color:var(--text-strong); cursor:pointer; }
.cs-cr-check input { flex:0 0 auto; width:16px; height:16px; min-height:0; margin:3px 0 0; accent-color:var(--cs-blue); }
