@font-face {
  font-family: Lato;
  src: url("../fonts/Lato-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Lato;
  src: url("../fonts/Lato-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("../fonts/Montserrat-Latin.woff2") format("woff2");
  font-weight: 600 750;
  font-display: swap;
  unicode-range: U+0000-024F, 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;
}
@font-face {
  font-family: Montserrat;
  src: url("../fonts/Montserrat-Cyrillic.woff2") format("woff2");
  font-weight: 600 750;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  color-scheme: light;
  --ink: #1e1810;
  --muted: #60574b;
  --canvas: #faf8f3;
  --surface: #fff;
  --border: #e1d8c7;
  --control-border: #897b65;
  --gold: #f9c349;
  --gold-hover: #edaf29;
  --accent-ink: #745007;
  --accent-soft: #fff6de;
  --danger: #9f1724;
  --radius: 1rem;
  --heading-font: Montserrat, system-ui, sans-serif;
  font-family: Lato, system-ui, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 1.0625rem; }
a { color: var(--accent-ink); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
.container { width: min(100% - 2rem, 58rem); margin-inline: auto; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .container { width: min(100% - 2rem, 72rem); display: flex; gap: .6rem 1.5rem; justify-content: space-between; flex-wrap: wrap; padding-block: 1rem; align-items: center; }
.site-header nav { font-size: .95rem; }
.site-header nav a { color: var(--ink); text-decoration-color: var(--control-border); }
.site-header nav a:hover { text-decoration-color: var(--accent-ink); }
.brand { display: inline-flex; align-items: center; gap: .55rem; font: 700 1.1rem var(--heading-font); color: var(--ink); text-decoration: none; }
.brand::before { content: ""; width: .8rem; height: .8rem; border-radius: 50%; background: var(--gold); flex: none; }
main { padding-block: clamp(1.5rem, 5vw, 3.5rem); min-height: 55vh; }
h1, h2, h3, h4 { font-family: var(--heading-font); line-height: 1.25; text-wrap: balance; }
h1 { margin-block: 0 .75em; font-size: clamp(1.85rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.55rem); }
.eyebrow { margin-block: 0 .8rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.hero {
  padding: clamp(1.5rem, 6vw, 4.5rem);
  border-radius: var(--radius);
  color: var(--surface);
  background:
    radial-gradient(ellipse at 95% 5%, #765628 0, transparent 62%),
    repeating-radial-gradient(circle at 105% 105%, #ffffff09 0 1px, transparent 1px 2.5rem),
    var(--ink);
}
.hero h1 { max-width: 18ch; margin-bottom: .35em; font-size: clamp(2rem, 6vw, 3.6rem); }
.hero .eyebrow { color: var(--gold); }
.hero p:not(.eyebrow) { max-width: 46ch; margin-bottom: 1.5rem; color: #f3e9d7; }
.panel { min-width: 0; padding: clamp(1rem, 4vw, 2rem); margin-block: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 .3rem 1.25rem #31230a08; }
.panel > :first-child { margin-top: 0; }
.notice { padding: 1rem; border-inline-start: .25rem solid var(--accent-ink); border-radius: .4rem; background: var(--accent-soft); }
.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.mode-card { display: flex; flex-direction: column; align-items: flex-start; padding: 1rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--canvas); }
.mode-card h3 { margin: 0; }
.mode-card p { flex: 1; }
button, .button { display: inline-block; min-height: 2.75rem; max-width: 100%; border: 0; border-radius: .55rem; padding: .65rem 1.1rem; background: var(--gold); color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: var(--gold-hover); color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; }
.hero :focus-visible { outline-color: var(--surface); }
.field { margin-bottom: 1.5rem; }
label { display: block; font-weight: 700; }
.help { font-size: .95rem; color: var(--muted); margin-block: .25rem; }
input, select, textarea { max-width: 100%; font: inherit; }
input:not([type]), input:is([type="text"], [type="password"], [type="email"], [type="tel"], [type="number"], [type="url"]), select, textarea {
  padding: .65rem .8rem; border: 1px solid var(--control-border); border-radius: .5rem;
  background: var(--surface); color: var(--ink);
}
input:not([type]), input:is([type="text"], [type="password"], [type="email"], [type="tel"], [type="number"], [type="url"]), .field select, textarea { width: 100%; }
input[type="checkbox"] { width: 1.4rem; height: 1.4rem; margin: .6rem 0; }
input:is([type="checkbox"], [type="radio"]), progress { accent-color: var(--accent-ink); }
.field-error :is(input, select, textarea) { border-color: var(--danger); }
.errors { color: var(--danger); font-weight: 700; }
.errors ul { margin-block: .4rem; padding-left: 1.4rem; }
dt { font-weight: 700; margin-top: .8rem; }
dd { margin-left: 0; overflow-wrap: anywhere; }
footer { border-top: 1px solid var(--border); padding-block: 1rem; color: var(--muted); font-size: .9rem; }
.skip-link { position: absolute; left: 1rem; top: -5rem; padding: .5rem; background: var(--surface); z-index: 1; }
.skip-link:focus { top: .5rem; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
progress { width: 100%; height: 1.2rem; }
.question { border: 0; padding: 0; margin: 0 0 2rem; }
.question legend { font-weight: 700; padding: 0; }
.answer-choice { display: flex; gap: .7rem; align-items: center; font-weight: 400; padding: .45rem .65rem; min-height: 44px; border-radius: .45rem; }
.answer-choice:hover, .answer-choice:has(input:checked) { background: var(--accent-soft); }
.answer-choice input { width: 1.2rem; height: 1.2rem; flex-shrink: 0; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.score { font-size: 2rem; font-weight: 750; margin: 0; }
.section-navigation { columns: 2 16rem; padding-left: 1.4rem; }
.section-navigation li { break-inside: avoid; padding: .3rem 0; }
[aria-current="step"] { font-weight: 750; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .65rem; border-bottom: 1px solid var(--border); }
blockquote { margin-inline: 0; padding-left: 1rem; border-left: .2rem solid var(--border); }
summary { cursor: pointer; font-weight: 700; }
h3, h4, legend, a { overflow-wrap: anywhere; }
fieldset { min-inline-size: 0; }
.panel p, blockquote { overflow-wrap: anywhere; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.breakable { overflow-wrap: anywhere; }
