/* Тест «Колесо баланса» на сайте (/test/). Страницы отдаёт бот (internal/app/web_koleso.go), этот файл —
   по адресу /test/test.css, после общего /site.css сайта. Здесь только классы .t-: токены (--accent,
   --card, --chip, --mint, --shadow…), кнопки .btn, карточки .g-card и цвета сфер .s-<ключ> — из site.css,
   сам site.css не меняется. Внутри .g-page сайт обнуляет отступы у p и h1–h3, поэтому свои отступы
   заданы через .t-page. Без JS: оценка 1–10 — радиокнопки, оформленные рядом кнопок-цифр; на телефоне
   (360 px) цифры встают в два ряда по пять, горизонтальной прокрутки нет. */

.t-page { display: flex; flex-direction: column; gap: 40px; padding-top: 24px; }
.t-page h1 { font-size: 2.6rem; line-height: 1.1; }
.t-page h2 { font-size: 1.5rem; line-height: 1.25; }
.t-narrow { width: 100%; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }

/* Первый экран и сообщения — на мятной подложке, как у главной */
.t-hero { display: flex; flex-direction: column; gap: 14px; padding: 36px 40px; border-radius: 28px; background: var(--mint); }
.t-alert { padding: 14px 18px; border-left: 4px solid var(--danger); border-radius: 0 16px 16px 0; background: #fdecea; color: #8a1f14; }

/* Форма: сфера — карточка с полосой цвета сферы сверху и рядом цифр 1–10 */
.t-form { display: flex; flex-direction: column; gap: 16px; }
.t-sphere {
  min-width: 0;
  margin: 0;
  padding: 18px 20px 16px;
  border: 0;
  border-top: 6px solid var(--sphere, var(--accent));
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.t-legend { float: left; width: 100%; margin: 0 0 12px; padding: 0; }
.t-name { display: block; font-size: 1.1rem; font-weight: 700; }
.t-desc { display: block; color: var(--muted); font-size: 0.95rem; }
.t-scale { clear: both; position: relative; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
/* Радиокнопка невидима, но фокусируема: подсказку браузера «выберите вариант» видно у ряда цифр */
.t-radio { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
.t-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  background: var(--chip);
  color: var(--fg);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background .15s, color .15s;
}
.t-num:hover { background: #e3ebe8; }
.t-radio:checked + .t-num { background: var(--accent); color: #fff; }
.t-radio:focus-visible + .t-num { outline: 3px solid var(--accent); outline-offset: 2px; }
.t-page .t-ends { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0 0; color: var(--muted); font-size: 0.8rem; }
.t-missing { box-shadow: 0 0 0 2px var(--danger), var(--shadow); }
.t-page .t-need { margin: 8px 0 0; color: var(--danger); font-size: 0.9rem; font-weight: 600; }
.t-page .t-submit { margin: 8px 0 0; }
.t-submit .btn { min-width: 16rem; }

/* Результат: картинка колеса и выводы рядом, на телефоне — друг под другом */
.t-result { display: flex; flex-direction: column; gap: 24px; }
.t-split { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 40px; align-items: start; }
.t-wheel { display: block; width: 100%; height: auto; border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.t-summary { display: flex; flex-direction: column; gap: 16px; }
.t-average { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.t-average-num { color: var(--accent); font-size: 3rem; font-weight: 800; line-height: 1; }
.t-facts { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 20px 24px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.t-facts div { display: flex; flex-direction: column; gap: 2px; }
.t-facts dt { margin: 0; color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.t-facts dd { margin: 0; font-weight: 600; }

/* Оценки по сферам: название, полоса длиной в оценку, число */
.t-block { display: flex; flex-direction: column; gap: 16px; }
.t-scores { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.t-scores li { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) 2rem; align-items: center; gap: 16px; margin: 0; }
.t-score-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.t-bar { height: 12px; border-radius: 999px; background: var(--chip); overflow: hidden; }
.t-fill { display: block; height: 100%; border-radius: inherit; background: var(--sphere, var(--accent)); }
.t-score-val { font-weight: 700; text-align: right; }
.t-w1 { width: 10%; }
.t-w2 { width: 20%; }
.t-w3 { width: 30%; }
.t-w4 { width: 40%; }
.t-w5 { width: 50%; }
.t-w6 { width: 60%; }
.t-w7 { width: 70%; }
.t-w8 { width: 80%; }
.t-w9 { width: 90%; }
.t-w10 { width: 100%; }

/* «Что дальше»: кнопка в Telegram на мятной подложке, под ней карточки сайта */
.t-save { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 20px; background: var(--mint); }

@media (max-width: 900px) {
  .t-split { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .t-wheel { max-width: 480px; }
}
@media (max-width: 640px) {
  .t-page { gap: 28px; padding-top: 16px; }
  .t-page h1 { font-size: 2rem; }
  .t-hero { padding: 24px 20px; border-radius: 24px; }
  .t-sphere { padding: 16px 16px 14px; }
  .t-scale { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .t-submit .btn { min-width: 0; }
  .t-scores li { grid-template-columns: minmax(0, 1fr) 2rem; gap: 6px 12px; }
  .t-bar { grid-column: 1 / -1; grid-row: 2; }
  .t-save { padding: 20px; }
}

@media print {
  .t-form .t-submit, .t-save { display: none; }
  .t-hero, .t-facts, .t-sphere { background: none; box-shadow: none; border-color: #999; }
}

/* ---------- Подробный тест (/test/podrobno/, web_koleso_detail.go) ---------- */

/* Выбор режима «Быстро» / «Подробно» — две карточки-ссылки над формой, без JS */
.t-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.t-mode {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 14px 18px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  color: var(--fg);
  text-decoration: none;
}
.t-mode:not(.t-mode-on):hover { border-color: var(--accent); }
.t-mode-on { border-color: var(--accent); background: var(--mint); }
.t-mode-name { font-weight: 700; }
.t-mode-desc { color: var(--muted); font-size: 0.9rem; }

/* Шаги формы и блоки утверждений: сфера — та же карточка .t-sphere, утверждения — внутри неё */
.t-step { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.t-block7 { padding-bottom: 20px; }
.t-page .t-legend7 { color: var(--muted); font-size: 0.9rem; }
.t-page .t-note { clear: both; margin: 0 0 4px; color: var(--muted); font-size: 0.95rem; }
.t-item { clear: both; min-width: 0; margin: 12px 0 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line); }
.t-item.t-missing { padding: 14px 10px 10px; border-radius: 14px; }
.t-q { float: left; width: 100%; margin: 0 0 10px; padding: 0; font-weight: 600; line-height: 1.4; }
.t-scale7 { clear: both; position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.t-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.t-alt { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.t-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}
.t-chip:hover { border-color: var(--accent); }
.t-radio:checked + .t-chip { border-color: var(--accent); background: var(--accent); color: #fff; }
.t-radio:focus-visible + .t-chip { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Три важные сферы — флажки, оформленные плитками с точкой цвета сферы */
.t-pick-list { clear: both; position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.t-check { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
.t-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--chip);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.t-pick:hover { border-color: var(--line); }
.t-check:checked + .t-pick { border-color: var(--accent); background: var(--mint); }
.t-check:focus-visible + .t-pick { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Ссылка на подробный тест под быстрым результатом */
.t-page .t-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }

/* Подробный результат */
.t-page .t-disclaimer { padding: 14px 18px; border-left: 4px solid var(--accent); border-radius: 0 16px 16px 0; background: var(--mint); }
.t-figure { margin: 0; }
.t-page .t-caption { margin-top: 10px; color: var(--muted); font-size: 0.9rem; }
.t-focus { display: flex; flex-direction: column; gap: 8px; padding: 20px 24px; border-left: 6px solid var(--sphere, var(--accent)); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.t-page .t-focus-name { display: flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 700; }
.t-care { padding: 16px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--chip); }
.t-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.t-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 18px 20px;
  border-top: 6px solid var(--sphere, var(--accent));
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.t-page .t-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1.1rem; }
.t-tag { padding: 2px 8px; border-radius: 999px; background: var(--mint); color: var(--accent); font-size: 0.75rem; font-weight: 600; }
.t-page .t-detail-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.t-detail-num { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.t-label { font-weight: 600; }
.t-page .t-gap { padding: 10px 12px; border-radius: 12px; background: var(--mint); font-size: 0.95rem; }

@media (max-width: 900px) {
  .t-details { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .t-modes { grid-template-columns: minmax(0, 1fr); }
  .t-scale7 { gap: 4px; }
  .t-pick-list { grid-template-columns: minmax(0, 1fr); }
  .t-focus, .t-detail { padding: 16px; }
}
@media print {
  .t-modes, .t-more, .t-alt { display: none; }
  .t-detail, .t-focus { box-shadow: none; }
}
