:root {
  --primary: #98beda;
  --primary-dark: #52748d;
  --secondary: #648094;
  --ink: #172733;
  --muted: #526674;
  --line: #d8e2e8;
  --surface: #ffffff;
  --wash: #f3f7f9;
  --success: #246b51;
  --error: #a12d2d;
  --shadow: 0 16px 50px rgba(49, 77, 96, 0.1);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #f7fafc 0, #fff 40%);
  font-family: Aptos, Arial, sans-serif;
  line-height: 1.55;
}
button, input, select { font: inherit; }
a { color: var(--primary-dark); text-underline-offset: 3px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 20; padding: .65rem 1rem; background: var(--ink); color: #fff; }
.skip-link:focus { top: 1rem; }

.site-header, .site-footer {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header { min-height: 78px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; }
.brand-logo { display: block; width: 48px; height: 48px; object-fit: contain; }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy span { color: var(--muted); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.header-label { color: var(--muted); font-size: .88rem; }

.app-shell { width: min(900px, calc(100% - 2rem)); min-height: calc(100vh - 170px); margin: 0 auto; padding: clamp(2rem, 6vw, 5.5rem) 0; outline: none; }
.panel { animation: reveal .35s ease-out; }
.eyebrow { margin: 0 0 .9rem; color: var(--primary-dark); font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 790px; margin-bottom: 1.3rem; font-size: clamp(2.4rem, 8vw, 5.25rem); line-height: .98; letter-spacing: -.055em; }
h2 { max-width: 760px; margin-bottom: 2rem; font-size: clamp(1.75rem, 4vw, 3rem); line-height: 1.12; letter-spacing: -.035em; }
h3 { line-height: 1.2; }
.lead { max-width: 680px; margin-bottom: 2rem; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.28rem); }
.benefits { display: grid; gap: .8rem; margin: 2.2rem 0; padding: 0; list-style: none; }
.benefits li { display: flex; gap: .8rem; align-items: center; }
.benefits li::before { content: ""; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--secondary); }
.start-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; align-items: center; }
.duration { color: var(--muted); font-size: .92rem; }

.button { min-height: 50px; padding: .75rem 1.25rem; border: 1px solid transparent; border-radius: 999px; cursor: pointer; font-weight: 750; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:focus-visible, .answer-card:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #254e6a; outline-offset: 3px; }
.button-primary { color: #102431; background: var(--primary); box-shadow: 0 8px 22px rgba(82, 116, 141, .22); }
.button-secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.button:disabled { cursor: not-allowed; opacity: .45; }

.progress-wrap { position: sticky; top: 0; z-index: 5; margin: -1rem 0 2.5rem; padding: 1rem 0 .8rem; background: rgba(249, 251, 252, .95); backdrop-filter: blur(10px); }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: .55rem; color: var(--muted); font-size: .86rem; font-weight: 700; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #dfe8ed; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--secondary); transition: width .3s ease; }
.question-hint { margin: -1.25rem 0 1.5rem; color: var(--muted); }
.answer-list { display: grid; gap: .75rem; margin: 0 0 2rem; }
.answer-card { width: 100%; min-height: 67px; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: rgba(255,255,255,.88); text-align: left; cursor: pointer; box-shadow: 0 3px 12px rgba(49,77,96,.035); transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.answer-card:hover { border-color: var(--secondary); transform: translateY(-1px); }
.answer-card[aria-pressed="true"] { border-color: var(--secondary); background: #eaf3f8; box-shadow: inset 4px 0 0 var(--secondary); font-weight: 700; }
.answer-card:disabled { opacity: .55; cursor: not-allowed; }
.selection-note { min-height: 1.5rem; color: var(--muted); font-size: .9rem; }
.selection-note.error { color: var(--error); }
.navigation { display: flex; justify-content: space-between; gap: 1rem; padding-top: .5rem; }

.form-grid { display: grid; gap: 1.15rem; }
.field { display: grid; gap: .45rem; }
.field label, fieldset legend { font-weight: 700; }
.field input, .field select { width: 100%; min-height: 52px; padding: .75rem .9rem; border: 1px solid #bdccd5; border-radius: 11px; color: var(--ink); background: #fff; }
.field input[aria-invalid="true"] { border-color: var(--error); }
.company-card, .lead-card, .insight-card { padding: clamp(1.25rem, 4vw, 2.2rem); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
.privacy-copy { margin: 1.2rem 0; color: var(--muted); font-size: .9rem; }
.form-error { min-height: 1.5rem; color: var(--error); font-weight: 700; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.loading { min-height: 50vh; display: grid; place-items: center; text-align: center; }
.loading-mark { width: 54px; height: 54px; margin: 0 auto 1.5rem; border: 4px solid #dce8ef; border-top-color: var(--secondary); border-radius: 50%; animation: spin .8s linear infinite; }
.result-hero { padding-bottom: 2.8rem; border-bottom: 1px solid var(--line); }
.score-badge { display: inline-flex; align-items: baseline; gap: .35rem; margin-bottom: 1.2rem; color: var(--primary-dark); }
.score-badge strong { font-size: 2.2rem; line-height: 1; }
.dimension-section { padding: 2.8rem 0; }
.dimension-list { display: grid; gap: 1.2rem; }
.dimension-label { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .45rem; font-weight: 700; }
.dimension-track { height: 12px; overflow: hidden; border-radius: 999px; background: #e3ebef; }
.dimension-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--secondary), var(--primary)); animation: grow .7s ease-out both; transform-origin: left; }
.insights { display: grid; gap: 1rem; }
.insight-card { box-shadow: none; }
.insight-card.recommendation { border-color: var(--primary); background: #edf5f9; }
.insight-label { color: var(--primary-dark); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.secondary-recommendation { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); }

.site-footer { min-height: 92px; padding-block: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
.site-footer nav { display: flex; gap: 1.2rem; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes grow { from { transform: scaleX(0); } }
@media (min-width: 700px) {
  .form-grid.two-column { grid-template-columns: 1fr 1fr; }
  .insights { grid-template-columns: 1fr 1fr; }
  .insight-card.recommendation { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .brand-copy { display: none; }
  .header-label { font-size: .8rem; }
  .app-shell { padding-top: 2.6rem; }
  .navigation { position: sticky; bottom: 0; margin: 1rem -1rem -1rem; padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(10px); }
  .navigation .button { flex: 1; }
  .site-footer { align-items: flex-start; gap: .6rem; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
