:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #596579;
    --line: #dbe1e9;
    --surface: #ffffff;
    --soft: #f4f7fa;
    --brand: #0b5b48;
    --brand-dark: #084638;
    --danger: #a72828;
    --success: #176b4b;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--soft); line-height: 1.55; }
a { color: var(--brand); }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 20; padding: .75rem 1rem; color: #fff; background: var(--brand); border-radius: .4rem; }
.skip-link:focus { top: 1rem; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem max(1rem, calc((100vw - 1080px) / 2)); background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); font-size: 1.15rem; font-weight: 800; letter-spacing: .08em; text-decoration: none; }
.back-link { font-weight: 650; text-underline-offset: .2em; }
.page-shell { width: min(1080px, calc(100% - 2rem)); margin: 0 auto; padding: 3rem 0 4rem; }
.event-context { padding: clamp(1.5rem, 4vw, 3rem); color: #fff; background: linear-gradient(135deg, #0a4c3d, #123b56); border-radius: 1rem; box-shadow: 0 1.2rem 3rem rgba(20, 36, 52, .13); }
.eyebrow { margin: 0 0 .5rem; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { max-width: 820px; margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.08; }
.event-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0 0; }
.event-facts div { padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.25); }
.event-facts dt { font-size: .78rem; font-weight: 750; opacity: .75; text-transform: uppercase; }
.event-facts dd { margin: .25rem 0 0; font-weight: 650; }
.registration-form, .state-card { margin-top: 1.5rem; padding: clamp(1.25rem, 4vw, 2.5rem); background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 .8rem 2.5rem rgba(20, 36, 52, .08); }
.registration-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.registration-form fieldset + fieldset { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
legend { padding: 0; font-size: 1.35rem; font-weight: 800; }
.section-help { margin: .25rem 0 1.25rem; color: var(--muted); }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field { display: grid; align-content: start; gap: .4rem; font-weight: 700; }
.field--wide { grid-column: 1 / -1; }
.field em { color: var(--muted); font-size: .85rem; font-weight: 500; }
.field strong, .form-actions strong { color: var(--danger); }
input, textarea { width: 100%; padding: .78rem .9rem; color: var(--ink); background: #fff; border: 1px solid #aeb8c5; border-radius: .5rem; font: inherit; }
textarea { resize: vertical; }
input:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(11, 91, 72, .25); outline-offset: 2px; }
[aria-invalid="true"] { border-color: var(--danger); }
.field-error { min-height: 1.2em; color: var(--danger); font-size: .82rem; font-weight: 600; }
.participants { display: grid; gap: 1rem; }
.participant-card { padding: 1.25rem; background: var(--soft); border: 1px solid var(--line); border-radius: .75rem; }
.participant-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.participant-heading h3 { margin: 0; }
button { cursor: pointer; font: inherit; font-weight: 750; }
button:disabled { cursor: wait; opacity: .65; }
.primary-button, .secondary-button { padding: .75rem 1.1rem; border-radius: .5rem; }
.primary-button { color: #fff; background: var(--brand); border: 1px solid var(--brand); }
.primary-button:hover { background: var(--brand-dark); }
.secondary-button { color: var(--brand); background: #fff; border: 1px solid var(--brand); }
.remove-button, .text-button { padding: .25rem; color: var(--danger); background: transparent; border: 0; text-decoration: underline; text-underline-offset: .2em; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.form-actions p { margin: 0; color: var(--muted); font-size: .9rem; }
.form-alert { margin: 0 0 1.5rem; padding: 1rem; color: #731e1e; background: #fff3f3; border: 1px solid #efb6b6; border-radius: .6rem; }
.form-alert h2 { margin: 0 0 .25rem; font-size: 1rem; }
.form-alert p, .form-alert ul { margin: .25rem 0; }
.state-card { display: flex; align-items: flex-start; gap: 1rem; }
.state-card h2 { margin: 0 0 .5rem; line-height: 1.25; }
.state-card p { margin: .35rem 0; }
.state-icon { display: grid; flex: 0 0 2.5rem; place-items: center; width: 2.5rem; height: 2.5rem; margin: 0; border-radius: 50%; font-size: 1.25rem; font-weight: 850; }
.state-card--unavailable .state-icon { color: #73520e; background: #fff1bf; }
.state-card--success { border-color: #9bcdb7; }
.state-card--success .state-icon { color: var(--success); background: #daf3e7; }
.site-footer { padding: 1.5rem; color: var(--muted); text-align: center; border-top: 1px solid var(--line); }

@media (max-width: 700px) {
    .page-shell { width: min(100% - 1rem, 1080px); padding-top: 1rem; }
    .site-header, .section-heading, .form-actions { align-items: stretch; flex-direction: column; }
    .event-facts, .field-grid { grid-template-columns: 1fr; }
    .field--wide { grid-column: auto; }
    .secondary-button, .primary-button { width: 100%; }
}
