/* public pages: plans, join, pass, phone key (same tokens as the admin console) */
:root {
  --bg: #f5f6f8; --card: #fff; --sunken: #f1f3f6; --ink: #0f172a; --ink-2: #334155; --mut: #64748b; --line: #e4e7ec;
  --acc: #2563eb; --acc-hover: #1d4ed8; --acc-soft: #eff4ff; --acc-ink: #fff;
  --ok: #15803d; --ok-bg: #ecfdf3; --bad: #b91c1c; --bad-bg: #fef2f2; --wait: #b45309; --wait-bg: #fffbeb;
  --sh: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);
  --sh-hover: 0 4px 14px rgba(15, 23, 42, .08);
  --ring: 0 0 0 3px color-mix(in srgb, var(--acc) 28%, transparent);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f15; --card: #121821; --sunken: #0e131a; --ink: #e6eaf0; --ink-2: #c3cad5; --mut: #8b96a5; --line: #232c38;
    --acc: #3b82f6; --acc-hover: #60a5fa; --acc-soft: #13213a; --acc-ink: #fff;
    --ok: #4ade80; --ok-bg: #0f2a1a; --bad: #f87171; --bad-bg: #2d1416; --wait: #fbbf24; --wait-bg: #2a2110;
    --sh: 0 1px 2px rgba(0, 0, 0, .3); --sh-hover: 0 6px 18px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 460px; margin: 0 auto; padding: 22px 16px 48px; overflow-wrap: anywhere; }   /* a long name or address never widens the page */
a { color: var(--acc); text-underline-offset: 2px; }
:focus-visible { outline: none; box-shadow: var(--ring); }

/* org header: a letter mark and the name */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--ink-2); margin-bottom: 26px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--acc); color: #fff; font-size: .95rem; font-weight: 700; }

h1 { font-size: 1.65rem; line-height: 1.2; letter-spacing: -.015em; margin: 0 0 12px; }
p { margin: 0 0 12px; }
.muted { color: var(--mut); display: block; font-size: .92rem; }
.price { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; margin: -4px 0 10px; }
.fine { color: var(--mut); font-size: .82rem; margin: 14px 0 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin: 14px 0; box-shadow: var(--sh); }
.card > :last-child { margin-bottom: 0; }
.center { text-align: center; }

/* plan list */
a.card.plan { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; color: inherit; text-decoration: none; padding: 18px 20px; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card.plan b { font-size: 1.05rem; }
a.card.plan .go { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--acc); font-weight: 650; font-size: .95rem; }
a.card.plan:hover { border-color: color-mix(in srgb, var(--acc) 45%, var(--line)); box-shadow: var(--sh-hover); }
a.card.plan:active { transform: scale(.99); }

/* forms */
.form label { display: block; font-size: .88rem; font-weight: 550; color: var(--ink-2); margin-bottom: 14px; }
.form input { display: block; width: 100%; height: 48px; margin-top: 6px; padding: 0 14px; font-family: inherit; font-size: 1rem; font-weight: 400; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.form input:hover { border-color: color-mix(in srgb, var(--mut) 45%, var(--line)); }
.form input:focus { outline: none; border-color: var(--acc); box-shadow: var(--ring); }
.form button { margin-top: 4px; }

/* buttons: full width, 48px touch targets */
button, .button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 12px 18px; border: 1px solid transparent; border-radius: 12px;
  background: var(--acc); color: var(--acc-ink); font-family: inherit; font-size: 1rem; font-weight: 650; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; }
button:hover, .button:hover { background: var(--acc-hover); }
button:active, .button:active { transform: scale(.985); }
button.ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
button.ghost:hover { background: var(--sunken); }
.button.wallet { background: #000; color: #fff; border-color: #000; }
/* the official Wallet buttons: never scaled freely or restyled; clear space around them (Google 8 dp, Apple 0.1x its height) */
.actions a.badge { justify-self: center; display: block; line-height: 0; border-radius: 26px; }   /* the grid's 10px gap is the clear space */
a.badge img { height: 50px; width: auto; display: block; }   /* never scaled freely: narrow screens get the condensed version (<picture>) */
a.badge:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.button.wallet:hover { background: #1f1f1f; }
@media (prefers-color-scheme: dark) { .button.wallet { border-color: #3a3a3a; } }

/* messages */
.note-ok, .alert { padding: 12px 14px; border-radius: 12px; font-size: .95rem; border: 1px solid transparent; }
.note-ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 22%, transparent); }
.alert { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 22%, transparent); }
.contact { text-align: center; color: var(--mut); font-size: .9rem; margin-top: 28px; }

/* phone key / status cards */
.pass .who { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.pass .who b { font-size: 1.15rem; }
.qrbox { background: #fff; border-radius: 14px; padding: 10px; margin: 16px auto 10px; max-width: 320px; border: 1px solid var(--line); }
.qrbox.small { max-width: 220px; }
.qr { display: block; width: 100%; height: auto; }
.hint { color: var(--mut); text-align: center; font-size: .9rem; margin: 10px 0; }
.hint:empty { display: none; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0 0; font-size: .95rem; }
dt { color: var(--mut); }
dd { margin: 0; }
.actions { display: grid; gap: 10px; margin-top: 14px; }
.actions:empty { display: none; }
.actions form { margin: 0; }
.spinner { width: 36px; height: 36px; margin: 6px auto 14px; border: 3px solid var(--line); border-top-color: var(--acc); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } * { transition: none !important; } }

/* the pass card (colours from the pass design) */
.wpass { background: var(--pbg); color: var(--pfg); border-radius: 20px; padding: 20px 20px 24px; margin: 4px 0 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .16), 0 2px 6px rgba(0, 0, 0, .08); }
.wpass .pf span { display: block; color: var(--plab); font: 600 .72rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em; text-transform: uppercase; }
.wpass .pf b { display: block; font-weight: 400; font-size: 1.15rem; line-height: 1.25; overflow-wrap: anywhere; }
.wtop { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 22px; }
.wlogo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wlogo img { max-height: 34px; max-width: 110px; }
.wlogo b { font-size: 1.15rem; font-weight: 600; }
.wtop .pf.r { text-align: right; }
.wtop .pf.r b { font-size: 1.1rem; }
.wmain { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; }
.wmain .pf.big b { font-size: 1.8rem; line-height: 1.15; }
.wthumb { width: 90px; height: 90px; object-fit: contain; flex: none; }
.wrow { display: flex; gap: 14px; margin-bottom: 10px; }
.wrow:empty { display: none; }
.wrow .pf { flex: 1 1 0; min-width: 0; }
.wrow.three .pf:nth-child(3) { text-align: right; }
.wcode { background: #fff; border-radius: 12px; padding: 10px; margin: 22px auto 0; max-width: 240px; }
.wcode .qr { display: block; width: 100%; height: auto; }
.wnote { text-align: center; margin: 22px 0 0; }
.wpass ~ .fine { text-align: center; }
