/* Design rules: one job per screen, 18px+ body, 56px+ buttons, dark on white, one green that means "go". */
:root {
  --ink: #1A1A1A;
  --quiet: #4A4A4A;
  --soft: #2E2E2E;
  --line: #E6E6E3;
  --well: #F3F3F1;
  --go: #1B7F4C;
  --go-dark: #146239;
  --error: #9B2C2C;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: #EDEDEA;
  color: var(--ink);
  font-family: 'Atkinson Hyperlegible', system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--go); }
a:hover { color: var(--go-dark); }

button, input, textarea, select { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--go); outline-offset: 2px; }
.btn.primary:focus-visible { outline-color: var(--ink); }

/* Full-bleed on a phone; a centered card on anything wider. */
.phone {
  background: #FFFFFF;
  min-height: 100vh;
  margin: 0 auto;
  max-width: 430px;
  display: flex;
  flex-direction: column;
}
@media (min-width: 560px) {
  .phone {
    margin: 24px auto 48px;
    min-height: 0;
    border-radius: 32px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    overflow: hidden;
  }
}

.screen {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 20px 24px 28px;
  gap: 22px;
}
.screen.roomy { padding-top: 48px; }

h1 { margin: 0; font-size: 32px; line-height: 1.15; font-weight: 700; }
h1.smaller { font-size: 30px; }
h1.spaced { margin-top: 8px; }
h2 { margin: 0; font-size: 20px; font-weight: 700; }
p { margin: 0; color: var(--soft); }
.ink { color: var(--ink); }
.quiet { color: var(--quiet); }
.soft { color: var(--soft); }
.go { color: var(--go); }
.error { color: var(--error); font-weight: 700; margin: 0; }
.big { font-size: 20px; }
.lead { font-size: 17px; }
.small { font-size: 16px; }
.tiny { font-size: 15px; }
.center { text-align: center; }
.bold { font-weight: 700; }
.normal { font-weight: 400; }
.pre { white-space: pre-line; }

.row { display: flex; align-items: center; gap: 12px; }
.row.top { align-items: flex-start; }
.row.tight { gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack.loose { gap: 20px; }
.stack.middle { align-items: center; gap: 16px; }
.roomy-gap { gap: 14px; }
.grow { flex-grow: 1; }
.push { margin-top: auto; }
.no-shrink { flex-shrink: 0; }
.inline-link { display: inline-block; margin-top: 4px; }

.icon { flex-shrink: 0; margin-top: 2px; }

.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: #FFFFFF;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.done-mark {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--go);
  display: inline-flex; align-items: center; justify-content: center;
}

.well { background: var(--well); border-radius: 12px; padding: 14px 16px; }
.notice { background: var(--well); border: 2px solid var(--ink); border-radius: 12px; padding: 14px 16px; }
.boxed { padding: 16px; border: 2px solid var(--ink); border-radius: var(--radius); gap: 14px; }

.names { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

/* Buttons: one green primary per screen, everything else outlined. */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; width: 100%;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  background: #FFFFFF; color: var(--ink);
  font-weight: 700; font-size: 18px;
  text-decoration: none; cursor: pointer;
  padding: 0 18px;
  text-align: center;
}
.btn:hover { color: var(--ink); background: var(--well); }
.btn.primary { min-height: 64px; border-color: var(--go); background: var(--go); color: #FFFFFF; font-size: 22px; border-radius: 16px; }
.btn.primary:hover { background: var(--go-dark); border-color: var(--go-dark); color: #FFFFFF; }
.btn.tile { flex-direction: column; gap: 8px; padding: 12px 4px; font-size: 15px; min-height: 0; }
.btn.compact-full { min-height: 52px; font-size: 17px; border-radius: 12px; }
.link-btn { background: none; border: 0; padding: 8px 0; text-decoration: underline; cursor: pointer; font-weight: 700; color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }
.link-btn.quiet { font-weight: 400; color: var(--quiet); }
.link-btn.full { width: 100%; justify-content: center; }

.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; align-self: flex-start; }

.footer-bar {
  margin: 0 -24px -28px;
  padding: 16px 24px 28px;
  border-top: 1px solid var(--line);
  background: #FFFFFF;
  display: flex; flex-direction: column; gap: 10px;
  position: sticky; bottom: 0;
}

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 12px; }

label.field { display: flex; flex-direction: column; gap: 10px; font-weight: 700; font-size: 20px; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=date], input[type=time] {
  min-height: 60px; width: 100%;
  border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 0 16px; font-size: 20px; font-weight: 400; background: #FFFFFF;
}
input[aria-invalid=true] { border-color: var(--error); border-width: 3px; }
input::placeholder { color: #767672; }

.choice { display: flex; align-items: center; gap: 14px; padding: 16px; border: 2px solid var(--ink); border-radius: var(--radius); cursor: pointer; font-weight: 400; font-size: 18px; }
.choice:has(input:checked) { border-color: var(--go); border-width: 3px; padding: 15px; }
.choice input { width: 26px; height: 26px; margin: 0; accent-color: var(--go); flex-shrink: 0; }
.choice .title { font-weight: 700; font-size: 19px; }
.check { display: flex; align-items: center; gap: 14px; min-height: 48px; cursor: pointer; font-weight: 400; }
.check input { width: 26px; height: 26px; margin: 0; accent-color: var(--go); flex-shrink: 0; }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.grid4 .btn.tile { font-size: 14px; }

/* The honeypot: off-screen rather than display:none, which some bots know to skip. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Event photo across the top of the event page; previews of it elsewhere. */
.hero { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--well); }
.preview { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; }

.avatar.small-av { width: 34px; height: 34px; font-size: 13px; background: #4A5D6B; }
.avatar.small-av.muted { background: #8A8A86; }
.avatar.big-av { width: 48px; height: 48px; font-size: 17px; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* Host screens */
.card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 2px solid var(--ink); border-radius: var(--radius); background: #FFFFFF; }
.card.dashed, .dashed { border: 2px dashed #B9B9B4; border-radius: var(--radius); padding: 14px 16px; }
.card .row { margin-top: 8px; }
.link-card { text-decoration: none; color: var(--ink); }
.link-card:hover { color: var(--ink); background: var(--well); }
.well.link-card:hover { background: #E9E9E6; }

.btn.compact { width: auto; min-height: 44px; padding: 0 16px; font-size: 16px; border-radius: 10px; }
.btn.dark { background: var(--ink); color: #FFFFFF; }
.btn.dark:hover { background: #000000; color: #FFFFFF; }
.btn.danger { border-color: var(--error); color: #FFFFFF; background: var(--error); min-height: 60px; }
.btn.danger:hover { background: #7E2222; color: #FFFFFF; }
.btn.kit { justify-content: space-between; text-align: left; font-size: 18px; }
.btn.kit .hint { font-weight: 400; font-size: 15px; color: var(--quiet); text-align: right; }
.btn.go-kit { background: var(--go); border-color: var(--go); color: #FFFFFF; }
.btn.go-kit .hint { color: #E3F2EA; }
.btn.go-kit:hover { background: var(--go-dark); border-color: var(--go-dark); color: #FFFFFF; }

.progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: -8px; }
.progress span { height: 6px; border-radius: 3px; background: var(--line); }
.progress span.on { background: var(--go); }
.chip { background: var(--well); border-radius: 12px; padding: 10px 14px; gap: 10px; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.indent { margin: -4px 0 6px 18px; padding-left: 16px; border-left: 3px solid var(--line); }
label.field.small-field { font-size: 17px; }
textarea {
  width: 100%; border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 14px 16px; font-size: 18px; font-weight: 400; background: #FFFFFF; resize: vertical;
}
input[type=file] { font-size: 16px; font-weight: 400; padding: 10px 0; max-width: 100%; }

.toggle-row { flex-direction: row; align-items: center; gap: 12px; cursor: pointer; }
.toggle-row.gone { opacity: 0.6; cursor: default; }
.switch {
  appearance: none; -webkit-appearance: none; margin: 0; flex-shrink: 0;
  width: 52px; height: 32px; border-radius: 16px; background: #B9B9B4; position: relative; cursor: pointer;
  transition: background 0.15s;
}
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #FFFFFF; transition: left 0.15s; }
.switch:checked { background: var(--go); }
.switch:checked::after { left: 23px; }
.switch:focus-visible { outline: 3px solid var(--go); outline-offset: 2px; }

.bubble { background: var(--well); border-radius: 18px 18px 18px 4px; padding: 14px 16px; font-size: 17px; }
.notice.go-notice { border-color: var(--go); }
.share-card { display: block; width: 100%; height: auto; border-radius: 16px; }
