/* checkmaster.ch – base styles. Mobile first, no build step. */

@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/archivo-latin-wght-normal-eYWgLOH.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-78NWkmx.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-QJNNIVc.woff2") format("woff2"); }

:root {
    /* Brand: night blue carries the brand, seal yellow is the accent */
    --ink: #13233f;
    --ink-soft: #24365a;
    --muted: #5a6682;
    --line: #d5d9e2;
    --line-strong: #8791a8;
    --line-soft: #e6e9f0;
    --bg: #f4f5f7;
    --surface: #ffffff;
    --brand: #13233f;
    --brand-strong: #0b162b;
    --brand-tint: #e6e9f0;
    --accent: #f2b632;
    --accent-strong: #e0a31c;
    --accent-tint: #fdf3d6;
    --on-dark-soft: #aab4cc;

    /* Status colors. The "yellow" light is drawn in orange: yellow belongs to the brand. */
    --green: #177a4a;
    --green-tint: #e4f3eb;
    --yellow: #b4500a;
    --yellow-tint: #fbeadb;
    --red: #c62828;
    --red-tint: #fbe5e5;
    --grey: #5a6682;
    --grey-tint: #e6e9f0;
    /* Text-safe variants of the status colors (4.5:1 on white and on their tint) */
    --green-ink: #177a4a;
    --yellow-ink: #a04508;
    --red-ink: #c62828;

    --radius: 8px;
    --radius-sm: 6px;
    --space-1: .25rem;
    --space-2: .5rem;
    --space-3: .75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4.5rem;
    --max: 960px;
    --max-wide: 1240px;
    --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-strong); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 var(--space-3); letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.5rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); }
h3 { font-size: 1.375rem; line-height: 1.3; letter-spacing: -.01em; font-weight: 600; }
p { margin: 0 0 var(--space-4); }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--space-4); }
.container--wide { max-width: var(--max-wide); padding-inline: clamp(var(--space-4), 4vw, 2.5rem); }
.section { padding: var(--space-8) 0; }
.section--flush-top { padding-top: 0; }
.section--white { background: var(--surface); border-block: 1px solid var(--line); }
.section__head { max-width: 640px; margin-bottom: var(--space-6); }
.section__head h2 { margin: 0; }
.section__head--split { max-width: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--space-3) var(--space-6); }
.section__head--split p { margin: 0; color: var(--muted); }
.eyebrow { display: inline-block; font-family: var(--mono); font-size: .8rem; font-weight: 500; color: var(--brand); margin-bottom: var(--space-4); }

/* Header & footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 68px; }
.site-header__end { display: flex; align-items: center; gap: var(--space-6); }
.site-nav { display: none; gap: var(--space-6); font-size: .95rem; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--brand); text-decoration: underline; }
.logo { display: inline-flex; align-items: center; gap: .3em; font-weight: 700; font-size: 1.375rem; letter-spacing: -.025em; line-height: 1; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); }
.logo .seal { flex: none; width: 1.45em; height: 1.45em; }
.logo__tld { color: var(--muted); font-weight: 500; }
.logo--large { font-size: clamp(2rem, 6vw, 3.25rem); }
/* On dark ground the seal turns yellow and the check takes the ground color */
.logo--inverse, .logo--inverse:hover { color: #fff; }
.logo--inverse .logo__tld { color: var(--on-dark-soft); }
.logo--inverse .seal__shape { fill: var(--accent); }
.logo--inverse .seal__check { stroke: var(--ink); }
/* Seal: reserved for the logo and the total score of a report */
.seal { display: block; }
.seal__shape { fill: var(--ink); }
.seal__check { fill: none; stroke: var(--accent); stroke-width: 4.4; stroke-linecap: round; stroke-linejoin: round; }
.site-footer { padding: var(--space-6) 0 var(--space-7); color: var(--on-dark-soft); font-size: .9rem; background: var(--ink); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--accent); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
    min-height: 52px; padding: 0 var(--space-6);
    border: 0; border-radius: var(--radius); cursor: pointer;
    font: inherit; font-weight: 600; text-decoration: none;
    background: var(--brand); color: #fff;
    transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--brand-strong); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .7; cursor: progress; }
.btn--ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn--ghost:hover { background: var(--brand-tint); color: var(--brand-strong); }
.btn--small { min-height: 40px; padding: 0 var(--space-4); font-size: .9rem; }
.btn--block { width: 100%; }
/* Main button on dark ground */
.btn--accent { background: var(--accent); color: var(--ink); font-weight: 700; }
.btn--accent:hover { background: var(--accent-strong); color: var(--ink); }

/* Hero: the logo and one question per step, nothing else */
.hero { background: var(--ink); color: #fff; text-align: center; }
.hero a:not(.logo) { color: #fff; }
.hero a:not(.logo):hover { color: var(--accent); }
/* Fills the first screen; the content sits a little above the middle */
.hero--full { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: var(--space-7) 0 18vh; }
.hero__intro { max-width: 46rem; margin-inline: auto; }
.hero__tagline { margin: var(--space-4) 0 0; font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 400; letter-spacing: 0; line-height: 1.4; color: var(--on-dark-soft); }
.hero__note { margin: var(--space-4) 0 0; font-size: .875rem; color: var(--on-dark-soft); }
.hero__note + .hero__note { margin-top: var(--space-2); }
.hero__url { color: #fff; font-weight: 500; word-break: break-all; }
.quick-form { margin: var(--space-6) auto 0; max-width: 36rem; scroll-margin-top: var(--space-6); }
.quick-form__row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.quick-form__row .form-control { flex: 1 1 14rem; min-height: 56px; font-size: 1.125rem; padding-inline: var(--space-4); border-color: transparent; }
.hero .form-control:focus { border-color: var(--accent); }
.quick-form__row .btn { flex: 0 0 auto; min-height: 56px; }
.quick-form .form-errors, .quick-form .alert { text-align: left; }
.hero .form-errors { margin-top: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); background: var(--red-tint); }

/* Score card: summary of a report */
.scorecard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.scorecard__total { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-5); padding: var(--space-5); border-bottom: 1px solid var(--line); }
.scorecard__total-text { flex: 1 1 14rem; }
.scorecard__total-text p { margin: 0; font-size: 1.125rem; font-weight: 600; line-height: 1.35; }
.scorecard__total-label { display: block; margin: 0 0 var(--space-1); font-family: var(--mono); font-size: .8rem; font-weight: 500; letter-spacing: 0; line-height: 1.6; color: var(--muted); }
.score-seal { flex: none; display: grid; place-items: center; width: 6.75rem; height: 6.75rem; }
.score-seal > * { grid-area: 1 / 1; }
.score-seal .seal { width: 100%; height: 100%; }
.score-seal__value { font-size: 2.5rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; color: var(--accent); }
.scorecard__areas { list-style: none; margin: 0; padding: var(--space-2) var(--space-5) var(--space-3); }
.scorecard__row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-1) var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--line-soft); font-size: .875rem; }
.scorecard__areas > :last-child, .scorecard__areas > :last-child > .scorecard__row { border-bottom: 0; }
.scorecard__name { font-weight: 500; overflow-wrap: break-word; hyphens: auto; }
.scorecard__bar { grid-column: 1 / -1; grid-row: 2; height: 6px; background: var(--line-soft); border-radius: 3px; overflow: hidden; }
.scorecard__fill { display: block; height: 100%; }
.scorecard__fill--green { background: var(--green); }
.scorecard__fill--yellow { background: var(--yellow); }
.scorecard__fill--red { background: var(--red); }
.scorecard__score { font-family: var(--mono); font-size: .8rem; text-align: right; min-width: 2ch; }

/* Status labels: tinted and always with a word, never color alone */
.status-pill { display: inline-block; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.6; color: var(--ink-soft); white-space: nowrap; vertical-align: middle; letter-spacing: 0; }
.status-pill--green, .status-pill--ok { color: var(--green-ink); background: var(--green-tint); border-color: transparent; }
.status-pill--yellow, .status-pill--warning { color: var(--yellow-ink); background: var(--yellow-tint); border-color: transparent; }
.status-pill--red, .status-pill--critical { color: var(--red-ink); background: var(--red-tint); border-color: transparent; }
.status-pill--grey, .status-pill--info { color: var(--muted); background: var(--grey-tint); border-color: transparent; }
.status-pill--brand { color: var(--ink); border-color: currentColor; }

/* Icons: Lucide via ux_icon(), drawn in the text color */
.icon { width: 1em; height: 1em; vertical-align: -.125em; }

/* Check areas */
.area-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); column-gap: 3.5rem; border-bottom: 1px solid var(--line); }
.area-list__item { padding: var(--space-5) 0; border-top: 1px solid var(--line); }
.area-list__icon { display: block; width: 1.75rem; height: 1.75rem; margin-bottom: var(--space-3); }
.area-list__item h3 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-bottom: var(--space-1); }
.area-list__item p { margin: 0 0 var(--space-3); color: var(--ink-soft); font-size: .95rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--mono); font-size: .75rem; color: var(--ink-soft); background: var(--line-soft); border-radius: 4px; padding: 3px 8px; }

/* Cards & forms */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-5); }
.form-row { margin-bottom: var(--space-4); }
.form-row label { display: block; font-weight: 600; margin-bottom: var(--space-1); font-size: .9rem; }
.form-row .optional { font-weight: 400; color: var(--muted); }
.form-control {
    width: 100%; min-height: 50px; padding: var(--space-2) var(--space-3);
    font: inherit; color: var(--ink); background: #fff;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--accent); }
select.form-control { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.5rem; }
.form-help { font-size: .85rem; color: var(--muted); margin-top: var(--space-1); }
.form-errors { list-style: none; padding: 0; margin: var(--space-1) 0 0; color: var(--red-ink); font-size: .9rem; font-weight: 600; }
.form-row--error .form-control { border-color: var(--red); }
.form-grid { display: grid; gap: 0 var(--space-4); }
.form-note { font-size: .85rem; color: var(--muted); margin: var(--space-3) 0 0; text-align: center; }
.alert { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); margin-bottom: var(--space-4); font-weight: 600; }
.alert--error { background: var(--red-tint); color: var(--red-ink); }
.alert--success { background: var(--green-tint); color: var(--green-ink); }

/* Grid */
.grid { display: grid; gap: var(--space-4); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--grey-tint); color: var(--ink-soft); }
.badge--brand { background: var(--brand-tint); color: var(--brand-strong); }

/* FAQ / Details */
details.faq { border-bottom: 1px solid var(--line); padding: var(--space-3) 0; }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: var(--space-3); }
details.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--brand); }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin: var(--space-2) 0 0; color: var(--ink-soft); }

/* Progress */
.progress-card { max-width: 560px; margin: var(--space-7) auto; padding: var(--space-6); }
.progress-card h1 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
.progress-card__hint { margin: var(--space-5) 0 0; }
.eyebrow--status { display: inline-flex; align-items: center; gap: var(--space-2); }
.eyebrow--error { color: var(--red-ink); }
.progress-bar { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; margin: var(--space-4) 0 var(--space-5); }
.progress-bar__fill { height: 100%; width: 5%; background: var(--brand); transition: width .6s ease; }
.progress-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.progress-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line-soft); color: var(--muted); }
.progress-item__icon { flex: none; width: 18px; height: 18px; display: grid; place-items: center; }
.progress-item__icon > *, .progress-item__icon::before { grid-area: 1 / 1; }
.progress-item__icon::before { content: ""; width: 10px; height: 10px; border: 1.5px solid var(--line-strong); border-radius: 50%; }
.progress-item__icon .progress-item__done, .progress-item__icon .progress-item__spinner { display: none; }
.progress-item__label { flex: 1; min-width: 0; }
.progress-item__state { font-size: .85rem; }
.progress-item__state [data-state-label] { display: none; }
.progress-item[data-state="waiting"] [data-state-label="waiting"],
.progress-item[data-state="running"] [data-state-label="running"],
.progress-item[data-state="done"] [data-state-label="done"],
.progress-item[data-state="skipped"] [data-state-label="skipped"] { display: inline; }
.progress-item[data-state="running"] { color: var(--ink); font-weight: 600; }
.progress-item[data-state="running"] .progress-item__state { color: var(--brand); }
.progress-item[data-state="done"] { color: var(--ink); }
.progress-item[data-state="done"] .progress-item__state { color: var(--green-ink); }
.progress-item:is([data-state="running"], [data-state="done"]) .progress-item__icon::before { display: none; }
.progress-item[data-state="running"] .progress-item__icon .progress-item__spinner { display: inline-block; }
.progress-item[data-state="done"] .progress-item__icon .progress-item__done { display: block; color: var(--green-ink); }
.progress-item[data-state="skipped"] .progress-item__icon::before { width: 10px; height: 0; border-width: 1px 0 0; border-radius: 0; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--brand-tint); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Report */
.report-top { background: var(--bg); border-bottom: 1px solid var(--line); padding-bottom: var(--space-7); }
.report-head { padding: var(--space-7) 0 var(--space-5); }
.report-head h1 { margin-bottom: var(--space-3); }
.report-head__meta { color: var(--muted); font-size: .95rem; margin: 0; }
.report-head__url { font-weight: 600; color: var(--ink); word-break: break-all; }
.scorecard__row--link { color: var(--ink); text-decoration: none; }
.scorecard__row--link:hover { color: var(--brand); }
.scorecard__row--link:hover .scorecard__name { text-decoration: underline; }
.section__lead { margin: var(--space-2) 0 0; color: var(--muted); }

.actions { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); counter-reset: action; }
.action { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); padding: var(--space-5) var(--space-5) var(--space-5) var(--space-4); border-top: 1px solid var(--line); }
.action:first-child { border-top: 0; }
.action::before { counter-increment: action; content: counter(action, decimal-leading-zero); grid-row: 1 / span 3; font-family: var(--mono); font-size: .85rem; font-weight: 500; color: var(--brand); padding-top: .2rem; }
.action h3 { margin-bottom: var(--space-1); }
.action p { margin: 0 0 var(--space-3); color: var(--ink-soft); }
.action__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.action__more { margin-left: var(--space-2); font-size: .875rem; }

.devices { display: grid; gap: var(--space-5); align-items: end; }
.phone { width: 220px; margin: 0 auto; padding: 8px; background: var(--ink); border-radius: 30px; }
.phone img { border-radius: 23px; aspect-ratio: 375 / 812; object-fit: cover; object-position: top; width: 100%; }
.browser-frame { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.browser-frame__bar { height: 22px; background: var(--line-soft); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 5px; padding: 0 8px; }
.browser-frame__bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.browser-frame img { width: 100%; }
figure { margin: 0; }
figcaption { text-align: center; font-family: var(--mono); font-size: .75rem; color: var(--muted); margin-top: var(--space-2); }

.ai-question { margin-bottom: var(--space-4); }
.ai-question__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); align-items: baseline; margin-bottom: var(--space-3); }
.ai-question__head h3 { margin: 0; }
.ai-answer { background: var(--bg); border-radius: var(--radius-sm); padding: var(--space-4); font-size: .95rem; max-height: 22rem; overflow: auto; border: 1px solid var(--line); }
.ai-answer > :first-child { margin-top: 0; }
.ai-answer > :last-child { margin-bottom: 0; }
.ai-answer :is(h1, h2, h3, h4) { font-size: 1rem; margin: var(--space-3) 0 var(--space-1); }
.ai-answer :is(p, ul, ol) { margin: 0 0 var(--space-2); }
.ai-answer :is(ul, ol) { padding-left: 1.25rem; }
.ai-runs { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-3); }

.area-details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.area-detail { border-top: 1px solid var(--line); scroll-margin-top: var(--space-4); }
.area-detail:first-child { border-top: 0; }
.area-detail > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-4) var(--space-5); }
.area-detail > summary::-webkit-details-marker { display: none; }
.area-detail > summary:hover .area-detail__name { color: var(--brand); }
.area-detail__name { flex: 1 1 12rem; min-width: 0; font-weight: 600; font-size: 1.05rem; }
.area-detail__score { font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.area-detail > summary .chev { flex: none; transition: transform .2s ease; color: var(--muted); }
.area-detail[open] > summary .chev { transform: rotate(90deg); }
.area-detail__body { padding: 0 var(--space-5) var(--space-5); }
.findings { list-style: none; padding: 0; margin: 0 0 var(--space-4); border-top: 1px solid var(--line-soft); }
.finding { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--space-1) var(--space-4); align-items: start; padding: var(--space-3) 0; border-bottom: 1px solid var(--line-soft); }
.finding .status-pill { justify-self: start; margin-top: 2px; }
.finding strong { display: block; font-weight: 600; }
.finding p { margin: var(--space-1) 0 0; font-size: .95rem; color: var(--ink-soft); }
.finding pre { margin: var(--space-2) 0 0; font-family: var(--mono); font-size: .75rem; white-space: pre-wrap; word-break: break-all; color: var(--muted); }
.metrics { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; font-size: .9rem; }
.metrics div { display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-2) 0; border-bottom: 1px solid var(--line-soft); }
.metrics dt { color: var(--muted); }
.metrics dd { margin: 0; font-weight: 500; text-align: right; word-break: break-word; }

.disclaimer { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding: var(--space-4) 0 var(--space-7); margin-top: var(--space-7); }

/* Admin */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: var(--space-2) var(--space-3); text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--bg); }
td.num { font-variant-numeric: tabular-nums; }
.status { font-weight: 700; font-size: .85rem; }
.status--done { color: var(--green-ink); }
.status--failed { color: var(--red-ink); }
.status--running, .status--queued { color: var(--yellow-ink); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-5); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3) var(--space-4); }
.stat strong { display: block; font-size: 1.6rem; }
.prose { max-width: 680px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
:is(.hero, .site-footer) :focus-visible { outline-color: var(--accent); }

@media (min-width: 720px) {
    .site-nav { display: flex; }
}

@media (max-width: 520px) {
    .finding { grid-template-columns: 1fr; }
    .quick-form__row .btn { flex: 1 1 100%; }
}

/* Bars inline once the score card is wide enough */
@media (min-width: 600px) {
    .scorecard__row { grid-template-columns: minmax(0, 11rem) minmax(3rem, 1fr) 2rem 9.5rem; }
    .scorecard__bar { grid-column: 2; grid-row: 1; }
    .scorecard__row .status-pill { justify-self: end; }
}

@media (min-width: 640px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
    .grid--2 { grid-template-columns: 1fr 1fr; }
    .grid--3 { grid-template-columns: repeat(3, 1fr); }
    .metrics { grid-template-columns: 1fr 1fr; column-gap: var(--space-6); }
}

@media (min-width: 880px) {
    .grid--4 { grid-template-columns: repeat(4, 1fr); }
        .devices { grid-template-columns: 240px 1fr 1.4fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
    .site-header, .site-footer, .no-print { display: none !important; }
    body { background: #fff; }
    .area-detail { break-inside: avoid; }
}
