:root {
  --bg-main: #1a1d24;
  --text-main: #ffffff;
  --stage-bg: #3b2f1f;
  --stage-text: #fabe27;
  --btn-bg: #f59e0a;
  --btn-text: #000000;
  --muted: rgba(255, 255, 255, 0.72);
  --border: rgba(255, 255, 255, 0.12);
  --danger: #f87171;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg-main);
  color: var(--text-main);
}

a { color: inherit; }

.wrap {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(26, 29, 36, 0.96);
  backdrop-filter: blur(8px);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.logo {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-phone {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.header-phone:hover { color: var(--text-main); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 8px;
  padding: 0.75rem 1.15rem;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  background: var(--btn-bg);
  color: var(--btn-text);
}

.btn:hover { filter: brightness(1.05); }

.btn-ghost {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-block { width: 100%; }

.page-hero {
  padding: 1.5rem 0 0.75rem;
}

.page-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.25;
  max-width: 52rem;
}

.hero-lead {
  margin: 0 0 0.65rem;
  color: var(--text-main);
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  font-weight: 600;
  line-height: 1.4;
  max-width: 46rem;
}

.hero-sub {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 42rem;
}

.section-quiz {
  padding-top: 0.75rem;
}

.messenger-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 0.9rem;
  display: grid;
  gap: 0.45rem;
}

.messenger-fieldset legend {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.utp-note {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.result-followup {
  white-space: pre-line;
  color: var(--muted);
}

.btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.section {
  padding: 1.5rem 0 2.25rem;
}

.section h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.utp {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  background: rgba(255, 255, 255, 0.03);
}

.utp p { margin: 0 0 0.85rem; }
.utp p:last-child { margin-bottom: 0; }

.utp a:not(.btn) {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.utp a:not(.btn):hover { color: var(--stage-text); }

.quiz-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.18);
}

.quiz-progress {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.85rem;
}

.quiz-step[hidden] { display: none !important; }

.quiz-step h3 {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.field label { font-weight: 600; }

.field input,
.field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #11141a;
  color: var(--text-main);
  padding: 0.75rem 0.85rem;
  font: inherit;
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--btn-bg);
  outline-offset: 1px;
}

.field-error {
  color: var(--danger);
  font-size: 0.9rem;
  min-height: 1.2em;
}

.choice-list {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.choice {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #12151c;
  color: var(--text-main);
  padding: 0.85rem 1rem;
  font: inherit;
  cursor: pointer;
}

.choice:hover { border-color: var(--stage-text); }

.choice.is-selected {
  border-color: var(--btn-bg);
  background: rgba(245, 158, 10, 0.12);
}

.quiz-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.consent-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0.75rem 0 1rem;
  color: var(--muted);
}

.consent-row input { margin-top: 0.25rem; }

.consent-row a {
  color: var(--stage-text);
  text-decoration: underline;
}

.result-articles {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.65rem;
}

.result-articles a {
  display: block;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: underline;
  text-underline-offset: 2px;
  background: #12151c;
}

.result-articles a:hover { border-color: var(--stage-text); }

.stage-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.stage-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 0;
  background: var(--stage-bg);
  color: var(--stage-text);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  padding: 0.9rem 1rem;
  cursor: pointer;
}

.stage-toggle span.chevron {
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}

.stage-block.is-open .stage-toggle span.chevron {
  transform: rotate(180deg);
}

.stage-body {
  display: none;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.15);
}

.stage-block.is-open .stage-body { display: block; }

.article-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.55rem;
}

@media (min-width: 1024px) {
  .article-list {
    grid-template-columns: 1fr 1fr;
  }
}

.article-list a {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--text-main);
}

.article-list a:hover { color: var(--stage-text); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
}

.footer-grid a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-grid a:hover { color: var(--text-main); }

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

@media (max-width: 767px) {
  .header-phone { display: none; }
  .page-hero { padding-top: 1.25rem; }
}
