@font-face { font-family: 'Archivo'; src: url(/assets/fonts/archivo.woff2) format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: 'JB Mono'; src: url(/assets/fonts/jbmono-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'JB Mono'; src: url(/assets/fonts/jbmono-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Playfair'; src: url(/assets/fonts/playfair-900.woff2) format('woff2'); font-weight: 900; font-display: swap; }

/* Colours follow the headline sponsor's identity: Econet blue and red on white. */
:root {
  --blue: #2c328b;
  --blue-d: #1f2470;
  --red: #e8222e;
  --grey: #79797b;
  --ink: #1b1f5e;
  --muted: #62658a;
  --wash: #f4f5f9;
  --line: #e1e3ee;
  --green: #12924a;
  --green-d: #0b6c36;
  --amber: #f5b400;
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JB Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 16px;
  --swoosh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 24' preserveAspectRatio='none'%3E%3Cpath d='M4 19 C 110 4 270 0 396 9' fill='none' stroke='%23e8222e' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.45 var(--sans); color: var(--ink); background: var(--wash); min-height: 100dvh; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-weight: 500; }
.wrap { width: min(100%, 560px); margin: 0 auto; padding: 0 16px; }
.kicker { font: 700 11px/1.2 var(--mono); letter-spacing: .18em; text-transform: uppercase; }
.swoosh { display: block; height: 14px; width: 72%; max-width: 340px; background: var(--swoosh) no-repeat center / 100% 100%; margin-top: 8px; }

/* ---------- sponsor ---------- */
.econet { background: #fff; text-align: center; padding: calc(env(safe-area-inset-top) + 14px) 16px 14px; }
.econet small { display: block; font: 700 10px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--grey); margin-bottom: 8px; }
.econet img { width: min(78%, 400px); height: auto; margin: 0 auto; }
.econet.slim { padding: 10px 16px; }
.econet.slim img { width: min(60%, 260px); }
.econet.slim small { margin-bottom: 6px; }
.econet.big { padding: 36px 16px 32px; margin-top: 8px; }
.econet.big small { font-size: 11px; margin-bottom: 14px; }
.econet.big img { width: min(88%, 460px); }
.funded { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.funded b { color: var(--ink); font-weight: 800; }
.scanpage .funded { color: #cfd1f2; margin: 0 14px calc(18px + env(safe-area-inset-bottom)); }
.scanpage .funded b { color: #fff; }
.pass .p-funded { background: #fff; text-align: center; font-size: 12px; color: var(--muted); padding: 10px 16px 12px; }
.pass .p-funded b { color: var(--ink); }
.result .econet small { margin-bottom: 6px; }
.adminpage .foot { padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 20px; border: 0; border-radius: 12px; font: 800 16px/1 var(--sans); text-decoration: none; background: var(--blue); color: #fff; cursor: pointer; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.block { width: 100%; }
.btn.red { background: var(--red); }
.btn.green { background: var(--green); }
.btn.white { background: #fff; color: var(--blue); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 2px var(--line); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- home ---------- */
.hero { background: var(--blue); color: #fff; padding: 22px 0 20px; }
.hero h1 { margin: 6px 0 0; font-weight: 900; font-stretch: 100%; font-size: clamp(34px, 10vw, 52px); line-height: .95; letter-spacing: -.01em; text-transform: uppercase; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-weight: 700; font-size: 17px; }
.hero .facts span { display: inline-flex; gap: 8px; align-items: center; }
.hero .facts b { color: #fff; }
.count { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; background: var(--red); border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: 15px; }
.count b { font-size: 20px; }
main.home { padding: 16px 0 28px; }
.stack { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.actions { display: grid; gap: 10px; }
.action { display: flex; align-items: center; gap: 14px; text-align: left; text-decoration: none; width: 100%; padding: 16px; border: 0; border-radius: var(--r); background: #fff; color: var(--ink); cursor: pointer; box-shadow: 0 1px 0 var(--line); }
.action .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--wash); color: var(--blue); flex: none; }
.action .ico svg { width: 24px; height: 24px; }
.action b { display: block; font-weight: 800; font-size: 18px; }
.action small { color: var(--muted); font-size: 14px; }
.action .go { margin-left: auto; font-weight: 900; color: var(--grey); }
.action.primary { background: var(--red); color: #fff; }
.action.primary .ico { background: rgba(255, 255, 255, .18); color: #fff; }
.action.primary small, .action.primary .go { color: #ffe1e3; }
.mypass { background: var(--blue); color: #fff; }
.mypass .ico { background: rgba(255, 255, 255, .16); color: #fff; }
.mypass small, .mypass .go { color: #cfd1f2; }
.card { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: 0 1px 0 var(--line); }
.card h2 { margin: 0 0 12px; font: 700 12px/1.2 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.card p { margin: 0 0 10px; }
.card p:last-child { margin-bottom: 0; }
.notice { background: var(--ink); color: #fff; border-radius: var(--r); padding: 14px 16px; }
.notice b { display: block; font: 700 11px/1.4 var(--mono); letter-spacing: .16em; color: #ffb3b8; margin-bottom: 4px; }
.notice div { white-space: pre-wrap; }
.fees { display: grid; gap: 10px; }
.fee { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.fee:first-child { border-top: 0; padding-top: 0; }
.fee b { font-weight: 900; font-size: 30px; line-height: 1; color: var(--blue); }
.fee.top b { color: var(--red); }
.fee ul { margin: 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.5; }
.deadline { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--wash); font-weight: 700; font-size: 14px; }
.payrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.payrow:first-of-type { border-top: 0; padding-top: 0; }
.payrow small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.payrow .v { font: 700 20px/1.25 var(--mono); }
.payrow .who { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.copy { border: 0; background: var(--wash); color: var(--blue); border-radius: 10px; padding: 8px 12px; font-weight: 800; font-size: 13px; cursor: pointer; }
.orgs { display: flex; align-items: center; gap: 16px; }
.orgs img { height: 58px; width: auto; }
.orgs .t { font-size: 13px; color: var(--muted); }
.orgs .t b { display: block; color: var(--ink); font-size: 16px; }
.partners { margin: 0 -6px; }
.partners img { width: 100%; height: auto; }
.contact { display: grid; gap: 8px; }
.contact a { font-weight: 700; text-decoration: none; }
footer.foot { padding: 8px 0 calc(28px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); font-size: 13px; }
footer.foot nav { display: flex; justify-content: center; gap: 18px; margin: 14px 0 8px; }
footer.foot a { color: var(--muted); font-weight: 700; }

/* ---------- forms, dialogs, feedback ---------- */
.f { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
input.in, textarea.in, select.in { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-size: 17px; outline: none; }
input.in:focus, textarea.in:focus { border-color: var(--blue); }
textarea.in { min-height: 110px; resize: vertical; line-height: 1.4; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: grid; place-items: center; min-height: 48px; border-radius: 12px; border: 2px solid var(--line); font-weight: 800; font-size: 14px; cursor: pointer; background: #fff; text-align: center; padding: 0 4px; }
.seg input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--red); }
dialog.sheet { width: min(100% - 24px, 520px); max-height: 88dvh; border: 0; border-radius: 20px; padding: 22px; color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
dialog.sheet::backdrop { background: rgba(20, 22, 70, .55); }
dialog.sheet h3 { margin: 0 0 6px; font-weight: 900; font-size: 22px; }
dialog.sheet p { margin: 0 0 14px; color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .btn { flex: 1 1 auto; }
.msg { padding: 12px 14px; border-radius: 12px; background: var(--wash); font-weight: 600; }
.msg.err { background: #fde7e9; color: #a3101b; }
.msg.ok { background: #e3f4ea; color: var(--green-d); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; opacity: 0; transition: .2s ease; z-index: 99; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font: 700 12px/1 var(--mono); background: rgba(255, 255, 255, .14); color: #fff; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; }
.pill.off i { background: var(--amber); }
.pin { display: grid; gap: 14px; }
.pin .dots { display: flex; justify-content: center; gap: 12px; min-height: 18px; }
.pin .dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.pin .dots i.on { background: var(--blue); }
.pin .keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pin .keys button { min-height: 60px; border: 0; border-radius: 14px; background: var(--wash); font: 800 26px/1 var(--sans); cursor: pointer; }
.pin .keys button:active { background: var(--line); }
.pin .keys .go { background: var(--blue); color: #fff; font-size: 17px; }

/* ---------- the digital pass ---------- */
body.passpage { background: var(--blue-d); }
.passwrap { padding: calc(env(safe-area-inset-top) + 12px) 12px calc(24px + env(safe-area-inset-bottom)); }
.pass { width: min(100%, 430px); margin: 0 auto; background: #fff; border-radius: 20px; overflow: hidden; color: var(--ink); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.pass .p-spons { padding: 14px 20px 10px; text-align: center; border-bottom: 1px solid var(--line); }
.pass .p-spons small { display: block; font: 700 9px/1 var(--mono); letter-spacing: .2em; color: var(--grey); margin-bottom: 6px; }
.pass .p-spons img { width: 74%; margin: 0 auto; }
.pass .p-top { background: var(--blue); color: #fff; padding: 14px 20px 16px; }
.pass .p-top .kicker { display: flex; justify-content: space-between; opacity: .85; }
.pass .p-top h1 { margin: 8px 0 0; font-weight: 900; font-size: clamp(26px, 8vw, 34px); line-height: 1; text-transform: uppercase; }
.pass .p-admit { display: grid; grid-template-columns: 1fr auto; background: var(--red); color: #fff; }
.pass .p-admit .a { font-weight: 900; font-stretch: 75%; font-size: clamp(32px, 10vw, 42px); line-height: 1; padding: 12px 20px; text-transform: uppercase; }
.pass .p-admit .t { background: var(--blue-d); padding: 8px 18px; text-align: right; display: flex; flex-direction: column; justify-content: center; }
.pass .p-admit .t small { font: 700 10px/1 var(--mono); letter-spacing: .2em; opacity: .8; }
.pass .p-admit .t b { font-weight: 900; font-size: 30px; line-height: 1.05; }
.pass .p-admit .t b.comp { font-size: 18px; font-stretch: 80%; text-transform: uppercase; }
.pass .p-holder { padding: 16px 20px 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.pass small.l { display: block; font: 700 10px/1 var(--mono); letter-spacing: .18em; color: var(--muted); margin-bottom: 6px; }
.pass .p-holder .nm { font-weight: 900; font-size: 24px; line-height: 1.1; }
.pass .p-holder .ph { font: 500 13px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.pass .p-qr { margin: 14px 20px 0; padding: 8px; border-radius: 14px; box-shadow: inset 0 0 0 2px var(--line); }
.pass .p-qr svg { width: 100%; height: auto; display: block; }
.pass .p-serial { text-align: center; font: 700 14px/1 var(--mono); letter-spacing: .04em; margin-top: 12px; }
.pass .p-facts { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 14px 20px 0; }
.pass .p-facts b { font-weight: 800; font-size: 16px; line-height: 1.2; }
.pass .p-inc { padding: 12px 20px 0; font-size: 14px; color: var(--muted); }
.pass .p-inc b { color: var(--ink); }
.pass .p-state { margin: 14px 20px 0; padding: 12px 14px; border-radius: 12px; display: flex; gap: 10px; align-items: center; font-weight: 800; background: var(--wash); }
.pass .p-state.ok { background: #e3f4ea; color: var(--green-d); }
.pass .p-state.in { background: var(--green); color: #fff; }
.pass .p-state.bad { background: #fde7e9; color: #a3101b; }
.pass .p-state svg { width: 22px; height: 22px; flex: none; }
.pass .p-live { display: flex; justify-content: space-between; align-items: center; margin: 12px 20px 16px; font: 700 12px/1 var(--mono); color: var(--muted); }
.pass .p-live i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 6px; animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.pass .p-stub { background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; font: 700 11px/1.4 var(--mono); letter-spacing: .12em; }
.pass .p-stub .num { font: 900 40px/1 var(--sans); letter-spacing: 0; }
.passbar { width: min(100%, 430px); margin: 14px auto 0; display: grid; gap: 10px; }
.passbar .row .btn { flex: 1 1 140px; }
.passbar .hint { color: #cfd1f2; font-size: 13px; text-align: center; margin: 0; }
.passbar .btn.ghost { color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .3); }

/* ---------- scanner ---------- */
body.scanpage { background: var(--blue-d); color: #fff; }
.scanhead { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--blue); }
.scanhead a.back { color: #fff; text-decoration: none; font-weight: 900; font-size: 22px; padding: 2px 8px; }
.scanhead h1 { margin: 0; font-weight: 900; font-size: 19px; text-transform: uppercase; flex: 1; }
.cam { position: relative; margin: 12px 14px 0; border-radius: 20px; overflow: hidden; background: #000; aspect-ratio: 1; max-height: 56dvh; width: calc(100% - 28px); }
.cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam .frame { position: absolute; inset: 16%; border-radius: 16px; border: 4px solid #fff; box-shadow: 0 0 0 999px rgba(0, 0, 0, .3); pointer-events: none; }
.cam .startcam { position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; text-align: center; padding: 24px; background: var(--blue); }
.cam .startcam p { margin: 0; color: #cfd1f2; }
.gatebar { margin: 12px 14px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gatebar div { background: rgba(255, 255, 255, .1); border-radius: 12px; padding: 10px 12px; }
.gatebar small { display: block; font: 700 10px/1 var(--mono); letter-spacing: .12em; color: #cfd1f2; text-transform: uppercase; }
.gatebar b { font-weight: 900; font-size: 24px; }
.scantools { margin: 12px 14px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.scantools .btn { flex: 1 1 auto; background: rgba(255, 255, 255, .12); }
.whoami { margin: 10px 14px 0; color: #cfd1f2; font-size: 13px; text-align: center; }
.publicnote { margin: 12px 14px 0; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .1); color: #e6e7fb; font-size: 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.scanpage .econet { margin: 14px 14px 0; border-radius: 16px; padding: 12px 16px; }
.result { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top) + 18px) 18px calc(14px + env(safe-area-inset-bottom)); color: #fff; overflow-y: auto; }
.result.ok { background: var(--green); }
.result.in { background: var(--green-d); }
.result.warn { background: var(--amber); color: var(--ink); }
.result.bad { background: var(--red); }
.result .ri { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .2); margin: 6px auto 10px; flex: none; }
.result.warn .ri { background: rgba(27, 31, 94, .1); }
.result .ri svg { width: 48px; height: 48px; }
.result h2 { margin: 0; text-align: center; font-weight: 900; font-stretch: 80%; font-size: clamp(38px, 12vw, 58px); line-height: .95; text-transform: uppercase; }
.result .sub { text-align: center; font-weight: 700; font-size: 18px; margin-top: 8px; }
.result .who { margin-top: 18px; background: rgba(255, 255, 255, .15); border-radius: 16px; padding: 14px 16px; }
.result.warn .who { background: rgba(27, 31, 94, .08); }
.result .who .nm { font-weight: 900; font-size: 28px; line-height: 1.1; }
.result .who .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font: 700 14px/1.3 var(--mono); }
.result .who .give { margin-top: 10px; font-weight: 700; font-size: 15px; }
.result .acts { margin-top: auto; padding-top: 18px; display: grid; gap: 10px; }
.result .admit { min-height: 80px; border-radius: 18px; font-size: 30px; font-weight: 900; background: #fff; color: var(--green-d); }
.result .btn.line { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.result.warn .btn.line { box-shadow: inset 0 0 0 2px rgba(27, 31, 94, .3); }
.result .undo { background: none; border: 0; color: inherit; text-decoration: underline; font-weight: 700; padding: 6px; cursor: pointer; }
.result .econet { margin-top: 12px; border-radius: 14px; padding: 10px 14px; }
.result .econet img { width: min(56%, 240px); }
.hits { display: grid; gap: 8px; margin-top: 12px; max-height: 50dvh; overflow-y: auto; }
.hits button { text-align: left; border: 0; background: var(--wash); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.hits button b { display: block; font-weight: 800; }
.hits button span { font: 500 13px/1.3 var(--mono); color: var(--muted); }

/* ---------- pass office (admin) ---------- */
.ahead { position: sticky; top: 0; z-index: 10; }
.ahead .bar { background: var(--blue); color: #fff; }
.ahead .bar .wrap { display: flex; align-items: center; gap: 10px; padding-top: 12px; }
.ahead h1 { margin: 0; font-weight: 900; font-size: 19px; text-transform: uppercase; flex: 1; }
.ahead h1 small { display: block; font: 700 10px/1.4 var(--mono); letter-spacing: .18em; opacity: .75; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-top: 8px; }
.tabs button { flex: none; border: 0; background: transparent; color: #cfd1f2; padding: 12px 10px; font-weight: 800; font-size: 15px; border-bottom: 4px solid transparent; cursor: pointer; }
.tabs button.on { color: #fff; border-color: var(--red); }
.apanel { padding: 16px 0 60px; }
.issued { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; }
.issued .q { border-radius: 10px; padding: 4px; box-shadow: inset 0 0 0 2px var(--line); }
.issued .q svg { width: 100%; height: auto; display: block; }
.issued .s { font: 700 13px/1.3 var(--mono); }
.issued .nm { font-weight: 900; font-size: 21px; line-height: 1.1; margin: 4px 0; }
.acts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.acts-grid .btn { min-height: 46px; font-size: 14px; }
.acts-grid .btn.wide { grid-column: 1 / -1; min-height: 54px; font-size: 16px; }
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 10px 0 12px; }
.filters button { flex: none; border: 0; border-radius: 999px; padding: 8px 14px; background: #fff; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: inset 0 0 0 2px var(--line); }
.filters button.on { background: var(--blue); color: #fff; box-shadow: none; }
.plist { display: grid; gap: 8px; }
.prow { background: #fff; border-radius: 14px; box-shadow: 0 1px 0 var(--line); overflow: hidden; }
.prow > button { width: 100%; border: 0; background: none; text-align: left; padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; cursor: pointer; }
.prow .s { font: 700 12px/1.3 var(--mono); color: var(--muted); }
.prow .nm { font-weight: 800; font-size: 17px; }
.prow .badges { grid-row: 1 / span 3; grid-column: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; justify-content: center; }
.badge { font: 700 11px/1 var(--mono); padding: 5px 8px; border-radius: 999px; background: var(--wash); color: var(--muted); white-space: nowrap; }
.badge.g { background: #e3f4ea; color: var(--green-d); }
.badge.n { background: #e6e7f7; color: var(--blue); }
.badge.r { background: #fde7e9; color: #a3101b; }
.badge.y { background: #fff1c7; color: #6e5100; }
.prow .more { padding: 0 14px 14px; }
.tilesx { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: 0 1px 0 var(--line); }
.stat small { display: block; font: 700 10px/1.2 var(--mono); letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.stat b { display: block; font-weight: 900; font-stretch: 80%; font-size: 38px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat b span { font-size: 20px; color: var(--muted); }
.stat.big { grid-column: 1 / -1; background: var(--blue); color: #fff; }
.stat.big small { color: #cfd1f2; }
.stat.big b { font-size: 60px; }
.stat.big b span { color: #cfd1f2; font-size: 26px; }
.meter { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .2); overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; background: #fff; border-radius: 999px; transition: width .6s ease; }
.tierline { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: center; font-weight: 700; padding: 6px 0; }
.tierline .bar { height: 12px; border-radius: 4px; background: var(--wash); overflow: hidden; position: relative; }
.tierline .bar i { position: absolute; inset: 0 auto 0 0; background: var(--blue); border-radius: 0 4px 4px 0; }
.tierline .num { font: 700 14px/1 var(--mono); font-variant-numeric: tabular-nums; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; white-space: nowrap; transform: translate(-50%, -110%); }
.feed > div { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.feed > div:first-child { border-top: 0; }
.feed .t { font: 700 13px/1.5 var(--mono); color: var(--muted); }
.feed .g { color: var(--muted); font-size: 13px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; animation: blink 1.2s steps(2, start) infinite; }
.empty { text-align: center; color: var(--muted); padding: 24px 10px; }
@media (min-width: 900px) {
  .apanel.wide .wrap { width: min(100%, 1040px); }
  .apanel.wide .livegrid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; align-items: start; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- install sheet ---------- */
dialog.install { padding: 20px; }
.inst-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.inst-head img { width: 64px; height: 64px; border-radius: 16px; }
.inst-head h3 { margin: 0; }
.inst-head p { margin: 2px 0 0; font-size: 13px; }
.inst-uses { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.inst-uses li { background: var(--wash); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.35; }
.inst-uses b { display: block; color: var(--blue); font-size: 15px; }
.inst-trust { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.inst-trust li { display: flex; gap: 8px; }
.inst-trust li::before { content: '✓'; color: var(--green); font-weight: 900; }
.inst-steps { display: grid; gap: 8px; }
.inst-steps > div { display: flex; gap: 12px; align-items: center; background: var(--wash); border-radius: 12px; padding: 12px; font-weight: 700; }
.inst-steps i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; flex: none; }
.inst-steps .ico { display: inline-grid; place-items: center; vertical-align: middle; color: #0a84ff; }
.inst-note { font-size: 13px; color: var(--muted); margin: 8px 0 0 !important; }
.linkish { background: none; border: 0; color: var(--blue); font-weight: 700; text-decoration: underline; cursor: pointer; padding: 6px 0; }
.fine { font-size: 12px; color: var(--muted); margin: 10px 0 0 !important; }

/* ---------- weather, map, tips ---------- */
.wx-main { display: flex; gap: 14px; align-items: center; }
.wx-icon { font-size: 46px; line-height: 1; }
.wx-main b { display: block; font-weight: 900; font-size: 24px; }
.wx-main span { color: var(--muted); font-size: 14px; }
.wx-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.wx-slots > div { background: var(--wash); border-radius: 12px; padding: 8px 4px; text-align: center; }
.wx-slots small { display: block; font: 700 11px/1 var(--mono); color: var(--muted); }
.wx-slots .wx-i { display: block; font-size: 24px; margin: 4px 0; }
.wx-slots b { font-weight: 900; }
.map { border-radius: 12px; overflow: hidden; background: var(--wash); aspect-ratio: 4 / 3; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.tips li { position: relative; padding-left: 20px; }
.tips li::before { content: '+'; position: absolute; left: 0; color: var(--red); font-weight: 900; }

/* ---------- ticket page ---------- */
.tview { width: min(100%, 460px); margin: 0 auto; padding: calc(env(safe-area-inset-top) + 12px) 12px calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.tstatus { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .12); color: #fff; font-weight: 800; }
.tstatus svg { width: 22px; height: 22px; flex: none; }
.tstatus.ok { background: #e3f4ea; color: var(--green-d); }
.tstatus.in { background: var(--green); color: #fff; }
.tstatus.bad { background: #fde7e9; color: #a3101b; }
.tswitch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: rgba(255, 255, 255, .1); padding: 4px; border-radius: 12px; }
.tswitch button { border: 0; border-radius: 9px; padding: 10px; background: transparent; color: #cfd1f2; font-weight: 800; cursor: pointer; }
.tswitch button.on { background: #fff; color: var(--blue); }
.tcar { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; scrollbar-width: none; border-radius: 18px; }
.tcar::-webkit-scrollbar { display: none; }
.tpage { flex: 0 0 100%; width: 100%; height: auto; scroll-snap-align: center; border-radius: 18px; display: block; }
.tview .passbar { width: 100%; margin: 0; }

/* ---------- pass office: issue form ---------- */
label.check { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 15px; cursor: pointer; }
label.check input { width: 22px; height: 22px; accent-color: var(--blue); flex: none; }
.seg.sizes { grid-template-columns: repeat(7, 1fr); }
.seg.sizes span { min-height: 44px; font-size: 13px; }
.tthumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 0; }
.tthumbs img { width: 100%; height: auto; border-radius: 12px; display: block; }
.sizes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.sizes-grid > div { background: var(--wash); border-radius: 10px; padding: 8px; text-align: center; }
.sizes-grid small { display: block; font: 700 11px/1 var(--mono); color: var(--muted); }
.sizes-grid b { font-weight: 900; font-size: 22px; }

/* ---------- team sign-in and home ---------- */
.me { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--red); color: #fff; font: 900 14px/1 var(--sans); letter-spacing: .02em; cursor: pointer; flex: none; }
.signin { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 18px 40px rgba(27, 31, 94, .08); }
.si-head { display: flex; gap: 14px; align-items: center; padding: 20px 18px 18px; background: linear-gradient(135deg, var(--blue) 0%, var(--blue-d) 100%); color: #fff; position: relative; }
.si-head::after { content: ''; position: absolute; left: 18px; right: 18px; bottom: 0; height: 10px; background: var(--swoosh) center / 100% 100% no-repeat; }
.si-head img { width: 64px; height: 64px; border-radius: 50%; background: #fff; padding: 4px; flex: none; }
.si-head small { display: block; font: 700 10px/1.4 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: #cfd1f2; }
.si-head h2 { margin: 2px 0 4px; font-weight: 900; font-size: 28px; line-height: 1; text-transform: uppercase; }
.si-head p { margin: 0; font-size: 14px; color: #e3e4fb; }
.si-body { padding: 18px; display: grid; gap: 14px; }
.si-msg { margin: 0; text-align: center; font-weight: 700; color: var(--muted); min-height: 1.45em; }
.si-msg.err { color: #a3101b; }
.si-lock { margin: 0; display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); text-align: center; }
.si-lock span svg { width: 14px; height: 14px; display: block; }
.safe h2 { display: flex; align-items: center; gap: 8px; }
.safe h2 svg { width: 18px; height: 18px; color: var(--green); }
.safe-me { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.safe-me .btn { flex: none; }

.hello { background: linear-gradient(140deg, var(--blue) 0%, var(--blue-d) 100%); color: #fff; border-radius: 20px; padding: 20px 18px 18px; position: relative; overflow: hidden; }
.hello::before { content: ''; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: url(/assets/img/emblem.webp) center / 120% no-repeat; opacity: .12; }
.hello > small { display: block; font: 700 10px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #cfd1f2; position: relative; }
.hello h2 { margin: 8px 0 8px; font-weight: 900; font-size: clamp(28px, 8vw, 38px); line-height: 1; position: relative; }
.hello .role { display: inline-block; background: #fff; color: var(--blue); font-weight: 800; font-size: 13px; padding: 6px 10px; border-radius: 8px; position: relative; }
.hello p { margin: 12px 0 0; color: #e3e4fb; font-size: 15px; position: relative; }
.hello-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; position: relative; }
.hello-chips .count { margin: 0; }
.hello .chip { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-weight: 800; font-size: 14px; }
.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qa { display: grid; gap: 10px; align-content: start; text-align: left; text-decoration: none; padding: 14px; border: 0; border-radius: var(--r); background: #fff; color: var(--ink); cursor: pointer; box-shadow: 0 1px 0 var(--line); min-height: 112px; }
.qa .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--wash); color: var(--blue); }
.qa .ico svg { width: 22px; height: 22px; }
.qa b { display: block; font-weight: 800; font-size: 16px; line-height: 1.15; }
.qa small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.qa.red { background: var(--red); color: #fff; }
.qa.blue { background: var(--blue); color: #fff; }
.qa.red .ico, .qa.blue .ico { background: rgba(255, 255, 255, .18); color: #fff; }
.qa.red small { color: #ffe1e3; }
.qa.blue small { color: #cfd1f2; }
.qa:active { transform: scale(.98); }
.tierchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tierchips span { background: rgba(255, 255, 255, .14); border-radius: 999px; padding: 5px 10px; font-weight: 700; font-size: 13px; }
.stat .tierchips b { display: inline; font-size: 13px; font-stretch: 100%; line-height: 1; color: #fff; }
.stat.warn { background: #fff1c7; cursor: pointer; }
.stat.warn small { color: #6e5100; }
.glance { display: grid; gap: 10px; }
.glance > div { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.glance > div:last-child { border-bottom: 0; padding-bottom: 0; }
.glance small { font: 700 10px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.glance b { font-weight: 800; font-size: 16px; }
.glance .fine { font-size: 15px; color: var(--ink); }

/* ---------- walk page: dial, fold-out sections, help ---------- */
.payacts { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 8px; }
.payacts .copy, .payacts .dialbtn { min-height: 44px; justify-content: center; font-size: 14px; }
.dialbtn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: var(--blue); color: #fff; border-radius: 10px; padding: 8px 12px; font: 700 14px/1 var(--mono); cursor: pointer; white-space: nowrap; }
.dialbtn svg { width: 15px; height: 15px; display: block; }
.btn svg { width: 20px; height: 20px; display: block; }
a.tel { font-weight: 800; text-decoration: none; }
details.fold { padding: 0; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary > span { flex: 1; }
details.fold > summary b { display: block; font: 700 12px/1.2 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
details.fold > summary small { display: block; margin-top: 4px; font-size: 15px; color: var(--ink); font-weight: 600; }
details.fold > summary::after { content: '+'; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--wash); color: var(--blue); font-weight: 900; font-size: 20px; }
details.fold[open] > summary::after { content: '−'; }
.fold-body { padding: 0 18px 18px; }
.action.help .ico { background: #fde7e9; color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 9px 14px; border-radius: 999px; background: var(--wash); border: 2px solid var(--line); font-weight: 700; font-size: 15px; color: var(--ink); }
.chips input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.chips input:focus-visible + span { outline: 3px solid var(--blue); }
.helpsheet { display: grid; gap: 12px; }
.helpsheet:not([open]) { display: none; }
.helpsheet p { margin: 0 !important; }
.help-top { display: flex; align-items: center; gap: 12px; }
.help-top h3 { margin: 0; }
.sos { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; flex: none; }
.sos svg { width: 26px; height: 26px; }
.btn.big { min-height: 60px; font-size: 18px; }
.msg.big { font-size: 16px; line-height: 1.45; }

/* ---------- getting home ---------- */
.navback { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 10px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 800; font-size: 15px; text-decoration: none; }
.navback span { font-size: 24px; line-height: 1; margin-top: -2px; }
.tnav { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.navhelp { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--red); color: #fff; font-weight: 800; font-size: 15px; cursor: pointer; }
.navhelp svg { width: 18px; height: 18px; display: block; }
.backlink { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 800; text-decoration: none; padding: 6px 0; }

/* ---------- ledger, activity log, help requests ---------- */
.prow .sub { font: 500 12px/1.4 var(--mono); color: var(--muted); }
.amt { font-weight: 900; font-stretch: 85%; font-size: 26px; color: var(--blue); white-space: nowrap; }
.stat em { display: block; font-style: normal; font: 700 12px/1.2 var(--mono); color: var(--muted); margin-top: 2px; }
.ledger { display: grid; }
.lrow, .logrow { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.ledger > :first-child { border-top: 0; }
.logrow { grid-template-columns: 54px minmax(0, 1fr); }
.l-when b { display: block; font: 700 13px/1.2 var(--mono); }
.l-when small { display: block; font: 500 12px/1.3 var(--mono); color: var(--muted); }
.l-who { min-width: 0; }
.l-who b { display: block; font-weight: 800; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.l-who small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.l-amt { font-weight: 900; font-size: 17px; font-variant-numeric: tabular-nums; color: var(--blue); }
.lrow.void .l-who b { text-decoration: line-through; color: var(--muted); }
.lrow.void .l-amt { color: #a3101b; font-size: 13px; }
.logrow.log-signin-failed .l-who b, .logrow.log-cancel .l-who b { color: #a3101b; }
.logrow.log-help .l-who b { color: var(--red); }
.alerts { background: #fde7e9; border-bottom: 3px solid var(--red); padding: 12px 0; }
.alert-head { display: flex; align-items: center; gap: 10px; font-size: 18px; color: #a3101b; }
.alert-head .sos { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); box-shadow: 0 0 0 8px rgba(232, 34, 46, .15); } }
.helpcard { background: #fff; border-radius: 14px; padding: 14px; display: grid; gap: 6px; box-shadow: 0 1px 0 var(--line); }
.helpcard.open { box-shadow: inset 4px 0 0 var(--red), 0 1px 0 var(--line); }
.hc-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.hc-kind { background: var(--red); color: #fff; border-radius: 999px; padding: 4px 10px; font-weight: 800; font-size: 13px; }
.helpcard:not(.open) .hc-kind { background: var(--wash); color: var(--muted); }
.hc-time { font: 500 12px/1.3 var(--mono); color: var(--muted); text-align: right; }
.hc-name { font-size: 19px; font-weight: 900; }
.hc-meta, .hc-done { font: 500 13px/1.4 var(--mono); color: var(--muted); }
.hc-note { font-style: italic; }
.hc-loc { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.hc-loc svg { width: 16px; height: 16px; display: block; color: var(--red); }
.hc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.hc-acts .btn { flex: 1 1 auto; gap: 6px; }
.hc-acts .btn svg { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { .alert-head .sos { animation: none; } }
