/* ---------- design tokens ---------- */
/* спокойная тёплая палитра: крем + приглушённый тёмно-бирюзовый акцент */
:root {
  color-scheme: light;
  --page:            #faf7f2;
  --surface-1:       #fffdf9;
  --surface-2:       #f1ede3;
  --text-primary:    #2b2a27;
  --text-secondary:  #6b6660;
  --muted:           #9a948a;
  --gridline:        #e9e4d8;
  --baseline:        #d8d2c4;
  --border:          rgba(43,42,39,0.08);
  --accent:          #3f7d70;
  --accent-strong:   #2f5f55;
  --accent-wash:     rgba(63,125,112,0.10);
  --good:            #2f7d3f;
  --warn-bg:         #f7ecd9;
  --warn-text:       #8a5a00;
  --shadow-card:     0 1px 2px rgba(43,42,39,0.04), 0 6px 20px rgba(43,42,39,0.06);
  --shadow-hover:    0 10px 26px rgba(63,125,112,0.20);
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 20px;
  /* сериф — только для фраз, обращённых к человеку, и для главного названия */
  --font-display: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page:            #1b201e;
    --surface-1:       #232823;
    --surface-2:       #2b3129;
    --text-primary:    #f3f1ec;
    --text-secondary:  #c7c2b6;
    --muted:           #8f8a80;
    --gridline:        #333a34;
    --baseline:        #3c443d;
    --border:          rgba(255,255,255,0.08);
    --accent:          #7fbfae;
    --accent-strong:   #a9d8cb;
    --accent-wash:     rgba(127,191,174,0.14);
    --good:            #6fcf82;
    --warn-bg:         #322a17;
    --warn-text:       #e0b559;
    --shadow-card:     0 1px 2px rgba(0,0,0,0.20), 0 6px 20px rgba(0,0,0,0.28);
    --shadow-hover:    0 10px 26px rgba(127,191,174,0.16);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

button, input, textarea, select { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app-shell {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 40px;
}

/* ---------- header / footer ---------- */
.app-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 16px; /* без зазора на узком экране подпись липла вплотную к «Компас» */
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 20px; }
.brand-mark { color: var(--accent); font-size: 20px; }
.header-sub { color: var(--muted); font-size: 13px; }

.app-footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.screen-root { flex: 1; }

/* ---------- generic ---------- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

h1 { font-size: 24px; margin: 0 0 12px; line-height: 1.35; }
h2 { font-size: 19px; margin: 0 0 10px; }
p  { line-height: 1.6; color: var(--text-secondary); margin: 0 0 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(63,125,112,0.25); }
.btn-primary:hover { background: var(--accent-strong); box-shadow: var(--shadow-hover); }
.btn-secondary { background: var(--surface-2); color: var(--text-primary); }
.btn-secondary:hover { background: var(--gridline); }
.btn-ghost { background: transparent; color: var(--text-secondary); padding: 10px 14px; }
.btn-ghost:hover { color: var(--text-primary); background: var(--surface-2); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- welcome screen ---------- */
.intro-card p { color: var(--text-primary); font-size: 16px; }
.intro-card .signature { color: var(--muted); font-size: 13px; margin-top: 16px; }

.track-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}
@media (max-width: 560px) {
  .track-grid { grid-template-columns: 1fr; }
}
.track-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 18px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.track-card:hover { border-color: var(--accent); background: var(--accent-wash); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.track-card:active { transform: translateY(0); }
.track-card .track-title { font-weight: 600; font-size: 16px; margin-bottom: 6px; }
.track-card .track-desc { color: var(--text-secondary); font-size: 13px; line-height: 1.5; }

/* ---------- quiz screen ---------- */
.progress-track {
  height: 6px;
  background: var(--gridline);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 22px;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.25s ease;
}
.progress-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}

.question-text {
  font-size: 19px;
  line-height: 1.4;
  margin: 4px 0 26px;
  color: var(--text-primary);
}

.scale-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scale-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  background: var(--surface-1);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.1s ease;
}
.scale-option:hover { border-color: var(--accent); background: var(--accent-wash); transform: translateX(2px); }
.scale-option:active { transform: translateX(2px) scale(0.99); }
.scale-option.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.scale-option.is-selected .scale-dot { border-color: #fff; background: #fff; }
.scale-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--baseline);
  flex-shrink: 0;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.scale-hint {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
}

/* ---------- results screen ---------- */
.holland-hero {
  text-align: center;
  padding: 30px 24px 0; /* низ закрывает сводка .digest */
}
.holland-code {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--accent);
  margin-bottom: 6px;
}
.holland-types { color: var(--text-secondary); font-size: 14px; }

.bar-chart { margin: 0; }
.bar-row {
  display: grid;
  /* 130px не хватало: «Исследовательский» и «Конвенциональный» вылезали
     из колонки и наезжали на полосу — на всех ширинах, не только на телефоне */
  grid-template-columns: 154px 1fr 46px;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}
.bar-label { font-size: 13px; color: var(--text-primary); }
.bar-label .bar-sub { display: block; color: var(--muted); font-size: 11px; }
.bar-track {
  height: 14px;
  background: var(--gridline);
  border-radius: 4px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--accent);
  /* по умолчанию приглушённый: акцент достаётся только ключевым строкам (.is-key) */
  opacity: 0.32;
  border-radius: 4px 0 0 4px;
  transition: width 0.4s ease;
}
.bar-value { font-size: 12px; color: var(--text-secondary); text-align: right; font-variant-numeric: tabular-nums; }

.table-toggle {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
}
.riasec-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
.riasec-table th, .riasec-table td {
  text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--gridline);
}
.riasec-table th { color: var(--muted); font-weight: 500; }

.section-title {
  font-size: 15px;
  font-weight: 600;
  margin: 30px 0 12px;
  color: var(--text-primary);
}

/* Догоняющие варианты — не пять одинаковых карточек, а нумерованный список
   по линейке. Отдельную карточку получает только первый (.is-top ниже). */
.profession-card {
  counter-increment: prof;
  position: relative;
  background: none;
  border: none;
  border-top: 1px solid var(--gridline);
  border-radius: 0;
  padding: 18px 0 20px 46px;
  margin: 0;
  box-shadow: none;
}
.profession-card::before {
  content: counter(prof, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 19px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.profession-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.profession-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.match-badge {
  background: var(--accent-wash);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.profession-desc { font-size: 13.5px; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.55; }
.profession-note {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-primary);
  background: none;
  border-left: 2px solid var(--gridline);
  border-radius: 0;
  padding: 1px 0 1px 12px;
}
.profession-note b { color: var(--accent-strong); }

/* ---------- subscription block ---------- */
.sub-card {
  margin-top: 30px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-m);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-2);
}
.sub-icon { font-size: 22px; }
.sub-text { flex: 1; }
.sub-title { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.sub-desc { color: var(--text-secondary); font-size: 12.5px; }
.sub-badge {
  background: var(--warn-bg);
  color: var(--warn-text);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.restart-row { text-align: center; margin-top: 26px; }

/* ============================================================
   Мульти-тестовый проход: финальный визуал.

   Идея — «честный измерительный прибор», а не глянцевый квиз: тонкие линейки
   вместо лишних коробок, шкалы с видимым центром, цифры не спрятаны.
   Сериф (--font-display) достаётся только тому, что обращено к человеку:
   вывод между тестами, заголовок подборки, название профессии №1.
   Данные и интерфейс — всегда санс.
   ============================================================ */

/* --- план из трёх тестов на приветственном экране: маршрут, а не серый бокс --- */
.test-plan {
  margin: 22px 0 4px;
  padding: 16px 0 2px;
  background: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
}
.test-plan-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.test-plan-list {
  counter-reset: plan;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.5;
}
/* Ни grid, ни flex: внутри li лежит смесь <b> и голого текста, а такая смесь
   в grid/flex распадается на отдельные items — текст уезжал в колонку номера
   и вставал по одному слову в строку. Номер выносим абсолютом, текст течёт как текст. */
.test-plan-list li {
  counter-increment: plan;
  position: relative;
  padding-left: 34px;
}
.test-plan-list li::before {
  content: counter(plan);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  line-height: 22px;
}
.test-plan-list b { color: var(--text-primary); font-weight: 600; }

/* --- прогресс: одна сегментированная шкала на три теста ---
   Раньше их было две (общая полоса + пилюли), и они спорили друг с другом.
   Теперь шкала одна: три сегмента, текущий заполняется по ходу вопросов. */
.quiz-progress { margin-bottom: 26px; }
.progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.progress-head .progress-label { margin: 0; font-size: 13px; color: var(--text-secondary); }
.progress-head .progress-label b { color: var(--text-primary); font-weight: 600; }
.progress-count {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.progress-steps {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 10px;
  margin: 0;
}
.progress-step {
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--muted);
  padding: 0;
  background: none;
  border-radius: 0;
  white-space: normal;
}
/* внутри шага это span-ы — без display:block высота не сработает */
.progress-step .progress-track { display: block; height: 4px; margin: 0 0 7px; }
.progress-step .progress-fill { display: block; opacity: 0.4; transition: width 0.3s ease; }
.progress-step-name { display: block; }
.progress-step.is-done { color: var(--text-secondary); }
.progress-step.is-done .progress-step-name::before { content: "✓"; color: var(--accent); margin-right: 4px; }
.progress-step.is-current { color: var(--text-primary); font-weight: 600; }
.progress-step.is-current .progress-fill { opacity: 1; }
.interlude-steps { margin-bottom: 22px; }

/* --- экран между тестами: чек-пойнт, а не ещё одна карточка --- */
.interlude-card {
  border-top: 3px solid var(--accent);
  padding: 24px 26px 26px;
}
.interlude-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 0;
  background: none;
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}
.interlude-badge::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--surface-1);
  font-size: 11px;
  letter-spacing: 0;
}
.interlude-card h2 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.interlude-summary {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.45;
  color: var(--text-primary);
  margin: 0;
}
/* ключевые слова подчёркнуты «маркером», а не выкрашены в акцент */
.interlude-summary b {
  font-weight: 600;
  background: linear-gradient(transparent 62%, var(--accent-wash) 62%);
}
.interlude-next {
  margin: 24px 0 22px;
  padding: 16px 18px;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
}
.interlude-next-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.interlude-next-title { font-size: 17px; font-weight: 600; margin: 5px 0 8px; }
.interlude-next p { font-size: 13.5px; margin-bottom: 10px; }
.interlude-meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* --- результаты: шапка и сводка «из чего это собрано» ---
   Сводка живёт прямо в карточке результата: три теста видно сразу,
   а полные графики ушли вниз, в раскрывающийся раздел. */
.holland-sub { color: var(--muted); font-size: 12px; margin-top: 10px; }

.digest {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  margin: 24px -24px 0;
  border-top: 1px solid var(--border);
  text-align: left;
}
.digest-item { padding: 14px 16px 16px; border-left: 1px solid var(--border); }
.digest-item:first-child { border-left: none; padding-left: 24px; }
.digest-item:last-child { padding-right: 24px; }
.digest-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.digest-value { font-size: 13px; line-height: 1.45; color: var(--text-primary); }

/* --- подводка к главному блоку результата --- */
.result-lead { margin: 34px 0 0; }
.result-lead-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-strong);
}
.result-lead-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  margin: 8px 0;
}
.card-hint { font-size: 13px; line-height: 1.55; color: var(--text-secondary); margin: 0 0 16px; }
.section-hint { font-size: 13px; line-height: 1.55; color: var(--text-secondary); margin: 0 0 4px; }

/* Та же история, что и в .test-plan-list: содержимое — <b> плюс голый текст,
   поэтому grid разрывал предупреждение на две непонятные колонки. */
.notice-card {
  position: relative;
  margin: 20px 0 0;
  padding: 14px 16px 14px 48px;
  border-left: 3px solid var(--warn-text);
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
  background: var(--warn-bg);
  color: var(--warn-text);
  font-size: 13px;
  line-height: 1.55;
}
.notice-card::before {
  content: "!";
  position: absolute;
  left: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--warn-text);
  color: var(--warn-bg);
  font-size: 12px;
  font-weight: 700;
}

/* --- нижний раздел: как посчитано (раскрывающийся) --- */
.appendix {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.appendix .section-title { margin: 0 0 6px; }
.appendix .section-hint { margin-bottom: 10px; }
.detail-block { border-bottom: 1px solid var(--gridline); }
.detail-block > summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 15px 0;
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.detail-block > summary::-webkit-details-marker { display: none; }
.detail-block > summary:hover { color: var(--accent-strong); }
.detail-block > summary::after {
  content: "+";
  align-self: center;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}
.detail-block[open] > summary::after {
  content: "−";
  background: var(--accent-wash);
  color: var(--accent-strong);
}
.detail-title { flex: 1; }
.detail-hint {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.detail-body { padding: 2px 0 24px; }

/* --- шкалы рабочего стиля ---
   Биполярная шкала читается только если видно центр: по центру трека стоит
   засечка, от неё до метки идёт заливка. Так виден не «уровень», а отклонение. */
.axis-chart { margin: 0; }
.axis-row { padding: 14px 0; border-bottom: 1px solid var(--gridline); }
.axis-row:last-child { border-bottom: none; padding-bottom: 4px; }
.axis-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.axis-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.axis-flag { font-size: 11px; color: var(--muted); white-space: nowrap; }
.axis-scale {
  display: grid;
  grid-template-columns: minmax(74px, 1fr) minmax(96px, 2.2fr) minmax(74px, 1fr);
  align-items: center;
  gap: 12px;
}
.axis-pole { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.axis-pole-right { text-align: right; }
.axis-track {
  position: relative;
  height: 6px;
  background: var(--gridline);
  border-radius: 999px;
}
.axis-track::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  bottom: -4px;
  width: 1px;
  margin-left: -0.5px;
  background: var(--baseline);
}
.axis-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.35;
  transition: left 0.3s ease, width 0.3s ease;
}
.axis-marker {
  position: absolute;
  top: 50%;
  width: 13px;
  height: 13px;
  margin-left: -6.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--page);
  transform: translateY(-50%);
  transition: left 0.3s ease;
}
.axis-row.is-left .axis-pole-left,
.axis-row.is-right .axis-pole-right { color: var(--text-primary); font-weight: 600; }
.axis-row.is-balanced .axis-marker { background: var(--page); border: 2px solid var(--baseline); }
.axis-row.is-balanced .axis-fill { opacity: 0.16; }

/* --- ценности: акцент только на верхних двух строках --- */
.values-chart { margin: 0; }
.bar-row.is-key .bar-label { font-weight: 600; }
.bar-row.is-key .bar-fill { opacity: 1; }

/* --- главный вариант подборки --- */
.profession-list { counter-reset: prof; margin-top: 18px; }
.profession-card.is-top {
  background: var(--surface-1);
  border: 1px solid var(--accent);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  padding: 20px 22px 22px;
  margin-bottom: 10px;
}
.profession-card.is-top::before { content: none; } /* номер не нужен: есть пометка */
.profession-flag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}
.profession-flag::before { content: "◈"; font-size: 12px; letter-spacing: 0; }
.profession-card.is-top .profession-name {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.2;
}
.profession-card.is-top .profession-desc { font-size: 14.5px; }
.profession-card.is-top .match-badge {
  font-size: 12px;
  padding: 5px 12px;
  background: var(--accent);
  color: var(--surface-1);
}
.profession-card.is-top .profession-note {
  background: var(--surface-2);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  padding: 11px 13px;
}

/* --- пометки: «+» это про совпадение, «≠» про расхождение --- */
.profession-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  line-height: 1.35;
}
.tag::before { font-weight: 700; opacity: 0.7; }
.tag-fit { background: var(--accent-wash); color: var(--accent-strong); }
.tag-fit::before { content: "+"; }
.tag-caution { background: var(--warn-bg); color: var(--warn-text); }
.tag-caution::before { content: "≠"; }

/* --- разбивка процента: главный аргумент против «чёрного ящика» --- */
.match-breakdown {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--gridline);
}
.match-part {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 5px 8px;
}
.match-part-label { font-size: 11px; letter-spacing: 0.03em; color: var(--muted); }
.match-part-value {
  font-size: 12px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.match-part-track {
  grid-column: 1 / -1;
  height: 3px;
  border-radius: 999px;
  background: var(--gridline);
  overflow: hidden;
}
.match-part-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.35;
}
.profession-card.is-top .match-part-fill { opacity: 1; }
.profession-card.is-top .match-part-value { color: var(--text-primary); }

/* --- вопрос --- */
.question-card { padding: 30px 26px; }

/* ---------- узкие экраны ---------- */
@media (max-width: 560px) {
  /* биполярная шкала: полюса остаются слева и справа, трек уходит под них
     во всю ширину — так связь «левее/правее = ближе к этому полюсу» не теряется */
  .axis-scale {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "pole-left pole-right"
      "track     track";
    gap: 8px 12px;
  }
  .axis-pole { font-size: 12px; }
  .axis-pole-left { grid-area: pole-left; }
  .axis-pole-right { grid-area: pole-right; text-align: right; }
  .axis-track { grid-area: track; height: 8px; margin-top: 2px; }
  .axis-marker { width: 15px; height: 15px; margin-left: -7.5px; }

  .holland-hero { padding: 26px 20px 0; }
  .holland-code { font-size: 34px; letter-spacing: 3px; }
  .digest { grid-auto-flow: row; margin: 20px -20px 0; }
  .digest-item {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 10px;
    align-items: baseline;
    padding: 11px 20px;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .digest-item:first-child { border-top: none; padding-left: 20px; }
  .digest-item:last-child { padding-right: 20px; }
  .digest-label { margin-bottom: 0; }

  .result-lead-title { font-size: 23px; }
  .interlude-summary { font-size: 17px; }
  .interlude-card { padding: 22px 18px 24px; }
  .question-card { padding: 22px 18px; }
  .progress-steps { gap: 7px; }

  /* длинные названия («Исследовательский», «Конвенциональный», подписи ценностей)
     не влезали в колонку 104px и наезжали на полосу — метка уходит над полосой,
     ровно как полюса в шкалах стиля выше */
  .bar-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label value"
      "track track";
    align-items: baseline;
    gap: 6px 10px;
    padding: 9px 0;
  }
  .bar-label { grid-area: label; }
  .bar-value { grid-area: value; }
  .bar-track { grid-area: track; height: 10px; }

  .profession-card { padding-left: 38px; }
  .profession-card.is-top { padding: 18px 16px 20px; }
  .profession-card.is-top .profession-name { font-size: 19px; }
  /* «82% совпадение» с white-space: nowrap не помещался рядом с названием
     и вылезал за карточку (на 320px — за экран, страницу можно было скроллить вбок).
     Разрешаем переносить бейдж на свою строку. */
  .profession-head { flex-wrap: wrap; }
  .match-breakdown { gap: 10px; }
}

/* ---------- совсем узкие экраны (320–400) ---------- */
@media (max-width: 400px) {
  /* «Компас» и подпись не умещались в строку: подпись липла к названию
     и переносилась на две строки внахлёст — уводим её под логотип */
  .header-sub { flex: 1 0 100%; }

  /* иконка и «скоро» — в строку, текст — во всю ширину:
     иначе описание сжималось в колонку шириной в одно слово */
  .sub-card { flex-wrap: wrap; }
  .sub-text { flex: 1 0 100%; order: 2; }
  .sub-badge { margin-left: auto; }
}

/* ---- фильтр «руками / головой», доход, печать ---- */
.pref-block { margin-top: 18px; }
.pref-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pref-chip {
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--accent);
  background: transparent; color: var(--accent); font: inherit; cursor: pointer;
}
.pref-chip.is-active { background: var(--accent); color: #fff; }
.pref-hint { font-size: 13px; opacity: .65; margin-top: 6px; }
.holland-nick { font-size: 20px; font-weight: 600; margin: 4px 0 2px; }
.profession-income, .profession-path { margin-top: 8px; font-size: 14px; line-height: 1.5; }
.income-disclaimer { font-size: 13px; opacity: .65; margin: 12px 4px 0; }
.restart-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

@media print {
  .restart-row, .sub-card, .app-footer, .table-toggle { display: none !important; }
  body, .app-shell { background: #fff !important; color: #000 !important; }
  .card, .profession-card { break-inside: avoid; box-shadow: none !important; border: 1px solid #ccc !important; }
}
