:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.25rem, 1rem + 3.4vw, 4.25rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  --font-display: 'Gambetta', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Switzer', 'Helvetica Neue', Arial, sans-serif;

  --color-bg: oklch(0.972 0.007 85);
  --color-surface: oklch(0.99 0.004 85);
  --color-surface-2: oklch(0.945 0.009 85);
  --color-text: oklch(0.23 0.018 165);
  --color-text-muted: oklch(0.47 0.014 165);
  --color-border: oklch(0.23 0.018 165 / 0.14);
  --color-border-strong: oklch(0.23 0.018 165 / 0.28);
  --color-primary: oklch(0.39 0.062 165);
  --color-primary-hover: oklch(0.32 0.058 165);
  --color-primary-soft: oklch(0.39 0.062 165 / 0.08);
  --color-on-primary: oklch(0.98 0.006 85);
  --color-error: oklch(0.5 0.16 28);

  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-interactive: 180ms var(--ease);
  --shadow-card: 0 1px 2px oklch(0.23 0.018 165 / 0.05), 0 12px 32px -12px oklch(0.23 0.018 165 / 0.14);
  --wrap: 1180px;
}

body { overflow-x: hidden; }
.wrap { width: min(100% - 2 * clamp(var(--space-5), 5vw, var(--space-12)), var(--wrap)); margin-inline: auto; }

.skip { position: absolute; left: var(--space-4); top: -100px; background: var(--color-primary); color: var(--color-on-primary); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); z-index: 10; }
.skip:focus { top: var(--space-4); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: oklch(0.972 0.007 85 / 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--color-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 64px; }
.wordmark { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 500; color: var(--color-text); text-decoration: none; letter-spacing: -0.01em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 48px; padding: var(--space-3) var(--space-6); background: var(--color-primary); color: var(--color-on-primary); font-size: var(--text-sm); font-weight: 500; text-decoration: none; border-radius: var(--radius-md); border: 1px solid transparent; }
.btn:hover { background: var(--color-primary-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn-small { min-height: 40px; padding: var(--space-2) var(--space-4); }
.btn-ghost { background: transparent; color: var(--color-text); border-color: var(--color-border-strong); }
.btn-ghost:hover { background: var(--color-surface-2); }
.link-btn { color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; font-size: var(--text-sm); padding: var(--space-2) 0; min-height: 44px; }

/* Hero */
.hero { padding-block: clamp(var(--space-10), 7vw, var(--space-24)); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(var(--space-8), 6vw, var(--space-20)); align-items: center; }
.eyebrow { font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-primary); margin-bottom: var(--space-5); }
.hero h1 { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 500; line-height: 1.06; letter-spacing: -0.02em; max-width: 16ch; }
.lede { margin-top: var(--space-6); color: var(--color-text-muted); max-width: 54ch; }
.hero-actions { margin-top: var(--space-8); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-8); }
.facts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); list-style: none; font-size: var(--text-sm); color: var(--color-text-muted); }
.facts li { display: flex; align-items: center; gap: var(--space-2); }
.facts li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--color-primary); }
.hero-figure { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5; background: var(--color-surface-2); }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }

/* Sections */
.section-title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 500; letter-spacing: -0.01em; margin-bottom: var(--space-8); }
.about { padding-block: clamp(var(--space-12), 7vw, var(--space-20)); border-top: 1px solid var(--color-border); }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(var(--space-6), 4vw, var(--space-12)); }
.about-item { border-top: 2px solid var(--color-primary); padding-top: var(--space-5); }
.about-item h3 { font-size: var(--text-base); font-weight: 600; margin-bottom: var(--space-2); }
.about-item p { color: var(--color-text-muted); }

.survey-section { padding-block: clamp(var(--space-12), 7vw, var(--space-24)); background: var(--color-surface-2); border-top: 1px solid var(--color-border); scroll-margin-top: 64px; }
.survey-wrap { max-width: 760px; }
.survey-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: clamp(var(--space-6), 5vw, var(--space-12)); }

/* Survey */
.progress { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: var(--space-3); font-variant-numeric: tabular-nums; }
.progress-bar { height: 3px; background: var(--color-border); border-radius: 2px; overflow: hidden; margin-bottom: var(--space-8); }
.progress-bar span { display: block; height: 100%; background: var(--color-primary); transition: width 400ms var(--ease); }
.q-title { font-size: var(--text-lg); font-weight: 600; line-height: 1.3; margin-bottom: var(--space-2); }
.q-hint { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-6); }
.q-hint:empty { display: none; }
.q-title + .options { margin-top: var(--space-6); }
fieldset { border: 0; min-width: 0; }
legend { padding: 0; }
.options { display: grid; gap: var(--space-2); }
.option { position: relative; display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); min-height: 52px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); cursor: pointer; background: var(--color-surface); transition: border-color var(--transition-interactive), background var(--transition-interactive); }
.option:hover { border-color: var(--color-primary); }
.option:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-soft); }
.option:has(input:focus-visible) { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.option:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.option input { appearance: none; flex: none; width: 20px; height: 20px; margin-top: 2px; border: 1.5px solid var(--color-border-strong); background: var(--color-surface); display: grid; place-content: center; cursor: inherit; }
.option input[type='radio'] { border-radius: 50%; }
.option input[type='checkbox'] { border-radius: 5px; }
.option input:checked { border-color: var(--color-primary); background: var(--color-primary); }
.option input[type='radio']:checked::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--color-on-primary); }
.option input[type='checkbox']:checked::after { content: ''; width: 10px; height: 6px; border-left: 2px solid var(--color-on-primary); border-bottom: 2px solid var(--color-on-primary); transform: translateY(-1px) rotate(-45deg); }
.option span { font-size: var(--text-base); line-height: 1.4; }
.other-input { margin-top: var(--space-2); }
.field input[type='text'], .field input[type='email'], .other-input input { width: 100%; min-height: 48px; padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); }
.field input:focus, .other-input input:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; border-color: var(--color-primary); }
.nav-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); margin-top: var(--space-8); }
.form-error { color: var(--color-error); font-size: var(--text-sm); margin-top: var(--space-4); }
.form-error:empty { display: none; }
.step.enter { animation: stepIn 360ms var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.done h3 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 500; margin-bottom: var(--space-3); }
.done p { color: var(--color-text-muted); }
.followup { margin-top: var(--space-8); padding-top: var(--space-8); border-top: 1px solid var(--color-border); }
.followup h4 { font-size: var(--text-base); font-weight: 600; margin-bottom: var(--space-2); }
.followup > p { font-size: var(--text-sm); margin-bottom: var(--space-6); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-top: var(--space-5); }
.field { display: grid; gap: var(--space-2); }
.field label { font-size: var(--text-sm); font-weight: 500; }
.field .opt { color: var(--color-text-muted); font-weight: 400; }
.field-full { grid-column: 1 / -1; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Results */
.results-view { padding-block: clamp(var(--space-10), 6vw, var(--space-20)); min-height: 70vh; }
.key-form { display: flex; gap: var(--space-3); flex-wrap: wrap; max-width: 520px; }
.key-form input { flex: 1 1 220px; min-height: 48px; padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); }
.kpis { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-8); }
.kpi { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-4) var(--space-6); flex: 1 1 140px; max-width: 220px; }
.kpi b { display: block; font-size: var(--text-xl); font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi span { font-size: var(--text-xs); color: var(--color-text-muted); }
.export-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-10); }
.result-q { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-6); margin-bottom: var(--space-4); }
.result-q h3 { font-size: var(--text-base); font-weight: 600; margin-bottom: var(--space-4); }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 5.5rem; gap: var(--space-3); align-items: center; font-size: var(--text-sm); padding-block: var(--space-1); }
.bar { height: 8px; background: var(--color-surface-2); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--color-primary); border-radius: 4px; }
.bar-n { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
.other-list { margin-top: var(--space-4); font-size: var(--text-sm); color: var(--color-text-muted); padding-left: var(--space-5); }
.muted { color: var(--color-text-muted); font-size: var(--text-sm); }

/* Footer */
.site-footer { border-top: 1px solid var(--color-border); padding-block: var(--space-10); }
.footer-inner { display: grid; gap: var(--space-2); font-size: var(--text-xs); color: var(--color-text-muted); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { aspect-ratio: 16 / 10; order: -1; }
  .hero-figure img { object-position: 50% 78%; }
  .about-grid { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr auto; }
  .bar-row .bar { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 480px) {
  .header-inner .btn-small { padding-inline: var(--space-3); }
  .nav-row .btn { flex: 1; }
}

.footer-link { color: var(--color-text-muted); text-underline-offset: 3px; margin-left: var(--space-2); }
.footer-link:hover { color: var(--color-primary); }
