/* Public registration + payment pages. Brand colours come from each form's settings via CSS variables. */
:root {
  --primary: #233A7D; --accent: #0072BC; --accent2: #1E9DD9; --bg: #F3F6FA;
  --ink: #14213D; --muted: #5B6680; --line: #DCE3EE; --card: #FFFFFF; --ok: #16794C; --warn: #9A5B00; --danger: #B3261E;
  --display: 'Archivo', system-ui, sans-serif; --body: 'Archivo', system-ui, sans-serif;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; }
a { color: var(--accent2); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent2); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* hero */
.hero { background: var(--primary); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -140px; top: -160px; width: 520px; height: 520px; border-radius: 50%;
  border: 64px solid var(--accent2); opacity: .22; pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; padding-top: 22px; padding-bottom: 44px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.logo-chip { background: var(--logo-bg, #fff); border-radius: 12px; padding: 8px 14px; display: inline-flex; align-items: center; }
.logo-chip img { height: 40px; width: auto; display: block; }
.topbar a.more { color: #fff; opacity: .85; font-size: 14px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.4); }
.topbar a.more:hover { opacity: 1; }
.kicker { font-size: 15px; opacity: .8; margin: 0 0 10px; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(38px, 6vw, 68px); line-height: 1.02; margin: 0 0 18px; letter-spacing: -.01em; max-width: 19ch; }
.hero h1 span { display: block; color: var(--accent); }
.hero .lines { margin: 0 0 24px; padding: 0; list-style: none; font-weight: 600; font-size: 17px; }
.hero .lines li { margin: 2px 0; }
.hero .lines li + li { font-weight: 500; opacity: .78; font-size: 15px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.badges li { border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; background: rgba(255,255,255,.06); }

/* layout */
main { padding: 34px 0 120px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 34px; align-items: start; }
@media (max-width: 920px) { .grid { grid-template-columns: 1fr; } }
.intro { font-size: 17px; color: var(--muted); max-width: 62ch; margin: 0 0 26px; }
h2.step { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.15; margin: 34px 0 6px; }
h2.step:first-child { margin-top: 0; }
.step-hint { color: var(--muted); margin: 0 0 16px; }

/* option cards */
.group { margin-bottom: 26px; }
.group h3 { font-size: 18px; margin: 0 0 2px; }
.group .hint { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.opts { display: grid; gap: 10px; }
.opt { display: block; width: 100%; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r);
  padding: 16px 18px 16px 54px; position: relative; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.opt:hover { border-color: color-mix(in srgb, var(--accent2) 55%, var(--line)); }
.opt::before { content: ''; position: absolute; left: 18px; top: 19px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #9AA6BC; background: #fff; }
.opt[data-many]::before { border-radius: 6px; }
.opt[aria-pressed="true"] { border-color: var(--accent2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent2) 18%, transparent); }
.opt[aria-pressed="true"]::before { border-color: var(--accent2); background: var(--accent2); box-shadow: inset 0 0 0 4px #fff; }
.opt[data-many][aria-pressed="true"]::before { box-shadow: none; background: var(--accent2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.opt .t { font-weight: 700; font-size: 17px; display: block; }
.opt .s { display: block; color: var(--muted); font-size: 15px; margin-top: 1px; }
.opt .f { display: block; font-size: 13.5px; color: var(--ink); opacity: .82; margin-top: 8px; }
.opt .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.opt .meta span { background: var(--bg); border-radius: 6px; padding: 2px 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.opt .price { position: absolute; right: 18px; top: 16px; font-weight: 700; font-size: 15px; }
.opt.full .t::after { content: ' (waiting list)'; font-weight: 600; color: var(--warn); font-size: 14px; }

/* seats: one mark per place, so a 10-place course reads at a glance */
.seats { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pips { display: flex; flex-wrap: wrap; gap: 3px; max-width: 260px; }
.pips i { width: 9px; height: 9px; border-radius: 2px; background: color-mix(in srgb, var(--accent2) 85%, #fff); }
.pips i.taken { background: #D5DCE7; }
.seats b { font-size: 13.5px; font-weight: 700; }
.seats.low b { color: var(--accent); }
.seats.none b { color: var(--warn); }

/* details form */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } }
label.l { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 5px; }
label.l i { color: var(--accent); font-style: normal; }
.in { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; font-size: 16px; }
.in:focus { border-color: var(--accent2); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent2) 20%, transparent); }
textarea.in { min-height: 92px; resize: vertical; }
.field.bad .in { border-color: var(--danger); }
.field .msg { display: none; color: var(--danger); font-size: 13.5px; margin-top: 4px; }
.field.bad .msg { display: block; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent2); }
.hp { position: absolute; left: -5000px; }

/* summary */
.summary { position: sticky; top: 18px; }
.summary .card { padding: 20px; }
.summary h2 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 0 0 12px; }
.chosen { list-style: none; margin: 0 0 14px; padding: 0; }
.chosen li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.chosen li:last-child { border-bottom: 0; }
.chosen .w { color: var(--warn); font-size: 13px; font-weight: 600; display: block; }
.chosen .empty { color: var(--muted); }
.total { display: flex; justify-content: space-between; font-weight: 700; font-size: 18px; padding-top: 10px; border-top: 2px solid var(--ink); margin-bottom: 14px; }
.note { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.cur { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; padding: 3px; margin-bottom: 14px; }
.cur button { border: 0; background: none; padding: 6px 14px; border-radius: 7px; cursor: pointer; font-weight: 600; }
.cur button[aria-pressed="true"] { background: var(--primary); color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 14px 20px; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; }
.btn-main { background: var(--accent); color: #fff; width: 100%; }
.btn-main:hover { filter: brightness(1.07); }
.btn-main[disabled] { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn-wa { background: #1F9D55; color: #fff; }
.help { margin-top: 14px; font-size: 14px; color: var(--muted); }
.help a { color: var(--ink); font-weight: 600; }
.formerr { display: none; background: #FDECEA; color: var(--danger); border-radius: 10px; padding: 10px 12px; font-size: 14.5px; margin-bottom: 12px; }
.formerr.on { display: block; }
.fine { font-size: 13px; color: var(--muted); margin-top: 12px; }

/* mobile bar */
.bar { display: none; }
@media (max-width: 920px) {
  .summary { position: static; }
  .bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: #fff; border-top: 1px solid var(--line);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 12px; align-items: center; box-shadow: 0 -6px 20px rgba(20,33,61,.08); }
  .bar .c { font-size: 14px; color: var(--muted); flex: 1; }
  .bar .c b { color: var(--ink); display: block; font-size: 15px; }
  .bar .btn { padding: 12px 16px; }
  .bar.hide { display: none; }
}

/* result panels */
.result { max-width: 680px; margin: 0 auto; }
.result .card { padding: 30px; }
.result h2 { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1.1; margin: 0 0 10px; }
.result .mark { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ok) 14%, #fff); color: var(--ok); margin-bottom: 16px; }
.result .mark.wait { background: color-mix(in srgb, var(--warn) 14%, #fff); color: var(--warn); }
.refbox { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1.5px dashed var(--line); border-radius: 12px; padding: 12px 16px; margin: 18px 0; }
.refbox span { font-size: 13px; color: var(--muted); display: block; }
.refbox b { font-size: 24px; letter-spacing: .05em; white-space: nowrap; }
.items { list-style: none; padding: 0; margin: 0 0 18px; }
.items li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tag { font-size: 13px; font-weight: 700; border-radius: 6px; padding: 2px 8px; white-space: nowrap; align-self: center; }
.tag.held, .tag.confirmed { background: color-mix(in srgb, var(--ok) 13%, #fff); color: var(--ok); }
.tag.waitlist { background: color-mix(in srgb, var(--warn) 14%, #fff); color: var(--warn); }
.tag.cancelled { background: #EEF0F4; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.actions .btn { flex: 1 1 200px; }
.loading-state { text-align: center; padding: 120px 20px; color: var(--muted); }
.amount { font-size: 44px; font-weight: 700; letter-spacing: -.01em; margin: 6px 0 4px; }
footer.site { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 0 40px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ── v2: steps, choices, dialog, QR, receipt ─────────────────────────────── */
.hidden { display: none !important; }
.hero.compact .wrap { padding-bottom: 22px; }
.hero.compact .topbar { margin-bottom: 14px; }
.hero.compact .kicker { margin: 0; font-weight: 600; opacity: .92; }
h2.step { display: flex; align-items: center; gap: 12px; }
h2.step .num { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; font: 700 15px/32px var(--body); text-align: center; }
.opt-l { font-weight: 500; color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.fhint { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .seg { grid-template-columns: 1fr; } }
.segb { position: relative; display: block; cursor: pointer; }
.segb input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.segb span { display: block; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px 12px 44px; background: #fff; position: relative; min-height: 58px; }
.segb span::before { content: ''; position: absolute; left: 14px; top: 16px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #9AA6BC; background: #fff; }
.segb b { display: block; font-size: 15.5px; }
.segb small { display: block; color: var(--muted); font-size: 13px; }
.segb input:checked + span { border-color: var(--accent2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent2) 16%, transparent); }
.segb input:checked + span::before { border-color: var(--accent2); background: var(--accent2); box-shadow: inset 0 0 0 4px #fff; }
.segb input:focus-visible + span { outline: 3px solid var(--accent2); outline-offset: 2px; }
.natother { margin-top: 12px; }
.checks { display: grid; gap: 8px; }
.field.bad .seg .segb span, .field.bad select.in { border-color: var(--danger); }
.opt .note2 { display: block; margin-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.opt .note2.off { color: var(--danger); }
.opt .note2.clash { color: var(--warn); }
.opt .note2.ok { color: var(--ok); }
.opt.off { cursor: not-allowed; background: #F7F8FA; }
.opt.off .t, .opt.off .s, .opt.off .f, .opt.off .price { opacity: .55; }
.opt.off[aria-pressed="true"] { box-shadow: none; border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.opt.off[aria-pressed="true"]::before { opacity: .6; }
.opt .price.two { text-align: right; line-height: 1.35; font-size: 14px; }
.opt .price.two span { display: block; }
legend.l { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 5px; }
.l i { color: var(--accent); font-style: normal; }
.opt { padding-right: 112px; }
@media (max-width: 420px) { .opt { padding-right: 18px; } .opt .price { position: static; display: block; margin-bottom: 4px; text-align: left; } .opt .price.two span { display: inline; } .opt .price.two span + span::before { content: ' · '; color: var(--muted); } }
.grpmsg { display: block; color: var(--danger); font-size: 14px; font-weight: 600; margin-top: 6px; min-height: 0; }
.grpmsg:empty { display: none; }
.field .msg:empty { display: none !important; }
.banner { background: color-mix(in srgb, var(--accent2) 10%, #fff); border: 1px solid color-mix(in srgb, var(--accent2) 30%, var(--line)); border-radius: 12px; padding: 12px 14px; margin: 0 0 20px; font-size: 15px; }
.curline { color: var(--muted); font-size: 13.5px; margin: -6px 0 8px; }
.curline:empty { display: none; }
.curhint { color: var(--warn); font-weight: 600; font-size: 14px; margin: 0 0 12px; }
.consent { margin: 4px 0 14px; }
.consent .check { font-size: 14px; }
.formerr ul { margin: 6px 0 0; padding-left: 20px; }
.formerr a { color: var(--danger); font-weight: 600; }
.chosen .s, .items .s { display: block; color: var(--muted); font-size: 13px; }
.btn.sm { padding: 6px 12px; font-size: 14px; border-radius: 9px; }

/* dialog (review, duplicate) */
body.noscroll { overflow: hidden; }
.dlg-bg { position: fixed; inset: 0; background: rgba(20,33,61,.45); z-index: 30; }
.dlg { position: fixed; z-index: 31; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow: auto;
  background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(20,33,61,.3); display: flex; flex-direction: column; }
.dlg .dh { padding: 20px 22px 4px; }
.dlg .dh h2 { font-family: var(--display); font-weight: 400; font-size: 26px; margin: 0; }
.dlg .db { padding: 8px 22px; }
.dlg .df { padding: 14px 22px 20px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: #fff; }
.dlg .df .btn { flex: 1 1 180px; }
.dlg .df .btn-main { width: auto; }
@media (max-width: 560px) { .dlg { top: auto; bottom: 0; transform: translate(-50%, 0); border-radius: 16px 16px 0 0; max-height: 92vh; width: 100vw; } .dlg .df { flex-direction: column-reverse; } .dlg .df .btn { flex: none; width: 100%; } }
.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 6px 12px; font-size: 14.5px; margin: 14px 0 6px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

/* result pages */
.result .mark.bad { background: color-mix(in srgb, var(--danger) 12%, #fff); color: var(--danger); }
.refbox { flex-wrap: wrap; }
.refbox > div:first-child { flex: 1 1 200px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.refbox small { color: var(--muted); font-size: 13px; }
.refbox .btn { margin-top: 8px; }
.refbox .qr { flex: 0 0 auto; width: 132px; background: #fff; border-radius: 8px; }
.refbox .qr svg { display: block; width: 100%; height: auto; }
.money { margin: 0 0 14px; }
.money > div:not(.total) { display: flex; justify-content: space-between; color: var(--muted); font-size: 15px; padding: 2px 0; }
.result p { margin: 0 0 12px; }
.receipt { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 6px 0 16px; }
.receipt h3 { margin: 0 0 6px; font-size: 17px; }
.receipt table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.receipt th, .receipt td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); }
.receipt th { color: var(--muted); font-weight: 600; font-size: 13px; }
.receipt .r { text-align: right; white-space: nowrap; }
.receipt .actions { margin-top: 10px; }
.bar .btn { width: auto; }
@media print {
  .hero, footer.site, .noprint, .bar, .actions, #paymsg { display: none !important; }
  body { background: #fff; }
  main { padding: 0; }
  .result .card { border: 0; padding: 0; }
}
