/* Проба анкеты — вид сайта Wavesett, ничего своего (Ян 23.11: «в наших цветах»).
   Значения — копии из biryuzovyy-put/shared/tokens.css, приёмы — из tkan.css:
   кнопка-таблетка (.button, .button--line), поле Field (белое, черта снизу),
   вопрос — Field Type=Question (кегль лида, как «Мнение близких»), ошибка — .field__err
   (мятная таблетка, красного в системе нет). Шрифты — копии shared/fonts. */

@font-face { font-family:"RCond"; font-style:normal; font-weight:900; font-display:swap;
  src:url("fonts/robotocond-900-cyrillic.woff2") format("woff2"); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:"RCond"; font-style:normal; font-weight:900; font-display:swap;
  src:url("fonts/robotocond-900-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; }
@font-face { font-family:"Geist"; font-style:normal; font-weight:400; font-display:swap;
  src:url("fonts/geist-400-cyrillic.woff2") format("woff2"); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:"Geist"; font-style:normal; font-weight:400; font-display:swap;
  src:url("fonts/geist-400-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; }
@font-face { font-family:"Geist"; font-style:normal; font-weight:500; font-display:swap;
  src:url("fonts/geist-500-cyrillic.woff2") format("woff2"); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:"Geist"; font-style:normal; font-weight:500; font-display:swap;
  src:url("fonts/geist-500-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; }
@font-face { font-family:"GeistMono"; font-style:normal; font-weight:400; font-display:swap;
  src:url("fonts/geistmono-400-cyrillic.woff2") format("woff2"); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:"GeistMono"; font-style:normal; font-weight:400; font-display:swap;
  src:url("fonts/geistmono-400-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 {
  /* tokens.css */
  --c-black: #000000; --c-white: #ffffff; --c-grey-bg: #e5e5e5; --c-grey-ink: #444444;
  --mint: #98fa8b;
  --bg: var(--c-grey-bg); --fg: var(--c-black); --mute: var(--c-grey-ink); --ln: rgba(0,0,0,.22);
  --accent: var(--mint); --on-accent: var(--c-black);
  --action-bg: var(--c-black); --action-fg: var(--c-white);
  --display: "RCond","Roboto Condensed","Arial Narrow",sans-serif;
  --text: "Geist",-apple-system,"Segoe UI",Roboto,sans-serif;
  --mono: "GeistMono",ui-monospace,Consolas,monospace;
  --r-soft: 12px; --r-pill: 999px; --st-base: 2px;
  --fs-1: 10px; --fs-2: 11px; --fs-5: 14px; --fs-6: 15px; --fs-8: 17px;  /* телефонная лесенка */
  --ls-caps: .08em; --tap: 44px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font: 400 var(--fs-6)/1.5 var(--text); -webkit-text-size-adjust: 100%; }
#app { padding: 20px 20px 112px; max-width: 640px; margin: 0 auto; }
[hidden] { display: none !important; }

/* Служебное — моноширинным заглавными, как подписи полей на сайте */
.probe-note, .progress, .hint, .diag summary {
  font-family: var(--mono); font-size: var(--fs-2); letter-spacing: var(--ls-caps);
  text-transform: uppercase; color: var(--mute);
}
.probe-note { margin: 0 0 20px; line-height: 1.6; }
.progress { margin: 0 0 8px; }
.bar { height: var(--st-base); background: var(--ln); margin-bottom: 24px; }
.bar__fill { height: 100%; background: var(--fg); width: 0; transition: width .2s; }

/* Вопрос — кегль лида (Field Type=Question) */
.q-text { font: 500 var(--fs-8)/1.45 var(--text); margin: 0 0 12px; }
.q-note { color: var(--mute); font-size: var(--fs-6); margin: 0 0 16px; }
h1.list-title { font: 900 32px/1 var(--display); text-transform: uppercase; margin: 0 0 10px; }

/* Варианты — таблетки в контуре; выбранная — мятная заливка */
.options { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
.opt {
  min-height: var(--tap); padding: 10px 22px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--fg); box-shadow: inset 0 0 0 var(--st-base) currentColor;
  font: 500 var(--fs-5) var(--text); cursor: pointer; text-align: left;
}
.opt[aria-pressed="true"] { background: var(--accent); box-shadow: none; }

/* Поле — компонент Field: белая подложка, черта снизу, фокус — чёрная черта */
/* Скругление --r-soft (Ян 23.11: «везде у нас овалы… небольшое скругление»). На сайте у Field углы прямые. */
textarea {
  width: 100%; min-height: 96px; background: var(--c-white); border: 0; border-bottom: var(--st-base) solid var(--ln);
  border-radius: var(--r-soft); color: var(--c-black); font: 400 var(--fs-8)/1.45 var(--text);
  padding: 12px 14px 14px; resize: none; overflow: hidden;
}
.field-hint { margin: 8px 0 0; font-size: var(--fs-5); color: var(--mute); }

/* Строка над вопросом: номер слева, «Все ответы» справа */
.topline { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.topline .progress { margin: 0; }
.all-link {
  border: 0; background: none; padding: 6px 0; color: var(--fg); cursor: pointer;
  font: 500 var(--fs-5) var(--text); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap;
}

/* Полоска громкости во время записи */
.meter { height: 6px; background: var(--ln); border-radius: var(--r-pill); overflow: hidden; margin-top: 12px; }
.meter__fill { height: 100%; width: 0; background: var(--fg); border-radius: var(--r-pill); transition: width .08s linear; }
.voice-hint { margin: 14px 0 0; font-size: var(--fs-5); color: var(--mute); }
textarea::placeholder { color: var(--c-grey-ink); }
textarea:focus-visible { outline: none; border-bottom-color: var(--c-black); }

/* Голос и файл — второе действие: таблетка в контуре (.button--line) */
.tools { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.tool {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 10px 20px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--fg); box-shadow: inset 0 0 0 var(--st-base) currentColor;
  font: 500 var(--fs-5) var(--text); cursor: pointer;
}
.tool.rec { background: var(--accent); box-shadow: none; }
.tool input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Ошибка и переспрос — .field__err: мятная таблетка, моноширинный */
.err {
  display: inline-block; margin: 14px 0 0; font: 400 var(--fs-2)/1.5 var(--mono);
  background: var(--accent); color: var(--on-accent); padding: 6px 12px; border-radius: var(--r-soft);
}

.attach { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.attach li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; background: var(--c-white); border-radius: var(--r-soft); padding: 8px 12px; font-size: var(--fs-5); }
.attach .warn { flex-basis: 100%; font: 400 var(--fs-2)/1.5 var(--mono); background: var(--accent); padding: 4px 10px; border-radius: var(--r-soft); }
.attach audio { flex: 1 1 100%; width: 100%; height: 40px; min-width: 0; }
.attach li > span:not(.name):not(.warn) { margin-right: auto; font-family: var(--mono); }
.attach .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach button { border: 0; background: none; color: var(--fg); font: 500 var(--fs-5) var(--text); text-decoration: underline; cursor: pointer; padding: 6px; }

/* «Мои ответы» */
.hint { margin: 0 0 16px; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: var(--st-base) solid var(--fg); }
.list li button {
  width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--ln); background: none; color: var(--fg);
  font: inherit; padding: 14px 0; cursor: pointer;
}
.list .q { display: block; font-size: var(--fs-5); color: var(--mute); margin-bottom: 4px; }
.list .a { display: block; font-size: var(--fs-8); }
.list .a.empty { display: inline-block; font: 400 var(--fs-2)/1.5 var(--mono); background: var(--accent); padding: 4px 10px; border-radius: var(--r-soft); }
.done-msg { margin: 20px 0 0; padding: 14px 16px; background: var(--c-white); border-radius: var(--r-soft); }
.diag { margin-top: 24px; }
.diag pre { white-space: pre-wrap; font: 400 12px/1.5 var(--mono); color: var(--mute); }

/* Свои кнопки — только вне Telegram. Главная — чёрная таблетка (.button), «Назад» — в контуре */
.fallback {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; padding: 12px 20px 16px;
  background: var(--bg); border-top: 1px solid var(--ln);
}
.fallback button {
  flex: 1; min-height: var(--tap); border: 0; border-radius: var(--r-pill); font: 500 var(--fs-5) var(--text); cursor: pointer;
  background: transparent; color: var(--fg); box-shadow: inset 0 0 0 var(--st-base) currentColor;
}
.fallback button.primary { background: var(--action-bg); color: var(--action-fg); box-shadow: none; }
.fallback button:disabled { opacity: .35; }
