/*
 * CodeRoll. An empty screen and one square; the square opens into the audit request form.
 * Brand: ink #0e101e, accent #ff5b00; Space Mono (titles), Gilroy (text), Roboto Mono (small labels).
 */

@font-face {
    font-family: "Space Mono";
    src: url("../fonts/SpaceMono-Bold.ttf") format("truetype");
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Gilroy";
    src: url("../fonts/Gilroy-Light.ttf") format("truetype");
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: "Roboto Mono";
    src: url("../fonts/RobotoMono-Medium.ttf") format("truetype");
    font-weight: 500;
    font-display: swap;
}

:root {
    color-scheme: dark;

    --ink: #0e101e;
    --ink-raised: #141729;
    --line: #272b42;
    --paper: #ece9e4;
    --muted: #8f94a8;
    --accent: #ff5b00;
    --accent-soft: rgba(255, 91, 0, 0.1);
    --ok: #4ad99a;
    --error: #ff6b57;

    --font-head: "Space Mono", "Roboto Mono", ui-monospace, monospace;
    --font-text: "Gilroy", -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "Roboto Mono", ui-monospace, "SF Mono", Menlo, monospace;

}

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

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

body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-text);
    font-weight: 300;
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, p, fieldset {
    margin: 0;
}

img, svg {
    display: block;
}

a {
    color: inherit;
    text-decoration-color: var(--line);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a:hover {
    color: #ffffff;
    text-decoration-color: var(--accent);
}

::selection {
    background: var(--accent);
    color: var(--ink);
}

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

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

/* Top bar (privacy and error pages) and the language switch ---------------- */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px clamp(16px, 4vw, 32px);
}

.topbar--bare {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1;
}

.brand img {
    width: 96px;
    height: auto;
}

.lang {
    display: flex;
    gap: 2px;
}

.lang__link {
    display: block;
    padding: 6px;
    filter: grayscale(1);
    opacity: 0.35;
    transition: opacity 150ms ease, filter 150ms ease;
}

.lang__link:hover,
.lang__link:focus-visible,
.lang__link.is-active {
    filter: none;
    opacity: 1;
}

.flag {
    width: 21px;
    height: 14px;
    border-radius: 1px;
}

/* Icons (templates/site/_icons.html.twig) --------------------------------- */

.icon {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* The launcher: envelope square with three small tiles under it ------------ */

.page--home main {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding-bottom: 33px; /* the fixed bottom bar */
}

.launcher {
    display: grid;
    justify-items: center;
    gap: 18px;
    transition: opacity 150ms ease;
    /* "backwards": the fade-in only affects the first load. With "both" the finished animation kept
       holding opacity, so Chromium never hid the launcher while Safari did (inconsistent behaviour). */
    animation: appear 700ms ease 150ms backwards;
}

/* While a window is open it stands in for the launcher. Set by site.js on beforetoggle/toggle and
   removed the moment the last window closes. The previous :has() rule came back with a 380 ms delay,
   which left an empty screen after closing a window in Safari. */
.launcher.is-covered {
    opacity: 0;
    transition: none;
}

@keyframes appear {
    from { opacity: 0; }
}

.square {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: var(--accent);
    color: var(--ink);
    cursor: pointer;
    transition: transform 200ms ease;
}

.square .icon {
    width: 28px;
    height: 28px;
}

.square:hover {
    transform: scale(1.06);
}

.square:focus-visible {
    outline-offset: 6px;
}

.tile {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: color 150ms ease, border-color 150ms ease;
}

.tile:hover {
    border-color: #4a4f68;
    color: #ffffff;
}

.tile .icon {
    width: 18px;
    height: 18px;
}

/* The sheet: a dark card that fades in with a small lift, and fades out quickly. ----- */

.sheet {
    position: fixed;
    inset: 0;
    width: min(520px, calc(100vw - 32px));
    height: fit-content;
    max-height: calc(100svh - 32px);
    margin: auto;
    padding: 0;
    /* Steps slide sideways when they change; clip that instead of showing a horizontal scrollbar. */
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--ink-raised);
    color: var(--paper);
    opacity: 0;
    transform: translateY(10px);
    transition:
        opacity 150ms ease,
        transform 150ms ease,
        overlay 150ms allow-discrete,
        display 150ms allow-discrete;
}

.sheet:popover-open {
    opacity: 1;
    transform: none;
    transition:
        opacity 220ms ease,
        transform 220ms cubic-bezier(0.22, 0.9, 0.24, 1),
        overlay 220ms allow-discrete,
        display 220ms allow-discrete;
}

@starting-style {
    .sheet:popover-open {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Closing: the dimmed background clears quickly so the home screen is back at once. */
.sheet::backdrop {
    background: rgba(8, 9, 18, 0);
    transition:
        background-color 180ms ease,
        overlay 180ms allow-discrete,
        display 180ms allow-discrete;
}

.sheet:popover-open::backdrop {
    background: rgba(8, 9, 18, 0.55);
    transition:
        background-color 220ms ease,
        overlay 220ms allow-discrete,
        display 220ms allow-discrete;
}

@starting-style {
    .sheet:popover-open::backdrop {
        background: rgba(8, 9, 18, 0);
    }
}

/* The "about" windows: wider frame (see "About us" below for the two windows inside). */
.sheet--note {
    width: min(600px, calc(100vw - 32px));
}

/* Higher specificity than .sheet__bar, which is declared further down. */
.sheet__bar.sheet__bar--file {
    padding: 10px 12px 10px 20px;
    border-bottom: 1px solid var(--line);
}

.sheet__bar--file .sheet__close {
    margin-left: auto;
}

.sheet__file {
    color: var(--muted);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.8125rem;
}

.sheet__file:focus {
    outline: none;
}

/* "About us": two windows side by side — a character sheet with a skill tree, and our services. */

/* The popover itself is only a transparent frame; each window has its own surface and entrance. */
.sheet.sheet--duo,
.sheet.sheet--duo:popover-open {
    width: min(1000px, calc(100vw - 32px));
    border: 0;
    border-radius: 0;
    background: transparent;
    transform: none;
}

.sheet.sheet--duo {
    opacity: 0;
    transition:
        opacity 160ms ease,
        overlay 160ms allow-discrete,
        display 160ms allow-discrete;
}

.sheet.sheet--duo:popover-open {
    display: flex;
    gap: 16px;
    align-items: stretch;
    overflow: visible; /* side by side it never needs to scroll; auto would clip borders and the tooltip */
    opacity: 1;
}

@starting-style {
    .sheet.sheet--duo:popover-open {
        opacity: 1;
        transform: none;
        background: transparent;
    }
}

.sheet.sheet--duo > * {
    opacity: 1;
    transition: none;
}

.sheet.sheet--duo:popover-open .window {
    animation: window-in 420ms cubic-bezier(0.22, 0.9, 0.24, 1) both;
}

.sheet.sheet--duo:popover-open .window--second {
    animation-delay: 110ms;
}

@keyframes window-in {
    from { opacity: 0; transform: translateY(14px) scale(0.94); }
}

.window {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--ink-raised);
}

.window:first-child {
    z-index: 1; /* its tooltip must paint over the services window */
    flex-grow: 1.15;
}

.window__bar {
    display: flex;
    align-items: center;
    min-height: 57px;
    padding: 10px 12px 10px 20px;
    border-bottom: 1px solid var(--line);
}

.window__bar .sheet__close {
    margin-left: auto;
}

.window__title {
    color: var(--muted);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.8125rem;
}

.window__title:focus {
    outline: none;
}

/* Skill tree: root on top, three branches joined by lines, square nodes and 1–5 square pips. */
.tree {
    --root-size: 44px;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    padding: 30px 24px 28px;
    text-align: center;
}

.tree__root {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 2px;
    padding-bottom: 30px;
}

/* Stem from the root down to the branch bar. */
.tree__root::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 1px;
    height: 22px;
    background: var(--line);
}

.tree__node {
    display: block;
    width: 14px;
    height: 14px;
    margin: 0 auto 10px;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--ink);
}

.tree__mark {
    display: block;
    width: var(--root-size);
    height: var(--root-size);
    margin: 0 auto 10px;
    filter: drop-shadow(0 0 10px rgba(255, 149, 0, 0.35));
}

.tree__name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.25rem;
    color: #ffffff;
}

.tree__level {
    margin-top: 6px;
    padding: 2px 10px;
    border: 1px solid var(--accent);
    border-radius: 2px;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.tree__level-hint {
    color: var(--muted);
}

.tree__branches {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Horizontal bar joining the three branches (from the first column's centre to the last one's). */
.tree__branches::before {
    content: "";
    position: absolute;
    top: 0;
    left: calc((100% - 24px) / 6);
    right: calc((100% - 24px) / 6);
    height: 1px;
    background: var(--line);
}

.skill {
    position: relative;
    padding-top: 22px;
}

/* Drop from the bar to each skill node. */
.skill::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 22px;
    background: var(--line);
}

.skill--max .tree__node {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft), 0 0 18px rgba(255, 91, 0, 0.45);
}

.skill--on .tree__node {
    border-color: var(--accent);
    background: var(--accent);
}

.skill__name {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
}

.skill--off .skill__name {
    color: var(--paper);
}

.skill__pips {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-top: 8px;
}

.pip {
    width: 9px;
    height: 9px;
    border: 1px solid var(--line);
    border-radius: 1px;
}

.pip.is-on {
    border-color: var(--accent);
    background: var(--accent);
}

.skill--off .pip.is-on {
    opacity: 0.6;
}

.skill__rank {
    display: block;
    margin-top: 6px;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.skill--off .skill__rank {
    color: var(--muted);
}

/* Perks: a left-aligned list centred under its node; wrapped lines hang after the "+". */
.skill__perks {
    display: inline-grid;
    gap: 4px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.35;
    text-align: left;
}

.skill__perks li {
    padding-left: 1.1em;
    text-indent: -1.1em;
}

.skill__perks li::before {
    content: "+ ";
    color: var(--accent);
    font-family: var(--font-mono);
}

/* (i) next to "other languages" with a tooltip: hover, keyboard focus, or tap (site.js). */
.skill__head {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* The tooltip is anchored to the (i) itself, so its arrow points at the icon. */
.hint-wrap {
    position: relative;
    display: inline-grid;
}

.hint {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: help;
}

.hint:hover,
.hint:focus-visible,
.hint[aria-expanded="true"] {
    color: var(--accent);
}

.hint .icon {
    width: 16px;
    height: 16px;
}

/* The PDF icon next to a service title is a link to the sample report, not a help button. */
.hint--link {
    cursor: pointer;
}

.hint__bubble {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    z-index: 2;
    width: max-content;
    max-width: min(240px, calc(100vw - 72px));
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--ink);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    color: var(--paper);
    font-family: var(--font-text);
    font-weight: 300;
    font-size: 0.875rem;
    line-height: 1.45;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 4px);
    transition: opacity 150ms ease, transform 150ms ease, visibility 150ms;
}

/* Opens above the (i), so it never slides under the next window or out of the scroll area. */
.hint__bubble::before {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 10px;
    height: 10px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--ink);
    transform: translateX(-50%) rotate(45deg);
}

.hint:focus-visible + .hint__bubble,
.hint[aria-expanded="true"] + .hint__bubble {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* Hover only with a real pointer: on touch screens a hover rule makes the first tap show the bubble
   instead of following the link (iOS). There the (i) toggles via aria-expanded and the PDF opens at once. */
@media (hover: hover) {
    .hint:hover + .hint__bubble {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0);
    }
}

/* Services: square marker, name, one sentence and the result. */
.services {
    display: grid;
    gap: 18px;
    margin: 0;
    padding: 24px 24px 20px;
    list-style: none;
}

.service {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    column-gap: 14px;
}

.service > :not(.service__mark) {
    grid-column: 2;
}

.service__mark {
    grid-row: 1;
    width: 10px;
    height: 10px;
    margin-top: 0.45em;
    border-radius: 1px;
    background: var(--accent);
}

.service__head {
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.service__title {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.9375rem;
    color: #ffffff;
}

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

.service__result {
    margin-top: 2px;
    color: var(--paper);
    font-size: 0.875rem;
}

.service__result-label {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.terms {
    margin: auto 0 0;
    padding: 16px 24px;
    border-top: 1px solid var(--line);
}

.terms__item {
    display: inline-block;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 2px;
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 0.71875rem;
}

/* Below ~1000 px the windows stack and the frame scrolls. */
@media (max-width: 1000px) {
    .sheet.sheet--duo:popover-open {
        flex-direction: column;
        overflow: auto;
        width: min(560px, calc(100vw - 32px));
    }

    .window:first-child {
        flex-grow: 0;
    }

    .window {
        flex: 0 0 auto;
    }
}

/* Phones: the tree turns vertical, with the line on the left. */
@media (max-width: 600px) {
    .tree {
        padding: 22px 20px 20px;
        text-align: left;
    }

    .tree {
        --root-size: 36px;
    }

    .tree__root {
        justify-items: start;
        min-height: var(--root-size);
        padding-bottom: 18px;
        padding-left: calc(var(--root-size) + 12px);
    }

    .tree__root .tree__mark {
        position: absolute;
        top: 0;
        left: 0;
        margin: 0;
    }

    /* Trunk from the centre of the mark down to the branches. */
    .tree__root::after {
        top: var(--root-size);
        left: calc(var(--root-size) / 2);
        height: auto;
    }

    .tree__branches {
        grid-template-columns: 1fr;
        gap: 18px;
        padding-left: calc(var(--root-size) / 2);
    }

    /* Vertical tree: each branch draws its own segment of the trunk (the last one stops at its node). */
    .tree__branches::before {
        display: none;
    }

    .skill {
        padding: 0 0 0 30px;
    }

    .skill::after {
        content: "";
        position: absolute;
        top: -18px;
        bottom: 0;
        left: 0;
        width: 1px;
        background: var(--line);
    }

    .skill:last-child::after {
        bottom: auto;
        height: 25px;
    }

    .skill::before {
        top: 7px;
        left: 0;
        width: 20px;
        height: 1px;
    }

    .skill .tree__node {
        position: absolute;
        top: 0;
        left: 20px;
        margin: 0;
        transform: translateX(-50%);
    }

    .skill__pips {
        justify-content: flex-start;
    }

    .services {
        padding: 20px 20px 16px;
    }

    .terms {
        padding: 14px 20px;
    }

}

.sheet__person {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 16px;
    padding: 18px 20px 20px;
    border-top: 1px solid var(--line);
}

.sheet__photo {
    width: 56px;
    height: 56px;
    border-radius: 2px;
    object-fit: cover;
}

.sheet__name {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.9375rem;
    color: #ffffff;
}

.sheet__role {
    display: block;
    color: var(--muted);
    font-size: 0.875rem;
}

.sheet__person .button {
    margin-left: auto;
}

.sheet__bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px 0 28px;
}

.sheet__brand {
    width: 84px;
    height: auto;
}

.sheet__progress {
    margin-left: auto;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.sheet__close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.sheet__close:hover {
    color: #ffffff;
}

.sheet__close .icon {
    width: 18px;
    height: 18px;
}

.sheet__close:only-child {
    margin-left: auto;
}

/* Steps ------------------------------------------------------------------- */

.steps__trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.step {
    min-width: 0;
    padding: 28px 28px 24px;
    border: 0;
}

.steps:not(.is-stepped) .step + .step {
    border-top: 1px solid var(--line);
}

.steps.is-stepped .step:not(.is-current) {
    display: none;
}

.steps.is-stepped .step.is-current {
    animation: step-in 260ms ease both;
}

.steps.is-stepped.is-going-back .step.is-current {
    animation-name: step-in-back;
}

@keyframes step-in {
    from { opacity: 0; transform: translateX(14px); }
}

@keyframes step-in-back {
    from { opacity: 0; transform: translateX(-14px); }
}

.steps:not(.is-stepped) [data-next],
.steps:not(.is-stepped) [data-back] {
    display: none;
}

/* site.js gives all steps one height; the buttons stay at the bottom of each. */
.steps.is-stepped .step.is-current {
    display: flex;
    flex-direction: column;
}

.steps.is-stepped .step__nav {
    margin-top: auto;
    padding-top: 28px;
}

.step__title {
    margin-bottom: 20px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.375rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.step__title:focus {
    outline: none;
}

.step__note {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.9375rem;
}

.step__legal {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.55;
}

.step__nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 28px;
}

.step--sent .flash {
    margin-top: 0;
    padding: 0;
    border: 0;
    background: none;
}

/* Step 1 choices: two independent square tiles ------------------------------ */

.choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.choice {
    position: relative;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    aspect-ratio: 5 / 4;
    border: 1px solid var(--line);
    border-radius: 3px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.choice:hover {
    border-color: #3a3f5c;
    color: var(--paper);
}

.choice > .icon {
    width: 34px;
    height: 34px;
    stroke-width: 1.6;
}

.choice__label {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
}

/* The real checkbox stays focusable and clickable through its label, but invisible. */
.choice__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.choice__mark {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid var(--line);
    border-radius: 2px;
    color: transparent;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.choice__mark .icon {
    width: 14px;
    height: 14px;
    stroke-width: 2.6;
}

.choice:has(.choice__input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.choice:has(.choice__input:checked) .choice__mark {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--ink);
}

.choice:has(.choice__input:focus-visible) {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.choices__error {
    min-height: 1.5em;
    margin-top: 10px;
    color: var(--error);
    font-size: 0.9375rem;
}

/* Fields ------------------------------------------------------------------ */

.field {
    display: grid;
    gap: 8px;
}

.field + .field {
    margin-top: 18px;
}

.field__label {
    font-size: 0.9375rem;
}

.field__hint {
    color: var(--muted);
}

.field__hint::before { content: "("; }
.field__hint::after { content: ")"; }

.field__input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--ink);
    color: #ffffff;
    font: inherit;
    font-size: 1rem;
}

.field__input::placeholder {
    color: #5d627a;
}

.field__input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

textarea.field__input {
    min-height: 96px;
    resize: vertical;
}

/* Buttons and messages ---------------------------------------------------- */

.button {
    padding: 12px 22px;
    border: 0;
    border-radius: 2px;
    background: var(--accent);
    color: var(--ink);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.9375rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.button:hover {
    background: #ff7a2e;
}

.button[disabled] {
    opacity: 0.6;
    cursor: progress;
}

.link-button {
    padding: 8px 0;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.9375rem;
    cursor: pointer;
}

.link-button:hover {
    color: #ffffff;
}

.flash {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-left: 2px solid;
    background: var(--ink);
    font-size: 0.9375rem;
}

.flash--success { border-color: var(--ok); }
.flash--error { border-color: var(--error); }

/* reCAPTCHA v3 badge hidden; the required notice is in .step__legal. */
.grecaptcha-badge {
    visibility: hidden;
}

/* Privacy policy ------------------------------------------------------------ */

.prose {
    max-width: calc(68ch + 2 * 24px);
    margin: 0 auto;
    padding: clamp(24px, 6vw, 64px) 24px 64px;
}

.prose h1 {
    font-family: var(--font-head);
    font-size: clamp(1.625rem, 4vw, 2.125rem);
    line-height: 1.2;
    color: #ffffff;
}

.prose__meta {
    margin-top: 8px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.prose h2 {
    margin-top: 36px;
    font-family: var(--font-head);
    font-size: 1.0625rem;
    color: #ffffff;
}

.prose p,
.prose ul {
    margin-top: 12px;
}

.prose ul {
    display: grid;
    gap: 10px;
    padding: 0;
    list-style: none;
}

.prose li {
    position: relative;
    padding-left: 20px;
}

.prose li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.75em;
    width: 8px;
    height: 1px;
    background: var(--accent);
}

.prose strong {
    font-weight: 300;
    color: #ffffff;
}

/* Bottom bar: privacy policy and e-mail, nothing else ------------------------ */

.bottombar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 28px;
    padding: 8px 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.bottombar a {
    text-decoration: none;
}

.page--home .bottombar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
}

/* Error pages --------------------------------------------------------------- */

.page--center main {
    display: grid;
    place-items: center;
    min-height: calc(100svh - 160px);
    padding: 24px;
    text-align: center;
}

.error__code {
    font-family: var(--font-head);
    font-size: clamp(3.5rem, 12vw, 6rem);
    line-height: 1;
    color: var(--accent);
}

.error__title {
    margin-top: 16px;
    font-family: var(--font-head);
    font-size: 1.25rem;
    color: #ffffff;
}

.error p:not(.error__code) {
    margin-top: 8px;
    color: var(--muted);
}

.error p:last-child {
    margin-top: 24px;
}

/* Narrow screens: tighter sheet so step 1 fits a phone without scrolling ---- */

@media (max-width: 480px) {
    .sheet__bar {
        padding: 12px 10px 0 20px;
    }

    .step {
        padding: 20px 20px 18px;
    }

    .step__title {
        margin-bottom: 16px;
        font-size: 1.1875rem;
    }

    .choice > .icon {
        width: 30px;
        height: 30px;
    }

    .steps.is-stepped .step__nav {
        padding-top: 20px;
    }

    .sheet__person {
        padding: 16px;
    }
}

/* Reduced motion: no growing, sliding or fading in -------------------------- */

@media (prefers-reduced-motion: reduce) {
    .launcher {
        animation: none;
        transition: none;
    }

    .square {
        transition: none;
    }

    .square:hover {
        transform: none;
    }

    .sheet,
    .sheet:popover-open,
    .sheet::backdrop,
    .sheet:popover-open::backdrop {
        transition: none;
    }

    .sheet {
        transform: none;
    }

    .steps.is-stepped .step.is-current,
    .sheet.sheet--duo:popover-open .window {
        animation: none;
    }

    .hint__bubble {
        transition: none;
    }
}

/* Browsers without the Popover API: no launcher, the cards and form are simply on the page. */
@supports not selector(:popover-open) {
    .launcher {
        display: none;
    }

    .page--home main {
        display: block;
        padding: 72px 16px 32px;
    }

    .sheet {
        position: static;
        margin: 0 auto 16px;
        opacity: 1;
        transform: none;
    }

    .sheet__close {
        display: none;
    }
}
