/* ShelfLink: one phone-width column, sticky header, fixed bottom tabs. */
[hidden] { display: none !important; }
:root {
  --bg: #F3F6F4; --surface: #FFFFFF; --surface-2: #EAF0EC; --line: #D8E0DC; --line-strong: #7D8B86;
  --fg: #0F1F1A; --muted: #4B5B55;
  --accent: #0B6E4F; --accent-ink: #FFFFFF; --accent-ink-2: #D7EFE6; --accent-soft: #E1F1EA;
  --ok: #0B5A40; --ok-soft: #E3F2EC; --warn: #8A4A0B; --warn-soft: #FCEFD9; --bad: #9F1D12; --bad-soft: #FDE7E4;
  --shadow: 0 12px 32px rgba(15, 31, 26, .18);
  --font-ui: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D1513; --surface: #15211D; --surface-2: #1C2B26; --line: #2A3B35; --line-strong: #6E807A;
    --fg: #E7EFEB; --muted: #A3B3AD;
    --accent: #45C495; --accent-ink: #05261A; --accent-ink-2: #0E3A2A; --accent-soft: #163A2D;
    --ok: #7ED3AE; --ok-soft: #173A2C; --warn: #F1B56B; --warn-soft: #3A2A14; --bad: #F4978C; --bad-soft: #43201C;
    --shadow: 0 12px 32px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--font-ui); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
img { max-width: 100%; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 16px; }

.wrap {
  max-width: 560px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 12px; padding-block: 10px; }
.brand { display: flex; flex-direction: column; line-height: 1.15; text-decoration: none; min-width: 0; }
.brand b { font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--accent); }
.brand span { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; color: var(--fg); text-decoration: none; cursor: pointer;
}
.dot-badge {
  position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--bad); color: var(--surface); font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.chip-link { font-size: 12.5px; font-weight: 700; text-decoration: none; padding: 8px 12px; border-radius: 16px; background: var(--accent-soft); color: var(--ok); }
.env-bar { background: var(--warn-soft); color: var(--warn); font-size: 12.5px; font-weight: 700; text-align: center; padding: 6px 16px; }

.main { padding-block: 16px 120px; display: flex; flex-direction: column; gap: 18px; }
.main.no-tabs { padding-bottom: 48px; }

.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-top { display: flex; align-items: flex-start; gap: 12px; }
.between { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.h2 { font-size: 16px; font-weight: 700; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.meta { font-size: 12.5px; color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .01em; }
.num { font-variant-numeric: tabular-nums; }
.item-name { font-size: 14.5px; font-weight: 600; }
.price { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lead { font-size: 14px; color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
a.card { color: var(--fg); text-decoration: none; }
a.card:hover { border-color: var(--line-strong); }
.card.accent { border: 1.5px solid var(--accent); }
.list { display: flex; flex-direction: column; gap: 10px; }

.hero { background: var(--accent); color: var(--accent-ink); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.hero .sub { font-size: 13px; color: var(--accent-ink-2); }
.hero .big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero .actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.hero .actions > * { flex: 1 1 140px; }

.btn {
  min-height: 46px; padding: 0 16px; border-radius: 11px; border: 1.5px solid var(--accent); background: var(--accent);
  color: var(--accent-ink); font-weight: 700; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; text-decoration: none; text-align: center;
}
.btn-ghost { background: transparent; color: var(--accent); }
.btn-quiet { background: var(--surface); color: var(--fg); border: 1px solid var(--line-strong); font-weight: 600; }
.btn-danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn-on-accent { background: var(--accent-ink); color: var(--accent); border-color: var(--accent-ink); }
.btn-on-accent-ghost { background: transparent; color: var(--accent-ink); border-color: var(--accent-ink); }
.btn-block { width: 100%; min-height: 52px; font-size: 15px; }
.btn-small { min-height: 44px; padding: 0 12px; font-size: 13px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.link { background: none; border: none; padding: 0; min-height: 44px; color: var(--accent); font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
form.inline { display: inline; }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.pill.ok { color: var(--ok); background: var(--ok-soft); }
.pill.warn { color: var(--warn); background: var(--warn-soft); }
.pill.bad { color: var(--bad); background: var(--bad-soft); }
.pill.neutral { color: var(--muted); background: var(--surface-2); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { min-height: 38px; padding: 0 13px; border-radius: 19px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; color: var(--fg); }
.chip[aria-current="true"], .chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ok); font-weight: 700; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.seg a { min-height: 40px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13.5px; color: var(--muted); text-decoration: none; }
.seg a[aria-current="page"] { background: var(--surface); color: var(--fg); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-size: 13px; font-weight: 600; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field select, .field textarea {
  min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 15px; width: 100%;
}
.field textarea { padding: 12px 14px; min-height: 96px; }
.field input[type="file"] { font-size: 13.5px; }
.field .hint, .helptext { font-size: 12px; color: var(--muted); }
.field-error, .errorlist { color: var(--bad); font-size: 12.5px; font-weight: 600; }
.errorlist { margin: 0; padding: 0; list-style: none; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--bad) !important; }
.tick { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; cursor: pointer; }
.tick input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.search { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 6px 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); }
.search input { flex: 1; min-width: 0; min-height: 44px; border: none; background: none; color: var(--fg); font-size: 15px; }
.search input:focus { outline: none; }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.sort { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-left: auto; }
.sort select { min-height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 0 8px; font-size: 12.5px; }

.notice { border-radius: 12px; padding: 12px 14px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.notice svg { flex-shrink: 0; margin-top: 1px; }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.info { background: var(--surface-2); color: var(--fg); }
a.notice { text-decoration: none; }
.messages { display: flex; flex-direction: column; gap: 8px; }

.sum { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.sum > div { display: flex; justify-content: space-between; gap: 12px; }
.sum .total { font-size: 16px; font-weight: 800; padding-top: 6px; border-top: 1px solid var(--line); }
.kv { display: flex; flex-direction: column; margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv > div:last-child { border-bottom: none; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.payout { background: var(--ok-soft); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 3px; }
.payout .label { font-size: 12px; font-weight: 700; color: var(--ok); }
.payout .amt { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.steps li { display: flex; flex-direction: column; gap: 6px; font-size: 10.5px; font-weight: 600; color: var(--muted); line-height: 1.2; }
.steps li::before { content: ""; height: 5px; border-radius: 3px; background: var(--line); }
.steps li.done { color: var(--fg); }
.steps li.done::before { background: var(--ok); }
.steps li.next { color: var(--accent); font-weight: 700; }
.steps li.next::before { background: linear-gradient(90deg, var(--accent) 0 35%, var(--line) 35% 100%); }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.timeline li { display: flex; gap: 10px; font-size: 13px; }
.timeline .when { color: var(--muted); min-width: 92px; font-variant-numeric: tabular-nums; }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--fg); }
.kpi b { font-size: 22px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi.alert b { color: var(--bad); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 12.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
tr:last-child td { border-bottom: none; }

.empty { text-align: center; padding: 28px 16px; color: var(--muted); font-size: 13.5px; border: 1.5px dashed var(--line); border-radius: 14px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line);
  padding-top: 6px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px));
}
.tabs-in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tabs-in.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tabs-in.n6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tab { position: relative; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none; }
.tab[aria-current="page"] { color: var(--accent); font-weight: 800; }

.auth { max-width: 420px; margin: 24px auto 0; width: 100%; }
.landing-hero { display: flex; flex-direction: column; gap: 14px; padding-block: 12px 4px; }
.landing-hero .title { font-size: 30px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.facts li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.facts svg { color: var(--ok); flex-shrink: 0; margin-top: 1px; }

.phone-wait { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 12px 0; }
.phone-wait .ring { width: 72px; height: 72px; border-radius: 36px; background: var(--accent-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; }
@media (prefers-reduced-motion: no-preference) {
  .phone-wait .ring.pulse { animation: pulse 1.6s ease-in-out infinite; }
  @keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
}
.hidden-until-ready[hidden] { display: none !important; }

@media (max-width: 360px) {
  .two, .kpis { grid-template-columns: 1fr; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Pharmacy tools: generic finder, shortages, disposal */
.steps.n6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.choices { border: 0; margin: 0; padding: 0; min-width: 0; }
.choices legend { padding: 0; margin-bottom: 6px; }
.choice { display: flex; gap: 10px; align-items: center; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-size: 14px; font-weight: 500; cursor: pointer; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex-shrink: 0; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.choice-rich { align-items: flex-start; padding-block: 12px; min-height: 0; }
.choice-rich input { margin-top: 2px; }
.choice-rich .num { font-weight: 700; white-space: nowrap; }
.choice.is-off { opacity: .55; cursor: not-allowed; }
.stack-xs { display: flex; flex-direction: column; gap: 2px; }
.calc-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.calc-grid .sum + .sum { border-top: 1px dashed var(--line); padding-top: 8px; }
.num.neg, td.neg { color: var(--bad); font-weight: 700; }
tr.is-current td { background: var(--accent-soft); font-weight: 700; }
.card.tool { flex-direction: row; align-items: flex-start; gap: 12px; text-decoration: none; color: var(--fg); }
.tool-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--ok); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.h2 svg { vertical-align: -3px; color: var(--accent); }
.howto { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.doc { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.sign-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.sign { display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px; font-size: 12.5px; }
.sign span { border-bottom: 1px dotted var(--line-strong); padding-bottom: 4px; }
tfoot th, tfoot td { background: var(--surface-2); font-weight: 700; border-top: 1px solid var(--line); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; border: 0; padding: 0; margin: 0; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { font-size: 34px; line-height: 1; color: var(--line-strong); cursor: pointer; padding: 4px; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #E3A008; }
.stars input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.rating { color: #B7791F; font-weight: 700; }
.invite-link { font-family: var(--mono, ui-monospace, monospace); font-size: 13px; word-break: break-all; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.map { height: 260px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); margin: 8px 0; z-index: 0; }
.map:empty::after { content: "Map loads when the rider shares a location."; display: block; padding: 16px; font-size: 13px; color: var(--muted, #4B5B55); }
.rider-dot { display: block; width: 18px; height: 18px; border-radius: 50%; background: #0B6E4F; border: 3px solid #fff; box-shadow: 0 0 0 2px #0B6E4F, 0 2px 6px rgba(0,0,0,.3); }
.stop-dot { display: block; width: 14px; height: 14px; border-radius: 4px; background: #E3A008; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.stop-dot.to { background: #B42318; }
.pod { display: block; max-width: 100%; max-height: 320px; border-radius: 10px; border: 1px solid var(--line); }
.code-big { font-size: 20px; letter-spacing: 3px; }
.legal-links { margin-top: 28px; font-size: 12.5px; color: var(--muted, #4B5B55); text-align: center; }
.legal-links a { color: inherit; }
.legal h2 { font-size: 17px; margin: 18px 0 6px; }
.legal p, .legal li { font-size: 14.5px; line-height: 1.6; }
.legal ul { padding-left: 20px; margin: 6px 0; }
@media print {
  .legal-links { display: none; }
  .top, .tabs, .env-bar, .messages, .no-print, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .main, .wrap { max-width: none; padding: 0; margin: 0; }
  .doc { border: none; padding: 0; background: #fff; }
  .table-wrap { overflow: visible; border: 1px solid #999; background: #fff; }
  table { min-width: 0; font-size: 9.5pt; }
  th, tfoot th, tfoot td { background: #eee; color: #000; }
  .doc { gap: 10px; }
  .doc-kv > div { padding-block: 5px; }
  .sign-grid, .sign, tr { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}
