:root {
  color-scheme: light;
  --ink: #173f35;
  --muted: #61736d;
  --line: #dbe4df;
  --paper: #fffdf8;
  --accent: #e97a3b;
  --accent-dark: #c85c21;
  --mint: #e8f3ec;
  font-family: Inter, ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f3f0e8; color: var(--ink); }
.shell { width: min(100%, 660px); margin: 0 auto; padding: 28px 16px 48px; }
.hero { padding: 24px 10px 18px; }
.eyebrow { margin: 0 0 8px; color: var(--accent-dark); font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2.6rem, 12vw, 4.8rem); line-height: .95; letter-spacing: -.055em; }
.hero > p:last-child { max-width: 580px; margin: 18px 0 0; color: var(--muted); font-size: 1.05rem; line-height: 1.55; }
.card { border: 1px solid rgba(23,63,53,.1); border-radius: 24px; background: var(--paper); box-shadow: 0 18px 50px rgba(23,63,53,.08); padding: 24px; }
label, legend { font-weight: 750; }
.optional { color: var(--muted); font-size: .78rem; font-weight: 600; }
input, select, textarea { width: 100%; margin: 8px 0 22px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); padding: 14px; font: inherit; font-size: 16px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(233,122,59,.22); border-color: var(--accent); }
.hint { margin: -15px 0 22px; color: var(--muted); font-size: .86rem; line-height: 1.4; }
fieldset { margin: 2px 0 24px; padding: 0; border: 0; }
legend { margin-bottom: 10px; }
.choice-grid, .segmented { display: grid; gap: 8px; }
.choice-grid { grid-template-columns: 1fr 1fr; }
.segmented { grid-template-columns: repeat(3, 1fr); }
.segmented.two-up { grid-template-columns: repeat(2, 1fr); }
.choice, .segmented label { position: relative; }
.choice input, .segmented input { position: absolute; opacity: 0; pointer-events: none; }
.choice span, .segmented span { display: grid; min-height: 48px; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: white; padding: 9px; text-align: center; font-size: .92rem; }
.choice input:checked + span, .segmented input:checked + span { border-color: var(--ink); background: var(--mint); box-shadow: inset 0 0 0 1px var(--ink); }
button { width: 100%; min-height: 52px; border: 0; border-radius: 14px; background: var(--accent); color: white; padding: 12px 18px; font: inherit; font-weight: 800; cursor: pointer; }
button:hover { background: var(--accent-dark); }
button:disabled { cursor: wait; opacity: .65; }
.secondary { background: var(--ink); }
.text-button { margin-top: 8px; background: transparent; color: var(--ink); text-decoration: underline; }
.message { min-height: 22px; color: #9b2c20; font-weight: 650; }
.success { text-align: center; }
.success-mark { display: grid; width: 58px; height: 58px; margin: 0 auto 16px; place-items: center; border-radius: 50%; background: var(--mint); font-size: 1.8rem; font-weight: 900; }
.success h2 { margin-bottom: 8px; font-size: 1.8rem; }
#save-link { margin: 24px 0 12px; border-radius: 16px; background: var(--mint); padding: 16px; }
#save-link .hint { margin: 10px 0 0; }
footer { padding: 28px 10px 0; color: var(--muted); text-align: center; font-size: .85rem; }
[hidden] { display: none !important; }

@media (max-width: 420px) {
  .shell { padding-inline: 10px; }
  .card { border-radius: 19px; padding: 19px; }
  .choice-grid { grid-template-columns: 1fr; }
}
