/* CRA Basics — the whole public site's stylesheet. Plain CSS, no framework and no build step. */

/* ---------- Font (self-hosted Inter, variable weight) ---------- */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("/fonts/inter-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("/fonts/inter-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */

:root {
    /* Light and dark in one list: each token is light-dark(light value, dark value). The page follows the
       visitor's system setting; the header toggle forces one (js/theme.js sets data-theme on <html>). */
    color-scheme: light dark;

    --blue: light-dark(#0044aa, #8db3ff);           /* blue as text, links, rules */
    --blue-strong: light-dark(#003388, #b9d0ff);    /* hovered links, emphasised blue text */
    --blue-fill: light-dark(#0044aa, #1557c9);      /* blue as a fill: buttons, switches (a touch brighter on dark) */
    --blue-fill-hover: light-dark(#003388, #0f469f);
    --navy: #003388;
    --band: light-dark(#003388, #0d2f7c);           /* full-width navy bands */
    --pink: #ea4c88;                                /* fills, bars, large display text */
    --pink-deep: light-dark(#c2256a, #ff8db6);      /* pink as small text */
    --pink-soft: #ff8db6;                           /* pink on the navy bands and the footer */
    --surface: light-dark(#ffffff, #0a1126);
    --ink: light-dark(#0f1b3d, #eef2fb);
    --text: light-dark(#33405f, #c3cde4);
    --muted: light-dark(#4a5672, #9eabc9);
    --line: light-dark(#d5dceb, #2b3964);
    --line-soft: light-dark(#e3e8f2, #1e294b);
    --field: light-dark(#c3ccdd, #40507f);
    --tint: light-dark(#f2f6fd, #101a37);
    --tint-strong: light-dark(#e6edfa, #1b2a55);
    --switch-off: light-dark(#aeb8cc, #4a5a86);
    --on-navy: #d5e0f5;
    --footer: light-dark(#0b1638, #050915);
    --red: light-dark(#b4232f, #ff9aa2);
    --red-fill: #b4232f;
    --red-tint: light-dark(#fbeaec, #3a1418);
    --green: light-dark(#17663a, #7fdba6);
    --green-tint: light-dark(#e7f4ec, #10301f);
    --tag-pink-bg: light-dark(#fdeef4, #4a1630);
    --tag-pink-ink: light-dark(#8f1c4f, #ffb3cf);
    --tag-gray-bg: light-dark(#eceff5, #232e4d);

    --radius: 10px;
    --radius-lg: 14px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --header-offset: 4.75rem; /* sticky header height + breathing room for in-page anchors */
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* ---------- Reset ---------- */

*,
::before,
::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0 solid;
}

html {
    line-height: 1.55;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-offset);
}

body {
    font-family: "Inter", system-ui, sans-serif;
    background: var(--surface);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { font-size: inherit; font-weight: inherit; text-wrap: balance; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-strong); }
ol, ul, menu { list-style: none; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
table { border-collapse: collapse; text-indent: 0; }
sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; top: -0.5em; }
textarea { resize: vertical; }
[hidden] { display: none !important; }

button, input, select, textarea {
    font: inherit;
    letter-spacing: inherit;
    color: inherit;
    background: transparent;
}

button { cursor: pointer; }
::placeholder { opacity: 1; color: color-mix(in oklab, currentcolor 55%, transparent); }
::-webkit-search-decoration, ::-webkit-search-cancel-button { -webkit-appearance: none; }

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    inset-block-start: -10rem;
    inset-inline-start: 1rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    border-radius: var(--radius);
    background: var(--blue-fill);
    color: #fff;
    font-weight: 700;

    &:focus { inset-block-start: 0.5rem; color: #fff; }
}

/* The ALTCHA check is invisible: it solves a proof of work when a form is submitted and never shows itself */
altcha-widget { display: none; }

/* ---------- Layout ---------- */

.wrap {
    width: 100%;
    max-width: 75rem;
    margin-inline: auto;
    padding-inline: 1.25rem;

    @media (width >= 48rem) { padding-inline: 2rem; }
}

.blue { color: var(--blue); }
.pink { color: var(--pink-deep); }

.display {
    font-size: clamp(1.75rem, 1.2rem + 2vw, 2.25rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.035em;
}

/* Buttons: rectangles with a small corner */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--blue-fill);
    border-radius: var(--radius);
    background: var(--blue-fill);
    color: #fff;
    font-size: 1.1875rem;
    line-height: 1.3;
    font-weight: 700;
    text-align: center;
    transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease);

    &:hover { border-color: var(--blue-fill-hover); background: var(--blue-fill-hover); color: #fff; }
    &:disabled { opacity: 0.6; cursor: progress; }
    svg { flex: none; width: 1.25rem; height: 1.25rem; }
}

.button--outline {
    border-color: var(--blue);
    background: var(--surface);
    color: var(--blue);

    &:hover { background: var(--tint-strong); border-color: var(--blue); color: var(--blue); }
}

.button--pink {
    border-color: var(--pink);
    background: var(--pink);

    &:hover { border-color: var(--pink-deep); background: var(--pink-deep); }
}

.button--white {
    border-color: #fff;
    background: #fff;
    color: var(--navy);

    &:hover { border-color: var(--tint-strong); background: var(--tint-strong); color: var(--navy); }
}

.button--small { padding: 0.7rem 1.2rem; font-size: 1rem; }
.button--block { display: flex; width: 100%; }

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    inset-block-start: 0;
    z-index: 50;
    border-block-end: 1px solid var(--line-soft);
    background: var(--surface);

    > .wrap {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0 1.5rem;
    }
}

.brand {
    padding-block: 0.8rem;
    font-size: 1.375rem;
    line-height: 1.6;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--blue);

    span { color: var(--pink); }
}

.header-tools { display: flex; align-items: center; gap: 0.5rem; order: 2; @media (width >= 56rem) { order: 3; } }

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid var(--field);
    border-radius: var(--radius);
    color: var(--ink);

    &:hover { border-color: var(--blue); color: var(--blue); }
    svg { width: 1.25rem; height: 1.25rem; }
}

/* The icon shows what a click switches to: a moon while the page is light, a sun while it is dark */
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-toggle__sun { display: block; }
    :root:not([data-theme]) .theme-toggle__moon { display: none; }
}

.nav-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--field);
    border-radius: var(--radius);
    font-weight: 600;

    svg { width: 1.25rem; height: 1.25rem; }
    @media (width >= 56rem) { display: none; }
}

.site-nav {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    padding-block-end: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;

    &.is-open { display: flex; }

    a {
        padding: 0.8rem 0;
        border-block-start: 1px solid var(--line-soft);
        color: var(--ink);

        &:hover { color: var(--blue); }
        &[aria-current="page"] { color: var(--blue); }
    }

    @media (width >= 56rem) {
        display: flex;
        order: 2;
        flex-basis: auto;
        flex-direction: row;
        gap: 1.75rem;
        margin-inline-start: auto;
        padding-block-end: 0;

        a {
            padding: 1.2rem 0 calc(1.2rem - 2px);
            border-block-start: 0;
            border-block-end: 2px solid transparent;

            &[aria-current="page"] { border-block-end-color: var(--blue); }
        }
    }
}

/* ---------- Home: hero and deadlines ---------- */

.hero { background: var(--tint); }

/* Blue space under the deadlines, equal to the space between the buttons and the deadlines above.
   Padding, so that it stays inside the tinted band (a margin would fall outside it). */
.hero > .wrap { padding-block-end: 2.25rem; }

.hero__layout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2.5rem 3.5rem;
    padding-block: clamp(1.75rem, 3.5vw, 3rem) 2rem;
}

.hero__text {
    display: flex;
    flex: 999 1 30rem;
    flex-direction: column;
    gap: 1.2rem;
    min-width: 0;

    h1 {
        font-size: clamp(2.25rem, 1.4rem + 3vw, 3.25rem);
        line-height: 1.03;
        font-weight: 800;
        letter-spacing: -0.04em;
        color: var(--blue);

        span { color: var(--pink); }
    }

    p { max-width: 35rem; font-size: 1.125rem; line-height: 1.5; color: var(--text); }
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero__mascot {
    display: flex;
    flex: 1 1 18rem;
    justify-content: center;
    min-width: 0;

    img { width: 100%; max-width: 19rem; }
}

.deadlines {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.deadline {
    display: flex;
    flex: 1 1 25rem;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 0;
    padding: 1.1rem 1.6rem;

    & + & { flex-grow: 2; flex-basis: 28rem; border-block-start: 1px solid var(--line); }

    @media (width >= 53rem) { & + & { border-block-start: 0; border-inline-start: 1px solid var(--line); } }

    h2 {
        font-size: 0.875rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--muted);
    }
}

.deadline__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
.deadline__date { font-size: 0.875rem; font-weight: 600; color: var(--muted); }

.deadline__value {
    font-size: clamp(1.25rem, 1rem + 1vw, 1.5rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;

    b { font-weight: inherit; color: var(--pink-deep); }
    small { font-size: 0.6em; font-weight: 600; letter-spacing: 0; color: var(--muted); }
}

.deadline--passed .deadline__value { color: var(--blue); }

.deadline__progress {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.9rem;
    font-size: 0.8125rem;
    color: var(--muted);

    output { font-weight: 700; color: var(--ink); }

    progress {
        flex: 1 1 10rem;
        height: 8px;
        overflow: hidden;
        appearance: none;
        border-radius: 4px;
        background: var(--line-soft);

        &::-webkit-progress-bar { background: var(--line-soft); }
        &::-webkit-progress-value { background: var(--pink); }
        &::-moz-progress-bar { background: var(--pink); }
    }
}

.countdown-status { padding: 1.1rem 1.6rem; font-weight: 600; color: var(--muted); &.is-error { color: var(--red); } }

/* ---------- Home: sections ---------- */

.section { padding-block-start: clamp(3rem, 5.5vw, 4.25rem); }
.section--last { padding-block-end: clamp(3rem, 5.5vw, 4.25rem); }

.explainers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
    gap: 2rem 3.5rem;

    h2 { margin-block-end: 0.75rem; font-size: 1.625rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.025em; }
    p { color: var(--text); }
    p + p { margin-block-start: 0.9rem; }
}

/* The five principles: a ruled, numbered list */
.principles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(20.5rem, 100%), 1fr));
    margin-block-start: 2rem;
    border-block-start: 2px solid var(--ink);

    > * { border-block-end: 1px solid var(--line); }
}

.principle {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.35rem 1.5rem 1.5rem 0;

    .principle__number { font-size: 1.75rem; line-height: 1; font-weight: 800; letter-spacing: -0.03em; color: var(--pink); }
    h3 { font-size: 1.1875rem; line-height: 1.25; font-weight: 700; color: var(--blue); }

    ul {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        padding-inline-start: 1.2rem;
        font-size: 0.9375rem;
        color: var(--text);
        list-style: disc;
    }

    li::marker { color: var(--pink); }
    strong { font-weight: 600; color: var(--ink); }
}

.principles__cta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.35rem 1.5rem;
    background: var(--blue-fill);
    color: #fff;
    transition: background-color 150ms var(--ease);

    &:hover { background: var(--blue-fill-hover); color: #fff; }
    strong { font-size: 1.3125rem; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
    span { display: flex; align-items: center; gap: 0.5rem; font-size: 1rem; font-weight: 700; }
    svg { width: 1.125rem; height: 1.125rem; }
}

.section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-block-end: 1.75rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(20.5rem, 100%), 1fr));
    gap: 1rem;
}

.card-link {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1.2rem 1.35rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    color: var(--text);
    font-size: 0.9375rem;
    transition: border-color 150ms var(--ease), background-color 150ms var(--ease);

    &:hover { border-color: var(--blue); background: var(--tint); color: var(--text); }
    strong { font-size: 1.125rem; line-height: 1.25; font-weight: 700; color: var(--blue); }
}

.duo { display: flex; flex-wrap: wrap; gap: 3rem; }

.about {
    display: flex;
    flex: 999 1 30rem;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.75rem;
    min-width: 0;

    img { flex: 0 1 11.5rem; width: 11.5rem; }
    > div { flex: 1 1 16rem; min-width: 0; }
    h2 { margin-block-end: 0.6rem; font-size: 1.625rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.025em; }
    p { color: var(--text); }
    p + p { margin-block-start: 0.75rem; }
    a { font-weight: 700; }
    a.pink:hover { color: var(--blue); }
}

.contact {
    flex: 1 1 22rem;
    min-width: 0;
    padding: 1.4rem 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--tint);

    h2 { margin-block-end: 0.4rem; font-size: 1.3125rem; font-weight: 800; letter-spacing: -0.02em; }
    > p { margin-block-end: 1rem; font-size: 0.9375rem; color: var(--text); }
    form { display: flex; flex-direction: column; gap: 0.7rem; }
}

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

.field-group { display: flex; flex-direction: column; gap: 0.4rem; label { font-size: 0.875rem; font-weight: 600; } }

.field {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--field);
    border-radius: var(--radius);
    background: var(--surface);

    &:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in oklab, var(--blue) 25%, transparent); }
}

select.field { width: auto; }

.switch {
    appearance: none;
    position: relative;
    flex: none;
    width: 48px;
    height: 28px;
    border-radius: 14px;
    background: var(--switch-off);
    cursor: pointer;
    transition: background-color 0.2s;

    &::before {
        content: "";
        position: absolute;
        inset-block-start: 3px;
        inset-inline-start: 3px;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: #fff;
        transition: translate 0.2s;
    }

    &:checked { background: var(--blue-fill); }
    &:checked::before { translate: 20px 0; }
}

.notice {
    padding: 0.9rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 600;

    &[data-state="error"] { background: var(--red-tint); color: var(--red); }
    &[data-state="success"] { background: var(--green-tint); color: var(--green); }
}

/* ---------- Maturity evaluation page ---------- */

.page-tinted { background: var(--tint); }

.page-head {
    max-width: 47.5rem;
    padding-block: clamp(1.5rem, 3vw, 2.25rem) 1.5rem;

    h1 {
        font-size: clamp(1.875rem, 1.3rem + 2vw, 2.5rem);
        line-height: 1.05;
        font-weight: 800;
        letter-spacing: -0.04em;
        color: var(--blue);
    }

    p { margin-block-start: 0.5rem; font-size: 1.0625rem; line-height: 1.5; color: var(--text); }
}

.evaluation { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.5rem; padding-block-end: clamp(3.5rem, 7vw, 6rem); }

.panel {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.questionnaire {
    flex: 999 1 35rem;

    > h2 { padding: 0.95rem 1.5rem; border-block-end: 1px solid var(--line); font-size: 1.125rem; font-weight: 800; letter-spacing: -0.02em; }
}

.question {
    padding: 0.7rem 1.5rem;
    border-block-end: 1px solid var(--line-soft);

    label { font-weight: 600; }
    .question__number { margin-inline-end: 0.6rem; font-weight: 800; color: var(--pink-deep); }
    em { font-size: 0.75rem; font-weight: 400; color: var(--muted); }
}

.question__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.25rem; > label { flex: 1 1 16rem; } }
.question--stacked { display: flex; flex-direction: column; gap: 0.4rem; }

.question__more {
    margin-block-start: 1rem;
    padding-block-start: 1rem;
    border-block-start: 1px dashed var(--line);

    label { font-size: 0.9375rem; }
    > label { display: block; margin-block-end: 0.4rem; }
}

.questionnaire__end { display: flex; flex-direction: column; gap: 0.75rem; padding: 0.9rem 1.5rem 1.25rem; }

.results { flex: 1 1 23.75rem; overflow: hidden; }

.results__score {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1.25rem 1.5rem;
    background: var(--band);
    color: #fff;

    h2 { font-size: 1.125rem; font-weight: 800; letter-spacing: -0.02em; }

    .results__number {
        font-size: 3rem;
        line-height: 1;
        font-weight: 800;
        letter-spacing: -0.04em;

        small { font-size: 1.375rem; font-weight: 600; letter-spacing: 0; color: var(--on-navy); }
    }

    progress {
        width: 100%;
        height: 8px;
        overflow: hidden;
        appearance: none;
        border-radius: 4px;
        background: #2a55a8;

        &::-webkit-progress-bar { background: #2a55a8; }
        &::-webkit-progress-value { background: var(--pink); }
        &::-moz-progress-bar { background: var(--pink); }
    }
}

.results__text {
    padding: 0.25rem 1.5rem 1.35rem;
    font-size: 0.9375rem;
    color: var(--text);

    h4 { margin-block: 1.25rem 0.4rem; padding-block-start: 1.25rem; border-block-start: 1px solid var(--line-soft); font-size: 1rem; font-weight: 700; color: var(--blue); }
    h4:first-child { display: none; } /* the "Score: n/100" line: the number above already shows it */
    h4:first-child + h4, .results__placeholder + h4 { border-block-start: 0; padding-block-start: 0; }
    p + p { margin-block-start: 0.6rem; }
    .results__placeholder { padding-block-start: 1.25rem; }
    .results__error { padding-block-start: 1.25rem; color: var(--red); font-weight: 600; }
}

/* ---------- Resource pages ---------- */

.resource-layout { display: flex; flex-wrap: wrap; gap: 2rem 3.5rem; padding-block: 1.75rem clamp(3rem, 6vw, 4.5rem); }

.resource-nav {
    display: flex;
    flex: 1 1 15rem;
    flex-direction: column;
    gap: 0.25rem;
    align-self: flex-start;
    order: 2; /* after the article on a phone, beside it on a wide screen */
    min-width: 0;

    @media (width >= 60rem) { order: 0; }

    > p { margin-block-end: 0.5rem; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

    a {
        padding: 0.6rem 0.9rem;
        border-radius: 8px;
        font-size: 0.9375rem;
        font-weight: 600;
        color: var(--ink);

        &:hover { background: var(--tint); color: var(--blue); }
        &[aria-current="page"] { background: var(--tint); font-weight: 700; color: var(--blue); }
    }
}

.resource {
    display: flex;
    flex: 999 1 40rem;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;

    > h1 {
        font-size: clamp(1.75rem, 1.3rem + 2vw, 2.375rem);
        line-height: 1.08;
        font-weight: 800;
        letter-spacing: -0.035em;
        color: var(--blue);
    }

    > .lead { max-width: 45rem; font-size: 1.0625rem; line-height: 1.5; color: var(--text); }
}

.breadcrumb { font-size: 0.875rem; color: var(--muted); }

.prose {
    max-width: 45rem;
    color: var(--text);

    > * + * { margin-block-start: 1rem; }
    strong { font-weight: 700; color: var(--ink); }
    a { font-weight: 600; text-decoration: underline; text-underline-offset: 0.15em; }
}

/* Numbered steps: the big-number list used by the priorities, the roadmap and the requirements */
.steps {
    max-width: 50rem;
    border-block-start: 2px solid var(--ink);
    counter-reset: step;

    li {
        display: grid;
        grid-template-columns: 3rem minmax(0, 1fr);
        gap: 0.25rem 1rem;
        padding-block: 1rem;
        border-block-end: 1px solid var(--line);
        color: var(--text);
        counter-increment: step;

        &::before { content: counter(step); grid-row: span 2; font-size: 1.75rem; line-height: 1; font-weight: 800; letter-spacing: -0.03em; color: var(--pink); }
    }

    strong { display: block; font-size: 1.0625rem; line-height: 1.3; font-weight: 700; color: var(--blue); }
    span { grid-column: 2; }
    a { font-weight: 600; text-decoration: underline; text-underline-offset: 0.15em; }
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.75rem;
    font-size: 0.875rem;
    font-weight: 600;

    li { display: flex; align-items: center; gap: 0.5rem; }
}

.mark {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 6px;

    svg { width: 0.8rem; height: 0.8rem; }
}

.mark--recommended { background: var(--blue-fill); color: #fff; }
.mark--possible { border: 2px solid var(--muted); color: var(--muted); }
.mark--forbidden { background: var(--red-fill); color: #fff; }

.table-scroll { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }

.assurance {
    width: 100%;
    min-width: 47.5rem; /* scrolls sideways on small screens */
    font-size: 0.9375rem;
    text-align: start;

    thead tr { background: var(--tint); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text); }
    th, td { padding: 0.85rem 0.75rem; text-align: center; }
    thead th { padding-block: 1rem; font-weight: inherit; }
    th:first-child { width: 40%; padding-inline: 1.25rem; text-align: start; }
    tbody tr { border-block-start: 1px solid var(--line); }
    tbody th { font-weight: 400; vertical-align: top; color: var(--text); }
    tbody th strong { display: block; margin-block-end: 0.4rem; font-size: 1.0625rem; font-weight: 700; color: var(--ink); }
    tbody th em { display: block; margin-block-start: 0.4rem; font-size: 0.875rem; }
    td { color: var(--text); }
    td[data-level="recommended"] { background: var(--tint-strong); font-weight: 700; color: var(--blue); }
    td[data-level="forbidden"] { font-weight: 600; color: var(--red); }
    td small { display: block; margin-block-start: 0.25rem; font-size: 0.75rem; font-weight: 500; color: var(--text); }
}

.next-step {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-block-start: 1rem;
    padding: 1.4rem 1.6rem;
    border-radius: var(--radius-lg);
    background: var(--band);
    color: #fff;

    p { flex: 999 1 20rem; font-size: 1.25rem; line-height: 1.25; font-weight: 800; letter-spacing: -0.02em; }
    div { display: flex; flex-wrap: wrap; gap: 0.75rem; }
}

.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding-block-start: 1.5rem;
    border-block-start: 1px solid var(--line);
    font-weight: 700;

    a { display: flex; align-items: center; gap: 0.5rem; }
    a:only-child:last-child { margin-inline-start: auto; }
    svg { flex: none; width: 1.125rem; height: 1.125rem; }
}

/* Slides */
.slides { display: flex; flex-direction: column; gap: 1rem; max-width: 50rem; }

.slides__stage img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-lg); }

.slides__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;

    > div { display: flex; align-items: center; gap: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; }

    button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        border: 2px solid var(--blue);
        border-radius: var(--radius);
        color: var(--blue);

        &:hover:not(:disabled) { background: var(--tint-strong); }
        &:disabled { border-color: var(--field); color: var(--field); cursor: not-allowed; }
        svg { width: 1.25rem; height: 1.25rem; }
    }
}

.slides__meta { font-size: 0.9375rem; color: var(--muted); }

/* Comments on prEN 40000-1-3 */
.comments { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }

.comments__head {
    padding: 1.5rem;
    border-block-end: 1px solid var(--line);

    search { display: flex; flex-wrap: wrap; gap: 0.75rem; }
    input { flex: 999 1 16rem; }
    select { flex: 1 1 11rem; }
}

.comments__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-block-start: 1rem;
    font-size: 0.875rem;
    color: var(--muted);

    output { font-weight: 700; color: var(--ink); }
    ul { display: flex; flex-wrap: wrap; gap: 0.5rem; }
}

.tag {
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;

    &[data-type="ge"] { background: var(--tag-pink-bg); color: var(--tag-pink-ink); }
    &[data-type="te"] { background: var(--tint-strong); color: var(--blue-strong); }
    &[data-type="ed"] { background: var(--tag-gray-bg); color: var(--text); }
}

.comments__scroll {
    position: relative;
    max-height: 43.75rem;
    overflow: auto;

    table { width: 100%; text-align: start; font-size: 0.875rem; }
    thead { position: sticky; inset-block-start: 0; background: var(--tint); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text); }
    th { padding: 0.8rem 1.25rem; font-weight: inherit; text-align: start; }
    tbody tr { border-block-start: 1px solid var(--line-soft); vertical-align: top; &:hover { background: var(--tint); } }
    td { padding: 1rem 1.25rem; }
    td:nth-child(1) { font-weight: 600; white-space: nowrap; }
    td:nth-child(3) { min-width: 18rem; color: var(--text); }
    td:nth-child(4) { min-width: 18rem; font-weight: 500; color: var(--blue-strong); }
    td small { display: block; font-size: 0.75rem; font-weight: 400; color: var(--muted); }
}

.comments__empty { padding: 3rem; text-align: center; color: var(--muted); }

/* ---------- Privacy policy and legal notice ---------- */

.document {
    max-width: 50rem;
    padding-block: clamp(2.25rem, 5vw, 3.5rem) clamp(3.5rem, 7vw, 6rem);
    color: var(--text);

    h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.375rem); line-height: 1.08; font-weight: 800; letter-spacing: -0.035em; color: var(--blue); }
    .document__updated { margin-block-start: 0.6rem; font-size: 0.875rem; color: var(--muted); }
    h2 { margin-block: 2.5rem 0.75rem; padding-block-start: 1.5rem; border-block-start: 1px solid var(--line); font-size: 1.375rem; line-height: 1.25; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
    p + p, p + ul, ul + p, h1 + p + p { margin-block-start: 1rem; }
    .document__updated + p { margin-block-start: 1.75rem; }
    ul { display: flex; flex-direction: column; gap: 0.5rem; padding-inline-start: 1.25rem; list-style: disc; }
    ul ul { margin-block-start: 0.5rem; list-style: circle; }
    li::marker { color: var(--pink); }
    strong { font-weight: 700; color: var(--ink); }
    a { font-weight: 600; text-decoration: underline; text-underline-offset: 0.15em; }
}

/* ---------- Footer ---------- */

.site-footer {
    background: var(--footer);
    color: #c9d3ea;

    > .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-block: 3rem; }
    .brand { padding: 0; color: #fff; span { color: var(--pink-soft); } }
    p { margin-block-start: 0.6rem; max-width: 26rem; font-size: 0.875rem; }
    p a { font-weight: 700; color: #fff; text-decoration: underline; text-underline-offset: 0.15em; }
    nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; align-content: flex-start; max-width: 30rem; font-size: 0.9375rem; font-weight: 600; }
    nav a { color: #fff; &:hover { color: var(--pink-soft); } }
}

/* ---------- Preferences ---------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    ::before,
    ::after {
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
        animation-duration: 0.01ms !important;
    }
}

@media print {
    .site-header, .site-footer, .nav-toggle, .skip-link, .resource-nav, .next-step, .pager { display: none; }
    .comments__scroll { max-height: none; overflow: visible; }
}
