:root {
  --orange: #db6a13;
  --bg: #fff6db;
  --paper: #ffffff;
  --ink: #2b2140;
  --muted: #6f6a78;
  --line: #f0e3bd;
  --teal: #489042;       /* primary action: site green (as on fee-payment page) */
  --teal-2: #3a7a35;
  --teal-soft: #e6f2e4;
  --sun: #ffaa00;
  --sun-soft: #fff0c2;
  --coral: #c0392b;
  --brand-green: #489042;
  --purple: #3a2766;
  --green: #41823b;
  --green-soft: #e6f2e4;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(58, 39, 102, .05), 0 8px 28px rgba(58, 39, 102, .07);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  }
a { color: var(--teal); }
h1, h2, legend { font-family: 'Instrument Serif', serif; font-weight: 400; }

/* ---------- top bar ---------- */
.topbar {
  max-width: 1120px; margin: 0 auto; padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font: 400 26px/1 'Instrument Serif', serif; }
.brand img { height: 48px; width: auto; display: block; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--sun); color: var(--ink); font-size: 22px; transform: rotate(-6deg); }
.secure-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
  color: var(--green); background: var(--green-soft); padding: 6px 12px; border-radius: 99px; }
.secure-pill svg { width: 14px; height: 14px; fill: currentColor; }

/* ---------- hero ---------- */
.hero { max-width: 1120px; margin: 0 auto; padding: 18px 20px 26px; }
.eyebrow { display: inline-block; margin: 0 0 8px; font-weight: 800; font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--coral); }
.hero h1 { margin: 0 0 8px; font-size: clamp(30px, 5vw, 46px); line-height: 1.05; letter-spacing: -.01em; }
.hero p { margin: 0; max-width: 620px; color: var(--muted); font-size: 17px; }

.alert { max-width: 1080px; margin: 0 auto 18px; padding: 14px 18px; border-radius: 12px;
  background: #fdeae5; color: #8a2d18; font-weight: 600; border: 1px solid #f4c8bb; }

/* ---------- layout ---------- */
.layout { max-width: 1120px; margin: 0 auto; padding: 0 20px 40px;
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.steps { display: grid; gap: 18px; min-width: 0; }
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
fieldset.card { margin: 0; padding: 22px; min-width: 0; }
legend { float: left; width: 100%; padding: 0; margin: 0 0 16px; font-size: 22px; font-weight: 700;
  display: flex; align-items: center; gap: 10px; }
legend + * { clear: both; }
.num { width: 30px; height: 30px; border-radius: 50%; background: var(--teal); color: #fff;
  display: grid; place-items: center; font: 800 15px/1 'Outfit', sans-serif; flex: none; }

/* class cards */
.class-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.class-opt { position: relative; cursor: pointer; }
.class-opt input { position: absolute; opacity: 0; inset: 0; }
.class-body { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 14px;
  border: 2px solid var(--line); border-radius: 14px; transition: .15s ease; background: #fffdf8; }
.class-body svg { width: 30px; height: 30px; fill: none; stroke: var(--teal); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.class-name { font-weight: 800; line-height: 1.2; }
.class-age { font-size: 12.5px; line-height: 1.3; color: #6b6b6b; font-weight: 500; }
.class-from { font-size: 13px; color: var(--muted); margin-top: auto; }
.class-opt:hover .class-body { border-color: #cfc4ad; }
.class-opt input:checked + .class-body { border-color: var(--teal); background: var(--teal-soft);
  box-shadow: 0 0 0 3px rgba(72, 144, 66, .18); }
.class-opt input:focus-visible + .class-body { outline: 3px solid var(--sun); outline-offset: 2px; }

.row-label { font-weight: 800; font-size: 14px; margin: 18px 0 8px; color: var(--ink); }
.row-label:first-of-type { margin-top: 0; }

/* segmented */
.segmented { display: grid; grid-template-columns: 1fr 1fr; background: #f3eee3; padding: 4px; border-radius: 12px; gap: 4px; }
.segmented.three { grid-template-columns: repeat(3, 1fr); }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; }
.segmented span { display: block; text-align: center; padding: 10px 8px; border-radius: 9px; font-weight: 700; color: var(--muted); transition: .15s; }
.segmented input:checked + span { background: #fff; color: var(--teal); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.segmented input:focus-visible + span { outline: 3px solid var(--sun); }

/* toggle */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fffdf8; }
.toggle-row small { display: block; color: var(--muted); font-size: 13px; }
.switch { appearance: none; -webkit-appearance: none; width: 46px; height: 26px; border-radius: 99px; background: #d9d1c0;
  position: relative; cursor: pointer; transition: .2s; flex: none; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch:checked { background: var(--teal); }
.switch:checked::after { left: 23px; }
.switch:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.hint { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--sun-soft); font-size: 14px; font-weight: 600; color: #7a5410; }

/* fields */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field > span { font-weight: 700; font-size: 14px; }
.field input, .field select, .prefix {
  width: 100%; font: inherit; color: var(--ink); padding: 11px 13px; border: 1.5px solid var(--line);
  border-radius: 11px; background: #fffdf8; transition: .15s; min-width: 0;
}
.prefix { display: flex; align-items: center; gap: 8px; padding: 0 0 0 13px; }
.prefix b { color: var(--muted); font-weight: 700; }
.prefix input { border: 0; padding: 11px 13px 11px 0; background: transparent; }
.field input:focus, .field select:focus, .prefix:focus-within { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(72, 144, 66, .18); }
.prefix input:focus { box-shadow: none; }
.invalid, .prefix:has(.invalid) { border-color: var(--coral) !important; }
.field-error { font-style: normal; font-size: 13px; color: var(--coral); font-weight: 700; min-height: 0; margin: 0; }
.field-error:empty { display: none; }

/* summary */
.summary { position: sticky; top: 18px; padding: 22px; }
.summary h2 { margin: 0; font-size: 22px; }
.plan-name { margin: 2px 0 14px; color: var(--muted); font-weight: 600; font-size: 14px; min-height: 42px; }
.lines { margin: 0; display: grid; gap: 8px; }
.lines div { display: flex; justify-content: space-between; gap: 12px; }
.lines dt { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.lines dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.lines .save dd { color: var(--green); }
.badge { background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 99px; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0 4px; padding-top: 14px; border-top: 2px dashed var(--line); }
.total span { font-weight: 800; }
.total strong { font: 400 38px/1 'Instrument Serif', serif; color: var(--teal); font-variant-numeric: tabular-nums; }
.you-save { margin: 0 0 6px; text-align: right; font-size: 13px; font-weight: 700; color: var(--green); }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 16px 0 4px; cursor: pointer; }
.agree input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal); flex: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--teal); color: #fff; font: 500 16px/1 'Outfit', sans-serif; padding: 14px 20px; border-radius: 4px;
  text-decoration: none; transition: .15s; }
.btn:hover { background: var(--teal-2); }
.btn.ghost { background: transparent; color: var(--teal); box-shadow: inset 0 0 0 2px var(--teal); }
.btn.ghost:hover { background: var(--teal-soft); }
.btn.pay { width: 100%; margin-top: 14px; padding: 17px 20px; font-size: 17px; }
.btn.pay svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.btn:disabled { background: #b9c7c4; cursor: not-allowed; }
.btn.busy { position: relative; color: transparent; }
.btn.busy::after { content: ''; position: absolute; width: 20px; height: 20px; border: 3px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.form-error { margin: 12px 0 0; padding: 10px 12px; background: #fdeae5; color: #8a2d18; border-radius: 10px; font-size: 14px; font-weight: 600; }
.trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 16px 0 8px; }
.trust span { font-size: 12px; font-weight: 800; color: var(--muted); border: 1px solid var(--line); padding: 4px 9px; border-radius: 7px; background: #fffdf8; }
.small { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.center { text-align: center; }

.foot { max-width: 1120px; margin: 0 auto; padding: 10px 20px 40px; text-align: center; font-size: 13px; color: var(--muted); }

.overlay { position: fixed; inset: 0; background: rgba(246, 241, 231, .92); display: grid; place-content: center;
  justify-items: center; gap: 14px; z-index: 50; font-weight: 800; }
.overlay[hidden] { display: none; }
.spinner { width: 44px; height: 44px; border: 4px solid var(--teal-soft); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- thank you ---------- */
.thanks { max-width: 680px; margin: 0 auto; padding: 10px 20px 50px; }
.thanks-card { background: var(--paper); border-radius: 24px; box-shadow: var(--shadow); border: 1px solid var(--line);
  padding: 36px 32px; text-align: center; }
.tick svg { width: 76px; height: 76px; }
.tick circle { fill: var(--green-soft); stroke: var(--green); stroke-width: 2.5; }
.tick path { fill: none; stroke: var(--green); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .2s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .tick path { animation: none; stroke-dashoffset: 0; } }
.thanks h1 { margin: 10px 0 6px; font-size: clamp(30px, 6vw, 40px); line-height: 1.1; }
.lead { color: var(--muted); font-size: 17px; margin: 0 auto 22px; max-width: 520px; }
.lead strong { color: var(--ink); }
.thanks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; text-align: left; margin: 0 0 18px; }
.thanks-grid div { background: #fffdf8; padding: 12px 14px; min-width: 0; }
.thanks-grid .wide { grid-column: 1 / -1; }
.thanks-grid dt { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.thanks-grid dd { margin: 2px 0 0; font-weight: 800; overflow-wrap: anywhere; }
.mail-note { display: flex; gap: 8px; align-items: center; justify-content: center; background: var(--teal-soft); color: var(--teal);
  padding: 10px 14px; border-radius: 12px; font-size: 14px; margin: 0 0 20px; }
.mail-note svg { width: 18px; height: 18px; flex: none; }
.thanks-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }

/* ---------- receipt page ---------- */
.receipt-page { padding: 20px 16px 40px; background: #efe9dc; }
.receipt-actions { max-width: 720px; margin: 0 auto 14px; display: flex; gap: 8px; align-items: center; }
.receipt-actions .spacer { flex: 1; }
.receipt-actions .btn { padding: 10px 16px; font-size: 14px; }
@media print {
  .no-print { display: none !important; }
  .receipt-page { background: #fff; padding: 0; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .class-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .topbar, .hero, .layout { padding-left: 16px; padding-right: 16px; }
  fieldset.card, .summary { padding: 18px 16px; }
  .fields { grid-template-columns: 1fr; }
  .thanks-card { padding: 28px 18px; }
  .thanks-grid { grid-template-columns: 1fr; }
  .secure-pill { font-size: 12px; }
  .brand { font-size: 19px; }
}

/* ---- main-site branding ---- */
.hero h1 { font-weight: 400; }
.eyebrow { color: var(--orange); }
.hero h1, legend { color: var(--orange); }
.hero p { color: #7e7e7e; }
legend { font-size: 26px !important; }

/* site header / footer */
.site-util { background: var(--orange); display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 4px 18px; padding: 6px 24px; }
.site-util a { color: #fff; font-size: 13px; text-decoration: none; font-weight: 500; }
.site-util a:hover, .site-util a.on { text-decoration: underline; }
.site-head { max-width: 1120px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-left: auto; }
.site-nav a { color: #383838; text-decoration: none; font-weight: 500; font-size: 15px; }
.site-nav a:hover { color: var(--orange); }
.site-head .secure-pill { margin-left: 0; }
.site-foot { background: var(--orange); color: #fff; margin-top: 40px; padding: 36px 24px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.site-foot > div, .site-foot > nav { max-width: 1120px; }
.site-foot img { height: 64px; width: auto; display: block; margin-bottom: 10px; }
.site-foot p { margin: 0 0 8px; font-size: 14px; }
.site-foot small { opacity: .9; font-size: 12px; }
.site-foot nav { display: flex; flex-direction: column; gap: 8px; }
.site-foot a { color: #fff; font-size: 14px; }
.btn { border-radius: 4px; }

/* embedded inside the WordPress page */
body.embed { background: transparent; }
body.embed .hero { padding-top: 6px; }

.pay-opts { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .pay-opts { grid-template-columns: 1fr; } }
.pay-opt { cursor: pointer; }
.pay-opt input { position: absolute; opacity: 0; }
.pay-opt span { display: block; border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: #fff; height: 100%; }
.pay-opt strong { display: block; }
.pay-opt small { display: block; color: var(--muted); margin-top: 2px; font-size: 13px; line-height: 1.4; }
.pay-opt input:checked + span { border-color: var(--teal); background: var(--teal-soft); }
.pay-opt input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
#rowBalance dd { font-weight: 700; }

/* make the hidden attribute win over component display rules */
[hidden] { display: none !important; }
#rowBalance dt small { display: block; font-size: 12px; color: var(--muted); }
.lines #rowBalance dt { display: block; }

/* ---------- accordion steps (only when JS is running; otherwise all steps stay open) ---------- */
.step-sum, .step-edit, .step-next { display: none; }
.js .step-next { display: inline-flex; margin-top: 18px; }
.js .step-body { display: none; }
.js .step.open .step-body { display: block; }
.js .step legend { cursor: pointer; margin-bottom: 0; }
.js .step.open legend { margin-bottom: 16px; cursor: default; }
.js .step.locked legend { cursor: default; opacity: .55; }
.js .step.done:not(.open) .num { background: var(--green); font-size: 0; }
.js .step.done:not(.open) .num::before { content: '✓'; font-size: 16px; }
.js .step.done:not(.open) .step-sum { display: block; margin-left: auto; max-width: 55%; text-align: right; font: 500 14px/1.3 'Outfit', sans-serif;
  color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.js .step.done:not(.open) .step-edit { display: inline; font: 700 13px 'Outfit', sans-serif; color: var(--teal); text-decoration: underline; }
.lead-note { margin: 14px 0 0; color: var(--muted); }
@media (max-width: 600px) {
  .js .step.done:not(.open) .step-sum { display: none; }
  .js .step.done:not(.open) .step-edit { margin-left: auto; }
}

.class-opt.unavailable { cursor: not-allowed; }
.class-opt.unavailable .class-body { opacity: .6; border-style: dashed; }
.class-note { font-size: 12.5px; line-height: 1.3; color: var(--coral); font-weight: 700; }
.class-start { font-size: 13.5px; line-height: 1.3; color: var(--teal); font-weight: 700; }

/* batch timings, service prices, daycare toggle */
.segmented span small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 500; line-height: 1.3; }
.segmented span small:empty { display: none; }
.segmented .price { font-weight: 700; color: var(--ink); }
.svc-right { display: flex; align-items: center; gap: 14px; }
.svc-price { font-size: 15px; white-space: nowrap; }
.svc-price:empty { display: none; }
.daycare-opts { margin-top: 10px; }
.svc-note { margin: 12px 0 0; color: var(--muted); }

/* ---------- class cards: one tidy row per class ---------- */
.class-grid { grid-template-columns: 1fr; gap: 10px; }
.class-body { flex-direction: row; align-items: center; gap: 14px; height: auto; padding: 14px 16px; }
.class-ico { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--teal-soft); display: grid; place-items: center; }
.class-body svg { width: 26px; height: 26px; }
.class-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.class-name { font-size: 17px; }
.class-age { font-size: 13px; color: var(--muted); }
.class-start { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; padding: 6px 12px;
  border-radius: 10px; background: #fff; border: 1px solid var(--line); line-height: 1.25; }
.class-start small { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.class-start b { font-size: 14px; color: var(--teal); font-weight: 800; white-space: nowrap; }
.class-radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cfc4ad; background: #fff; transition: .15s; }
.class-opt input:checked + .class-body .class-radio { border-color: var(--teal); background: radial-gradient(var(--teal) 0 46%, #fff 50%); }
.class-opt input:checked + .class-body .class-ico { background: #fff; }
.class-opt.unavailable .class-radio { visibility: hidden; }
@media (max-width: 600px) {
  .class-grid { grid-template-columns: 1fr; }
  .class-body { flex-wrap: wrap; row-gap: 10px; }
  .class-info { flex-basis: calc(100% - 100px); }
  .class-start { order: 3; flex-direction: row; align-items: baseline; gap: 8px; margin-left: 60px; }
  .class-radio { order: 2; margin-left: auto; }
}

.svc-price { text-align: right; line-height: 1.2; }
.svc-price small, .segmented .price small { display: block; margin: 0; font-size: 12px; font-weight: 500; color: var(--muted); }

.class-age sup { font-size: .7em; line-height: 0; vertical-align: super; }

.class-age { color: var(--ink); }
.class-age strong { font-weight: 800; color: #8a4b08; background: var(--sun-soft); padding: 1px 6px; border-radius: 6px; }

/* summary: picked parts */
.picks { margin: 12px 0 14px; display: grid; gap: 6px; font-size: 14px; }
.picks div { display: flex; justify-content: space-between; gap: 12px; }
.picks dt { color: var(--muted); }
.picks dd { margin: 0; font-weight: 700; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.picks .pick-head { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.picks .pick-head:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.picks .pick-head dt { font-weight: 800; color: var(--teal); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.lines .sum-total { padding-top: 8px; border-top: 1px dashed var(--line); }
.lines .sum-total dt { color: var(--ink); font-weight: 700; }
.plan-name { min-height: 0; margin: 6px 0 10px; }

/* sticky summary: keep the layout at least a screen tall so the summary stays in view while steps are collapsed */
@media (min-width: 961px) {
  body:not(.embed) .layout { min-height: calc(100vh - 60px); }
  body.embed .summary { position: relative; top: 0; transition: transform .12s ease-out; }
}
