:root {
  --paper: #0b0c0e;
  --cream: #141516;
  --ink: #f4f4f5;
  --mute: #a1a1aa;
  --line: #27272a;
  --forest: #145641;
  --mint: #c6ebd4;
  --offer: #c45c26;
  --widget: #101614;
  --hair: rgba(255, 255, 255, 0.08);
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 40px rgba(0, 0, 0, 0.45);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --card-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
  font-family: ui-sans-serif, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; background: var(--paper); color: var(--ink); min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { display: flex; flex-direction: column; min-height: 100dvh; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 12px; top: 12px; background: var(--forest); color: var(--mint); padding: 8px 12px; z-index: 4; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px;
  background: rgba(16, 22, 20, 0.86);
  color: var(--ink);
  border-bottom: 1px solid var(--hair);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 12px; margin: 0; color: inherit; text-decoration: none; }
.home-logo { min-height: 44px; }
.brand-mark { display: block; width: 36px; height: 36px; }
.wordmark {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  text-wrap: balance;
}
.wordmark span { color: var(--mint); font-weight: 500; }
.roots { display: flex; align-items: center; gap: 2px; }
.root-btn {
  font: inherit; font-weight: 600;
  border: 0; background: transparent; color: var(--mute);
  padding: 10px 12px; cursor: pointer; border-radius: 8px;
  min-height: 44px; min-width: 44px;
  transition: transform 160ms var(--ease-out), color 160ms var(--ease-out);
}
.root-btn[aria-current="page"] { color: var(--ink); }
.root-btn:active { transform: scale(0.96); }
.wallet-btn, .done {
  font: inherit; font-weight: 650;
  border: 0; background: var(--mint); color: #0b0c0e;
  padding: 10px 16px; cursor: pointer; border-radius: 999px;
  min-height: 44px;
  transition: transform 160ms var(--ease-out);
}
.wallet-btn:active, .done:active { transform: scale(0.96); }
.wallet-btn:focus-visible, .done:focus-visible, .cat:focus-visible, .pin:focus-visible, .chips button:focus-visible, .root-btn:focus-visible, .offer-row:focus-visible, .chosen-shop:focus-visible {
  outline: 2px solid var(--mint); outline-offset: 2px;
}
body.till {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}
body.till .bar {
  padding: 12px 20px;
  background: var(--paper);
  backdrop-filter: none;
}
body.till .wordmark { font-size: 1.4rem; }
body.till .wallet-btn,
body.till .done {
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
}
body.till .wallet-btn:active,
body.till .done:active { transform: scale(0.97); }
body.till .wallet-btn:focus-visible,
body.till .done:focus-visible,
body.till .chosen-shop:focus-visible {
  outline-color: var(--ink);
}

.week { padding: 12px 28px 0; }
.week[hidden] { display: none; }
#accountArea {
  display: grid;
  gap: 8px;
  margin: 16px 28px 0;
  padding: 18px;
  border-radius: 18px;
  background: var(--cream);
  box-shadow: var(--shadow);
  max-width: 540px;
}
#accountArea[hidden] { display: none; }
#accountArea h2 { margin: 0; font-size: 1.25rem; letter-spacing: -0.03em; }
.account-cards { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.account-cards li { color: var(--ink); }
.offer-report { display: grid; gap: 8px; margin-top: 28px; }
.offer-report label { display: grid; gap: 4px; color: var(--mute); font-size: 0.85rem; }
.offer-report input, .offer-report select {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--hair);
  background: var(--paper);
  color: var(--ink);
}
.week-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.week-row {
  display: block;
  width: 100%;
  max-width: 540px;
  margin: 0 0 8px;
  text-align: left;
  font: inherit;
  font-weight: 650;
  padding: 12px 16px;
  border-radius: 14px;
  border: 0;
  background: var(--cream);
  box-shadow: var(--shadow);
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.week-row:active { transform: scale(0.96); }
.best-cats {
  display: flex; flex-wrap: wrap; gap: 8px;
  max-width: 540px; margin: 0 0 16px;
}
.best-cat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 14px; min-height: 44px; text-align: left;
  border: 1px solid var(--hair); border-radius: 14px;
  background: var(--cream); color: var(--ink); font: inherit;
  box-shadow: var(--shadow); cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.best-cat:active { transform: scale(0.96); }
.best-cat-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--mute);
}
.best-cat-shop { font-weight: 650; }
.best-cat-rate { font-size: 0.85rem; color: var(--mute); }
.stage { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.picker { padding: 18px 0 8px; background: var(--paper); }
.chosen { padding: 8px 28px 14px; }
.chosen-shop {
  display: flex; align-items: center; gap: 14px;
  width: 100%; max-width: 720px;
  padding: 8px;
  border: 0; border-radius: 22px;
  background: var(--cream); color: inherit; font: inherit; cursor: pointer; text-align: left;
  box-shadow: var(--shadow);
  transition: transform 160ms var(--ease-out);
}
.chosen-shop:active { transform: scale(0.96); }
.chosen-shop .pin-face { width: 56px; height: 56px; aspect-ratio: auto; border-radius: 14px; flex: 0 0 56px; }
.chosen-shop .pin-label { display: none; }
.chosen-shop .pin-face::after { height: 100%; inset: 0; background: rgba(0, 0, 0, 0.2); }
.chosen-shop .pin-rate {
  font-family: inherit;
  font-size: 0.7rem;
  left: auto; right: 6px; top: 6px; bottom: auto;
  text-shadow: none;
  background: rgba(11, 12, 14, 0.72);
  padding: 2px 6px;
  border-radius: 999px;
}
.chosen-copy { display: grid; gap: 2px; }
.chosen-copy strong { font-size: 1.05rem; }
.chosen-copy span { color: var(--mute); font-size: 0.85rem; font-weight: 650; }
.pin-logo {
  position: absolute;
  inset: 18%;
  width: auto;
  height: auto;
  max-width: 64%;
  max-height: 64%;
  margin: auto;
  object-fit: contain;
  z-index: 2;
  outline: 1px solid oklch(1 0 0 / 0.1);
  outline-offset: 0;
  background: rgba(255,255,255,0.92);
  border-radius: 12px;
  padding: 8px;
  box-sizing: border-box;
}
.card-logo {
  height: 28px;
  width: auto;
  max-width: 72px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  padding: 3px 6px;
}
.result-hero .card-logo {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 2;
  height: 36px;
  max-width: 96px;
}
.find-wrap { display: block; margin: 0 28px 8px; }
.fixture-note {
  margin: 0 28px 12px;
  font-size: 0.78rem;
  color: var(--mute);
}
#find {
  width: min(420px, 100%);
  font: inherit; font-size: 1rem;
  padding: 12px 16px;
  border: 0; border-radius: 12px;
  background: var(--cream); color: var(--ink);
  box-shadow: 0 0 0 1px var(--hair);
}
#find:focus { outline: 2px solid var(--ink); outline-offset: 2px; }

.cats {
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
  padding: 0 28px 14px;
  scroll-snap-type: x proximity;
}
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: 0 0 auto; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 0.92rem; font-weight: 650;
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  min-height: 44px;
  border: 0; background: var(--cream); color: var(--ink);
  box-shadow: 0 0 0 1px var(--hair);
  white-space: nowrap;
  transition: transform 160ms var(--ease-out), background 160ms var(--ease-out), color 160ms var(--ease-out);
}
.cat:active { transform: scale(0.96); }
.cat-icon { width: 16px; height: 16px; flex: 0 0 auto; }
.cat[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.cat.offer { color: var(--offer); }
.cat.offer[aria-selected="true"] { background: var(--offer); color: #fff; }

.pins {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 16px 12px;
  padding: 4px 28px 18px;
}
.pin {
  display: grid; gap: 8px;
  padding: 0; border: 0; background: transparent;
  text-align: left; cursor: pointer; color: inherit; font: inherit;
  min-width: 0;
  transition: transform 160ms var(--ease-out);
}
.pin:active { transform: scale(0.96); }
.pin-face {
  width: 100%; aspect-ratio: 1; height: auto; border-radius: 20px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 14px 12px 12px;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.pin-face::after {
  content: "";
  position: absolute; inset: auto 0 0 0;
  height: 58%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  pointer-events: none;
  z-index: 1;
}
.pin-face.shop-other {
  box-shadow: inset 0 0 0 1px var(--hair);
}
.pin-rate {
  position: absolute; left: 12px; right: 12px; bottom: 10px; top: auto;
  z-index: 2;
  background: none;
  color: #fff;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.55rem, 4.6vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.9;
  padding: 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
  font-variant-numeric: tabular-nums;
}
.pin-rate.offer { background: none; color: inherit; }
.pin-label {
  position: relative;
  z-index: 2;
  font-weight: 750;
  font-size: 0.98rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pin-name {
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.15;
  color: var(--ink);
}
.pin-win {
  font-size: 0.8rem;
  color: var(--mute);
  font-weight: 600;
  line-height: 1.2;
}
.pin-flag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--offer);
}
.pin[aria-current="true"] .pin-face { box-shadow: 0 0 0 2px var(--ink), var(--shadow); }
.empty { padding: 8px 28px 18px; color: var(--mute); }
.empty .link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }

.till {
  flex: 1 1 auto;
  padding: 8px 28px 48px;
  overflow: auto;
  background: var(--paper);
}
.shop-stack { display: grid; gap: 8px; margin: 0 0 16px; }
.result { width: min(100%, 720px); }
.stack-row {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.stack-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.stack-name { font-weight: 650; }
.stack-rate { font-variant-numeric: tabular-nums; font-weight: 650; }
.stack-note, .stack-label, .stack-date { color: var(--mute); font-size: 0.78rem; }
.stack-label { text-transform: uppercase; letter-spacing: 0.08em; }
.stack-use { box-shadow: inset 0 0 0 1px var(--mint); }
.result-hero {
  position: relative;
  min-height: min(54vh, 560px);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 28px 30px;
  box-shadow: var(--card-shadow);
  color: #fff;
  transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out);
}
.result-hero {
  @starting-style {
    opacity: 0;
    transform: scale(0.96);
  }
}
.result-hero::after {
  content: "";
  position: absolute; inset: 35% 0 0 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
  pointer-events: none;
}
.result-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  z-index: 0;
}
.result-hero.has-photo { color: #fff; }
.result-rate {
  position: relative; z-index: 1;
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(4.2rem, 14vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 0.85;
  font-variant-numeric: tabular-nums;
  text-wrap: pretty;
}
.result-rate span { font-size: 0.48em; font-weight: 500; margin-left: 0.06em; }
.result-nick {
  position: relative; z-index: 1;
  margin: 12px 0 0;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.result-meta { margin-top: 18px; max-width: 36em; }
.spend-row {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--mute); font-size: 0.9rem;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button {
  font: inherit; font-size: 0.95rem; padding: 8px 14px;
  background: var(--cream); color: var(--ink); border: 0; cursor: pointer;
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--hair);
  transition: transform 160ms var(--ease-out);
}
.chips button:active { transform: scale(0.96); }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.use-line {
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); margin: 0 0 10px;
}
.scan {
  margin: 0 0 12px;
  padding: 0;
  background: none;
  color: var(--mute);
  font-weight: 650;
  font-size: 0.98rem;
  box-shadow: none;
}
.plastic {
  width: min(100%, 540px);
  aspect-ratio: 1.586;
  border-radius: 18px;
  padding: 22px 24px 18px;
  color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
  box-shadow:
    var(--card-shadow),
    inset 0 1px 0 rgba(255,255,255,0.28),
    inset 0 0 0 1px rgba(255,255,255,0.1);
  transition: transform 200ms var(--ease-out), opacity 200ms var(--ease-out);
}
.plastic.amex-shape { border-radius: 12px; }
.plastic::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.05) 26%, transparent 40%, transparent 64%, rgba(255,255,255,0.08) 100%);
  pointer-events: none;
  z-index: 1;
}
.plastic .contactless { width: 26px; height: 26px; color: rgba(255,255,255,0.92); flex: 0 0 auto; }
.plastic .chip {
  width: 50px; height: 38px;
  display: block;
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.35));
}
.plastic-chip-row {
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  margin: 2px 0 4px;
}
.plastic-body { position: relative; z-index: 1; }
.plastic-foot { align-items: flex-end; }
.pan-mask {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 1.02rem;
  letter-spacing: 0.22em;
  opacity: 0.88;
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}
.rate-on-card.pts {
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.15;
}
.plastic {
  @starting-style {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
}
@media (prefers-reduced-motion: reduce) {
  .plastic, .result-hero { transition: opacity 200ms ease; transform: none; }
  .pin, .cat, .root-btn, .wallet-btn, .done, .week-row, .chosen-shop, .chips button, .offer-row { transition: none; }
}
.plastic::after {
  content: "";
  position: absolute; inset: auto -18% -40% 42%;
  height: 80%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.14), transparent 68%);
  pointer-events: none;
}
.plastic .row { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.nick {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: -0.04em;
  line-height: 1;
  position: relative; z-index: 1;
}
.plastic .rate-on-card {
  margin: 10px 0 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  position: relative; z-index: 1;
}
.plastic .rate-on-card span { font-size: 0.48em; font-weight: 500; margin-left: 4px; }
.netlogo { height: 28px; }
.why { margin: 10px 0 0; font-size: 1.02rem; color: var(--mute); max-width: 32em; text-wrap: pretty; }
.smallprint { margin: 6px 0 0; font-size: 0.92rem; color: var(--mute); }
.offer { margin-top: 10px; color: var(--offer); font-weight: 650; }
.also { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.till-available { margin-top: 22px; max-width: 32em; opacity: 0.68; }
.till-avail-head { margin: 0; font-size: 0.78rem; font-weight: 650; color: var(--mute); }
.till-avail-note { margin: 4px 0 0; font-size: 0.72rem; color: var(--mute); }
.till-avail-row { margin: 8px 0 0; font-size: 0.88rem; color: var(--mute); }
.mini {
  width: 168px; aspect-ratio: 1.586; border-radius: 12px; padding: 10px 12px; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow); font-size: 0.85rem;
}
.mini .mini-nick { font-weight: 650; line-height: 1.1; }
.mini .mini-rate { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.03em; }
.excl { margin-top: 16px; color: var(--mute); font-size: 0.85rem; }

.offers { padding: 18px 28px 28px; }
#offerList { display: grid; gap: 10px; max-width: 540px; }
.offer-row {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto;
  gap: 2px 16px; width: 100%;
  padding: 14px 16px; border: 0; border-radius: 16px;
  background: var(--cream); color: inherit; font: inherit; cursor: pointer; text-align: left;
  box-shadow: var(--shadow);
  transition: transform 160ms var(--ease-out);
}
.offer-row:active { transform: scale(0.96); }
.offer-shop { font-weight: 700; grid-column: 1; }
.offer-card { color: var(--mute); font-size: 0.9rem; grid-column: 1; }
.offer-pct {
  grid-column: 2; grid-row: 1 / span 3; align-self: center;
  color: var(--offer);
  font-family: Fraunces, Georgia, serif;
  font-weight: 700; font-size: 2rem; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.offer-dates { color: var(--mute); font-size: 0.82rem; grid-column: 1; }
.offers-empty { margin: 12px 0; color: var(--mute); }
.offers-foot { margin: 18px 0 0; color: var(--mute); font-size: 0.82rem; }
.offers-available { margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--hair); }
.offers-avail-head { margin: 0 0 6px; font-size: 1.05rem; }
.offers-avail-note { margin: 0 0 12px; color: var(--mute); font-size: 0.82rem; }
.offer-row.available { cursor: default; }
.offer-you { color: var(--mute); font-size: 0.78rem; grid-column: 1; }
.offer-wrap { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch; max-width: 540px; }
.offer-wrap .offer-row { max-width: none; }
.offer-remove {
  border: 0; background: transparent; color: var(--mute); font: inherit; font-size: 0.82rem;
  cursor: pointer; padding: 0 4px;
}
.add-extra {
  display: grid; gap: 10px; max-width: 540px; margin: 0 0 22px;
  padding: 16px; border: 1px solid var(--hair); border-radius: 16px;
}
.add-extra label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; }
.add-extra select, .add-extra input[type="number"], .add-extra input[type="date"] {
  font: inherit; color: inherit; background: var(--cream); border: 1px solid var(--hair);
  border-radius: 10px; padding: 10px 12px;
}
.add-extra .done { justify-self: start; }

footer { padding: 14px 28px 22px; color: var(--mute); font-size: 0.78rem; border-top: 1px solid var(--hair); }
.account-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; margin: 12px 0; }
.account-field input { font: inherit; padding: 10px 12px; border: 0; border-radius: 10px; background: var(--cream); color: var(--ink); box-shadow: 0 0 0 1px var(--hair); }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 0; }
.account-alt { color: var(--ink); }
.account-err { color: var(--offer); }
.wallet {
  border: 0; border-radius: 22px; padding: 20px 18px 16px;
  max-width: 440px; width: min(92vw, 440px);
  max-height: min(92dvh, 900px);
  overflow: auto;
  background: var(--cream); color: var(--ink);
  box-shadow: var(--shadow);
  transition: opacity 180ms var(--ease-drawer);
}
.wallet [hidden] { display: none !important; }
.wallet h2 { margin: 0 0 4px; }
.held-stack {
  display: grid;
  gap: 16px;
  margin: 14px 0 4px;
}
.held-slot { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wallet .plastic.mini {
  width: 100%;
  max-width: none;
  flex: 0 0 auto;
  aspect-ratio: 1.586;
  min-height: 196px;
  height: auto;
  margin: 0;
  padding: 16px 18px 14px;
  cursor: pointer;
}
.wallet .plastic.mini:active { transform: scale(0.98); }
.wallet .plastic.mini .nick { font-size: clamp(1.35rem, 4.6vw, 1.85rem); }
.card-edit {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border: 0;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
}
.wallet-edit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.wallet-edit .wallet-field,
.wallet-edit .account-actions { margin: 0; }
.wallet-edit .account-actions,
.wallet-pick .account-actions { grid-column: 1 / -1; }
.wallet-edit .done,
.wallet .wallet-done,
.wallet #showAdd { width: 100%; }
.wallet-loyalty { margin: 8px 0 4px; }
.wallet-loyalty summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--mute);
  font-size: 0.85rem;
}
.wallet .account-actions { margin-top: 12px; }
/* Opacity-only entry: a scale transform on a top-layer dialog left it invisible or late on WebKit. */
@starting-style { .wallet[open] { opacity: 0; } }
.wallet::backdrop { background: rgba(0, 0, 0, 0.62); }
.wallet h2 { margin: 0 0 8px; font-family: Fraunces, Georgia, serif; }
.hint { color: var(--mute); font-size: 0.85rem; }
.card-list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; margin: 12px 0 16px; }
.card-list label { display: flex; gap: 8px; align-items: center; font-size: 0.95rem; }
.wallet .wallet-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.wallet .wallet-field input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 44px;
  box-shadow: 0 0 0 1px var(--hair);
}
.wallet .wallet-field input:focus {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}
.wallet .wallet-field input::placeholder { color: var(--mute); font-weight: 450; }
.wallet-pick {
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.wallet-pick .wallet-field {
  margin: 0;
}
.wallet-pick .wallet-field input {
  background: var(--cream);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1.05rem;
  min-height: 50px;
  box-shadow: inset 0 0 0 1px var(--hair);
}
.wallet-pick button {
  grid-column: 1 / -1;
}
.pick-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--cream);
  box-shadow: inset 0 0 0 1px var(--hair);
  cursor: pointer;
  min-height: 52px;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.pick-row:active { transform: scale(0.98); }
.pick-row:has(input:checked) {
  background: var(--ink);
  box-shadow: none;
  color: var(--cream);
}
.pick-row:has(input:checked) .pick-name,
.pick-row:has(input:checked) .pick-kind { color: var(--cream); }
.pick-row input {
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  flex: 0 0 20px;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--mute);
  cursor: pointer;
}
.pick-row input:checked {
  background: var(--mint);
  box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 1.5px var(--mint);
}
.pick-row input:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.pick-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pick-name { font-weight: 650; color: var(--ink); line-height: 1.2; }
.pick-kind { font-size: 0.78rem; color: var(--mute); }
.better-strip { max-height: none; }
.plastic.mini {
  width: 100%;
  flex: 0 0 auto;
  aspect-ratio: 1.586;
  min-height: 176px;
  padding: 14px 16px 12px;
  margin-top: 8px;
}
.plastic.mini .nick { font-size: 1.15rem; }
@media (max-width: 380px) {
  .wallet-pick, .wallet-edit { grid-template-columns: 1fr; }
}
.issuer-mark {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}
.plastic-foot .earned, .plastic-foot .card-extra {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  opacity: 0.92;
}
.plastic-foot .card-extra { font-weight: 650; }
.scan-view { width: min(100%, 280px); border-radius: 12px; background: #111; margin: 8px 0; }
.menu-kicker {
  margin: 14px 0 4px;
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute);
}

@media (hover: hover) and (pointer: fine) {
  .root-btn:hover { color: var(--ink); }
  .cat:hover { background: #1c1d1f; }
  .cat[aria-selected="true"]:hover { background: var(--ink); }
}

@media (max-width: 820px) {
  .bar, .find-wrap, .fixture-note, footer { padding-left: 16px; padding-right: 16px; }
  .cats, .pins { padding-left: 16px; padding-right: 16px; }
  .till { padding: 12px 16px 40px; }
  .chosen { padding-left: 16px; padding-right: 16px; }
  .pins { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .result-hero { min-height: min(48vh, 420px); padding: 22px 20px 24px; border-radius: 20px; }
}

.chase { background: linear-gradient(145deg, #1174cb, #0a4e8c); }
.club { background: linear-gradient(145deg, #00539f 0%, #00539f 58%, #ee1c2e 58%, #ee1c2e 100%); }
.gold { background: linear-gradient(145deg, #016f78, #c4a35a); }
.amzn { background: linear-gradient(145deg, #232f3e, #ff9900); }
.visa { background: linear-gradient(145deg, #1a1f71, #1434cb); }
.partnership { background: linear-gradient(145deg, #0b3d2e, #7fba00); }
.everyday { background: linear-gradient(145deg, #016f78, #0a3d42); }
.virgin { background: linear-gradient(145deg, #e10a0a, #7a0000); }
.monzo { background: linear-gradient(145deg, #ff4f5e, #c81e3a); }
.starling { background: linear-gradient(145deg, #6e2cf5, #3d128c); }
.nectar { background: linear-gradient(145deg, #7f2a8b, #f06c00); }
.mands { background: linear-gradient(145deg, #111, #444); }
.ba { background: linear-gradient(145deg, #075aaa, #d20a11); }
.mc-plain { background: linear-gradient(145deg, #3a1d12, #7a2e14); }

/* ---- UK parity: glanceable till, onboarding, trackers (2026-10) ---- */
:root { --surface: #141516; --surface-2: #1b1c1e; --radius: 18px; --ok: #7fd6a4; --warn: #f2c14e; }
body.till { padding-bottom: env(safe-area-inset-bottom); }
.offline-note { margin: 10px 28px 0; padding: 10px 14px; border-radius: 12px; background: #2a2412; color: var(--warn); font-size: 0.88rem; }
.offline-note[hidden] { display: none; }

/* The answer, in two steps: 1 Scan · 2 Tap */
.till-steps { list-style: none; margin: 0 0 12px; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.till-step { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px 10px 10px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); font-weight: 650; }
.step-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.step-verb { color: var(--mute); font-weight: 600; }
.step-payment { background: var(--forest); box-shadow: inset 0 0 0 1px var(--mint); }
.step-payment .step-n { background: var(--mint); color: var(--forest); }
.step-payment .step-verb { color: var(--mint); }
.result-pence { position: relative; z-index: 1; margin: 6px 0 0; font-size: clamp(1.05rem, 2.6vw, 1.35rem); font-weight: 650; font-variant-numeric: tabular-nums; }
.result-empty { padding: 4px 0 12px; }
.cap-line { margin: 0 0 8px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); font-weight: 650; font-variant-numeric: tabular-nums; }
.fallback-line { margin-top: 0; }
.spend-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.spend-input { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 12px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); color: var(--mute); font-weight: 650; }
.spend-input input { width: 5.5em; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; outline: 0; }
.spend-input:focus-within { box-shadow: inset 0 0 0 2px var(--mint); }

/* Home: alerts and onboarding */
.alerts { display: grid; gap: 8px; margin: 0 0 14px; }
.alert { margin: 0; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--surface-2); color: var(--ink); font: inherit; text-align: left; box-shadow: inset 3px 0 0 var(--warn); }
button.alert { cursor: pointer; min-height: 44px; }
.alert-points { box-shadow: inset 3px 0 0 var(--offer); }
.alert-bonus { box-shadow: inset 3px 0 0 var(--ok); }
.onboarding { margin: 16px 28px 8px; padding: 20px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); display: grid; gap: 10px; max-width: 720px; }
.onboarding[hidden] { display: none; }
.onboarding h2 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; }
.onboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }

/* Account: verify, points, data */
.verify-banner { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: #2a2412; color: var(--warn); }
.verify-banner[hidden] { display: none; }
.verify-banner p { margin: 0; }
.points { display: grid; gap: 8px; margin-top: 24px; }
.points-list { display: grid; gap: 8px; }
.points-row { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); display: grid; gap: 4px; }
.points-row.hot { box-shadow: inset 3px 0 0 var(--offer); }
.points-head { margin: 0; display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.points-row .hint { margin: 0; }
.account-data { display: grid; gap: 8px; margin-top: 28px; }
.danger { color: #ff8a7a; }
.check-row { display: flex !important; align-items: center; gap: 8px; }

/* Offers: ending soon + reminders */
.ending-soon { display: grid; gap: 8px; margin: 0 0 18px; }
.soon-row { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; box-shadow: inset 3px 0 0 var(--warn); }
.soon-row .hint { flex-basis: 100%; margin: 0; }

/* Wallet edit: cap, qualifying, bonus tracker */
.wallet-more { margin: 6px 0; padding: 8px 0; border-top: 1px solid var(--hair); }
.wallet-more summary { cursor: pointer; font-weight: 650; min-height: 32px; }
.wallet-edit select { min-height: 40px; border-radius: 10px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); padding: 0 10px; font: inherit; }
.bonus-progress { display: grid; gap: 6px; margin: 6px 0 0; }
.bonus-bar { display: block; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bonus-bar i { display: block; height: 100%; background: var(--mint); }

/* Phone: roots become a thumb-reach tab bar */
@media (max-width: 640px) {
  body.till .roots {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9;
    justify-content: space-around; gap: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(11, 12, 14, 0.94); border-top: 1px solid var(--hair);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  body.till .roots .root-btn, body.till .roots .wallet-btn { flex: 1 1 0; border-radius: 12px; }
  body.till .roots .wallet-btn { background: transparent; color: var(--mute); }
  body.till .roots [aria-current="page"] { color: var(--ink); background: var(--surface-2); }
  body.till .stage { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  body.till footer { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .onboarding, .offline-note { margin-left: 16px; margin-right: 16px; }
  .till-step { padding: 8px 12px 8px 8px; }
}

/* Abroad mode at the till */
.abroad-toggle { margin: 10px 0 0; }
.abroad-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.abroad { margin: 10px 0 0; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.abroad-head { margin: 0 0 6px; font-weight: 650; }
.fx-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.fx-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fx-row label { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; }
.fx-name { flex: 1 1 auto; }
.fx-row input { width: 4.5em; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line, #d8d8d8); font: inherit; text-align: right; }
.fx-cost { color: var(--mute); font-variant-numeric: tabular-nums; }
.fx-row input:focus-visible, .abroad-toggle button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Issuer-published pre-fill (A3): always labelled, never styled as "checked" */
.fx-src { display: block; font-size: 0.75rem; color: var(--mute); }
.issuer-hint { margin: 6px 0 0; color: var(--mute); }
.issuer-note { margin: 8px 0 0; }

/* Near me: opt-in "you're at Tesco" prompt */
.near { display: grid; gap: 8px; margin: 10px 0 4px; }
.near-btn { justify-self: start; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line, #d8d8d8); background: var(--surface-2, #f4f4f4); color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.near-btn:focus-visible, .near-shop:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.near-out { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.near-out:empty { display: none; }
.near-msg { flex: 1 0 100%; margin: 0; font-weight: 600; }
.near-shop { display: inline-flex; gap: 8px; align-items: baseline; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line, #d8d8d8); background: var(--paper, #fff); color: inherit; font: inherit; cursor: pointer; }
.near-shop span { color: var(--mute); font-size: 0.85rem; }
.near-note { margin: 0; }

/* ---- Round 8 till: card-forward hero, why line, runner-ups, monogram tiles ---- */
.pin-mono {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 750; font-size: clamp(1rem, 3.4vw, 1.5rem); letter-spacing: -0.02em;
  z-index: 0;
}
.result-hero {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1.586 / 1;
  min-height: 0;
  padding: 18px 20px 20px;
  border-radius: 22px;
  justify-content: space-between;
  isolation: isolate;
}
.result-hero::before {
  content: "";
  position: absolute; inset: -40% -20% auto auto;
  width: 70%; height: 120%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.18), transparent);
  pointer-events: none;
  z-index: 0;
}
.result-hero::after { inset: 40% 0 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, 0.5)); z-index: 0; }
.hero-top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hero-kicker {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.32);
}
.result-hero .card-logo { position: static; height: 32px; max-width: 88px; }
.hero-main { position: relative; z-index: 2; padding-right: 72px; }
.result-hero .result-rate { font-size: clamp(3.6rem, 17vw, 5.6rem); }
.result-hero .result-nick { margin: 8px 0 0; font-size: 1.15rem; }
.result-hero .result-pence { margin: 2px 0 0; font-size: 1.05rem; opacity: 0.95; }
.hero-shop { position: absolute; right: 18px; bottom: 18px; z-index: 2; }
.hero-shop .pin-face {
  width: 56px; height: 56px; aspect-ratio: auto; padding: 0; border-radius: 14px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 8px 20px rgba(0, 0, 0, 0.35);
}
.hero-shop .pin-face::after { display: none; }
.hero-shop .pin-logo { inset: 0; max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: cover; padding: 0; border-radius: 0; background: none; outline: 0; }
.why-line {
  max-width: 480px; margin: 12px 0 0; padding: 12px 14px; border-radius: 14px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair);
  font-size: 0.95rem; line-height: 1.4; text-wrap: pretty;
}
.why-k {
  display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 999px;
  background: var(--mint); color: var(--forest); font-size: 0.72rem; font-weight: 750;
  letter-spacing: 0.08em; text-transform: uppercase; vertical-align: 1px;
}
.result > .spend-row { max-width: 480px; }
.runners { margin: 14px 0 6px; max-width: 480px; }
.runners .stack-kicker { margin: 0 0 8px; }
.runner-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.runner {
  display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 12px;
  padding: 10px 14px 10px 10px; border-radius: 14px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair);
}
.runner-chip {
  width: 40px; height: 26px; border-radius: 5px; display: grid; place-items: center;
  color: #fff; font-size: 0.7rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.runner-name { font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runner-amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.runner-behind { color: var(--mute); font-size: 0.82rem; font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: right; }
.result .account-alt {
  color: var(--ink); border-radius: 999px; padding: 10px 16px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.result .account-alt[aria-pressed="true"] { background: var(--forest); color: var(--mint); box-shadow: inset 0 0 0 1px var(--mint); }
.result .paid-btn { background: var(--mint); color: var(--forest); box-shadow: none; margin: 6px 0 10px; }
.result .account-alt:focus-visible, .result .paid-btn:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
@media (min-width: 821px) {
  .result-hero .result-rate { font-size: 5.6rem; }
}

/* ---- Round 9: mobile stacking + touch fixes (iOS Safari) ----
   Root cause: the phone tab bar (.roots, position: fixed, inside the header) was a 94%-alpha
   layer drawn with backdrop-filter. WebKit composites a fixed backdrop-filter layer without
   reliably painting its own background, so the till (hero card, runner rows, footer) showed
   through and over the tab labels, and the round-8 hero (isolation + transforms) and :active
   scale transforms were promoted to layers that could paint above it. The header also sat
   under the status bar in the installed app (black-translucent + viewport-fit=cover). */
body.till .stage, body.till footer { position: relative; z-index: 0; isolation: isolate; }
body.till .bar {
  padding-top: calc(12px + env(safe-area-inset-top));
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
@media (max-width: 640px) {
  body.till .bar { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  body.till .roots {
    z-index: 50;
    background: var(--paper);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    transform: translateZ(0);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45);
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
  }
  body.till .roots .root-btn, body.till .roots .wallet-btn { min-height: 48px; }
  body.till .roots .root-btn:not([aria-current="page"]), body.till .roots .wallet-btn:not([aria-current="page"]) { color: #b9bcc2; }
  body.till .stage { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  body.till footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
/* Dialogs: real viewport height on iOS, no scroll bleed, clear of the home indicator. */
.wallet { max-height: min(92vh, 900px); max-height: min(92dvh, 900px); overscroll-behavior: contain; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
html:has(dialog[open]), html:has(dialog[open]) body { overflow: hidden; }
.card-list { max-height: 50vh; max-height: 50dvh; overscroll-behavior: contain; }
/* The Edit button no longer sits on top of the issuer name. */
.card-edit + .row { padding-right: 68px; }
.card-edit { min-height: 44px; min-width: 56px; top: 8px; right: 8px; }
/* 44px tap targets. */
.chips button { min-height: 44px; min-width: 56px; }
.near-btn, .near-shop { min-height: 44px; }
.wallet-more summary { min-height: 44px; display: flex; align-items: center; }
@media (pointer: coarse) {
  .root-btn:active, .wallet-btn:active, .done:active, .pin:active, .cat:active, .chips button:active,
  .week-row:active, .chosen-shop:active, .offer-row:active, .pick-row:active, .wallet .plastic.mini:active { transform: none; opacity: 0.85; }
}

/* Round 9: runner "I paid with this", staff-only missing cards, monthly recap */
.runner .runner-paid { grid-column: 2 / -1; flex-basis: auto; }
.runner-paid { flex-basis: 100%; justify-self: start; margin-top: 6px; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--hair); background: transparent; color: var(--mute); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.runner-paid:focus-visible, .missing summary:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.missing { margin: 12px 0; padding: 0 14px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); }
.missing summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; font-weight: 650; list-style: none; }
.missing summary::-webkit-details-marker { display: none; }
.missing summary::after { content: "+"; color: var(--mute); font-size: 1.2rem; }
.missing[open] summary::after { content: "–"; }
.missing summary > span:first-child { flex: 1; }
.missing-badge { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--warn); border: 1px solid currentColor; border-radius: 999px; padding: 2px 8px; font-weight: 700; }
.missing-notice { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: #2a2412; color: var(--warn); font-size: 0.82rem; }
.missing-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.missing-card { padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.missing-card p { margin: 0; }
.missing-head { display: flex; justify-content: space-between; gap: 10px; }
.missing-diff { color: var(--ok); font-weight: 700; font-variant-numeric: tabular-nums; }
.missing-src { color: var(--ink); text-decoration: underline; }
.missing-summary p { margin: 0; }
.recap-big { margin: 0; font-family: Fraunces, Georgia, serif; font-size: 2.2rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.recap-big span { font-family: "IBM Plex Sans", sans-serif; font-size: 0.95rem; font-weight: 500; color: var(--mute); letter-spacing: 0; margin-left: 6px; }
.recap-stats { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 6px; }
.recap-stats li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.recap-stats span { color: var(--mute); }
/* Paying online (bookmarklet / share target) */
.checkout-how { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 6px; color: var(--mute); font-size: 0.88rem; line-height: 1.45; }
.checkout-how code { font-size: 0.8rem; word-break: break-all; color: var(--ink); }
.bookmarklet { border: 1px dashed var(--mint); cursor: grab; }

/* Gift-card "Stack it" (staff preview / when switched on) */
.stack-it { border: 1px dashed var(--hair, #d6d0c4); border-radius: 14px; padding: 12px 14px; margin: 10px 0; display: grid; gap: 4px; }
.stack-it .stack-total { margin: 0; font-size: 1.1rem; }
.stack-it .gc-preview, .stack-it .gc-sample { color: #b45309; font-weight: 600; margin: 0; }
.stack-it .gc-flag { color: #8a6d3b; }

/* Money calendar, toolbox, spending by category */
.cal-list, .tool-list, .cat-spend-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.cal-row { display: grid; grid-template-columns: 6.5rem 1fr; gap: 2px 10px; }
.cal-date { font-weight: 600; grid-row: span 2; }
.cal-meta { color: var(--mute, #6d675c); font-size: 0.85rem; }
.cal-offer .cal-date { color: #b45309; }
.tool { border-top: 1px solid var(--hair, #e5e0d6); padding: 8px 0; }
.tool summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.tool-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin: 6px 0; }
.tool-row input, .tool-row select { max-width: 10rem; min-height: 40px; }
.tool-list li { display: flex; justify-content: space-between; gap: 10px; }
.cat-spend { margin-top: 12px; }
.cat-spend-list li { display: grid; grid-template-columns: 8rem 1fr auto; gap: 8px; align-items: center; font-size: 0.9rem; }
.cs-bar { background: var(--hair, #e5e0d6); border-radius: 4px; height: 8px; overflow: hidden; }
.cs-bar span { display: block; height: 100%; background: var(--mint, #2f9e6f); }

/* Retailer codes & offers (switched off; staff preview). */
.retail-offers { border: 1px solid var(--hair, #d6d0c4); border-radius: 14px; padding: 12px 14px; margin: 10px 0; display: grid; gap: 8px; }
.retail-offers .ro-h { margin: 0; font-size: 1rem; font-weight: 600; }
.retail-offers .ro-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.retail-offers .ro-item { display: grid; gap: 4px; padding-top: 8px; border-top: 1px solid var(--hair, #e7e2d8); }
.retail-offers .ro-item:first-child { border-top: 0; padding-top: 0; }
.retail-offers .ro-code { margin: 0; }
.retail-offers .ro-code code { font-family: "Geist Mono", ui-monospace, monospace; font-size: 1rem; font-weight: 600; letter-spacing: 0.04em; padding: 4px 8px; border: 1px dashed currentColor; border-radius: 8px; user-select: all; }
.retail-offers .ro-title { margin: 0; font-weight: 600; }
.retail-offers .ro-link { justify-self: start; min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.retail-offers .ro-preview, .retail-offers .ro-sample-label { color: #b45309; font-weight: 600; margin: 0; }
.retail-offers .ro-disclosure { margin: 0; }

/* Round 28: Curve on top (a held Curve card over the card behind it) */
.curve-stack { margin: 14px 0 6px; max-width: 480px; padding: 12px 14px; border: 1px solid var(--hair); border-radius: 12px; }
.curve-stack .stack-kicker { margin: 0 0 6px; }
.curve-stack .curve-main { margin: 0 0 4px; font-weight: 600; overflow-wrap: anywhere; }
.curve-stack .smallprint { overflow-wrap: anywhere; }
.curve-picks .cp-head { margin: 10px 0 6px; font-weight: 600; font-size: 0.9rem; }
.curve-picks .cp-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.curve-picks .cp-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 4px 0 12px; border: 1px solid var(--hair); border-radius: 10px; overflow-wrap: anywhere; }
.curve-picks .cp-remove, .curve-picks .cp-add { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--hair); background: transparent; color: inherit; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.curve-picks .cp-results { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.curve-picks .cp-remove:focus-visible, .curve-picks .cp-add:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

/* Round 28: What you've earned (More) */
.earn-tiles { list-style: none; margin: 8px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.earn-tile { display: grid; gap: 4px; padding: 12px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.earn-label { color: var(--mute); font-size: 0.85rem; overflow-wrap: anywhere; }
.earn-amt { font-family: "Geist Mono", ui-monospace, monospace; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.earn-empty .earn-amt { color: var(--mute); font-family: inherit; font-size: 1rem; font-weight: 600; }
.earn-detail { font-size: 0.8rem; color: var(--mute); overflow-wrap: anywhere; }

/* Round 28: spending trends (This month > Last 6 months) */
.trend-box { margin-top: 12px; border-top: 1px solid var(--hair); padding-top: 8px; }
.trend-box > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.tr-wrap { max-width: 100%; overflow-x: auto; }
.trends { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.trends th, .trends td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.trends thead th { color: var(--mute); font-weight: 600; font-size: 0.8rem; }
.trends abbr { text-decoration: none; }
.trends .tr-empty td, .trends .tr-empty th { color: var(--mute); }
.tr-bar { display: block; height: 6px; margin-bottom: 4px; border-radius: 3px; background: var(--surface-2, #1b1c1e); overflow: hidden; }
.tr-bar i { display: block; height: 100%; background: var(--mint); border-radius: 3px; }

/* Round 29: Split a payment (More) */
.split-form { display: grid; gap: 10px; margin: 10px 0; }
.split-form label { display: grid; gap: 4px; font-size: 0.9rem; min-width: 0; }
.split-form input, .split-form select { min-height: 44px; width: 100%; max-width: 100%; box-sizing: border-box; padding: 0 12px; border-radius: 10px; border: 1px solid var(--hair); background: var(--surface-2); color: inherit; font: inherit; }
.split-form .hint { margin: -4px 0 0; }
.split-pay:empty, .split-form .hh-err:empty { display: none; }
.split-bals, .split-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.split-bal { display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.split-bal-line { font-weight: 600; font-variant-numeric: tabular-nums; }
.split-row { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--hair); min-width: 0; }
.split-tick { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; overflow-wrap: anywhere; }
.split-tick input { width: 22px; height: 22px; accent-color: var(--mint); flex: none; }
.split-meta { color: var(--mute); font-size: 0.8rem; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.split-acts { display: flex; gap: 12px; align-items: center; }
.split-acts .text-link { min-height: 44px; background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.split-row.is-settled .split-tick span { text-decoration: line-through; color: var(--mute); }
.split-acts .text-link:focus-visible, .split-tick input:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

/* Round 29: Two-step sign-in (More) */
.mfa-steps { margin: 8px 0; padding-left: 1.25rem; display: grid; gap: 8px; }
.mfa-key { display: block; margin-top: 6px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 1rem; letter-spacing: 0.04em; overflow-wrap: anywhere; user-select: all; }
.mfa-form { display: grid; gap: 10px; margin: 10px 0; }
.mfa-form label { display: grid; gap: 4px; font-size: 0.9rem; }
.mfa-form input { min-height: 44px; width: 100%; box-sizing: border-box; padding: 0 12px; border-radius: 10px; border: 1px solid var(--hair); background: var(--surface-2); color: inherit; font: inherit; }
.mfa-codes { margin: 8px 0; padding-left: 1.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px 16px; font-family: "Geist Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.mfa-section .hh-err:empty { display: none; }

/* Round 29: reminders strip on Which card? + phone notifications switch */
.remind-strip { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--hair); }
.remind-text { margin: 0; font-size: 0.9rem; min-width: 0; overflow-wrap: anywhere; }
.remind-acts { display: flex; align-items: center; gap: 4px; flex: none; }
.remind-acts .text-link { min-height: 44px; background: none; border: 0; padding: 0 6px; color: inherit; font: inherit; font-size: 0.85rem; text-decoration: underline; cursor: pointer; }
.remind-acts .text-link:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.notify-switch { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.notify-switch input { width: 22px; height: 22px; accent-color: var(--mint); }

/* Round 29: first £ back (receipt slip above the answer) */
.first-back { position: relative; margin: 0 0 12px; padding: 16px 16px 12px; border-radius: 4px 4px 12px 12px; background: #f4f1ea; color: #111; border-top: 2px dashed #b9b4a8; font-variant-numeric: tabular-nums; }
.first-back-head { margin: 0 0 4px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
.first-back-sub { margin: 0 0 10px; font-size: 0.9rem; color: #3f3f46; overflow-wrap: anywhere; }
.first-back-acts { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; }
.first-back .root-btn { color: #111; border-color: #111; }
.first-back .hh-x { color: #111; }
.first-back .root-btn:focus-visible, .first-back .hh-x:focus-visible { outline: 2px solid #111; outline-offset: 2px; }

.near-shop .near-best { color: var(--ink); font-weight: 600; }
