:root {
  color-scheme: light;
  --navy: #10263a;
  --blue: #176f8d;
  --paper: #f5f7f6;
  --ink: #172b3a;
  --muted: #526674;
  --line: #d3dddf;
  --white: #fff;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
body.wizard-open { overflow: hidden; }

.site-header, .wizard-top {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 72px);
  background: var(--navy);
  color: var(--white);
}

.brand {
  color: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.header-link, .text-button {
  color: inherit;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
}

.content-width { width: min(100% - 40px, 980px); margin-inline: auto; }
.hero { padding-block: clamp(56px, 10vh, 112px) 68px; }
.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 850px;
  margin-bottom: 20px;
  color: var(--navy);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  letter-spacing: -0.045em;
  line-height: 1.04;
}

h2 {
  margin-bottom: 24px;
  color: var(--navy);
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  letter-spacing: -0.035em;
}

h3 { margin-bottom: 10px; color: var(--navy); font-size: 1.08rem; }
p { color: var(--muted); line-height: 1.65; }
.intro { max-width: 720px; margin-bottom: 28px; font-size: clamp(1.05rem, 2vw, 1.25rem); }

.button {
  min-height: 48px;
  border: 0;
  border-radius: 5px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.button:disabled { cursor: not-allowed; opacity: 0.48; }
.button-primary { background: var(--blue); color: var(--white); }
.button-primary:hover:not(:disabled) { background: #115b75; }
.button-secondary { border: 1px solid var(--line); background: transparent; color: var(--navy); }
.reassurance { margin: 13px 0 0; font-size: 0.88rem; }

.explanation { padding-block: 36px 48px; }
.dimension-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.dimension-grid article, .result-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 20px;
  background: var(--white);
}
.dimension-grid p { margin-bottom: 0; }
.assessment-start {
  margin-block: 36px 72px;
  border-radius: 8px;
  padding: clamp(24px, 5vw, 48px);
  background: #e9f0f1;
}
.assessment-start p { max-width: 680px; }
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px max(20px, calc((100% - 980px) / 2));
  background: var(--navy);
}
.site-footer p { margin: 0; color: #dce5e8; font-size: 0.84rem; }
.legal-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.legal-links a, .legal-links button { border: 0; padding: 0; background: transparent; color: #dce5e8; font: inherit; font-size: 0.84rem; text-decoration: underline; cursor: pointer; }
.legal-page { padding-block: 42px 72px; }
.legal-page h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
.legal-page h2 { margin: 30px 0 10px; font-size: 1.35rem; letter-spacing: 0; }
.legal-page p, .legal-page li { line-height: 1.7; }
.legal-page address { font-style: normal; }
.legal-page a { color: var(--blue); text-decoration: underline; }
.privacy-dialog-backdrop { position: fixed; z-index: 40; inset: 0; display: grid; align-items: end; background: rgb(0 0 0 / 55%); }
.privacy-dialog-backdrop[hidden] { display: none; }
.privacy-dialog { max-height: 85dvh; overflow-y: auto; border-top: 1px solid #58707c; padding: 22px max(20px, calc((100% - 980px) / 2)); background: #092430; color: var(--white); box-shadow: 0 -12px 32px rgb(0 0 0 / 25%); }
.privacy-dialog h2, .privacy-dialog p { color: var(--white); }
.privacy-dialog h2 { margin: 0; font-size: 1.35rem; letter-spacing: 0; }
.privacy-dialog p { margin: 10px 0; font-size: 0.9rem; }
.privacy-options, .privacy-actions { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-block: 16px; }
.privacy-options label { display: flex; min-height: 44px; align-items: center; gap: 8px; }
.privacy-options input { width: 18px; min-height: 18px; }
.privacy-actions button { min-height: 44px; border: 1px solid #d3dddf; border-radius: 6px; padding: 9px 15px; background: transparent; color: var(--white); font: inherit; cursor: pointer; }
.privacy-error { position: fixed; z-index: 50; inset: auto 16px 16px; max-width: 720px; margin-inline: auto; border: 1px solid #f3b2b2; border-radius: 8px; padding: 12px 16px; background: #092430; color: var(--white); }
.privacy-error[hidden] { display: none; }
.privacy-error button { margin-left: 10px; border: 0; background: transparent; color: var(--white); text-decoration: underline; cursor: pointer; }

.wizard[hidden] { display: none; }
.wizard {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  grid-template-rows: 64px 58px minmax(0, 1fr) 76px;
  overflow: hidden;
  background: var(--paper);
}
.wizard-top { min-height: 64px; }
.text-button { border: 0; background: transparent; cursor: pointer; }
.progress-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 clamp(20px, 7vw, 100px);
  color: var(--muted);
  font-size: 0.84rem;
}
.progress-row > span { flex: 0 0 auto; }
.progress-track { height: 5px; flex: 1; overflow: hidden; border-radius: 99px; background: #dce4e5; }
.progress-fill { width: 0; height: 100%; background: var(--blue); transition: width 180ms ease; }
.wizard-content {
  width: min(100% - 40px, 760px);
  min-height: 0;
  margin: auto;
  padding-block: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.wizard-content h1 { margin-bottom: 12px; font-size: clamp(1.7rem, 4vw, 2.65rem); letter-spacing: -0.035em; }
.question-hint { margin-bottom: 22px; font-size: 0.94rem; }
.answer-list { display: grid; gap: 9px; }
.answer-option {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 15px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.answer-option:hover, .answer-option.selected { border-color: var(--blue); background: #edf5f6; }
.radio-mark { width: 18px; height: 18px; flex: 0 0 auto; border: 1px solid #81919a; border-radius: 50%; }
.selected .radio-mark { border: 5px solid var(--blue); }
.answer-feedback { margin: 15px 0 0; border-left: 3px solid var(--blue); padding: 9px 12px; background: #eaf1f2; font-size: 0.9rem; }
.answer-feedback strong { color: var(--navy); }
.wizard-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 12px clamp(20px, 7vw, 100px);
  background: var(--white);
}
.result-score { margin: 2px 0; color: var(--navy); font-size: 2.1rem; font-weight: 800; }
.result-score span { color: var(--muted); font-size: 1rem; font-weight: 500; }
.result-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.result-card { display: grid; gap: 8px; padding: 13px; font-size: 0.82rem; }
.result-card strong { color: var(--navy); font-size: 1.3rem; }
.result-card small { color: var(--muted); font-size: 0.78rem; font-weight: 500; }
.field-label { display: block; margin: 13px 0 6px; color: var(--navy); font-size: 0.88rem; font-weight: 700; }
.field-label span { color: var(--muted); font-weight: 400; }
textarea, input, select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #aebcc1;
  border-radius: 4px;
  padding: 9px 10px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}
textarea { resize: vertical; }
.contact-form { max-width: 560px; }
.contact-form .field-label { margin-top: 10px; }
.consent-label { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; color: var(--muted); font-size: 0.84rem; line-height: 1.45; }
.consent-label input { width: 18px; min-height: 18px; margin: 1px 0 0; flex: 0 0 auto; }
.form-error { min-height: 1.3em; margin: 7px 0 0; color: #a32626; font-size: 0.86rem; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #eca94e;
  outline-offset: 2px;
}

@media (max-width: 680px) {
  .dimension-grid { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
  .wizard { grid-template-rows: 56px 50px minmax(0, 1fr) 68px; }
  .wizard-top { min-height: 56px; }
  .wizard-content { padding-block: 12px; }
  .wizard-content h1 { font-size: clamp(1.45rem, 7vw, 2rem); }
  .question-hint { margin-bottom: 14px; }
  .answer-list { gap: 7px; }
  .answer-option { min-height: 46px; padding: 8px 11px; font-size: 0.9rem; }
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wizard-controls { padding-inline: 16px; }
  .wizard-controls .button { min-height: 44px; padding: 10px 15px; }
}

@media (max-height: 720px) {
  .wizard-content { padding-block: 8px; }
  .wizard-content h1 { margin-bottom: 8px; font-size: clamp(1.4rem, 3.5vw, 2.1rem); }
  .question-hint { margin-bottom: 10px; }
  .answer-list { gap: 6px; }
  .answer-option { min-height: 42px; padding-block: 7px; }
  .answer-feedback { margin-top: 8px; padding-block: 6px; }
}
