:root {
  --ink: #18312b;
  --muted: #52645f;
  --forest: #163f35;
  --forest-dark: #0d2d26;
  --teal: #147461;
  --teal-pale: #e6f3ef;
  --wattle: #f2c84b;
  --cream: #f7f4eb;
  --paper: #fffefb;
  --line: #cbd6d1;
  --error: #a72b2b;
  --error-pale: #fff0ee;
  --success: #137056;
  --shadow: 0 10px 30px rgba(19, 54, 45, 0.1);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { min-width: 320px; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

button, input { font: inherit; }

button { color: inherit; }

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.65rem 1rem;
  color: white;
  background: var(--forest-dark);
  border-radius: 7px;
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

:focus-visible {
  outline: 3px solid #136ee8;
  outline-offset: 3px;
}

.site-header {
  color: white;
  background: var(--forest);
  border-bottom: 4px solid var(--wattle);
}

.header-inner, .page-shell, .footer-inner {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: white;
  text-decoration: none;
  line-height: 1.05;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--forest-dark);
  background: var(--wattle);
  border-radius: 50% 50% 46% 54% / 42% 48% 52% 58%;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand strong { display: block; font-size: 1.12rem; }
.brand small { display: block; margin-top: 0.15rem; font-size: 0.82rem; }

.service-label { color: #d9e8e3; font-size: 0.92rem; }

main { min-height: calc(100vh - 186px); }

.page-shell { padding-block: 2rem 4.5rem; }

.progress { margin-bottom: 3rem; }

.progress ol {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress ol::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: var(--line);
}

.progress li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  color: #687772;
  text-align: center;
  font-size: 0.82rem;
}

.progress li span {
  z-index: 1;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--cream);
  border: 2px solid var(--line);
  border-radius: 50%;
  font-weight: 800;
}

.progress li.is-current { color: var(--forest); }
.progress li.is-current span { color: white; background: var(--forest); border-color: var(--forest); }
.progress li.is-complete { color: var(--teal); }
.progress li.is-complete span { color: white; background: var(--teal); border-color: var(--teal); }
.progress li.is-complete span::after { content: "✓"; }
.progress li.is-complete span { font-size: 0; }
.progress li.is-complete span::after { font-size: 1rem; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -0.025em; }
h1 { max-width: 760px; margin-bottom: 1rem; font-size: clamp(2rem, 4.4vw, 3.35rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }

.eyebrow, .step-kicker {
  margin-bottom: 0.6rem;
  color: var(--teal);
  font-size: 0.79rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.lede { max-width: 700px; color: var(--muted); font-size: 1.18rem; }
.lede.compact { margin-bottom: 2.25rem; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}

.info-panel {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1.6rem 1.35rem;
  background: var(--teal-pale);
  border-left: 5px solid var(--teal);
  border-radius: 4px var(--radius) var(--radius) 4px;
}

.info-panel::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  right: -40px;
  top: -43px;
  border: 15px solid rgba(20, 116, 97, 0.08);
  border-radius: 50%;
}

.info-panel h2 { margin-bottom: 0.65rem; font-size: 1.16rem; }
.info-panel p { margin-bottom: 0.45rem; }
.info-panel ul { margin: 0.4rem 0 1rem; padding-left: 1.3rem; }
.info-panel li + li { margin-top: 0.32rem; }
.small-note { color: var(--muted); font-size: 0.88rem; }

.form-card, .review-card, .confirmation-card {
  padding: clamp(1.25rem, 3vw, 2.3rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-intro { margin-bottom: 2rem; padding-bottom: 1.3rem; border-bottom: 1px solid var(--line); }
.section-intro h2 { margin-bottom: 0.55rem; }
.section-intro p:last-child { margin-bottom: 0; color: var(--muted); }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem 2rem; }
.field-wide { grid-column: 1 / -1; }
.field-short { max-width: 220px; }
.field label { display: block; margin-bottom: 0.38rem; font-weight: 750; }

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0.62rem 0.75rem;
  color: var(--ink);
  background: white;
  border: 2px solid #899b95;
  border-radius: 7px;
}

.field input:hover { border-color: var(--forest); }
.field input[aria-invalid="true"] { border-color: var(--error); box-shadow: inset 4px 0 0 var(--error); }
.field-hint, .field-error { margin: 0.3rem 0 0; font-size: 0.88rem; }
.field-hint { color: var(--muted); }
.field-error, .group-error { color: var(--error); font-weight: 700; }
.field-error:not(:empty)::before, .group-error:not(:empty)::before { content: "! "; }

.error-summary {
  margin-bottom: 1.7rem;
  padding: 1.15rem 1.25rem;
  color: #742020;
  background: var(--error-pale);
  border: 2px solid var(--error);
  border-left-width: 7px;
  border-radius: 8px;
}

.error-summary h2, .error-summary h3 { margin-bottom: 0.4rem; }
.error-summary p { margin-bottom: 0.35rem; }
.error-summary ul { margin: 0; padding-left: 1.2rem; }
.error-summary a { color: #742020; font-weight: 750; }

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.actions-end { justify-content: flex-end; }
.actions-start { justify-content: flex-start; }

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 1.15rem;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 780;
  text-decoration: none;
}

.button-primary { color: white; background: var(--forest); border-color: var(--forest); box-shadow: 0 5px 12px rgba(13, 45, 38, 0.18); }
.button-primary:hover { background: var(--forest-dark); border-color: var(--forest-dark); }
.button-secondary { color: var(--forest); background: white; border-color: var(--forest); }
.button-secondary:hover { background: var(--teal-pale); }
.button-quiet { color: var(--forest); background: transparent; border-color: transparent; text-decoration: underline; text-underline-offset: 0.2em; }
.button-quiet:hover { background: rgba(20, 116, 97, 0.07); }
.button-danger { color: white; background: var(--error); border-color: var(--error); }
.button-danger:hover { background: #7f2020; border-color: #7f2020; }
.button:disabled { color: #68736f; background: #e2e6e4; border-color: #d1d7d4; box-shadow: none; cursor: not-allowed; }

.choice-fieldset { min-width: 0; margin: 0 0 2.6rem; padding: 0; border: 0; }
.choice-fieldset legend { margin: 0 0 0.4rem; padding: 0; font-size: 1.45rem; font-weight: 780; line-height: 1.2; letter-spacing: -0.025em; }
.group-hint { margin-bottom: 0.55rem; color: var(--muted); }
.group-error { min-height: 1.55em; margin-bottom: 0.65rem; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.choice-card {
  position: relative;
  min-width: 0;
  min-height: 138px;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.25rem 2.8rem 1.2rem 1.2rem;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 4px 16px rgba(19, 54, 45, 0.05);
  cursor: pointer;
}

.choice-card:hover { border-color: #7b9a90; }
.choice-card:has(input:checked) { background: var(--teal-pale); border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.choice-card:has(input:focus-visible) { outline: 3px solid #136ee8; outline-offset: 3px; }

.choice-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.choice-copy { min-width: 0; display: block; }
.choice-copy strong, .choice-copy small { display: block; }
.choice-copy strong { margin-bottom: 0.45rem; font-size: 1.08rem; }
.choice-copy small { color: var(--muted); font-size: 0.9rem; line-height: 1.45; }

.choice-check {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: transparent;
  background: white;
  border: 2px solid #899b95;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 900;
}

.choice-card input:checked ~ .choice-check { color: white; background: var(--teal); border-color: var(--teal); }
.choice-card.is-error { border-color: var(--error); }

.window-section { padding-top: 0.2rem; border-top: 1px solid var(--line); }
.window-section > * { margin-top: 2.5rem; }

.availability-panel, .load-error {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.4rem;
  border-radius: 10px;
}

.availability-panel { background: var(--teal-pale); border: 1px solid #9dc5b9; }
.availability-panel p, .load-error p { margin: 0.25rem 0 0; color: var(--muted); }
.spinner { width: 25px; height: 25px; flex: 0 0 auto; border: 3px solid #aacdc3; border-top-color: var(--teal); border-radius: 50%; animation: spin 0.85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .spinner { animation: none; border-top-color: #aacdc3; } }

.load-error { background: var(--error-pale); border: 2px solid var(--error); }
.load-error h2 { margin-bottom: 0.4rem; font-size: 1.25rem; }
.load-error .button { margin-top: 1rem; }
.status-symbol { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; color: white; background: var(--error); border-radius: 50%; font-weight: 900; }

.window-card { align-items: center; }
.date-block { width: 54px; flex: 0 0 54px; padding: 0.35rem 0; text-align: center; color: var(--forest); background: #edf1ee; border-radius: 7px; line-height: 1; }
.date-block strong, .date-block small { display: block; }
.date-block strong { font-size: 1.35rem; }
.date-block small { margin-top: 0.25rem; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; }

.review-stack { display: grid; gap: 1.25rem; }
.review-card-header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.review-card-header h2 { margin: 0; }
.text-button { min-height: 34px; padding: 0.2rem; color: var(--teal); background: transparent; border: 0; cursor: pointer; font-weight: 780; text-decoration: underline; text-underline-offset: 0.2em; }

.summary-list { margin: 0; }
.summary-list div { display: grid; grid-template-columns: minmax(145px, 0.38fr) 1fr; gap: 1.25rem; padding: 0.9rem 0; border-bottom: 1px solid #e2e8e5; }
.summary-list div:last-child { padding-bottom: 0; border: 0; }
.summary-list dt { color: var(--muted); font-size: 0.9rem; font-weight: 700; }
.summary-list dd { min-width: 0; margin: 0; font-weight: 700; overflow-wrap: anywhere; }

.notice { margin-top: 1.25rem; padding: 1.1rem 1.25rem; background: #fff7d9; border-left: 5px solid #d4a91c; border-radius: 4px 9px 9px 4px; }
.notice strong { display: block; margin-bottom: 0.15rem; }
.notice p { margin: 0; color: var(--muted); }

.confirmation { max-width: 850px; margin-inline: auto; }
.success-banner { padding: clamp(1.4rem, 4vw, 2.4rem); color: white; background: var(--forest); border-radius: var(--radius) var(--radius) 0 0; text-align: center; }
.success-banner .step-kicker { color: #a9decf; }
.success-banner h1 { margin-inline: auto; font-size: clamp(2rem, 4vw, 2.75rem); }
.success-banner p:last-child { max-width: 600px; margin: 0 auto; color: #dce9e5; }
.success-symbol { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 1rem; color: var(--forest); background: var(--wattle); border-radius: 50%; font-size: 1.6rem; font-weight: 900; }

.reference-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem clamp(1.25rem, 4vw, 2.4rem); color: var(--forest); background: #e5f2ee; border: 1px solid #b5d0c8; border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
.reference-card span { font-weight: 700; }
.reference-card strong { font-size: clamp(1.3rem, 4vw, 1.75rem); letter-spacing: 0.05em; }
.confirmation-card { margin-top: 1.5rem; }
.confirmation-card h2 { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.danger-trigger { border-color: var(--error); color: var(--error); }
.danger-trigger:hover { background: var(--error-pale); }

footer { color: #dce9e5; background: var(--forest-dark); }
.footer-inner { min-height: 98px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: 0.88rem; }

dialog { width: min(520px, calc(100% - 32px)); padding: 0; color: var(--ink); background: var(--paper); border: 0; border-radius: var(--radius); box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35); }
dialog::backdrop { background: rgba(7, 25, 21, 0.72); }
.dialog-card { padding: clamp(1.4rem, 5vw, 2.2rem); }
.dialog-symbol { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 1rem; color: var(--error); background: var(--error-pale); border-radius: 50%; font-size: 1.3rem; font-weight: 800; }
.dialog-card h2 { margin-bottom: 0.6rem; }
.dialog-card p { color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 0.7rem; margin-top: 1.5rem; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .choice-grid { grid-template-columns: 1fr; }
  .choice-card { min-height: 112px; }
}

@media (max-width: 600px) {
  .header-inner, .page-shell, .footer-inner { width: min(100% - 28px, 1120px); }
  .header-inner { min-height: 72px; }
  .service-label { display: none; }
  .page-shell { padding-block: 1.35rem 3rem; }
  .progress { margin-bottom: 2.2rem; }
  .progress li strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .progress li { gap: 0; }
  .progress ol::before { left: 12%; right: 12%; }
  h1 { font-size: 2rem; }
  .lede { font-size: 1.05rem; }
  .field-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .field-wide { grid-column: auto; }
  .field-short { max-width: none; }
  .form-card { margin-inline: -2px; padding: 1.1rem; }
  .actions { align-items: stretch; flex-direction: column-reverse; }
  .actions .button { width: 100%; }
  .actions-end, .actions-start { flex-direction: column; }
  .choice-card { min-height: 116px; }
  .summary-list div { grid-template-columns: 1fr; gap: 0.25rem; }
  .review-card-header { align-items: center; }
  .reference-card { align-items: flex-start; flex-direction: column; gap: 0.25rem; }
  .footer-inner { min-height: 112px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 0.25rem; }
  .dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
}
