@import url("/tokens.css");
:root {
  /* app aliases onto the brand tokens (tokens.css) */
  --navy: var(--brand-navy);
  --navy-2: var(--brand-navy-deep);
  --bg: var(--mist);
  --card: var(--paper);
  --accent: var(--brand-orange);
  --accent-ink: var(--brand-orange-ink);
  --ok: var(--brand-green-deep);
  --ok-bg: #E4F5EC;
  --radius: 16px;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--navy-2); }

.top { background: var(--brand-navy); color: #fff; padding: 16px 20px 30px; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 492px; margin: 0 auto; }
.top .change { color: #fff; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.brand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.brand b { font-size: 22px; letter-spacing: -0.3px; }
.brand img { height: 36px; width: auto; display: block; }
.brand span { font-size: 13px; opacity: 0.8; }
.kiosk-line { margin: 14px auto 0; font-size: 15px; max-width: 492px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: #DCE6F2; }
.kiosk-line b { color: #fff; font-size: 17px; font-stretch: 110%; }
.kiosk-line .where { flex-basis: 100%; font-size: 14px; }
.pill { display: inline-block; font-size: 12px; font-weight: 640; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,0.16); color: #fff; }
.pill.open { background: #E4F5EC; color: var(--brand-green-deep); }
.pill.warn { background: #FFF1D1; color: #7A5200; }

main { flex: 1; width: 100%; max-width: 520px; margin: -18px auto 0; padding: 0 14px 24px; }
.card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: 0 1px 2px rgba(15,28,43,0.06); margin-bottom: 14px; }
h1 { font-size: 21px; margin: 0 0 6px; font-stretch: 112%; font-weight: 760; letter-spacing: -0.2px; }
h2 { font-size: 16px; margin: 0 0 12px; }
p { line-height: 1.5; margin: 0 0 10px; }
.muted { color: var(--muted); font-size: 14px; }

.steps { display: flex; gap: 6px; margin: 4px 0 14px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.35); }
.steps i.on { background: var(--brand-orange); }

label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=tel], input[type=number] {
  width: 100%; font-size: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
input:focus { outline: 2px solid var(--navy-2); outline-offset: 1px; }

.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px 14px; text-align: center; cursor: pointer; }
.drop b { display: block; font-size: 16px; margin-bottom: 4px; }
.drop.has { border-style: solid; border-color: var(--navy-2); background: var(--tint); }

.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; padding: 11px 6px; font-size: 15px; border: 0; background: #fff; color: var(--ink); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--navy); color: #fff; }
.seg button:disabled { color: #b5bfca; cursor: not-allowed; }

.row { display: flex; gap: 10px; }
.row > div { flex: 1; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; }
.stepper button { width: 44px; height: 44px; font-size: 20px; border: 0; background: none; cursor: pointer; }
.stepper input { border: 0; text-align: center; padding: 10px 0; }

.btn { display: block; width: 100%; padding: 15px; font-size: 17px; font-weight: 700; border: 0; border-radius: 12px; cursor: pointer; margin-top: 18px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.secondary { background: var(--tint); color: var(--ink); font-weight: 600; font-size: 15px; padding: 12px; }
.btn:disabled { opacity: 0.55; cursor: progress; }

.progress { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; margin-top: 10px; }
.progress div { height: 100%; width: 0; background: var(--navy-2); transition: width 0.2s; }

.summary { width: 100%; border-collapse: collapse; font-size: 15px; }
.summary td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.summary td:last-child { text-align: right; font-weight: 600; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; }
.total b { font-size: 28px; }

.note { font-size: 13px; color: var(--muted); background: var(--mist); border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-top: 12px; }
.alert.err { background: var(--err-bg); color: var(--err); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }

.spinner { width: 42px; height: 42px; border: 4px solid var(--line); border-top-color: var(--navy-2); border-radius: 50%; margin: 10px auto 14px; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { text-align: center; }

.code-panel { background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); padding: 18px; text-align: center; }
.code-panel small { display: block; font-weight: 600; letter-spacing: 0.4px; }
.code { font-size: 44px; font-weight: 800; font-stretch: 118%; letter-spacing: 8px; margin: 6px 0; font-variant-numeric: tabular-nums; }
ol.how { padding-left: 20px; margin: 14px 0 0; line-height: 1.7; }

footer { text-align: center; font-size: 12px; color: var(--muted); padding: 16px 14px 24px; }
.hidden { display: none !important; }

/* credits, warnings, legal pages */
.alert.warn { background: #fff4d6; color: #7a5200; }
.linkbtn { background: none; border: 0; padding: 6px 0; margin-top: 10px; color: var(--navy); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; cursor: pointer; }
.credit-box .inline { display: flex; gap: 8px; margin-top: 6px; }
.credit-box .inline input { flex: 1; text-transform: uppercase; letter-spacing: 1px; }
.credit-box .inline .btn { width: auto; margin: 0; padding: 0 18px; }
.credit-row { display: flex; justify-content: space-between; align-items: center; background: var(--ok-bg); color: var(--ok); border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-size: 14px; }
.credit-row .linkbtn { margin: 0; padding: 0; color: inherit; }
.code.credit { font-size: 26px; letter-spacing: 1px; white-space: nowrap; }
footer a { color: inherit; }
.legal { max-width: 760px; margin: 0 auto; padding: 8px 16px 32px; line-height: 1.6; }
.legal h1 { font-size: 26px; margin: 18px 0 4px; }
.legal h2 { font-size: 18px; margin: 26px 0 6px; }
.legal p, .legal li { font-size: 15px; }
.legal ul { padding-left: 20px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 8px 0; }
.legal th, .legal td { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.legal .meta { color: var(--muted); font-size: 13px; }

/* print flow additions (Nov 2026 brand) */
.price-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.linkbtn.inline { margin: 0; padding: 0; font-size: inherit; color: var(--brand-navy-deep); }
.drop { background: var(--mist); border-color: #C3CFDD; transition: border-color .15s, background .15s; }
.drop:hover, .drop:focus-visible { border-color: var(--brand-navy); background: var(--tint); outline: none; }
.drop-icon { width: 34px; height: 34px; color: var(--brand-navy); display: block; margin: 0 auto 10px; }
.trust { list-style: none; padding: 0; margin: 14px 0 0; font-size: 13.5px; color: var(--muted); display: grid; gap: 6px; }
.trust li { padding-left: 22px; position: relative; }
.trust li::before { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; background: var(--brand-green); border-radius: 0 100% 0 100%; }
:focus-visible { outline: 3px solid var(--brand-orange); outline-offset: 2px; }

/* bottom sheets */
body.sheet-open { overflow: hidden; }
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10,32,57,.5); }
.sheet { position: relative; width: 100%; max-width: 520px; background: #fff; border-radius: 22px 22px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
  animation: sheet-up .22s ease-out; max-height: 88vh; overflow: auto; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet h2 { font-size: 20px; font-stretch: 112%; margin-bottom: 4px; }
.sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.sources button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 6px; border: 1.5px solid var(--line);
  border-radius: 14px; background: #fff; font: inherit; font-weight: 640; font-size: 15px; color: var(--ink); cursor: pointer; }
.sources button:hover { border-color: var(--brand-navy); background: var(--tint); }
.sources svg { width: 28px; height: 28px; color: var(--brand-navy); }
.wa-help { background: var(--mist); border-radius: 12px; padding: 12px 14px; margin-top: 12px; font-size: 14px; }
.wa-help p { margin: 0 0 8px; }
.wa-help p:last-child { margin: 0; }

/* kiosk picker (cards come from kiosks.js) */
.pick-tools { display: flex; gap: 8px; margin: 14px 0 6px; }
.pick-tools input { flex: 1; font: inherit; font-size: 16px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; }
.pick-tools .btn { width: auto; margin: 0; padding: 0 14px; white-space: nowrap; }
.pick-list { list-style: none; margin: 8px 0 0; padding: 0; }
.pick-list .kiosk { padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.pick-list .kiosk:first-child { border-top: 0; }
.pick-list .kiosk-empty { padding: 14px 0; color: var(--muted); }
.k-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.k-title b { font-size: 17px; font-stretch: 110%; }
.k-state { font-size: 12px; font-weight: 640; padding: 2px 9px; border-radius: 999px; }
.k-state.open { background: #E4F5EC; color: var(--brand-green-deep); }
.k-state.warn { background: #FFF1D1; color: #7A5200; }
.k-state.off { background: #EAEEF3; color: var(--muted); }
.k-where { margin: 4px 0 2px; color: var(--muted); font-size: 14px; }
.k-price { margin: 0; font-size: 14px; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.k-per { color: var(--muted); }
.k-dist { font-weight: 600; color: var(--brand-navy-deep); }
.k-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.k-map { font-weight: 600; font-size: 14px; }
.k-go { display: inline-block; margin-left: auto; padding: 10px 18px; border-radius: 999px; background: var(--brand-orange); color: var(--brand-orange-ink);
  font-weight: 700; text-decoration: none; }
footer a { margin: 0 6px; }
.pick-list .k-go { width: auto; margin: 0 0 0 auto; padding: 10px 20px; font-size: 15px; display: inline-block; }

/* Two pages per side hint, and the "also sent by SMS" line under a code */
.hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.sms-note { font-size: 14px; color: var(--ink); margin: 12px 0 0; text-align: center; }
.sms-note::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-green, #159447); margin-right: 8px; vertical-align: 1px; }
.seg-price { display: block; font-size: 12px; font-weight: 600; opacity: .75; margin-top: 2px; }
.alert.info { background: #E6F0FA; color: #1D4670; }

/* payment waiting: what the M-Pesa prompt says */
.phone-ic { width: 60px; height: 60px; margin: 4px auto 12px; border-radius: 16px; background: #E3F4EA; border: 2px solid var(--brand-green); display: flex; align-items: center; justify-content: center; animation: nudge 1.6s ease-in-out infinite; }
.phone-ic svg { width: 28px; height: 28px; fill: none; stroke: var(--brand-green-deep, #0F7537); stroke-width: 2; stroke-linecap: round; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .phone-ic { animation: none; } }
.stk { background: #0E1B2C; color: #E7EDF5; border-radius: 14px; padding: 14px 16px; text-align: left; margin-top: 16px; font-size: 14px; line-height: 1.5; }
.stk-top { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #8FA3BC; padding-bottom: 10px; border-bottom: 1px solid #23344A; margin-bottom: 10px; }
.stk-live { color: #4ADE80; display: inline-flex; align-items: center; gap: 6px; }
.stk-live i { width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.stk p { margin: 0; } .stk b { color: #fff; } .stk .stk-payee { color: var(--brand-orange); }
.stk-pin { margin-top: 12px; background: #1A2A3F; border-radius: 8px; padding: 10px 12px; color: #8FA3BC; font-size: 13px; }
#stkRef, #stkAmt { white-space: nowrap; }
