/* Dr. Pilv - leht. Mobiil kõigepealt; murdepunktid 480 / 768 / 1024 / 1280. */

/* ---------- Alus ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--pilv);
  color: var(--tint);
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 64px;
  caret-color: var(--emajogi);
  scrollbar-width: thin;
  scrollbar-color: var(--vihm) transparent;
  interpolate-size: allow-keywords;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--pilv);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  font-stretch: 100%;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

::selection { background: var(--taevas); color: var(--tint); }

a {
  color: var(--emajogi);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-xs); }

.tnum { font-variant-numeric: tabular-nums; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--emajogi);
  color: var(--pilv-valge);
  border-radius: var(--r-sm);
  font-size: var(--fs-label);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus-visible { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter-x));
  margin-inline: auto;
  padding-inline: var(--gutter-x);
}

.section { padding-block: var(--section-y); }

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Kiri ---------- */
.display {
  font-size: var(--fs-display);
  font-weight: 340;
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-stretch: 118%;
  text-wrap: balance;
}
.numeral {
  font-size: var(--fs-numeral);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  font-stretch: 125%;
  font-variant-numeric: tabular-nums;
}
.headline {
  font-size: var(--fs-headline);
  font-weight: 380;
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-stretch: 112%;
  text-wrap: balance;
}
.title {
  font-size: var(--fs-title);
  font-weight: 560;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-stretch: 104%;
}
.body-lg { font-size: var(--fs-body-lg); line-height: 1.55; max-width: 60ch; }
.label { font-size: var(--fs-label); font-weight: 600; line-height: 1.3; letter-spacing: 0.01em; }
.small { font-size: var(--fs-small); font-weight: 450; line-height: 1.45; }
.muted { color: var(--tint-pehme); }
p { max-width: 66ch; }

/* ---------- Nupud ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--emajogi); color: var(--pilv-valge); box-shadow: var(--shadow-tilk); }
.btn--primary:hover { background: var(--emajogi-sugav); }
.btn--secondary { background: var(--pilv-valge); color: var(--emajogi); border-color: var(--joon); }
.btn--secondary:hover { background: var(--taevas); color: var(--emajogi-sugav); }

.link-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: var(--fs-label);
  font-weight: 600;
  text-decoration: underline;
}
.link-action .icon { width: 16px; height: 16px; }

/* Kõnenupp - saidi peamine tegevus */
.call {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 22px 10px 12px;
  border-radius: var(--r-full);
  background: var(--emajogi);
  color: var(--pilv-valge);
  text-decoration: none;
  box-shadow: var(--shadow-tilk);
  transition: background-color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out);
}
.call:hover { background: var(--emajogi-sugav); }
.call:active { transform: scale(0.97); }
.call:focus-visible { border-radius: var(--r-full); }
.call__drop {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgb(252 253 253 / 0.14);
}
.call__drop .icon { width: 17px; height: 17px; }
.call__num {
  font-size: var(--fs-title);
  font-weight: 560;
  font-stretch: 104%;
  letter-spacing: 0;
  line-height: 1;
}
.call--sm { min-height: 44px; padding: 6px 16px 6px 6px; gap: 10px; }
.call--sm .call__num { font-size: 1.0625rem; }
.call--sm .call__drop { width: 32px; height: 32px; }

/* Staatus */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: var(--udu);
  color: var(--tint-pehme);
  font-size: var(--fs-label);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.status[hidden] { display: none; }
.status__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.status--open { background: var(--pilv-valge); color: var(--sammal); box-shadow: inset 0 0 0 1px var(--joon); }
.status--open .status__dot::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1.5px solid var(--sammal);
  opacity: 0;
  animation: ring 6s var(--ease-out) infinite;
}
@keyframes ring {
  0% { transform: scale(1); opacity: 0.7; }
  40% { transform: scale(2.8); opacity: 0; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* Kiibid */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 6px 14px;
  border-radius: var(--r-full);
  background: var(--udu);
  font-size: var(--fs-small);
  font-weight: 450;
  line-height: 1.45;
}

/* ---------- Päis ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui) var(--ease-out);
}
.header.is-scrolled {
  background: rgb(244 246 246 / 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-pilv);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
  max-width: calc(var(--container) + 2 * var(--gutter-x));
  margin-inline: auto;
  padding-inline: var(--gutter-x);
  transition: height var(--dur-ui) var(--ease-out);
}
.header.is-scrolled .header__inner { height: 60px; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--emajogi);
  text-decoration: none;
}
.logo__mark {
  width: 38px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.logo__mark .logo-drop, .logo-drop { fill: currentColor; stroke: none; }
.logo__word {
  font-size: var(--fs-title);
  font-weight: 500;
  font-stretch: 112%;
  letter-spacing: -0.015em;
  line-height: 1;
}

.nav { display: none; }
.nav ul { display: flex; gap: 28px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 4px;
  color: var(--tint);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  transition: text-decoration-color var(--dur-hover) ease, color var(--dur-hover) ease;
}
.nav a:hover { color: var(--emajogi); text-decoration-color: currentColor; }

.header__end { display: flex; align-items: center; gap: 12px; }
.header__end .status { display: none; }
.header .call--sm .call__num { display: none; }
.header .call--sm { padding: 6px; }

.menu-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--joon);
  border-radius: var(--r-md);
  background: var(--pilv-valge);
  color: var(--tint);
  cursor: pointer;
  transition: background-color var(--dur-hover) ease;
}
.menu-btn:hover { background: var(--taevas); }
.menu-btn[hidden] { display: none; }

@media (min-width: 480px) {
  .header .call--sm .call__num { display: inline; }
  .header .call--sm { padding: 6px 16px 6px 6px; }
}
@media (min-width: 1024px) {
  .nav { display: block; }
  .menu-btn { display: none !important; }
}
@media (min-width: 1280px) {
  .header__end .status:not([hidden]) { display: inline-flex; }
}

/* Mobiilimenüü leht */
.sheet {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0 var(--gutter-x) calc(24px + env(safe-area-inset-bottom));
  border: 0;
  background: var(--pilv-valge);
  color: var(--tint);
  flex-direction: column;
}
.sheet[open] { display: flex; }
html:has(.sheet[open]) { overflow: hidden; }
.sheet::backdrop { background: rgb(19 38 43 / 0.2); }
.sheet__top { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.sheet__links { margin-top: 16px; }
.sheet__links a {
  display: flex;
  align-items: center;
  min-height: 56px;
  border-bottom: 1px solid var(--joon);
  color: var(--tint);
  font-size: var(--fs-title);
  font-weight: 560;
  font-stretch: 104%;
  text-decoration: none;
}
.sheet__phones { margin-top: auto; display: grid; gap: 20px; padding-top: 32px; }
.sheet__phones a { display: grid; gap: 4px; color: var(--emajogi); text-decoration: none; }
.sheet__phones .small { color: var(--tint-pehme); }
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: sheet-in var(--dur-ui) var(--ease-out); }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(12px); } }
}

/* ---------- 1. Esimene ekraan ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--header-h));
  padding-top: clamp(40px, 9vh, 112px);
}
.hero__inner { position: relative; z-index: 1; }
.hero__title { max-width: none; position: relative; }
.hero__lead { margin-top: 24px; max-width: 46ch; }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 20px;
  margin-top: 32px;
}
.callbox { display: grid; gap: 8px; justify-items: start; }
.callbox__note { color: var(--tint-pehme); padding-left: 14px; }
.callbox__note a { font-weight: 600; }

.hero__sky {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero__near {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.cloud { position: absolute; will-change: transform; }
.cloud img { width: 100%; height: auto; }
.cloud--kaug { --dx: -6vw; width: 120vw; max-width: 1500px; top: -6%; right: -46vw; }
.cloud--kesk { --dx: -3vw; width: 96vw; max-width: 1150px; top: 4%; right: -30vw; }
.cloud--lahi { --dx: 7vw; width: 70vw; max-width: 760px; top: 10%; right: -30vw; display: none; }
@media (max-width: 767px) {
  .cloud--kaug { width: 130vw; right: -62vw; top: -5%; }
  .cloud--kesk { width: 110vw; right: -36vw; top: -3%; }
}

@media (min-width: 768px) {
  .cloud--kaug { width: 88vw; top: -14%; right: -24vw; }
  .cloud--kesk { width: 66vw; top: -4%; right: -10vw; }
  .cloud--lahi { width: 44vw; top: 1%; right: -18vw; display: block; }
}
@media (min-width: 1280px) {
  .cloud--kaug { width: 84vw; right: -16vw; }
  .cloud--kesk { width: 60vw; right: -2vw; top: -6%; }
  .cloud--lahi { width: 34vw; right: -1vw; top: 2%; }
}
/* Väga laiad ekraanid: pilved jäävad pealkirja juurde, mitte ekraani serva */
@media (min-width: 1920px) {
  .cloud--kaug { width: 1500px; right: calc(50vw - 1267px); }
  .cloud--kesk { width: 1150px; right: calc(50vw - 998px); }
  .cloud--lahi { width: 653px; right: calc(50vw - 979px); }
}

/* Kanalite rida */
.channels { position: relative; z-index: 3; margin-top: auto; padding-top: clamp(40px, 7vh, 80px); padding-bottom: 32px; }
.channels__list {
  display: grid;
  border-top: 1px solid var(--joon);
}
.channel {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 10px;
  padding: 24px 0;
  border-bottom: 1px solid var(--joon);
}
.channel__head { display: flex; align-items: center; gap: 10px; color: var(--emajogi); }
.channel__head .title { color: var(--tint); }
.channel__num { color: var(--emajogi); text-decoration: none; padding-block: 4px; white-space: nowrap; }
.channel__num:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.channel__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: var(--fs-title);
  font-weight: 560;
  font-stretch: 104%;
}
.channel__hours { color: var(--tint-pehme); max-width: 34ch; }

/* Tahvel: iga kanal on rida - info vasakul, number ja staatus paremal */
@media (min-width: 600px) and (max-width: 1023px) {
  .channel {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 32px;
    row-gap: 6px;
    padding: 20px 0;
  }
  .channel__head, .channel__hours { grid-column: 1; }
  .channel__head { grid-row: 1; }
  .channel__hours { grid-row: 2; align-self: start; }
  .channel__num, .channel__link { grid-column: 2; grid-row: 1; justify-self: end; }
  .channel .status { grid-column: 2; grid-row: 2; justify-self: end; align-self: start; }
}
@media (min-width: 1024px) {
  .channels__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .channel { padding: 28px 28px 8px; border-bottom: 0; }
  .channel + .channel { border-left: 1px solid var(--joon); }
  .channel:first-child { padding-left: 0; }
  /* number mahub veergu ka 1024-1279 px juures */
  .channel__num { font-size: min(var(--fs-numeral), 4.4vw); }
  .channel__link { min-height: calc(min(var(--fs-numeral), 4.4vw) + 8px); }
}

/* ---------- 2. Kuidas saame aidata ---------- */
.help__panel {
  display: grid;
  gap: 32px;
  padding: 32px 20px;
  border-radius: var(--r-xl);
  background: var(--pilv-valge);
  box-shadow: var(--shadow-pilv);
}
.help__intro .body-lg { margin-top: 16px; }

.tasks { display: grid; gap: 8px; }
.task-tab {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 12px 16px 12px 30px;
  position: relative;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--tint);
  font-size: 1.1875rem;
  font-weight: 560;
  font-stretch: 104%;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease;
}
.task-tab .icon { color: var(--emajogi); }
.task-tab:hover { background: var(--udu); }
.task-tab::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -3px;
  border-radius: 0 50% 50% 50%;
  background: var(--emajogi);
  transform: rotate(45deg) scale(0);
  transition: transform var(--dur-ui) var(--ease-out);
}
.task-tab[aria-selected="true"], .task-tab[aria-expanded="true"] { background: var(--taevas); }
.task-tab[aria-selected="true"]::before, .task-tab[aria-expanded="true"]::before { transform: rotate(45deg) scale(1); }

.task-panel {
  padding: 28px 24px;
  border-radius: var(--r-lg);
  background: var(--pilv);
  transition: opacity 200ms var(--ease-out), translate 200ms var(--ease-out);
}
.task-panel[hidden] { display: none; }
@starting-style {
  .task-panel { opacity: 0; translate: 0 6px; }
}
.task-panel__title { margin-bottom: 20px; }
.task-panel__text { margin-bottom: 16px; }

.steps-list { display: grid; gap: 14px; counter-reset: s; }
.steps-list li {
  position: relative;
  padding-left: 40px;
  counter-increment: s;
}
.steps-list li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pilv-valge);
  box-shadow: inset 0 0 0 1px var(--joon);
  color: var(--emajogi);
  font-size: var(--fs-small);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.task-panel__term {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--joon);
  color: var(--tint);
}
.task-panel__term .icon { color: var(--emajogi); margin-top: 3px; }
.task-panel__term strong { font-weight: 600; }
.task-panel__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.nurse-links { display: grid; border-top: 1px solid var(--joon); }
.nurse-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 8px 12px 0;
  border-bottom: 1px solid var(--joon);
  color: var(--tint);
  text-decoration: none;
  transition: background-color var(--dur-hover) ease;
}
.nurse-links a > span { display: grid; gap: 2px; }
.nurse-links strong { font-weight: 600; color: var(--emajogi); }
.nurse-links .icon { color: var(--emajogi); }
.nurse-links a:hover strong { text-decoration: underline; text-underline-offset: 0.2em; }

/* Mobiilis akordion: nupp ja paneel kordamööda */
.js .tasks__list { display: contents; }
.js .task-tab { grid-row: calc(var(--i) * 2 + 1); }
.js .task-panel { grid-row: calc(var(--i) * 2 + 2); }
.js .tasks[data-mode="accordion"] .task-panel__title { display: none; }
.task-tab::after {
  content: "";
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--tint-pehme);
  border-bottom: 1.5px solid var(--tint-pehme);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--dur-ui) var(--ease-out);
}
.task-tab[aria-expanded="true"]::after { transform: rotate(225deg) translate(-2px, -2px); }
.tasks[data-mode="tabs"] .task-tab::after { display: none; }
html:not(.js) .tasks__list { display: none; }

@media (min-width: 1024px) {
  .help__panel {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: auto 1fr;
    column-gap: 56px;
    row-gap: 32px;
    padding: 48px;
  }
  .help__intro { grid-column: 1; grid-row: 1; }
  .tasks { display: contents; }
  .js .tasks__list {
    display: grid;
    align-content: start;
    gap: 4px;
    grid-column: 1;
    grid-row: 2;
  }
  .js .task-tab { grid-row: auto; }
  .js .task-panel { grid-column: 2; grid-row: 1 / span 2; padding: 40px 44px; align-self: start; }
  html:not(.js) .task-panel { grid-column: 2; }
}

/* ---------- 3. Millal oleme kättesaadavad ---------- */
.hours { background: var(--taevas); }
.hours__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.days { display: flex; gap: 6px; }
.days[hidden] { display: none; }
.days button {
  width: 48px;
  height: 48px;
  border: 1px solid rgb(18 69 79 / 0.16);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--tint);
  font-size: var(--fs-label);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur-hover) ease, border-color var(--dur-hover) ease;
}
.days button:hover { background: rgb(252 253 253 / 0.6); }
.days button.is-today { background: var(--koit); border-color: var(--koit); }
.days button[aria-pressed="true"] { background: var(--pilv-valge); border-color: var(--emajogi); box-shadow: inset 0 0 0 1px var(--emajogi); }
.days button.is-today[aria-pressed="true"] { background: var(--koit); }

.ruler {
  --line: rgb(18 69 79 / 0.14);
  position: relative;
  margin-top: 40px;
}
.ruler__closed {
  margin-bottom: 20px;
  font-size: var(--fs-title);
  font-weight: 560;
  font-stretch: 104%;
}
.ruler__closed[hidden] { display: none; }
.ruler__closed a { font-weight: 600; }

/* Mobiil: vertikaalne skaala */
.ruler__body { position: relative; }
.ruler {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto 460px;
}
.ruler__closed { grid-column: 1 / -1; grid-row: 1; }
.ruler__scale { grid-column: 1; grid-row: 2; position: relative; }
.ruler__tracks { grid-column: 2; grid-row: 2; position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ruler__scale span {
  position: absolute;
  left: 0;
  top: calc(var(--t) / 10 * 100%);
  transform: translateY(-50%);
  font-size: var(--fs-small);
  font-weight: 450;
  color: var(--tint-pehme);
  font-variant-numeric: tabular-nums;
}
.ruler__scale span::after {
  content: "";
  position: absolute;
  left: 30px;
  top: 50%;
  width: calc(100vw - 2 * var(--gutter-x) - 30px);
  height: 1px;
  background: var(--line);
}
.track { position: relative; }
.track__bar {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--a) / 10 * 100%);
  height: calc((var(--b) - var(--a)) / 10 * 100%);
  display: flex;
  padding: 10px;
  border-radius: var(--r-md);
  background: var(--pilv-valge);
  box-shadow: var(--shadow-pilv);
  transition: top var(--dur-ui) var(--ease-out), height var(--dur-ui) var(--ease-out), opacity var(--dur-ui) ease;
}
.track.is-off .track__bar { opacity: 0; }
@media (max-width: 359px) {
  .ruler { grid-template-columns: 28px minmax(0, 1fr); }
  .ruler__tracks { gap: 6px; }
  .track__bar { padding: 8px 6px; }
}
.track__label {
  display: grid;
  gap: 2px;
  align-content: start;
  font-size: var(--fs-small);
  line-height: 1.3;
}
.track__label strong { font-weight: 600; color: var(--tint); }
.track__label .tnum { color: var(--tint-pehme); }
.track.is-now .track__label strong::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--sammal);
  vertical-align: 0.1em;
}

.ruler__now {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  height: 100%;
  pointer-events: none;
  transform: translateY(calc(var(--pos, 0) * 100%));
  transition: transform var(--dur-move) var(--ease-in-out);
}
.ruler__now[hidden] { display: none; }
.ruler__now-line {
  position: absolute;
  left: -8px;
  right: 0;
  top: 0;
  height: 1.5px;
  background: var(--emajogi);
}
.ruler__now-drop {
  position: absolute;
  left: -24px;
  top: 0;
  width: 16px;
  height: 20px;
  transform: translateY(-70%) rotate(-90deg);
}
.ruler__now-drop svg { width: 16px; height: 20px; fill: var(--emajogi); overflow: visible; }
.ruler__now-drop::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 62%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 1.5px solid var(--emajogi);
  opacity: 0;
}
.ruler.is-open .ruler__now-drop::after { animation: ripple 6s var(--ease-out) infinite; }
@keyframes ripple {
  0% { transform: scale(0.6); opacity: 0.8; }
  40% { transform: scale(3); opacity: 0; }
  100% { transform: scale(3); opacity: 0; }
}
.ruler__now-time {
  position: absolute;
  right: 0;
  top: -22px;
  padding: 1px 8px;
  border-radius: var(--r-full);
  background: var(--emajogi);
  color: var(--pilv-valge);
  font-weight: 600;
}
.ruler__now-line, .ruler__now-drop, .ruler__now-time { z-index: 2; }

@media (min-width: 768px) {
  .ruler {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    padding-top: 8px;
  }
  .ruler__closed { grid-row: 1; }
  .ruler__scale { grid-column: 1; grid-row: 2; height: 28px; }
  .ruler__tracks { grid-column: 1; grid-row: 3; display: grid; grid-template-columns: none; gap: 12px; padding-bottom: 8px; }
  .ruler__scale span {
    top: 0;
    left: calc(var(--t) / 10 * 100%);
    transform: translateX(-50%);
  }
  .ruler__scale span:first-child { transform: none; }
  .ruler__scale span:last-child { transform: translateX(-100%); }
  .ruler__scale span::after {
    left: 50%;
    top: 26px;
    width: 1px;
    height: 236px;
  }
  .ruler__scale span:first-child::after { left: 0; }
  .ruler__scale span:last-child::after { left: auto; right: 0; }
  .track { height: 64px; }
  .track__bar {
    top: 0;
    bottom: 0;
    height: auto;
    left: calc(var(--a) / 10 * 100%);
    right: auto;
    width: calc((var(--b) - var(--a)) / 10 * 100%);
    align-items: center;
    padding: 0 18px;
    transition: left var(--dur-ui) var(--ease-out), width var(--dur-ui) var(--ease-out), opacity var(--dur-ui) ease;
  }
  .track__label { display: flex; gap: 10px; align-items: baseline; font-size: var(--fs-label); white-space: nowrap; }
  .track__label .tnum { font-weight: 500; }
  .ruler__now {
    grid-column: 1;
    grid-row: 2 / 4;
    height: auto;
    transform: translateX(calc(var(--pos, 0) * 100%));
  }
  .ruler__now-line { left: 0; right: auto; top: 22px; bottom: 0; width: 1.5px; height: auto; }
  .ruler__now-drop { left: -7.25px; top: 0; transform: none; }
  .ruler__now-drop::after { top: 62%; }
  .ruler__now-time { right: auto; left: 10px; top: auto; bottom: -28px; }
}

.hours__summary {
  display: grid;
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid rgb(18 69 79 / 0.16);
}
.hours__summary > div { padding: 16px 0; border-bottom: 1px solid rgb(18 69 79 / 0.16); display: grid; gap: 4px; }
.hours__summary dt { font-size: var(--fs-label); font-weight: 600; color: var(--tint-pehme); }
.hours__summary dd { font-size: var(--fs-title); font-weight: 560; font-stretch: 104%; }
.hours__summary .hours__phone { display: inline-block; margin: 4px 0 2px; color: var(--emajogi); text-decoration: none; }
.hours__summary .hours__phone:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.hours__note { margin-top: 24px; color: var(--tint); }
.hours__note a { font-weight: 600; }
@media (min-width: 768px) {
  .hours__summary { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid rgb(18 69 79 / 0.16); }
  .hours__summary > div { border-bottom: 0; padding: 20px 24px 20px 0; }
  .hours__summary > div + div { border-left: 1px solid rgb(18 69 79 / 0.16); padding-left: 24px; }
}

/* ---------- 4. Uuele patsiendile ---------- */
.join__head { display: grid; gap: 16px; }
.join__head .tilk { display: none; }
.rain { position: relative; margin-top: 48px; }
.rain__line { position: absolute; pointer-events: none; overflow: visible; }
.rain__line path { fill: none; stroke-width: 1.5; stroke-linecap: round; }
.rain__track { stroke: var(--joon); }
.rain__flow { stroke: var(--vihm); stroke-dasharray: 1 1; stroke-dashoffset: var(--flow, 0); }
.js .rain__flow { --flow: 1; }
.rain__line--h { display: none; }
.rain__line--v { left: 4px; top: 14px; bottom: 30px; width: 20px; height: calc(100% - 44px); }

.rain__steps { display: grid; gap: 40px; position: relative; }
.rain__step { position: relative; padding-left: 52px; display: grid; justify-items: start; gap: 10px; }
.rain__step p { color: var(--tint-pehme); max-width: 36ch; }
.rain__drop {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 34px;
}
.rain__drop svg { width: 20px; height: 25px; fill: var(--emajogi); transition: fill var(--dur-ui) ease; }
.js .rain__step:not(.is-lit) .rain__drop svg { fill: var(--joon); }
.join__foot { margin-top: 48px; max-width: 80ch; }

@media (min-width: 900px) {
  .join__head { position: relative; padding-right: 180px; }
  .join__head .tilk { display: block; position: absolute; right: 24px; bottom: -12px; width: 116px; height: auto; }
  .rain { margin-top: 56px; }
  .rain__line--v { display: none; }
  .rain__line--h { display: block; left: 0; top: 0; width: 100%; height: 120px; }
  .rain__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .rain__step { padding: 112px 8px 0; justify-items: center; text-align: center; }
  .rain__step p { margin-inline: auto; }
  .rain__drop { left: 50%; top: 60px; transform: translate(-50%, -62%); width: 36px; height: 40px; }
  .rain__drop svg { width: 24px; height: 30px; }
}

/* ---------- 5. Meeskond ---------- */
.team { background: var(--pilv-valge); }
.team__head { display: grid; gap: 16px; }
.team__grid { display: grid; gap: 40px; margin-top: 48px; }
.team__doctors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 32px 24px; }
.team__nurses { display: grid; gap: 28px; }
.person { display: grid; gap: 8px; align-content: start; }
.person .mono { margin-bottom: 12px; }
.person__role { color: var(--tint-pehme); }
.person .chips { margin-top: 6px; }
.person .link-action { margin-top: -2px; }

.mono {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 280px;
  border-radius: var(--r-lg);
  background: var(--taevas);
  overflow: hidden;
}
.mono > span {
  font-size: var(--fs-numeral);
  font-weight: 300;
  font-stretch: 125%;
  letter-spacing: -0.02em;
  color: var(--emajogi);
  line-height: 1;
}
.mono__mark {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 30px;
  height: 24px;
  fill: none;
  stroke: var(--emajogi);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
}

/* Fotod: töötlus "Udu" - ühtne pehme monokroom, taevas-toon ja tera */
.photo {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 280px;
  margin: 0 0 12px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--taevas);
  isolation: isolate;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04) brightness(1.03);
}
.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--taevas);
  mix-blend-mode: multiply;
  opacity: 0.35;
  pointer-events: none;
}
.photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.15 0 0 0 0 0.17 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
}

/* Õed: horisontaalsed kaardid */
.team__nurses .person {
  grid-template-columns: 112px minmax(0, 1fr);
  column-gap: 20px;
  row-gap: 6px;
}
.team__nurses .person .mono, .team__nurses .person .photo { grid-row: 1 / span 6; margin: 0; max-width: 112px; border-radius: var(--r-md); }
.team__nurses .mono > span { font-size: 2.25rem; }
.team__nurses .mono__mark { width: 20px; height: 16px; right: 9px; bottom: 9px; }
.team__nurses .person > :not(.mono):not(.photo) { grid-column: 2; }

.residents {
  margin-top: 56px;
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--taevas);
  display: grid;
  gap: 8px;
}
.residents__lead { font-size: 1.1875rem; }
.residents .muted { color: var(--tint-pehme); }

@media (min-width: 1024px) {
  .team__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
  .team__doctors { grid-template-columns: repeat(2, minmax(0, 280px)); gap: 32px; }
  .team__nurses { padding-top: 24px; gap: 32px; }
  .team__nurses .person:nth-child(2) { margin-left: 32px; }
  .team__nurses .person:nth-child(3) { margin-left: 64px; }
  .residents { padding: 28px 36px; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; align-items: center; }
  .residents__names { grid-column: 1; }
  .residents > .small { grid-column: 2; grid-row: 1 / span 2; }
}

/* Kaskaad - ainus järjestikune ilmumine lehel */
.person { transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out); transition-delay: calc(var(--d, 0) * 60ms); }
.person.is-pre { opacity: 0; transform: translateY(12px); }

/* ---------- 6. Asukoht ---------- */
.place__grid { display: grid; gap: 40px; align-items: center; }
.place__art { max-width: 560px; }
.korrus { width: 100%; height: auto; overflow: visible; }
.korrus__lines { fill: none; stroke: var(--vihm); stroke-opacity: 0.55; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.korrus__ground line { stroke: var(--joon); stroke-width: 1.5; stroke-linecap: round; }
.korrus__fill polygon { fill: var(--taevas); }
.korrus__fill polygon:first-child { fill-opacity: 0.7; }
.korrus__shade polygon { fill: var(--pilv-valge); }
.korrus__marker line { stroke: var(--emajogi); stroke-width: 1.5; stroke-linecap: round; }
.korrus__marker path { fill: var(--emajogi); }
.korrus__label { font-family: var(--font); font-size: 15px; font-weight: 500; fill: var(--tint-pehme); }
.korrus__label--main { font-size: 20px; font-weight: 600; font-stretch: 112%; fill: var(--emajogi); }
.korrus__label--floor { font-size: 14px; font-weight: 600; fill: var(--tint-pehme); }

.place__text { display: grid; justify-items: start; gap: 12px; }
.place__how { margin-top: 12px; }
.place__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.place__neigh-title { margin-top: 28px; color: var(--tint-pehme); }

@media (min-width: 1024px) {
  .place__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; }
}

/* ---------- 7. Teenused ja hinnad ---------- */
.prices { padding-top: 0; }
.prices__panel {
  display: grid;
  gap: 48px;
  padding: 32px 20px;
  border-radius: var(--r-xl);
  background: var(--pilv-valge);
  box-shadow: var(--shadow-pilv);
}
.prices__free .body-lg { margin-top: 16px; }
.free-list { display: grid; gap: 14px; margin-top: 28px; }
.free-list li { display: flex; gap: 14px; align-items: flex-start; }
.free-list .icon { color: var(--emajogi); margin-top: 3px; }

.prices__paid { display: grid; gap: 28px; align-content: start; }
.price-group__title { margin-bottom: 4px; font-size: var(--fs-title); font-weight: 560; font-stretch: 104%; letter-spacing: -0.01em; line-height: 1.25; color: var(--tint); }
.prices__paid > .title { color: var(--tint-pehme); font-size: var(--fs-label); font-weight: 600; font-stretch: 100%; letter-spacing: 0.01em; }
.price-rows > div {
  display: grid;
  gap: 2px;
  padding: 12px 8px;
  margin-inline: -8px;
  border-bottom: 1px solid var(--joon);
  border-radius: var(--r-xs);
  transition: background-color var(--dur-hover) ease;
}
.price-rows dt { max-width: 52ch; }
.price-rows dd {
  font-size: var(--fs-title);
  font-weight: 560;
  font-stretch: 104%;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .price-rows > div:hover { background: rgb(241 221 191 / 0.4); }
}
@media (min-width: 640px) {
  .price-rows > div { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 24px; }
  .price-rows dd { text-align: right; }
}
@media (min-width: 1024px) {
  .prices__panel { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; padding: 56px; }
}

/* Akordion */
.acc { border-bottom: 1px solid var(--joon); }
.acc__sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
}
.acc__sum::-webkit-details-marker { display: none; }
.acc__sum:hover .title, .acc__sum:hover .label { color: var(--emajogi); }
.acc__icon { color: var(--emajogi); transition: transform var(--dur-ui) var(--ease-out); }
.acc[open] .acc__icon { transform: rotate(45deg); }
.acc__body { padding-bottom: 20px; display: grid; gap: 14px; }
.acc::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size var(--dur-ui) var(--ease-out), content-visibility var(--dur-ui) allow-discrete;
}
.acc[open]::details-content { block-size: auto; }
.prices__paid .acc { border-top: 1px solid var(--joon); margin-top: 4px; }

/* ---------- 8. Väljaspool tööaega ---------- */
.night {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(80px, 10vw, 136px);
  background: var(--emajogi-sugav);
  color: var(--pilv-valge);
}
.night__light {
  position: absolute;
  inset: -25%;
  z-index: -1;
  background: url("../assets/valgus-veel.svg") 0 0 / 1024px 1024px repeat;
  opacity: 0.12;
}
.night a { color: var(--pilv-valge); }
.night :focus-visible { box-shadow: 0 0 0 2px var(--emajogi-sugav), 0 0 0 4px var(--vihm); }
.night__numbers { display: grid; gap: 40px; margin-top: 48px; }
.night__num { display: grid; gap: 12px; text-decoration: none; justify-items: start; }
.numeral--xl { font-size: calc(var(--fs-numeral) * 1.5); }
.night__num:hover .numeral { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.night__cap { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-body-lg); color: var(--taevas); }
.night__alert { width: 10px; height: 10px; border-radius: 50%; background: var(--hoiatus); }
.night__num--urgent .night__cap { color: var(--pilv-valge); font-weight: 560; }
.night__emo { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgb(127 168 180 / 0.3); color: var(--taevas); }
@media (min-width: 768px) {
  .night__numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
  .night__num + .night__num { padding-left: 48px; border-left: 1px solid rgb(127 168 180 / 0.3); }
}

/* ---------- 9. Kasulik teada ---------- */
.useful__grid { display: grid; gap: 56px; }
.quote blockquote p {
  font-size: var(--fs-headline);
  font-weight: 300;
  font-stretch: 112%;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 18ch;
}
.quote figcaption { margin-top: 20px; }
.useful__cols { display: grid; gap: 48px; }
.useful__cols .title { margin-bottom: 12px; }
.links { border-top: 1px solid var(--joon); }
.links a {
  display: grid;
  gap: 2px;
  min-height: 60px;
  padding: 10px 0;
  border-bottom: 1px solid var(--joon);
  font-weight: 600;
  text-decoration: none;
}
.links a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.links .small { font-weight: 450; }
.useful .acc:first-of-type { border-top: 1px solid var(--joon); }
.useful .acc__body p { color: var(--tint); }
.dash-list { display: grid; gap: 10px; }
.dash-list li { position: relative; padding-left: 20px; }
.dash-list li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 8px; height: 1.5px; background: var(--vihm); }

@media (min-width: 1024px) {
  .useful__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }
  .useful__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
}

/* ---------- Jalus ---------- */
.footer { background: var(--udu); padding-top: 64px; padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.footer__grid { display: grid; gap: 36px; }
.footer__grid > div { display: grid; gap: 10px; align-content: start; }
.footer .label { color: var(--tint-pehme); }
.footer__phone { display: grid; gap: 0; }
.footer__phone a { font-size: var(--fs-title); font-weight: 560; font-stretch: 104%; text-decoration: none; }
.footer__phone a:hover { text-decoration: underline; }
.footer__links { display: grid; gap: 6px; }
.footer__links a { display: inline-flex; min-height: 32px; align-items: center; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--joon);
}
@media (min-width: 768px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 32px; }
}

/* ---------- Mobiili tegevusriba ---------- */
.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgb(244 246 246 / 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--joon);
  transform: translateY(110%);
  transition: transform var(--dur-ui) var(--ease-out);
}
.actionbar .btn { min-height: 48px; padding: 0 16px; }
.actionbar.is-visible { transform: none; }
@media (min-width: 768px) {
  .actionbar { display: none; }
}

/* ---------- Esimese ekraani liikumine: Selginemine ---------- */
@media (prefers-reduced-motion: no-preference) {
  .cloud img { animation: cloud-in var(--dur-hero) var(--ease-out) both; }
  .cloud--kesk img { animation-delay: 120ms; }
  .cloud--lahi img { animation-delay: 240ms; }
  @keyframes cloud-in { from { opacity: 0; transform: translateY(24px); } }

  .cloud__drift { animation: drift 80s linear infinite alternate; }
  .cloud--kesk .cloud__drift { animation-direction: alternate-reverse; }
  @keyframes drift { to { transform: translateX(2%); } }
  .hero.is-away .cloud__drift, .is-doc-hidden .cloud__drift { animation-play-state: paused; }

  .hero__title.is-settling { animation: settle 900ms var(--ease-out) both; }
  @keyframes settle { from { font-stretch: 125%; } to { font-stretch: 118%; } }

  @supports (animation-timeline: scroll()) {
    .cloud {
      animation: part linear both;
      animation-timeline: scroll(root);
      animation-range: 0 90vh;
    }
    @keyframes part { to { transform: translateX(var(--dx)); } }
  }

  .night__light { animation: light 40s linear infinite alternate; }
  @keyframes light {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-6%, 4%, 0) scale(1.08); }
  }
  .night.is-away .night__light, .is-doc-hidden .night__light { animation-play-state: paused; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .person.is-pre { opacity: 1; transform: none; }
  .ruler__now { transition: none; }
  .status--open .status__dot::after, .ruler.is-open .ruler__now-drop::after { animation: none; }
}

@media print {
  .header, .actionbar, .hero__sky, .hero__near, .night__light { display: none; }
  .night { background: none; color: var(--tint); }
  .night a { color: var(--tint); }
}
