:root {
  color-scheme: dark;
  --bg: #07080d;
  --panel: rgba(18, 20, 31, 0.88);
  --panel-strong: #121521;
  --panel-soft: #181b29;
  --text: #f6f7fb;
  --muted: #a4a9bb;
  --line: rgba(255, 255, 255, 0.11);
  --cyan: #39e7d5;
  --cyan-soft: rgba(57, 231, 213, 0.14);
  --violet: #9b7cff;
  --violet-soft: rgba(155, 124, 255, 0.15);
  --warning: #f7c76b;
  --radius: 22px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
  min-height: 100vh;
  overflow-x: hidden;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.ambient {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  z-index: -1;
  opacity: .13;
}
.ambient-one { top: -220px; right: -120px; background: var(--violet); }
.ambient-two { bottom: -260px; left: -180px; background: var(--cyan); }

.site-header {
  width: min(1180px, calc(100% - 40px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 760;
  letter-spacing: .01em;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(57, 231, 213, .5);
  border-radius: 10px;
  background: var(--cyan-soft);
}
.brand-mark span { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }
.brand-mark span:nth-child(1) { transform: translate(-7px, 5px); }
.brand-mark span:nth-child(2) { transform: translate(0, -6px); }
.brand-mark span:nth-child(3) { transform: translate(7px, 5px); }

.privacy-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c9cdda;
  font-size: .8rem;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
}
.privacy-chip span { color: var(--cyan); font-size: .66rem; }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.hero {
  min-height: calc(100vh - 145px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(400px, .95fr);
  align-items: center;
  gap: 64px;
  padding: 70px 0 80px;
}

.eyebrow {
  margin: 0 0 17px;
  color: var(--cyan);
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .18em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 6.6vw, 6.2rem);
  line-height: .94;
  letter-spacing: -.065em;
  max-width: 760px;
}
.hero h1 span {
  color: transparent;
  background: linear-gradient(110deg, var(--cyan), #72bfff 55%, var(--violet));
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-lead {
  max-width: 670px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.7;
}

.desktop-note {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 20px 0 0;
  padding: 9px 12px;
  border: 1px solid rgba(155, 124, 255, .28);
  border-radius: 10px;
  color: #c8c2dc;
  background: var(--violet-soft);
  font-size: .82rem;
}
.desktop-note span { color: var(--violet); }

.hero-actions { display: flex; align-items: center; gap: 20px; margin-top: 38px; }
.time-note { color: var(--muted); font-size: .86rem; }

.button {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 20px;
  color: var(--text);
  font-weight: 760;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button:focus-visible, a:focus-visible, input:focus-visible + .option-control {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.button-primary {
  color: #03110f;
  background: linear-gradient(120deg, var(--cyan), #61dbe9);
  box-shadow: 0 12px 35px rgba(57, 231, 213, .18);
}
.button-secondary { color: var(--text); border-color: var(--line); background: rgba(255,255,255,.045); }
.button-large { min-height: 58px; padding-inline: 27px; }

.tree-visual {
  position: relative;
  width: 480px;
  height: 470px;
  justify-self: end;
}
.tree-visual::before {
  content: "";
  position: absolute;
  inset: 40px;
  border: 1px solid rgba(57, 231, 213, .11);
  border-radius: 50%;
  box-shadow: inset 0 0 80px rgba(57, 231, 213, .04), 0 0 0 45px rgba(155,124,255,.025);
}
.tree-core {
  position: absolute;
  left: 188px;
  top: 185px;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  background: radial-gradient(circle, rgba(57,231,213,.21), rgba(57,231,213,.04) 65%);
  box-shadow: 0 0 60px rgba(57,231,213,.15);
  z-index: 2;
}
.tree-core span { font-size: .8rem; font-weight: 900; letter-spacing: .2em; color: var(--cyan); }
.tree-line { position: absolute; height: 1px; background: linear-gradient(90deg, var(--cyan), rgba(155,124,255,.4)); transform-origin: left; z-index: 1; }
.line-a { left: 235px; top: 234px; width: 195px; transform: rotate(-37deg); }
.line-b { left: 235px; top: 234px; width: 197px; transform: rotate(39deg); }
.line-c { left: 205px; top: 238px; width: 190px; transform: rotate(155deg); }
.tree-node {
  position: absolute;
  min-width: 142px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(16,18,28,.9);
  color: #dfe2ec;
  font-size: .8rem;
  box-shadow: var(--shadow);
}
.tree-node span { color: var(--violet); font-size: .66rem; margin-right: 9px; font-weight: 800; }
.node-a { top: 74px; right: 0; }
.node-b { bottom: 62px; right: 3px; }
.node-c { top: 167px; left: 0; }
.node-d { bottom: 3px; left: 98px; border-color: rgba(57,231,213,.35); }

.app-shell { display: none; max-width: 900px; margin: 0 auto; padding: 48px 0 90px; }
.journey-started .hero { display: none; }
.journey-started .app-shell { display: block; }

.wizard-panel, .result-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(22,25,38,.96), rgba(12,14,22,.96));
  box-shadow: var(--shadow);
}
.wizard-panel::before, .result-panel::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -120px;
  top: -150px;
  border-radius: 50%;
  background: var(--violet);
  filter: blur(100px);
  opacity: .12;
}

.progress-row { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-bottom: 50px; color: var(--muted); font-size: .78rem; }
progress { width: 170px; height: 5px; border: 0; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.08); }
progress::-webkit-progress-bar { background: rgba(255,255,255,.08); }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--cyan), var(--violet)); }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--cyan), var(--violet)); }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend, .result-panel h1 {
  max-width: 720px;
  padding: 0;
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.035em;
}
.question-hint, .result-intro { max-width: 700px; margin: 17px 0 30px; color: var(--muted); line-height: 1.6; }

.options-grid { display: grid; gap: 11px; }
.option-card {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.option-card:hover { transform: translateX(3px); border-color: rgba(57,231,213,.38); background: rgba(57,231,213,.045); }
.option-card:has(input:checked) { border-color: var(--cyan); background: var(--cyan-soft); }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-control { width: 21px; height: 21px; border: 1px solid #687083; border-radius: 50%; display: grid; place-items: center; }
input[type="checkbox"] + .option-control { border-radius: 6px; }
.option-control::after { content: ""; width: 9px; height: 9px; border-radius: inherit; background: var(--cyan); transform: scale(0); transition: transform .14s ease; }
.option-card input:checked + .option-control { border-color: var(--cyan); }
.option-card input:checked + .option-control::after { transform: scale(1); }
.option-copy { display: flex; flex-direction: column; gap: 4px; }
.option-copy strong { font-size: .97rem; }
.option-copy small { color: var(--muted); line-height: 1.4; }
.wizard-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; }
.form-error { color: #ff9aa9; margin: 16px 0 0; }

.result-intro { font-size: 1.02rem; }
.result-groups { display: grid; gap: 32px; margin-top: 40px; counter-reset: lesson; }
.result-group h2 { margin: 0 0 13px; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; }
.module-link { text-decoration-color: var(--cyan); text-underline-offset: 4px; }
.lesson-list { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.lesson-card {
  position: relative;
  padding: 22px 23px 21px 66px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.028);
  counter-increment: lesson;
}
.lesson-card::before {
  content: counter(lesson, decimal-leading-zero);
  position: absolute;
  left: 20px;
  top: 24px;
  color: var(--cyan);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .07em;
}
.lesson-card h3 { margin: 7px 0 8px; font-size: 1.04rem; line-height: 1.4; }
.lesson-card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.lesson-optional { border-style: dashed; }
.stage-tag { color: var(--violet); font-size: .64rem; font-weight: 850; text-transform: uppercase; letter-spacing: .13em; }
.lesson-link { text-decoration-color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.lesson-link:hover { color: var(--cyan); }

.privacy-note { display: grid; grid-template-columns: 36px 1fr; gap: 15px; margin-top: 36px; padding: 19px; border: 1px solid rgba(247,199,107,.23); border-radius: 15px; background: rgba(247,199,107,.06); }
.note-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--warning); border-radius: 50%; color: var(--warning); font-weight: 900; }
.privacy-note strong { color: var(--warning); }
.privacy-note p { margin: 5px 0 0; color: #c1b9aa; font-size: .9rem; line-height: 1.55; }
.result-actions { justify-content: flex-end; }

footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 0 0 28px; text-align: center; color: #777d8d; font-size: .75rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 72px; }
  .tree-visual { justify-self: center; transform: scale(.9); margin-top: -20px; }
}

@media (max-width: 600px) {
  .site-header, main, footer { width: min(100% - 28px, 1180px); }
  .site-header { min-height: 68px; }
  .privacy-chip { font-size: 0; padding: 9px; }
  .privacy-chip span { font-size: .75rem; }
  .hero { padding: 52px 0 60px; gap: 35px; }
  .hero h1 { font-size: clamp(2.65rem, 13vw, 4.2rem); }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .time-note { text-align: center; }
  .tree-visual { width: 340px; height: 350px; transform: none; }
  .tree-core { left: 128px; top: 125px; width: 84px; height: 84px; }
  .tree-visual::before { inset: 28px; }
  .line-a { left: 168px; top: 166px; width: 128px; }
  .line-b { left: 168px; top: 166px; width: 133px; }
  .line-c { left: 146px; top: 169px; width: 125px; }
  .tree-node { min-width: 118px; padding: 11px; font-size: .7rem; }
  .node-a { top: 42px; }
  .node-b { bottom: 42px; }
  .node-c { top: 117px; }
  .node-d { left: 63px; }
  .app-shell { padding-top: 24px; }
  .progress-row { margin-bottom: 35px; }
  progress { width: 110px; }
  .wizard-actions, .result-actions { flex-direction: column-reverse; }
  .wizard-actions .button { width: 100%; }
  .lesson-card { padding-left: 54px; }
  .lesson-card::before { left: 15px; }
}

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