/* Rikketeate leht (/teata-rikkest): kerge oma stiil, ilma Tailwindita.
   Kujundus: kinnitatud näidis (paygo-koduleht-meedia/rikkevorm-naidis).
   Paigutus: üks kitsas veerg telefonile; neli sammu avanevad järjest, tehtud samm tõmbub üherealiseks kokkuvõtteks. */

/* Fondid oma serverist (samad failid, mis saidil); kuni laadimiseni süsteemifont */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(../fonts/inter-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300 700; 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: 300 700; 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; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 500 700; font-display: swap; src: url(../fonts/playfair-display-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 500 700; font-display: swap; src: url(../fonts/playfair-display-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: "Playfair Display"; font-style: normal; font-weight: 500 700; font-display: swap; src: url(../fonts/playfair-display-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; }

:root {
  --bg: #f3f5fa;
  --surface: #ffffff;
  --ink: #1b2146;
  --muted: #59607f;
  --line: #dde1ec;
  --brand: #242c5d;
  --band: #242c5d; /* päiseriba; sama mis logo pildi taust, mõlemas teemas */
  --brand-ink: #ffffff;
  --accent: #0b7fb5;
  --alert: #d81b47;
  --alert-ink: #ffffff;
  --alert-soft: #fdeef1;
  --ok: #0a7a55;
  --ok-soft: #e8f6f0;
  --chip: #edf0f7;
  --focus: #0ea5e9;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1230; --surface: #171c40; --ink: #eef0fb; --muted: #a7aed0; --line: #2c3468;
    --brand: #4352b8; --brand-ink: #ffffff; --accent: #5cc4f2; --alert: #ff5d7f; --alert-ink: #2a0611;
    --alert-soft: #3a1422; --ok: #4fd3a4; --ok-soft: #10302a; --chip: #232a5c; --focus: #5cc4f2;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1230; --surface: #171c40; --ink: #eef0fb; --muted: #a7aed0; --line: #2c3468;
  --brand: #4352b8; --brand-ink: #ffffff; --accent: #5cc4f2; --alert: #ff5d7f; --alert-ink: #2a0611;
  --alert-soft: #3a1422; --ok: #4fd3a4; --ok-soft: #10302a; --chip: #232a5c; --focus: #5cc4f2;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-ui); font-size: 16px; line-height: 1.5; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Ülariba: logo ja keelevalik */
.band { background: var(--band); color: var(--brand-ink); }
.band-in, main, .foot {
  max-width: 34rem; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.band-in { padding-block: 7px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: flex; align-items: center; min-height: 44px; border-radius: 6px; }
.band img { height: 30px; width: auto; display: block; }
.langs { display: flex; gap: 2px; }
.langs a { min-width: 44px; min-height: 44px; display: grid; place-items: center; padding: 0 6px; border-radius: 999px; color: var(--brand-ink); opacity: .78; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-decoration: none; }
.langs a:hover { opacity: 1; }
.langs a[aria-current="page"] { opacity: 1; background: rgba(255,255,255,.14); }
/* Viis keelt kitsas telefonis (320–400 px): kitsamad nupud (kõrgus jääb 44 px), väiksem logo */
@media (max-width: 400px) {
  .band-in { gap: 8px; }
  .band img { height: 26px; }
  .langs { gap: 0; }
  .langs a { min-width: 40px; padding: 0 4px; font-size: 12px; letter-spacing: .02em; }
}

main { padding-block: 22px 22px; display: flex; flex-direction: column; gap: 18px; }
main > header { display: flex; flex-direction: column; gap: 8px; }
h1 { font-family: var(--font-display); font-weight: 600; font-size: 1.85rem; line-height: 1.15; margin: 0; text-wrap: balance; }
html:not([lang="et"]) :is(h1, h2) { hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 10 4 4; overflow-wrap: break-word; } /* pikad sõnad (fi, lv, ru) */
.lead { margin: 0; color: var(--muted); }
.nojs { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--alert-soft); font-weight: 600; }

.steps { display: flex; flex-direction: column; gap: 10px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.step-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: none; border: 0; text-align: left; border-radius: 16px; }
.step-head[disabled] { cursor: default; }
.step-head:not([disabled]) { cursor: pointer; }
.num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; background: var(--chip); color: var(--muted); }
.step.is-active .num { background: var(--brand); color: var(--brand-ink); }
.step.is-done .num { background: var(--ok-soft); color: var(--ok); }
.step-title { font-weight: 600; min-width: 0; flex: 1; }
.step.is-todo .step-title { color: var(--muted); }
.step-sum { display: block; font-weight: 400; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.edit { flex: none; font-size: 14px; font-weight: 600; color: var(--accent); }
.step-body { padding: 2px 16px 16px; display: flex; flex-direction: column; gap: 12px; }

.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; font-weight: 600; cursor: pointer; }
.opt svg { flex: none; width: 26px; height: 26px; color: var(--accent); }
.opt[aria-pressed="true"] { border-color: var(--brand); background: var(--chip); }
.opt small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }

label, .label { font-size: 14px; font-weight: 600; }
.opt-l { font-weight: 400; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; }
.input { width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
.input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
textarea.input { min-height: 92px; resize: vertical; }
.hint { margin: 0; font-size: 14px; color: var(--muted); }
.msg-ok { margin: 0; font-size: 14px; font-weight: 600; color: var(--ok); }
.msg-err { margin: 0; font-size: 14px; font-weight: 600; color: var(--alert); }
.input.is-bad { border-color: var(--alert); }
.input.is-good { border-color: var(--ok); }

.list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; max-height: 15.5rem; overflow-y: auto; }
.list li + li { border-top: 1px solid var(--line); }
.list button { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; width: 100%; min-height: 48px; padding: 10px 14px; background: none; border: 0; text-align: left; cursor: pointer; }
.list button span { color: var(--muted); font-size: 14px; flex: none; }
.list .empty { padding: 12px 14px; color: var(--muted); font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 500; cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.picked { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; min-height: 48px; border-radius: 12px; background: var(--chip); font-weight: 600; }
.link { background: none; border: 0; padding: 6px 0; min-height: 44px; color: var(--accent); font-weight: 600; cursor: pointer; text-align: left; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.row .field { flex: 1 1 9rem; min-width: 0; }
.door-label { margin: 10px 0 8px; }
.quick-label { margin: 0 0 8px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.send-wrap { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
/* Botilõks: inimesele nähtamatu väli */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.btn { min-height: 52px; padding: 12px 20px; border-radius: 14px; border: 0; font-weight: 700; cursor: pointer; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.btn-next { background: var(--brand); color: var(--brand-ink); }
.btn-send { background: var(--alert); color: var(--alert-ink); width: 100%; font-size: 1.05rem; }
.btn[disabled] { opacity: .65; cursor: progress; }
.note { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: 15px; }
.fine { margin: 0; font-size: 13px; color: var(--muted); }

.result { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px; display: flex; flex-direction: column; gap: 14px; }
.result .tick { width: 54px; height: 54px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.result h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; line-height: 1.2; }
.result h2:focus { outline: none; }
.result dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.result dt { color: var(--muted); }
.result dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ref { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* Jalus: rikketelefon ja väikesed lingid */
.foot { padding-block: 0 32px; display: flex; flex-direction: column; gap: 14px; }
.help { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.call { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 18px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; text-decoration: none; }
.call svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; }

@media (prefers-reduced-motion: no-preference) {
  .opt, .chip, .input { transition: border-color .15s, background-color .15s; }
}
