:root {
  --ink: #17333a;
  --ink-soft: #496067;
  --navy: #123b46;
  --navy-deep: #0b2931;
  --teal: #1f7a78;
  --teal-light: #d9eeeb;
  --coral: #e86f51;
  --coral-dark: #ca543b;
  --cream: #f7f3e9;
  --paper: #fffdf8;
  --line: #dbe3df;
  --white: #fff;
  --danger: #a33e31;
  --danger-bg: #fff0ec;
  --success: #23664f;
  --success-bg: #e6f4ed;
  --shadow: 0 18px 55px rgba(11, 41, 49, 0.12);
  --radius: 20px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--cream); font-family: var(--font); line-height: 1.55; }
body::selection { background: #f2c5b8; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .72; }
[hidden] { display: none !important; }
code { padding: .1rem .35rem; border-radius: 5px; background: #edf0ed; font-size: .9em; }

.skip-link { position: fixed; z-index: 100; top: .75rem; left: .75rem; transform: translateY(-160%); padding: .7rem 1rem; border-radius: 8px; background: var(--white); box-shadow: var(--shadow); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.hero { position: relative; min-height: 560px; overflow: hidden; color: var(--white); background: linear-gradient(145deg, var(--navy-deep), #164d57 68%, #1b6668); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .12; background-image: radial-gradient(circle at 1px 1px, white 1px, transparent 0); background-size: 28px 28px; mask-image: linear-gradient(to bottom, #000, transparent 85%); }
.hero__content { position: relative; z-index: 2; width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 38px 0 140px; }
.hero__glow { position: absolute; border-radius: 999px; filter: blur(3px); opacity: .22; }
.hero__glow--one { width: 420px; height: 420px; top: -190px; right: -60px; background: #63d6c7; }
.hero__glow--two { width: 260px; height: 260px; bottom: 60px; left: 8%; background: #ffad77; opacity: .11; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; font-size: .82rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.brand__mark { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid rgba(255,255,255,.32); border-radius: 14px; background: rgba(255,255,255,.1); font-weight: 850; letter-spacing: -.03em; }
.hero__copy { max-width: 760px; padding-top: 70px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--coral); font-size: .77rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.hero .eyebrow { color: #ffc1ac; }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.hero h1 { max-width: 760px; margin: 17px 0 16px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.8rem, 7vw, 5.5rem); font-weight: 500; letter-spacing: -.045em; line-height: .98; }
.hero__copy > p { max-width: 620px; margin: 0; color: rgba(255,255,255,.76); font-size: clamp(1rem, 2vw, 1.25rem); }
.event-facts { display: flex; flex-wrap: wrap; gap: 22px 0; margin: 54px 0 0; }
.event-facts div { min-width: 170px; padding: 0 30px; border-left: 1px solid rgba(255,255,255,.22); }
.event-facts div:first-child { padding-left: 0; border-left: 0; }
.event-facts dt { color: rgba(255,255,255,.53); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.event-facts dd { margin: 5px 0 0; font-weight: 700; }
.hero__landscape { position: absolute; z-index: 1; inset: auto 0 -1px; height: 150px; pointer-events: none; }
.hero__landscape span { position: absolute; bottom: -60px; width: 55vw; height: 180px; border-radius: 50% 50% 0 0; transform: rotate(-4deg); background: #0d323a; }
.hero__landscape span:nth-child(1) { left: -12%; opacity: .75; }
.hero__landscape span:nth-child(2) { left: 24%; bottom: -105px; width: 65vw; height: 230px; background: #f7f3e9; }
.hero__landscape span:nth-child(3) { right: -25%; bottom: -120px; width: 66vw; height: 235px; background: #f7f3e9; }

.registration-shell { position: relative; z-index: 3; width: min(980px, calc(100% - 32px)); margin: -72px auto 70px; }
.form-card, .install-card, .success-card, .login-card { border: 1px solid rgba(18,59,70,.08); border-radius: 28px; background: var(--paper); box-shadow: var(--shadow); }
.form-card { padding: clamp(28px, 6vw, 64px); }
.section-heading { display: flex; gap: 18px; align-items: flex-start; padding-bottom: 38px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 500; line-height: 1.05; }
.section-heading p { margin: 7px 0 0; color: var(--ink-soft); }
.step-number { display: grid; flex: 0 0 48px; height: 48px; place-items: center; border-radius: 14px; color: var(--white); background: var(--coral); font-size: .8rem; font-weight: 850; }

.registration-form { position: relative; }
.form-section { margin: 0; padding: 42px 0; border: 0; border-bottom: 1px solid var(--line); }
.form-section--last { border-bottom: 0; }
.form-section > legend { width: 100%; margin-bottom: 26px; padding: 0; }
.form-section > legend span { font-size: 1.15rem; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 8px; color: var(--ink); font-size: .88rem; font-weight: 720; }
.field--wide { grid-column: span 2; }
.field__label { display: block; }
.required { color: var(--coral-dark); }
.field input, .field select, .field textarea, .filter-bar input, .filter-bar select { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #c9d5d1; border-radius: 11px; outline: 0; color: var(--ink); background: #fff; font-weight: 500; transition: border-color .18s, box-shadow .18s, background .18s; }
.field textarea { min-height: 125px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder, .filter-bar input::placeholder { color: #91a19d; }
.field input:focus, .field select:focus, .field textarea:focus, .filter-bar input:focus, .filter-bar select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31,122,120,.13); }
.field small { color: #70817d; font-size: .75rem; font-weight: 500; }
.choice-row { display: flex; flex-wrap: wrap; gap: 9px; }
.choice-pill { cursor: pointer; }
.choice-pill input { position: absolute; opacity: 0; pointer-events: none; }
.choice-pill span { display: grid; min-width: 98px; min-height: 50px; place-items: center; padding: 9px 17px; border: 1px solid #c9d5d1; border-radius: 11px; background: var(--white); font-weight: 650; transition: .18s; }
.choice-pill input:checked + span { border-color: var(--teal); color: var(--teal); background: var(--teal-light); box-shadow: inset 0 0 0 1px var(--teal); }
.choice-pill input:focus-visible + span { outline: 3px solid rgba(31,122,120,.25); outline-offset: 2px; }

.travel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.travel-card { padding: 24px; border: 1px solid #cfe1dc; border-radius: 18px; background: #f3faf8; }
.travel-card--departure { border-color: #ead7cd; background: #fff7f2; }
.travel-card__title { display: flex; gap: 12px; align-items: center; margin-bottom: 23px; }
.travel-card__title > span { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; color: var(--teal); background: var(--white); box-shadow: 0 4px 15px rgba(18,59,70,.07); font-size: 1.2rem; }
.travel-card--departure .travel-card__title > span { color: var(--coral-dark); }
.travel-card__title strong, .travel-card__title small { display: block; }
.travel-card__title small { margin-top: 1px; color: var(--ink-soft); font-size: .72rem; }
.travel-card > .field { margin-bottom: 17px; }
.date-time-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }

.children-panel { margin-top: 25px; padding: 24px; border-radius: 18px; background: #edf6f3; }
.panel-note { margin: 0 0 20px; color: var(--ink-soft); font-size: .9rem; }
.children-list { display: grid; gap: 14px; }
.child-card { padding: 22px; border: 1px solid #d2e4df; border-radius: 14px; background: var(--white); }
.child-card__header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 17px; }
.child-card__header h3 { margin: 0; font-size: .95rem; }
.child-remove { padding: 5px 8px; border: 0; border-radius: 7px; color: var(--danger); background: transparent; font-size: .75rem; font-weight: 750; }
.child-remove:hover { background: var(--danger-bg); }
.child-remove:focus-visible { outline: 3px solid rgba(163,62,49,.2); outline-offset: 2px; }
.children-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.children-actions small { color: var(--ink-soft); font-size: .75rem; }
.consent { display: flex; gap: 11px; align-items: flex-start; margin-top: 20px; color: var(--ink-soft); cursor: pointer; font-size: .86rem; }
.consent input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal); }
.form-submit { display: flex; gap: 20px; justify-content: space-between; align-items: center; padding-top: 30px; }
.form-submit p { margin: 0; color: var(--ink-soft); font-size: .82rem; }

.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 12px; padding: 11px 19px; border: 1px solid transparent; border-radius: 11px; text-decoration: none; font-weight: 780; transition: transform .18s, box-shadow .18s, background .18s; }
.button:hover { transform: translateY(-1px); }
.button--primary { color: var(--white); background: var(--coral); box-shadow: 0 10px 24px rgba(232,111,81,.23); }
.button--primary:hover { background: var(--coral-dark); }
.button--secondary { border-color: #c6d3cf; color: var(--ink); background: var(--white); }
.button--secondary:hover { border-color: var(--teal); }
.button--large { min-height: 54px; padding: 14px 24px; }
.button:focus-visible, .text-link:focus-visible, .row-link:focus-visible, .back-link:focus-visible { outline: 3px solid rgba(31,122,120,.28); outline-offset: 3px; }

.alert { display: flex; flex-direction: column; gap: 5px; margin: 24px 0; padding: 17px 19px; border: 1px solid; border-radius: 12px; font-size: .9rem; }
.alert ul { margin: 6px 0 0; padding-left: 19px; }
.alert--error { border-color: #efc4bb; color: var(--danger); background: var(--danger-bg); }
.alert--success { border-color: #b8ddcc; color: var(--success); background: var(--success-bg); }
.alert--notice { border-color: #e2d6aa; color: #6c5d24; background: #fff8dc; }

.site-footer { padding: 0 20px 34px; color: #71827d; text-align: center; font-size: .76rem; }

.install-shell, .success-shell, .login-shell { min-height: calc(100vh - 70px); padding: 60px 20px; background: radial-gradient(circle at 85% 10%, rgba(31,122,120,.17), transparent 30%), var(--cream); }
.install-card { width: min(880px, 100%); margin: 0 auto; padding: clamp(28px, 5vw, 55px); }
.install-card h1, .success-card h1, .login-card h1 { margin: 12px 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 500; line-height: 1.05; }
.lead, .login-card > p, .success-card > p { color: var(--ink-soft); }
.install-form fieldset { margin: 32px 0; padding: 25px; border: 1px solid var(--line); border-radius: 16px; }
.install-form legend { padding: 0 9px; font-weight: 800; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 25px; }

.success-shell, .login-shell { display: grid; place-items: center; background: radial-gradient(circle at 50% 20%, rgba(31,122,120,.2), transparent 35%), var(--navy-deep); }
.success-card, .login-card { width: min(560px, 100%); padding: clamp(34px, 7vw, 60px); text-align: center; }
.success-icon { display: grid; width: 68px; height: 68px; margin: 0 auto 23px; place-items: center; border-radius: 50%; color: var(--white); background: var(--teal); box-shadow: 0 12px 28px rgba(31,122,120,.28); font-size: 2rem; font-weight: 800; }
.registration-code { display: flex; flex-direction: column; gap: 5px; margin: 30px 0; padding: 20px; border: 1px dashed #a9c6bf; border-radius: 13px; background: #eef7f4; }
.registration-code small { color: var(--ink-soft); font-size: .72rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.registration-code strong { font-size: 1.4rem; letter-spacing: .06em; }
.login-card { max-width: 470px; text-align: left; }
.login-form { display: grid; gap: 17px; margin: 28px 0 22px; }
.back-link { display: inline-block; margin: 16px 0; color: var(--teal); text-decoration: none; font-size: .86rem; font-weight: 730; }

.admin-body { background: #f2f5f3; }
.admin-topbar { display: flex; min-height: 76px; align-items: center; justify-content: space-between; padding: 12px max(24px, calc((100% - 1200px) / 2)); color: var(--white); background: var(--navy-deep); }
.brand--compact { letter-spacing: .02em; text-transform: none; }
.brand--compact .brand__mark { width: 40px; height: 40px; border-radius: 11px; font-size: .75rem; }
.admin-nav { display: flex; gap: 22px; }
.admin-nav a { color: rgba(255,255,255,.76); text-decoration: none; font-size: .83rem; font-weight: 700; }
.admin-nav a:hover { color: var(--white); }
.admin-shell { width: min(1200px, calc(100% - 36px)); margin: 0 auto; padding: 52px 0 70px; }
.admin-heading, .detail-heading { display: flex; gap: 25px; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; }
.admin-heading h1, .detail-heading h1 { margin: 8px 0 2px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 500; line-height: 1; }
.admin-heading p, .detail-heading p { margin: 7px 0 0; color: var(--ink-soft); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { min-height: 150px; padding: 21px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: 0 6px 22px rgba(18,59,70,.05); }
.stat-card > span { color: var(--ink-soft); font-size: .75rem; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.stat-card > strong { display: block; margin: 10px 0 3px; color: var(--navy); font-size: 2.5rem; line-height: 1; }
.stat-card > small { color: #73847f; font-size: .73rem; }
.mini-bars { display: grid; gap: 6px; margin-top: 12px; }
.mini-bars small { display: flex; justify-content: space-between; color: var(--ink-soft); font-style: normal; }
.mini-bars b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-bars em { color: var(--teal); font-style: normal; font-weight: 800; }
.filter-bar { display: grid; grid-template-columns: minmax(220px, 1.3fr) 1fr 1fr auto auto; gap: 10px; align-items: center; margin-bottom: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.filter-bar input, .filter-bar select { min-height: 44px; padding: 9px 12px; }
.filter-bar label { min-width: 0; }
.text-link { padding: 8px; color: var(--teal); text-decoration: none; font-size: .8rem; font-weight: 750; }
.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--white); box-shadow: 0 7px 25px rgba(18,59,70,.05); }
.table-meta { display: flex; justify-content: space-between; padding: 15px 19px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: .78rem; }
.table-meta strong { color: var(--ink); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 15px 17px; border-bottom: 1px solid #e8ecea; text-align: left; font-size: .82rem; }
th { color: #71827d; background: #f8faf9; font-size: .69rem; letter-spacing: .07em; text-transform: uppercase; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: #7c8c88; font-size: .69rem; }
tbody tr:hover { background: #fbfdfc; }
.row-link { color: var(--teal); text-decoration: none; font-weight: 770; }
.empty-state { padding: 55px; color: #758580; text-align: center; }
.pagination { display: flex; justify-content: center; gap: 20px; align-items: center; padding: 16px; }
.pagination a { color: var(--teal); text-decoration: none; font-size: .8rem; font-weight: 750; }
.pagination span { color: var(--ink-soft); font-size: .76rem; }
.admin-shell--detail { max-width: 960px; }
.detail-heading { align-items: center; margin-top: 15px; }
.status-badge { padding: 8px 13px; border-radius: 999px; color: var(--success); background: var(--success-bg); font-size: .75rem; font-weight: 800; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.detail-card { padding: 25px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.detail-card h2 { margin: 0 0 20px; font-size: 1rem; }
.detail-card dl { margin: 0; }
.detail-card dl div { display: grid; grid-template-columns: 130px 1fr; gap: 15px; padding: 11px 0; border-top: 1px solid #e7ece9; }
.detail-card dl div:first-child { padding-top: 0; border-top: 0; }
.detail-card dt { color: var(--ink-soft); font-size: .75rem; }
.detail-card dd { margin: 0; font-size: .86rem; font-weight: 650; }
.detail-card p { margin: 0; color: var(--ink-soft); }

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: span 2; }
}

@media (max-width: 720px) {
  .hero { min-height: 600px; }
  .hero__content { width: min(100% - 32px, 1120px); padding-top: 25px; }
  .hero__copy { padding-top: 58px; }
  .hero h1 { font-size: clamp(2.7rem, 15vw, 4.3rem); }
  .event-facts { margin-top: 40px; }
  .event-facts div { min-width: 50%; padding: 0 15px; }
  .event-facts div:nth-child(3) { margin-top: 8px; padding-left: 0; border-left: 0; }
  .registration-shell { margin-top: -58px; }
  .form-card { border-radius: 22px; }
  .form-grid, .travel-grid, .detail-grid { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .children-panel { padding: 15px; }
  .child-card { padding: 17px; }
  .form-submit { flex-direction: column; align-items: stretch; }
  .form-submit .button { width: 100%; }
  .admin-topbar { padding-inline: 16px; }
  .brand--compact > span:last-child { display: none; }
  .admin-shell { width: min(100% - 24px, 1200px); padding-top: 35px; }
  .admin-heading, .detail-heading { align-items: flex-start; flex-direction: column; }
  .admin-heading .button { width: 100%; }
  .detail-card dl div { grid-template-columns: 1fr; gap: 3px; }
}

@media (max-width: 500px) {
  .brand { font-size: .7rem; }
  .brand__mark { width: 40px; height: 40px; }
  .hero h1 { font-size: 2.75rem; }
  .hero__copy > p { font-size: .95rem; }
  .event-facts div { min-width: 100%; margin-top: 8px; padding: 0; border-left: 0; }
  .form-card { padding: 24px 18px; }
  .section-heading { gap: 13px; }
  .step-number { flex-basis: 42px; height: 42px; }
  .form-section { padding: 34px 0; }
  .choice-pill { flex: 1; }
  .choice-pill span { min-width: 0; }
  .date-time-grid { grid-template-columns: 1fr; }
  .travel-card { padding: 18px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { min-height: 130px; padding: 17px; }
  .stat-card > strong { font-size: 2rem; }
  .stat-card--churches { grid-column: span 2; }
  .filter-bar { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .filter-bar .button { width: 100%; }
  .table-meta span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
