:root {
  --navy: #002870;          /* taken from the PGLSEA crest */
  --navy-dark: #001a4d;
  --tint: #f1f4fa;
  --card: #ffffff;
  --text: #121a2e;
  --muted: #5a6478;
  --line: #d6dcea;
  --focus: #2a5bd7;
  --danger: #b3261e;
  --ok: #1b7a46;
  --radius: 12px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--card);
  color: var(--text);
  font: 16px/1.5 var(--sans);
}
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(340px, 5fr) 7fr;
}

.aside {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  height: 100dvh;
  background: var(--tint);
  border-right: 1px solid var(--line);
  padding: 56px clamp(32px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 36px;
}
.brand { display: flex; flex-direction: column; gap: 24px; }
.logo { width: 120px; height: 120px; object-fit: contain; display: block; }

h1 { margin: 0; font-family: var(--serif); font-weight: 600; color: var(--navy); }
.h1-top { display: block; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-family: var(--sans); font-weight: 600; margin-bottom: 8px; }
.h1-main { display: block; font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.15; letter-spacing: -.01em; }
.dash { color: var(--muted); font-weight: 400; }

.dates { margin: 0; display: grid; gap: 16px; border-top: 1px solid var(--line); padding-top: 28px; }
.dates dt { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.dates dd { margin: 2px 0 0; font-size: 1.1rem; font-weight: 600; color: var(--navy-dark); }

.d-short { display: none; }

.main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px clamp(20px, 5vw, 64px);
}
.panel { width: 100%; max-width: 440px; }

/* ---------- Mobile / tablet ---------- */
@media (max-width: 880px) {
  .page { display: block; }
  .aside {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 20px 20px 18px;
    padding-top: calc(20px + env(safe-area-inset-top));
    gap: 16px;
  }
  .brand { flex-direction: row; align-items: center; gap: 14px; }
  .logo { width: 64px; height: 64px; flex: none; }
  .h1-top { font-size: .62rem; letter-spacing: .05em; margin-bottom: 4px; }
  .h1-main { font-size: 1.25rem; }
  .dates { grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 14px; }
  .dates dt { font-size: .64rem; }
  .dates dd { font-size: .95rem; line-height: 1.3; white-space: nowrap; }
  .d-long { display: none; }
  .d-short { display: inline; }
  .main { display: block; padding: 28px 20px calc(40px + env(safe-area-inset-bottom)); }
  .panel { margin: 0 auto; }
}
@media (max-width: 360px) {
  .dates { grid-template-columns: 1fr; }
}

/* ---------- Content ---------- */
h2 { font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; margin: 0 0 8px; color: var(--text); letter-spacing: -.01em; }
.stepno { margin: 0 0 6px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.sub { margin: 0 0 24px; color: var(--muted); }
.center { text-align: center; }

.field { margin-top: 18px; }
label, .label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }

input, select {
  width: 100%;
  font: inherit;
  font-size: 16px;               /* prevents iOS zoom on focus */
  color: var(--text);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-height: 50px;
  transition: border-color .15s, box-shadow .15s;
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%235a6478' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
select:invalid { color: #7b8499; }
select option { color: var(--text); }
input::placeholder { color: #98a0b3; }
input:focus, select:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(42, 91, 215, .18);
}
[aria-invalid="true"] { border-color: var(--danger); }

.readonly {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 50px; padding: 8px 14px;
  background: var(--tint);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  word-break: break-all;
}

.hint { margin: 6px 0 0; color: var(--muted); font-size: .85rem; }
.error { color: var(--danger); font-size: .88rem; margin: 6px 0 0; }
.notice {
  background: var(--tint);
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 8px;
  font-size: .92rem;
}

.notice.info {
  background: #fbf6e9;
  border-color: #eadfbd;
  border-left-color: #b8892b;     /* subtle gold accent */
  margin: 18px 0 0;
}

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice-field { margin-top: 18px; }
legend { padding: 0; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  margin: 0;
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 50px; padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.choice label:hover { border-color: #aab4cc; }
.choice input:checked + label { border-color: var(--navy); background: var(--tint); color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.choice input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice-field.invalid .choice label { border-color: var(--danger); }

.btn {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 26px;
  padding: 0 20px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--navy-dark); }
.btn:active { transform: scale(.99); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.secondary { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn.secondary:hover { background: var(--tint); }
.btn:focus-visible, .link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.link {
  display: block;
  margin: 14px auto 0;
  padding: 8px;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: .92rem;
  text-decoration: underline;
  cursor: pointer;
}
.link.inline { display: inline; margin: 0; padding: 4px 6px; color: var(--navy); font-weight: 600; flex: none; }

.icon.ok {
  width: 64px; height: 64px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: #fff; background: var(--ok);
  font-size: 1.9rem;
}

.summary {
  margin: 0 0 6px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--tint);
  padding: 4px 16px;
}
.summary div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary div:last-child { border-bottom: 0; }
.summary dt { color: var(--muted); font-size: .9rem; }
.summary dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Refreshment Board / Fellowship ---------- */
.sect { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); }
.sect-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.sect h3 { margin: 0; font-family: var(--serif); font-size: 1.3rem; color: var(--navy); }
.price { font-size: .9rem; font-weight: 600; color: var(--muted); }
.free-note { margin: 8px 0 0; color: var(--ok); font-size: .9rem; font-weight: 600; }
.sect .notice.info { margin-top: 12px; }

.choice.num { grid-template-columns: repeat(6, 1fr); gap: 8px; }
.choice.num label { padding: 8px 0; }

/* A follow-up question that belongs to the one above it */
.nested { margin-left: 4px; padding-left: 14px; border-left: 3px solid var(--line); }

.total {
  margin-top: 30px; padding: 14px 16px;
  background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius);
}
.total .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; }
.total .row small { display: block; color: var(--muted); }
.total .row .amt { font-weight: 600; white-space: nowrap; }
.total .grand { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 1.15rem; font-weight: 700; color: var(--navy); }

/* Voluntary contribution (3 choices) and the "Total payable" box */
.choice.three { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice.three label { padding-left: 6px; padding-right: 6px; text-align: center; }
.sect .when { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.total .total-title { font-family: var(--serif); font-size: 1.15rem; color: var(--navy); margin-bottom: 6px; }
