/*
 * SPDX-FileCopyrightText: 2026 Kai Ole Hartwig
 * SPDX-License-Identifier: LicenseRef-Proprietary
 *
 * The customer portal's styles. Tokens: the findready.ai axis, as the live
 * site carries it (moselwal/findready-site, Resources/Private/Css/tokens.css,
 * the "Messprotokoll" grid) -- the handbook (brand/axes/findready.md) names
 * the site canonical once it is live, and its prototype values (radius
 * 8/12/20, soft shadows) are what the site has since left behind: square
 * 2px edges, no shadows, hairlines, a framed page with ruler ticks, ink
 * buttons with a chevron. Archivo for headings, IBM Plex Sans for running
 * text and buttons, IBM Plex Mono for labels, numbers and dates ("the mono
 * layer carries the evidence").
 *
 * Two deliberate deviations from the site, both for contrast (WCAG AA):
 * secondary text and mono labels use #64635F (5.7:1 on paper) instead of the
 * site's muted tones (3.7:1 and 2.7:1), and form controls are outlined in
 * #8E8C82 (3.2:1) instead of the site's input line (2.0:1).
 *
 * Green, amber and red (--ready, --caution, --alarm) are the score scale and
 * are used for ONE thing only: the band of a visibility score (.score, the
 * operator's visibility measurement and the customer view), and there
 * only on the bar, with the number and the band name in ink beside it (the
 * amber does not reach 3:1 on paper, so it never carries meaning alone).
 * Request urgency, check results (including the visibility checks) and flash
 * messages are told apart by text, weight and shape, in ink.
 *
 * No inline styles anywhere (the CSP forbids them); fonts are self-hosted
 * (public/fonts, OFL-1.1).
 */

@font-face { font-family: "Archivo"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/archivo-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/archivo-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-600-normal.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-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }

[data-axis="findready"] {
    /* The site's oklch values, written as the hex they resolve to. */
    --paper: #FAF9F5;          /* --background */
    --paper-2: #E9E6DC;        /* --secondary */
    --paper-3: #EDE9DE;        /* --muted */
    --surface-card: #F5F4EE;   /* --panel: cards and the sidebar */
    --ink-strong: #141413;     /* --card-foreground: headings, ink buttons */
    --ink: #3D3929;            /* --foreground: running text */
    /* See the header: darker than the site's muted text, for AA. */
    --ink-2: #64635F;
    --ink-label: #64635F;
    /* The site's muted tone: rules and decoration only, never text. */
    --ink-3: #83827D;
    --line: #DAD9D4;           /* --border */
    --line-2: #B4B2A7;         /* --input, the site's stronger line */
    --control: #8E8C82;        /* form controls, 3.2:1 (see the header) */
    --tick: var(--line-2);
    --dark: #262624;
    --dark-2: #30302E;
    --line-dark: #3E3E38;
    --accent: #5936C9;         /* --primary */
    --accent-ink: #FFFFFF;
    --accent-dim: #4614AE;     /* --violet-dim */
    --accent-on-dark: #9C87F5; /* --chart-2 */
    --accent-tint: rgba(89, 54, 201, 0.08);
    /* The score scale: the visibility score's band only (.score). */
    --ready: #058A46;
    --caution: #C98212;
    --alarm: #C9292F;

    --font-display: "Archivo", system-ui, sans-serif;
    --font-body: "IBM Plex Sans", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;

    /* Square and flat, as the site: 2px everywhere, no shadows. The three
       names stay so no rule that uses them has to change. */
    --radius-s: 2px;
    --radius-m: 2px;
    --radius-l: 2px;
    --shadow-card: none;
    --shadow-proof: none;
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
    --speed: 220ms;

    /* The frame: two hairlines with ruler ticks, as on the site. */
    --container: 1280px;
    --frame-margin: 12px;
    --frame: min(var(--container), 100% - 2 * var(--frame-margin));
    --gutter: 20px;
}

@media (min-width: 900px) {
    [data-axis="findready"] { --gutter: 40px; --frame-margin: 32px; }
}

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

/* hidden wins over every display rule (buttons are inline-flex). */
[hidden] { display: none !important; }

html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }

body {
    position: relative;
    margin: 0;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    min-height: 100vh;
    overflow-wrap: anywhere;
}

/* The frame, as on the site: two hairlines from top to bottom (::before)
   and ruler ticks outside them, in the margin to the window edge (::after),
   so they never run over text. Above the content, but they take no clicks. */
body::before,
body::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 50%;
    z-index: 20;
    transform: translateX(-50%);
    pointer-events: none;
}
body::before { width: var(--frame); border-inline: 1px solid var(--line); }
body::after {
    width: calc(var(--frame) + 24px);
    background:
        repeating-linear-gradient(to bottom, var(--tick) 0 1px, transparent 1px 80px) left top / 12px 100% no-repeat,
        repeating-linear-gradient(to bottom, var(--tick) 0 1px, transparent 1px 80px) right top / 12px 100% no-repeat,
        repeating-linear-gradient(to bottom, var(--tick) 0 1px, transparent 1px 16px) left 7px top / 5px 100% no-repeat,
        repeating-linear-gradient(to bottom, var(--tick) 0 1px, transparent 1px 16px) right 7px top / 5px 100% no-repeat;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.04; margin: 0; color: var(--ink-strong); text-wrap: balance; }
h1 { font-weight: 700; letter-spacing: -0.035em; font-size: clamp(2.25rem, 4.8vw, 3.5rem); line-height: 1; }
h2 { font-weight: 700; letter-spacing: -0.03em; font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
h3 { font-weight: 700; letter-spacing: -0.025em; font-size: 1.15rem; }
p { margin: 0; }

a { color: var(--accent-dim); text-underline-offset: .15em; }
a:hover { color: var(--accent); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--ink-strong); color: var(--paper); padding: .5rem 1rem; border-radius: var(--radius-s); z-index: 30; }
.skip-link:focus { top: 1rem; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* --- Type roles -------------------------------------------------------- */

.label, .eyebrow, .tag, .pill, .brand__label, .nav__heading {
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: .09em;
    text-transform: uppercase;
    font-size: 11px;
}
.label, .eyebrow, .brand__label, .nav__heading { color: var(--ink-label); }
.eyebrow--accent { color: var(--accent-dim); }
.mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: .02em; }
.num { font-family: var(--font-mono); font-weight: 600; }
.meta, .hint { font-size: 14px; color: var(--ink-2); }
.lead { max-width: 44rem; color: var(--ink-2); font-size: 1rem; }
.strong { font-weight: 600; }

/* --- Shell: sidebar + workspace ---------------------------------------- */

.shell { display: flex; flex-wrap: wrap; min-height: 100vh; width: var(--frame); margin-inline: auto; }

.sidebar {
    flex: 1 1 232px;
    max-width: 100%;
    background: var(--surface-card);
    border-right: 1px solid var(--line);
    padding: 0 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.workspace { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }

/* As the site's header: the name, 56px high, a hairline below. In the
   sidebar the hairline lines up with the topbar's. */
.brand { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 64px; padding: 0 12px; margin: 0 -16px; padding-inline: 28px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink-strong); }
.brand:hover { color: var(--ink-strong); }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.03em; line-height: 1.1; }
.brand__tld { color: var(--accent); }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nav a {
    display: flex; align-items: center;
    min-height: 44px; padding: 0 12px;
    border-radius: var(--radius-m);
    color: var(--ink); font-weight: 500; text-decoration: none;
    transition: background-color var(--speed) var(--ease-out), color var(--speed) var(--ease-out);
}
.nav a:hover { background: var(--paper-2); color: var(--ink-strong); }
.nav a[aria-current="page"] { background: var(--ink-strong); color: var(--paper); font-weight: 600; }
.nav__heading { padding: 0 12px; margin: 0 0 6px; }
.nav + .nav { margin-top: -8px; }

.contact { display: flex; flex-direction: column; gap: 6px; padding: 16px 12px 0; border-top: 1px solid var(--line); }
.contact__name { font-weight: 600; }
.contact__line { font-size: 14px; color: var(--ink-2); }
.contact__note { font-size: 13px; color: var(--ink-label); line-height: 1.45; }

/* Sticky like the site's header, on paper so content scrolls under it. */
.topbar {
    position: sticky; top: 0; z-index: 10;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem;
    min-height: 64px; padding: 10px var(--gutter);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.topbar__org { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .6rem; font-weight: 600; }
.topbar__links { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; }
.topbar__links a { color: var(--ink); text-decoration: none; }
.topbar__links a:hover { color: var(--accent); }
.topbar__links form { margin: 0; }

.operator-banner {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem;
    padding: .75rem var(--gutter);
    background: var(--dark); color: var(--paper);
}
.operator-banner .button--quiet { color: var(--paper); border-color: var(--paper); }
.operator-banner .button--quiet:hover { background: var(--dark-2); color: var(--paper); }

.main { flex: 1; width: 100%; padding: 48px var(--gutter) 80px; }
.main:focus { outline: none; }
.page { max-width: 1120px; display: flex; flex-direction: column; gap: 28px; }
.page--narrow { max-width: 40rem; margin: 0 auto; }

/* Signed out: header, main and footer stand in the frame. */
body > .site-header, body > .main, body > .site-footer { width: var(--frame); margin-inline: auto; }
.site-header { padding: 0 var(--gutter); border-bottom: 1px solid var(--line); }
.site-header .brand { margin: 0; padding: 0; border-bottom: 0; }
.site-footer { padding: 1.5rem var(--gutter); border-top: 1px solid var(--line); color: var(--ink-2); font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; }

/* --- Page header ------------------------------------------------------- */

.page-header { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; }
.page-header__text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.page-header__aside { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* --- Cards and layout grids --------------------------------------------- */

.card {
    background: var(--surface-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-card);
    padding: clamp(18px, 3vw, 26px);
    display: flex; flex-direction: column; gap: 14px;
    min-width: 0;
}
.card--tint { background: var(--paper-2); box-shadow: none; }
/* A mono label at the top of a card reads as the site's card strip. */
.card > .label:first-child, .card > .eyebrow:first-child { padding-bottom: 10px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.card--plain { box-shadow: none; }
.card--accent { border: 2px solid var(--accent); padding: calc(clamp(18px, 3vw, 26px) - 1px); }
.card--dark { background: var(--dark); border-color: var(--line-dark); color: var(--paper); box-shadow: var(--shadow-proof); }
.card--dark .label, .card--dark .eyebrow { color: var(--accent-on-dark); }
.card--dark .meta { color: #B7B5A9; }
.card--dark h1, .card--dark h2, .card--dark h3 { color: var(--paper); }
.card--dark a { color: var(--accent-on-dark); }
.card > h2 + .meta, .card > h2 + p { margin-top: -4px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.tile { gap: 10px; }
.tile__value { font-family: var(--font-mono); font-weight: 600; font-size: 38px; line-height: 1.1; }
.tile__value--text { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.025em; }

.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.row--top { align-items: flex-start; }
.col-wide { flex: 3 1 420px; min-width: 0; }
.col-narrow { flex: 2 1 320px; min-width: 0; }

.stack { display: flex; flex-direction: column; gap: 12px; }
.cluster { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* --- Lists ------------------------------------------------------------- */

.list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.list__item {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px;
    padding: 14px 0; border-top: 1px solid var(--line);
}
.list__item--stack { flex-direction: column; align-items: flex-start; }
.list__main { flex: 1 1 260px; min-width: 0; }
.list__title { font-weight: 600; color: var(--ink); }
a.list__title { text-decoration: none; }
a.list__title:hover { text-decoration: underline; }
.list__id { flex: 0 0 84px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline__item { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.timeline__when { flex: 0 0 150px; font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--ink-2); }
.timeline__what { flex: 1 1 240px; min-width: 0; }

.empty { color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 14px; }

/* --- Tags, pills, status ------------------------------------------------ */

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid var(--line-2); border-radius: var(--radius-s); color: var(--ink-2); }
.tag--accent { border-color: var(--accent); color: var(--accent-dim); }
/* The site's badge: a small square before the text. */
.tag--accent::before { content: ""; width: 7px; height: 7px; background: var(--accent); flex: 0 0 auto; }
.tag--sample { border-style: dashed; }

.pill { display: inline-flex; align-items: center; border-radius: var(--radius-s); padding: 4px 10px; font-size: 11px; white-space: nowrap; }
.pill--solid { background: var(--ink-strong); color: var(--paper); border: 1px solid var(--ink-strong); }
.pill--outline { border: 1px solid var(--line-2); color: var(--ink-2); }

/* Urgency: text and weight, never a colour. */
.urgency { font-family: var(--font-mono); font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; }
.urgency--high { color: var(--ink); font-weight: 600; }
.urgency--critical { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .25em; }

/* Check results: shape and text in ink. */
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.status__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 999px;
    font-family: var(--font-mono); font-size: 13px; font-weight: 600; line-height: 1;
    border: 2px solid var(--ink);
}
.status--pass .status__icon { background: var(--surface-card); color: var(--ink); }
.status--fail .status__icon { background: var(--ink); color: var(--surface-card); }
.status--unknown { color: var(--ink-2); font-weight: 500; }
.status--unknown .status__icon { border-style: dashed; border-color: var(--ink-2); color: var(--ink-2); }

/* --- Facts (key/value) -------------------------------------------------- */

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 0; }
.facts div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.facts dt { font-size: 14px; color: var(--ink-2); }
.facts dd { margin: 0; font-family: var(--font-mono); font-weight: 600; font-size: 18px; }

.sum { display: flex; flex-direction: column; gap: 12px; }
.sum__line { display: flex; justify-content: space-between; gap: 12px; }
.sum__line--total { padding-top: 12px; border-top: 1px solid var(--line-2); font-weight: 600; }
.sum__value { font-family: var(--font-mono); }
.sum__line--total .sum__value { font-weight: 600; font-size: 22px; }

.steps { list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 12px; counter-reset: step; }
.steps li { display: flex; gap: 12px; counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--font-mono); font-weight: 600; color: var(--accent-dim); flex: 0 0 auto; }

/* --- Tiers ------------------------------------------------------------- */

.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tier { background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.tier--current { border: 2px solid var(--accent); padding: 21px; box-shadow: var(--shadow-card); }
.tier--current .label { color: var(--accent-dim); }
.tier__name { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.025em; }
.tier__price { font-family: var(--font-mono); font-weight: 600; margin-top: auto; }

/* --- Buttons ----------------------------------------------------------- */

/* The site's .fr-btn: ink, square, IBM Plex Sans 14px, a chevron after the
   text; violet on hover. The secondary kinds keep the mono label (as the
   site's small buttons). */
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    min-height: 44px; padding: 0 18px;
    border-radius: var(--radius-s); border: 1px solid var(--ink-strong);
    background: var(--ink-strong); color: var(--paper);
    font-family: var(--font-body); font-size: 14px; font-weight: 500; letter-spacing: 0;
    cursor: pointer; text-decoration: none; text-align: center;
    transition: background-color var(--speed) var(--ease-out), border-color var(--speed) var(--ease-out), color var(--speed) var(--ease-out);
}
.button:not(.button--outline):not(.button--quiet):not(.button--small)::after {
    content: ""; width: 6px; height: 6px; margin-left: 2px; flex: 0 0 auto;
    border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor;
    transform: rotate(45deg);
}
.button:hover { background: var(--accent-dim); border-color: var(--accent-dim); color: var(--accent-ink); }
.button:active { transform: translateY(1px); }
.button[disabled] { opacity: .6; cursor: progress; }
.button--outline, .button--quiet, .button--small {
    font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase;
}
.button--outline { background: transparent; color: var(--ink-strong); border-color: var(--control); }
.button--outline:hover { background: var(--paper-2); color: var(--ink-strong); border-color: var(--ink-strong); }
.button--quiet { background: transparent; color: var(--accent-dim); border-color: transparent; padding: 0 12px; }
.button--quiet:hover { background: var(--accent-tint); color: var(--accent-dim); border-color: transparent; }
.button--small { min-height: 36px; padding: 0 12px; }

/* --- Forms ------------------------------------------------------------- */

.form { display: flex; flex-direction: column; gap: 16px; }
.form--grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field legend, .inline-form label { font-weight: 600; font-size: 14px; }
.field--wide { grid-column: 1 / -1; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="datetime-local"], input[type="number"], input[type="file"], select, textarea {
    font: inherit; color: var(--ink-strong); background: var(--paper);
    width: 100%; min-height: 46px; padding: 0 14px;
    border: 1px solid var(--control); border-radius: var(--radius-m);
}
input[type="file"] { padding: 10px 14px; }
textarea { padding: 12px 14px; resize: vertical; min-height: 120px; }
select { padding: 0 12px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.checkbox { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.checkbox input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: 0 0 auto; }

.option {
    display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
    padding: 16px 0; border-top: 1px solid var(--line); min-height: 44px;
}
label.option { cursor: pointer; }
.option input[type="checkbox"] { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: 0 0 auto; }
.option__text { flex: 1 1 260px; min-width: 0; }
.option__price { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }

.inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* --- Messages ---------------------------------------------------------- */

.flash { border-radius: var(--radius-m); padding: 14px 16px; border: 1px solid var(--line); background: var(--surface-card); }
.flash--success { border-left: 4px solid var(--accent); }
.flash--error { border-left: 4px solid var(--ink-strong); font-weight: 600; }
.flash--info { border-left: 4px solid var(--accent); font-weight: 600; }
.flashes { display: flex; flex-direction: column; gap: 10px; max-width: 1120px; margin-bottom: 24px; }
.notice { background: var(--surface-card); border: 1px solid var(--line-2); border-radius: var(--radius-m); padding: 14px 16px; }
.card--tint .notice { background: var(--surface-card); }
.divider-note { font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--line-2); padding-top: 14px; }

/* --- Terms and service levels (stage 4, stage 5) ------------------------ */

.terms { border-top: 1px solid var(--line); padding-top: 14px; }
.terms__text { max-height: 24rem; overflow-y: auto; border: 1px solid var(--line-2); border-radius: var(--radius-m); padding: 12px 16px; background: var(--surface-card); }
.terms__text:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.terms__text p { margin: 0 0 12px; }
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.level { border: 1px solid var(--line-2); border-radius: var(--radius-m); padding: 14px 16px; }
.level--current { border: 2px solid var(--accent); padding: 13px 15px; }
.level--unavailable { border-style: dashed; color: var(--ink-2); }

/* --- Tables ------------------------------------------------------------ */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 10px 12px 0; border-top: 1px solid var(--line); }
.table thead th { border-top: 0; font-family: var(--font-mono); font-weight: 600; letter-spacing: .09em; text-transform: uppercase; font-size: 11px; color: var(--ink-label); padding-bottom: 8px; }
.table tbody th { font-weight: 600; }
.table tbody th .meta { font-family: var(--font-body); font-weight: 400; letter-spacing: 0; }
.table .num, .table td.mono { white-space: nowrap; }

/* --- Requests: conversation -------------------------------------------- */

.conversation { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.message { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; background: var(--surface-card); }
.message--team { background: var(--paper-2); }
.message__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 8px; font-size: 14px; color: var(--ink-2); }
.message__author { font-weight: 600; color: var(--ink); }
.message__body { white-space: pre-line; }

/* --- DNS: copyable values ---------------------------------------------- */

.copy { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; min-width: 0; }
.copy code, .value {
    font-family: var(--font-mono); font-size: 14px; font-weight: 500;
    background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-s);
    padding: 4px 8px; user-select: all; overflow-wrap: anywhere; min-width: 0;
}
.copy__button { font-size: 11px; min-height: 32px; padding: 0 10px; }
.record { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(4rem, auto) minmax(10rem, 2.5fr) minmax(9rem, 1.3fr); gap: 10px 16px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.record__name, .record__type { font-family: var(--font-mono); font-weight: 600; }
.record__purpose { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); }
.record__found { grid-column: 1 / -1; font-size: 14px; }
.record-head { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(4rem, auto) minmax(10rem, 2.5fr) minmax(9rem, 1.3fr); gap: 16px; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; font-weight: 500; }
.tabs a[aria-current="page"] { color: var(--ink-strong); border-bottom-color: var(--ink-strong); font-weight: 600; }

/* --- Visibility score ------------------------------------------------------
   The one use of the score colours (see the header): the bar's fill by
   band. Width in steps of ten, as classes: the CSP forbids inline styles. */
.score { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.score__value { font-family: var(--font-mono); font-weight: 600; font-size: 20px; color: var(--ink-strong); min-width: 2.5ch; text-align: right; }
.score__bar { display: inline-block; width: 88px; height: 8px; background: var(--paper-3); border: 1px solid var(--line-2); }
.score__fill { display: block; height: 100%; width: 0; background: var(--ink-3); }
.score--low .score__fill { background: var(--alarm); }
.score--middle .score__fill { background: var(--caution); }
.score--high .score__fill { background: var(--ready); }
.score__band { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.score--none .score__value { color: var(--ink-2); }
.score__note { display: block; font-size: 13px; color: var(--ink-2); }
.score__fill--10 { width: 10%; } .score__fill--20 { width: 20%; } .score__fill--30 { width: 30%; }
.score__fill--40 { width: 40%; } .score__fill--50 { width: 50%; } .score__fill--60 { width: 60%; }
.score__fill--70 { width: 70%; } .score__fill--80 { width: 80%; } .score__fill--90 { width: 90%; }
.score__fill--100 { width: 100%; }
.layer-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; margin: 0; width: 100%; }
.layer-scores div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.layer-scores dt { font-size: 14px; color: var(--ink-2); }
.layer-scores dd { margin: 0; }
.visibility-site { gap: 10px; }
.check { gap: 6px; }
.evidence summary { cursor: pointer; font-size: 14px; color: var(--accent-dim); }
.evidence pre { margin: 8px 0 0; padding: 12px; max-height: 20rem; overflow: auto; background: var(--paper-2); border: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.ruleset-break { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-strong); border-top: 2px solid var(--ink-strong); padding-top: 6px; }
.visibility-report { gap: 22px; }
.visibility-block { gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; }
/* The trend, drawn in ink: the score colours stay on the score bar. */
.trend { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; margin: 0; }
.trend div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.trend dt { font-size: 14px; color: var(--ink-2); }
.trend dd { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sparkline { display: block; max-width: 100%; height: auto; color: var(--ink-strong); }
.sparkline__frame { stroke: var(--line); stroke-width: 1; }
.sparkline__line { stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.sparkline__dot { fill: currentColor; }
.sparkline__break { stroke: var(--ink-2); stroke-width: 1; }

/* --- Narrow screens ---------------------------------------------------- */

@media (max-width: 52rem) {
    .sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 16px 16px; gap: 16px; }
    .brand { margin: 0 -16px; padding-inline: 16px; min-height: 56px; }
    .topbar { position: static; }
    .nav ul { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .nav a { min-height: 40px; padding: 0 12px; border: 1px solid var(--line-2); background: var(--surface-card); }
    .nav__heading { padding: 0; }
    .contact { display: none; }
    .main { padding: 28px 16px 56px; }
    .topbar { padding: 12px 16px; }
    .timeline__when { flex-basis: 100%; }
    .record, .record-head { grid-template-columns: 1fr; }
    .record-head { display: none; }
    .table thead { display: none; }
    .table tr { display: block; border-top: 1px solid var(--line); padding: 8px 0; }
    .table th, .table td { display: block; border: 0; padding: 4px 0; }
    .table td[data-label]::before { content: attr(data-label) " "; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-label); margin-right: .35rem; }
    .site-footer { padding: 1rem 16px; }
}

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