@charset "utf-8";
/* ==========================================================================
   Кузница душ — тест «Суперсила»
   Вёрстка и компоненты — по референсу, палитра — бренда «Кузница душ».
   Тёмная тема по умолчанию, светлая включается автоматически.
   ========================================================================== */

/* ---------- Шрифты (локальные, без внешних запросов) ---------- */
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/unbounded-var-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/unbounded-var-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: "Onest";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/onest-var-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/onest-var-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 {
  --bg: #12100e;
  --surface: #1a1714;
  --surface-2: #221d18;
  --ink: #f2ece2;
  --muted: #a2968a;
  --line: #322b24;
  --accent: #e9a93a;
  --accent-ink: #14100c;
  --accent-soft: #382c14;

  --g-skan: #7fa6c9;
  --g-kontr: #c8873c;
  --g-spas: #93a86b;
  --g-beg: #a08cc0;

  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-lg: 18px;
  color-scheme: dark;
}

:root[data-accent="amber"] {
  --accent: #c8873c;
  --accent-soft: #3a2c1c;
}

/* ---------- Светлая тема ---------- */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f0e9;
    --surface: #fbf8f3;
    --surface-2: #efe9df;
    --ink: #1c1917;
    --muted: #6e655b;
    --line: #ded6c9;
    --accent: #a2661f;
    --accent-ink: #ffffff;
    --accent-soft: #eddfc9;

    --g-skan: #42688b;
    --g-kontr: #a2661f;
    --g-spas: #5c7340;
    --g-beg: #6d5a8b;
    color-scheme: light;
  }
}

/* ---------- База ---------- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding-block: 28px 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.brand {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  text-wrap: balance;
  margin: 0;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(32px, 8.5vw, 46px); }
h2 { font-size: 22px; }
h3 { font-size: 16px; font-weight: 500; }

p { margin: 0; }
a { color: var(--accent); }

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }

.lead { font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.note { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ---------- Кнопки и ссылки ---------- */
.btn {
  appearance: none;
  border: 0;
  border-radius: var(--radius);
  font: 600 17px/1 var(--body);
  padding: 18px 22px;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-ink);
  width: 100%;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: filter 0.15s, opacity 0.15s;
}
.btn:hover { filter: brightness(1.07); }
.btn[disabled], .btn.is-disabled { opacity: 0.45; pointer-events: none; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.link {
  background: none;
  border: 0;
  color: var(--muted);
  font: 500 14px var(--body);
  cursor: pointer;
  padding: 6px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link:hover { color: var(--ink); }

.btn:focus-visible, .opt:focus-visible, .link:focus-visible,
input:focus-visible, label.radio:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Шапка ---------- */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 24px;
}
.home {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
}
.home:hover { color: var(--ink); }
.topbar .wordmark {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- Вопрос ---------- */
.qhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.count {
  font-family: var(--display);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.bar { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; }
.bar > i {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.25s;
}

.qtext {
  font-family: var(--display);
  font-size: clamp(24px, 6.5vw, 30px);
  font-weight: 500;
  line-height: 1.22;
  text-wrap: balance;
  min-height: 3.6em;
  display: flex;
  align-items: flex-end;
}
.qsub {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: -8px;
}

/* ---------- Карточки способностей ---------- */
.opts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 8px;
}
.opt {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 13px 15px;
  font: 500 15.5px/1.3 var(--body);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  transition: border-color 0.15s, background 0.15s, opacity 0.15s;
}
.opt:hover { border-color: var(--accent); }
.opt.sel {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.opt .tick {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 12px;
  color: transparent;
}
.opt.sel .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.opt.taken { opacity: 0.38; pointer-events: none; }
.opt.taken .tick::before { content: "✓"; color: var(--muted); }

/* ---------- Экран контактов ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; color: var(--muted); }

input[type="tel"], input[type="text"] {
  width: 100%;
  font: 500 17px var(--body);
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
input::placeholder { color: var(--muted); opacity: 0.75; }

.radios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
label.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 13px 15px;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
label.radio:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
label.radio input {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  margin: 0;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
label.radio input:checked { border-color: var(--accent); background: var(--accent); }
label.radio input:checked::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-ink);
}

/* ---------- Карточки и блоки результата ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.result-head { display: flex; flex-direction: column; gap: 14px; }
.result-type {
  font-family: var(--display);
  font-size: clamp(23px, 6.6vw, 36px);
  overflow-wrap: break-word;
  font-weight: 700;
  line-height: 1.12;
  text-wrap: balance;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted);
}

.zones { display: flex; flex-direction: column; gap: 14px; }
.zone .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  font-size: 15px;
}
.zone .row span { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; }
.zone .track {
  height: 8px;
  background: var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 6px;
}
.zone .track i { display: block; height: 100%; border-radius: 8px; width: 0; transition: width 0.3s; }

.picks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.picks li {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}
.picks li b { font-weight: 600; }
.picks li em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.cost {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.cost .eyebrow { color: var(--bg); opacity: 0.7; }
.cost h3 { font-size: 20px; color: var(--bg); }
.cost p { color: var(--bg); opacity: 0.9; }

/* ---------- Статья описания ---------- */
.article { display: flex; flex-direction: column; gap: 14px; }
.article h3 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
  color: var(--accent);
  margin-top: 10px;
  line-height: 1.3;
}
.article h3:first-child { margin-top: 0; }
.article p { font-size: 16px; line-height: 1.62; }
.article strong { font-weight: 600; }
.article ul, .article ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.article li { line-height: 1.55; }
.article blockquote {
  margin: 0;
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  color: var(--muted);
}
.article hr { border: 0; border-top: 1px solid var(--line); width: 100%; }

/* ---------- Прочее ---------- */
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

.error {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Дополнения ---------- */
.label-like { font-size: 14px; font-weight: 500; color: var(--muted); }

/* ловушка для ботов — не видна людям */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Скрытое должно быть скрыто, даже если у элемента есть display из классов */
[hidden] { display: none !important; }

/* Кнопка «Далее» всегда под рукой: 22 карточки — длинный список */
.actions {
  position: sticky;
  bottom: 0;
  padding-block: 14px 16px;
  background: var(--bg);
  box-shadow: 0 -14px 20px -14px rgba(0, 0, 0, 0.85);
  z-index: 5;
}

/* ==========================================================================
   Формы на странице результата (и аккордеон описания)
   ========================================================================== */

.form { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label, .label-like { font-size: 14px; font-weight: 500; color: var(--muted); }
.field .hint { font-size: 12px; color: var(--muted); }

input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%;
  font: 500 16px/1.4 var(--body);
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 15px 16px;
  transition: border-color 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.75; }
input:hover, textarea:hover { border-color: var(--muted); }
textarea { resize: vertical; min-height: 110px; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .row-2 { grid-template-columns: 1fr; } }

.radios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 420px) { .radios { grid-template-columns: 1fr; } }

label.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
label.radio:hover { border-color: var(--muted); }
label.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
label.radio input {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  margin: 0;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: var(--surface);
}
label.radio input:checked { border-color: var(--accent); background: var(--accent); }
label.radio input:checked::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-ink);
}

label.checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
  cursor: pointer;
}
label.checkbox input {
  appearance: none;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 0;
  border: 1.5px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  display: grid;
  place-items: center;
  cursor: pointer;
}
label.checkbox input:checked { background: var(--accent); border-color: var(--accent); }
label.checkbox input:checked::after {
  content: "✓";
  color: var(--accent-ink);
  font-size: 13px;
  line-height: 1;
}

/* ловушка для ботов */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form .btn { margin-top: 4px; }

.error-box {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
}

.form-ok {
  border: 1px solid var(--accent);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.form-ok h3 { font-size: 20px; font-weight: 500; }
.form-ok p { color: var(--muted); font-size: 14px; }

/* ---------- Аккордеон описания ---------- */
.acc-list { display: flex; flex-direction: column; }

.acc { border-top: 1px solid var(--line); }
.acc:last-child { border-bottom: 1px solid var(--line); }

.acc summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--accent);
  transition: color 0.15s;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { color: var(--ink); }

.acc-ico {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.acc-ico::before { content: "+"; font-size: 18px; line-height: 1; }
.acc summary:hover .acc-ico { border-color: var(--accent); color: var(--accent); }
.acc[open] .acc-ico { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.acc[open] .acc-ico::before { content: "−"; }

.acc-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 0 20px;
}
.acc-body p, .acc-body li { font-size: 16px; line-height: 1.62; }
.acc-body ul, .acc-body ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.acc-body strong { font-weight: 600; }
