:root {
  color-scheme: light;
  --ink: #111317;
  --ink-raised: #1d222a;
  --canvas: #f5f2eb;
  --surface: #fffdf9;
  --line: #ded9cf;
  --muted: #62666d;
  --gold: #a76f17;
  --gold-light: #e4bd64;
  --success: #16764b;
  --danger: #a53e36;
  --focus: #315d92;
  --radius-sm: 10px;
  --radius-md: 14px;
  --shadow: 0 14px 36px rgb(17 19 23 / 8%);
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { background: var(--canvas); }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
textarea { font: inherit; }

button,
input[type="radio"],
input[type="checkbox"],
input[type="file"] { cursor: pointer; }

button:disabled { cursor: wait; opacity: .65; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  padding: 10px 14px;
  color: var(--surface);
  background: var(--ink);
  border-radius: var(--radius-sm);
}

.skip-link:focus { transform: translateY(0); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px clamp(20px, 5vw, 48px);
  color: var(--surface);
  background: var(--ink);
  border-bottom: 1px solid rgb(228 189 100 / 28%);
}

.wordmark {
  display: inline-grid;
  color: inherit;
  text-decoration: none;
  line-height: 1;
}

.wordmark strong {
  color: var(--gold-light);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .24em;
}

.wordmark span {
  margin-top: 5px;
  color: #f8eed6;
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .19em;
}

.topbar__step {
  margin: 0;
  color: #e8e2d8;
  font-size: .8125rem;
  font-weight: 700;
}

.page-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 32px 20px 72px;
}

.intro {
  display: grid;
  gap: 24px;
  margin: 4px auto 32px;
}

.intro__copy { max-width: 41rem; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .13em;
}

h1,
h2,
h3,
p { overflow-wrap: break-word; }

h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.35rem);
  line-height: 1.03;
  letter-spacing: -.04em;
}

.intro__copy > p:last-child {
  max-width: 57ch;
  margin: 18px 0 0;
  color: var(--muted);
}

.project-reference {
  margin: 0;
  overflow: hidden;
  background: var(--ink-raised);
  border-radius: 18px;
}

.project-reference img {
  display: block;
  width: 100%;
  min-height: 190px;
  object-fit: cover;
  background: linear-gradient(135deg, #303841, #0d0f12);
}

.project-reference figcaption {
  padding: 8px 12px;
  color: #ece4d5;
  font-size: .6875rem;
}

.diagnostic-card,
.result {
  max-width: 540px;
  margin: 0 auto;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.progress { margin-bottom: 26px; }

.progress__track {
  height: 4px;
  overflow: hidden;
  background: #e8e2d8;
  border-radius: 999px;
}

.progress__track span {
  display: block;
  width: 16.6667%;
  height: 100%;
  background: var(--gold);
  transition: width 220ms cubic-bezier(.22, 1, .36, 1);
}

.progress p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .8125rem;
}

.form-status,
.form-error { margin: 0 0 16px; }

.form-status { color: var(--muted); font-size: .875rem; }

.form-error {
  padding: 12px;
  color: #681d18;
  background: #f8e6e2;
  border: 1px solid #ddaaa2;
  border-radius: var(--radius-sm);
}

.step { min-width: 0; margin: 0; padding: 0; border: 0; }

.step legend {
  max-width: 26ch;
  padding: 0;
  font-size: clamp(1.38rem, 5vw, 1.75rem);
  font-weight: 750;
  line-height: 1.16;
  letter-spacing: -.025em;
}

.step__hint {
  margin: 10px 0 22px;
  color: var(--muted);
}

.choice-list { display: grid; gap: 10px; }

.choice-card {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.choice-card:has(input:checked) {
  background: #fff8e8;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgb(167 111 23 / 14%);
}

.choice-card:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

.choice-card input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
}

.choice-card__mark {
  width: 20px;
  height: 20px;
  border: 1.5px solid #73777f;
  border-radius: 50%;
}

.choice-card:has(input:checked) .choice-card__mark {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 5px #fff8e8, inset 0 0 0 10px var(--gold);
}

.choice-card strong { display: block; font-size: 1rem; }
.choice-card small { display: block; margin-top: 2px; color: var(--muted); font-size: .875rem; }
.choice-list--compact .choice-card { min-height: 58px; }

.field-stack { display: grid; gap: 7px; margin-top: 18px; }
.field-stack + .field-stack { margin-top: 20px; }

label { font-size: .875rem; font-weight: 700; }

input:not([type="radio"]):not([type="checkbox"]),
textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bcb7af;
  border-radius: var(--radius-sm);
}

textarea { min-height: 112px; resize: vertical; }

input::placeholder,
textarea::placeholder { color: #777a7e; opacity: 1; }

input[aria-invalid="true"],
textarea[aria-invalid="true"] { border-color: var(--danger); }

.input-with-suffix { position: relative; }
.input-with-suffix input { padding-right: 3.3rem; }
.input-with-suffix span { position: absolute; top: 12px; right: 14px; color: var(--muted); pointer-events: none; }

.optional { color: var(--muted); font-weight: 500; }
.field-help,
.field-error { margin: 0; font-size: .8125rem; }
.field-help { color: var(--muted); }
.field-error { min-height: 1.2em; color: #8c241d; font-weight: 650; }

.turnstile-widget { min-height: 65px; margin-top: 20px; }

input[type="file"] { padding: 9px; font-size: .875rem; }
input[type="file"]::file-selector-button {
  min-height: 32px;
  margin-right: 10px;
  padding: 5px 9px;
  color: var(--ink);
  font-weight: 700;
  background: #eee9df;
  border: 0;
  border-radius: 6px;
}

.file-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .8125rem; }

.consents { display: grid; gap: 11px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }

.checkbox-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-weight: 500;
}

.checkbox-row input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--ink);
}

.privacy-note { margin: 0; color: var(--muted); font-size: .8125rem; }

.actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 750;
  text-align: center;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button--primary { color: #fffdf9; background: var(--ink); }
.button--primary:hover:not(:disabled) { background: #272d35; }
.button--secondary { color: var(--ink); background: #fff; border-color: #aaa69e; }
.button--secondary:hover:not(:disabled) { background: #f1ede5; }

.result { margin-top: 28px; }
.result h2 { margin: 0; font-size: clamp(1.55rem, 6vw, 2.25rem); line-height: 1.08; letter-spacing: -.03em; }
.result > p:not(.eyebrow) { color: var(--muted); }
.result__disclaimer { margin: 20px 0; font-size: .875rem; }

.quote-result { margin: 24px 0 0; padding: 18px; background: var(--ink); border-radius: var(--radius-md); color: #f9f4eb; }
.quote-result__label { margin: 0; color: var(--gold-light); font-size: .6875rem; font-weight: 800; letter-spacing: .12em; }
.quote-result__range { margin: 9px 0 3px; font-size: clamp(1.65rem, 8vw, 2.45rem); font-weight: 800; line-height: 1.05; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.quote-result__validity { margin: 0; color: #d7d0c5; font-size: .8125rem; }
.quote-result__notes { display: grid; gap: 18px; margin-top: 20px; padding-top: 18px; border-top: 1px solid rgb(255 253 249 / 18%); }
.quote-result h3 { margin: 0 0 6px; color: var(--gold-light); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.quote-result ul { margin: 0; padding-left: 18px; color: #eae3d8; font-size: .8125rem; }

.noscript { margin: 20px; padding: 16px; color: #681d18; background: #f8e6e2; border: 1px solid #ddaaa2; border-radius: var(--radius-sm); }

@media (min-width: 640px) {
  .page-shell { padding: 52px 32px 96px; }
  .intro { grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr); align-items: end; gap: 40px; max-width: 960px; }
  .project-reference img { min-height: 245px; }
  .diagnostic-card, .result { padding: 32px; }
  .actions { grid-template-columns: minmax(140px, .7fr) minmax(0, 1fr); }
  .actions [data-next], .actions [data-submit] { grid-column: 2; }
  .actions [data-back] { grid-column: 1; grid-row: 1; }
}

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