/* checkmaster.net – 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;
    /* Panels on night blue, e.g. the locale switcher in the hero */
    --ink-raised: #1c2e50;

    /* 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); }
.container--full { max-width: none; padding-inline: clamp(var(--space-4), 2vw, 2rem); }
.section { padding-block: var(--space-8); }
.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; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); min-height: 68px; padding-block: var(--space-2); }
.site-header__end { display: flex; align-items: center; gap: var(--space-4); margin-left: auto; }
.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; }

/* Locale switcher: the current country and language open a panel with the countries and the languages of the
   current one. Light panel on light ground, dark panel on dark ground; the colors are set once per ground. */
.locale-switcher {
    --ls-raised: var(--surface); --ls-text: var(--ink); --ls-muted: var(--muted);
    --ls-line: var(--line); --ls-hover: var(--line-soft); --ls-selected: var(--brand-tint); --ls-mark: var(--ink);
    --ls-track: var(--bg); --ls-on: var(--ink); --ls-on-text: #fff; --ls-shadow: 0 .75rem 2rem rgb(19 35 63 / .16);
    position: relative; font-size: .95rem; font-weight: 500;
}
.locale-switcher--inverse, .hero .locale-switcher {
    --ls-raised: var(--ink-raised); --ls-text: #fff; --ls-muted: var(--on-dark-soft);
    --ls-line: rgb(255 255 255 / .16); --ls-hover: rgb(255 255 255 / .06); --ls-selected: var(--ink-soft); --ls-mark: var(--accent);
    --ls-track: var(--ink); --ls-on: var(--accent); --ls-on-text: var(--ink); --ls-shadow: 0 1.5rem 3rem rgb(5 10 25 / .5);
}
.locale-switcher summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: 0 .85rem 0 .75rem; border: 1px solid var(--ls-line); border-radius: var(--radius); color: var(--ls-text); white-space: nowrap; }
.locale-switcher summary::-webkit-details-marker { display: none; }
.locale-switcher summary:hover { background: var(--ls-hover); }
.locale-switcher[open] summary { border-color: var(--ls-mark); background: var(--ls-raised); }
.locale-switcher__globe { flex: none; width: 1.1rem; height: 1.1rem; color: var(--ls-muted); }
.locale-switcher__dot { margin-inline: .5rem; color: var(--ls-muted); }
.locale-switcher__chevron { flex: none; width: .9rem; height: .9rem; color: var(--ls-muted); transition: transform .15s; }
.locale-switcher[open] .locale-switcher__chevron { transform: rotate(180deg); }
/* Phones get the codes: "CH · DE" */
.locale-switcher__short { display: none; }
@media (max-width: 519.98px) {
    .locale-switcher__long { display: none; }
    .locale-switcher__short { display: inline; }
}
.locale-switcher__panel { position: absolute; right: 0; top: calc(100% + .75rem); z-index: 10; width: min(25rem, calc(100vw - 2 * var(--space-4))); display: grid; gap: var(--space-5); padding: var(--space-5); text-align: left; color: var(--ls-text); background: var(--ls-raised); border: 1px solid var(--ls-line); border-radius: 14px; box-shadow: var(--ls-shadow); }
.locale-switcher__panel ul { margin: 0; padding: 0; list-style: none; }
.locale-switcher__group { display: grid; gap: var(--space-2); }
.locale-switcher__group--languages { gap: var(--space-3); padding-top: 1.1rem; border-top: 1px solid var(--ls-line); }
.locale-switcher__heading { margin: 0; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ls-muted); }
.locale-switcher__countries { display: grid; gap: 2px; }
/* The panel keeps its colors on any ground; .hero a would turn its links white */
.locale-switcher__countries a, .hero .locale-switcher__countries a:not(.logo) { display: flex; align-items: center; gap: var(--space-3); min-height: 44px; padding: 0 var(--space-3); border-radius: var(--radius); color: var(--ls-text); font-size: 1rem; font-weight: 400; text-decoration: none; }
.locale-switcher__countries a:hover, .hero .locale-switcher__countries a:not(.logo):hover { background: var(--ls-hover); color: var(--ls-text); }
.locale-switcher__countries a[aria-current], .hero .locale-switcher__countries a[aria-current]:not(.logo) { background: var(--ls-selected); font-weight: 600; }
.locale-switcher__code { flex: none; width: 1.9rem; font-size: .75rem; font-weight: 700; color: var(--ls-muted); }
.locale-switcher__countries a[aria-current] .locale-switcher__code { color: var(--ls-mark); }
.locale-switcher__country { flex: 1; }
.locale-switcher__check { flex: none; width: 1.1rem; height: 1.1rem; color: var(--ls-mark); }
/* The languages of the country as a segmented control */
.locale-switcher__languages { display: flex; gap: var(--space-1); padding: var(--space-1); background: var(--ls-track); border-radius: 10px; }
.locale-switcher__languages li { flex: 1 1 0; }
.locale-switcher__languages a, .hero .locale-switcher__languages a:not(.logo) { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 var(--space-3); border-radius: 7px; color: var(--ls-text); font-size: .95rem; font-weight: 400; text-decoration: none; }
.locale-switcher__languages a:hover, .hero .locale-switcher__languages a:not(.logo):hover { background: var(--ls-hover); color: var(--ls-text); }
.locale-switcher__languages a[aria-current], .hero .locale-switcher__languages a[aria-current]:not(.logo) { background: var(--ls-on); color: var(--ls-on-text); font-weight: 700; }
.locale-switcher__hint { margin: 0; font-size: .8125rem; line-height: 1.45; color: var(--ls-muted); }
.locale-switcher--corner { width: max-content; margin-left: auto; }
/* Until the header has room, the panel spans the header: the header button sits right of the switcher */
@media (max-width: 719.98px) {
    .site-header { position: relative; }
    .site-header .locale-switcher { position: static; }
    .site-header .locale-switcher__panel { top: calc(100% - var(--space-2)); left: var(--space-4); right: var(--space-4); width: auto; max-width: 25rem; margin-left: auto; }
}
.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--ghost.btn--danger { color: var(--red-ink); border-color: var(--red-ink); }
.btn--ghost.btn--danger:hover { background: var(--red-tint); color: var(--red-ink); }
.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 { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: var(--space-8) 0 18vh; }
/* Top bar of the full hero, e.g. the locale switcher in the corner */
.hero__bar { position: absolute; inset: 0 0 auto; z-index: 2; padding-top: var(--space-4); }
@media (min-width: 720px) { .hero__bar { padding-top: var(--space-5); } }
.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; }

/* Radar chart of the area scores: beside the list on wide screens, above it otherwise */
.scorecard__radar { padding: var(--space-4) var(--space-4) 0; }
.radar { display: block; width: 100%; max-width: 460px; height: auto; margin: 0 auto; overflow: visible; }
.radar__ring { fill: none; stroke: var(--line-soft); stroke-width: 1; }
.radar__ring:last-of-type { stroke: var(--line); }
.radar__axis { stroke: var(--line-soft); stroke-width: 1; }
.radar__shape { fill: var(--accent); fill-opacity: .22; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; }
.radar__point { stroke: var(--surface); stroke-width: 2; }
.radar__point--green { fill: var(--green); }
.radar__point--yellow { fill: var(--yellow); }
.radar__point--red { fill: var(--red); }
.radar__point--grey { fill: var(--grey); }
.radar__label { font-family: var(--font); font-size: 14px; font-weight: 500; fill: var(--ink-soft); }
.radar__score { font-family: var(--mono); font-size: 13px; fill: var(--muted); }
/* Phones scale the SVG to about two thirds: larger labels in viewBox units keep them readable there. The
   side labels still have to fit between the chart and the card edge (the card clips its overflow) */
@media (max-width: 519.98px) {
    .radar__label { font-size: 16px; }
    .radar__score { font-size: 15px; }
}

/* 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; }
.promise-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: var(--space-5) var(--space-6); }
.promise-list__item { padding-top: var(--space-5); border-top: 2px solid var(--accent); }
.promise-list__icon { display: block; width: 1.75rem; height: 1.75rem; margin-bottom: var(--space-3); }
.promise-list__item h3 { margin-bottom: var(--space-1); }
.promise-list__item p { margin: 0; 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__share { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-top: var(--space-4); }
.report-head__share p { margin: 0; }
.report-head__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.btn__icon { width: 1.1em; height: 1.1em; flex: none; }
.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); }
/* Check details: one hairline between checks, everything inside is separated by space and type size, not rules */
.check { padding: var(--space-5) 0 var(--space-6); border-top: 1px solid var(--line); }
.check:first-child { border-top: 0; padding-top: var(--space-2); }
.check:last-child { padding-bottom: var(--space-2); }
.check__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); margin-bottom: var(--space-3); }
.check__title { font-size: 1.2rem; font-weight: 650; letter-spacing: -.015em; margin: 0; }
.check__id { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.check__version { font-family: var(--mono); font-size: .7rem; color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 .35em; }
.check__score { margin-left: auto; font-family: var(--mono); font-size: .85rem; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.check__score--none { color: var(--muted); font-weight: 400; }
.check__method { font-size: .85rem; color: var(--ink-soft); margin-bottom: var(--space-3); }
.check__method summary { cursor: pointer; color: var(--muted); width: max-content; }
.check__method summary:hover { color: var(--brand); }
.check__method p { margin: var(--space-1) 0 0; max-width: 64ch; }
.findings { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-5); }
.finding { min-width: 0; }
.finding__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); }
.finding__head strong { font-weight: 600; font-size: 1rem; }
.finding__body { min-width: 0; }
.finding p { margin: var(--space-1) 0 0; font-size: .95rem; color: var(--ink-soft); max-width: 70ch; }
.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); }
.finding .finding__evidence-head { font-size: .8rem; font-weight: 600; color: var(--muted); margin-top: var(--space-3); }
.evidence code { font-family: var(--mono); }
.evidence { list-style: none; padding: 0; margin: var(--space-2) 0 0; display: grid; gap: var(--space-2); min-width: 0; }
.evidence__item { border-radius: var(--radius-sm); padding: var(--space-3) var(--space-3); background: var(--bg); min-width: 0; }
.evidence__label { display: block; font-size: .85rem; font-weight: 600; word-break: break-word; }
.evidence__label--code { font-family: var(--mono); font-weight: 500; font-size: .8rem; }
.evidence__url { display: block; font-family: var(--mono); font-size: .75rem; word-break: break-all; margin-top: 2px; }
.evidence__item .evidence__code { margin: var(--space-2) 0 0; padding: var(--space-2) var(--space-3); background: var(--surface); border-radius: var(--radius-sm); font-size: .72rem; color: var(--ink); white-space: pre-wrap; word-break: break-all; max-height: 12rem; overflow: auto; }
.evidence__data { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 2px var(--space-3); margin: var(--space-2) 0 0; font-size: .8rem; }
.evidence__data div { display: contents; }
.evidence__data dt { color: var(--muted); }
.evidence__data dd { margin: 0; font-family: var(--mono); font-size: .75rem; word-break: break-word; }
/* Metrics: quiet label/value pairs under the findings, no table rules */
.metrics { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin: var(--space-4) 0 0; font-size: .9rem; }
.metrics div { display: flex; flex-wrap: wrap; gap: 0 var(--space-2); }
.metrics dt { color: var(--muted); }
.metrics dt::after { content: ":"; }
.metrics dd { margin: 0; font-weight: 500; 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; }
.prose :is(h2, h3) { scroll-margin-top: var(--space-5); }
.prose ul, .prose ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; }
.prose li { margin-bottom: var(--space-1); }
.prose li::marker { color: var(--muted); }
.prose code { font-family: var(--mono); font-size: .85em; background: var(--line-soft); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
.prose pre { background: var(--ink); color: #fff; border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); overflow-x: auto; font-size: .85rem; margin: 0 0 var(--space-4); }
.prose pre code { background: none; padding: 0; color: inherit; overflow-wrap: normal; }
.prose blockquote { margin: 0 0 var(--space-4); padding: var(--space-3) var(--space-4); background: var(--accent-tint); border-left: 4px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose .opt-out { margin: 0 0 var(--space-4); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 var(--space-4); font-size: .9rem; display: block; overflow-x: auto; }
.prose :is(th, td) { text-align: left; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; background: var(--line-soft); }

/* Knowledge base */
.kb-hero { background: var(--ink); color: #fff; padding: var(--space-7) 0 var(--space-6); }
.kb-hero .eyebrow { color: var(--accent); margin-bottom: var(--space-3); }
.kb-hero h1 { margin-bottom: var(--space-3); }
.kb-hero__intro { max-width: 44rem; font-size: 1.125rem; color: var(--on-dark-soft); }
.kb-hero__stats { margin: var(--space-3) 0 0; font-family: var(--mono); font-size: .8rem; color: var(--on-dark-soft); }
.kb-search { position: relative; max-width: 36rem; margin-top: var(--space-5); }
.kb-search[hidden] { display: none; }
.kb-search__icon { position: absolute; left: var(--space-4); top: 50%; width: 1.25rem; height: 1.25rem; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.kb-search__input { min-height: 56px; padding-left: 3rem; font-size: 1.0625rem; border-color: transparent; }
.kb-search__input:focus { border-color: var(--accent); }
.kb-areas { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.kb-areas__link { display: inline-flex; align-items: center; gap: var(--space-2); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .9rem; text-decoration: none; }
.kb-areas__link:hover { border-color: var(--brand); color: var(--brand); }
.kb-areas__count { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.kb-group { padding-top: var(--space-6); scroll-margin-top: var(--space-4); }
.kb-group[hidden] { display: none; }
.kb-group__head { display: flex; gap: var(--space-3); align-items: flex-start; margin-bottom: var(--space-4); }
.kb-group__head h2 { margin-bottom: var(--space-1); font-size: clamp(1.4rem, 2.4vw, 1.75rem); }
.kb-group__head p { margin: 0; color: var(--ink-soft); }
.kb-group__icon { flex: none; width: 1.75rem; height: 1.75rem; margin-top: .15rem; }
.kb-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: var(--space-3); }
.kb-grid > [hidden] { display: none; }
.kb-card { display: flex; flex-direction: column; height: 100%; padding: var(--space-4) var(--space-4) var(--space-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.kb-card:hover { color: var(--ink); border-color: var(--brand); box-shadow: 0 2px 10px rgba(19, 35, 63, .08); }
.kb-card__title { font-size: 1.0625rem; margin-bottom: var(--space-2); }
.kb-card:hover .kb-card__title { text-decoration: underline; }
.kb-card__summary { flex: 1; margin: 0; font-size: .9rem; color: var(--ink-soft); }
.kb-empty { margin-top: var(--space-6); color: var(--muted); }
.kb-cta { padding-block: var(--space-7); }
.kb-cta h2 { margin-bottom: var(--space-2); }
.kb-cta .hero__note { margin: 0 auto; max-width: 36rem; font-size: 1rem; }
.kb-cta .quick-form { margin-top: var(--space-5); }

.kb-article { padding-block: var(--space-5) var(--space-7); }
.kb-breadcrumb { list-style: none; margin: 0 0 var(--space-5); padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: .875rem; }
.kb-breadcrumb li + li::before { content: "›"; margin-right: var(--space-2); color: var(--muted); }
.kb-article__head { max-width: 46rem; margin-bottom: var(--space-6); }
.kb-article__lead { font-size: 1.1875rem; line-height: 1.5; color: var(--ink-soft); margin-bottom: var(--space-3); }
.kb-article__meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: 0; font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.kb-layout { display: grid; gap: var(--space-6); }
.kb-aside { display: grid; gap: var(--space-4); align-content: start; }
.kb-aside__title { font-family: var(--mono); font-size: .8rem; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-bottom: var(--space-3); }
.kb-facts, .kb-toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4); }
.kb-facts dl { margin: 0; display: grid; gap: var(--space-3); }
.kb-facts dt { font-size: .8rem; color: var(--muted); }
.kb-facts dd { margin: 0; font-size: .925rem; }
.kb-weight { display: block; width: 100%; height: 6px; margin: var(--space-1) 0 var(--space-2); background: var(--line-soft); border-radius: 3px; overflow: hidden; }
.kb-weight > span { display: block; height: 100%; background: var(--brand); }
.kb-weight--high > span { background: var(--red); }
.kb-weight--medium > span { background: var(--yellow); }
.kb-toc ol { margin: 0; padding-left: 1.25rem; font-size: .925rem; }
.kb-toc li { margin-bottom: var(--space-1); }
.kb-toc li::marker { color: var(--muted); font-family: var(--mono); font-size: .8rem; }
.kb-toc a { color: var(--ink); }
.kb-body > h2:first-child { margin-top: 0; }
.kb-body h2 { margin-top: var(--space-7); }
.kb-body h3 { margin-top: var(--space-5); font-size: 1.2rem; }
.kb-faq { margin-top: var(--space-7); }
.kb-pager { display: grid; gap: var(--space-3); margin-top: var(--space-7); }
.kb-pager__link { display: block; padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; }
.kb-pager__link:hover { border-color: var(--brand); color: var(--ink); }
.kb-pager__label { display: block; margin-bottom: var(--space-1); font-family: var(--mono); font-size: .75rem; font-weight: 500; color: var(--muted); }
.kb-pager__link--all { display: flex; align-items: center; justify-content: center; }

/* Admin */
.admin-header { flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2) var(--space-5); margin-left: auto; }
.admin-nav { display: flex; gap: var(--space-4); font-size: .95rem; white-space: nowrap; }
.admin-nav a { color: var(--ink); text-decoration: none; }
.admin-nav a:hover, .admin-nav a[aria-current="page"] { color: var(--brand); text-decoration: underline; }
.admin-actions { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.admin-actions form { margin: 0; }
.admin-user { display: flex; align-items: center; gap: var(--space-3); margin: 0; white-space: nowrap; }
.admin-auth { max-width: 440px; }
.admin-auth--wide { max-width: 620px; }
.admin-auth h1 { font-size: 1.6rem; }
.totp-setup { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); margin: var(--space-4) 0; }
.totp-setup__qr { display: block; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.totp-setup__secret { font-family: var(--mono); font-size: 1rem; word-break: break-all; }

.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; }
    .site-header__end { gap: var(--space-6); }
}

@media (max-width: 520px) {
    .metrics { flex-direction: column; gap: var(--space-3); }
    .metrics div { flex-direction: column; }
    .quick-form__row .btn { flex: 1 1 100%; }
}

@media (min-width: 900px) {
    .scorecard__body--chart { display: grid; grid-template-columns: minmax(0, 1fr) 27rem; align-items: center; }
    .scorecard__body--chart .scorecard__radar { grid-column: 2; grid-row: 1; padding: var(--space-4) var(--space-5) var(--space-4) 0; }
}

/* 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); }
}

@media (min-width: 720px) {
    .kb-pager { grid-template-columns: 1fr auto 1fr; }
    .kb-pager__link--all { grid-column: 2; }
    .kb-pager__link--next { grid-column: 3; text-align: right; }
}

/* Knowledge article: facts and table of contents beside the text */
@media (min-width: 960px) {
    .kb-layout { grid-template-columns: minmax(0, 680px) 18rem; justify-content: space-between; gap: var(--space-7); }
    .kb-aside { grid-column: 2; grid-row: 1; position: sticky; top: var(--space-5); }
    .kb-body { grid-column: 1; grid-row: 1; }
}

@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; }
}
