/* ============================================================
   BeUp — голосовой чек-ап состояния. Публичная часть.
   Светлая тема, mobile-first. Все размеры от 375px вверх.
   ============================================================ */

/* ---------- Montserrat (вариативный, локально, без внешних CDN) ---------- */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/montserrat-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/montserrat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------------------------- Токены ---------------------------- */
:root {
  /* Чернила и текст */
  --ink:        #151D2A;   /* заголовки, цифры */
  --ink-body:   #4F4F4F;   /* основной текст, 7.78:1 на --page */
  --ink-muted:  #656D79;   /* подписи; 5.23:1 на белом, 4.96:1 на --page */

  /* Поверхности */
  --page:       #F8F9FB;
  --surface:    #FFFFFF;
  --tint-blue:  #E2EEF5;
  --tint-lilac: #EBE9F8;
  --tint-cyan:  #EAF9FB;
  --line:       #E4E8EE;
  --line-soft:  #EDF0F4;

  /* Акценты бренда — дозированно: заливки, иконки, кнопки */
  --turq:       #2BC4D6;
  --turq-ink:   #0E8E9D;   /* только для крупной графики, не для мелкого текста */
  --violet:     #604FD0;   /* 5.95:1 на белом — годится для текстовых акцентов */
  --violet-deep:#4B3CAF;

  /* Состояния */
  --danger:     #B0304A;
  --danger-bg:  #FBEDF0;

  /* Ступени интенсивности 1–10: одна последовательная шкала от бирюзы к фиолету.
     Светлота падает монотонно, насыщенность проседает в середине — поэтому
     лестница читается как «тише → сильнее», а не как светофор «здоров → болен».
     Оба конца лежат на брендовых акцентах, середина намеренно приглушена. */
  --lv-1:  #00B4C7;
  --lv-2:  #12ABBC;
  --lv-3:  #2DA1B4;
  --lv-4:  #3897B2;
  --lv-5:  #438CB5;
  --lv-6:  #517FB9;
  --lv-7:  #5D71BB;
  --lv-8:  #6263BE;
  --lv-9:  #6056C3;
  --lv-10: #5B49CA;

  /* Радиусы — одна система */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-full: 999px;

  /* Тени — одна мягкая, подкрашена в синь чернил */
  --shadow-soft: 0 1px 2px rgba(21, 29, 42, .04), 0 8px 24px -12px rgba(21, 29, 42, .12);
  --shadow-lift: 0 2px 4px rgba(21, 29, 42, .05), 0 18px 40px -20px rgba(21, 29, 42, .22);

  /* Ритм */
  --gap-1: 4px;
  --gap-2: 8px;
  --gap-3: 12px;
  --gap-4: 16px;
  --gap-5: 24px;
  --gap-6: 32px;
  --gap-7: 48px;
  --gap-8: 64px;

  /* Движение */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --t-fast: 140ms;
  --t-base: 200ms;
  --t-slow: 320ms;

  /* Слои */
  --z-bar: 10;
  --z-sheet: 20;
  --z-toast: 30;
}

/* ---------------------------- База ---------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--page);
  color: var(--ink-body);
  font-family: 'Montserrat', 'Segoe UI', Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 600; line-height: 1.16; }
p { margin: 0; }
button { font: inherit; color: inherit; }
img, svg { display: block; }

[hidden] { display: none !important; }

/* Заголовки получают фокус программно, чтобы скринридер прочитал новый экран.
   Видимое кольцо на неинтерактивном заголовке читается как ошибка вёрстки. */
h1[tabindex="-1"]:focus,
h1[tabindex="-1"]:focus-visible { outline: none; }

:where(a, button, input, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

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

/* ---------------------------- Каркас ---------------------------- */
.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-bar);
  background: var(--page);
  background: color-mix(in srgb, var(--page) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base) var(--ease-out);
}
.topbar[data-scrolled='true'] { border-bottom-color: var(--line); }

.topbar__row {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: var(--gap-4);
  min-height: 60px;
}

.logo { height: 22px; width: auto; }
.logo--lg { height: 30px; }

.topbar__meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--gap-3);
  min-width: 0;
}

.step-count {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: .875rem;
  color: var(--ink);
  letter-spacing: .01em;
  white-space: nowrap;
}
.step-count b { font-weight: 600; }
.step-count span { color: var(--ink-muted); font-weight: 500; }

/* Треугольник — знак бренда. Используется как разделитель и маркер. */
.tri {
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid var(--turq);
  flex: none;
}
.tri--sm { border-left-width: 4px; border-right-width: 4px; border-bottom-width: 6px; }

/* Рельс прогресса — тонкая полоса под шапкой */
.rail {
  height: 3px;
  background: var(--line-soft);
  overflow: hidden;
}
.rail__fill {
  height: 100%;
  width: 0;
  background: var(--turq);
  border-radius: 0 var(--r-full) var(--r-full) 0;
  transition: width var(--t-slow) var(--ease-out);
}

/* ---------------------------- Экраны ---------------------------- */
.main { flex: 1; display: flex; }

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: screen-in var(--t-slow) var(--ease-out) both;
}
@keyframes screen-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.screen__inner {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: var(--gap-5) 20px var(--gap-7);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.screen__inner--wide { max-width: 720px; }

/* ---------------------------- Типографика ---------------------------- */
.display {
  font-size: 1.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .015em;
  line-height: 1.1;
  text-wrap: balance;
}
.display--sm { font-size: 1.375rem; }

.lede {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-body);
  max-width: 62ch;
  text-wrap: pretty;
}

.label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-muted);
}

.note {
  font-size: .8125rem;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 60ch;
}

/* ---------------------------- Кнопки ---------------------------- */
.btn {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  min-height: 52px;
  padding: 14px 26px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-2);
  text-decoration: none;
  transition: background-color var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out),
              color var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { cursor: not-allowed; opacity: .45; transform: none; }

/* Основное действие: заливка бирюзовым, текст тёмный — 8.03:1 */
.btn--primary { background: var(--turq); color: var(--ink); }
.btn--primary:hover:not([disabled]) { background: #22B4C5; }

.btn--ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover:not([disabled]) { border-color: #CFD6E0; background: #FCFDFE; }

.btn--quiet {
  background: transparent;
  color: var(--violet);
  min-height: 48px;
  padding: 12px 8px;
  font-weight: 500;
  border-radius: var(--r-sm);
}
.btn--quiet:hover { color: var(--violet-deep); text-decoration: underline; text-underline-offset: 3px; }

.btn--block { width: 100%; }

.btn-row {
  display: flex;
  flex-direction: column;
  gap: var(--gap-3);
}
.btn-row--inline { flex-direction: row; flex-wrap: wrap; gap: var(--gap-2); }
.btn-row--inline .btn { flex: 1 1 140px; }

.stack { display: flex; flex-direction: column; }
.stack > * + * { margin-top: var(--gap-4); }
.spacer { flex: 1; min-height: var(--gap-5); }

/* ---------------------------- Экран 1: приветствие ---------------------------- */
.col { display: flex; flex-direction: column; flex: 1; }

.hero-wave {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 3px;
  height: 84px;
  margin-bottom: var(--gap-5);
}
.hero-wave i {
  display: block;
  flex: 1 1 0;
  min-width: 2px;
  border-radius: var(--r-full);
  background: var(--turq);
  transform-origin: bottom;
  animation: wave-grow 620ms var(--ease-out) both;
}
.hero-wave i:nth-child(7n+3) { background: var(--violet); opacity: .8; }
.hero-wave i:nth-child(2n)   { background: #93D6E2; }
.hero-wave i:nth-child(7n+3) { background: var(--violet); opacity: .8; }
@keyframes wave-grow { from { transform: scaleY(.06); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }

.welcome-points {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.welcome-points li {
  display: flex;
  gap: var(--gap-3);
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: .9375rem;
  color: var(--ink-body);
}
.welcome-points li .tri { align-self: center; }
.welcome-points b { color: var(--ink); font-weight: 600; }

.resume {
  background: var(--tint-cyan);
  border-radius: var(--r-md);
  padding: var(--gap-4);
  display: flex;
  flex-direction: column;
  gap: var(--gap-3);
}
.resume p { font-size: .9375rem; color: var(--ink); }

/* ---------------------------- Экран 2: пояснение ---------------------------- */
.steps {
  counter-reset: st;
  list-style: none;
  margin: 0;
  padding: 0;
}
.steps li {
  counter-increment: st;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: var(--gap-4);
  padding: var(--gap-4) 0;
  border-bottom: 1px solid var(--line);
}
.steps li:first-child { border-top: 1px solid var(--line); }
.steps li::before {
  content: counter(st);
  font-size: .9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--violet);
  line-height: 1.7;
}
.steps h3 { font-size: 1rem; font-weight: 600; margin-bottom: 2px; }
.steps p { font-size: .9375rem; color: var(--ink-body); }

.disclaimer {
  background: var(--tint-lilac);
  border-radius: var(--r-md);
  padding: var(--gap-4) var(--gap-4);
  font-size: .875rem;
  line-height: 1.55;
  color: #3D3660;
}
.disclaimer b { color: var(--violet-deep); font-weight: 600; }

/* ---------------------------- Экран 3: вопрос ---------------------------- */
.q-main { margin-top: 22px; }

.qtext {
  font-size: 1.375rem;
  line-height: 1.34;
  font-weight: 500;
  color: var(--ink);
  text-wrap: pretty;
  max-width: 24ch;
}

.q-index {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--gap-3);
}

/* Консоль записи */
.console {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
  padding: var(--gap-5) var(--gap-4) var(--gap-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-4);
}

.scope {
  width: 100%;
  height: 76px;
  display: block;
  border-radius: var(--r-sm);
  touch-action: none;
}

.timer {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--ink);
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: var(--gap-2);
}
.timer small { font-weight: 500; font-size: .8125rem; color: var(--ink-muted); }
.timer[data-warn='true'] { color: var(--danger); }

.dot-rec {
  width: 9px; height: 9px; border-radius: var(--r-full);
  background: var(--danger); flex: none;
  animation: rec-blink 1.4s steps(1, end) infinite;
}
@keyframes rec-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: .25; } }

/* Круглая кнопка записи */
.rec {
  position: relative;
  width: 76px; height: 76px;
  border-radius: var(--r-full);
  border: none;
  background: var(--turq);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 18px -8px rgba(43, 196, 214, .9);
  transition: background-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.rec:active { transform: scale(.96); }
.rec[data-state='recording'] { background: var(--ink); color: #fff; }
.rec[data-state='done'] { background: var(--tint-cyan); color: var(--ink); box-shadow: none; border: 1px solid #BFE6EC; }
.rec[data-state='recording']::after {
  content: '';
  position: absolute; inset: -10px;
  border-radius: var(--r-full);
  border: 2px solid var(--turq);
  animation: rec-ring 1.8s var(--ease-out) infinite;
}
@keyframes rec-ring {
  0%   { transform: scale(.86); opacity: .9; }
  100% { transform: scale(1.18); opacity: 0; }
}
.rec svg { width: 28px; height: 28px; }

.rec-hint {
  font-size: .875rem;
  color: var(--ink-muted);
  text-align: center;
}

.icon-btn {
  min-width: 48px;
  min-height: 48px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-2);
  padding: 0 18px;
  font-size: .9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
.icon-btn:hover { border-color: #CFD6E0; }
.icon-btn svg { width: 18px; height: 18px; flex: none; }

.console__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-2);
  justify-content: center;
  width: 100%;
}

/* Микроиндикатор фоновой отправки */
.sync {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .75rem;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--t-base) var(--ease-out);
}
.sync[hidden] { display: none !important; }
.sync i {
  width: 7px; height: 7px; border-radius: var(--r-full);
  background: var(--turq);
  flex: none;
  animation: sync-pulse 1.3s var(--ease-out) infinite;
}
.sync[data-state='done'] i { background: var(--turq); animation: none; }
.sync[data-state='error'] i { background: var(--danger); animation: none; }
@keyframes sync-pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

/* Сообщение «микрофон недоступен» / ошибки */
.notice {
  border-radius: var(--r-md);
  padding: var(--gap-4);
  font-size: .9375rem;
  line-height: 1.55;
  background: var(--tint-blue);
  color: #23384A;
}
.notice--warn { background: var(--danger-bg); color: #7A1E32; }
.notice h3 { font-size: 1rem; margin-bottom: 6px; color: inherit; }

/* Текстовый ответ */
.textfield {
  width: 100%;
  font: inherit;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  resize: vertical;
  min-height: 132px;
  transition: border-color var(--t-fast) var(--ease-out);
}
.textfield::placeholder { color: var(--ink-muted); }
.textfield:focus { border-color: var(--violet); }

/* ---------------------------- Экран 4: почта ---------------------------- */
.field { display: flex; flex-direction: column; gap: var(--gap-2); }
.field label { font-size: .875rem; font-weight: 500; color: var(--ink); }
.input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 15px 16px;
  min-height: 52px;
  scroll-margin-top: 90px;
  transition: border-color var(--t-fast) var(--ease-out);
}
.input::placeholder { color: var(--ink-muted); }
.input:focus { border-color: var(--violet); }
.input[aria-invalid='true'] { border-color: var(--danger); }
.field__error { font-size: .8125rem; color: var(--danger); font-weight: 500; }

/* ---------------------------- Экран 5: ожидание ---------------------------- */
.wait-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 72px;
  margin-bottom: var(--gap-5);
}
.wait-wave i {
  width: 6px; height: 14px;
  border-radius: var(--r-full);
  background: var(--turq);
  animation: wait-b 1.25s var(--ease-out) infinite;
}
.wait-wave i:nth-child(2) { animation-delay: .1s; background: #56CEDD; }
.wait-wave i:nth-child(3) { animation-delay: .2s; background: var(--violet); }
.wait-wave i:nth-child(4) { animation-delay: .3s; background: #56CEDD; }
.wait-wave i:nth-child(5) { animation-delay: .4s; background: var(--violet); }
.wait-wave i:nth-child(6) { animation-delay: .5s; background: #56CEDD; }
.wait-wave i:nth-child(7) { animation-delay: .6s; }
@keyframes wait-b { 0%, 100% { height: 14px; } 50% { height: 56px; } }

.progress-line {
  display: flex;
  gap: 3px;
  width: 100%;
}
.progress-line i {
  flex: 1;
  height: 6px;
  border-radius: var(--r-full);
  background: var(--line);
  transition: background-color var(--t-base) var(--ease-out);
}
.progress-line i[data-on='1'] { background: var(--turq); }

/* ---------------------------- Экран 6: результат ---------------------------- */
.result-head {
  padding-bottom: var(--gap-5);
  border-bottom: 1px solid var(--line);
}

.summary {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  text-wrap: pretty;
  max-width: 62ch;
}

.scales { display: flex; flex-direction: column; gap: var(--gap-5); }

.scale__top {
  display: flex;
  align-items: baseline;
  gap: var(--gap-3);
  margin-bottom: 10px;
}
.scale__name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .01em;
}
.scale__level {
  margin-left: auto;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-align: right;
}
.scale__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-out);
}
.scale--in .scale__value { opacity: 1; }

/* Уровнемер: 10 делений, заливка одним тоном по достигнутому уровню */
.meter {
  display: flex;
  gap: 2px;
  height: 26px;
}
.meter i {
  flex: 1;
  border-radius: 3px;
  background: var(--tint-blue);
  transform: scaleY(.34);
  transform-origin: center;
  transition: transform 260ms var(--ease-out), background-color 260ms var(--ease-out);
}
.meter i[data-on='1'] {
  background: var(--m, var(--turq));
  transform: scaleY(1);
}
.meter i:first-child { border-radius: 6px 3px 3px 6px; }
.meter i:last-child  { border-radius: 3px 6px 6px 3px; }

.meter-axis {
  display: flex;
  justify-content: space-between;
  font-size: .6875rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  margin-top: 6px;
  font-weight: 500;
}

/* Рекомендации — список действий, а не сетка карточек:
   рамки вокруг каждой строки тут ничего не добавляют, только шумят. */
.recs { display: grid; gap: 0; }
.rec-card {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: var(--gap-3);
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: .9375rem;
  line-height: 1.55;
  color: var(--ink-body);
}
.rec-card:first-child { border-top: 1px solid var(--line); }
.rec-card .tri { margin-top: 8px; }

.mail-state {
  font-size: .875rem;
  color: var(--ink-muted);
  padding-top: var(--gap-4);
}

.foot-note {
  border-top: 1px solid var(--line);
  padding-top: var(--gap-4);
  font-size: .8125rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

/* ---------------------------- Планшет и десктоп ---------------------------- */
@media (min-width: 768px) {
  .topbar__row { padding: 16px 32px; }
  .screen__inner { max-width: 620px; padding: var(--gap-6) 32px var(--gap-8); }
  .screen__inner--wide { max-width: 780px; }
  .display { font-size: 2.25rem; }
  .display--sm { font-size: 1.625rem; }
  .qtext { font-size: 1.625rem; max-width: 22ch; }
  .logo { height: 24px; }
  .logo--lg { height: 36px; }
  .hero-wave { height: 112px; gap: 4px; }
  .btn-row { flex-direction: row; align-items: center; }
  .btn-row .btn--block { width: auto; min-width: 200px; }
  .screen--result .stack .btn--block { width: auto; min-width: 220px; align-self: flex-start; }
  .scope { height: 96px; }
  /* На широком экране шкала читается как строка прибора:
     слева подпись и балл, справа уровнемер. */
  .scales { gap: var(--gap-5); }
  .scale {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    column-gap: var(--gap-6);
    align-items: center;
  }
  .scale__top { grid-column: 1; grid-row: 1 / 3; margin-bottom: 0; }
  .meter { grid-column: 2; grid-row: 1; height: 32px; }
  .meter-axis { grid-column: 2; grid-row: 2; margin-top: 5px; }
  .scale__value { font-size: 1.75rem; }
  .recs { grid-template-columns: 1fr 1fr; column-gap: var(--gap-6); }
  .rec-card:nth-child(2) { border-top: 1px solid var(--line); }
}

@media (min-width: 1024px) {
  /* Приветствие: контент слева, волна бренда крупно справа —
     иначе на широком экране это узкая колонка в пустом поле. */
  .screen--welcome .screen__inner {
    max-width: 1080px;
    display: grid;
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
    gap: var(--gap-8);
    align-items: center;
    padding-top: var(--gap-8);
    padding-bottom: var(--gap-8);
  }
  .screen--welcome .hero-wave {
    grid-column: 2;
    grid-row: 1;
    height: 360px;
    margin-bottom: 0;
    gap: 6px;
    align-self: center;
  }
  .screen--welcome .col { grid-column: 1; grid-row: 1; flex: none; }
  .screen--welcome .spacer { display: none; }

  .screen--email .screen__inner { max-width: 520px; justify-content: center; }
  .screen--email .spacer { display: none; }

  /* Вопрос и консоль записи рядом, композиция центрирована по вертикали */
  .screen--question { justify-content: center; }
  .screen--question .screen__inner {
    flex: none;
    max-width: 1040px;
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: var(--gap-7);
    align-items: center;
  }
  .screen--question .q-main { margin-top: 0; }
  .screen--question .q-divider { background: var(--line); align-self: stretch; min-height: 300px; }
  .qtext { font-size: 1.75rem; max-width: none; }
  .console { padding: var(--gap-6) var(--gap-5) var(--gap-5); }
  .scope { height: 120px; }
}

@media (min-width: 1024px) {
  .screen--result .screen__inner { max-width: 900px; }
}

/* ---------------------------- Меньше движения ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
  .hero-wave i { animation: none; }
  .meter i { transform: none; }
  .meter i:not([data-on='1']) { transform: scaleY(.34); }
  .dot-rec, .sync i { animation: none; opacity: 1; }
  .rec[data-state='recording']::after { animation: none; opacity: .5; transform: scale(1); }
  .wait-wave i { animation: none; height: 30px; }
}

/* Блок «Поддержка эксперта» на экране результата.
   Тон зависит от уровня: при высоких баллах формулировка настойчивее,
   поэтому блок получает фиолетовый акцент вместо спокойного бирюзового. */
.expert{
  margin-top:40px;
  padding:20px;
  border-radius:14px;
  background:var(--tint-cyan);
  border:1px solid color-mix(in oklab, var(--turq) 22%, transparent);
}
.expert[data-urgency="high"]{
  background:var(--tint-lilac);
  border-color:color-mix(in oklab, var(--violet) 28%, transparent);
}
.expert__text{
  margin:12px 0 0;
  font-size:15px;
  line-height:1.55;
  color:var(--ink);
}
@media (min-width:768px){
  .expert{padding:24px}
  .expert__text{font-size:16px}
}

.expert__cta{
  display:inline-flex;
  margin-top:18px;
  width:auto;
  padding-inline:26px;
  text-decoration:none;
}
@media (max-width:480px){
  .expert__cta{display:flex; width:100%}
}
