/* Clarity Care Systems — record screening for children's homes (England) */

/* ---------- fonts (self-hosted: no requests to other websites) ----------
   Inter and Inter Display, SIL Open Font License 1.1 (fonts/OFL.txt), Latin subsets. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-400.woff") format("woff"); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-500.woff") format("woff"); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-600.woff") format("woff"); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-700.woff") format("woff"); }
@font-face { font-family: 'Inter Display'; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-display-500.woff") format("woff"); }
@font-face { font-family: 'Inter Display'; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-display-600.woff") format("woff"); }
@font-face { font-family: 'Inter Display'; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-display-700.woff") format("woff"); }

:root {
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --text-2xl: clamp(1.9rem, 1.5rem + 1.4vw, 2.5rem);
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem; --space-5: 1.25rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem; --space-16: 4rem;
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px; --radius-xl: 16px; --radius-full: 9999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-interactive: 180ms var(--ease);
  --font-display: 'Inter Display', 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --content-wide: 1400px;
}

:root, [data-theme='light'] {
  /* Teal-blue palette: calm and professional, cool neutrals with a slight teal tint */
  --color-bg: #f2f6f7;
  --color-bg-glow: rgba(15, 115, 137, 0.10);
  --color-surface: #ffffff;
  --color-surface-2: #f9fbfc;
  --color-surface-offset: #edf3f5;
  --color-surface-sunken: #e5eef1;
  --color-divider: #dde7eb;
  --color-border: #c6d5db;
  --color-text: #13272f;
  --color-text-muted: #4a6470;
  --color-text-faint: #7a9099;
  --color-text-inverse: #ffffff;
  --color-primary: #0f7389;
  --color-primary-2: #3a95a8;
  --color-primary-hover: #0b5e70;
  --color-primary-active: #094f5e;
  --color-primary-highlight: #dcedf2;
  --color-primary-soft: #ecf5f8;
  --color-header-bg: #0e6a7e;
  --color-header-text: #ffffff;
  --color-header-muted: #cde5eb;
  --color-header-accent: #a6e3ee;
  --color-header-control: rgba(255, 255, 255, 0.12);
  --color-header-control-hover: rgba(255, 255, 255, 0.2);
  --color-header-control-border: rgba(255, 255, 255, 0.24);
  --color-critical: #b8474f;
  --color-critical-highlight: #f8e6e6;
  --color-important: #9a6212;
  --color-important-highlight: #f8eedb;
  --color-advisory: #5b55ad;
  --color-advisory-highlight: #ebe9f7;
  --color-strength: #2e7b50;
  --color-strength-highlight: #def0e5;
  --shadow-xs: 0 1px 2px rgba(19, 39, 47, 0.05);
  --shadow-sm: 0 1px 2px rgba(19, 39, 47, 0.04), 0 10px 28px -18px rgba(19, 39, 47, 0.18);
  --shadow-md: 0 2px 4px rgba(19, 39, 47, 0.04), 0 20px 44px -22px rgba(19, 39, 47, 0.24);
  --shadow-glow: 0 10px 24px -10px rgba(15, 115, 137, 0.50);
}
[data-theme='dark'] {
  color-scheme: dark;
  --color-bg: #0b1518;
  --color-bg-glow: rgba(94, 196, 214, 0.08);
  --color-surface: #111e22;
  --color-surface-2: #15242a;
  --color-surface-offset: #1a2b31;
  --color-surface-sunken: #081013;
  --color-divider: #22343a;
  --color-border: #30474e;
  --color-text: #e4eef0;
  --color-text-muted: #9db3b9;
  --color-text-faint: #6a8189;
  --color-text-inverse: #061317;
  --color-primary: #5ec4d6;
  --color-primary-2: #8dd6e3;
  --color-primary-hover: #8dd6e3;
  --color-primary-active: #47aebf;
  --color-primary-highlight: #133a42;
  --color-primary-soft: #102c33;
  --color-header-bg: #0f2a31;
  --color-header-text: #e4eef0;
  --color-header-muted: #9db3b9;
  --color-header-accent: #5ec4d6;
  --color-header-control: rgba(255, 255, 255, 0.06);
  --color-header-control-hover: rgba(255, 255, 255, 0.12);
  --color-header-control-border: rgba(255, 255, 255, 0.14);
  --color-critical: #ee8a8f;
  --color-critical-highlight: #3a2224;
  --color-important: #e7aa4c;
  --color-important-highlight: #382c18;
  --color-advisory: #aba4ea;
  --color-advisory-highlight: #25233f;
  --color-strength: #76c795;
  --color-strength-highlight: #1a3326;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 30px -18px rgba(0, 0, 0, 0.7);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.4), 0 22px 50px -24px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 10px 24px -10px rgba(94, 196, 214, 0.35);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: none; text-size-adjust: none; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  min-height: 100dvh; line-height: 1.55; font-family: var(--font-body); font-size: var(--text-base); color: var(--color-text);
  background: var(--color-bg);
}
img, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.15; }
p, li { text-wrap: pretty; }
button { cursor: pointer; background: none; border: none; }
a { color: var(--color-primary); }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: var(--radius-sm); }
a, button, input, textarea, select { transition: color var(--transition-interactive), background var(--transition-interactive), border-color var(--transition-interactive), box-shadow var(--transition-interactive), transform var(--transition-interactive); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--color-surface); border-bottom: 1px solid var(--color-divider); }
.header-inner { max-width: var(--content-wide); margin: 0 auto; padding: 0 var(--space-6); display: flex; align-items: center; gap: var(--space-4); min-height: 60px; }
.brand { display: flex; align-items: center; gap: var(--space-3); color: var(--color-text); text-decoration: none; }
.brand svg { width: 30px; height: 30px; color: var(--color-primary); }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.brand-name span { font-weight: 500; color: var(--color-primary); }
.brand-tag { font-size: 12px; color: var(--color-text-muted); margin-top: 3px; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--radius-md); font-size: 12px; font-weight: 500; color: var(--color-text-muted); background: var(--color-surface-offset); white-space: nowrap; border: 1px solid var(--color-divider); }
.pill svg { color: var(--color-primary); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-md); border: 1px solid var(--color-divider); background: var(--color-surface); color: var(--color-text-muted); }
.icon-btn:hover { background: var(--color-surface-offset); color: var(--color-text); }

/* ---------- layout ---------- */
.app { max-width: var(--content-wide); margin: 0 auto; padding: var(--space-6) var(--space-6) var(--space-12); display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: var(--space-5); align-items: start; }
@media (max-width: 1023px) { .app { grid-template-columns: minmax(0, 1fr); } }
.panel { min-width: 0; background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-xl); box-shadow: var(--shadow-xs); }
@media (max-width: 640px) {
  .pill span.pill-text { display: none; }
  .pill { padding: 8px; }
  .brand-tag { display: none !important; }
  .header-inner { padding-inline: var(--space-4); }
  .app { padding-inline: var(--space-3); gap: var(--space-4); }
  .row-2 { grid-template-columns: 1fr; }
  .tabpanel, .panel-setup .panel-body { padding: var(--space-4); }
}

/* setup panel */
.panel-setup { display: flex; flex-direction: column; align-self: start; }
.panel-setup .panel-body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-6); }
.step { display: flex; flex-direction: column; gap: var(--space-3); }
.step + .step { padding-top: var(--space-5); border-top: 1px solid var(--color-divider); }
.step-run { gap: var(--space-4); }
.step-h { font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-faint); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: var(--text-xs); font-weight: 600; color: var(--color-text); }
.field .hint { font-size: var(--text-xs); font-weight: 400; color: var(--color-text-faint); }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-surface); font-size: var(--text-sm); box-shadow: var(--shadow-xs); min-height: 42px; }
[data-theme='dark'] .field input, [data-theme='dark'] .field select, [data-theme='dark'] .field textarea { background: var(--color-surface-sunken); }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }
.field input::placeholder, .field textarea::placeholder { color: var(--color-text-faint); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: color-mix(in oklab, var(--color-border), var(--color-text-muted) 30%); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 20%, transparent); outline: none; }
textarea#docText.dragover { border-color: var(--color-primary); border-style: dashed; background: var(--color-primary-soft); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
textarea#docText { min-height: 280px; resize: vertical; font-size: var(--text-sm); line-height: 1.55; }
.upload-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: 9px 14px; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); min-height: 40px; box-shadow: var(--shadow-xs); }
.btn:hover { background: var(--color-primary-soft); border-color: color-mix(in oklab, var(--color-primary) 45%, var(--color-border)); color: var(--color-primary-hover); }
[data-theme='dark'] .btn:hover { color: var(--color-primary); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn svg { flex: none; }
.btn-primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; box-shadow: var(--shadow-xs); }
[data-theme='dark'] .btn-primary { color: var(--color-text-inverse); }
.btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #fff; box-shadow: var(--shadow-sm); }
[data-theme='dark'] .btn-primary:hover { color: var(--color-text-inverse); }
.btn-primary:active { transform: translateY(0); background: var(--color-primary-active); }
.btn-lg { width: 100%; min-height: 48px; font-size: var(--text-base); border-radius: var(--radius-md); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--color-primary-hover); box-shadow: none; }
[data-theme='dark'] .btn-ghost { color: var(--color-primary); }
.btn-ghost:hover { background: var(--color-primary-soft); border-color: transparent; }
.btn-sm { padding: 6px 12px; min-height: 32px; font-size: var(--text-xs); border-radius: var(--radius-sm); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.meta-line { font-size: var(--text-xs); color: var(--color-text-faint); display: flex; justify-content: space-between; gap: var(--space-3); }
.privacy-note { font-size: var(--text-xs); color: var(--color-text-muted); padding: 0; display: flex; gap: var(--space-3); align-items: flex-start; line-height: 1.5; }
.privacy-note svg { flex: none; color: var(--color-primary); margin-top: 2px; }

/* ---------- results panel ---------- */
.panel-results { min-height: 70dvh; display: flex; flex-direction: column; }
.tabs { display: flex; gap: var(--space-2); margin: 0 var(--space-5); padding: 0; border-bottom: 1px solid var(--color-divider); overflow-x: auto; scrollbar-width: none; }
.tab { padding: 14px 6px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: var(--text-sm); font-weight: 600; color: var(--color-text-muted); white-space: nowrap; display: inline-flex; gap: var(--space-2); align-items: center; border-radius: 0; }
.tab + .tab { margin-left: var(--space-4); }
.tab:hover { color: var(--color-text); }
.tab[aria-selected='true'] { color: var(--color-text); border-bottom-color: var(--color-primary); }
.tab .count { font-size: 11px; font-weight: 700; background: var(--color-surface-offset); color: var(--color-text-muted); padding: 1px 7px; border-radius: var(--radius-full); min-width: 20px; text-align: center; }
.tab[aria-selected='true'] .count { background: var(--color-primary); color: var(--color-text-inverse); }
.tabpanel { padding: var(--space-5); }
.tabpanel[hidden] { display: none; }
@media (max-width: 640px) { .tabs { margin: 0 var(--space-4); } .tab + .tab { margin-left: var(--space-3); } }

.empty { padding: var(--space-10) var(--space-6) var(--space-12); color: var(--color-text-muted); max-width: 760px; margin: 0 auto; }
.empty-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-faint); margin-bottom: var(--space-5); }
.how { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.how li { display: flex; flex-direction: column; gap: var(--space-3); }
.how-n { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; color: var(--color-primary); line-height: 1; }
.how strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: var(--text-base); color: var(--color-text); margin-bottom: 4px; }
.how span:not(.how-n) { font-size: var(--text-sm); line-height: 1.55; }
@media (max-width: 760px) { .how { grid-template-columns: 1fr; gap: var(--space-5); } .how li { flex-direction: row; gap: var(--space-4); } .empty { padding: var(--space-6) var(--space-4); } }

.loc-link { color: var(--color-primary); font-weight: 600; text-decoration: none; }
.loc-more { color: var(--color-text-faint); }
.ref { font-size: var(--text-xs); color: var(--color-text-muted); }

/* ---------- document view ---------- */
.legend { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-4); font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: var(--space-4); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.doc { border: 1px solid var(--color-divider); border-radius: var(--radius-lg); background: var(--color-surface); padding: var(--space-4) var(--space-3); font-size: var(--text-sm); line-height: 1.65; box-shadow: var(--shadow-xs); }
.doc-para { display: grid; grid-template-columns: 34px 1fr; gap: var(--space-2); padding: 5px var(--space-2); border-radius: 8px; }
.doc-para:target, .doc-para.flash { background: var(--color-primary-highlight); }
.doc-heading .doc-t { font-weight: 700; margin-top: var(--space-2); }
.doc-n { color: var(--color-text-faint); font-size: 11px; font-weight: 600; text-align: right; padding-top: 6px; font-variant-numeric: tabular-nums; }
.doc-t { white-space: pre-wrap; word-break: break-word; }
mark.mk { border-radius: 4px; padding: 0 3px; color: inherit; cursor: pointer; border-bottom: 2px solid transparent; }
.mk-critical { background: var(--color-critical-highlight); border-bottom-color: var(--color-critical) !important; }
.mk-important { background: var(--color-important-highlight); border-bottom-color: var(--color-important) !important; }
.mk-advisory { background: var(--color-advisory-highlight); border-bottom-color: var(--color-advisory) !important; }
.mk-strength { background: var(--color-strength-highlight); border-bottom-color: var(--color-strength) !important; }
.mk-active { outline: 2px solid var(--color-primary); }

/* ---------- report ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); align-items: center; }
.toolbar .spacer { flex: 1; }
.report { border: 1px solid var(--color-divider); border-radius: var(--radius-lg); background: var(--color-surface); padding: var(--space-8); font-size: var(--text-sm); box-shadow: var(--shadow-xs); }
.report h1 { font-family: var(--font-display); font-weight: 600; font-size: var(--text-xl); letter-spacing: -0.015em; margin-bottom: var(--space-4); }
.report h2 { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; margin: var(--space-8) 0 var(--space-3); padding-bottom: var(--space-2); border-bottom: 1px solid var(--color-divider); }
.report h3 { font-size: var(--text-sm); font-weight: 700; margin: var(--space-5) 0 var(--space-2); color: var(--color-primary); text-transform: uppercase; letter-spacing: 0.04em; }
.report p { margin-bottom: var(--space-2); }
.report ul, .report ol { padding-left: var(--space-5); margin-bottom: var(--space-3); }
.report ul ul { margin: var(--space-1) 0 var(--space-2); }
.report li { margin-bottom: var(--space-1); }
.report ol li { margin-bottom: var(--space-2); }
.report em { color: var(--color-text-muted); font-style: normal; font-size: var(--text-xs); }
.report table { border-collapse: collapse; width: 100%; font-size: var(--text-xs); margin: var(--space-3) 0; }
.report th, .report td { border: 1px solid var(--color-divider); padding: var(--space-1) var(--space-2); text-align: left; vertical-align: top; }
.report th { background: var(--color-surface-offset); }
.report hr { border: none; border-top: 1px solid var(--color-divider); margin: var(--space-5) 0; }
.report .small { font-size: var(--text-xs); color: var(--color-text-muted); }
@media (max-width: 640px) { .report { padding: var(--space-5); } }

.toast { position: fixed; bottom: var(--space-6); left: 50%; transform: translateX(-50%) translateY(20px); background: var(--color-text); color: var(--color-text-inverse); padding: 10px 16px; border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: 500; opacity: 0; pointer-events: none; transition: opacity 200ms, transform 200ms var(--ease); z-index: 50; box-shadow: var(--shadow-md); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

footer.site-footer { border-top: 1px solid var(--color-divider); background: var(--color-surface); font-size: var(--text-xs); color: var(--color-text-faint); }
.footer-inner { max-width: var(--content-wide); margin: 0 auto; padding: var(--space-6); display: grid; grid-template-columns: 180px 1fr; gap: var(--space-6); }
.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--color-text); font-family: var(--font-display); font-weight: 600; }
.footer-brand svg { color: var(--color-primary); }
footer.site-footer p { max-width: 100ch; line-height: 1.6; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; gap: var(--space-3); } }
footer.site-footer a { color: var(--color-text-muted); }
.footer-inner > p { grid-column: 2; }
@media (max-width: 760px) { .footer-inner > p { grid-column: auto; } }
.footer-support { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); font-size: var(--text-sm); color: var(--color-text-muted); }
footer.site-footer a.support-link { display: inline-flex; align-items: center; gap: var(--space-2); white-space: nowrap; padding: var(--space-1) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-primary-soft); color: var(--color-primary); font-weight: 600; text-decoration: none; }
footer.site-footer a.support-link:hover { background: var(--color-primary-highlight); border-color: var(--color-primary); }

/* ---------- "what to change" view ---------- */
.simple-tools { display: flex; justify-content: flex-end; gap: var(--space-2); margin-bottom: var(--space-3); }
.status { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); align-items: start; padding: var(--space-5) var(--space-6); border-radius: var(--radius-lg); border: 1px solid var(--color-divider); background: var(--color-surface); margin-bottom: var(--space-8); position: relative; overflow: hidden; }
.status::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--status-color, var(--color-text-muted)); }
.status > * { position: relative; }
.status.lvl-0 { --status-color: var(--color-strength); } .status.lvl-1 { --status-color: var(--color-advisory); } .status.lvl-2 { --status-color: var(--color-important); } .status.lvl-3 { --status-color: var(--color-critical); }
.status-badge { width: 40px; height: 40px; border-radius: var(--radius-md); display: grid; place-items: center; font-weight: 700; font-size: var(--text-lg); color: #fff; background: var(--color-text-muted); box-shadow: var(--shadow-xs); }
.status.lvl-0 .status-badge { background: var(--color-strength); } .status.lvl-1 .status-badge { background: var(--color-advisory); } .status.lvl-2 .status-badge { background: var(--color-important); } .status.lvl-3 .status-badge { background: var(--color-critical); }
.status strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); letter-spacing: -0.01em; margin-bottom: 4px; line-height: 1.2; }
.status.lvl-3 strong { color: var(--color-critical); } .status.lvl-2 strong { color: var(--color-important); } .status.lvl-1 strong { color: var(--color-advisory); } .status.lvl-0 strong { color: var(--color-strength); }
.status > div > span { display: block; font-size: var(--text-sm); color: var(--color-text-muted); }
.status-trig { margin-top: var(--space-2); color: var(--color-text) !important; }
.status-answers { margin-top: var(--space-2); font-size: var(--text-xs) !important; color: var(--color-text-muted) !important; line-height: 1.7; }
.status-answers b { color: var(--color-text); font-weight: 600; }

.fix-group { margin-bottom: var(--space-8); }
.fix-group h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--text-base); letter-spacing: -0.005em; display: flex; align-items: center; gap: var(--space-3); }
.fix-group h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--g-color, var(--color-text-muted)); box-shadow: 0 0 0 4px color-mix(in oklab, var(--g-color, var(--color-text-muted)) 18%, transparent); flex: none; }
.g-critical { --g-color: var(--color-critical); } .g-important { --g-color: var(--color-important); } .g-advisory { --g-color: var(--color-advisory); }
.g-n { font-family: var(--font-body); font-size: 11px; font-weight: 700; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--radius-full); display: inline-grid; place-items: center; color: var(--g-color, var(--color-text-muted)); background: color-mix(in oklab, var(--g-color, var(--color-text-muted)) 14%, transparent); }
.g-sub { font-size: var(--text-xs); color: var(--color-text-faint); margin: 4px 0 var(--space-4) 22px; }
.fix-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.fix { display: grid; grid-template-columns: 84px 1fr; gap: var(--space-4); padding: var(--space-4) var(--space-5); border-radius: var(--radius-lg); background: var(--color-surface); border: 1px solid var(--color-divider); box-shadow: none; position: relative; transition: box-shadow var(--transition-interactive), transform var(--transition-interactive), border-color var(--transition-interactive); }
.fix::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--color-text-muted); }
.fix.sev-critical::before { background: var(--color-critical); } .fix.sev-important::before { background: var(--color-important); } .fix.sev-advisory::before { background: var(--color-advisory); }
.fix:hover { box-shadow: var(--shadow-sm); border-color: var(--color-border); }
.fix-where { display: flex; flex-wrap: wrap; gap: 4px; align-content: start; font-size: 11px; font-weight: 700; padding-top: 2px; }
.fix-where a { color: var(--color-primary); text-decoration: none; padding: 2px 8px; border-radius: var(--radius-full); background: var(--color-primary-highlight); font-variant-numeric: tabular-nums; }
.fix-where a:hover { background: var(--color-primary); color: var(--color-text-inverse); }
.loc-none, .loc-more { color: var(--color-text-faint); font-weight: 500; }
.fix-body { min-width: 0; }
.fix-what { font-size: var(--text-sm); line-height: 1.55; }
.fix-what b { font-weight: 700; }
.fix-what q { font-style: normal; background: var(--color-surface-offset); padding: 1px 5px; border-radius: 6px; font-weight: 500; }
.fix-what q + q::before { content: '"'; }
.fix-what q::before, .fix-what q::after { content: '"'; }
.fix-steps { margin: var(--space-2) 0 0 var(--space-4); padding: 0; font-size: var(--text-sm); line-height: 1.5; display: flex; flex-direction: column; gap: 4px; }
.fix-steps .due { font-weight: 500; color: var(--color-text-faint); }
.fix-more { margin-top: var(--space-2); font-size: var(--text-xs); color: var(--color-text-muted); }
.fix-more summary { cursor: pointer; color: var(--color-text-faint); font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.fix-more summary::-webkit-details-marker { display: none; }
.fix-more summary::after { content: "+"; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--color-surface-offset); font-weight: 700; }
.fix-more[open] summary::after { content: "−"; }
.fix-more summary:hover { color: var(--color-text); }
.fix-more p { margin-top: var(--space-2); }
.fix-meta { color: var(--color-text-faint); }
.due { display: inline-block; font-weight: 600; color: var(--color-text); }
.strengths { font-size: var(--text-sm); color: var(--color-text-muted); padding: var(--space-3) var(--space-5); border-radius: 12px; background: var(--color-strength-highlight); margin-bottom: var(--space-4); border: 1px solid color-mix(in oklab, var(--color-strength) 20%, transparent); }
.strengths strong { color: var(--color-strength); }
.next-step { font-size: var(--text-sm); color: var(--color-text-muted); }
.linklike { background: none; border: none; padding: 0; font: inherit; color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
@media (max-width: 560px) {
  .fix { grid-template-columns: 1fr; gap: var(--space-2); padding: var(--space-4); }
  .status { grid-template-columns: 1fr; padding: var(--space-4) var(--space-5); }
  .status .status-badge { display: none; }
  .g-sub { margin-left: 0; }
}

/* ---------- standards check ---------- */
.standards { margin-bottom: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--color-divider); }
.standards h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--text-base); display: flex; align-items: center; gap: var(--space-3); }
.standards .g-sub { margin-left: 0; max-width: 80ch; }
.g-neutral { --g-color: var(--color-primary); }
.st-h4 { font-size: var(--text-xs); font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin: var(--space-6) 0 var(--space-3); }
.st-table { display: flex; flex-direction: column; border: 1px solid var(--color-divider); border-radius: 16px; overflow: hidden; background: var(--color-surface); box-shadow: var(--shadow-xs); }
.st-row { display: grid; grid-template-columns: 112px 1fr; gap: var(--space-3); padding: var(--space-3) var(--space-4); align-items: start; }
.st-row + .st-row { border-top: 1px solid var(--color-divider); }
.st-chipcol { padding-top: 1px; }
.st-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-full); white-space: nowrap; color: var(--color-text-muted); background: var(--color-surface-offset); }
.st-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-met { color: var(--color-strength); background: var(--color-strength-highlight); }
.st-partly { color: var(--color-important); background: var(--color-important-highlight); }
.st-notmet { color: var(--color-critical); background: var(--color-critical-highlight); }
.st-na { color: var(--color-text-faint); background: var(--color-surface-offset); }
.st-name { font-size: var(--text-sm); font-weight: 700; }
.st-opt { font-size: 11px; font-weight: 500; color: var(--color-text-faint); margin-left: 4px; }
.st-note { font-size: var(--text-sm); color: var(--color-text); margin-top: 2px; }
.st-row.row-na .st-note { color: var(--color-text-faint); }
.st-req { font-size: var(--text-xs); color: var(--color-text-faint); margin-top: 4px; }
@media (max-width: 560px) { .st-row { grid-template-columns: 1fr; gap: var(--space-1); } }

/* ---------- print ---------- */
@media print {
  .site-header, .panel-setup, .tabs, .toolbar, .site-footer, .toast, .simple-tools, .fix-more { display: none !important; }
  body { background: #fff; color: #000; }
  .app { display: block; padding: 0; }
  .panel, .report, .doc, .fix, .status { border: none; box-shadow: none; }
  .tabpanel { padding: 0; }
  .report { padding: 0; }
  .fix { break-inside: avoid; }
  body.print-list .tabpanel { display: none !important; }
  body.print-list #panel-findings { display: block !important; }
}

/* inside a Claude artifact the page cannot open the print dialog */
.in-claude #printReport, .in-claude #printList { display: none !important; }
/* links to pages that only exist on the public site (e.g. the privacy notice) */
.in-claude .site-only { display: none !important; }

/* keep the three document actions on one row */
.upload-row .btn-ghost { padding-inline: 12px; }

/* printable staff report */
.report ul { list-style: none; padding-left: 0; }
.report ul > li { padding: var(--space-3) var(--space-4); border: 1px solid var(--color-divider); border-radius: 12px; margin-bottom: var(--space-3); background: var(--color-surface-2); }
.report ul > li > ul { list-style: none; margin: var(--space-2) 0 0; padding-left: var(--space-4); border-left: 2px solid var(--color-divider); }
.report ul > li > ul > li { background: none; border: none; padding: 2px 0; margin: 0; color: var(--color-text); }
.report h2 { margin-top: var(--space-8); }
.report h3 { text-transform: none; letter-spacing: 0; font-size: var(--text-base); color: var(--color-text); }
@media print { .report ul > li { break-inside: avoid; border-color: #bbb; } .report ul > li > ul { border-left-color: #bbb; } }

/* ---------- privacy notice page ---------- */
a.btn { text-decoration: none; }
.legal { max-width: 72ch; margin: 0 auto; padding: var(--space-10) var(--space-4) var(--space-16); display: grid; gap: var(--space-8); }
.legal-head { display: grid; gap: var(--space-3); }
.legal h1 { font-family: var(--font-display); font-weight: 700; font-size: var(--text-2xl); letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
.legal .lede { font-size: var(--text-lg); line-height: 1.5; color: var(--color-text-muted); }
.legal .updated { font-size: var(--text-sm); color: var(--color-text-muted); }
.legal section { display: grid; gap: var(--space-3); padding-top: var(--space-6); border-top: 1px solid var(--color-divider); }
.legal h2 { font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); letter-spacing: -0.01em; text-wrap: balance; }
.legal ul { padding-left: 1.25em; display: grid; gap: var(--space-2); }
.legal a { color: var(--color-primary); text-underline-offset: 2px; }
.todo { background: var(--color-important-highlight); color: var(--color-text); border-bottom: 2px solid var(--color-important); padding: 0 4px; border-radius: 3px; }

/* ---------- teal header band ---------- */
.site-header { background: var(--color-header-bg); border-bottom-color: transparent; color: var(--color-header-text); }
.site-header .brand { color: var(--color-header-text); }
.site-header .brand svg, .site-header .brand-name span { color: var(--color-header-accent); }
.site-header .brand-tag { color: var(--color-header-muted); }
.site-header .pill { background: var(--color-header-control); border-color: var(--color-header-control-border); color: var(--color-header-text); }
.site-header .pill svg { color: var(--color-header-accent); }
.site-header .icon-btn, .site-header .btn-ghost { background: var(--color-header-control); border-color: var(--color-header-control-border); color: var(--color-header-text); }
.site-header .icon-btn:hover, .site-header .btn-ghost:hover { background: var(--color-header-control-hover); color: var(--color-header-text); }
.site-header :focus-visible { outline: 2px solid var(--color-header-text); outline-offset: 2px; }
