/* Crashmire — the crash-test lab.
   Light concrete hall, ink, one signal yellow (the crash-test marker) and one
   breach red reserved for lines crossed. Archivo, one family: expanded and
   heavy for what we assert, normal width for everything else. */

@font-face {
    font-family: "Archivo";
    src: url("../fonts/archivo-wdth.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
}

:root {
    --paper: #e8ebed;
    --panel: #f6f7f8;
    --ink: #15202b;
    --steel: #56626d;
    --rule: #c6cdd3;
    --signal: #f2c200;
    --breach: #c8243a;
    --pass: #2e7a4d;
    --focus: #1f6feb;
    --wrap: 1120px;
    --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 17px/1.6 "Archivo", system-ui, sans-serif;
    font-stretch: 100%;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--signal); color: var(--ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--steel); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ——— type scale (1.25) ——— */
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.08; font-weight: 800; letter-spacing: -.01em; }
.display, h1 { font-size: clamp(2.3rem, 5.6vw, 4.2rem); font-stretch: 125%; font-weight: 850; letter-spacing: -.02em; line-height: 1.02; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-stretch: 118%; }
h3 { font-size: 1.22rem; font-stretch: 105%; font-weight: 750; }
p { margin: 0 0 1em; max-width: 68ch; }
.lead { font-size: clamp(1.1rem, 1.7vw, 1.3rem); line-height: 1.5; color: #2b3640; max-width: 58ch; }

/* ——— header ——— */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 850; font-stretch: 125%; font-size: 1.1rem; letter-spacing: -.01em; }
.brand svg { width: 26px; height: 26px; flex: none; }
.nav { display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--steel); padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .lang { font-weight: 600; }

/* ——— buttons ——— */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 22px; border: 2px solid var(--ink); border-radius: 6px;
    background: var(--ink); color: var(--paper); font: inherit; font-weight: 700; font-stretch: 110%;
    text-decoration: none; cursor: pointer;
}
.btn:hover { background: #24313d; }
.btn.secondary { background: transparent; color: var(--ink); }
.btn.secondary:hover { background: var(--panel); }
.btn.small { min-height: 38px; padding: 0 16px; font-size: .92rem; }
.nav .btn { color: var(--paper); }

/* ——— sections ——— */
.section { padding: clamp(56px, 9vw, 112px) 0; border-top: 1px solid var(--rule); }
.section-head { max-width: 760px; margin-bottom: 40px; }

/* ——— forms (app pages) ——— */
main.app { padding: 40px 0 80px; }
.card { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 24px; }
label { display: block; font-size: .92rem; font-weight: 600; margin: 16px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
    width: 100%; background: #fff; border: 1px solid #aeb7bf; color: var(--ink);
    padding: 11px 12px; border-radius: 6px; font: inherit; font-size: 1rem;
}
input[type=checkbox], input[type=radio] { width: auto; margin-right: 8px; accent-color: var(--ink); }
textarea { resize: vertical; }
.help-text { font-size: .88rem; color: var(--steel); margin-top: 4px; }
form ul { list-style: none; padding: 0; margin: 6px 0 0; color: var(--breach); font-size: .92rem; font-weight: 600; }
.error { color: var(--breach); }
.flash { background: var(--panel); border: 1px solid var(--rule); border-left: 4px solid var(--pass); border-radius: 6px; padding: 12px 16px; margin-bottom: 24px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: .85rem; color: var(--steel); font-weight: 600; }
code { font-size: .9em; background: #dde2e6; padding: 1px 5px; border-radius: 3px; }

/* ——— footer ——— */
.site-footer { border-top: 1px solid var(--rule); padding: 40px 0 56px; color: var(--steel); font-size: .92rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 700px) {
    .site-header .wrap { min-height: 60px; flex-wrap: nowrap; }
    .nav a.secondary-link, .nav .btn { display: none; }
    .brand { white-space: nowrap; }
    .nav { flex-wrap: nowrap; }
}

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

@media print {
    .site-header, .site-footer, .no-print { display: none !important; }
    body { background: #fff; font-size: 11pt; }
    .card, details { break-inside: avoid; }
    details { display: block; }
    details > *:not(summary) { display: block !important; }
}
