:root {
  --bg: oklch(0.15 0.004 260);
  --card-bg: oklch(0.205 0.006 260);
  --row-bg: oklch(0.185 0.006 260);
  --input-bg: oklch(0.12 0.004 260);
  --text: oklch(0.95 0.004 260);
  --text-body: oklch(94.289% 0.003 264.784);
  --text-muted: oklch(0.72 0.01 260);
  --text-meta: oklch(0.72 0.01 260);
  --border: oklch(0.52 0.01 260);
  --border-subtle: oklch(0.3 0.008 260);
  --purple: #503caa;
  --purple-bright: oklch(0.53 0.13 285); /* checkbox tick — 3.25:1 on card */
  --cyan: #00cddc;
  --yellow: #ffd600;
  --red: #f53754;
  --green: #1e9f50;
  --red-text: #ffa8b5;
  --green-text: #6ee79a;
}

* { box-sizing: border-box; }

/* Read by screen readers, not shown. Used to give controls that repeat down
   the page ("Sign up", "What this involves") the context a sighted reader
   gets from the row around them. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

html {
  color-scheme: dark;
  /* 2.4.11 Focus Not Obscured — keep focused elements clear of the sticky
     date switcher above and the fixed footer below. */
  scroll-padding-top: 80px;
  scroll-padding-bottom: 130px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

button,
.checkbox-row,
.role-row__action-wrap {
  user-select: none;
  -webkit-user-select: none;
}

.checkbox-row__label {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-body);
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 110px;
}

.header { padding-top: 6px; }
.header__eyebrow {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-meta);
  margin: 0 0 4px;
}
.header__eyebrow--ok { color: var(--green-text); }

.header__intro {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-body);
  margin: 0 0 20px;
  max-width: 42em;
}

.header__title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 20px;
}

.card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}

.identity-card__question {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-body);
}
.identity-card__hint-detail {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-muted);
}
.tab-toggle {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 9px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  margin-bottom: 12px;
}
.tab-toggle-btn {
  position: relative;
  flex: 1;
  min-height: 30px;
  padding: 0 8px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  /* Held at 14px rather than the full 25% cut (12px) — this is the smallest
     text in the card and the audience includes readers who need the size. */
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
/* The visible button is 30px, but the thing you actually have to hit stays
   44px tall. Shrinking the control should not shrink the target for someone
   using a phone one-handed on a bus. */
.tab-toggle-btn::after {
  content: "";
  position: absolute;
  inset: -7px 0;
}
.tab-toggle-btn:hover { color: var(--text); }
.tab-toggle-btn[aria-pressed="true"] { background: var(--purple); color: white; }
.tab-toggle-btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.member-status-checking { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.4; color: var(--text-meta); }
.member-status-checking[hidden] { display: none; }

.details-card { display: flex; flex-direction: column; gap: 16px; }
.field-hint {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-meta);
  margin: 0 0 8px;
}
.details-card[hidden] { display: none; }
.details-card label:not(.checkbox-row) { font-size: 18px; font-weight: 600; display: block; margin-bottom: 6px; }

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  height: 48px;
  border-radius: 10px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 20px;
  padding: 0 14px;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
  outline: 3px solid var(--cyan);
  outline-offset: 1px;
  border-color: var(--cyan);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
}
.checkbox-row input { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--purple-bright); }
.checkbox-row span { font-size: 16px; font-weight: 500; line-height: 1.5; color: var(--text-body); }

.meetings { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }

.meeting-switcher {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border-bottom: 1.5px solid var(--border);
  padding: 10px 16px;
  margin: 0 -16px;
}
.meeting-switcher__arrow {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}
.meeting-switcher__arrow:hover:not(:disabled) { background: oklch(0.26 0.01 260); }
.meeting-switcher__arrow:disabled {
  border-color: oklch(0.50 0.006 260);
  color: oklch(0.50 0.01 260);
  cursor: default;
}
.meeting-switcher__arrow:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.meeting-switcher__title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.meeting-card { padding: 0; overflow: hidden; }
.meeting-card.meeting-anim { animation: meeting-in 320ms ease both; }
@keyframes meeting-in {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: none; }
}
.meeting-card__header {
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px 10px;
  border-bottom: 1.5px solid var(--border);
}
.meeting-card__venue { display: flex; flex-direction: column; gap: 2px; }
.meeting-card__venue-line { font-size: 24px; font-weight: 500; line-height: 1.5; color: var(--text-body); }
.meeting-card__venue-line a { color: var(--text-body); text-decoration: underline; text-underline-offset: 2px; }
.meeting-card__venue-line a:hover { color: var(--cyan); }
.meeting-card__address { font-size: 21px; font-weight: 500; color: var(--text-meta); }
.meeting-card__time { font-size: 21px; font-weight: 500; color: var(--text-meta); }

.pill {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: transparent;
  border: 1.5px solid;
  white-space: nowrap;
}
.pill--gap { color: var(--red-text); border-color: var(--red); }
.pill--ok { color: var(--green-text); border-color: var(--green); }

.role-row {
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--row-bg);
}
.role-row:last-child { border-bottom: none; }
.role-row--selected { background: color-mix(in oklch, var(--purple) 22%, var(--row-bg)); }

.role-row__head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.role-row__head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  flex-wrap: wrap;
}
.role-row__name { font-size: 21px; font-weight: 600; line-height: 1.3; }
.role-row__info {
  background: transparent;
  border: none;
  padding: 2px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.role-row__assigned { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.role-row__assigned-label { font-size: 18px; font-weight: 500; color: var(--text-muted); }
.role-row__assigned-names {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-body);
}
.assigned-chip { display: inline-flex; align-items: center; }
.assigned-chip__sep { white-space: pre; }
.assigned-chip--mine {
  background: color-mix(in oklch, var(--green) 20%, var(--row-bg));
  border: 1.5px solid var(--green);
  border-radius: 999px;
  padding: 3px 12px;
  margin: 2px 6px 2px 0;
}
.assigned-chip--mine .assigned-chip__name { color: var(--green-text); }
.assigned-chip--mine .assigned-chip__sep { display: none; }
.role-row__info:hover { color: var(--cyan); }
.role-row__info:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

.role-row__bottom { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 12px; }
.role-row__spots {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  padding-bottom: 2px;
  color: var(--text);
  white-space: nowrap;
}
.role-row__spots--green { color: var(--green-text); }

.role-row__action-wrap { flex-shrink: 0; margin-left: auto; display: block; }
.role-row__action-wrap[hidden] { display: none; }
.role-row__action-wrap input { position: absolute; opacity: 0; pointer-events: none; }
.role-row__action {
  display: block;
  min-width: 126px;
  max-width: 220px;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 10px;
  border: 2px solid var(--purple);
  background: var(--purple);
  color: white;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  letter-spacing: 0.01em;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
}
.role-row__action[hidden] { display: none; }
.role-row__action-wrap input:checked + .role-row__action {
  background: color-mix(in oklch, var(--green) 30%, var(--row-bg));
  border-color: var(--green);
}
.role-row__action-wrap input:disabled:not(:checked) + .role-row__action {
  background: oklch(0.24 0.006 260);
  border-color: oklch(0.34 0.006 260);
  color: oklch(0.88 0.004 260);
  cursor: not-allowed;
  filter: none;
}
.role-row__action-wrap:hover .role-row__action { filter: brightness(1.1); }
.role-row__action-wrap input:focus-visible + .role-row__action {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}
.role-row__action--full {
  background: oklch(0.24 0.006 260);
  border-color: oklch(0.52 0.006 260);
  color: oklch(0.88 0.004 260);
  cursor: not-allowed;
}
.role-row__action--mine {
  background: transparent;
  border-color: var(--red);
  color: var(--red-text);
  cursor: pointer;
}
.role-row__action--mine:hover { background: color-mix(in oklch, var(--red) 18%, transparent); }
.role-row__action--mine:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.role-row__action--mine:disabled { cursor: not-allowed; opacity: 0.7; }

.info-sheet[hidden] { display: none; }
.info-sheet__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 50;
}
.info-sheet__panel {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  border: 1.5px solid oklch(0.42 0.01 260);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 51;
}
.info-sheet__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.info-sheet__header h2 { font-size: 24px; font-weight: 700; line-height: 1.2; margin: 0; }
.close-btn {
  flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 9px;
  border: 1.5px solid oklch(0.42 0.01 260); background: transparent; color: var(--text);
  font-size: 18px; font-weight: 800; cursor: pointer;
}
.close-btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.info-sheet__blurb { font-size: 22px; font-weight: 500; line-height: 1.5; color: var(--text-body); margin: 0; }
.info-sheet__count {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-meta);
  margin: 0;
}
.info-sheet__resource { font-size: 22px; font-weight: 600; margin: 0; }
.info-sheet__resource a { color: var(--cyan); }
.info-sheet__names { font-size: 22px; font-weight: 500; color: var(--text-meta); margin: 0; }
.info-sheet__action { margin-top: 4px; }

.callout { font-size: 22px; font-weight: 500; line-height: 1.5; padding: 10px 12px; border-radius: 8px; margin: 0; border: 1px solid; }
.callout--training { color: var(--yellow); border-color: var(--yellow); background: oklch(0.24 0.02 100); }
.callout--contact { color: var(--cyan); border-color: var(--cyan); background: oklch(0.24 0.02 220); }
.callout--error { color: var(--red-text); border-color: var(--red); background: oklch(0.24 0.02 20); }

.status-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid;
  background: var(--card-bg);
}
.status-card[hidden] { display: none; }
.status-card__icon { flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; }
.status-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.status-card__title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--text); }
.status-card__desc { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.45; color: var(--text-muted); }

.status-card--success { border-color: var(--green); background: color-mix(in oklch, var(--green) 12%, var(--card-bg)); }
.status-card--success .status-card__icon { color: var(--green-text); }

.status-card--warning { border-color: var(--yellow); background: color-mix(in oklch, var(--yellow) 12%, var(--card-bg)); }
.status-card--warning .status-card__icon { color: var(--yellow); }

.sticky-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  border-top: 1.5px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  gap: 12px;
}
.summary-panel {
  width: 100%;
  max-width: 480px;
  max-height: 40vh;
  overflow-y: auto;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
}
.summary-panel[hidden] { display: none; }
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.summary-row:last-child { border-bottom: none; }
.summary-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.summary-row__role { font-size: 20px; font-weight: 600; line-height: 1.3; }
.summary-row__date { font-size: 18px; font-weight: 500; color: var(--text-muted); }
.summary-row__remove {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1.5px solid oklch(0.42 0.01 260);
  background: transparent;
  color: oklch(0.9 0.004 260);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}
.summary-row__remove:hover { border-color: var(--red); color: var(--red-text); }
.summary-row__remove:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

.sticky-footer__row { width: 100%; max-width: 480px; display: flex; align-items: center; gap: 14px; }
.sticky-footer__toggle {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-body);
  text-align: left;
  cursor: pointer;
}
.sticky-footer__toggle:hover:not(:disabled) { color: var(--cyan); }
.sticky-footer__toggle:disabled { cursor: default; }
.sticky-footer__toggle:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.sticky-footer__chevron { font-size: 16px; color: var(--text-muted); }
.sticky-footer__chevron[hidden] { display: none; }

.btn {
  height: 48px;
  padding: 0 24px;
  border-radius: 10px;
  border: 1.5px solid var(--purple);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  line-height: 44px;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}
.btn--primary { background: var(--purple); border-color: var(--purple); color: white; }
.btn--primary[aria-disabled="true"] { background: oklch(0.3 0.006 260); border-color: oklch(0.3 0.006 260); color: oklch(0.9 0.004 260); }
.btn--outline { background: transparent; color: var(--text); }
.btn--outline:hover { background: oklch(0.24 0.01 260); }
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

#continue-btn { padding: 0 22px; }

.confirm-screen { display: flex; flex-direction: column; gap: 20px; padding-top: 6px; }
.confirm-card { padding: 0; }
.confirm-row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding: 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.confirm-row:last-child { border-bottom: none; }
.confirm-row__label { align-self: stretch; font-size: 20px; font-weight: 600; line-height: 1.3; }
.btn--cancel { height: auto; min-height: 44px; padding: 0 14px; line-height: 1.3; border-radius: 9px; border: 1.5px solid oklch(0.42 0.01 260); }
.btn--cancel:hover { border-color: var(--red); color: var(--red-text); background: transparent; }

.reminder-note { font-size: 22px; font-weight: 500; color: var(--text-body); line-height: 1.5; margin: 0; }
.reminder-card { display: flex; flex-direction: column; gap: 12px; }
.reminder-card__field { display: flex; flex-direction: column; gap: 6px; }
.reminder-card__field label { font-size: 18px; font-weight: 600; }

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
}
.loading-overlay[hidden] { display: none; }
.loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
}
.loading-text { margin: 0; font-size: 20px; font-weight: 700; color: var(--text); }
.loading-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: loading-draw 1.6s ease-in-out infinite;
}
@keyframes loading-draw {
  0% { stroke-dashoffset: 1; }
  70% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}
