:root {
  --red: #c00000;
  --dark-red: #8b0000;
  --ink: #20242a;
  --grey: #5b6573;
  --light-grey: #e7e9ed;
  --pale-grey: #f5f6f8;
  --white: #ffffff;
  --green: #4f8f3a;
  --amber: #bf8200;
  --shadow: 0 18px 45px rgba(31, 35, 40, .10);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #fff 0, #f3f4f6 100%);
  font-family: Arial, Helvetica, sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.site-header {
  height: 82px;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand-wrap { display: flex; align-items: center; gap: 14px; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 13px); grid-template-rows: repeat(2, 13px); gap: 4px; }
.brand-mark span { background: var(--red); }
.brand-mark span:first-child { grid-row: 1 / span 2; }
.brand-name { font-weight: 800; letter-spacing: .9px; }
.brand-name span { font-size: .7em; vertical-align: top; }
.brand-subtitle { font-size: .85rem; color: var(--grey); margin-top: 3px; }
.text-button { border: 0; background: transparent; color: var(--red); font-weight: 700; }
.hidden { display: none !important; }

.app-shell { width: min(1180px, 92vw); margin: 38px auto 70px; }
.panel {
  background: var(--white);
  border: 1px solid #e2e4e8;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero { min-height: 580px; }
.hero-single { display: flex; align-items: center; }
.hero-copy { padding: 72px 72px 76px; width: min(820px, 100%); }
.hero-single .lead { max-width: 760px; }
.eyebrow { color: var(--red); font-weight: 800; text-transform: uppercase; letter-spacing: 1.4px; font-size: .78rem; }
h1 { margin: 14px 0 18px; font-size: clamp(2.25rem, 5vw, 4.5rem); line-height: .98; letter-spacing: -2.3px; }
h2 { margin: 0; font-size: clamp(1.7rem, 3.2vw, 2.8rem); letter-spacing: -1px; }
h3 { margin: 0 0 8px; }
.lead { color: var(--grey); font-size: 1.18rem; line-height: 1.65; max-width: 680px; }
.hero-list { display: grid; gap: 19px; margin: 30px 0 34px; }
.hero-list div { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.hero-list b { color: var(--red); font-size: 1.1rem; }

.primary, .secondary {
  border-radius: 9px;
  padding: 14px 22px;
  border: 2px solid var(--red);
  font-weight: 800;
}
.primary { background: var(--red); color: var(--white); }
.primary:hover { background: var(--dark-red); border-color: var(--dark-red); }
.secondary { background: var(--white); color: var(--red); }
.secondary:hover { background: #fff5f5; }
.primary:disabled, .secondary:disabled { opacity: .45; cursor: not-allowed; }
.btn-link { display: inline-block; text-decoration: none; text-align: center; }

.consent-field { display: flex; align-items: flex-start; gap: 10px; }
.consent-field input { margin-top: 4px; }
.consent-field label { font-size: .88rem; color: var(--grey); line-height: 1.5; }
.submission-note { margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: #fff5f5; border: 1px solid #f1c9c9; font-size: .9rem; color: var(--ink); }
.submission-note.error { background: #fdf3f3; border-color: #e6b8b8; }
.result-link-box { margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: var(--light-grey); font-size: .85rem; word-break: break-all; }

.step-shell { padding: 38px 44px 46px; }
.progress-top { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; margin-bottom: 26px; }
.progress-track { height: 8px; background: var(--light-grey); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--red); transition: width .3s ease; }
.progress-label { color: var(--grey); font-weight: 700; font-size: .9rem; }
.step-intro { margin-bottom: 30px; }
.step-intro p { color: var(--grey); line-height: 1.6; max-width: 760px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.form-field { display: grid; gap: 8px; }
.form-field.full { grid-column: 1 / -1; }
label { font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid #cfd3d8;
  border-radius: 9px;
  padding: 13px 14px;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(192,0,0,.12); border-color: var(--red); }
.field-note { font-size: .82rem; color: var(--grey); }
.actions { margin-top: 32px; display: flex; justify-content: space-between; gap: 14px; }

.question-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 13px; }
.tag { padding: 5px 9px; border-radius: 999px; background: var(--pale-grey); color: var(--grey); font-size: .78rem; font-weight: 700; }
.question-card { padding: 36px; border: 1px solid #e1e3e6; border-radius: 14px; background: #fff; }
.question-card h2 { font-size: clamp(1.45rem, 3vw, 2.25rem); line-height: 1.25; max-width: 920px; }
.scale-note { color: var(--grey); margin-top: 12px; }
.score-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 26px; }
.score-option input { position: absolute; opacity: 0; pointer-events: none; }
.score-option label { min-height: 124px; border: 2px solid #dfe2e6; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12px 7px; transition: .15s ease; }
.score-option label:hover { border-color: #999; transform: translateY(-2px); }
.score-option input:checked + label { border-color: var(--red); background: #fff5f5; box-shadow: 0 7px 20px rgba(192,0,0,.13); }
.score-number { font-size: 1.85rem; font-weight: 800; color: var(--red); }
.score-text { margin-top: 6px; font-size: .8rem; color: var(--grey); line-height: 1.25; }
.notes-toggle { margin-top: 22px; }
.notes-toggle summary { color: var(--red); font-weight: 700; cursor: pointer; }
.notes-toggle textarea { margin-top: 12px; min-height: 88px; resize: vertical; }

.results { padding: 42px; }
.results-header { display: flex; justify-content: space-between; gap: 28px; align-items: flex-start; }
.health-score { min-width: 210px; text-align: center; padding: 24px 18px; border-radius: 15px; background: #23272d; color: white; }
.health-score strong { display: block; font-size: 4rem; line-height: 1; }
.health-score span { color: #cdd0d4; }
.results-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 28px; margin-top: 32px; }
.result-card { border: 1px solid #e1e3e6; border-radius: 14px; padding: 25px; }
.radar-wrap { display: flex; justify-content: center; align-items: center; min-height: 390px; }
.pillar-list { display: grid; gap: 15px; }
.pillar-row { display: grid; grid-template-columns: minmax(170px, 1.25fr) 2fr 62px; gap: 12px; align-items: center; }
.pillar-row .bar { height: 12px; background: var(--light-grey); border-radius: 999px; overflow: hidden; }
.pillar-row .bar span { height: 100%; display: block; background: var(--red); }
.pillar-row strong { text-align: right; }
.theme-block { margin-top: 25px; padding: 22px; border-left: 5px solid var(--red); background: var(--pale-grey); }
.theme-block p { color: var(--grey); line-height: 1.6; }
.reveal-note { margin-top: 26px; padding: 22px; background: #23272d; color: white; border-radius: 13px; }
.reveal-note-quiet { margin-top: 30px; padding: 16px 20px; background: var(--pale-grey); color: var(--grey); border-radius: 10px; font-size: .88rem; border: 1px solid var(--light-grey); }
.reveal-note-quiet h3 { font-size: .95rem; margin: 0 0 6px; color: var(--ink); }
.reveal-note-quiet p { color: var(--grey); line-height: 1.5; margin: 0; }
.reveal-note p { color: #d3d6da; line-height: 1.55; }
.results-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(20,22,25,.74); display: grid; place-items: center; padding: 20px; z-index: 99; }
.modal { width: min(620px, 96vw); background: white; border-radius: 16px; padding: 30px; box-shadow: var(--shadow); }
.modal .actions { justify-content: flex-end; }
.success { color: var(--green); font-weight: 700; }
.error { color: var(--red); font-weight: 700; }

footer { width: min(1180px, 92vw); margin: 0 auto 35px; display: flex; justify-content: space-between; gap: 25px; color: var(--grey); font-size: .78rem; }

@media (max-width: 820px) {
  .results-grid { grid-template-columns: 1fr; }
  .hero-copy, .step-shell, .results { padding: 34px 25px; }
  .form-grid { grid-template-columns: 1fr; }
  .score-options { grid-template-columns: 1fr; }
  .score-option label { min-height: 72px; flex-direction: row; justify-content: flex-start; gap: 18px; text-align: left; padding: 12px 18px; }
  .results-header { flex-direction: column; }
  .health-score { width: 100%; }
  .pillar-row { grid-template-columns: 1fr 70px; }
  .pillar-row .bar { grid-column: 1 / -1; grid-row: 2; }
  footer { flex-direction: column; }
}

@media print {
  .site-header, footer, .results-actions { display: none !important; }
  body { background: white; }
  .app-shell { width: 100%; margin: 0; }
  .panel { box-shadow: none; border: 0; }
  .results { padding: 20px; }
}
