:root {
  --bg: #f4f8fb;
  --bg-soft: #eef5fb;
  --surface: #ffffff;
  --surface-2: #f4f7fa;
  --text: #15191f;
  --muted: #6f7782;
  --line: #dce5ed;
  --blue: #0879ce;
  --blue-dark: #045a9d;
  --blue-soft: #e7f3fc;
  --navy: #061b2e;
  --yellow: #ffd300;
  --green: #20b875;
  --green-soft: #e9f8f1;
  --red: #ee4141;
  --red-soft: #fff0f0;
  --orange: #f0982d;
  --shadow: 0 18px 48px rgba(28, 68, 101, 0.11);
  --shadow-small: 0 8px 24px rgba(28, 68, 101, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

html[data-theme="dark"] {
  --bg: #061522;
  --bg-soft: #0a1d2c;
  --surface: #102535;
  --surface-2: #152c3d;
  --text: #f5f8fa;
  --muted: #aab8c4;
  --line: #294253;
  --blue-soft: #0e3553;
  --green-soft: #123a2c;
  --red-soft: #3a1e24;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --shadow-small: 0 8px 24px rgba(0, 0, 0, 0.2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  padding-top: 78px;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 8%, rgba(8, 121, 206, 0.10), transparent 32rem),
    radial-gradient(circle at 4% 42%, rgba(255, 211, 0, 0.10), transparent 24rem),
    var(--bg);
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  transition: background .25s ease, color .25s ease;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); }
.is-hidden { display: none !important; }

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 30;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: inline-flex; align-items: center; }
.brand img, footer img { width: 165px; height: auto; display: block; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-link { color: var(--text); font-weight: 750; text-decoration: none; }
.header-link:hover { color: var(--blue); }

.theme-toggle {
  position: relative;
  width: 66px;
  height: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  box-shadow: var(--shadow-small);
}

.theme-toggle__sun, .theme-toggle__moon { z-index: 2; font-size: 12px; text-align: center; }
.theme-toggle__sun { color: #765f00; }
.theme-toggle__moon { color: #b8c7d5; transform: scale(.65); }
.theme-toggle__thumb {
  position: absolute;
  left: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--yellow);
  transition: transform .25s ease, background .25s ease;
}
html[data-theme="dark"] .theme-toggle__thumb { transform: translateX(30px); background: var(--blue); }

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

.intro {
  min-height: 470px;
  padding: 72px 0 58px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 64px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .22em;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 720px;
  margin-bottom: 24px;
  font-size: clamp(42px, 5.1vw, 70px);
  line-height: .99;
  letter-spacing: -.045em;
}

.lead { max-width: 660px; margin-bottom: 28px; color: var(--muted); font-size: 19px; line-height: 1.55; }
.intro-meta { display: flex; flex-wrap: wrap; gap: 12px; }
.intro-meta span {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}
.intro-meta strong { color: var(--text); }

.intro-visual { display: grid; place-items: center; }
.mini-dashboard {
  position: relative;
  width: min(100%, 460px);
  min-height: 350px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 34px;
  color: #15191f;
  background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(235,245,252,.88));
  box-shadow: 0 28px 80px rgba(28, 91, 138, .18);
}
.mini-dashboard::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -90px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,211,0,.58), rgba(255,211,0,0));
}
.mini-dashboard__head { display: flex; justify-content: space-between; gap: 16px; align-items: center; font-weight: 800; }
.status-pill { padding: 5px 10px; border-radius: 999px; color: #6c5800; background: #fff4a2; font-size: 12px; }
.mini-dashboard__score { margin-top: 44px; font-size: 74px; font-weight: 900; line-height: 1; letter-spacing: -.05em; }
.mini-dashboard__score small { margin-left: 6px; color: #8d9ba7; font-size: 22px; }
.mini-dashboard__bars { height: 96px; margin: 25px 0 18px; display: flex; gap: 13px; align-items: end; }
.mini-dashboard__bars i { flex: 1; height: var(--h); min-height: 22px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #1fa7ee, var(--blue)); }
.mini-dashboard__bars i:nth-child(2), .mini-dashboard__bars i:nth-child(4) { background: linear-gradient(180deg, #ffd900, #f2a900); }
.mini-dashboard p { position: relative; z-index: 2; margin: 0; color: #7c8995; }

.audit-shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 34px 0 90px;
}

.audit-sidebar { position: sticky; top: 102px; display: grid; gap: 16px; }
.progress-card, .sidebar-tip, .audit-main, .result-card, .recommendations {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}
.progress-card { padding: 20px; }
.progress-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.progress-head span { color: var(--muted); }
.progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #16a6ec); transition: width .35s ease; }
.progress-card p { margin: 12px 0 0; color: var(--muted); font-size: 13px; }

.sidebar-tip { padding: 17px; display: flex; gap: 12px; align-items: flex-start; background: color-mix(in srgb, var(--yellow) 18%, var(--surface)); }
.tip-icon { flex: 0 0 26px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: #3b3100; background: var(--yellow); font-weight: 900; }
.sidebar-tip p { margin: 0; color: var(--muted); font-size: 13px; }
.sidebar-tip strong { color: var(--text); }

.audit-main { padding: clamp(22px, 4vw, 44px); box-shadow: var(--shadow); }
.question-section { padding: 10px 0 50px; margin-bottom: 44px; border-bottom: 1px solid var(--line); animation: fade-up .3s ease both; scroll-margin-top: 104px; }
.question-section:last-child { padding-bottom: 4px; margin-bottom: 0; border-bottom: 0; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.section-kicker { margin: 0 0 8px; color: var(--blue); font-size: 13px; font-weight: 850; letter-spacing: .16em; }
.section-title { margin-bottom: 12px; font-size: clamp(28px, 3.4vw, 43px); line-height: 1.1; letter-spacing: -.035em; }
.section-description { max-width: 720px; margin-bottom: 25px; color: var(--muted); font-size: 17px; }
.mini-test { margin-bottom: 26px; padding: 17px 19px; border: 1px solid #8cc8ef; border-radius: 14px; color: var(--text); background: var(--blue-soft); font-size: 14px; }
.mini-test strong { color: var(--blue); }
.question-list { display: grid; gap: 13px; }
.question-card {
  position: relative;
  padding: 18px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.question-card:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
.question-card.is-critical { border-color: color-mix(in srgb, var(--red) 28%, var(--line)); }
.question-card.is-missing { animation: shake .28s ease; border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 13%, transparent); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.question-number { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: white; background: var(--blue); font-weight: 900; }
.question-card.is-critical .question-number { background: var(--red); }
.question-text { margin: 0; font-weight: 700; line-height: 1.35; }
.critical-note { display: block; margin-top: 5px; color: var(--red); font-size: 12px; font-weight: 800; }
.answer-options { min-width: 260px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.answer-option { cursor: pointer; }
.answer-option input { position: absolute; opacity: 0; pointer-events: none; }
.answer-option span { min-height: 42px; padding: 9px 11px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: var(--surface); font-size: 13px; font-weight: 800; transition: .18s ease; }
.answer-option input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--blue) 25%, transparent); outline-offset: 2px; }
.answer-option input:checked + span { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.answer-option[data-value="0"] input:checked + span { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.answer-option[data-value="2"] input:checked + span { border-color: var(--green); color: var(--green); background: var(--green-soft); }

.quiz-actions { margin-top: 28px; display: flex; align-items: center; gap: 12px; }
.quiz-actions__status { flex: 1; color: var(--muted); font-size: 13px; text-align: center; }
.quiz-actions--single { padding-top: 25px; border-top: 1px solid var(--line); }
.quiz-actions--single .button { min-width: 240px; }
.button {
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 850;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button--primary { color: white; background: linear-gradient(135deg, var(--blue), #086db8); box-shadow: 0 10px 24px rgba(8, 121, 206, .24); }
.button--secondary { border-color: var(--yellow); color: #3e3300; background: var(--yellow); }
.button--ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.button--full { width: 100%; }

.lead-dialog { width: min(660px, calc(100% - 24px)); max-height: calc(100vh - 24px); padding: 0; overflow: auto; border: 0; border-radius: 24px; color: var(--text); background: transparent; box-shadow: 0 28px 100px rgba(0,0,0,.35); }
.lead-dialog::backdrop { background: rgba(3, 14, 25, .68); backdrop-filter: blur(8px); }
.lead-form { position: relative; padding: clamp(24px, 5vw, 42px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.dialog-close { position: absolute; top: 15px; right: 15px; width: 38px; height: 38px; border: 0; border-radius: 50%; color: var(--muted); background: var(--surface-2); font-size: 24px; cursor: pointer; }
.lead-form h2 { margin-bottom: 10px; font-size: 32px; line-height: 1.1; }
.dialog-lead { margin-bottom: 25px; color: var(--muted); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { display: grid; gap: 7px; color: var(--text); font-size: 14px; font-weight: 750; }
.field--wide { grid-column: 1 / -1; }
.field input { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface-2); outline: none; }
.field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 15%, transparent); }
.field input.is-invalid { border-color: var(--red); }
.consent { margin-top: 18px; display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; color: var(--muted); font-size: 12px; line-height: 1.45; }
.consent input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--blue); }
.consent--optional { margin-top: 10px; }
.form-error { min-height: 20px; margin: 12px 0 4px; color: var(--red); font-size: 13px; font-weight: 750; }
.form-note { margin: 13px 0 0; color: var(--muted); font-size: 12px; text-align: center; }

.result { padding: 20px 0 90px; animation: fade-up .4s ease both; }
.result-hero { padding: clamp(28px, 5vw, 52px); display: flex; justify-content: space-between; gap: 34px; align-items: center; border-radius: var(--radius-xl); color: white; background: linear-gradient(135deg, var(--navy), #0b3859); box-shadow: var(--shadow); }
.result-hero.is-good { background: linear-gradient(135deg, #073a31, #0a7653); }
.result-hero.is-warning { background: linear-gradient(135deg, #4a3600, #b27300); }
.result-hero.is-risk { background: linear-gradient(135deg, #41131c, #a52934); }
.result-hero .eyebrow { color: #81cfff; }
.result-hero h2 { margin-bottom: 12px; font-size: clamp(34px, 4.6vw, 58px); line-height: 1; letter-spacing: -.04em; }
.result-hero p:last-child { max-width: 730px; margin-bottom: 0; color: #d1dce6; font-size: 18px; }
.score-ring { flex: 0 0 150px; width: 150px; height: 150px; display: grid; place-content: center; border: 12px solid rgba(255,255,255,.2); border-top-color: var(--yellow); border-radius: 50%; text-align: center; }
.score-ring strong { font-size: 54px; line-height: .9; }
.score-ring span { color: #c8d7e4; }
.result-grid { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.result-card { padding: 26px; }
.result-card--attention { border-color: color-mix(in srgb, var(--red) 38%, var(--line)); }
.result-card__head { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 20px; }
.result-card__head h3 { margin: 0; font-size: 22px; }
.result-card__head span { padding: 5px 9px; border-radius: 8px; color: var(--muted); background: var(--surface-2); font-size: 12px; }
.section-results { display: grid; gap: 15px; }
.section-result__line { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 6px; font-size: 14px; }
.section-result__line strong { color: var(--blue); }
.section-result__track { height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.section-result__track span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.critical-empty { padding: 24px; border-radius: 14px; color: #0f684a; background: var(--green-soft); }
.critical-list { margin: 0; padding-left: 21px; display: grid; gap: 12px; color: var(--muted); }
.critical-list li::marker { color: var(--red); font-weight: 900; }
.recommendations { margin-top: 24px; padding: 28px; display: grid; grid-template-columns: .75fr 1.25fr; gap: 28px; }
.recommendations h3 { margin-bottom: 0; font-size: 27px; line-height: 1.15; }
.recommendations ol { margin: 0; padding: 0; list-style: none; counter-reset: recommendation; display: grid; gap: 12px; }
.recommendations li { counter-increment: recommendation; padding: 15px 17px; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; border-radius: 13px; background: var(--surface-2); }
.recommendations li::before { content: counter(recommendation); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: #3b3100; background: var(--yellow); font-weight: 900; }
.subscription-cta { margin-top: 24px; padding: clamp(26px, 4vw, 42px); display: flex; justify-content: space-between; align-items: center; gap: 30px; overflow: hidden; border: 1px solid #178bd7; border-radius: var(--radius-lg); color: white; background: linear-gradient(125deg, #061b2e 0%, #075f9d 65%, #0aa1dc 100%); box-shadow: var(--shadow); }
.subscription-cta h3 { margin: 4px 0 10px; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.06; letter-spacing: -.035em; }
.subscription-cta p { max-width: 760px; margin: 0; color: #d8eaf6; }
.subscription-cta .eyebrow { color: #77d1ff; }
.button--cta { flex: 0 0 auto; min-width: 225px; display: inline-flex; align-items: center; justify-content: center; color: #302800; background: var(--yellow); box-shadow: 0 14px 30px rgba(0, 0, 0, .22); text-decoration: none; }
.result-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }

.toast { position: fixed; z-index: 80; right: 20px; bottom: 20px; max-width: min(420px, calc(100% - 40px)); padding: 14px 17px; border-radius: 12px; color: white; background: var(--navy); box-shadow: var(--shadow); }

footer { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer div { display: flex; align-items: center; gap: 18px; }
footer img { width: 140px; }
footer p { margin: 0; }

@media (max-width: 960px) {
  .intro { grid-template-columns: 1fr; gap: 34px; padding-top: 52px; }
  .intro-visual { display: none; }
  .audit-shell { grid-template-columns: 1fr; }
  .audit-sidebar { position: static; }
  .sidebar-tip { display: none; }
  .question-card { grid-template-columns: 42px minmax(0, 1fr); }
  .answer-options { grid-column: 1 / -1; min-width: 0; }
}

@media (max-width: 680px) {
  body { padding-top: 66px; }
  .header-inner { min-height: 66px; }
  .brand img { width: 140px; }
  .header-link { display: none; }
  main { width: min(100% - 20px, 1180px); }
  .intro { min-height: auto; padding: 38px 0 28px; }
  h1 { font-size: 42px; }
  .lead { font-size: 17px; }
  .intro-meta { gap: 8px; }
  .intro-meta span { padding: 8px 11px; font-size: 13px; }
  .audit-shell { padding-top: 18px; gap: 16px; }
  .progress-card { padding: 16px; }
  .audit-main { min-height: 0; padding: 20px 14px; border-radius: 18px; }
  .section-title { font-size: 30px; }
  .section-description { font-size: 16px; }
  .question-card { padding: 15px 12px; gap: 11px; }
  .question-number { width: 34px; height: 34px; }
  .question-text { font-size: 15px; }
  .answer-option span { padding: 8px 4px; font-size: 12px; }
  .quiz-actions { display: grid; grid-template-columns: 1fr; }
  .quiz-actions__status { grid-row: 1; }
  .quiz-actions .button { width: 100%; padding-inline: 10px; }
  .field-grid { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .result-hero { align-items: flex-start; }
  .score-ring { flex-basis: 104px; width: 104px; height: 104px; border-width: 8px; }
  .score-ring strong { font-size: 37px; }
  .result-grid, .recommendations { grid-template-columns: 1fr; }
  .subscription-cta { display: grid; }
  .button--cta { width: 100%; min-width: 0; }
  .result-actions .button { width: 100%; }
  footer { grid-template-columns: 1fr; gap: 18px; }
  footer div { display: grid; }
}

@media (max-width: 430px) {
  h1 { font-size: 36px; }
  .question-card { grid-template-columns: 34px minmax(0, 1fr); }
  .answer-options { gap: 5px; }
  .result-hero { display: grid; }
  .score-ring { grid-row: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  :root { --bg: white; --surface: white; --surface-2: #f5f7fa; --text: #111; --muted: #555; --line: #d7dde3; }
  body { background: white; }
  .site-header, .intro, .audit-shell, .result-actions, footer, .toast { display: none !important; }
  main { width: 100%; }
  .result { display: block !important; padding: 0; }
  .result-hero, .result-card, .recommendations { break-inside: avoid; box-shadow: none; }
  .result-hero { color: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .result-grid { grid-template-columns: 1fr 1fr; }
}
