/* Tootekriitika — stiilid (T15 disainikorrastus: rahulik toimetuslik ostuabi)
   Hele taust, valged sisupinnad, tume loetav kiri, üks sinakasroheline tegevusvärv. Raam tähistab mõtestatud üksust
   (kokkuvõte, kaart, tabel); ülejäänud hierarhia tuleb tüpograafiast ja vahedest. Vari puudub. Süsteemifont, väliseid fonte ei laadita.
   Disainimuutujad on :root all; komponentide sektsioonid on märgitud pealkirjaga. */

:root {
  /* Värvid (disainijuhendi lähtepalett) */
  --bg: #f5f6f4;            /* lehe taust */
  --surface: #ffffff;       /* sisupind */
  --surface-2: #eef1ee;     /* teisene pind: paneelid, tabelipäised, teade */
  --text: #1c2430;          /* põhitekst */
  --text-muted: #5a6572;    /* teisene tekst (valgel ~5,9:1) */
  --line: #d6dbd8;          /* tavaline eraldusjoon */
  --line-strong: #798480;   /* juhtpiirid (nupud, väljad): valgel ~3,9:1, lehe taustal ~3,6:1 (WCAG 1.4.11 ≥ 3:1) */
  --accent: #1d6a78;        /* tegevusvärv (valgel ~6,2:1) */
  --accent-strong: #124f5a; /* aktiivne / tume */
  --accent-soft: #e2eff1;   /* pehme tegevustaust */
  --caution-soft: #fbf1dc;  /* ettevaatuse pind — ainult sisulise vajaduse korral */
  --caution-line: #d9b56b;
  --caution-text: #7a4b00;  /* valgel ~7,6:1, kollakal pinnal ~6,6:1 */
  --neutral-soft: #eceff2;  /* neutraalne märgis */
  --contrast-soft: #f1ecf6; /* vastuoluline / tagasilükatud — lilla, mitte roheline/punane */
  --contrast-line: #8b6ea8;
  --contrast-text: #4f3b66;
  --warn-soft: var(--caution-soft);   /* ühilduvus varasema nimetusega */
  --warn-line: var(--caution-line);
  --ok-soft: var(--neutral-soft);     /* „parandatud / tugev” on neutraalne, mitte roheline (tõendikindlus ≠ soovitus) */
  --ok-line: var(--line-strong);
  /* Mõõdud */
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: none;
  --font: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;
  --max: 1120px;
  --measure: 72ch;          /* põhiteksti rea pikkus */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --control: 48px;          /* põhiväljade ja -nuppude kõrgus */
  --target: 44px;           /* puutepinna siht */
}

/* ---------- Alus ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; font-weight: 650; overflow-wrap: break-word; }
h1 { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.25rem); }        /* 28 → 36 px */
h2 { font-size: clamp(1.375rem, 1.15rem + 0.6vw, 1.5rem); margin-top: 0; } /* 22 → 24 px */
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 0.75em; overflow-wrap: break-word; }
ul, ol { margin: 0 0 0.75em; padding-left: 1.25em; }
a { color: var(--accent-strong); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
code { font-size: 0.95em; background: var(--surface-2); padding: 0 4px; border-radius: 4px; }
img, svg { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--s4); }
.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }   /* 14 px — teisene info */
.label { font-weight: 600; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
#page-title:focus, #app:focus, h2[tabindex]:focus, h3[tabindex]:focus { outline: none; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border: 2px solid var(--accent); z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Päis, prototüübiteade, jalus ---------- */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--s4); min-height: 62px; padding-top: var(--s1); padding-bottom: var(--s1); }
.brand { display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--target); text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.1rem; }
.brand-mark { width: 13px; height: 22px; border: 2px solid var(--accent); border-radius: 4px; display: inline-block; }
.brand-tag { display: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: var(--s1); }
.site-nav a { text-decoration: none; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; min-height: var(--target); display: inline-flex; align-items: center; white-space: nowrap; }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-count { color: var(--text-muted); margin-left: 4px; }
.site-nav a[aria-current="page"] .nav-count { color: var(--accent-strong); }

.proto-note { background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 0.9rem; color: var(--text); }
.proto-note-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s3); min-height: 40px; padding-top: 2px; padding-bottom: 2px; }
.proto-note-text { margin: 0; }
.proto-note .proto-note-toggle { min-height: 40px; padding: 0 var(--s1); }
.proto-note-body { padding-bottom: var(--s3); max-width: calc(var(--max) - 0px); }
.proto-note-body p { margin: 0; max-width: 90ch; }
.demo-banner { background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.demo-banner .wrap { padding-top: 8px; padding-bottom: 8px; }
.demo-inline { background: var(--caution-soft); border: 1px solid var(--caution-line); border-radius: 6px; padding: 6px 10px; font-size: 0.9rem; }

main { padding-top: var(--s5); padding-bottom: var(--s7); min-height: 60vh; }
.site-foot { border-top: 1px solid var(--line); padding: var(--s4) 0 var(--s6); color: var(--text-muted); font-size: 0.9rem; }
.site-foot p { margin-bottom: 4px; }

/* ---------- Üldised elemendid ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--target); padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn-secondary[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.btn-secondary[aria-pressed="true"]::before { content: "✓ "; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-link { border-color: transparent; background: transparent; text-decoration: underline; color: var(--accent-strong); }
.btn-sm { min-height: 40px; padding: 6px 12px; font-size: 0.95rem; }
.btn-primary.btn-sm { min-height: var(--target); }  /* põhitegevus kaardil ~44 px */
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s2) 0; }
.linklike { background: none; border: 0; padding: 2px 0; font: inherit; color: var(--accent-strong); text-decoration: underline; cursor: pointer; min-height: 32px; }
/* Avatav osa: lingilaadne nupp märgiga; ikoon ei ole ainus nimetus (tekst ütleb, mis avaneb) */
.disclosure { background: none; border: 0; padding: 6px 0; font: inherit; font-weight: 600; color: var(--accent-strong); cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; text-align: left; }
.disclosure::before { content: "▸"; color: var(--accent); font-size: 0.9em; }
.disclosure[aria-expanded="true"]::before { content: "▾"; }
.disclosure:hover { text-decoration: underline; }

.chip {
  min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); font: inherit; cursor: pointer; color: var(--text);
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.chip[aria-pressed="true"]::before { content: "✓ "; }
.chip-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); font-weight: 600; }

/* Märgised: valdavalt neutraalsed; tõendikindlus ei näe välja nagu soovitus. Värv alati koos tekstiga. */
.pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 0.82rem; font-weight: 600; color: var(--text); line-height: 1.5; white-space: normal; text-align: left; max-width: 100%;
}
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-sev-suur { background: var(--caution-soft); border-color: var(--caution-line); color: var(--caution-text); }
.pill-sev-keskmine { background: var(--neutral-soft); }
.pill-sev-vaike { background: var(--surface); }
.pill-ev-testis { border-color: var(--accent); color: var(--accent-strong); }
.pill-ev-korduv { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.pill-ev-uksik { border-style: dashed; }
.pill-ev-vastuoluline { border-color: var(--contrast-line); color: var(--contrast-text); background: var(--contrast-soft); }
.pill-ev-puudub { border-style: dotted; color: var(--text-muted); }
.pill-ev-toimetus { background: var(--neutral-soft); }
.pill-st-parandatud { background: var(--neutral-soft); border-color: var(--text-muted); }
.pill-st-parandus_teatatud { background: var(--caution-soft); border-color: var(--caution-line); color: var(--caution-text); }
.pill-st-vastuoluline { background: var(--contrast-soft); border-color: var(--contrast-line); }
.pill-st-teadmata { border-style: dotted; color: var(--text-muted); }
.pill-st-tahtlik { background: var(--neutral-soft); }
.pill-st-ajalooline, .pill-st-osaliselt { border-style: dotted; }
.pill-st-mootmine_ei_kordunud, .pill-weak-kordus_ei { background: var(--contrast-soft); border-color: var(--contrast-line); color: var(--contrast-text); }
.pill-need { background: var(--accent); border-color: var(--accent); color: #fff; }
/* Tõenduse tugevus: tugev = tume neutraalne piir, keskmine = hall, nõrk = katkendlik, vastuoluline = lilla */
.pill-str-tugev { background: var(--neutral-soft); border-color: var(--text); }
.pill-str-keskmine { background: var(--neutral-soft); }
.pill-str-nork { border-style: dashed; color: var(--text-muted); }
.pill-str-vastuoluline { background: var(--contrast-soft); border-color: var(--contrast-line); color: var(--contrast-text); }
.pill-weak { background: var(--neutral-soft); }
.pill-weak-vastuoluline { background: var(--contrast-soft); border-color: var(--contrast-line); color: var(--contrast-text); }
.pill-weak-ajalooline, .pill-weak-teadmata { border-style: dotted; background: var(--surface); color: var(--text-muted); }
.pill-weak-parandatud { background: var(--neutral-soft); border-color: var(--text-muted); }
.pill-role { font-weight: 500; font-size: 0.76rem; }
.pill-role-contradicts { background: var(--contrast-soft); border-color: var(--contrast-line); }
.pill-role-context, .pill-role-repeat { border-style: dotted; color: var(--text-muted); }
.pill-role-fix { background: var(--neutral-soft); border-color: var(--text-muted); }
.pill-pos-unknown, .pill-pos-none { border-style: dotted; color: var(--text-muted); }
.pill-pos-real { background: var(--neutral-soft); }
.pill-pos-above { background: var(--caution-soft); border-color: var(--caution-line); color: var(--caution-text); }
.pill-pos-below, .pill-pos-about { background: var(--neutral-soft); }
.pill-basis-fakt { background: var(--neutral-soft); border-color: var(--text-muted); }
.pill-basis-oletus { border-style: dashed; }
.pill-basis-ev { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.pill-pm-oluline { background: var(--caution-soft); border-color: var(--caution-line); color: var(--caution-text); }
.pill-pm-moodukas, .pill-pm-vaike { background: var(--neutral-soft); }
.pill-pm-teadmata { border-style: dotted; color: var(--text-muted); }
.pill-conf-hea { background: var(--neutral-soft); border-color: var(--text); }
.pill-conf-keskmine { background: var(--neutral-soft); }
.pill-conf-nork { border-style: dashed; color: var(--text-muted); }
.pill-retest { font-size: 0.76rem; }
.pill-retest-confirmed { background: var(--caution-soft); border-color: var(--caution-line); color: var(--caution-text); }
.pill-retest-not_reproduced { background: var(--neutral-soft); border-color: var(--text-muted); }
.pill-retest-inconclusive, .pill-retest-unknown { border-style: dotted; color: var(--text-muted); }
.pill-src { background: var(--neutral-soft); }
.pill-src-real { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.pill-kind { background: var(--neutral-soft); }
.badge-row { margin: 0 0 6px; }
.badge { font-size: 0.8rem; }
.badge-real { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.badge-demo { background: var(--caution-soft); border-color: var(--caution-line); color: var(--caution-text); }
.pill-count { font-weight: 500; }
.count { font-weight: 500; font-size: 1rem; }
.tag { display: inline-block; font-size: 0.8rem; background: var(--accent-soft); color: var(--accent-strong); border-radius: 999px; padding: 0 8px; margin-left: 6px; }

.notice { padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); }
.notice-warn { background: var(--caution-soft); border-color: var(--caution-line); }
.notice-info { background: var(--accent-soft); border-color: var(--accent); }
.notice-slot:empty { display: none; }
.notice-slot { margin-bottom: var(--s3); }
.field-error { color: #8a2f2f; font-weight: 600; min-height: 1.4em; margin: 4px 0 0; }
.field-error:empty { display: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s4); list-style: none; min-width: 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.eyebrow { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 4px; }
.empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: var(--s5); text-align: center; }
.empty h2 { margin-bottom: 8px; }
.sec { margin-bottom: var(--s6); }
.sec > h2, .sec-head h2 { padding-bottom: 6px; border-bottom: 2px solid var(--line); margin-bottom: var(--s3); }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s4); border-bottom: 2px solid var(--line); margin-bottom: var(--s3); }
.sec-head h2 { border: 0; margin-bottom: 4px; }
.sec-head .sec-link { font-weight: 600; text-decoration: none; padding: 6px 0; }
.sec-head .sec-link:hover { text-decoration: underline; }
.sec-head .sec-sub { flex-basis: 100%; margin: 0 0 6px; }
.sub { margin-top: var(--s4); font-size: 1.05rem; }

/* Siluett */
.sil-body { fill: #2b3440; }
.sil-screen { fill: #dfe6ea; }
.sil-cam { fill: #2b3440; }
.sil-b .sil-screen, .sil-d .sil-screen { fill: #e6e3da; }
.sil-c .sil-body, .sil-c .sil-cam { fill: #3b4a5a; }
.sil-d .sil-body, .sil-d .sil-cam { fill: #4a4440; }

/* ---------- Esileht ---------- */
.page-head { margin: 0 0 var(--s4); }
.lead { font-size: 1.1rem; color: var(--text-muted); max-width: var(--measure); }
.view-home .hero { margin: var(--s2) 0 var(--s4); max-width: var(--measure); }
.view-home .hero h1 { font-size: clamp(1.75rem, 1.1rem + 2vw, 2.5rem); line-height: 1.15; margin-bottom: var(--s2); }
.view-home .hero .lead { font-size: 1.1rem; margin-bottom: 0; }
.home-search { max-width: 760px; margin: 0 0 var(--s4); }
.home-search-label { display: block; font-weight: 650; font-size: 1.1rem; margin-bottom: var(--s2); }
.home-search-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.home-search-row input { flex: 1 1 220px; min-width: 0; min-height: var(--control); font: inherit; font-size: 1.05rem; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.home-search-row .btn { min-height: var(--control); padding: 0 20px; }
.home-results-box:empty { display: none; }
.home-results-box { margin-top: var(--s2); }
.home-results { list-style: none; padding: 0; margin: 0 0 var(--s2); display: grid; gap: 6px; }
.home-result { display: block; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); text-decoration: none; color: var(--text); }
.home-result:hover, .home-result:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.home-result-name { font-weight: 700; margin-right: 6px; }
.home-result-meta { display: block; margin-top: 2px; }
.home-more { margin: 0; }
.home-empty { padding: 10px 14px; background: var(--surface-2); border-radius: var(--radius-sm); margin: 0; }
.home-samples { margin-top: var(--s5); }
/* Esilehe näidiskaardid (T16): arvutis kolm tasakaalus veergu (ainult esilehel; kataloogi .card-grid jääb auto-fill), kitsamal 2 → 1 veerg. */
.card-grid.sample-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .card-grid.sample-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 860px) { .card-grid.sample-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.home-card { display: flex; flex-direction: column; gap: 2px; }
.home-card .card-title { margin: 0; font-size: 1.15rem; }
.home-card .card-variant { margin-bottom: 6px; }
.home-card .card-line { margin-bottom: 6px; }
.home-card .card-price { margin-bottom: 0; }
.home-card .card-actions { margin-top: auto; padding-top: var(--s2); }
.home-demo-note { margin: var(--s3) 0 0; }
.home-note { margin: var(--s5) 0 0; font-weight: 600; }
/* Variant B: keskele joondatud sissejuhatus ja otsing; sama sisu, komponendid ja laius */
.home-b .hero { margin-left: auto; margin-right: auto; text-align: center; }
.home-b .hero .lead { margin-left: auto; margin-right: auto; }
.home-b .home-search { margin-left: auto; margin-right: auto; }
.home-b .home-search-label { text-align: center; }
.home-b .home-results { text-align: left; }
.home-b .home-note { text-align: center; }

/* ---------- Kataloog ---------- */
.search { margin-bottom: var(--s3); }
.search-label { display: block; font-weight: 600; margin-bottom: 6px; }
.search-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.search-row input { flex: 1 1 220px; min-width: 0; min-height: var(--control); font: inherit; font-size: 1.05rem; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.filters-toggle { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-bottom: var(--s3); }
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.filter-label { font-weight: 600; margin-right: 4px; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 var(--s3); }
.result-count { color: var(--text-muted); margin: var(--s2) 0 var(--s3); }
.list-section { margin-bottom: var(--s6); }
.list-title { font-size: 1.15rem; margin-bottom: var(--s3); }
.list-demo .list-title { color: var(--text-muted); }
.list-demo { padding-top: var(--s4); border-top: 1px dashed var(--line-strong); }
.card-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s4); }
.phone-card { display: flex; gap: var(--s3); }
.card-media { flex: 0 0 auto; }
.card-body { flex: 1 1 auto; min-width: 0; }
.card-title { margin-bottom: 4px; font-size: 1.15rem; }
.card-title a { text-decoration: none; color: var(--text); }
.card-title a:hover, .card-title a:focus-visible { text-decoration: underline; }
.card-meta { margin-bottom: 6px; }
.card-variant { color: var(--text-muted); }
.card-line { font-size: 0.95rem; margin-bottom: 6px; overflow-wrap: anywhere; }
.card-price { margin-bottom: 0; }
.card-tradeoff { font-size: 0.95rem; }

/* ---------- Telefonivaade ---------- */
.crumbs { margin-bottom: var(--s3); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.phone-head { display: flex; gap: var(--s4); align-items: flex-start; margin-bottom: var(--s4); }
.phone-head-body { flex: 1 1 auto; min-width: 0; }
.phone-head h1 { margin-bottom: 4px; }
.phone-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: var(--s2); }
.phone-variant { font-weight: 600; }
.phone-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
/* „Minu vajadus”: valikuline rõhutaja kokkuvõtte järel, ilma eraldi kastita */
.need-picker { border: 0; padding: 0; margin: 0 0 var(--s5); min-width: 0; }
.need-picker legend { float: left; font-weight: 600; padding: 0; margin: 0 var(--s3) 0 0; line-height: var(--target); }
.need-picker .need-help { clear: both; margin: 4px 0 0; }
.seg-group { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; }
.seg { display: inline-flex; align-items: center; gap: 8px; min-height: var(--target); padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; background: var(--surface); }
.seg.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); font-weight: 600; }
.seg input { margin: 0; width: 18px; height: 18px; }
.need-picker-compare { margin-bottom: var(--s4); }

/* Kokkuvõte — üks raamitud üksus; sama DOM-järjekord mobiilis ja arvutis */
.summary-block { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: var(--s4) var(--s5); margin-bottom: var(--s5); }
.summary-title { margin-bottom: var(--s3); font-size: 1.25rem; }
.summary-need { font-weight: 500; text-transform: none; letter-spacing: 0; }
.summary-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3) var(--s6); }
.sum-cell { min-width: 0; }
.sum-cell h3 { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 6px; }
.sum-cell p:last-child { margin-bottom: 0; }
.sum-lead-text { font-size: 1.05rem; margin: 0; max-width: 78ch; }
.top-issues { margin: 0; padding-left: 1.3em; }
.top-issues li { margin-bottom: 8px; line-height: 1.4; }
.top-issues .sum-link { font-weight: 600; }
.pill-mark { font-size: 0.78rem; padding: 0 7px; vertical-align: middle; }
.sum-confidence { margin: var(--s2) 0 6px; }
.sum-confidence .pill { vertical-align: middle; margin-right: 4px; }
.sum-attention { margin: 6px 0; padding: 8px 12px; background: var(--caution-soft); border-left: 3px solid var(--caution-line); border-radius: 0 8px 8px 0; font-size: 0.92rem; }
.sum-attention a { color: var(--text); }
.sum-possible-box { margin-top: 6px; }
.sum-toggle { padding-left: 0; font-weight: 600; min-height: 40px; }
.sum-toggle::before { content: "▸ "; color: var(--accent-strong); }
.sum-toggle[aria-expanded="true"]::before { content: "▾ "; }
.other-issues { padding-left: 1.2em; margin: 6px 0 0; }
.other-issues li { margin-bottom: 6px; line-height: 1.4; }
.sum-possible-box .pill, .sum-possible .pill { font-size: 0.78rem; padding: 0 7px; vertical-align: middle; }
.sum-link-weak { color: var(--text); }
.sum-strengths { margin: 0; padding-left: 1.2em; }
.sum-strengths li { margin-bottom: 6px; }
.sum-pos { margin-bottom: 6px; }
.sum-alt-link { margin: 0; font-weight: 600; }
.sum-note { margin: var(--s3) 0 0; }
.sum-region { display: block; }

/* Alternatiivikaardid */
.alt-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s3); }
.alt-card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.alt-card h3 a { text-decoration: none; color: var(--text); }
.alt-card h3 a:hover, .alt-card h3 a:focus-visible { text-decoration: underline; }
.alt-variant { display: inline-block; font-weight: 500; color: var(--text-muted); font-size: 0.95rem; }
.alt-facts { margin: 0 0 var(--s2); display: grid; gap: 6px; }
.alt-facts div { display: block; }
.alt-facts dt { font-weight: 600; font-size: 0.85rem; color: var(--text-muted); }
.alt-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.alt-card .card-actions { margin-top: var(--s2); }
.alt-card .disclosure { margin-top: 4px; }
.alt-stale { border-color: var(--caution-line); }
.panel-alt { margin-top: var(--s2); }
.ext-refs { margin: var(--s2) 0 0; padding-left: 1.1em; }
.ext-refs li { margin-bottom: 6px; }

/* Hind */
.price-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--s4); margin-bottom: var(--s2); }
.price-form, .price-result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); min-width: 0; }
.price-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.price-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.price-row input { flex: 1 1 120px; min-width: 0; width: 100%; min-height: var(--target); font: inherit; font-size: 1.05rem; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--text); }
.price-position { font-size: 1.05rem; }
.price-examples th { font-weight: 600; color: var(--text-muted); }
.offer-excluded td { color: var(--text-muted); }
.offer-reason { color: var(--caution-text); }

/* Probleemikaardid, tugevused, tabelid */
.issue { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); margin-bottom: var(--s3); scroll-margin-top: var(--s3); }
.issue-sev-suur { border-left: 4px solid var(--caution-line); }
.issue-weak { background: var(--surface-2); }
.issue-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: flex-start; margin-bottom: 8px; }
.issue-head h3 { margin: 0; font-size: 1.15rem; }
.issue > p { margin-bottom: 8px; }
.issue-who { font-size: 0.95rem; margin-bottom: 6px; }
.issue-count { font-weight: 600; margin: 8px 0; }
.issue-count .pill { vertical-align: middle; }
.strength-why, .weak-inline { font-weight: 400; }
.issue-current { margin: 4px 0 6px; }
.issue-tools { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: 6px; }
.issue-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 20px; margin: 8px 0; font-size: 0.95rem; }
.issue-facts div { display: block; }
.issue-facts dt { font-weight: 600; color: var(--text-muted); font-size: 0.85rem; }
.issue-facts dd { margin: 0; }
.ev-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 20px; margin: 6px 0 8px; font-size: 0.95rem; }
.ev-split div { display: block; }
.ev-split dt { font-weight: 600; color: var(--text-muted); font-size: 0.85rem; }
.ev-split dd { margin: 0; }
.panel-justify .ev-split { margin-top: 8px; }
.region { font-weight: 500; }
.region-note { color: var(--caution-text); margin: -2px 0 8px; }
.region-inline { color: var(--caution-text); }
.strength-line { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 0.95rem; }
.src-group { margin: var(--s3) 0 6px; font-size: 0.95rem; color: var(--text-muted); }
.relevance { background: var(--surface-2); border-left: 3px solid var(--line-strong); padding: 8px 12px; margin: 6px 0 10px; border-radius: 0 8px 8px 0; font-size: 0.92rem; }
.relevance-title { font-weight: 600; margin: 0 0 4px; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.relevance-list { margin: 0; padding-left: 1.1em; }
.relevance-list li { margin-bottom: 2px; }
.relevance .region-note { margin: 6px 0 0; }
.dims { margin: 0; padding-left: 1.1em; }
.dims li { margin-bottom: 3px; }
.dim-verdict { color: var(--text-muted); }
.review { color: var(--text-muted); }
.review-approved { color: var(--text); font-weight: 600; }
.review-pending, .review-stale, .review-rejected { color: var(--caution-text); font-weight: 600; }
.stages { list-style: none; padding: 0; margin: 6px 0 10px; display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 0.88rem; }
.stages li { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-muted); background: var(--surface); }
.stages li.done { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.stages li.stage-status { border-style: dashed; color: var(--text); flex-wrap: wrap; row-gap: 2px; }
.stages li.stage-status .status-scope { flex-basis: 100%; font-weight: 400; }
.stages li:not(:last-child)::after { content: "→"; margin-left: 6px; color: var(--line-strong); }
.stage-mark { font-weight: 700; }
.panel { margin-top: var(--s3); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); min-width: 0; }
.panel .source { background: var(--surface); }
.panel .timeline { margin-top: 4px; }
.btn[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.source-list { list-style: none; padding: 0; margin: 0; }
.source { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; }
.source h4 { margin: 4px 0; font-size: 1rem; }
.source-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; font-size: 0.9rem; }
.source-foot { margin: 6px 0 0; }
.source-repeat { background: var(--surface-2); border-style: dashed; }
.repeat-note { font-weight: 600; font-size: 0.95rem; }
.source-missing { border-color: var(--caution-line); }
.src-refs { font-size: 0.85rem; color: var(--text-muted); }
.src-refs a { color: var(--accent-strong); }
.timeline { list-style: none; padding: 0; margin: 0 0 8px; border-left: 3px solid var(--line-strong); }
.timeline li { position: relative; padding: 0 0 12px 18px; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.timeline li.tl-jareltest::before { background: var(--text-muted); border-color: var(--text-muted); }
.timeline li.tl-parandus_teatatud::before { background: var(--caution-line); border-color: var(--caution-line); }
.timeline li.tl-mootmine::before { background: var(--accent); border-color: var(--accent); }
.timeline time { font-weight: 600; margin-right: 6px; }
.tl-kind { display: inline-block; font-size: 0.82rem; font-weight: 600; background: var(--neutral-soft); border-radius: 999px; padding: 0 8px; margin-right: 6px; }
.tl-issue { color: var(--text-muted); font-size: 0.9rem; }
.strengths { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3) var(--s4); margin-bottom: var(--s2); }
.strengths ul { margin: 0; }
.strengths li.relevant { font-weight: 600; }
.facts { padding-left: 1.2em; }
.facts li { margin-bottom: 6px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table { border-collapse: collapse; width: 100%; background: var(--surface); }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.specs th, .measurements th { width: 32%; font-weight: 600; color: var(--text-muted); }
td.missing { color: var(--text-muted); font-style: italic; }
.user-reports-state { margin-top: 6px; }
.evidence-overview { background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--radius); padding: var(--s3) var(--s4); }
.evidence-overview > h2 { border: 0; margin-bottom: 4px; font-size: 1.1rem; }
.evidence-overview .panel { margin-top: 10px; }
.ev-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 20px; }
.ev-cell h3 { font-size: 0.95rem; margin-bottom: 4px; }
.ev-items { margin: 0; padding-left: 1.2em; font-size: 0.95rem; }
.ev-items li { margin-bottom: 2px; }
.verdict { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius); padding: 16px 18px; }
.verdict h2 { border: 0; margin-bottom: 8px; }
.fb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.fb-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.summary-lines { padding-left: 1.1em; }
.summary-lines li { margin-bottom: 6px; }

/* ---------- Võrdlus ---------- */
.compare-selection { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3) var(--s4); margin-bottom: var(--s3); }
.compare-selection .slots { margin-bottom: 4px; }
.selected-list { list-style: none; padding: 0; margin: 0 0 var(--s2); display: flex; flex-wrap: wrap; gap: 4px var(--s4); }
.selected-list li { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.selected-list li a { font-weight: 600; }
.compare-tools { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: var(--target); font-weight: 600; }
.check input { width: 20px; height: 20px; margin: 0; }
.scroll-hint { display: none; color: var(--text-muted); font-size: 0.9rem; margin: 0 0 4px; }
.compare-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.compare-table th, .compare-table td { min-width: 0; }
.compare-full-table th, .compare-full-table td { min-width: 200px; }
.compare-full-table th:first-child, .compare-full-table td:first-child { min-width: 140px; position: sticky; left: 0; background: var(--surface-2); z-index: 1; }
.compare-full-table thead th { background: var(--surface-2); }
.compare-full-table thead th:first-child { z-index: 2; }
.compare-table tr.row-same th:first-child { color: var(--text-muted); }
.cell-lines { list-style: none; padding: 0; margin: 0; }
.cell-lines li { margin-bottom: 4px; padding-left: 15px; position: relative; min-width: 0; overflow-wrap: anywhere; }
.cell-lines .kind-dot { position: absolute; left: 0; top: 0.45em; }
/* Lühivõrdlus: arvutis tabel kogu laiuses (külgkerimist pole), mobiilis teema kaupa plokid (vt @media) */
.compare-key { margin: var(--s4) 0 var(--s5); }
.compare-key h2 { margin-bottom: 4px; }
.compare-key-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.compare-key-table { table-layout: fixed; }
.compare-key-table th:first-child, .compare-key-table td:first-child { width: 20%; }
.compare-key-table thead th { background: var(--surface-2); font-weight: 600; }
.compare-key-table th[scope="row"] { background: var(--surface-2); font-weight: 600; }
.compare-key-table tr.row-relevant th[scope="row"] { box-shadow: inset 4px 0 0 var(--accent); }
.compare-key-table tr.row-note td { background: var(--surface-2); border-top: 0; padding-top: 4px; padding-bottom: 10px; }
.compare-key-table td { font-size: 0.95rem; }
.row-label { display: block; }
.kind-tag { display: inline-block; margin-top: 2px; font-size: 0.78rem; font-weight: 500; color: var(--text-muted); }
.cell-phone { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kind-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; border: 1px solid var(--line-strong); background: var(--surface); }
.kind-dot.kind-fakt { background: #cfd8dc; }
.kind-dot.kind-mootmine { background: var(--accent); border-color: var(--accent); }
.kind-dot.kind-hinnang { background: #f3d9a4; border-color: #a67a1c; }
.kind-dot.kind-kasutajad { background: var(--contrast-soft); border-color: var(--contrast-line); }
.kind-dot.kind-teadmata { background: transparent; border-style: dotted; }
.kind-dot.kind-stsenaarium { background: #fff; border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent-soft); }
.kind-dot.kind-segatud { background: linear-gradient(90deg, var(--accent) 50%, #cfd8dc 50%); border-color: var(--accent); }
.kind-legend { margin-top: var(--s2); }
.compare-full { margin-top: var(--s3); }
.compare-full .panel { margin-top: 10px; }
/* Sama võrdlus CSS-ruudustikuna (Design-artboard kasutab seda tabeli asemel) */
.cgrid { width: 100%; background: var(--surface); }
.cgrid-row { display: grid; grid-template-columns: var(--cols, 150px repeat(3, minmax(200px, 1fr))); border-bottom: 1px solid var(--line); }
.cgrid-row:last-child { border-bottom: 0; }
.cgrid-cell { padding: 8px 10px; min-width: 0; }
.cgrid-label { position: sticky; left: 0; background: var(--surface-2); font-weight: 600; z-index: 1; }
.cgrid-head .cgrid-cell { background: var(--surface-2); font-weight: 600; }
.cgrid-head .cgrid-label { z-index: 2; }
.cgrid-row.row-same .cgrid-label { color: var(--text-muted); }
.cgrid-note { grid-template-columns: 1fr !important; }
.cgrid-note .cgrid-cell { background: var(--surface-2); padding-top: 4px; padding-bottom: 10px; }
.cgrid-row.row-relevant .cgrid-label { box-shadow: inset 4px 0 0 var(--accent); }
/* Design-artboard lühivõrdlus (cgrid): arvutis kogu laius ilma külgkerimiseta, mobiilis teema kaupa plokid (vt @media) */
.compare-key-grid { width: 100%; }
.compare-key-grid .cgrid-row { grid-template-columns: var(--cols, minmax(150px, 20%) repeat(3, minmax(0, 1fr))); }
.compare-key-grid .cgrid-label { position: static; }
.compare-key-grid .cgrid-cell { font-size: 0.95rem; }
/* Tehnilised näitajad definitsiooniloendina (Design-artboard) */
.specs-list { margin: 0; background: var(--surface); }
.specs-row { display: grid; grid-template-columns: 40% 1fr; gap: 0 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.specs-row dt { font-weight: 600; color: var(--text-muted); }
.specs-row dd { margin: 0; }
.specs-row dd.missing { color: var(--text-muted); font-style: italic; }

/* ---------- Meetod ---------- */
.faq { margin: 0; }
.faq div { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.faq dt { font-weight: 650; font-size: 1.1rem; margin-bottom: 4px; }
.faq dd { margin: 0; max-width: var(--measure); }
.label-list div { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 4px 16px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.label-list dt { font-weight: 600; }
.label-list dd { margin: 0; }
.profile-levels dt .pill-count { display: inline-block; margin-top: 4px; font-weight: 500; font-size: 0.78rem; }
.method-technical { color: var(--text-muted); }

/* ---------- Arvuti: kokkuvõte kahes veerus (sama DOM-järjekord) ---------- */
@media (min-width: 760px) {
  .summary-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-areas:
      "lead lead"
      "issues strengths"
      "issues fits"
      "issues avoid"
      "issues worth"
      "altlink altlink";
    align-items: start;
  }
  .sum-lead { grid-area: lead; }
  .sum-issues { grid-area: issues; }
  .sum-strengths-cell { grid-area: strengths; }
  .sum-fits { grid-area: fits; }
  .sum-avoid { grid-area: avoid; }
  .sum-worth { grid-area: worth; }
  .sum-alt-link { grid-area: altlink; }
}

/* ---------- Mobiil ja kitsad vaated ---------- */
@media (max-width: 900px) {
  .scroll-hint { display: block; }
}
@media (max-width: 720px) {
  main { padding-top: var(--s4); }
  .price-grid { grid-template-columns: 1fr; }
  .phone-head { gap: var(--s3); }
  .phone-head .sil { width: 30px; height: 60px; }
  .site-head-row { gap: 0 var(--s2); }
  .brand { font-size: 1rem; }
  .site-nav { gap: 0; }
  .site-nav a { padding: 8px 7px; font-size: 0.95rem; }
  .sum-lead-text { font-size: 1rem; }
  .label-list div { grid-template-columns: 1fr; }
  .cgrid { width: max-content; min-width: 100%; }
  .cgrid-row { grid-template-columns: var(--cols-m, 110px repeat(3, 170px)); }
  .summary-block { padding: var(--s4); }
  .stages li:not(:last-child)::after { content: none; }
  .stages li { padding: 1px 7px; }
  .stages { font-size: 0.84rem; }
  .issue { padding: var(--s4); }
  .issue-facts { gap: 4px 12px; }
  /* Kataloogi teisesed filtrid avanevad nupust; aktiivne filter on alati nähtav */
  .filters-toggle { display: inline-flex; }
  .filters { display: none; }
  .filters.filters-open { display: flex; }
  /* Lühivõrdlus teema kaupa: kõik telefonid sama teema all, külgkerimist pole */
  .compare-key-wrap { border: 0; background: transparent; overflow: visible; }
  .compare-key-table, .compare-key-table tbody, .compare-key-table tr, .compare-key-table th, .compare-key-table td { display: block; width: auto; }
  .compare-key-table thead { display: none; }
  .compare-key-table tr { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: var(--s3); overflow: hidden; }
  .compare-key-table tr.row-note { margin-top: -13px; border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
  .compare-key-table th:first-child, .compare-key-table td:first-child { width: auto; }
  .compare-key-table th[scope="row"] { border-bottom: 1px solid var(--line); }
  .compare-key-table th[scope="row"], .compare-key-table td { padding: 10px 12px; }
  .compare-key-table td { border-bottom: 1px solid var(--line); }
  .compare-key-table td:last-child { border-bottom: 0; }
  .compare-key-table tr.row-note td { border-bottom: 0; padding-top: 8px; }
  .cell-phone { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }
  .compare-key-grid { width: auto; min-width: 0; }
  .compare-key-grid .cgrid-head { display: none; }
  .compare-key-grid .cgrid-row { grid-template-columns: 1fr; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: var(--s3); overflow: hidden; }
  .compare-key-grid .cgrid-row.cgrid-note { margin-top: -13px; border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
  .compare-key-grid .cgrid-cell { border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .compare-key-grid .cgrid-cell:last-child { border-bottom: 0; }
  .compare-key-grid .cgrid-label { background: var(--surface-2); }
  .compare-full-table th, .compare-full-table td { min-width: 170px; }
  .compare-full-table th:first-child, .compare-full-table td:first-child { min-width: 110px; }
}
@media (max-width: 420px) {
  .phone-head-media { display: none; }
  .card-grid, .alt-grid, .card-grid.sample-grid { grid-template-columns: 1fr; }
  .filters { gap: var(--s2); }
  .brand-mark { display: none; }
  .btn { white-space: normal; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .chip, .home-result { transition: background-color 120ms ease, border-color 120ms ease; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
