/* Kansalaispolku. Layout: single centred column (max 72rem), mobile first; cards only for products and results. */
:root {
  --bg: #f6f7f4;          /* birch paper */
  --surface: #ffffff;
  --ink: #17212b;          /* near-black with blue bias */
  --muted: #55606b;
  --line: #d9ddd6;
  --lake: #1d4f73;         /* primary */
  --lake-ink: #ffffff;
  --lake-soft: #e3edf4;
  --cloudberry: #c9861a;   /* accent, used sparingly */
  --good: #1f7a4d;
  --bad: #b3261e;
  --warn-bg: #fff4dc;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11171d; --surface: #182129; --ink: #e8edf1; --muted: #a2adb7; --line: #2b3741;
    --lake: #7fb3d9; --lake-ink: #0d1a24; --lake-soft: #1c2f3d; --cloudberry: #e3a94a;
    --good: #5cc28f; --bad: #ff8a80; --warn-bg: #3a2f17; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11171d; --surface: #182129; --ink: #e8edf1; --muted: #a2adb7; --line: #2b3741;
  --lake: #7fb3d9; --lake-ink: #0d1a24; --lake-soft: #1c2f3d; --cloudberry: #e3a94a;
  --good: #5cc28f; --bad: #ff8a80; --warn-bg: #3a2f17; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.6 var(--font); }
img { max-width: 100%; }
a { color: var(--lake); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--cloudberry); outline-offset: 2px; }
.wrap { max-width: 72rem; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px; z-index: 10; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.nav { display: flex; gap: 4px 16px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"], .nav a:hover { border-bottom-color: var(--lake); }
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 6px 12px; font: inherit; }
  .nav { display: none; width: 100%; flex-direction: column; }
  .nav.open { display: flex; }
}

/* Disclaimer band */
.disclaimer { background: var(--warn-bg); font-size: .9rem; }
.disclaimer .wrap { padding-block: 8px; }

/* Type */
h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: .2em 0 .4em; }
h2 { font-size: 1.45rem; margin-top: 2em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.prose { max-width: 42rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--muted); font-weight: 600; }
main { padding-block: 24px 64px; }

/* Buttons */
.btn { display: inline-block; background: var(--lake); color: var(--lake-ink); border: 2px solid var(--lake); padding: 10px 18px; border-radius: var(--radius); font: 600 1rem var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: transparent; color: var(--lake); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Grids and cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card.featured { border: 2px solid var(--lake); }
.price { font-size: 2rem; font-weight: 700; }
.price small { font-size: .9rem; color: var(--muted); font-weight: 400; }
ul.check { padding-left: 1.2em; }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 14px 56px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--lake-soft); color: var(--lake); font-weight: 700; display: grid; place-items: center; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* Practice */
.quiz { max-width: 42rem; }
.q-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .9rem; flex-wrap: wrap; }
.q-text { font-size: 1.25rem; font-weight: 600; margin: 12px 0; }
.q-alt { color: var(--muted); font-size: .95rem; margin-top: -4px; }
.options { display: grid; gap: 10px; margin: 16px 0; }
.option { text-align: left; background: var(--surface); color: var(--ink); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font: inherit; cursor: pointer; }
.option:hover:not([disabled]) { border-color: var(--lake); }
.option.selected { border-color: var(--lake); background: var(--lake-soft); }
.option.correct { border-color: var(--good); }
.option.wrong { border-color: var(--bad); }
.feedback { border-left: 4px solid var(--lake); background: var(--surface); padding: 12px 14px; border-radius: 0 var(--radius) var(--radius) 0; }
.feedback.good { border-left-color: var(--good); }
.feedback.bad { border-left-color: var(--bad); }
.progressbar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progressbar > span { display: block; height: 100%; background: var(--lake); }
.bar-row { display: grid; grid-template-columns: minmax(8rem, 14rem) 1fr 3.5rem; gap: 10px; align-items: center; margin: 6px 0; }
.score { font-size: 3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
label.choice { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
select, input[type=email], input[type=text], textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); max-width: 100%; }
.badge { display: inline-block; font-size: .78rem; padding: 2px 8px; border-radius: 99px; background: var(--lake-soft); color: var(--lake); font-weight: 600; }
.notice { background: var(--warn-bg); border-radius: var(--radius); padding: 12px 14px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); font-size: .92rem; color: var(--muted); }
.site-footer .wrap { padding-block: 24px; display: grid; gap: 12px; }
.site-footer nav { display: flex; gap: 6px 16px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
