/* Пробная страница этапа 0. Цвета — из палитры Rit v1.0 (kb/30-design/principles.md); компонентов дизайна здесь нет. */
:root {
  --surface: #ffffff;
  --tile: #f4f4f6;
  --control: #f1f1f4;
  --pressed: #e9e9ee;
  --line: #ededf2;
  --text: #0a0a0a;
  --muted: #6e6e76;
  --ink: #1f2a44;
  --on-ink: #ffffff;
  --attention: #b23a0a;
  --attention-bg: #fff0e6;
  --done-bg: #e9f6ef;
  --done: #1c6340;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #111113;
    --tile: #1b1b21;
    --control: #1e1e24;
    --pressed: #24242c;
    --line: #27272e;
    --text: #f4f4f6;
    --muted: #9b9ba2;
    --ink: #e3e8f6;
    --on-ink: #0e1220;
    --attention: #ff8e5e;
    --attention-bg: #3a2317;
    --done-bg: #22322a;
    --done: #8edab5;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 17px/24px -apple-system, 'SF Pro Text', system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
/* Невидимый элемент: по его отступам страница узнаёт размеры «безопасной области» экрана. */
#safe-probe {
  position: fixed;
  visibility: hidden;
  pointer-events: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
main {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
}
h1 { font-size: 34px; line-height: 40px; font-weight: 800; margin: 8px 0 4px; }
h2 { font-size: 20px; line-height: 24px; font-weight: 700; margin: 0; }
p { margin: 8px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }
.sync { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.card { background: var(--tile); border-radius: 22px; padding: 16px; margin-top: 16px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.badge { flex: none; font-size: 13px; line-height: 20px; font-weight: 600; padding: 2px 10px; border-radius: 12px; background: var(--control); color: var(--muted); }
.badge:empty { display: none; }
.badge[data-state='done'] { background: var(--done-bg); color: var(--done); }
.badge[data-state='attention'] { background: var(--attention-bg); color: var(--attention); }
.steps { margin: 8px 0 0; padding-left: 24px; }
.steps li { margin-top: 4px; }
.row { display: flex; gap: 8px; margin-top: 12px; }
.row.wrap { flex-wrap: wrap; }
button {
  font: inherit;
  font-weight: 600;
  min-height: 48px;
  padding: 10px 16px;
  border: 0;
  border-radius: 18px;
  background: var(--control);
  color: var(--text);
  flex: 1 1 auto;
  touch-action: manipulation;
}
.card button { background: var(--surface); }
button:active { background: var(--pressed); }
button.primary { background: var(--ink); color: var(--on-ink); }
button.primary:active { opacity: 0.85; }
button:disabled { opacity: 0.4; }
button[aria-pressed='true'], button[data-chosen] { background: var(--ink); color: var(--on-ink); }
.seg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.seg-label { flex: 1 0 100%; font-size: 15px; color: var(--muted); }
.ask { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ask p { margin: 0; font-weight: 600; }
.big { font-size: 28px; line-height: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.big.expired { color: var(--attention); }
[hidden] { display: none !important; }
/* Ряд, в котором все кнопки скрыты, не должен оставлять пустой отступ. */
.row:not(:has(button:not([hidden]))) { display: none; }
