:root {
  --bg: #ffffff;
  --text: #3a3a3a;
  --muted: #666666;
  --line: #e6e6e6;
  --red: #B0102A;
  --red-bright: #c8102e;
  --red-dark: #8a0c20;
  --cream: #f3e6c8;
  --gold: #c9a227;
  --black: #000000;
  --green: #0b7a3b;
  --green-hover: #096c34;
  --green-border: #8dcca8;
  --green-soft: #f3faf5;
  --card: #ffffff;
  --soon: #f6f6f6;
  --focus: #B0102A;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
h1, h2, h3 {
  color: var(--red);
}
a { color: inherit; }
.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 20; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  border-bottom: 0;
  background: var(--black);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 8;
}
.doh-header-logo { width: 48px; height: 48px; object-fit: contain; flex: none; background: #000; }
.sd-logo { display: grid; place-items: center; margin-left: 4px; flex: none; }
.sd-logo img { width: 44px; height: 44px; border-radius: 50%; display: block; background: #000; }
.brand-name { color: var(--cream); }
.top .icon-btn { color: var(--cream); }
.top .icon-btn:hover, .top .icon-btn:focus-visible { background: #1a1a1a; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; min-width: 0; }
.brand-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.brand-mark { display: grid; place-items: center; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-weight: 800; font-size: 1rem; letter-spacing: -0.02em; }
.brand-sub { font-size: .72rem; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  appearance: none; border: 0; background: transparent; color: var(--text);
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; cursor: pointer; text-decoration: none;
}
.icon-btn:hover, .icon-btn:focus-visible { background: #f3f3f3; }

.menu-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 9;
}
.menu {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(360px, 92vw);
  background: #fff; z-index: 10; padding: 12px 18px 32px;
  box-shadow: -8px 0 30px rgba(0,0,0,.08);
  display: flex; flex-direction: column; gap: 4px;
  overflow: auto;
}
.menu[hidden], .menu-backdrop[hidden] { display: none; }
.menu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.menu a, .menu .linkish, .menu button.linkish {
  display: block; padding: 12px 4px; text-decoration: none; border: 0; background: none;
  font: inherit; text-align: left; color: var(--text); border-bottom: 1px solid var(--line); cursor: pointer;
}
.menu a[aria-current="page"] { font-weight: 700; }
.menu .te { display: block; color: var(--muted); font-size: .8rem; font-weight: 400; }

main { max-width: 640px; margin: 0 auto; padding: 20px 20px 48px; }
.hero { padding: 18px 0 8px; }
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2.2rem, 8vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.subline { margin: 0; font-size: 1.25rem; color: var(--text); }

.saviour-cta { margin: 0 0 24px; }
.saviour-cta .actions-row { margin: 0 0 10px; }
.saviour-cta .subline, .page-head .subline, .subline.under-btn {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--red);
  font-weight: 600;
}
.page-head .subline { margin: 0 0 8px; }
.subline.under-btn { margin: 10px 0 0; text-align: center; color: var(--red); font-size: 1rem; font-weight: 600; }
.hero-te { margin: 6px 0 0; color: var(--muted); }
.lead { color: var(--muted); margin: 0 0 22px; }

.signup-card {
  margin: 22px 0 16px;
  padding: 22px 20px 20px;
  border: 3px solid var(--green-border);
  border-radius: var(--radius);
  background: var(--green-soft);
}
.signup-card h2 { margin: 0 0 6px; font-size: 1.35rem; }
.signup-card p { margin: 0 0 16px; color: var(--text); }
.saviour-invite { margin: 24px 0; }
.saviour-invite h2 { font-size: 1.45rem; }
.saviour-invite .thank-saviour { margin: 0; font-weight: 700; color: var(--text); }
.saviour-invite.compact { padding: 16px 16px 14px; margin: 18px 0; }
.saviour-invite.compact h2 { font-size: 1.2rem; }
.saviour-invite.compact p { margin: 0 0 12px; font-size: .95rem; }
.saviour-invite.compact .btn { min-height: 46px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 10px 18px; border-radius: 8px;
  font-weight: 700; text-decoration: none; border: 2px solid transparent;
  cursor: pointer; font: inherit; font-weight: 700;
}
.btn-green { background: var(--red); color: #fff; border-color: var(--red); width: 100%; }
.btn-green:hover, .btn-green:focus-visible { background: var(--red-dark); border-color: var(--red-dark); }
.btn-outline { background: #fff; color: var(--red); border-color: var(--red); }
.btn-outline:hover, .btn-outline:focus-visible { background: #fdecee; border-color: var(--red-dark); color: var(--red-dark); }
.btn-small { min-height: 36px; padding: 4px 10px; font-size: .85rem; width: auto; background: #fff; border: 1px solid var(--line); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.already { margin: 8px 0 28px; }
.login-link { color: var(--red); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.login-link:hover { color: var(--red-dark); }

.causes { display: flex; flex-direction: column; gap: 14px; margin: 8px 0 28px; }
.causes h2, .about h2, .counts h2, .panel h2, .page-head h1 { letter-spacing: -0.02em; }
.cause-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 18px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  background: #fff;
}
.cause-card.live { border: 3px solid var(--green-border); background: var(--green-soft); }
.cause-card.soon { border: 1px dashed #cfcfcf; background: var(--soon); color: var(--muted); }
.cause-kicker {
  display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--green); margin-bottom: 4px;
}
.soon-tag { color: var(--muted); }
.cause-card h3 { margin: 0 0 4px; font-size: 1.25rem; }
.cause-card.soon h3 { color: var(--muted); }
.cause-sub { margin: 0 0 6px; font-weight: 600; color: var(--text); }
.cause-card p { margin: 0; }
.cause-links { display: inline-block; margin-top: 8px; color: var(--green); font-weight: 700; font-size: .95rem; }
.cause-icon { flex: none; }

.about { margin: 8px 0 28px; }
.about p, .muted, .hint, .fine, .sub { color: var(--muted); }
.page-head { margin: 4px 0 18px; }
.page-head h1 { margin: 0 0 6px; font-size: 2rem; }
.page-head .sub { margin: 0; }
.crumb { font-size: .9rem; color: var(--muted); margin: 0 0 8px; }
.crumb a { color: var(--text); text-decoration: none; }
.crumb a:hover { text-decoration: underline; color: var(--red); }
.te { color: var(--muted); font-weight: 400; font-size: .85em; }

.form, .panel { margin: 0 0 24px; }
.form label, .form .check { display: block; margin: 0 0 14px; font-weight: 600; }
.form label .te { display: inline; margin-left: 4px; }
.form input, .form select {
  display: block; width: 100%; margin-top: 6px; min-height: 48px;
  padding: 10px 12px; border: 1px solid #cfcfcf; border-radius: 8px;
  font: inherit; background: #fff; color: var(--text);
}
.form input:focus, .form select:focus { outline: 3px solid color-mix(in srgb, var(--green) 30%, white); border-color: var(--green); }
.check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 500 !important; }
.check input { width: auto !important; min-height: 0 !important; margin-top: 4px; flex: none; }
.hp { position: absolute; left: -10000px; height: 0; overflow: hidden; }
.hint { margin: -8px 0 16px; font-size: .9rem; }

.flash, .error {
  padding: 12px 14px; border-radius: 8px; margin: 0 0 16px;
}
.flash { background: var(--green-soft); border: 1px solid var(--green-border); }
.error { background: #fdecee; border: 1px solid #f3b4bc; }
.flash.code strong { display: inline-block; margin-left: 4px; letter-spacing: .06em; }

.counts { margin: 10px 0 20px; }
.count-grid {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.count-grid li {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 6px;
  text-align: center; background: #fff;
}
.count-grid .g { display: block; font-weight: 800; color: var(--red); }
.count-grid .n { display: block; font-size: 1.2rem; font-variant-numeric: tabular-nums; }

.panel {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  background: #fff;
}
.pill {
  display: inline-block; background: var(--green-soft); color: var(--green);
  font-weight: 800; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; margin-right: 6px;
}
.pill.off { background: #fdecee; color: var(--red); }
.pill.ok { background: var(--green-soft); color: var(--green); }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.actions-row .btn { width: auto; min-width: 160px; }
.inline, .inline-danger { display: inline; }
.facts { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0 0 18px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.tel { color: var(--red); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; font-size: 1.1rem; }

.result-group { margin: 24px 0; }
.result-group h2 { margin: 0 0 10px; }
.muted-count { color: var(--muted); font-weight: 500; font-size: 1rem; }
.results { display: flex; flex-direction: column; gap: 10px; }
.result {
  border: 1px solid var(--line); border-left: 4px solid var(--red);
  border-radius: 10px; padding: 14px 16px; background: #fff;
}
.result h3 { margin: 0 0 4px; }
.group-tag { display: inline-block; font-weight: 800; color: var(--red); margin: 0 0 6px; }
.result .meta { margin: 6px 0 0; color: var(--muted); font-size: .9rem; }

.table-wrap { overflow: auto; margin: 0 0 28px; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }

.foot {
  max-width: 640px; margin: 0 auto; padding: 8px 20px 40px;
  color: var(--muted); font-size: .9rem;
}
.foot a { color: var(--text); }
.foot a:hover { color: var(--red); }

@media (min-width: 860px) {
  main, .foot { max-width: 860px; }
  .top { padding-left: 28px; padding-right: 28px; }
  .causes { display: grid; grid-template-columns: 1fr 1fr; }
  .actions-row .btn-green { min-width: 200px; }
  .count-grid { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

.hero-band {
  background: #000;
  color: var(--cream);
  text-align: center;
  margin: 0 -20px 24px;
  padding: 28px 20px 32px;
}
.hero-band.compact { padding: 16px 20px 22px; }
.hero-logo { width: min(360px, 80vw); height: auto; display: block; margin: 0 auto 8px; }
.hero-logo.sm { width: min(220px, 60vw); }
.tagline {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--cream);
}
.hero-band .hero-te { color: #b8a888; }
.hero-band h1, .hero-band h2 { color: #fff; margin: 8px 0 4px; }

.easy input, .easy select { min-height: 52px; font-size: 1.05rem; }
.btn { min-height: 54px; font-size: 1.05rem; }
.btn-green { background: var(--red); border-color: var(--red); }
.btn-green:hover, .btn-green:focus-visible { background: var(--red-dark); }

.tiles { border: 0; padding: 0; margin: 0 0 18px; }
.tiles legend, .legend, .note-upload legend, .note-upload .legend { font-weight: 700; margin: 0 0 8px; color: var(--red); }
.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.tile-grid.three { grid-template-columns: repeat(3, 1fr); }
.tiles input { position: absolute; opacity: 0; pointer-events: none; }
.tile {
  display: grid; place-items: center;
  min-height: 64px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  cursor: pointer;
}
.tiles input:focus-visible + .tile { outline: 3px solid var(--cream); outline-offset: 2px; border-color: var(--red); }
.tiles input:checked + .tile { background: var(--red); color: #fff; border-color: var(--red); }

.stepper-wrap { margin: 0 0 18px; }
.stepper { display: flex; align-items: center; gap: 8px; max-width: 220px; }
.stepper input { text-align: center; font-size: 1.3rem; font-weight: 800; }
.step {
  width: 52px; height: 52px; border-radius: 12px; border: 2px solid var(--line);
  background: #fff; font-size: 1.6rem; cursor: pointer;
}

.avail-toggle {
  width: 100%; min-height: 64px; border-radius: 14px; border: 0;
  font: inherit; font-weight: 800; font-size: 1.2rem; cursor: pointer; color: #fff;
}
.avail-toggle.is-on { background: var(--green); }
.avail-toggle.is-off { background: #5c5c5c; }

.result.anon { border-left-color: var(--gold); }
.result.revealed { border-left-color: var(--red); }
.share-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
.share-bar .btn { width: auto; min-width: 140px; }
.share-text {
  white-space: pre-wrap; background: #111; color: var(--cream);
  padding: 16px; border-radius: 12px; font: 1rem/1.45 system-ui, sans-serif;
}
.success { text-align: center; }
.success-mark { font-size: 3rem; color: var(--green); margin: 8px 0 0; }
.facts.big { font-size: 1.05rem; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; place-items: end center; z-index: 20; }
.modal.show { display: grid; }
.sheet { background: #fff; width: 100%; max-width: 520px; margin: 0 auto; border-radius: 16px 16px 0 0; padding: 20px; }
.sharegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.sharegrid a { display: flex; gap: 8px; align-items: center; text-decoration: none; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.linkbox { font-size: .85rem; word-break: break-all; background: #f6f6f6; padding: 8px; border-radius: 8px; }

@media (min-width: 860px) {
  .hero-band { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding-left: calc(50vw - 430px); padding-right: calc(50vw - 430px); }
}
.btn-google {
  width: 100%; background: #fff; color: #1d1d1d; border: 1px solid #cfcfcf;
  gap: 10px; margin: 0 0 8px;
}
.btn-google:hover, .btn-google:focus-visible { border-color: #1d1d1d; background: #fafafa; }
.or { text-align: center; color: var(--muted); margin: 4px 0 16px; font-size: .95rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.note-upload { margin: 0 0 22px; border: 0; padding: 0; }
.note-upload legend, .note-upload .legend { font-weight: 700; margin: 0 0 8px; }
.note-actions { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.note-btn {
  display: flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 12px 16px; border-radius: 10px;
  border: 2px solid var(--red); background: #fff; color: var(--red); font-weight: 700;
  cursor: pointer; text-align: center; font-size: 1.05rem;
}
.note-btn:hover, .note-btn:focus-within { border-color: var(--red-dark); color: var(--red-dark); background: #fdecee; }
.note-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.note-fallback { margin: 8px 0; }
.note-upload.js .note-fallback { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.note-error { color: var(--red); font-weight: 600; margin: 8px 0; }
.note-preview { margin: 12px 0 0; padding: 0; }
.note-preview img {
  display: block; max-width: 100%; max-height: 200px; width: auto;
  border-radius: 10px; border: 1px solid var(--line); background: #111;
  object-fit: contain;
}
.note-preview figcaption { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }
.note-preview.pdf { padding: 16px; border: 1px dashed var(--line); border-radius: 10px; background: #fafafa; }
.pending-card {
  margin: 16px 0 24px; padding: 20px 18px;
  border: 2px solid #ead8a8; border-radius: var(--radius);
  background: #fff8e8;
}
.pending-card h2 { margin: 0 0 8px; font-size: 1.3rem; }
.pending-card p { margin: 0; }
.review-queue { display: flex; flex-direction: column; gap: 12px; margin: 0 0 28px; }
.review-card {
  border: 2px solid #ead8a8; border-radius: 12px; padding: 16px;
  background: #fff8e8;
}
.review-card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.review-card .meta, .review-card .reason { margin: 0 0 6px; color: var(--muted); font-size: .95rem; }
.review-card .actions-row { margin: 12px 0 0; flex-direction: column; }
.review-card .actions-row form, .review-card .actions-row .btn { width: 100%; min-width: 0; }
.review-card .actions-row form .btn { width: 100%; }
.pill.warn { background: #fff1c9; color: #8a5a00; }

.share-steps { display: flex; flex-direction: column; gap: 16px; margin: 0 0 22px; }
.share-step-block {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 10px;
  background: #fff;
}
.share-step-block h2 { margin: 0 0 8px; font-size: 1.15rem; }
.share-step-block ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: share-step;
}
.share-step-block li {
  position: relative;
  margin: 0 0 8px;
  padding: 4px 0 4px 44px;
  line-height: 1.4;
  counter-increment: share-step;
}
.share-step-block li::before {
  content: counter(share-step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
  line-height: 28px;
  text-align: center;
}
.share-hero { padding: 20px 16px 24px; }
.share-hero-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.share-hero .share-doh,
.share-hero .hero-logo {
  width: min(280px, 58vw);
  height: auto;
  margin: 0;
}
.share-hero .share-sd {
  width: min(140px, 32vw);
  height: auto;
  border-radius: 50%;
  background: #000;
  flex: none;
}
