/* ==========================================================================
   Раздел тестов /testy/ — собственная дизайн-система.
   Токены берём из :root в site.css, макет и компоненты — свои.
   Префикс .t- выбран, чтобы не пересекаться с .quiz-* из /vopros-psikhologu/.
   ========================================================================== */

.t-page {
  --t-paper: #fcfbfa;
  --t-surface: #ffffff;
  --t-card: #faf9f8;
  --t-ink: var(--ink, #222222);
  --t-ink-strong: #141414;
  --t-muted: var(--muted, #5c5c5c);
  --t-line: rgba(34, 34, 34, 0.13);
  --t-line-soft: rgba(34, 34, 34, 0.07);
  --t-accent: var(--accent, #b4436c);
  --t-accent-dark: var(--accent-dark, #722946);
  --t-brand: var(--brand, #6a2841);
  --t-radius: var(--radius, 10px);
  --t-shadow: var(--shadow-soft, 0 8px 24px rgba(114, 41, 70, 0.06));
  --t-shadow-lift: 0 12px 30px rgba(114, 41, 70, 0.12);
  --t-font: var(--font-body, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  --t-font-serif: var(--font-quote, Georgia, "Times New Roman", serif);
  /* Раздел читают, а не просматривают: одна колонка на всю страницу, ширина —
     по длине строки (~70 знаков), а не по сетке остального сайта. */
  --t-col: 42rem;
  --t-measure: 34rem;
  --t-step-dur: 180ms;
  --t-pick-dur: 220ms;

  font-family: var(--t-font);
  color: var(--t-ink);
}

/* Компоненты раздела переключаются атрибутом hidden — он должен побеждать display */
.t-page [hidden],
.t-runner[hidden],
.t-step[hidden],
[data-t-variant][hidden],
[data-t-variant-title][hidden] {
  display: none !important;
}

.t-vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.t-wrap,
.t-narrow {
  width: min(var(--t-col), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   1. Первый экран страницы теста (то, что индексируется и попадает в LCP)
   -------------------------------------------------------------------------- */

.t-intro {
  background: var(--t-paper);
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--t-line-soft);
}

.t-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--t-muted);
}

.t-intro h1 {
  margin: 0;
  max-width: 22em;
  font-size: clamp(1.6rem, 4.4vw, 2.4rem);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.01em;
  color: var(--t-ink-strong);
}

.t-intro-lead {
  margin: 1rem 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--t-ink);
}

.t-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--t-muted);
}

.t-meta-row li {
  position: relative;
  padding-left: 0.95rem;
}

.t-meta-row li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--t-accent);
  opacity: 0.55;
}

.t-badge {
  display: inline-block;
  margin: 1.25rem 0 0;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--t-line);
  border-radius: 999px;
  background: var(--t-surface);
  font-size: 0.82rem;
  color: var(--t-muted);
}

.t-start-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  margin-top: 1.75rem;
}

.t-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.9rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--t-radius);
  background: var(--t-accent);
  color: #ffffff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.t-btn:hover,
.t-btn:focus-visible {
  background: var(--t-accent-dark);
  color: #ffffff;
}

.t-btn-ghost {
  background: transparent;
  border-color: var(--t-line);
  color: var(--t-ink);
}

.t-btn-ghost:hover,
.t-btn-ghost:focus-visible {
  background: var(--t-card);
  border-color: var(--t-accent);
  color: var(--t-ink);
}

.t-start-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--t-muted);
}

/* Подпись автора вместо блока «обо мне» на первом экране: кто собрал шкалы и
   кто написал разбор, без прогрева к записи. */
.t-byline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.75rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--t-muted);
}

.t-byline img {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 14%;
}

:where(.t-page) :is(a, button, input, [role="radio"]):focus-visible {
  outline: 2px solid var(--t-accent-dark);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   2. Экран прохождения: фиксированный слой без путей ухода со страницы
   -------------------------------------------------------------------------- */

.t-runner {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: var(--t-paper);
  overscroll-behavior: contain;
}

body.t-running {
  overflow: hidden;
}

body.t-running .site-header,
body.t-running .scroll-top,
body.t-running .psi-cookie-notice {
  display: none !important;
}

.t-progress {
  flex: 0 0 auto;
  height: 3px;
  background: var(--t-line-soft);
}

.t-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--t-accent);
  transition: width 260ms ease;
}

.t-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 48px;
  padding: 0 max(1rem, env(safe-area-inset-left)) 0 max(1rem, env(safe-area-inset-right));
  border-bottom: 1px solid var(--t-line-soft);
  font-size: 0.8rem;
  color: var(--t-muted);
}

.t-bar-brand {
  font-weight: 600;
  color: var(--t-brand);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.t-bar-count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.t-bar-exit {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0.35rem 0.5rem;
  border: 0;
  background: none;
  color: var(--t-muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.t-bar-exit:hover {
  color: var(--t-ink);
}

.t-runner-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.t-step {
  display: flex;
  /* не сжимаемся ниже своего контента: длинный шаг со шкалой должен скроллиться */
  flex: 1 0 auto;
  flex-direction: column;
  width: min(640px, calc(100% - 2.5rem));
  margin-inline: auto;
  padding: 1.5rem 0 max(1.5rem, env(safe-area-inset-bottom));
}

.t-step.is-entering {
  animation: t-step-in var(--t-step-dur) ease-out;
}

@keyframes t-step-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.t-instruction {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--t-muted);
}

.t-question {
  margin: 0;
  max-width: 22em;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--t-ink-strong);
}

.t-kbd-hint {
  margin: 1.25rem 0 0;
  font-size: 0.8rem;
  color: var(--t-muted);
}

.t-kbd-hint kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: 0.05em 0.3em;
  border: 1px solid var(--t-line);
  border-radius: 4px;
  background: var(--t-surface);
  font: inherit;
  font-size: 0.95em;
  text-align: center;
}

/* Варианты ответа: вертикальный список, на мобильном — в зоне большого пальца */
.t-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 2rem;
}

.t-option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  min-height: 56px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--t-line);
  border-radius: var(--t-radius);
  background: var(--t-surface);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--t-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.t-option:hover {
  border-color: var(--t-accent);
}

.t-option[aria-checked="true"] {
  border-color: var(--t-accent);
  background: rgba(180, 67, 108, 0.06);
}

.t-option.is-picked {
  border-color: var(--t-accent);
  background: rgba(180, 67, 108, 0.12);
  transition: background var(--t-pick-dur) ease, border-color var(--t-pick-dur) ease;
}

.t-kbd {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--t-line);
  border-radius: 6px;
  background: var(--t-card);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: var(--t-muted);
}

.t-option[aria-checked="true"] .t-kbd,
.t-option.is-picked .t-kbd {
  border-color: var(--t-accent);
  color: var(--t-accent-dark);
}

.t-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
}

.t-back {
  min-height: 44px;
  padding: 0.4rem 0;
  border: 0;
  background: none;
  color: var(--t-muted);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}

.t-back:hover {
  color: var(--t-ink);
}

.t-back[hidden] {
  display: none !important;
}

/* Экран-переход между частями теста */
.t-interstitial {
  justify-content: center;
  text-align: left;
}

.t-interstitial .t-part {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--t-accent-dark);
}

.t-interstitial h2 {
  margin: 0;
  max-width: 20em;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.32;
  color: var(--t-ink-strong);
}

.t-interstitial p:not(.t-part) {
  margin: 1rem 0 0;
  max-width: 30em;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--t-muted);
}

.t-interstitial .t-nav {
  margin-top: auto;
  padding-top: 2rem;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   3. Сегментированная шкала 0–8 (WSAS): другой контрол, явное подтверждение
   -------------------------------------------------------------------------- */

.t-step-scale {
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

.t-scale-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 1.75rem 0 0;
}

.t-scale-row {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--t-line-soft);
}

.t-scale-row:last-child {
  border-bottom: 0;
}

.t-scale-label {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--t-ink-strong);
}

.t-scale-cells {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 3px;
}

.t-cell {
  min-height: 48px;
  padding: 0;
  border: 1px solid var(--t-line);
  border-radius: 6px;
  background: var(--t-surface);
  font: inherit;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: var(--t-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.t-cell:hover {
  border-color: var(--t-accent);
}

.t-cell[aria-checked="true"] {
  border-color: var(--t-accent);
  background: var(--t-accent);
  color: #ffffff;
  font-weight: 600;
}

.t-scale-ends {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.4rem;
  font-size: 0.76rem;
  color: var(--t-muted);
}

.t-na {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  margin-top: 0.35rem;
  font-size: 0.88rem;
  color: var(--t-muted);
  cursor: pointer;
}

.t-na input {
  width: 18px;
  height: 18px;
  accent-color: var(--t-accent);
}

.t-scale-row.is-na .t-scale-cells,
.t-scale-row.is-na .t-scale-ends {
  opacity: 0.35;
  pointer-events: none;
}

.t-submit-row {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--t-line-soft);
}

.t-submit-row .t-btn {
  width: 100%;
}

.t-submit-note {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--t-muted);
}

.t-submit-note[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   4. Результат — другой регистр: текст, который читают
   -------------------------------------------------------------------------- */

.t-result {
  padding: 2.5rem 0 1rem;
  background: var(--t-surface);
}

.t-result-hero {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--t-line-soft);
}

.t-result-title {
  margin: 0;
  max-width: 24em;
  font-family: var(--t-font-serif);
  font-size: clamp(1.5rem, 5.4vw, 2.125rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--t-ink-strong);
}

.t-score-line {
  margin: 1rem 0 0;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  color: var(--t-muted);
}

.t-score-line b {
  font-weight: 600;
  color: var(--t-ink);
}

/* Визуализация матрицы 2×2 — главный визуальный аргумент раздела */
.t-quadrant {
  margin: 1.5rem 0 0;
  max-width: 420px;
}

.t-quadrant svg {
  display: block;
  width: 100%;
  height: auto;
}

.t-qcell {
  fill: #f4f2f1;
  stroke: #ffffff;
  stroke-width: 2;
  transition: fill 0.25s ease;
}

.t-qcell-2 {
  fill: #efedec;
}

.t-qcell-3 {
  fill: #eae7e6;
}

.t-qcell.is-active {
  fill: rgba(180, 67, 108, 0.1);
}

.t-qframe {
  fill: none;
  stroke: var(--t-line);
  stroke-width: 1;
}

.t-qactive-frame {
  fill: none;
  stroke: var(--t-accent);
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.t-qactive-frame.is-active {
  opacity: 1;
}

.t-qgrid {
  stroke: var(--t-line);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.t-qlabel {
  font-family: var(--t-font);
  font-size: 10.5px;
  fill: #8a8683;
}

.t-qlabel.is-active {
  fill: var(--t-ink-strong);
  font-weight: 600;
}

.t-qaxis {
  font-family: var(--t-font);
  font-size: 10px;
  fill: var(--t-muted);
  letter-spacing: 0.04em;
}

.t-qtick {
  font-family: var(--t-font);
  font-size: 9.5px;
  fill: #9a9694;
}

.t-qdot-halo {
  fill: #ffffff;
}

.t-qdot {
  fill: var(--t-accent);
}

.t-quadrant figcaption {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--t-muted);
}

/* Блоки прозы результата */
.t-block {
  padding: 2rem 0;
  border-bottom: 1px solid var(--t-line-soft);
}

.t-block:last-child {
  border-bottom: 0;
}

.t-block h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--t-ink-strong);
}

.t-block p {
  margin: 0 0 1rem;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.t-block p:last-child {
  margin-bottom: 0;
}

.t-block ul,
.t-block ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.t-block li {
  position: relative;
  margin-bottom: 0.85rem;
  padding-left: 1.35rem;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.t-block li:last-child {
  margin-bottom: 0;
}

.t-block li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--t-accent);
  opacity: 0.4;
}

.t-block-steps li::before {
  content: counter(t-step-counter);
  counter-increment: t-step-counter;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  opacity: 1;
  font-size: 0.9em;
  font-weight: 600;
  color: var(--t-accent-dark);
}

.t-block-steps ol {
  counter-reset: t-step-counter;
}

.t-note {
  margin: 1.25rem 0 0;
  padding: 0.9rem 1.1rem;
  border-left: 2px solid var(--t-line);
  background: var(--t-card);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--t-muted);
}

/* CTA */
.t-cta {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid var(--t-line);
  border-radius: 14px;
  background: var(--t-card);
}

.t-cta h3 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--t-ink-strong);
}

.t-cta p {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  line-height: 1.65;
}

.t-cta .t-btn {
  width: 100%;
}

.t-price {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.85rem;
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
  color: var(--t-muted);
}

.t-price b {
  font-weight: 600;
  color: var(--t-ink);
}

/* Мобильный sticky-CTA — только после показа результата */
.t-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: none;
  padding: 0.6rem max(0.75rem, env(safe-area-inset-right)) max(0.6rem, env(safe-area-inset-bottom))
    max(0.75rem, env(safe-area-inset-left));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--t-line);
  backdrop-filter: blur(6px);
}

.t-sticky .t-btn {
  width: 100%;
  min-height: 48px;
  font-size: 0.95rem;
}

body.t-has-result .t-sticky.is-visible {
  display: block;
}

/* чтобы конец страницы не оставался под sticky-полосой */
@media (max-width: 860px) {
  body.t-has-result {
    padding-bottom: 4.5rem;
  }
}

@media (min-width: 861px) {
  body.t-has-result .t-sticky.is-visible {
    display: none;
  }
}

/* Автор, отзыв, FAQ, методика */
.t-author {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.t-author img {
  width: 96px;
  height: 120px;
  border-radius: 8px;
  object-fit: cover;
  object-position: 50% 18%;
}

.t-author-name {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--t-ink-strong);
}

.t-author-role {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  color: var(--t-muted);
}

.t-author ul {
  margin: 0 0 0.85rem;
}

.t-author li {
  margin-bottom: 0.35rem;
  padding-left: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.t-author li::before {
  top: 0.65em;
  width: 4px;
  height: 4px;
}

.t-author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.92rem;
}

.t-review {
  margin: 0 0 1.25rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--t-line-soft);
  border-radius: 12px;
  background: var(--t-card);
}

.t-review:last-child {
  margin-bottom: 0;
}

.t-review blockquote {
  margin: 0;
  font-family: var(--t-font-serif);
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--t-ink);
}

.t-review figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--t-muted);
}

.t-faq details {
  border-bottom: 1px solid var(--t-line-soft);
}

.t-faq details:first-of-type {
  border-top: 1px solid var(--t-line-soft);
}

.t-faq summary {
  padding: 1rem 2rem 1rem 0;
  position: relative;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--t-ink-strong);
  cursor: pointer;
  list-style: none;
}

.t-faq summary::-webkit-details-marker {
  display: none;
}

.t-faq summary::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 1.35rem;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--t-muted);
  border-bottom: 2px solid var(--t-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.t-faq details[open] summary::after {
  transform: rotate(-135deg);
}

.t-faq details p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--t-ink);
}

.t-method {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--t-muted);
}

.t-method p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.t-method cite {
  font-style: normal;
}

.t-disclaimer {
  margin: 1.25rem 0 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--t-line);
  border-radius: 10px;
  background: var(--t-card);
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--t-muted);
}

.t-links {
  display: grid;
  gap: 0.85rem;
}

.t-link-card {
  display: block;
  padding: 1rem 1.15rem;
  border: 1px solid var(--t-line);
  border-radius: 12px;
  background: var(--t-surface);
  text-decoration: none;
  color: var(--t-ink);
  transition: border-color 0.15s ease;
}

.t-link-card:hover {
  border-color: var(--t-accent);
}

.t-link-card b {
  display: block;
  margin-bottom: 0.2rem;
  font-weight: 600;
}

.t-link-card span {
  font-size: 0.9rem;
  color: var(--t-muted);
}

.t-booking {
  padding: 2rem 0;
}

.t-booking-host {
  min-height: 320px;
}

.t-messengers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.t-messengers .t-btn {
  flex: 1 1 auto;
  min-width: 160px;
}

/* --------------------------------------------------------------------------
   5. Хаб раздела: витрина, куда добавляются третий и четвёртый тест
   -------------------------------------------------------------------------- */

/* Тесты идут списком в одну колонку: карточки в две колонки внутри читаемой
   ширины сжимались до 200 px, и надстрочная строка с методикой ломалась. */
.t-cards {
  display: grid;
  gap: 1rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

/* Карточка целиком — ссылка, поэтому гасим наследуемое подчёркивание. */
.t-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--t-line);
  border-radius: 14px;
  background: var(--t-surface);
  box-shadow: var(--t-shadow);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.t-card,
.t-card * {
  text-decoration: none;
}

/* Акцентная полоса слева выезжает по наведению — подсказка, что вся карточка
   является ссылкой, без сдвига макета. */
.t-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--t-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.15s ease;
}

@media (hover: hover) {
  .t-card:hover {
    border-color: var(--t-accent);
    box-shadow: var(--t-shadow-lift);
  }

  .t-card:hover::before {
    transform: scaleX(1);
  }
}

.t-card:focus-visible {
  outline: 2px solid var(--t-accent);
  outline-offset: 3px;
}

.t-card-method {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--t-accent-dark);
}

.t-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--t-ink-strong);
}

.t-card h3 a {
  color: inherit;
  text-decoration: none;
}

.t-card h3 a:hover {
  color: var(--t-accent-dark);
}

.t-card-what {
  margin: 0 0 1rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--t-ink);
}

.t-card .t-meta-row {
  margin: 0 0 1rem;
  font-size: 0.85rem;
}

/* Роль call-to-action внутри карточки-ссылки: не кнопка, но читается как действие. */
.t-card-free {
  margin: auto 0 0;
  padding-top: 0.9rem;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--t-accent-dark);
}

/* inline-block съедает пробел в начале content, поэтому отступ задаём margin */
.t-card-free::after {
  content: "→";
  display: inline-block;
  margin-left: 0.35em;
  transition: transform 0.15s ease;
}

@media (hover: hover) {
  .t-card:hover .t-card-free::after {
    transform: translateX(3px);
  }
}

.t-card .t-btn {
  margin-top: auto;
  width: 100%;
}

.t-card-soon {
  border-style: dashed;
  box-shadow: none;
  background: var(--t-card);
}

.t-section {
  padding: 2.75rem 0;
  border-top: 1px solid var(--t-line-soft);
}

.t-section h2 {
  margin: 0 0 1.25rem;
  max-width: 26em;
  font-size: clamp(1.3rem, 3.4vw, 1.7rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--t-ink-strong);
}

.t-section p {
  margin: 0 0 1rem;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.t-section p:last-child {
  margin-bottom: 0;
}

.t-breadcrumbs {
  padding: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--t-muted);
}

.t-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.t-breadcrumbs li + li::before {
  content: "→";
  margin-right: 0.5rem;
  color: var(--t-line);
}

.t-breadcrumbs a {
  color: var(--t-muted);
}

/* --------------------------------------------------------------------------
   6. Адаптив
   -------------------------------------------------------------------------- */

@media (min-width: 561px) {
  .t-scale-cells {
    gap: 4px;
  }
}

@media (min-width: 861px) {
  .t-intro {
    padding: 4rem 0 3.25rem;
  }

  .t-step {
    padding: 3rem 0 2.5rem;
    justify-content: center;
  }

  .t-question {
    font-size: 1.75rem;
  }

  /* На десктопе варианты идут сразу за вопросом, а не прижаты к низу экрана */
  .t-options {
    margin-top: 0;
    padding-top: 2.25rem;
  }

  .t-interstitial .t-nav {
    flex-direction: row;
    margin-top: 0;
  }

  .t-interstitial .t-btn {
    min-width: 220px;
  }

  .t-interstitial h2 {
    font-size: 1.6rem;
  }

  .t-result {
    padding: 3.5rem 0 1rem;
  }

  .t-cta .t-btn,
  .t-submit-row .t-btn {
    width: auto;
    min-width: 280px;
  }

  .t-quadrant {
    max-width: 460px;
  }
}

/* На узких экранах первый экран результата должен читаться без прокрутки:
   заголовок, баллы и квадрант целиком. */
@media (max-width: 480px) {
  .t-result {
    padding-top: 1.75rem;
  }

  .t-result-hero {
    padding-bottom: 1.5rem;
  }

  .t-quadrant {
    margin-top: 1.25rem;
    max-width: 288px;
  }

  .t-quadrant figcaption {
    margin-top: 0.6rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 400px) {
  .t-cell {
    font-size: 0.78rem;
  }

  .t-option {
    padding: 0.8rem 0.85rem;
    gap: 0.7rem;
  }

  .t-author {
    grid-template-columns: 72px 1fr;
  }

  .t-author img {
    width: 72px;
    height: 90px;
  }
}

/* --------------------------------------------------------------------------
   7. Уважение к prefers-reduced-motion: автопереход без анимации
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .t-page {
    --t-step-dur: 0ms;
    --t-pick-dur: 0ms;
  }

  .t-step.is-entering {
    animation: none;
  }

  .t-progress-fill,
  .t-option,
  .t-cell,
  .t-qcell,
  .t-qactive-frame,
  .t-card,
  .t-card::before,
  .t-card-free::after {
    transition: none;
  }

  .t-card:hover .t-card-free::after {
    transform: none;
  }
}

@media print {
  .t-runner,
  .t-sticky {
    display: none !important;
  }
}
