/* What donors see, usually on a phone opened from WhatsApp: the drive, an amount, PayNow. See DESIGN.md. */
:root {
  --page: #f5f6f4;
  --ink: #18201c;
  --muted: #5f6964;
  --rule: #e4e7e4;
  --line: #d3d8d4;
  --green: #1d7a45; --greenBg: #e3f4e8;
  --amber: #925b00; --amberBg: #fdf0d5;
  --danger: #b42318;
  --brand: #1f5c45;
  --brandInk: #fff;
  --sans: 'DM Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: light;
}
*, ::before, ::after { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2 { margin: 0; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono { font-family: var(--mono); font-size: .92em; }
.icon { flex: none; display: block; }
:is(a, button, input, summary):focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }

.masthead { padding: 16px 20px 64px; background: var(--brand); color: var(--brandInk); }
.masthead.slim { padding-bottom: 56px; }
.masthead .org { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; text-decoration: none; }
.masthead .mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #ffffff2b; font-size: 17px; }
.masthead h1 { margin-top: 18px; font-size: clamp(27px, 7vw, 36px); }
.masthead .lede { margin-top: 8px; font-size: 17px; opacity: .9; }
.wrap { width: min(600px, 100%); margin: 0 auto; }
.content { display: grid; gap: 16px; margin-top: -44px; padding: 0 16px 48px; }
.card { padding: 20px; border: 1px solid var(--rule); border-radius: 16px; background: #fff; box-shadow: 0 1px 2px #0000000a, 0 6px 20px #00000008; }
.card > h2 { margin-bottom: 12px; font-size: 18px; }

/* Progress */
.progress { display: grid; gap: 10px; }
.raised { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.raised strong { font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.raised .pct { margin-left: auto; font-weight: 700; color: var(--brand); }
.bar { display: block; height: 10px; border-radius: 5px; background: #e9ecea; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 5px; background: var(--brand); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 14px; }
.facts span { display: inline-flex; align-items: center; gap: 6px; }
.facts b { color: var(--ink); }
.givers { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; }
.stackAv { display: flex; }
.stackAv .avatar { box-shadow: 0 0 0 2px #fff; }
.stackAv .avatar + .avatar { margin-left: -6px; }
.avatar { flex: none; display: inline-grid; place-items: center; border-radius: 50%; font-weight: 700; }

/* Giving */
.give { display: grid; gap: 12px; }
.give h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.amounts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.amounts button { min-height: 60px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: 700 21px/1 var(--sans); cursor: pointer; font-variant-numeric: tabular-nums; }
.amounts button:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, #fff); color: var(--brand); }
.other { display: flex; gap: 10px; }
.other .moneyInput { flex: 1; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
input:not([type=checkbox]) { width: 100%; min-height: 52px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: 500 17px/1.3 var(--sans); }
input:focus { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--brand) 18%, transparent); }
.moneyInput { position: relative; display: flex; align-items: center; }
.moneyInput > span { position: absolute; left: 14px; font-weight: 700; color: var(--muted); }
.moneyInput input { padding-left: 42px; font-weight: 700; }
.moneyInput input::placeholder { font-weight: 500; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 12px; font: 700 17px/1 var(--sans); text-decoration: none; cursor: pointer; }
.primary { border: 0; background: var(--brand); color: var(--brandInk); }
.secondary { border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
.wide { width: 100%; }
.error { color: var(--danger); font-size: 15px; font-weight: 600; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; }

.story { display: grid; gap: 12px; font-size: 16px; }
.story p { white-space: pre-line; }
.recent { margin: 0; padding: 0; list-style: none; }
.recent li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.recent li:first-child { border-top: 0; padding-top: 0; }
.recent li > span:nth-child(2) { flex: 1; font-weight: 600; }
.recent li b { font-variant-numeric: tabular-nums; }
.join { display: flex; align-items: center; gap: 14px; }
.join .waIcon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #e3f6ea; color: #128c4b; }
.join > span:nth-child(2) { flex: 1; display: grid; gap: 1px; }
.join .primary { min-height: 44px; padding: 0 16px; background: #1a8f4c; color: #fff; font-size: 15px; }
.closed { display: flex; align-items: center; gap: 10px; font-weight: 600; }

/* PayNow */
.payCard { display: grid; gap: 14px; justify-items: center; text-align: center; }
.payCard .amt { font-size: 42px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.paynow { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 14px; background: #f3e8f7; color: #7b2a8c; font-size: 13px; font-weight: 700; }
.qr { width: min(250px, 72vw); padding: 12px; border: 1px solid var(--rule); border-radius: 14px; background: #fff; }
.qr svg { display: block; width: 100%; height: auto; }
.payFacts { width: 100%; margin: 0; display: grid; text-align: left; }
.payFacts div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.payFacts dt { color: var(--muted); }
.payFacts dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.done { display: grid; gap: 12px; justify-items: center; text-align: center; }
.done .tick { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--greenBg); color: var(--green); }
.done h2 { font-size: 24px; }
.done .secondary { width: 100%; }
.state { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; background: var(--amberBg); color: var(--amber); font-size: 13px; font-weight: 600; }
.state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state.ok { background: var(--greenBg); color: var(--green); }

/* Org page */
.driveList { display: grid; gap: 12px; }
.driveLink { display: grid; gap: 10px; text-decoration: none; }
.driveLink h2 { font-size: 19px; }

/* Join page and printable poster */
.joinPage { display: grid; gap: 16px; justify-items: center; text-align: center; }
.joinPage .qr { width: min(260px, 70vw); }
.poster { width: 210mm; min-height: 297mm; margin: 0 auto; padding: 22mm 18mm; display: grid; align-content: start; justify-items: center; gap: 10mm; text-align: center; background: #fff; }
.poster h1 { font-size: 46pt; }
.poster .qr { width: 110mm; border: 0; }
.poster .big { font-size: 22pt; }
.poster .keyword { display: inline-block; padding: 4mm 8mm; border: 2px dashed var(--ink); border-radius: 4mm; font-family: var(--mono); font-size: 26pt; font-weight: 600; }
.poster .band { width: 100%; padding: 6mm; background: var(--brand); color: var(--brandInk); border-radius: 4mm; font-weight: 700; font-size: 18pt; }
.noPrint { margin: 12px auto; text-align: center; }
@media print { .noPrint { display: none; } body { background: #fff; } @page { size: A4; margin: 0; } }

.errorPage { display: grid; gap: 14px; place-content: center; min-height: 80dvh; padding: 24px; text-align: center; }

/* The drive's photo, laid over the coloured band like the cards below it. */
.hero { overflow: hidden; padding: 0; }
.hero img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.driveLink .thumb { width: calc(100% + 40px); margin: -20px -20px 4px; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 16px 16px 0 0; }

/* The front page */
.home .wrap { width: min(720px, 100%); }
.home .masthead { padding: 40px 0 72px; }
.home .masthead .wrap { padding: 0 16px; }
.home .masthead h1 { margin-top: 0; }
.home .masthead .lede { max-width: 34em; }
.film { display: grid; gap: 10px; padding: 12px; }
.film video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; background: #e9ecea; }
.film p { padding: 0 6px 2px; }
.tryList { padding: 0; overflow: hidden; }
.tryList a { display: flex; align-items: center; gap: 14px; padding: 16px 20px; text-decoration: none; }
.tryList a + a { border-top: 1px solid var(--rule); }
.tryList a:hover { background: #f8f9f8; }
.tryList a > span:nth-child(2) { flex: 1; display: grid; gap: 1px; }
.tryList a > .icon { color: var(--muted); }
.tryIcon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand); }
.aside { padding: 0 4px; }
