/* CLEAR Research Reports (staging) — plain, accessible layout. No external fonts or assets. */
/* Contrast (WCAG 2.2 AA) is recorded per token in VALIDATION/.../reviews/FIX-UI-loop1.md. --line is decorative only
   (rules, separators); every form-field boundary uses --field-border (>= 3:1 against --bg and --panel); button text
   uses --on-accent / --on-bad (>= 4.5:1 on the button colour); the focus ring uses --focus (>= 3:1 against --bg and
   --panel). */
:root {
  --ink: #1b1f23; --muted: #57606a; --bg: #ffffff; --panel: #f6f8fa; --line: #d0d7de;
  --accent: #0b5cad; --ok: #1a7f37; --warn: #9a6700; --bad: #b42318;
  --focus: #1b1f23; --field-border: #6e7781; --on-accent: #ffffff; --on-bad: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #e6edf3; --muted: #9da7b1; --bg: #0d1117; --panel: #161b22; --line: #30363d;
          --accent: #6cb6ff; --ok: #3fb950; --warn: #d29922; --bad: #f85149;
          --focus: #ffbf47; --field-border: #8b949e; --on-accent: #0d1117; --on-bad: #0d1117; }
}
* { box-sizing: border-box; }
html { font-size: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.55;
       color: var(--ink); background: var(--bg); }
main, .site-header, .site-footer { max-width: 54rem; margin: 0 auto; padding: 0 1rem; }
main { padding-bottom: 3rem; }
a { color: var(--accent); }
a:focus, button:focus, input:focus, select:focus, textarea:focus, main:focus-visible, .table-scroll:focus {
  outline: 3px solid var(--focus); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 0; background: #ffbf47; color: #000; padding: .5rem 1rem; }
.skip-link:focus { outline-color: #000; }
.skip-link:focus { left: 0; z-index: 10; }
.staging-banner { background: #fff3cd; color: #3d2c00; border-bottom: 2px solid #d4a72c; padding: .5rem 1rem;
                  text-align: center; }
.site-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem;
               padding-top: .75rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.site-name { margin: 0; font-weight: 700; }
.site-name a { color: var(--ink); text-decoration: none; }
.site-owner { display: block; font-weight: 400; font-size: .875rem; color: var(--muted); }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0; padding: 0; }
.nav-list a[aria-current="page"] { font-weight: 700; text-decoration: none; }
.inline-form { display: inline; margin: 0; }
.link-button { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline;
               font: inherit; cursor: pointer; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; padding-top: 1rem; }
h1 { font-size: 1.75rem; line-height: 1.25; }
h2 { font-size: 1.25rem; margin-top: 2rem; }
h3 { font-size: 1.05rem; margin: 0 0 .25rem; }
.lede { font-size: 1.1rem; }
label { display: block; font-weight: 600; margin-top: .75rem; }
fieldset label, .consent-box label { display: inline; font-weight: 400; }
input[type="text"], input[type="search"], input[type="url"], input[type="number"], input[type="date"],
input[type="email"], input[type="password"], input:not([type]), input[type="file"], select, textarea {
  display: block; width: 100%; max-width: 36rem; padding: .45rem .5rem; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--field-border); border-radius: 4px; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: var(--bad); border-width: 2px; }
fieldset[aria-invalid="true"], .group-invalid { border-color: var(--bad); border-width: 2px; }
fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 1rem 0; padding: .5rem 1rem 1rem; }
legend { font-weight: 700; padding: 0 .25rem; }
button, .button { display: inline-block; margin-top: 1rem; padding: .55rem 1.1rem; font: inherit; font-weight: 600;
                  color: var(--on-accent); background: var(--accent); border: 0; border-radius: 4px; cursor: pointer;
                  text-decoration: none; }
.button-danger { color: var(--on-bad); background: var(--bad); }
.button-secondary { color: var(--accent); background: transparent; border: 2px solid var(--accent); }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.help, .muted { color: var(--muted); font-size: .925rem; }
.field-error { color: var(--bad); font-weight: 600; margin: .25rem 0; }
.alert { border-left: 4px solid var(--line); background: var(--panel); padding: .5rem 1rem; margin: 1rem 0; }
.alert-error { border-color: var(--bad); }
.alert-warn { border-color: var(--warn); }
.alert-ok { border-color: var(--ok); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: .5rem 1rem 1rem;
        margin: 1rem 0; }
.facts { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: .35rem 1rem; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; }
@media (max-width: 36rem) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: .5rem; } }
.plain { list-style: none; margin: 0; padding: 0; }
.results { list-style: none; padding: 0; }
.result { border-bottom: 1px solid var(--line); padding: .75rem 0; }
.result p { margin: .15rem 0; }
.identifiers code { margin-right: .5rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; overflow-wrap: anywhere; }
.badge-warn { color: var(--warn); font-weight: 600; }
table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.table-scroll { overflow-x: auto; margin: 1rem 0; max-width: 100%; }
.table-scroll > table { margin: 0; }
caption { text-align: left; font-weight: 600; padding-bottom: .25rem; }
th, td { border-bottom: 1px solid var(--line); padding: .35rem .5rem; text-align: left; vertical-align: top; }
.checks { list-style: none; padding: 0; }
.checks li { padding: .3rem 0 .3rem 1.75rem; position: relative; }
.checks li.ok::before { content: "\2713"; color: var(--ok); position: absolute; left: .25rem; font-weight: 700; }
.checks li.fail::before { content: "\2717"; color: var(--bad); position: absolute; left: .25rem; font-weight: 700; }
.check-mark { font-weight: 600; }
.wizard-nav ol { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; padding-left: 1.25rem; color: var(--muted); }
.wizard-nav li[aria-current="step"] { color: var(--ink); font-weight: 700; }
.subject-line { margin-top: 0; }
.consent-box { display: flex; gap: .6rem; align-items: flex-start; }
.consent-box input { margin-top: .35rem; transform: scale(1.2); }
.donation select, .donation input[type="text"] { display: inline-block; width: auto; margin-left: .5rem; }
@media (max-width: 24rem) { .donation select, .donation input[type="text"] { display: block; margin-left: 0;
  max-width: 100%; } }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.page-text, .diff { white-space: pre-wrap; overflow-wrap: anywhere; }
.status-explanation { margin: .25rem 0 0; }
.report-frame { display: block; width: 100%; border: 1px solid var(--line); }
@media (max-width: 36rem) { .report-frame { height: 80vh; } }
.admin-nav { margin-top: 1rem; }
.account-back { margin: .75rem 0 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
                   white-space: nowrap; }
@media print { .staging-banner, .site-header nav, .skip-link { display: none; } }
