:root {
  color-scheme: dark;
  --bg: #0d0f0c;
  --surface: #151814;
  --raised: #1b1f19;
  --soft: #252920;
  --text: #f4f1e7;
  --muted: #b7baad;
  --subtle: #858a7c;
  --gold: #d5a94e;
  --gold-light: #f0cc77;
  --red: #9b352d;
  --green: #8fb87e;
  --danger: #ef9887;
  --border: rgba(244, 241, 231, 0.15);
  --border-strong: rgba(213, 169, 78, 0.5);
  --font: Inter, "SF Pro Display", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  border-top: 4px solid var(--red);
  background: var(--bg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, label, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--gold-light); }
.is-hidden { display: none !important; }

.site-header, .site-footer, .app-shell {
  width: min(100% - 32px, 980px);
  margin-inline: auto;
}
.site-header {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--gold-light);
  background: rgba(213, 169, 78, 0.08);
  font-weight: 800;
}
.brand strong, .brand small { display: block; line-height: 1.05; }
.brand strong { font-size: .92rem; letter-spacing: 0; }
.brand small { margin-top: 5px; color: var(--subtle); font-size: .72rem; }
.header-note { color: var(--subtle); font-size: .82rem; }

.app-shell { min-height: calc(100vh - 168px); padding-block: 48px 72px; }
.view { animation: reveal .28s ease both; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-light);
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}
.eyebrow span { width: 30px; height: 1px; background: currentColor; }
h1, h2, h3, legend { margin: 0; letter-spacing: 0; text-wrap: balance; }
h1 { max-width: 900px; margin-top: 20px; font-size: 64px; line-height: 1.02; }
h2 { font-size: 36px; line-height: 1.16; }
h3 { font-size: 23px; line-height: 1.25; }
.lead { max-width: 780px; margin: 24px 0 0; color: var(--muted); font-size: 20px; }
.disclaimer, .privacy-note, .cta-note, .integration-note, .consultation-request-note {
  color: var(--subtle);
  font-size: .84rem;
}

.button, .result-cta {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.button-primary, .result-cta { color: #17130b; background: var(--gold); }
.button-primary:hover, .result-cta:hover { background: var(--gold-light); }
.button-secondary { color: var(--text); border-color: var(--border); background: var(--raised); }
.button-secondary:hover { border-color: rgba(244, 241, 231, .32); background: var(--soft); }
.button:disabled, .result-cta:disabled { cursor: not-allowed; opacity: .48; }
.button:focus-visible, .result-cta:focus-visible, .brand:focus-visible,
.answer-input:focus-visible + .answer-label, .choice-input:focus-visible + .choice-label,
input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
}

.start-actions, .test-actions, .result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.intro-image {
  width: 100%;
  aspect-ratio: 16 / 7;
  margin: 34px 0 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.intro-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: grayscale(1) contrast(1.08);
}
.start-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}
.info-card {
  min-height: 116px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--raised);
}
.info-card strong, .info-card span { display: block; }
.info-card strong { color: var(--gold-light); font-size: 1.08rem; }
.info-card span { margin-top: 7px; color: var(--muted); font-size: .9rem; }
.start-view > .disclaimer { max-width: 780px; margin-top: 24px; }

.progress-wrap { position: sticky; z-index: 10; top: 0; padding: 14px 0; background: rgba(13, 15, 12, .96); }
.progress-copy { display: flex; justify-content: space-between; color: var(--subtle); font-size: .8rem; }
.progress-track { height: 5px; margin-top: 9px; overflow: hidden; border-radius: 2px; background: var(--soft); }
.progress-track span { display: block; width: 0; height: 100%; background: var(--gold); transition: width .2s ease; }
.test-heading { margin-top: 40px; }
.test-heading h2 { margin-top: 16px; font-size: 42px; }
.test-heading p { max-width: 760px; margin: 12px 0 0; color: var(--muted); }
.questions { display: grid; gap: 14px; margin-top: 30px; }
.question-card {
  min-width: 0;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}
.question-card legend { width: 100%; padding: 0; }
.question-number { display: block; color: var(--gold-light); font-size: .76rem; font-weight: 750; text-transform: uppercase; }
.question-text { display: block; max-width: 820px; margin-top: 8px; font-size: 19px; font-weight: 650; line-height: 1.4; }
.scale-answers { display: grid; grid-template-columns: repeat(5, 48px); gap: 8px; margin-top: 20px; }
.answer-option, .choice-option { min-width: 0; }
.answer-input, .choice-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.answer-label {
  display: grid;
  width: 48px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--muted);
  background: var(--raised);
  font-weight: 750;
}
.answer-label:hover, .choice-label:hover { border-color: var(--border-strong); color: var(--text); }
.answer-input:checked + .answer-label, .choice-input:checked + .choice-label {
  border-color: var(--gold);
  color: #17130b;
  background: var(--gold);
}
.answer-hints { display: flex; width: 272px; justify-content: space-between; margin-top: 7px; color: var(--subtle); font-size: .7rem; }
.choice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.choice-label {
  display: flex;
  min-height: 56px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--muted);
  background: var(--raised);
}
.form-error { margin: 18px 0 0; color: var(--danger); font-weight: 700; }

.result-hero { padding: 12px 0 42px; border-bottom: 1px solid var(--border); }
.result-hero h1 { max-width: 920px; }
.result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.result-stat { min-width: 0; padding: 20px 20px 20px 0; }
.result-stat + .result-stat { padding-left: 20px; border-left: 1px solid var(--border); }
.result-stat span, .result-stat strong { display: block; }
.result-stat span { color: var(--subtle); font-size: .78rem; }
.result-stat strong { margin-top: 7px; font-size: 1.06rem; overflow-wrap: anywhere; }
.result-section { margin-top: 0; padding: 48px 0; border-bottom: 1px solid var(--border); }
.result-section h2 { max-width: 820px; }
.result-section h3 { margin-top: 24px; }
.result-section p, .result-section li { max-width: 820px; color: var(--muted); }
.result-section blockquote { max-width: 820px; margin: 24px 0; padding-left: 20px; border-left: 3px solid var(--gold); color: var(--text); }
.result-section code { color: var(--gold-light); }
.conversion-card { border-top: 3px solid var(--red); }
.conversion-lead { font-size: 19px; }
.debrief-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin-top: 28px; }
.debrief-grid > div { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 16px 0; border-top: 1px solid var(--border); }
.debrief-grid strong { color: var(--gold-light); }
.debrief-grid span { color: var(--muted); }
.offer-strip {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  margin-top: 30px;
  padding: 22px 0;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}
.offer-strip span, .offer-strip strong { display: block; }
.offer-strip span { color: var(--subtle); font-size: .78rem; text-transform: uppercase; }
.offer-strip strong { margin-top: 6px; color: var(--gold-light); font-size: 24px; }
.community-note { margin-top: 20px; }
.contact-result-section { scroll-margin-top: 22px; }
.contact-card { max-width: 820px; }
.contact-intro p { color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.field-label { display: grid; gap: 8px; color: var(--muted); font-weight: 650; }
.field-label:first-child { grid-column: 1 / -1; }
.field-label strong { color: var(--gold-light); }
.field-label small { color: var(--subtle); font-weight: 500; }
.text-input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  background: var(--raised);
}
.consent-row { display: flex; max-width: 820px; align-items: flex-start; gap: 12px; margin-top: 18px; color: var(--muted); font-size: .9rem; }
.consent-row input { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--gold); }
.contact-result-section .result-cta { margin-top: 22px; }
.safety-card { border-top: 3px solid var(--danger); }

.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.plan-focus { max-width: 820px; margin-top: 26px; padding: 20px 0; border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); }
.plan-focus > span, .plan-focus > strong { display: block; }
.plan-focus > span { color: var(--gold-light); font-size: .78rem; text-transform: uppercase; }
.plan-focus > strong { margin-top: 7px; font-size: 20px; }
.plan-focus > p { margin: 8px 0 0; }
.plan-week { padding-top: 18px; border-top: 1px solid var(--border); }
.plan-week > span { color: var(--gold-light); font-size: .78rem; text-transform: uppercase; }
.plan-week h3 { margin-top: 8px; font-size: 20px; }
.plan-week p { font-size: .9rem; }
.plan-week dl { margin: 16px 0 0; }
.plan-week dl > div { margin-top: 12px; }
.plan-week dt { color: var(--subtle); font-size: .72rem; text-transform: uppercase; }
.plan-week dd { margin: 3px 0 0; color: var(--muted); font-size: .86rem; }
.first-action-card { margin-top: 26px; padding: 20px 0; border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); }
.first-action-card span, .first-action-card strong { display: block; }
.first-action-card span { color: var(--gold-light); font-size: .78rem; text-transform: uppercase; }
.first-action-card strong { max-width: 820px; margin-top: 7px; font-size: 20px; }
.plan-rule { margin-top: 16px; }
.daily-plan { max-width: 820px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border); }
.daily-plan summary { cursor: pointer; color: var(--gold-light); font-size: 18px; font-weight: 700; }
.daily-plan ol { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.daily-plan li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.daily-plan li strong { color: var(--text); }
.daily-plan li span { color: var(--muted); }
.score-details summary { cursor: pointer; color: var(--gold-light); font-size: 20px; font-weight: 700; }
.scale-list { margin-top: 24px; }
.scale-row { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(160px, 2fr) 44px; gap: 14px; align-items: center; padding: 13px 0; border-top: 1px solid var(--border); }
.scale-copy strong, .scale-copy span { display: block; }
.scale-copy span { color: var(--subtle); font-size: .75rem; }
.scale-track { height: 6px; overflow: hidden; border-radius: 2px; background: var(--soft); }
.scale-track span { display: block; height: 100%; background: var(--gold); }
.scale-value { color: var(--gold-light); text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; margin-top: 18px; }
table { width: 100%; min-width: 620px; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--gold-light); font-size: .8rem; }
td { color: var(--muted); }
.delivery-ok { color: var(--green); }

.site-footer {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--subtle);
  font-size: .78rem;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .header-note { display: none; }
  .app-shell { padding-top: 24px; }
  h1 { font-size: 42px; }
  h2, .test-heading h2 { font-size: 30px; }
  .lead, .conversion-lead { font-size: 18px; }
  .start-grid, .result-summary, .debrief-grid, .offer-strip, .contact-grid, .plan-grid { grid-template-columns: 1fr; }
  .result-stat { padding: 16px 0; }
  .result-stat + .result-stat { padding-left: 0; border-top: 1px solid var(--border); border-left: 0; }
  .field-label:first-child { grid-column: auto; }
  .choice-list { grid-template-columns: 1fr; }
  .scale-row { grid-template-columns: minmax(120px, 1.2fr) minmax(90px, 1fr) 38px; gap: 9px; }
  .result-section { padding: 38px 0; }
  .start-actions .button, .test-actions .button, .result-actions .button, .result-actions .result-cta { width: 100%; }
  .site-footer { flex-direction: column; align-items: flex-start; justify-content: center; }
}

@media (max-width: 390px) {
  h1 { font-size: 36px; }
  .question-card { padding: 18px; }
  .scale-answers { grid-template-columns: repeat(5, 42px); gap: 6px; }
  .answer-label { width: 42px; height: 42px; }
  .answer-hints { width: 234px; }
}

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