:root {
  --cream: #f7f0e4;
  --paper: #fffdf7;
  --ink: #1c1a18;
  --muted: #675e57;
  --red: #a02b22;
  --red-dark: #76120f;
  --line: rgba(28, 26, 24, 0.13);
  --air: #1f3a5f;
  --fire: #a02b22;
  --water: #1f6f5c;
  --earth: #a87422;
  --shadow: 0 24px 70px rgba(46, 29, 17, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 4%, rgba(160, 43, 34, 0.07), transparent 24rem),
    var(--cream);
  font-family: "Manrope", sans-serif;
}

button, a { font: inherit; }
button { color: inherit; }

.site-header {
  height: 84px;
  padding: 0 clamp(20px, 4vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(247, 240, 228, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  text-decoration: none;
  font-family: "Bodoni Moda", serif;
  letter-spacing: 0.16em;
  font-size: clamp(12px, 1.3vw, 16px);
}

.brand-mark {
  width: 42px;
  height: 50px;
  background: url("img/logo-kl.png") no-repeat -40px -5px / auto 78px;
}

.header-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-link:hover { color: var(--red); }

.app-shell {
  min-height: calc(100vh - 84px);
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.close-test {
  position: fixed;
  top: 98px;
  right: clamp(16px, 3vw, 42px);
  z-index: 18;
  min-height: 40px;
  padding: 8px 13px 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(28, 26, 24, 0.16);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.92);
  color: var(--muted);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(46, 29, 17, 0.08);
  backdrop-filter: blur(12px);
}

.close-test span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 19px;
  line-height: 1;
}

.close-test b {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.close-test:hover { border-color: var(--red); color: var(--red); }

.screen { min-height: calc(100vh - 84px); }
.screen[hidden] { display: none !important; }

.start-screen {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(44px, 6vw, 76px) 0 90px;
}

.start-copy { display: contents; }

.eyebrow, .question-theme {
  margin: 0 0 18px;
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow.dark { color: var(--red); }
.eyebrow.light { color: rgba(255, 253, 247, 0.72); }

.start-copy h1, .result-hero h1 {
  margin: 0;
  font-family: "Bodoni Moda", serif;
  font-weight: 500;
  font-size: clamp(48px, 6.7vw, 94px);
  line-height: 0.97;
  letter-spacing: -0.035em;
}

.start-copy h1 { order: 1; text-align: center; }

.start-copy h1 em {
  color: var(--red);
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: 1.13em;
  letter-spacing: 0;
}

.lead {
  order: 3;
  margin: 0;
  max-width: 740px;
  color: #4f4842;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.75;
  text-align: center;
}

.lead-secondary {
  order: 5;
  max-width: 740px;
  margin: 28px 0 0;
  padding: 30px clamp(24px, 5vw, 42px);
  border: 1px solid rgba(160, 43, 34, 0.12);
  border-radius: 20px;
  background: rgba(255, 253, 247, 0.82);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  box-shadow: 0 18px 48px rgba(46, 29, 17, 0.07);
}

.lead-secondary::before {
  content: "Что вы получите";
  display: block;
  margin-bottom: 11px;
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.life-sphere-tags {
  order: 4;
  max-width: 650px;
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.life-sphere-tags span {
  min-height: 48px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(160, 43, 34, 0.18);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.72);
  color: #574c45;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 6px 18px rgba(46, 29, 17, 0.045);
}

.life-sphere-tags span::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--red);
}

.start-facts {
  order: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 30px 0 34px;
  color: var(--muted);
  font-size: 13px;
}

.start-copy > .primary-button { order: 7; }
.start-copy > .text-button { order: 8; }

.start-facts span { display: flex; align-items: baseline; gap: 7px; }
.start-facts b { color: var(--ink); font-family: "Bodoni Moda", serif; font-size: 24px; }

.primary-button, .secondary-button, .light-button, .text-button {
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease, border-color 160ms ease;
}

.primary-button {
  min-height: 58px;
  padding: 17px 28px;
  border-radius: 8px;
  background: var(--red);
  color: #fffdf7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 14px 34px rgba(160, 43, 34, 0.2);
}

.primary-button:hover:not(:disabled) { background: var(--ink); transform: translateY(-1px); }
.primary-button:disabled { opacity: 0.38; cursor: not-allowed; box-shadow: none; }
.primary-button.compact { min-height: 50px; padding: 14px 24px; }

.secondary-button {
  min-height: 50px;
  padding: 13px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.secondary-button:hover { border-color: var(--ink); color: var(--ink); }

.text-button {
  display: block;
  margin: 14px 0 0;
  padding: 8px 0;
  background: none;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.disclaimer {
  order: 9;
  margin: 22px 0 0;
  max-width: 680px;
  color: #81766e;
  font-size: 12px;
  line-height: 1.65;
  text-align: center;
}

.start-visual {
  order: 2;
  aspect-ratio: 1;
  position: relative;
  width: min(100%, 500px);
  margin: 24px 0 34px;
  isolation: isolate;
}

.compass-lines { position: absolute; inset: 0; transition: transform 1.15s cubic-bezier(.2,.75,.2,1); }
.start-visual:hover .compass-lines { transform: rotate(18deg); }

.orbit {
  position: absolute;
  border: 1px solid rgba(28, 26, 24, 0.15);
  border-radius: 50%;
  inset: 13%;
}

.orbit-two { inset: 27%; border-color: rgba(160, 43, 34, 0.2); }

.orbit::before, .orbit::after {
  content: "";
  position: absolute;
  background: rgba(28, 26, 24, 0.12);
}

.orbit::before { left: 50%; top: -13%; width: 1px; height: 126%; }
.orbit::after { top: 50%; left: -13%; height: 1px; width: 126%; }

.compass-point {
  position: absolute;
  color: rgba(28, 26, 24, 0.3);
  font-family: "Manrope", sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.point-n { top: 8%; left: 50%; transform: translateX(-50%); }
.point-e { top: 50%; right: 8%; transform: translateY(-50%); }
.point-s { bottom: 8%; left: 50%; transform: translateX(-50%); }
.point-w { top: 50%; left: 8%; transform: translateY(-50%); }

.element {
  position: absolute;
  z-index: 2;
  width: 27%;
  aspect-ratio: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--element-color) 28%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--element-color) 9%, var(--paper));
  color: var(--element-color);
  box-shadow: 0 18px 45px rgba(46, 29, 17, 0.1);
  transition: transform 420ms ease, box-shadow 420ms ease, background 420ms ease, color 420ms ease;
}

.element:hover {
  z-index: 4;
  transform: scale(1.08);
  background: var(--element-color);
  color: white;
  box-shadow: 0 22px 54px color-mix(in srgb, var(--element-color) 25%, transparent);
}
.element-symbol { width: 42%; aspect-ratio: 1; display: grid; place-items: center; }
.element-symbol svg { width: 100%; height: 100%; overflow: visible; }
.element-symbol path { fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.element-name { margin-top: 7px; font-size: 8px; font-weight: 800; letter-spacing: 0.2em; opacity: 0.7; }
.element b { margin-top: 3px; font-family: "Bodoni Moda", serif; font-size: clamp(15px, 1.6vw, 22px); font-weight: 500; }
.element-air { --element-color: var(--air); top: 0; left: 36.5%; }
.element-fire { --element-color: var(--fire); right: 0; top: 36.5%; }
.element-water { --element-color: var(--water); bottom: 0; left: 36.5%; }
.element-water { background: color-mix(in srgb, var(--water) 15%, var(--paper)); }
.element-earth { --element-color: var(--earth); left: 0; top: 36.5%; }

.visual-center {
  position: absolute;
  z-index: 3;
  inset: 35.5%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  place-items: center;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(145deg, #fffdf7, #f2e6d8);
  border: 7px solid var(--cream);
  font-family: "Bodoni Moda", serif;
  color: var(--red);
  box-shadow: 0 14px 38px rgba(53, 34, 22, 0.13);
}
.visual-center span { font-family: "Manrope", sans-serif; font-size: clamp(7px, .75vw, 9px); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; opacity: .62; }
.visual-center strong { margin-top: 4px; font-size: clamp(15px, 1.7vw, 23px); font-weight: 500; line-height: 1; }

.question-screen, .request-screen, .wave-screen {
  padding: clamp(38px, 6vw, 80px) 0 90px;
}

.progress-wrap, .question-card {
  width: min(850px, 100%);
  margin: 0 auto;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.progress-track {
  height: 4px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(28, 26, 24, 0.09);
}

.progress-track span {
  height: 100%;
  width: 0;
  display: block;
  background: var(--red);
  transition: width 260ms ease;
}

.question-card {
  margin-top: clamp(30px, 5vw, 58px);
  padding: clamp(28px, 5vw, 62px);
  border: 1px solid rgba(28, 26, 24, 0.09);
  border-radius: 22px;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: var(--shadow);
}

.question-card h2 {
  margin: 0;
  font-family: "Bodoni Moda", serif;
  font-size: clamp(27px, 3.4vw, 44px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.question-help {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.options { display: grid; gap: 12px; margin-top: 30px; }

.option-button {
  width: 100%;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 15px;
  align-items: start;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.62;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.option-button:hover { border-color: rgba(160, 43, 34, 0.45); transform: translateY(-1px); }
.option-button.selected { border-color: var(--red); background: rgba(160, 43, 34, 0.055); }

.option-dot {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(28, 26, 24, 0.28);
  border-radius: 50%;
  margin-top: 1px;
}

.selected .option-dot { border-color: var(--red); }
.selected .option-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }

.question-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
}

.request-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.request-option {
  min-height: 145px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.request-option:hover { border-color: rgba(160, 43, 34, 0.45); }
.request-option.selected { border-color: var(--red); background: rgba(160, 43, 34, 0.055); }
.request-option strong { display: block; margin-top: 24px; font-family: "Bodoni Moda", serif; font-size: 23px; font-weight: 500; }
.request-option span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.request-option::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(28, 26, 24, 0.25);
  border-radius: 50%;
}
.request-option.selected::before { border: 5px solid var(--red); }

.inline-error { margin: 14px 0 0; color: var(--red); font-size: 13px; font-weight: 700; }

.result-screen { padding: clamp(56px, 7vw, 100px) 0 90px; }

.result-hero { max-width: 960px; margin: 0 auto 48px; text-align: center; }
.result-hero h1 { color: var(--red); font-size: clamp(44px, 7vw, 88px); }
.result-tagline { margin: 18px auto 0; max-width: 700px; color: var(--ink); font-family: "Bodoni Moda", serif; font-size: clamp(20px, 2.3vw, 30px); line-height: 1.4; }
.result-note { margin: 18px auto 0; max-width: 670px; color: var(--muted); font-size: 13px; line-height: 1.7; }

.result-grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 20px; }
.panel { border: 1px solid rgba(28, 26, 24, 0.09); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.profile-panel, .type-panel { padding: clamp(26px, 4vw, 46px); }
.panel-heading h2 { margin: 0; font-family: "Bodoni Moda", serif; font-size: clamp(28px, 3vw, 40px); font-weight: 500; }

.function-results { display: grid; gap: 24px; margin-top: 34px; }
.function-row { --color: var(--air); }
.function-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.function-name strong { display: block; font-size: 14px; }
.function-name span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.function-pct { color: var(--color); font-family: "Bodoni Moda", serif; font-size: 28px; }
.function-track { height: 9px; margin-top: 10px; overflow: hidden; border-radius: 10px; background: rgba(28, 26, 24, 0.07); }
.function-track span { height: 100%; display: block; border-radius: inherit; background: var(--color); }

.zone-descriptions { display: grid; gap: 0; margin-top: 28px; }
.zone-item { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 19px 0; border-top: 1px solid var(--line); }
.zone-number { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--zone-color); color: white; font-family: "Bodoni Moda", serif; font-size: 18px; }
.zone-item h3 { margin: 0; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.zone-item p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

.spheres-panel { margin-top: 20px; padding: clamp(26px, 4vw, 46px); }
.spheres-heading { display: flex; justify-content: space-between; gap: 30px; align-items: end; }
.spheres-heading > p { max-width: 430px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.sphere-results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.sphere-card { min-height: 218px; padding: 22px; border-radius: 16px; background: var(--sphere-bg); border: 1px solid color-mix(in srgb, var(--sphere-color) 28%, transparent); position: relative; }
.sphere-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; border-radius: 16px 0 0 16px; background: var(--sphere-color); }
.sphere-icon { font-size: 23px; }
.sphere-card h3 { margin: 22px 0 0; font-family: "Bodoni Moda", serif; font-size: 23px; font-weight: 500; }
.sphere-level { margin: 8px 0 0; color: var(--sphere-color); font-size: 11px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.sphere-card p { margin: 14px 0 0; color: #554e49; font-size: 12px; line-height: 1.55; }
.wave-badge { display: inline-flex; margin-top: 13px; padding: 6px 9px; border-radius: 20px; color: #2f537f; background: #e7eff9; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.sphere-guidance { margin-top: 22px; padding: 22px 24px; border-radius: 14px; background: #f2eadf; border-left: 4px solid var(--red); }
.sphere-guidance strong { display: block; font-family: "Bodoni Moda", serif; font-size: 21px; font-weight: 500; }
.sphere-guidance p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

.workbook-card {
  margin-top: 20px;
  padding: clamp(28px, 5vw, 58px);
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, #7e1713, #a02b22);
  color: #fffdf7;
}
.workbook-card h2 { margin: 0; font-family: "Bodoni Moda", serif; font-size: clamp(28px, 3.8vw, 48px); font-weight: 500; }
.workbook-card p:not(.eyebrow) { margin: 16px 0 0; max-width: 690px; color: rgba(255, 253, 247, 0.76); font-size: 14px; line-height: 1.7; }
.light-button { flex: 0 0 auto; padding: 18px 24px; border-radius: 8px; background: var(--paper); color: var(--red); text-decoration: none; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.light-button:hover { background: var(--ink); color: white; transform: translateY(-1px); }
.result-actions { display: flex; justify-content: center; gap: 14px; margin-top: 28px; }

.site-footer {
  min-height: 92px;
  padding: 26px clamp(20px, 4vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #161311;
  color: rgba(255, 253, 247, 0.58);
  font-size: 12px;
}
.site-footer a { color: rgba(255, 253, 247, 0.78); text-decoration: none; }

@media (max-width: 900px) {
  .result-grid { grid-template-columns: 1fr; }
  .sphere-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workbook-card { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
  .site-header { height: 70px; }
  .brand-mark { width: 34px; height: 42px; background-size: auto 66px; background-position: -34px -4px; }
  .header-link { font-size: 9px; }
  .app-shell { width: min(100% - 24px, 1240px); }
  .close-test { top: 81px; right: 12px; padding: 7px; }
  .close-test b { display: none; }
  .screen { min-height: calc(100vh - 70px); }
  .start-screen { padding: 34px 0 64px; }
  .start-visual { width: min(100%, 350px); margin: 22px 0 30px; }
  .life-sphere-tags { grid-template-columns: 1fr; }
  .life-sphere-tags span { min-height: 44px; border-radius: 14px; }
  .lead { text-align: left; }
  .lead-secondary { padding: 24px 20px; border-radius: 16px; }
  .element { padding: 8px 5px; }
  .element b { font-size: 13px; }
  .element-name { margin-top: 4px; font-size: 6px; }
  .element-symbol { width: 38%; }
  .question-card { padding: 26px 18px; border-radius: 16px; }
  .option-button { padding: 15px 14px; font-size: 13px; }
  .question-actions { align-items: stretch; flex-direction: column-reverse; }
  .question-actions button { width: 100%; }
  .request-grid, .sphere-results { grid-template-columns: 1fr; }
  .request-option { min-height: 116px; }
  .spheres-heading { align-items: flex-start; flex-direction: column; }
  .result-actions { flex-direction: column; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .compass-lines, .element { transition: none; }
  .start-visual:hover .compass-lines { transform: none; }
}

@media print {
  body { background: white; }
  .site-header, .site-footer, .result-actions, .workbook-card { display: none !important; }
  .app-shell { width: 100%; }
  .result-screen { padding: 20px; }
  .panel { box-shadow: none; break-inside: avoid; }
  .result-grid { grid-template-columns: 1fr 1fr; }
}
