/* Step-by-step medicine ceremony registration (/register/...).
   Builds on the site theme (theme.css): forest green, ivory, clay (terracotta)
   and sand, with a touch of gold for small decorative accents only. */

.cf {
  --cf-forest: var(--h-forest, #283C32);
  --cf-forest-deep: var(--h-forest-deep, #1F3028);
  --cf-cream: var(--h-ivory, #F4F0E7);
  --cf-cream-deep: var(--h-ivory-deep, #EAE3D4);
  --cf-clay: var(--h-terracotta, #B76F50);
  --cf-clay-ink: var(--h-terracotta-ink, #93553C);
  --cf-sand: var(--h-sand, #D9C9A8);
  --cf-gold: #B8933F;          /* decorative lines and dots only, never text */
  --cf-muted: var(--h-muted, #55645A);
  --cf-error: #A12F23;
  --cf-radius: 20px;
  --cf-radius-sm: 12px;
  --cf-shadow: 0 1px 2px rgba(31, 48, 40, .05), 0 18px 44px rgba(31, 48, 40, .09);
  color: var(--cf-forest);
}

/* ---------- Progress ---------- */
.cf-progress { margin: 0 auto clamp(28px, 4vw, 48px); max-width: 980px; }
.cf-progress__now { display: none; margin: 0 0 10px; font: 600 .8rem/1.3 var(--h-font-body, sans-serif); letter-spacing: .14em; text-transform: uppercase; color: var(--cf-clay-ink); }
.cf-progress__bar { display: none; height: 4px; border-radius: 4px; background: var(--cf-cream-deep); overflow: hidden; }
.cf-progress__bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--cf-forest), var(--cf-gold)); border-radius: 4px; transition: width .4s ease; }
.cf-progress__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); position: relative; }
.cf-progress__list::before { content: ""; position: absolute; top: 17px; left: calc(100% / 14); right: calc(100% / 14); height: 1px; background: var(--cf-sand); }
.cf-progress__item { position: relative; text-align: center; }
.cf-progress__item button, .cf-progress__static { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding: 0 4px; background: none; border: 0; font: inherit; color: inherit; cursor: default; }
.cf-progress__item button { cursor: pointer; border-radius: var(--cf-radius-sm); }
.cf-progress__item button:hover .cf-progress__label { color: var(--cf-forest); text-decoration: underline; }
.cf-progress__dot { position: relative; z-index: 1; width: 35px; height: 35px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font: 600 .9rem/1 var(--h-font-body, sans-serif); background: #fff; border: 1px solid var(--cf-sand); color: var(--cf-muted); transition: background .3s, color .3s, box-shadow .3s; }
.cf-progress__label { font-size: .82rem; line-height: 1.3; color: var(--cf-muted); }
.cf-progress__item.is-done .cf-progress__dot { background: var(--cf-cream); border-color: var(--cf-clay); color: var(--cf-clay-ink); }
.cf-progress__item.is-now .cf-progress__dot { background: var(--cf-forest); border-color: var(--cf-forest); color: var(--cf-cream); box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--cf-gold); }
.cf-progress__item.is-now .cf-progress__label { color: var(--cf-forest); font-weight: 600; }

/* ---------- Layout ---------- */
.cf__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: clamp(24px, 4vw, 56px); align-items: start; max-width: 1080px; margin: 0 auto; }
.cf__main { min-width: 0; }

.cf-card { background: #fff; border: 1px solid var(--cf-cream-deep); border-radius: var(--cf-radius); box-shadow: var(--cf-shadow); padding: clamp(24px, 4.5vw, 52px); }
.cf-card:focus { outline: none; }
.cf-card--narrow { max-width: 760px; margin: 0 auto; }
.cf-card--closed { max-width: 680px; margin: 0 auto; grid-column: 1 / -1; text-align: center; }
.cf-card--closed .actions { justify-content: center; }
.cf-enter { animation: cf-fade .45s ease both; }
@keyframes cf-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Step text ---------- */
.cf-step__count { margin: 0 0 10px; font: 600 .78rem/1.3 var(--h-font-body, sans-serif); letter-spacing: .16em; text-transform: uppercase; color: var(--cf-clay-ink); }
body .cf-card h2, body .cf-done h2 { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.7rem); margin: 0 0 12px; }
body .cf-card h2:focus { outline: none; }
.cf-step__intro { margin: 0 0 clamp(24px, 3vw, 36px); color: var(--cf-muted); max-width: 60ch; }
.cf-step__intro::after { content: ""; display: block; width: 44px; height: 2px; margin-top: 22px; background: var(--cf-gold); border-radius: 2px; }

/* ---------- Fields ---------- */
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.cf-field { margin-bottom: 22px; }
.cf-field label, .cf-fieldset legend { display: block; margin-bottom: 6px; font-weight: 600; font-size: .98rem; color: var(--cf-forest); }
.cf-req { color: var(--cf-clay-ink); }
.cf-opt { font-weight: 400; color: var(--cf-muted); font-size: .9rem; }
.cf-hint { margin: -2px 0 8px; font-size: .9rem; line-height: 1.5; color: var(--cf-muted); }
.cf-field input, .cf-field textarea, .cf-field select {
  width: 100%; min-height: 50px; padding: 12px 16px; font: inherit; font-size: 1rem; color: var(--cf-forest);
  background: #fff; border: 1px solid #C9BB9C; border-radius: var(--cf-radius-sm); transition: border-color .2s, box-shadow .2s; }
.cf-field textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.cf-field input:focus, .cf-field textarea:focus, .cf-field select:focus { outline: none; border-color: var(--cf-forest); box-shadow: 0 0 0 3px rgba(40, 60, 50, .16); }
.cf-field--money input { max-width: 200px; }
.cf-field select { cursor: pointer; }
.cf-error { margin: 6px 0 0; font-size: .9rem; font-weight: 600; color: var(--cf-error); }
.cf-error:empty { display: none; }
.is-invalid input:not([type=checkbox]):not([type=radio]), .is-invalid textarea, .is-invalid select { border-color: var(--cf-error); }
.cf-fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.cf-fieldset legend { padding: 0; margin-bottom: 10px; }
.cf-fieldset--inline { display: flex; flex-wrap: wrap; gap: 10px; }
.cf-fieldset--inline legend { flex-basis: 100%; }
.cf-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Shared focus ring for custom controls */
.cf input[type=checkbox]:focus-visible, .cf input[type=radio]:focus-visible { outline: 3px solid var(--cf-forest); outline-offset: 2px; }
.cf button:focus-visible, .cf a:focus-visible { outline: 3px solid var(--cf-forest); outline-offset: 3px; }

/* Checkbox rows */
.cf-check { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin: 4px 0 14px; border: 1px solid var(--cf-cream-deep); border-radius: var(--cf-radius-sm); background: var(--cf-cream); cursor: pointer; line-height: 1.5; }
.cf-check input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--cf-forest); }
.cf-check strong { display: block; }
.cf-check small { display: block; margin-top: 4px; color: var(--cf-muted); font-size: .9rem; }
.cf-check.is-invalid { border-color: var(--cf-error); }

/* Night choices */
.cf-option { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 10px; border: 1px solid var(--cf-sand); border-radius: var(--cf-radius-sm); background: #fff; cursor: pointer; transition: border-color .2s, background .2s; }
.cf-option:hover { border-color: var(--cf-forest); }
.cf-option input { flex: none; width: 20px; height: 20px; accent-color: var(--cf-forest); }
.cf-option:has(input:checked) { border-color: var(--cf-forest); background: var(--cf-cream); box-shadow: inset 4px 0 0 var(--cf-forest); }
.cf-option__text { flex: 1; display: flex; flex-direction: column; }
.cf-option__text small { color: var(--cf-muted); font-size: .9rem; }
.cf-option__note { font-size: .85rem; font-weight: 600; color: var(--cf-clay-ink); white-space: nowrap; }
.cf-option.is-disabled { opacity: .6; cursor: not-allowed; }
.cf-option.is-disabled:hover { border-color: var(--cf-sand); }

/* People stepper */
.cf-stepper { display: inline-flex; align-items: stretch; border: 1px solid #C9BB9C; border-radius: 999px; overflow: hidden; background: #fff; }
.cf-stepper button { width: 52px; min-height: 50px; border: 0; background: var(--cf-cream); color: var(--cf-forest); font-size: 1.4rem; cursor: pointer; }
.cf-stepper button:hover:not(:disabled) { background: var(--cf-cream-deep); }
.cf-stepper button:disabled { color: #A8A8A0; cursor: not-allowed; }
.cf-field .cf-stepper input { width: 70px; min-height: 50px; border: 0; border-radius: 0; text-align: center; font-size: 1.15rem; font-weight: 600; -moz-appearance: textfield; }
.cf-stepper input::-webkit-outer-spin-button, .cf-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Pills (radio choices) */
.cf-pill { position: relative; cursor: pointer; }
.cf-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cf-pill span { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 20px; border: 1px solid var(--cf-sand); border-radius: 999px; background: #fff; font-size: .95rem; transition: background .2s, border-color .2s, color .2s; }
.cf-pill:hover span { border-color: var(--cf-forest); }
.cf-pill input:checked + span { background: var(--cf-forest); border-color: var(--cf-forest); color: var(--cf-cream); }
.cf-pill input:focus-visible + span { outline: 3px solid var(--cf-forest); outline-offset: 2px; }
.cf-fieldset.is-invalid .cf-pill input:not(:checked) + span { border-color: var(--cf-error); }

/* Add-on cards */
.cf-addon { display: flex; gap: 16px; align-items: flex-start; padding: 22px; margin-bottom: 16px; border: 1px solid var(--cf-sand); border-radius: var(--cf-radius); background: #fff; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.cf-addon:hover { border-color: var(--cf-forest); }
.cf-addon input { flex: none; width: 22px; height: 22px; margin-top: 3px; accent-color: var(--cf-forest); }
.cf-addon:has(input:checked) { border-color: var(--cf-forest); background: var(--cf-cream); box-shadow: 0 0 0 1px var(--cf-forest); }
.cf-addon__body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cf-addon__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; align-items: baseline; }
.cf-addon__top strong { font: 500 1.4rem/1.2 var(--h-font-display, serif); }
.cf-addon__price { font-weight: 700; white-space: nowrap; }
.cf-addon__price small { font-weight: 400; color: var(--cf-muted); }
.cf-addon__text { line-height: 1.6; }
.cf-addon__small { font-size: .9rem; color: var(--cf-muted); }
.cf-addon.is-disabled { opacity: .6; cursor: not-allowed; }

.cf-note { margin: 4px 0 14px; padding: 14px 18px; border-left: 2px solid var(--cf-gold); background: var(--cf-cream); border-radius: 0 var(--cf-radius-sm) var(--cf-radius-sm) 0; font-size: .95rem; }
.cf-note.small { padding: 0; border: 0; background: none; color: var(--cf-muted); font-size: .9rem; }

/* Step buttons */
.cf-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--cf-cream-deep); }
body .cf .btn.cf-next { min-width: 200px; border-radius: 999px; background: var(--cf-forest); border-color: var(--cf-forest); color: var(--cf-cream); }
body .cf .btn.cf-next:hover, body .cf .btn.cf-next:focus-visible { background: var(--cf-forest-deep); border-color: var(--cf-forest-deep); color: #fff; }
body .cf .btn.cf-next:disabled { opacity: .7; cursor: progress; }
.cf-back { min-height: 48px; padding: 10px 6px; background: none; border: 0; font: inherit; font-weight: 600; color: var(--cf-forest); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--cf-gold); }
.cf-back::before { content: "\2190\00a0"; }
.cf-formmsg { margin: 14px 0 0; font-weight: 600; color: var(--cf-error); }
.cf-formmsg:empty { display: none; }
.cf-link { background: none; border: 0; padding: 4px 0; font: inherit; font-size: .9rem; font-weight: 600; color: var(--cf-clay-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Review */
.cf-review { margin: 0 0 24px; border-top: 1px solid var(--cf-cream-deep); }
.cf-review > div { display: grid; grid-template-columns: 120px 1fr auto; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--cf-cream-deep); align-items: start; }
.cf-review dt { font-weight: 600; font-size: .9rem; color: var(--cf-muted); }
.cf-review dd { margin: 0; overflow-wrap: anywhere; }
.cf-pay { margin: 0 0 22px; padding: 22px 24px; border-radius: var(--cf-radius); background: var(--cf-forest); color: var(--cf-cream); }
body .cf-pay h3 { margin: 0 0 12px; color: var(--cf-cream); font-size: 1.5rem; }
.cf-pay ol { margin: 0 0 12px; padding-left: 1.3em; }
.cf-pay li { margin-bottom: 10px; }
.cf-pay li::marker { color: var(--cf-gold); }
.cf-pay li span { display: block; }
.cf-pay li small { display: block; color: #D9D4C6; font-size: .9rem; }
.cf-pay strong { color: #fff; }
.cf-pay .muted { color: #CFCABC; margin: 0; }

/* ---------- Summary card ---------- */
.cf-summary { position: sticky; top: 96px; background: #fff; border: 1px solid var(--cf-cream-deep); border-radius: var(--cf-radius); box-shadow: var(--cf-shadow); overflow: hidden; }
.cf-summary__photo { aspect-ratio: 4 / 3; overflow: hidden; background: var(--cf-cream-deep); }
.cf-summary__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
.cf-summary__body { padding: 22px 24px 24px; }
.cf-summary__eyebrow { margin: 0 0 6px; font: 600 .74rem/1.3 var(--h-font-body, sans-serif); letter-spacing: .16em; text-transform: uppercase; color: var(--cf-clay-ink); }
body .cf-summary__title { margin: 0 0 4px; font-size: 1.75rem; line-height: 1.15; }
.cf-summary__place { margin: 0 0 16px; color: var(--cf-muted); font-size: .95rem; }
.cf-summary__facts { margin: 0 0 14px; display: grid; gap: 8px; font-size: .95rem; }
.cf-summary__facts > div { display: grid; grid-template-columns: 70px 1fr; gap: 8px; }
.cf-summary__facts dt { font-weight: 600; color: var(--cf-muted); }
.cf-summary__facts dd { margin: 0; }
.cf-summary__facts ul { list-style: none; margin: 0; padding: 0; }
.cf-summary__lines { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--cf-cream-deep); font-size: .95rem; }
.cf-summary__lines li { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cf-summary__lines li.is-credit strong { color: #2F6B4A; }
.cf-summary__lines small { display: block; color: var(--cf-muted); font-size: .82rem; }
.cf-summary__total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 0; margin-top: 4px; border-top: 1px solid var(--cf-gold); }
.cf-summary__total span { font-weight: 600; }
.cf-summary__total strong { font: 500 2.1rem/1 var(--h-font-display, serif); }
.cf-summary__split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.cf-summary__split > div { padding: 10px 12px; background: var(--cf-cream); border-radius: var(--cf-radius-sm); display: flex; flex-direction: column; gap: 2px; }
.cf-summary__split span { font-size: .78rem; line-height: 1.3; color: var(--cf-muted); }
.cf-summary__split strong { font-size: 1.1rem; }
.cf-summary__split--one { grid-template-columns: 1fr; }
/* Group: guests and who gets a session */
.cf-guests { margin-top: 4px; }
.cf-guest { padding: 16px 18px 2px; margin-bottom: 12px; border: 1px solid var(--cf-cream-deep); border-radius: var(--cf-radius-sm); background: var(--cf-cream); }
.cf-guest__label { margin: 0 0 10px; font: 600 .76rem/1.3 var(--h-font-body, sans-serif); letter-spacing: .14em; text-transform: uppercase; color: var(--cf-clay-ink); }
.cf-guest .cf-field { margin-bottom: 16px; }
.cf-addon--group { cursor: default; }
.cf-addon--group:has(input:checked) { border-color: var(--cf-forest); background: var(--cf-cream); box-shadow: 0 0 0 1px var(--cf-forest); }
.cf-session-for { margin: 12px 0 0; }
.cf-session-for legend { font-size: .95rem; }
.cf-check--compact { margin: 0 0 8px; padding: 12px 14px; background: #fff; }
.cf-check .cf-inline { display: inline; margin: 0; color: var(--cf-muted); font-size: .85rem; }
.cf-option--pay { align-items: flex-start; }
.cf-option--pay input { margin-top: 3px; }
.cf-summary__card { margin: 10px 0 0; font-size: .85rem; line-height: 1.45; color: var(--cf-muted); }

/* Compact summary above the form on small screens */
.cf-mini { display: none; margin-bottom: 16px; background: var(--cf-cream); border: 1px solid var(--cf-cream-deep); border-radius: var(--cf-radius-sm); }
.cf-mini summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; font-weight: 600; list-style: none; min-height: 48px; }
.cf-mini summary::-webkit-details-marker { display: none; }
.cf-mini summary span::after { content: " \25BE"; color: var(--cf-clay-ink); }
.cf-mini[open] summary span::after { content: " \25B4"; }
.cf-mini summary strong { font: 500 1.5rem/1 var(--h-font-display, serif); }
.cf-mini > div { padding: 0 18px 18px; }
.cf-mini[hidden], .cf-progress[hidden] { display: none !important; }

/* ---------- Done ---------- */
.cf-done:focus { outline: none; }
.cf-ref { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 24px 0; padding: 18px 22px; background: var(--cf-cream); border: 1px dashed var(--cf-clay); border-radius: var(--cf-radius-sm); }
.cf-ref span { flex-basis: 100%; font: 600 .76rem/1.3 var(--h-font-body, sans-serif); letter-spacing: .12em; text-transform: uppercase; color: var(--cf-clay-ink); }
.cf-ref strong, .cf-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; }
.cf-ref strong { margin-right: auto; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.cf-next-steps { padding-left: 1.3em; margin: 0 0 24px; }
.cf-next-steps li { margin-bottom: 14px; }
.cf-next-steps li::marker { color: var(--cf-clay); font-weight: 700; }
body .cf .btn.cf-wise { margin-top: 8px; border-radius: 999px; background: var(--cf-forest); border-color: var(--cf-forest); color: var(--cf-cream); }
.cf-session { margin: 0 0 18px; padding: 18px 22px; border-radius: var(--cf-radius-sm); border: 1px solid var(--cf-gold); background: #FBF8F1; }
body .cf-session h3 { margin: 0 0 6px; font-size: 1.4rem; }
.cf-session p { margin: 0; }
.cf-cash { margin: 0 0 22px; padding: 16px 22px; border-radius: var(--cf-radius-sm); background: var(--cf-forest); color: var(--cf-cream); }
.cf-cash strong { color: #fff; }
.cf-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; margin: 0 0 18px; font-size: .95rem; }
.cf-facts dt { font-weight: 600; color: var(--cf-muted); }
.cf-facts dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .cf__layout { grid-template-columns: 1fr; }
  .cf-summary { display: none; }
  .cf-mini { display: block; }
}
@media (max-width: 720px) {
  .cf-progress__now, .cf-progress__bar { display: block; }
  .cf-progress__list { display: none; }
  .cf-row { grid-template-columns: 1fr; }
  .cf-card { padding: 22px 18px 26px; border-radius: 16px; }
  .cf-nav { flex-direction: column-reverse; align-items: stretch; }
  body .cf .btn.cf-next { width: 100%; min-width: 0; }
  .cf-back { align-self: center; }
  .cf-review > div { grid-template-columns: 1fr auto; }
  .cf-review dt { grid-column: 1 / -1; }
  .cf-addon { padding: 18px 16px; gap: 12px; }
  .cf-option { padding: 14px; }
  .cf-option__note { white-space: normal; text-align: right; max-width: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  .cf-enter { animation: none; }
  .cf-progress__bar span, .cf-progress__dot { transition: none; }
}
