/* ==========================================================================
   sünnipaev.ee: disainisüsteem ja stiilid (v2)

   1–2. Fondid ja tokenid → assets/tokens.css
   3. Alus ja üldkomponendid (pealkirjad, nupud, lingid, sildid)
   4. Päis ja menüü
   5. Valikuvaade: pealkiri ja neli fotopaneeli
   6. Otsinguriba ja vorm
   7. Sihtrühma vaade
   8. Kataloog: vahelehed, kategooriad, kohakaardid
   9. Peoteenused
   10. Pakkujale
   11. Jalus
   12. Detailaken
   13. Liikumine ja vähendatud liikumine
   ========================================================================== */

/* ---------- 1–2. Fondid ja tokenid: assets/tokens.css (ühine avaliku lehe ja admini vahel) ---------- */

/* ---------- 3. Alus ja üldkomponendid ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--s-4));
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--yellow); color: var(--ink); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--s-4); top: -60px;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-s);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--s-3); }

.ic {
  width: 1.15em; height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Kursiivne rõhk pealkirjades: üks sõna seriifkirjas */
.hero-title em, .aud-title em, .section-title em, .search-strip-title em, .footer-mark em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  letter-spacing: -.01em;
}

.meta {
  font-size: var(--t-meta);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.section-title {
  font-family: var(--f-display);
  font-stretch: var(--stretch-display);
  font-weight: 720;
  font-size: var(--t-h2);
  line-height: .9;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.section-title em { font-size: 1.04em; }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--s-5) var(--s-7);
}
.section-head .section-title { margin-top: var(--s-3); }
.section-lead {
  max-width: 34ch;
  font-size: var(--t-lead);
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Nupud */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 52px;
  padding: 0 var(--s-5);
  border: 1px solid transparent;
  border-radius: var(--r-s);
  font-weight: 600;
  font-size: .9375rem;
  letter-spacing: .01em;
  text-decoration: none;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.btn .ic { transition: transform var(--dur-2) var(--ease); }
.btn:hover .ic { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--coral); color: var(--ink); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: var(--paper); }
.btn-light { background: var(--yellow); color: var(--ink); }
.btn-light:hover { background: var(--paper); }
.btn-sm { min-height: 40px; padding: 0 var(--s-4); font-size: var(--t-small); }

.link-btn {
  padding: 2px 0;
  border: 0;
  background: none;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--coral);
  text-underline-offset: 4px;
  transition: text-decoration-color var(--dur-1) var(--ease), text-underline-offset var(--dur-1) var(--ease);
}
.link-btn:hover { text-decoration-color: currentColor; text-underline-offset: 6px; }

/* Näidisandmete märk: üks kollane täpp kogu lehel */
.sample-dot {
  display: inline-block;
  flex: none;
  width: 9px; height: 9px;
  margin-right: var(--s-2);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 1px rgba(32, 36, 56, .35);
  vertical-align: .08em;
}

/* Sihtrühma toonid */
[data-tone="yellow"] { --tone: var(--yellow); --tone-ink: var(--ink); }
[data-tone="coral"] { --tone: var(--coral); --tone-ink: var(--ink); }
[data-tone="lilac"] { --tone: var(--lilac); --tone-ink: var(--ink); }
[data-tone="ink"] { --tone: var(--ink); --tone-ink: var(--yellow); }

/* Algvaate valik (html[data-view] seatakse juba <head>-is) */
html:not([data-view="audience"]) #sihtryhm { display: none; }
html[data-view="audience"] #valik { display: none; }

/* ---------- 4. Päis ja menüü ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 243, .92);
  -webkit-backdrop-filter: saturate(1.3) blur(10px);
  backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-in {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 7px;
  background: var(--ink);
  transition: transform var(--dur-2) var(--ease);
}
.brand-mark svg { width: 16px; height: 16px; fill: var(--coral); transition: transform var(--dur-3) var(--ease); }
.brand:hover .brand-mark svg { transform: rotate(90deg); }
.brand-word {
  font-family: var(--f-display);
  font-stretch: var(--stretch-display);
  font-weight: 750;
  font-size: 1.625rem;
  line-height: 1;
  letter-spacing: -.01em;
}
.brand-word em {
  margin-left: 1px;
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  font-size: 1.04em;
  color: var(--coral-deep);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  margin-left: auto;
}
.nav-list { display: flex; gap: var(--s-5); }
.nav-list a {
  position: relative;
  display: block;
  padding: var(--s-2) 0;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color var(--dur-1) var(--ease);
}
.nav-list a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1.5px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-2) var(--ease);
}
.nav-list a:hover { color: var(--ink); }
.nav-list a:hover::after { transform: scaleX(1); }

.change-type {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 40px;
  padding: 0 var(--s-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: transparent;
  font-size: .875rem;
  font-weight: 600;
  transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.change-type:has(.change-current:not([hidden])) { padding-left: 6px; }
.change-type:hover { border-color: var(--ink); background: var(--paper); }
.change-type .ic { width: 16px; height: 16px; transition: transform var(--dur-3) var(--ease); }
.change-type:hover .ic { transform: rotate(-180deg); }
.change-current {
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: var(--tone, var(--yellow));
  color: var(--tone-ink, var(--ink));
  font-size: .75rem;
  line-height: 1.2;
}

.header-actions { display: flex; align-items: center; gap: var(--s-1); }

.fav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--s-3);
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  font-weight: 600;
  transition: background-color var(--dur-1) var(--ease);
}
.fav-link:hover { background: var(--bg-2); }
.fav-link .ic { width: 20px; height: 20px; }
.fav-count { font-size: .875rem; font-variant-numeric: tabular-nums; }

.menu-btn {
  display: none;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
}
.menu-lines, .menu-lines::before, .menu-lines::after {
  display: block;
  width: 16px; height: 1.6px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur-2) var(--ease), background-color var(--dur-1);
}
.menu-lines { position: relative; }
.menu-lines::before, .menu-lines::after { content: ''; position: absolute; left: 0; }
.menu-lines::before { top: -5px; }
.menu-lines::after { top: 5px; }
.menu-btn[aria-expanded="true"] .menu-lines { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-lines::before { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-lines::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 959px) {
  :root { --header-h: 60px; }
  .header-in { gap: var(--s-3); }
  .brand-word { font-size: 1.5rem; }
  .menu-btn { display: grid; }
  .header-actions { margin-left: auto; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-5);
    margin: 0;
    padding: var(--s-2) var(--gutter) var(--s-6);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 40px -30px rgba(32, 36, 56, .3);
  }
  .main-nav.is-open { display: flex; animation: drop var(--dur-2) var(--ease); }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a {
    padding: var(--s-4) 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--f-display);
    font-stretch: var(--stretch-display);
    font-weight: 700;
    font-size: 2rem;
    line-height: 1;
    color: var(--ink);
  }
  .nav-list a::after { display: none; }
  .change-type { align-self: flex-start; min-height: 48px; font-size: .9375rem; }
}

@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- 5. Valikuvaade ---------- */

.select-view { padding-top: clamp(var(--s-6), 4vw, var(--s-7)); }

.hero-title {
  font-family: var(--f-display);
  font-stretch: var(--stretch-display);
  font-weight: 760;
  font-size: var(--t-hero);
  line-height: .86;
  letter-spacing: -.012em;
  text-wrap: balance;
}
.hero-title em { font-size: 1.06em; padding-right: .03em; }
.hero-title:focus { outline: none; }
.hero-title:focus-visible { outline: 3px solid var(--ink); outline-offset: 8px; }

.hero-sub {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: var(--s-4) var(--s-6);
  margin-top: clamp(var(--s-5), 2.6vw, var(--s-6));
}
.hero-lead {
  grid-column: 1 / 7;
  max-width: 30ch;
  font-size: var(--t-lead);
  line-height: 1.38;
  font-weight: 500;
  text-wrap: pretty;
}
.hero-hint {
  grid-column: 8 / 13;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s-3) var(--s-4);
  text-align: right;
  font-size: var(--t-small);
  color: var(--ink-2);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 40px;
  padding: 0 var(--s-4) 0 var(--s-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--paper);
  font-size: var(--t-small);
  transition: border-color var(--dur-1) var(--ease);
}
.back-link:hover { border-color: var(--ink); }
.back-link .ic { transition: transform var(--dur-2) var(--ease); }
.back-link:hover .ic { transform: translateX(-3px); }

/* Neli fotopaneeli: eri laius, ühine kõrgus. Fookuses/hõljutatud paneel laieneb. */
.aud-panels {
  display: flex;
  gap: 10px;
  height: clamp(420px, calc(100svh - 380px), 600px);
  margin-top: var(--s-5);
}
.aud-item {
  flex: var(--w, 1) 1 0%;
  min-width: 0;
  transition: flex-grow var(--dur-3) var(--ease);
}
.aud-item:hover, .aud-item:focus-within { flex-grow: calc(var(--w, 1) * 1.5); }

.aud-panel {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--r-m);
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
  color: var(--paper);
  text-align: left;
}
.aud-panel:focus-visible { outline-offset: 4px; }

.aud-panel-media, .aud-panel-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.aud-panel-media { z-index: -2; }
.aud-panel-media img {
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  transform: scale(1.01);
  transition: transform var(--dur-3) var(--ease), filter var(--dur-2) var(--ease);
}
.aud-panel:hover img, .aud-panel:focus-visible img { transform: scale(1.05); }
/* Loetavuse varjund ainult all, kus tekst on */
.aud-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(17, 19, 32, .82) 0%, rgba(17, 19, 32, .42) 34%, rgba(17, 19, 32, 0) 60%),
              linear-gradient(to bottom, rgba(17, 19, 32, .32) 0%, rgba(17, 19, 32, 0) 22%);
}

.aud-panel-top {
  position: absolute;
  top: var(--s-4); left: var(--s-5); right: var(--s-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
}
.aud-num {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1;
}
.aud-tag {
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: var(--tone);
  color: var(--tone-ink);
  font-size: var(--t-meta);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
[data-tone="ink"] .aud-tag { background: var(--paper); color: var(--ink); }

.aud-panel-body {
  position: absolute;
  left: var(--s-5); right: var(--s-5); bottom: var(--s-5);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-2);
}
.aud-panel-title {
  font-family: var(--f-display);
  font-stretch: var(--stretch-display);
  font-weight: 720;
  font-size: var(--t-h3);
  line-height: .92;
  letter-spacing: -.005em;
}
.aud-panel-desc {
  padding-right: 64px;
  font-size: .9375rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, .9);
  text-wrap: pretty;
}

.aud-go {
  position: absolute;
  right: var(--s-5); bottom: var(--s-5);
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  transition: background-color var(--dur-2) var(--ease);
}
.aud-go .ic { width: 20px; height: 20px; transition: transform var(--dur-2) var(--ease); }
.aud-panel:hover .aud-go, .aud-panel:focus-visible .aud-go { background: var(--coral); }
.aud-panel:hover .aud-go .ic, .aud-panel:focus-visible .aud-go .ic { transform: translateX(3px); }

.aud-current {
  position: absolute;
  top: 52px; left: var(--s-5);
  display: none;
  padding: 4px 9px;
  border-radius: var(--r-s);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--t-meta);
  font-weight: 600;
}
.aud-panel[aria-current="true"] .aud-current { display: block; }
.aud-panel[aria-current="true"] { box-shadow: inset 0 0 0 3px var(--paper); }

/* Tahvel: 2 × 2, vastastikku nihkes laiused */
@media (max-width: 1099px) {
  .hero-lead { grid-column: 1 / 8; }
  .hero-hint { grid-column: 8 / 13; }
  .aud-panels {
    display: grid;
    grid-template-columns: repeat(11, minmax(0, 1fr));
    grid-auto-rows: clamp(220px, calc((100svh - 330px) / 2), 340px);
    height: auto;
  }
  .aud-item:nth-child(1), .aud-item:nth-child(4) { grid-column: span 6; }
  .aud-panel-media img { object-position: var(--pos-m, 50% 50%); }
  .aud-item:nth-child(2), .aud-item:nth-child(3) { grid-column: span 5; }
}

@media (max-width: 760px) {
  .hero-sub { grid-template-columns: 1fr; }
  .hero-lead, .hero-hint { grid-column: 1; }
  .hero-hint { justify-content: flex-start; text-align: left; }
}

/* Mobiil: neli rida-paneeli, kõik korraga nähtaval */
@media (max-width: 699px) {
  .select-view { padding-top: var(--s-5); }
  .hero-title { line-height: .88; }
  .hero-sub { margin-top: var(--s-4); gap: var(--s-2); }
  .hero-lead { font-size: 1.0625rem; }
  .hero-hint { font-size: .8125rem; }
  .aud-panels {
    grid-template-columns: 1fr;
    grid-auto-rows: 116px;
    gap: var(--s-2);
    margin-top: var(--s-4);
  }
  .aud-item:nth-child(n) { grid-column: 1; }
  .aud-panel-media img { object-position: var(--pos-m, 50% 50%); }
  .aud-panel::after {
    background: linear-gradient(90deg, rgba(17, 19, 32, .8) 0%, rgba(17, 19, 32, .5) 45%, rgba(17, 19, 32, .05) 85%);
  }
  .aud-panel-top { top: var(--s-3); left: auto; right: var(--s-3); }
  .aud-num { display: none; }
  .aud-tag { padding: 4px 8px; font-size: .6875rem; }
  .aud-panel-body { left: var(--s-4); right: 64px; bottom: var(--s-4); gap: 4px; }
  .aud-panel-title { font-size: 1.875rem; }
  .aud-panel-desc { padding-right: 0; font-size: .8125rem; }
  .aud-go { right: var(--s-3); bottom: var(--s-3); width: 40px; height: 40px; }
  .aud-current { top: var(--s-3); left: var(--s-4); padding: 3px 7px; font-size: .6875rem; }
}

/* ---------- 6. Otsinguriba ja vorm ---------- */

.search-strip {
  margin-top: clamp(var(--s-7), 6vw, var(--s-9));
  padding: clamp(var(--s-6), 4vw, var(--s-7)) 0;
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}
.search-strip-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  align-items: center;
  gap: var(--s-5) var(--s-7);
}
.search-strip-title {
  font-family: var(--f-display);
  font-stretch: var(--stretch-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 1.4rem + 1.1vw, 2.375rem);
  line-height: .95;
  text-wrap: balance;
}
.search-strip-title em { display: block; color: var(--coral-deep); }

.search { container: search / inline-size; }
.search-row {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-2);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--paper);
  box-shadow: var(--shadow-2);
}
.search-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fld-extra-slot { display: contents; }

.fld {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 64px;
  margin: 0;
  padding: var(--s-2) var(--s-4);
  border: 0;
  border-radius: var(--r-s);
  transition: background-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.fld:hover { background: var(--bg); }
.fld:focus-within { background: var(--bg); box-shadow: inset 0 0 0 2px var(--ink); }
.fld label, .fld legend {
  padding: 0;
  font-size: var(--t-meta);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.fld legend { float: left; width: 100%; margin-bottom: 6px; }
.fld-checks { display: block; }
.fld-checks .checks { clear: both; }

.fld select, .fld input:not([type="checkbox"]) {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  margin-top: 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 1rem;
  font-weight: 500;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.fld select {
  padding-right: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23202438' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0 center / 16px;
  cursor: pointer;
}
.fld input[type="date"] { cursor: pointer; }
.fld input[type="date"]::-webkit-calendar-picker-indicator { opacity: .65; cursor: pointer; }
.fld input::placeholder { color: var(--muted); opacity: 1; }
.fld input[type="number"] { -moz-appearance: textfield; }
.fld input[type="number"]::-webkit-inner-spin-button,
.fld input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.stepper { display: flex; align-items: center; gap: var(--s-2); }
.stepper input { text-align: center; font-variant-numeric: tabular-nums; }
.step {
  flex: none;
  width: 32px; height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  font-size: 1.125rem;
  line-height: 1;
  transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.step:hover { border-color: var(--ink); }
.step:active { background: var(--bg-2); }

.checks { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); }
.check {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 32px;
  font-size: .9375rem;
  font-weight: 500;
  cursor: pointer;
}
.fld .check { padding: 0; font-size: .9375rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink); }
.check input {
  flex: none;
  width: 20px; height: 20px;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}

.search-submit { min-height: 56px; width: 100%; }

/* Vormi vead: punane joon välja all + selgitus vormi all (role="alert") */
.fld.has-error { box-shadow: inset 0 -2px 0 var(--coral-deep); }
.fld.has-error label { color: var(--coral-deep); }
.search-error {
  margin-top: var(--s-2);
  padding: var(--s-3) var(--s-4);
  border-left: 3px solid var(--coral-deep);
  border-radius: var(--r-s);
  background: var(--paper);
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--ink);
}

@container search (min-width: 720px) {
  .search-row { flex-direction: row; align-items: stretch; }
  .search-fields { flex: 1; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; }
  .search-fields > .fld + .fld, .fld-extra-slot > .fld { position: relative; }
  .search-fields > .fld + .fld::before, .fld-extra-slot > .fld::before {
    content: '';
    position: absolute;
    left: 0; top: 14px; bottom: 14px;
    width: 1px;
    background: var(--line);
  }
  .fld:hover::before, .fld:focus-within::before, .fld:hover + .fld::before { opacity: 0; }
  .search-submit { width: auto; min-width: 136px; padding: 0 var(--s-6); }
}
@container search (min-width: 401px) and (max-width: 719px) {
  .fld-extra-slot > .fld { grid-column: 1 / -1; }
}
@container search (max-width: 400px) {
  .search-fields { grid-template-columns: 1fr; }
  .search-fields > .fld + .fld, .fld-extra-slot > .fld { border-top: 1px solid var(--line); border-radius: 0; }
}

@media (max-width: 899px) {
  .search-strip-in { grid-template-columns: 1fr; }
  .search-strip-title em { display: inline; }
}

/* ---------- 7. Sihtrühma vaade ---------- */

.aud-view { padding: clamp(var(--s-5), 4vw, var(--s-7)) 0 0; }

.aud-hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-6) var(--s-6);
}
.aud-intro { grid-column: 1 / 6; grid-row: 1; align-self: center; }
.aud-figure { grid-column: 6 / 13; grid-row: 1; position: relative; }
.aud-search { grid-column: 1 / 13; grid-row: 2; }

.aud-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  font-size: .9375rem;
}
.tone-mark {
  width: 10px; height: 10px;
  border-radius: 2px;
  background: var(--tone);
  box-shadow: 0 0 0 1px var(--line-strong);
}
.aud-kicker strong { font-weight: 600; }
.aud-kicker .link-btn { margin-left: var(--s-1); font-size: var(--t-small); }

.aud-title {
  margin-top: var(--s-5);
  font-family: var(--f-display);
  font-stretch: var(--stretch-display);
  font-weight: 740;
  font-size: var(--t-h1);
  line-height: .88;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.aud-title em { font-size: 1.05em; }
.aud-title:focus { outline: none; }
.aud-title:focus-visible { outline: 3px solid var(--ink); outline-offset: 8px; }
.aud-desc {
  margin-top: var(--s-5);
  max-width: 34ch;
  font-size: var(--t-lead);
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}

.aud-photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-m);
  background: var(--bg-2);
}
.aud-photo img { width: 100%; height: 100%; object-fit: cover; }
.aud-age {
  position: absolute;
  top: var(--s-4); left: var(--s-4);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--tone);
  color: var(--tone-ink);
  font-size: var(--t-small);
  font-weight: 600;
}
.photo-credit {
  margin-top: var(--s-2);
  font-size: var(--t-meta);
  color: var(--muted);
  text-align: right;
}

.aud-view.is-entering .aud-intro,
.aud-view.is-entering .aud-figure,
.aud-view.is-entering .aud-search,
.select-view.is-entering .hero-title,
.select-view.is-entering .hero-sub,
.select-view.is-entering .aud-panels { animation: rise var(--dur-3) var(--ease) both; }
.aud-view.is-entering .aud-figure, .select-view.is-entering .hero-sub { animation-delay: 60ms; }
.aud-view.is-entering .aud-search, .select-view.is-entering .aud-panels { animation-delay: 120ms; }

@media (max-width: 899px) {
  .aud-hero { grid-template-columns: 1fr; gap: var(--s-5); }
  .aud-intro, .aud-figure, .aud-search { grid-column: 1; grid-row: auto; }
  .aud-title { margin-top: var(--s-4); }
  .aud-desc { margin-top: var(--s-4); }
  .aud-photo { aspect-ratio: 3 / 2; }
}
/* Tahvel: tekst ja foto kõrvuti, et otsing jääks esimesele ekraanile lähemale */
@media (min-width: 600px) and (max-width: 899px) {
  .aud-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .aud-intro { grid-column: 1; grid-row: 1; align-self: center; }
  .aud-figure { grid-column: 2; grid-row: 1; }
  .aud-search { grid-column: 1 / -1; grid-row: 2; }
  .aud-photo { aspect-ratio: 4 / 5; }
  .aud-title { font-size: clamp(2.5rem, 1rem + 4.4vw, 3.5rem); }
}

/* ---------- 8. Kataloog ---------- */

.catalog { padding: var(--section) 0; }
html[data-view="audience"] .catalog { padding-top: clamp(var(--s-8), 7vw, var(--s-9)); }

.tabs { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); }
.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: color var(--dur-1) var(--ease);
}
.tab::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-2) var(--ease);
}
.tab:hover { color: var(--ink); }
.tab[aria-pressed="true"] { color: var(--ink); }
.tab[aria-pressed="true"]::after { transform: scaleX(1); }
.tab-count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--bg-2);
  font-size: var(--t-meta);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.tab[aria-pressed="true"] .tab-count { background: var(--coral); }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-6); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 40px;
  padding: 0 var(--s-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: transparent;
  font-size: .9375rem;
  font-weight: 500;
  transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.chip:hover { border-color: var(--ink); background: var(--paper); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip-count { font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .chip-count { color: var(--yellow); }
.chip-note {
  padding: 1px 6px;
  border-radius: var(--r-s);
  background: var(--bg-2);
  color: var(--ink-2);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.chip[aria-pressed="true"] .chip-note { background: rgba(255, 255, 255, .16); color: var(--paper); }
.svc-bar { margin-top: var(--s-6); padding-bottom: var(--s-3); border-bottom: 0; }
.svc-bar + .svc-list { margin-top: 0; }
.svc-empty { border-top: 0; }

.results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-2) var(--s-5);
  margin-top: var(--s-5);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
}
.results-status { font-weight: 600; }
.sample-note {
  margin-left: auto;
  max-width: 52ch;
  font-size: .8125rem;
  line-height: 1.45;
  color: var(--ink-2);
}

/* Toimetuslik rütm: suur + keskmine rida, siis kolm väiksemat */
.results {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-8) var(--s-6);
  margin-top: var(--s-6);
}
.results:empty { display: none; }
.results > li { grid-column: span 4; animation: rise var(--dur-2) var(--ease) both; animation-delay: calc(min(var(--i, 0), 6) * 40ms); }
.results > li:nth-child(5n + 1) { grid-column: span 7; }
.results > li:nth-child(5n + 2) { grid-column: span 5; }
.results > li:nth-child(5n + 2) .vcard-ph { aspect-ratio: 14 / 15; }
.results > li:nth-child(5n + 1) .vcard-title { font-size: var(--t-h3); }
/* Rütmi lõpp ilma aukudeta: üksik viimane kaart venib täislaiuseks, kaks viimast jagavad rea */
.results > li:nth-child(5n + 1):last-child,
.results > li:nth-child(5n + 3):last-child { grid-column: 1 / -1; }
.results > li:nth-child(5n + 1):last-child .vcard-ph,
.results > li:nth-child(5n + 3):last-child .vcard-ph { aspect-ratio: 5 / 2; }
.results > li:nth-child(5n + 3):nth-last-child(2),
.results > li:nth-child(5n + 4):last-child { grid-column: span 6; }

@media (max-width: 999px) {
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7) var(--s-5); }
  .results > li:nth-child(n) { grid-column: span 1; }
  .results > li:nth-child(n) .vcard-ph { aspect-ratio: 4 / 3; }
  .results > li:nth-child(3n + 1) { grid-column: 1 / -1; }
  .results > li:nth-child(3n + 1) .vcard-ph { aspect-ratio: 16 / 9; }
  .results > li:nth-child(n):last-child .vcard-ph { aspect-ratio: 4 / 3; }
  .results > li:nth-child(3n + 2):last-child { grid-column: 1 / -1; }
  .results > li:nth-child(3n + 1):last-child .vcard-ph,
  .results > li:nth-child(3n + 2):last-child .vcard-ph { aspect-ratio: 16 / 9; }
}
@media (max-width: 599px) {
  .tabs { flex-wrap: nowrap; gap: var(--s-4); overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; font-size: .9375rem; }
  .results { grid-template-columns: 1fr; gap: var(--s-7); }
  .results > li:nth-child(3n + 1) .vcard-ph { aspect-ratio: 4 / 3; }
  .results > li:nth-child(5n + 1) .vcard-title, .results > li:nth-child(n) .vcard-title { font-size: var(--t-h4); }
  /* Mobiil: esimene kaart suurelt, ülejäänud kompaktsete ridadena */
  .results > li:not(:first-child) .vcard {
    display: grid;
    grid-template-columns: 38% minmax(0, 1fr);
    gap: var(--s-4);
    align-items: start;
  }
  .results > li:nth-child(n):not(:first-child) .vcard-ph { aspect-ratio: 4 / 5; }
  .results > li:nth-child(n):last-child { grid-column: 1; }
  .results > li:not(:first-child) .vcard-body { padding-top: 0; }
  .results > li:not(:first-child) .vcard-meta { flex-direction: column; align-items: flex-start; gap: 2px; }
  .results > li:not(:first-child) .vcard-title { font-size: 1.3125rem; }
  .results > li:not(:first-child) .vcard-facts { flex-direction: column; gap: var(--s-1); margin-top: var(--s-3); }
  .results > li:not(:first-child) .vcard-facts > div { display: flex; gap: var(--s-2); align-items: baseline; }
  .results > li:not(:first-child) .fav-btn { top: auto; bottom: var(--s-2); left: calc(38% - 52px); right: auto; }
  .results > li:not(:first-child) .sample-badge { top: var(--s-2); left: var(--s-2); }
  .results { gap: var(--s-6); }
}

.vcard { position: relative; }
.vcard-ph {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-m);
  background: var(--bg-2);
}
.vcard-ph img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-3) var(--ease);
}
.vcard:hover .vcard-ph img { transform: scale(1.035); }

.ph-fallback {
  display: grid;
  place-items: center;
  width: 100%; height: 100%;
  background: var(--lilac);
}
.ph-fallback svg { width: 22%; max-width: 64px; fill: var(--ink); }

.sample-badge {
  position: absolute;
  top: var(--s-3); left: var(--s-3);
  padding: 4px 8px;
  border-radius: var(--r-s);
  background: var(--bg);
  color: var(--ink);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.fav-btn {
  position: absolute;
  z-index: 2;
  top: var(--s-2); right: var(--s-2);
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.fav-btn .ic { width: 20px; height: 20px; transition: fill var(--dur-1) var(--ease); }
.fav-btn:hover { transform: scale(1.06); }
.fav-btn:active { transform: scale(.96); }
.fav-btn[aria-pressed="true"] { color: var(--coral-deep); }
.fav-btn[aria-pressed="true"] .ic { fill: var(--coral); animation: pop var(--dur-2) var(--ease); }
.fav-btn--flat { position: static; box-shadow: none; border: 1px solid var(--line-strong); }
@keyframes pop { 50% { transform: scale(1.22); } }

.vcard-body { padding-top: var(--s-4); }
.vcard-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-1) var(--s-4);
  font-size: var(--t-meta);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.vcard-city { display: inline-flex; align-items: center; gap: 4px; letter-spacing: .04em; text-transform: none; font-size: .8125rem; font-weight: 500; }
.vcard-city .ic { width: 14px; height: 14px; }
.vcard-title {
  margin-top: var(--s-2);
  font-family: var(--f-display);
  font-stretch: var(--stretch-title);
  font-weight: 700;
  font-size: var(--t-h4);
  line-height: 1;
  letter-spacing: -.01em;
}
.vcard-open {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  letter-spacing: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: text-decoration-color var(--dur-1) var(--ease);
}
/* Kogu kaart on klikitav, aga fookuspunkt on üks */
.vcard-open::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-m); }
.vcard-open:focus-visible { outline: none; }
.vcard-open:focus-visible::after { outline: 3px solid var(--ink); outline-offset: 6px; }
.vcard:hover .vcard-open { text-decoration-color: var(--coral); }

.vcard-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-6);
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
}
.vcard-facts dt { font-size: var(--t-meta); color: var(--muted); }
.vcard-facts dd { font-size: .9375rem; font-weight: 600; }

.empty {
  display: grid;
  justify-items: center;
  gap: var(--s-3);
  margin-top: var(--s-6);
  padding: var(--s-8) var(--s-4);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.empty-mark { width: 28px; height: 28px; fill: var(--coral); }
.empty-title {
  font-family: var(--f-display);
  font-stretch: var(--stretch-title);
  font-size: var(--t-h3);
  font-weight: 700;
  line-height: 1;
  text-wrap: balance;
}
.empty p { max-width: 44ch; color: var(--ink-2); }
.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-3);
}

.more-row { display: flex; justify-content: center; margin-top: var(--s-8); }
.more-row:has(> [hidden]) { display: none; }

/* ---------- 9. Peoteenused ---------- */

.services {
  padding: var(--section) 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.svc-list { margin-top: var(--s-7); border-bottom: 1px solid var(--line); }
.svc {
  display: grid;
  grid-template-columns: 48px 168px minmax(0, 1fr) 180px auto;
  align-items: center;
  gap: var(--s-4) var(--s-6);
  padding: var(--s-5) 0;
  border-top: 1px solid var(--line);
}
.svc-num {
  align-self: start;
  padding-top: 2px;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--muted);
}
.svc-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-s);
  background: var(--bg-2);
}
.svc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-3) var(--ease); }
.svc:hover .svc-thumb img { transform: scale(1.05); }
.svc-cat { font-size: .8125rem; color: var(--ink-2); }
.sample-tag {
  display: inline-block;
  margin-left: var(--s-2);
  padding: 2px 6px;
  border-radius: var(--r-s);
  background: var(--bg-2);
  color: var(--ink);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  vertical-align: 1px;
}
.svc-name {
  margin-top: var(--s-1);
  font-family: var(--f-display);
  font-stretch: var(--stretch-title);
  font-weight: 700;
  font-size: var(--t-h4);
  line-height: 1.05;
  letter-spacing: -.01em;
}
.svc-desc { margin-top: var(--s-1); max-width: 56ch; color: var(--ink-2); font-size: .9375rem; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s-3); }
.svc-tags li {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--tone);
  color: var(--tone-ink);
  font-size: var(--t-meta);
  font-weight: 600;
  white-space: nowrap;
}
.svc-price { font-weight: 600; }
.svc-price-label { display: block; font-size: var(--t-meta); font-weight: 400; color: var(--muted); }
.svc-actions { display: flex; align-items: center; gap: var(--s-2); }

@media (max-width: 1099px) {
  .svc { grid-template-columns: 140px minmax(0, 1fr) auto; }
  .svc-num { display: none; }
  .svc-price { grid-column: 2; grid-row: 2; }
  .svc-actions { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .svc-thumb { grid-row: 1 / 3; align-self: start; }
}
@media (max-width: 899px) {
  .section-head { grid-template-columns: 1fr; }
}
@media (max-width: 359px) {
  .tabs { gap: var(--s-3); }
  .tab { font-size: .875rem; }
}
@media (max-width: 599px) {
  .svc { grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-3) var(--s-4); align-items: start; }
  .svc-thumb { grid-row: 1; }
  .svc-price, .svc-actions { grid-column: 2; grid-row: auto; }
  .svc-actions { justify-content: flex-start; }
}

/* ---------- 10. Pakkujale ---------- */

.provider {
  padding: var(--section) 0;
  background: var(--ink);
  color: var(--on-ink);
}
.provider-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-7) clamp(var(--s-6), 6vw, var(--s-9));
  align-items: start;
}
.provider .meta { color: var(--on-ink-2); }
.provider .section-title { margin-top: var(--s-3); color: var(--paper); }
.provider .section-title em { color: var(--yellow); }
.provider-lead { margin-top: var(--s-5); max-width: 40ch; color: var(--on-ink-2); font-size: 1.0625rem; }
.provider-points { margin-top: var(--s-6); display: grid; gap: var(--s-4); max-width: 44ch; counter-reset: pt; }
.provider-points li {
  position: relative;
  padding: var(--s-4) 0 0 var(--s-7);
  border-top: 1px solid rgba(255, 255, 255, .14);
  counter-increment: pt;
}
.provider-points li::before {
  content: counter(pt, decimal-leading-zero);
  position: absolute;
  left: 0; top: var(--s-4);
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.1;
  color: var(--yellow);
}

.provider-form {
  display: grid;
  gap: var(--s-5);
  padding: clamp(var(--s-5), 3vw, var(--s-6));
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r-m);
  background: rgba(255, 255, 255, .03);
}
.provider-form-note { font-size: var(--t-small); color: var(--on-ink-2); }
.provider-form-note strong { color: var(--yellow); }
.pf-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.pf-field { display: grid; gap: var(--s-2); min-width: 0; margin: 0; padding: 0; border: 0; }
.pf-field label, .pf-field legend {
  padding: 0;
  font-size: var(--t-meta);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--on-ink);
}
.pf-field legend { margin-bottom: var(--s-2); }
.pf-field input:not([type="checkbox"]), .pf-field select {
  width: 100%;
  min-height: 50px;
  padding: 0 var(--s-4);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: var(--r-s);
  background: rgba(255, 255, 255, .05);
  color: var(--paper);
  font-size: 1rem;
  transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.pf-field select option { color: var(--ink); background: var(--paper); }
.pf-field input:hover, .pf-field select:hover { border-color: rgba(255, 255, 255, .45); }
.pf-field input:focus-visible, .pf-field select:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
  background: rgba(255, 255, 255, .09);
}
.pf-field [aria-invalid="true"] { border-color: var(--coral); }
.pf-checks { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.pf-checks .check { text-transform: none; letter-spacing: 0; font-size: .9375rem; font-weight: 500; color: var(--on-ink); }
.check--dark input { accent-color: var(--yellow); }
.check--dark input:focus-visible { outline-color: var(--yellow); }
.provider-form .btn { justify-self: start; }
.provider-form .btn:focus-visible { outline-color: var(--yellow); }
.provider-status { min-height: 1.5em; font-size: .9375rem; }
.provider-status.is-ok { color: var(--yellow); }
.provider-status.is-error { color: #FFB4A3; }

@media (max-width: 899px) { .provider-in { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .pf-row { grid-template-columns: 1fr; }
  .provider-form .btn { justify-self: stretch; }
}

/* ---------- 11. Jalus ---------- */

.site-footer { padding: var(--s-8) 0 var(--s-6); }
.footer-in {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1.1fr);
  gap: var(--s-6) clamp(var(--s-5), 5vw, var(--s-8));
}
.footer-about { max-width: 38ch; color: var(--ink-2); font-size: .9375rem; }
.footer-nav { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); }
.footer-nav a { font-weight: 500; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; text-decoration-color: var(--coral); text-underline-offset: 4px; }
.footer-h { font-size: var(--t-meta); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.footer-privacy p { margin-top: var(--s-2); color: var(--ink-2); font-size: .9375rem; }
.footer-privacy .link-btn { margin-top: var(--s-3); font-size: .9375rem; }
.footer-status { min-height: 1.4em; }

.footer-bottom { margin-top: var(--s-8); }
.footer-mark {
  font-family: var(--f-display);
  font-stretch: 75%;
  font-weight: 780;
  font-size: clamp(3.5rem, 20vw, 20rem);
  line-height: .8;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.footer-mark em { color: var(--coral-deep); }
.footer-credits {
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  font-size: var(--t-small);
  color: var(--ink-2);
}
.footer-credits summary { width: fit-content; min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 500; }
.footer-credits summary::before { content: '+'; width: 1.2em; font-weight: 600; }
.footer-credits[open] summary::before { content: '−'; }
.footer-credits summary::-webkit-details-marker { display: none; }
.footer-credits summary { list-style: none; }
.footer-credits p { margin-top: var(--s-3); max-width: 90ch; }
.footer-credits a { color: var(--ink); }

@media (max-width: 899px) {
  .footer-in { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .footer-in { grid-template-columns: 1fr; } }

.noscript {
  position: fixed;
  left: var(--s-4); right: var(--s-4); bottom: var(--s-4);
  padding: var(--s-4);
  border-radius: var(--r-s);
  background: var(--ink);
  color: var(--paper);
}

/* ---------- 12. Detailaken ---------- */

.item-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--r-m);
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(17, 19, 32, .55);
  overflow: hidden;
}
.item-dialog[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  animation: dialog-in var(--dur-2) var(--ease);
}
.item-dialog::backdrop { background: rgba(17, 19, 32, .6); }
.item-dialog[open]::backdrop { animation: fade var(--dur-2) var(--ease); }

.dlg-media { position: relative; min-height: 100%; background: var(--bg-2); }
.dlg-media img, .dlg-media .ph-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dlg-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: clamp(var(--s-5), 3.4vw, var(--s-7));
  overflow-y: auto;
}
.dlg-body > .meta { padding-right: 52px; }
.dlg-close {
  position: absolute;
  top: var(--s-3); right: var(--s-3);
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  transition: border-color var(--dur-1) var(--ease);
}
.dlg-close:hover { border-color: var(--ink); }
.dlg-title {
  font-family: var(--f-display);
  font-stretch: var(--stretch-display);
  font-weight: 740;
  font-size: clamp(2.125rem, 1.6rem + 1.6vw, 3rem);
  line-height: .92;
  letter-spacing: -.01em;
}
.dlg-desc { color: var(--ink-2); }
.dlg-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-5); }
.dlg-facts > div { padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.dlg-facts dt { font-size: var(--t-meta); color: var(--muted); }
.dlg-facts dd { font-weight: 600; }
.dlg-note { display: flex; align-items: baseline; font-size: var(--t-small); color: var(--ink-2); }
.dlg-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-1); }
.dlg-actions [data-dlg-fav][aria-pressed="true"] { background: var(--coral); color: var(--ink); }
.dlg-actions [data-dlg-fav][aria-pressed="true"] .ic { fill: var(--ink); }

@media (max-width: 759px) {
  .item-dialog[open] { grid-template-columns: 1fr; overflow-y: auto; }
  .dlg-media { min-height: 0; aspect-ratio: 16 / 10; }
  .dlg-body { position: static; overflow: visible; }
  .dlg-body > .meta { padding-right: 0; }
}

/* ---------- 13. Liikumine ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes fade { from { opacity: 0; } }

::view-transition-old(root),
::view-transition-new(root) { animation-duration: var(--dur-2); animation-timing-function: var(--ease); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
