:root {
  --teal: #075056;
  --teal-dark: #043c41;
  --teal-soft: #dfeceb;
  --ink: #233333;
  --muted: #61706f;
  --cream: #f7f3ea;
  --paper: #fffdf8;
  --gold: #a47c38;
  --gold-light: #e6d6b3;
  --line: #d8ddd8;
  --error: #a3332f;
  --shadow: 0 28px 70px rgba(24, 52, 51, .11);
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, rgba(230, 214, 179, .48), transparent 24rem),
    radial-gradient(circle at 90% 88%, rgba(7, 80, 86, .1), transparent 30rem),
    var(--cream);
  font-family: var(--sans);
  line-height: 1.55;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--teal); text-underline-offset: .2em; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 99; background: white; padding: .75rem 1rem; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid #c69232; outline-offset: 4px; }

.site-header, .site-footer {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header { height: 92px; border-bottom: 1px solid rgba(7, 80, 86, .13); }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--teal-dark); text-decoration: none; font-weight: 600; letter-spacing: -.02em; }
.brand-mark { width: 28px; height: 28px; border: 1.5px solid var(--gold); border-radius: 50%; display: grid; place-items: center; }
.brand-mark span { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); }
.header-note { color: var(--muted); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.site-footer { min-height: 96px; justify-content: center; gap: .7rem; color: var(--muted); font-size: .84rem; }

#app { min-height: calc(100vh - 188px); display: grid; place-items: center; padding: 40px 20px 64px; }
.shell { width: min(100%, 970px); }
.panel {
  position: relative;
  overflow: hidden;
  background: rgba(255, 253, 248, .94);
  border: 1px solid rgba(7, 80, 86, .13);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(32px, 6vw, 76px);
}
.panel::after { content: ""; position: absolute; width: 220px; height: 220px; border: 1px solid rgba(164, 124, 56, .18); border-radius: 50%; right: -130px; top: -130px; pointer-events: none; }
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); gap: clamp(32px, 7vw, 82px); align-items: center; }
.eyebrow { margin: 0 0 1rem; color: var(--gold); font-size: .77rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; color: var(--teal-dark); }
h1 { margin: 0 0 1.35rem; font-size: clamp(2.65rem, 6.8vw, 5.25rem); letter-spacing: -.035em; }
h2 { margin: 0 0 1.1rem; font-size: clamp(2.05rem, 4.8vw, 3.7rem); letter-spacing: -.025em; }
h3 { font-size: 1.55rem; }
.lede { max-width: 670px; color: #445352; font-size: clamp(1.03rem, 2vw, 1.18rem); }
.benefits { display: grid; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.benefits li { display: grid; grid-template-columns: 28px 1fr; gap: .75rem; align-items: start; }
.benefits li::before { content: "✓"; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: var(--teal); background: var(--teal-soft); font-weight: 600; }
.note { margin: 2rem 0; padding: 1rem 1.15rem; border-left: 3px solid var(--gold-light); background: #faf7f0; color: var(--muted); font-size: .9rem; }
.actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.button { min-height: 52px; border: 1px solid var(--teal); border-radius: 999px; padding: .85rem 1.45rem; display: inline-flex; align-items: center; justify-content: center; gap: .65rem; background: var(--teal); color: white; text-decoration: none; font-weight: 600; cursor: pointer; transition: transform .18s ease, background .18s ease; }
.button:hover { background: var(--teal-dark); transform: translateY(-1px); }
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.button.secondary { background: transparent; color: var(--teal); }
.button.ghost { padding-inline: .45rem; border-color: transparent; background: transparent; color: var(--teal); }
.button.ghost:hover { transform: none; text-decoration: underline; }
.meta { margin-top: .7rem; color: var(--muted); font-size: .84rem; }

.progress-head { display: flex; justify-content: space-between; color: var(--muted); font-size: .84rem; margin-bottom: .65rem; }
.progress { height: 4px; background: #e1e5e1; border-radius: 999px; overflow: hidden; margin-bottom: clamp(32px, 7vw, 70px); }
.progress span { display: block; height: 100%; background: var(--gold); transition: width .35s ease; }
.question-wrap { max-width: 780px; margin-inline: auto; }
.question-label { color: var(--gold); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.question-title { min-height: 2.2em; margin-top: .55rem; font-size: clamp(2rem, 4.8vw, 3.45rem); }
.scale { border: 0; padding: 0; margin: clamp(28px, 5vw, 48px) 0 34px; display: grid; grid-template-columns: repeat(5, 1fr); gap: .7rem; }
.scale legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.scale-option { position: relative; }
.scale-option input { position: absolute; opacity: 0; pointer-events: none; }
.scale-option label { min-height: 108px; padding: 1rem .55rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .65rem; text-align: center; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--muted); cursor: pointer; font-size: .79rem; transition: border .18s ease, background .18s ease, transform .18s ease; }
.scale-option label::before { content: attr(data-value); width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid #b8c2bf; border-radius: 50%; color: var(--teal); font-weight: 600; }
.scale-option input:checked + label { border: 2px solid var(--teal); background: var(--teal-soft); color: var(--teal-dark); font-weight: 600; }
.scale-option input:checked + label::before { content: "✓"; color: white; border-color: var(--teal); background: var(--teal); }
.scale-option input:focus-visible + label { outline: 3px solid #c69232; outline-offset: 3px; }
.question-actions { display: flex; justify-content: space-between; align-items: center; }

.contact-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(34px, 7vw, 72px); }
.form-grid { display: grid; gap: 1.15rem; }
.field { display: grid; gap: .4rem; }
.field label, .field-label { font-weight: 600; font-size: .9rem; }
.field input, .field select { width: 100%; min-height: 50px; border: 1px solid #bfc9c5; border-radius: 10px; background: white; padding: .75rem .9rem; color: var(--ink); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border: 2px solid var(--error); }
.checkbox { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: .7rem; align-items: start; color: #445352; font-size: .86rem; }
.checkbox input { width: 20px; height: 20px; margin: .12rem 0 0; accent-color: var(--teal); }
.error { margin: .15rem 0 0; color: var(--error); font-size: .82rem; }
.form-error { padding: .85rem 1rem; border-radius: 8px; background: #f9e9e6; color: #812a27; }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.spinner { width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.4); border-top-color: white; border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.result-kicker { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 2rem; color: var(--muted); }
.score-badge { flex: 0 0 auto; width: 116px; height: 116px; display: grid; place-items: center; border: 1px solid var(--gold-light); border-radius: 50%; background: #faf6eb; color: var(--teal); }
.score-badge strong { display: block; font-family: var(--serif); font-size: 2.25rem; font-weight: 400; line-height: 1; }
.score-badge span { font-size: .76rem; }
.result-intro { display: grid; grid-template-columns: 1fr 130px; gap: 2rem; align-items: center; }
.result-copy { max-width: 700px; color: #445352; }
.category-list { display: grid; gap: 1rem; margin: 2rem 0; }
.category-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(120px, 2fr) 52px; gap: 1rem; align-items: center; }
.category-row small { display: block; color: var(--muted); }
.category-bar { height: 8px; background: #e2e7e3; border-radius: 999px; overflow: hidden; }
.category-bar span { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.focus-card { margin: 2.2rem 0; padding: clamp(24px, 4vw, 38px); border-radius: 18px; background: var(--teal); color: white; }
.focus-card .eyebrow { color: #eadab8; }
.focus-card h3 { margin: 0 0 .7rem; color: white; }
.focus-card p:last-child { margin-bottom: 0; }
.next-steps { padding-left: 1.3rem; }
.next-steps li { padding: .45rem 0 .45rem .35rem; }
.email-confirm { margin: 2rem 0; padding: 1rem; border: 1px solid #bfd7d3; border-radius: 10px; background: #eef6f3; }
.cta-card { margin-top: 2.7rem; padding: clamp(28px, 5vw, 48px); border-radius: 20px; background: #eee5d2; }
.cta-card h3 { margin: 0 0 .7rem; font-size: clamp(1.8rem, 4vw, 2.7rem); }
.restart { text-align: center; margin-top: 2rem; }

@media (max-width: 760px) {
  .site-header { height: 72px; }
  .header-note { display: none; }
  #app { padding: 22px 14px 42px; }
  .panel { padding: 28px 22px; border-radius: 20px; }
  .hero, .contact-grid { grid-template-columns: 1fr; }
  .hero { gap: 28px; }
  .scale { grid-template-columns: 1fr; gap: .55rem; }
  .scale-option label { min-height: 56px; flex-direction: row; justify-content: flex-start; padding: .7rem .9rem; text-align: left; }
  .question-title { min-height: 0; }
  .question-actions .button { min-width: 116px; }
  .result-intro { grid-template-columns: 1fr; }
  .score-badge { order: -1; }
  .category-row { grid-template-columns: 1fr 45px; gap: .35rem .7rem; }
  .category-bar { grid-column: 1 / -1; }
  .site-footer { flex-wrap: wrap; padding-block: 20px; }
}

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