/* ninatark.ee – shared stylesheet, built on the confirmed CVI (ninatark-cvi.md, 2026-11-27).
   Colours, type, borders, shadows and component sizes come from the CVI tables.
   Light theme only: the CVI defers the dark theme. */

:root {
  /* layout: white header bar, then one 1080px column of outlined cards on cream;
     Piiluja peeks over the TOP edge of a card and lets the nose hang over it */
  color-scheme: light;
  --taust: #FDF3DC;
  --pind: #FFFFFF;
  --must: #000000;
  --tekst2: #555555;
  --kollane: #FFD43B;
  --roosa: #FF9EC4;
  --sinine: #8ECBFF;
  --roheline: #A8F0B4;
  --fookus: #2A78D6;
  --kiri: "Rubik", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --aar: 3px solid var(--must);
  --vari: 4px 4px 0 var(--must);
  --ps: 150px; /* Piiluja width; never below 96px */
}

/* Fonts are served from this site (OFL licence texts are in fondid/). Rubik is one variable file, weights 400 to 800. */
@font-face { font-family: "Rubik"; src: url("fondid/rubik.woff") format("woff"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("fondid/dm-mono-500.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0; background: var(--taust); color: var(--must);
  font-family: var(--kiri); font-size: 16px; font-weight: 400; line-height: 1.5;
}
img, svg { max-width: 100%; }
a { color: var(--must); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--tekst2); }
:focus-visible { outline: 3px solid var(--fookus); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(32px, 5.2vw, 46px); line-height: 1.08; letter-spacing: -1px; }
h2 { font-size: clamp(24px, 3.2vw, 30px); line-height: 1.13; letter-spacing: -0.5px; }
h3 { font-size: 22px; line-height: 1.18; letter-spacing: -0.3px; }
p { margin: 0; max-width: 62ch; }
ul { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 700; }
.koos { white-space: nowrap; }
[hidden] { display: none !important; }

/* header: logo as "mark + text" (no box next to the mark) */
.pais { background: var(--pind); border-bottom: var(--aar); }
.pais > div { max-width: 1080px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; color: var(--must); }
.logo img { width: 38px; height: 38px; display: block; }
.logo span { font-size: 19px; font-weight: 800; letter-spacing: -0.5px; line-height: 1; }
.menyy { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; font-size: 14px; font-weight: 700; }

.leht { max-width: 1080px; margin: 0 auto; padding: 0 20px 56px; display: flex; flex-direction: column; gap: 44px; }
.virn { display: flex; flex-direction: column; gap: 12px; }
.virn-l { display: flex; flex-direction: column; gap: 20px; }

/* small label */
.silt {
  display: inline-block; align-self: flex-start;
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px; line-height: 16px; text-transform: uppercase;
  border: 2.5px solid var(--must); border-radius: 6px; padding: 2px 8px; background: var(--pind);
}
.silt.kollane { background: var(--kollane); } .silt.roosa { background: var(--roosa); }
.silt.sinine { background: var(--sinine); } .silt.roheline { background: var(--roheline); }

/* card */
.kaart { border: var(--aar); border-radius: 10px; box-shadow: var(--vari); background: var(--pind); padding: 22px; }
.kaart.kollane { background: var(--kollane); } .kaart.roosa { background: var(--roosa); }
.kaart.roheline { background: var(--roheline); } .kaart.sinine { background: var(--sinine); }
.kaart .kaart { box-shadow: none; }
.piiluja-lause { font-size: 18px; line-height: 24px; font-weight: 700; }
.vaike { font-size: 13px; line-height: 18px; font-weight: 500; }
.tuhm { color: var(--tekst2); }

/* Piiluja: head clipped at the card's top edge, nose over it */
.piilub { position: relative; margin-top: calc(var(--ps) * 0.56); }
.piilub > .piiluja {
  position: absolute; right: 28px; top: calc(var(--ps) * -0.643);
  width: var(--ps); height: var(--ps); max-width: none; pointer-events: none;
}

/* list with square marker */
.punktid { display: flex; flex-direction: column; gap: 10px; }
.punktid li { position: relative; padding-left: 22px; max-width: 64ch; }
.punktid li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 9px; height: 9px; background: var(--must); border-radius: 2px; }

/* button: one yellow primary per view, the rest white */
.nupud { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.nupp {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  font-family: inherit; font-weight: 700; font-size: 14px; line-height: 18px; white-space: nowrap;
  color: var(--must); background: var(--pind); text-decoration: none; cursor: pointer;
  border: 2.5px solid var(--must); border-radius: 8px; box-shadow: 3px 3px 0 var(--must); padding: 9px 14px;
  transition: transform 80ms, box-shadow 80ms;
}
.nupp.peamine { background: var(--kollane); }
.nupp:hover { color: var(--must); }
.nupp:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--must); }
@media (prefers-reduced-motion: reduce) { .nupp { transition: none; } html { scroll-behavior: auto; } }
.teade { font-size: 14px; font-weight: 700; min-height: 21px; }

/* placeholders and preview-only notes (hidden when eelvaade: false) */
.kt { background: repeating-linear-gradient(135deg, #FFDCEB 0 8px, #FFF1F7 8px 16px); outline: 2px dashed var(--must); outline-offset: 1px; padding: 0 5px; font-weight: 700; }
.mk { display: none; }
html[data-eelvaade] .mk {
  display: block; border: 2px dashed var(--must); border-radius: 8px; background: #FFF1F7;
  padding: 9px 12px; font-size: 13px; line-height: 18px; font-weight: 500; max-width: none;
}
html[data-eelvaade] .mk::before { content: "Eelvaate märkus · "; font-weight: 800; }
html[data-eelvaade] .mk.pilt { min-height: 120px; display: flex; align-items: center; justify-content: center; text-align: center; }
html[data-eelvaade] .mk.pilt::before { content: ""; }

/* form */
.vorm { display: flex; flex-direction: column; gap: 16px; max-width: 540px; }
.vali { display: flex; flex-direction: column; gap: 5px; font-size: 13px; line-height: 18px; font-weight: 700; }
.vali input[type="email"] {
  font-family: inherit; font-size: 16px; font-weight: 400; color: var(--must); background: var(--pind);
  border: 2.5px solid var(--must); border-radius: 8px; min-height: 44px; padding: 8px 12px; width: 100%;
}
.abi { font-size: 12px; font-weight: 400; color: var(--tekst2); }
.kaart.roosa .abi { color: var(--must); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.valikud { display: flex; gap: 8px 18px; flex-wrap: wrap; }
.valikud label, .noustun { display: flex; gap: 9px; align-items: flex-start; }
.noustun { font-size: 14px; line-height: 20px; }
input[type="radio"], input[type="checkbox"] { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--must); }

/* hero */
.avang { padding-top: 40px; /* the right card carries Piiluja, so it brings its own top margin */
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 36px; align-items: start; }
.avang > * { min-width: 0; }
.avang .juht { font-size: 17px; line-height: 1.45; max-width: 52ch; }
.kutse { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 16px; }

/* four indicators side by side: state is a word in the label, colour only supports it */
.naitajad { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.naitajad .kaart { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.naitajad .nimi { font-size: 13px; line-height: 18px; font-weight: 700; margin-top: 4px; }
.naitajad .arv { font-size: 30px; line-height: 34px; font-weight: 800; letter-spacing: -0.5px; white-space: nowrap; }
.naitajad .selgitus { font-size: 12px; line-height: 16px; font-weight: 500; }

.ruudustik { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.ruudustik.kolm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ruudustik > * { min-width: 0; display: flex; flex-direction: column; gap: 10px; }

.tulekul { display: flex; flex-wrap: wrap; gap: 8px; }
.tulekul li { border: 2.5px solid var(--must); border-radius: 8px; padding: 5px 11px; font-size: 14px; font-weight: 700; background: var(--pind); }

.faktid { margin: 0; }
.faktid > div { border-top: 2px solid var(--must); padding: 10px 0; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 4px 24px; }
.faktid dt { font-size: 13px; line-height: 24px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; }
.faktid dd { margin: 0; max-width: 66ch; }

.kkk { margin: 0; }
.kkk > div { border-top: 2px solid var(--must); padding: 14px 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 6px 28px; }
.kkk > div:last-child { border-bottom: 2px solid var(--must); }
.kkk dt { font-weight: 700; font-size: 18px; line-height: 24px; }
.kkk dd { margin: 0; max-width: 60ch; }

/* footer */
.jalus { border-top: var(--aar); padding-top: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 20px; }
.jalus p { max-width: 80ch; }
.rida { display: flex; gap: 6px 22px; flex-wrap: wrap; align-items: center; font-weight: 700; }
.linginupp { font: inherit; font-weight: 700; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }

/* analytics consent: small, both answers look the same */
.kypsis { position: fixed; left: 16px; bottom: 16px; z-index: 10; width: min(340px, calc(100% - 32px)); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 20px; }
.kypsis[hidden] { display: none; }
.kypsis .nupp { flex: 1; }

/* legal text page */
.tekst { max-width: 760px; display: flex; flex-direction: column; gap: 14px; padding-top: 36px; }
.tekst h2 { font-size: 24px; margin-top: 18px; }
.tekst h3 { font-size: 18px; margin-top: 6px; }
.tekst p, .tekst li { max-width: 70ch; }
.tekst ul { display: flex; flex-direction: column; gap: 7px; padding-left: 20px; list-style: square; }
.tekst code { font-family: var(--mono); font-size: 0.92em; }
.tabel { overflow-x: auto; border: var(--aar); border-radius: 10px; background: var(--pind); }
table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 20px; min-width: 520px; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 2px solid var(--must); }
th { font-size: 13px; font-weight: 700; background: var(--kollane); }
tr:last-child td { border-bottom: 0; }

@media (max-width: 820px) {
  :root { --ps: 112px; }
  .leht { gap: 36px; }
  .avang { grid-template-columns: minmax(0, 1fr); padding-top: 28px; gap: 28px; }
  .kaart { padding: 18px; }
  .piilub > .piiluja { right: 16px; }
  .ruudustik, .ruudustik.kolm { grid-template-columns: minmax(0, 1fr); }
  .kkk > div, .faktid > div { grid-template-columns: minmax(0, 1fr); }
  .menyy .lingid { display: none; }
  .naitajad { gap: 10px; }
  .naitajad .kaart { padding: 10px 12px; }
  .naitajad .arv { font-size: 24px; line-height: 30px; }
}
