/* Look and feel: Material Design 3 (m3.material.io). Neutral grey surfaces, one blue "primary" for actions,
   full-pill buttons, outlined text fields, filter chips with a check, snackbars, bottom sheets.
   Colour roles follow M3 names in the comments; change them here and the whole app follows. */
:root {
  --bg: #f0f2f5;            /* surface-container: page background */
  --surface: #ffffff;       /* surface-container-lowest: cards, fields */
  --surface-2: #e3e5e8;     /* surface-container-highest: tonal fills */
  --border: #c4c7c5;        /* outline-variant: card edges, dividers */
  --outline: #747775;       /* outline: text fields, chips */
  --text: #1f1f1f;          /* on-surface */
  --muted: #444746;         /* on-surface-variant */
  --accent: #0b57d0;        /* primary */
  --accent-hover: #0842a0;
  --accent-ink: #ffffff;    /* on-primary */
  --accent-soft: #d3e3fd;   /* secondary-container: selected chips, tonal buttons */
  --accent-soft-ink: #041e49;
  --ok: #146c2e;
  --warn: #b3261e;          /* error */
  --warn-soft: #f9dedc;     /* error-container */
  --warn-soft-ink: #410e0b;
  --inverse: #303030;       /* inverse-surface: snackbars */
  --inverse-ink: #f2f2f2;
  --inverse-accent: #a8c7fa;
  --shadow: rgba(0, 0, 0, 0.18);
  --scrim: rgba(0, 0, 0, 0.4);
  --radius: 12px;           /* cards */
  --field-radius: 8px;
  --tap: 48px;
  --e1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
  --e2: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);
  --e3: 0 4px 8px 3px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.3);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131314;
    --surface: #1e1f20;
    --surface-2: #333537;
    --border: #444746;
    --outline: #8e918f;
    --text: #e3e3e3;
    --muted: #c4c7c5;
    --accent: #a8c7fa;
    --accent-hover: #c2d7fb;
    --accent-ink: #062e6f;
    --accent-soft: #004a77;
    --accent-soft-ink: #c2e7ff;
    --ok: #6dd58c;
    --warn: #f2b8b5;
    --warn-soft: #8c1d18;
    --warn-soft-ink: #f9dedc;
    --inverse: #e3e3e3;
    --inverse-ink: #303030;
    --inverse-accent: #0b57d0;
    --shadow: rgba(0, 0, 0, 0.5);
    --scrim: rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 Roboto, "Roboto Flex", system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
.pad { padding: 16px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* state layer: the faint tint M3 puts over anything you hover or press */
.btn, .primary, .ghost, .chip, .iconbtn, .seg button, .paybtn, .menu > *, .linkbtn, .chip-forget, .sheet-x {
  position: relative; overflow: hidden; isolation: isolate;
}
.btn::after, .primary::after, .ghost::after, .chip::after, .iconbtn::after, .seg button::after, .paybtn::after,
.menu > *::after, .chip-forget::after, .sheet-x::after {
  content: ""; position: absolute; inset: 0; background: currentColor; opacity: 0; transition: opacity 0.15s; pointer-events: none; z-index: -1;
}
.btn:active::after, .primary:active::after, .ghost:active::after, .chip:active::after, .iconbtn:active::after,
.seg button:active::after, .paybtn:active::after, .menu > *:active::after, .chip-forget:active::after, .sheet-x:active::after { opacity: 0.12; }

/* ---- top app bar / progress / bottom bar ---- */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px 16px;
  background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 22px; letter-spacing: 0; }
.brand img { border-radius: 8px; }
.steps { display: flex; gap: 4px; padding: 0 16px 12px; max-width: 640px; margin: 0 auto; }
.steps button {
  flex: 1; min-width: 0; border: 0; background: none; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 500; color: var(--muted); text-align: left; letter-spacing: 0.04em;
}
.steps button::before { content: ""; height: 4px; border-radius: 2px; background: var(--accent-soft); }
.steps button.done::before, .steps button.current::before { background: var(--accent); }
.steps button.current { color: var(--accent); }
.steps button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

main { max-width: 640px; margin: 0 auto; padding: 4px 16px calc(150px + env(safe-area-inset-bottom)); }
h1 { font-size: 28px; line-height: 36px; font-weight: 400; margin: 8px 0 4px; letter-spacing: 0; }
.sub { color: var(--muted); margin: 0 0 20px; }
h2 { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.01em; color: var(--accent); margin: 28px 0 10px 4px; }

.bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 12px 16px calc(8px + env(safe-area-inset-bottom));
  background: var(--surface); box-shadow: 0 -1px 0 var(--border), 0 -2px 8px rgba(0, 0, 0, 0.06);
}
.bottom .row { display: flex; gap: 12px; max-width: 640px; margin: 0 auto; }
.bottom .primary { flex: 1; }

/* ---- buttons: filled (primary), filled tonal (btn), outlined (ghost) ---- */
.btn, .primary, .ghost {
  min-height: var(--tap); padding: 0 24px; border-radius: 999px;
  border: 0; background: var(--accent-soft); color: var(--accent-soft-ink);
  font-size: 15px; font-weight: 500; letter-spacing: 0.01em; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; user-select: none; transition: box-shadow 0.15s;
}
.primary { background: var(--accent); color: var(--accent-ink); }
.scan.is-off label { opacity: 0.38; pointer-events: none; box-shadow: none; }
.btn:disabled, .primary:disabled { background: color-mix(in srgb, var(--text) 12%, transparent); color: color-mix(in srgb, var(--text) 38%, transparent); cursor: default; }
.ghost { background: transparent; border: 1px solid var(--outline); color: var(--accent); }
.small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.block { width: 100%; }
.btn .icon, .primary .icon, .ghost .icon { width: 18px; height: 18px; }

/* ---- outlined text fields ---- */
input[type="text"], input[type="number"], input:not([type]), select {
  min-height: 52px; width: 100%; padding: 0 16px;
  background: var(--surface); border: 1px solid var(--outline); border-radius: var(--field-radius);
  outline: none; color: var(--text);
}
input:focus, select:focus { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
input::placeholder { color: var(--muted); opacity: 0.8; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' fill='%23747775'%3E%3Cpath d='M459-381 314-526q-3-3-4.5-6.5T308-540q0-8 5.5-14t14.5-6h304q9 0 14.5 6t5.5 14q0 2-6 14L501-381q-5 5-10 7t-11 2q-6 0-11-2t-10-7Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 24px;
}
label.field { display: block; font-size: 14px; font-weight: 500; color: var(--muted); }
label.field > input, label.field > select, label.field > .affix { margin-top: 6px; }
.affix { position: relative; }
.affix span { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.affix .pre { left: 16px; }
.affix .post { right: 16px; }
.affix input.has-pre { padding-left: 30px; }
.affix input.has-post { padding-right: 36px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline { display: flex; gap: 10px; }
.inline > input { flex: 1; }

/* ---- segmented button ---- */
.seg { display: flex; border: 1px solid var(--outline); border-radius: 999px; overflow: hidden; }
.seg button {
  flex: 1; min-height: 44px; border: 0; background: transparent; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--text); padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.seg button + button { border-left: 1px solid var(--outline); }
.seg button.on { background: var(--accent-soft); color: var(--accent-soft-ink); }
.seg button.on::before, .chip.on::before {
  content: ""; width: 18px; height: 18px; flex: none; background: currentColor;
  -webkit-mask: var(--check) center / contain no-repeat; mask: var(--check) center / contain no-repeat;
}
:root { --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='m378-332 363-363q9-9 21.6-9 12.4 0 21.4 9t9 21.5q0 12.5-9 21.5L399-267q-9 9-21 9t-21-9L175-449q-9-9-8.5-21.5T176-492q9-9 21.5-9t21.5 9l159 160Z'/%3E%3C/svg%3E"); }

/* ---- filter chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 16px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--outline); background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px;
}
.chip.on { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-soft-ink); padding-left: 10px; }
.chip.big { min-height: 48px; font-size: 16px; }
.chip .x { opacity: 0.7; font-size: 20px; line-height: 1; }

/* ---- cards / lists ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stack > * + * { margin-top: 12px; }
.muted { color: var(--muted); }
.warn { color: var(--warn); }
.ok { color: var(--ok); }
.right { text-align: right; }
.money { font-variant-numeric: tabular-nums; }

.scan { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.scan label { cursor: pointer; }
.scan input { display: none; }
.scan .primary, .scan .btn { min-height: 72px; border-radius: 20px; font-size: 16px; }
.scan .primary { box-shadow: var(--e1); }
.scan .icon.lg { width: 26px; height: 26px; }

.status { display: flex; align-items: center; gap: 14px; }
.spinner { width: 24px; height: 24px; border-radius: 50%; border: 4px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.item { display: grid; grid-template-columns: minmax(0, 1fr) 108px; gap: 10px; align-items: center; }
.item .name { grid-column: 1 / -1; display: flex; gap: 8px; }
.item .name input { flex: 1; }
.item .tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.iconbtn {
  width: var(--tap); height: var(--tap); flex: none; border-radius: 50%; cursor: pointer;
  border: 0; background: var(--surface-2); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.iconbtn.on { background: var(--accent); color: var(--accent-ink); }
.item-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 12px; }
.item-row strong { font-size: 17px; font-weight: 500; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-soft-ink); font-weight: 500; margin-left: 8px; vertical-align: 2px; }
.card.item.unclear { border-color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.unclear-note { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; color: var(--warn); }
.unclear-note > span { flex: 1 1 160px; }
.unclear-note .linkbtn { padding: 4px 0; }
.unread-list { margin: 6px 0; padding-left: 18px; }
.notice.warn > div > :last-child { margin-bottom: 0; }
.card.todo { border-color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }

.sums { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; }
.sums .total { font-size: 22px; font-weight: 500; padding-top: 8px; border-top: 1px solid var(--border); }
.notice { padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); font-size: 15px; }
.notice.warn { background: var(--warn-soft); color: var(--warn-soft-ink); }
.notice:has(> .icon) { display: flex; gap: 12px; align-items: flex-start; }
.notice > .icon { flex: none; margin-top: 1px; }

.person-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.person-head .name { font-size: 20px; font-weight: 500; }
.person-head .amt { font-size: 28px; font-weight: 500; letter-spacing: 0; }
details summary { cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 500; margin-top: 4px; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: ""; display: inline-block; width: 1.3em; height: 1.3em; margin-left: 2px; vertical-align: -0.3em; background: currentColor;
  -webkit-mask: var(--chev) center / contain no-repeat; mask: var(--chev) center / contain no-repeat;
  transition: transform 0.2s;
}
:root { --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M480-356q-6 0-11-2t-10-7L261-563q-9-9-8.5-21.5T262-606q9-9 21.5-9t21.5 9l175 176 176-176q9-9 21-8.5t21 9.5q9 9 9 21.5t-9 21.5L501-365q-5 5-10 7t-11 2Z'/%3E%3C/svg%3E"); }
details[open] > summary::after { transform: rotate(180deg); }
.lines { font-size: 15px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-top: 8px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.actions > * { flex: 1 1 auto; }
.paid { margin-top: 10px; color: var(--ok); font-weight: 500; }

.empty { text-align: center; padding: 28px 16px; color: var(--muted); border: 1px dashed var(--outline); border-radius: var(--radius); }

/* snackbar */
.toast {
  position: fixed; left: 50%; bottom: calc(112px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--inverse); color: var(--inverse-ink); padding: 14px 16px; border-radius: 4px; font-size: 14px;
  box-shadow: var(--e3); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 30;
  width: max-content; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.affix input.has-pre.wide-pre { padding-left: 54px; }
.pay-setup summary { color: var(--text); font-size: 16px; margin: 0; }
.pay-setup summary b { font-weight: 500; }
.top .brand + * { flex: none; }
a { color: var(--accent); }
a.btn { color: var(--accent-soft-ink); }
a.ghost { color: var(--accent); }
a.primary { color: var(--accent-ink); }
b, strong { font-weight: 600; }

/* undo on the Bill tab: an M3 snackbar with an action, just above Back/Next */
.undo-spacer { height: 96px; }
.undo-bar {
  position: fixed; z-index: 6; left: 50%; transform: translateX(-50%);
  bottom: calc(108px + env(safe-area-inset-bottom)); width: calc(100% - 32px); max-width: 608px;
  display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 16px;
  background: var(--inverse); color: var(--inverse-ink); border-radius: 4px; box-shadow: var(--e3);
}
.undo-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.undo-bar .muted { color: inherit; opacity: 0.75; }
.undo-bar .primary { min-height: 44px; background: transparent; color: var(--inverse-accent); padding: 0 12px; }
.undo-bar .iconbtn { background: transparent; color: var(--inverse-ink); }
.iconbtn.small-icon { width: 44px; height: 44px; }
.card.restored { animation: restored 1.2s ease-out; }
@keyframes restored { from { box-shadow: 0 0 0 3px var(--accent); } to { box-shadow: 0 0 0 3px transparent; } }

/* ---- top bar menu button ---- */
.top-actions { display: flex; gap: 8px; align-items: center; }
.menu-btn { width: 48px; height: 48px; background: transparent; color: var(--text); }
a.brand { color: var(--text); text-decoration: none; }

/* ---- bottom sheets ---- */
#sheet-root[hidden] { display: none; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 20; background: var(--scrim); }
.sheet {
  position: fixed; z-index: 21; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 28px 28px 0 0; box-shadow: var(--e3);
  padding: 28px 16px calc(20px + env(safe-area-inset-bottom));
  animation: sheet-up 0.25s cubic-bezier(0.2, 0, 0, 1);
}
.sheet::before { content: ""; position: absolute; top: 10px; left: 50%; width: 32px; height: 4px; margin-left: -16px; border-radius: 2px; background: var(--outline); opacity: 0.5; }
.sheet.wide { max-width: 640px; }
@keyframes sheet-up { from { transform: translate(-50%, 60px); opacity: 0; } }
.sheet-x {
  position: absolute; top: 16px; right: 12px; width: 48px; height: 48px; border: 0; background: transparent;
  border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--muted);
}
.sheet-title { font-size: 24px; line-height: 32px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text); margin: 4px 52px 14px 4px; }
.sheet h3, .audit h3 { font-size: 15px; font-weight: 500; margin: 18px 0 6px; }
body.sheet-open { overflow: hidden; }
.menu { display: grid; gap: 2px; background: var(--surface); border-radius: 16px; overflow: hidden; }
.menu > * {
  min-height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 16px; text-align: left; font-size: 16px;
  border: 0; border-radius: 0; background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer;
}
.menu > * + * { box-shadow: 0 -1px 0 var(--border); }
.menu > * b { margin-left: auto; font-weight: 500; color: var(--muted); }
.ticks { padding-left: 4px; list-style: none; margin: 8px 0 12px; }
.ticks li { padding: 6px 0; }
.steps-list li { padding: 4px 0; }
.ios-share { display: inline-flex; padding: 2px 5px; border: 1px solid var(--outline); border-radius: 6px; vertical-align: -0.2em; }
.share-text { width: 100%; font: inherit; font-size: 15px; padding: 12px 14px; border-radius: var(--field-radius); border: 1px solid var(--outline); background: var(--surface); color: var(--text); margin-bottom: 12px; resize: none; }

/* ---- small bits ---- */
.small-text { font-size: 14px; }
.linkbtn { border: 0; background: none; padding: 8px 0; color: var(--accent); font-weight: 500; cursor: pointer; font-size: 14px; }
.btn.tiny { min-height: 32px; padding: 0 12px; font-size: 13px; }
.chip-pair { display: inline-flex; }
.chip-pair .chip { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 0; }
.chip-forget { min-height: 40px; padding: 0 10px; border: 1px solid var(--outline); border-left: 0; border-radius: 0 8px 8px 0; background: var(--surface); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; }
.chip-pair .chip.on + .chip-forget { border-color: var(--accent-soft); }
.pstatus { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 14px; }
.pstatus:empty { display: none; }
.settle { margin: 14px 0 0; font-weight: 500; }
.privacy-foot { margin: 32px 0 0; font-size: 13px; color: var(--muted); text-align: center; line-height: 1.5; }

/* ---- audit ---- */
.audit p { margin: 4px 0; font-size: 15px; }
.audit .sumline { font-weight: 600; border-top: 1px solid var(--border); padding-top: 6px; }
.audit.lines { gap: 8px 0; font-size: 15px; }
.audit.lines > .right { padding-left: 12px; }
.audit.lines small { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; }
.audit .total-line { font-size: 17px; }
.audit-person { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-top: 8px; background: var(--surface); }
.audit-person summary { display: flex; justify-content: space-between; color: var(--text); font-weight: 500; font-size: 16px; }
.audit-person summary::after { content: none; }
.hist .actions { margin-top: 8px; }

/* ---- pay page ---- */
.paypage main { padding-bottom: calc(140px + env(safe-area-inset-bottom)); }
.pay-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface); box-shadow: 0 -1px 0 var(--border); font-size: 12px; line-height: 1.45; color: var(--muted); text-align: center;
}
.owe + * { margin-top: 16px; }
.owe { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 16px; text-align: center; background: var(--accent-soft); color: var(--accent-soft-ink); border: 0; border-radius: 28px; }
.owe .muted { color: inherit; opacity: 0.85; }
.owe-amt { font-size: 52px; font-weight: 400; letter-spacing: -0.01em; line-height: 1.15; }
.paybtn {
  width: 100%; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  color: var(--text); text-decoration: none; font-size: 16px; cursor: pointer; text-align: left;
}
.paybtn > span { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; }
.paybtn.chosen { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.done-card { border-color: var(--ok); margin-top: 12px; }
/* Cash App / Zelle: one box that grows when tapped */
.paycard { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s; }
.paycard.chosen, .paycard.open { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.paycard .paycard-head { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.paycard-head .chev { margin-left: 4px; transition: transform 0.25s; }
.paycard.open .paycard-head .chev { transform: rotate(180deg); }
.paycard-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.25s cubic-bezier(0.2, 0, 0, 1); }
.paycard.open .paycard-body { grid-template-rows: 1fr; }
.paycard-inner { min-height: 0; overflow: hidden; }
.paycard-content { padding: 0 16px 16px; }
.paycard-content p { margin: 0; }
.paycard-content .actions > * { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 12px; }
.nowrap { white-space: nowrap; }
.paycard-bottom { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 40px; margin-top: 10px; font-size: 14px; text-align: center; }
.paycard-note { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 13px; }
.prose { line-height: 1.6; }
.prose h2 { margin-top: 28px; }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }

/* privacy line pinned under Back/Next */
.privacy-bar { max-width: 640px; margin: 8px auto 0; font-size: 12px; line-height: 1.3; color: var(--muted); text-align: center; }
.privacy-bar a { font-weight: 500; }
.hint { margin: 0; font-size: 14px; color: var(--muted); }
.pay-setup summary { display: flex; flex-direction: column; gap: 2px; }
.pay-setup summary::after { content: none; }

/* ---- icons (Material Symbols, filled) ---- */
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; fill: currentColor; }
.icon.sm { width: 1.1em; height: 1.1em; vertical-align: -0.2em; }
.icon.lg { width: 1.5em; height: 1.5em; }
.iconbtn .icon { width: 24px; height: 24px; }
.chip .icon.x { width: 18px; height: 18px; opacity: 0.7; }
.chip-forget .icon { width: 18px; height: 18px; }
.sheet-x .icon { width: 24px; height: 24px; }
.menu > * .icon { width: 24px; height: 24px; color: var(--muted); }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks .icon { color: var(--accent); margin-top: 1px; }
.with-icon { display: flex; gap: 8px; align-items: flex-start; }
.with-icon .icon { margin-top: 1px; color: var(--accent); }
.notice.warn { display: flex; gap: 12px; align-items: flex-start; }
.notice.warn .icon { color: var(--warn); flex: none; margin-top: 1px; }
.tag { display: inline-flex; align-items: center; padding: 2px 6px; }
.tag .icon { width: 15px; height: 15px; }
.settle { display: flex; align-items: center; gap: 8px; }
.settle .icon { color: var(--ok); }
.done-card { display: flex; gap: 12px; align-items: flex-start; }
.done-card .icon { color: var(--ok); }
.privacy-bar .icon, .pay-foot .icon { vertical-align: -0.2em; }
summary .icon { color: var(--accent); }

/* payment app badges: a letter on a coloured circle instead of the companies' logos */
.pm-badge {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-right: 14px; flex: none;
  border-radius: 50%; font-size: 16px; font-weight: 600; vertical-align: middle; color: #fff; background: #0b57d0;
}
.pm-cashapp { background: #146c2e; }
.pm-paypal { background: #041e49; }
.pm-zelle { background: #6750a4; }
.pm-cash { background: var(--surface-2); color: var(--text); }
.pm-cash .icon { width: 20px; height: 20px; }
@media (prefers-color-scheme: dark) {
  .pm-badge { color: #062e6f; background: #a8c7fa; }
  .pm-cashapp { color: #00391c; background: #6dd58c; }
  .pm-paypal { color: #041e49; background: #d3e3fd; }
  .pm-zelle { color: #21005d; background: #d0bcff; }
  .pm-cash { background: var(--surface-2); color: var(--text); }
}
.paybtn b { display: inline-flex; align-items: center; font-weight: 500; }

/* hover states for mouse users */
@media (hover: hover) {
  .btn:hover::after, .primary:not(:disabled):hover::after, .ghost:hover::after, .chip:hover::after, .iconbtn:hover::after,
  .seg button:hover::after, .paybtn:hover::after, .menu > *:hover::after, .chip-forget:hover::after, .sheet-x:hover::after { opacity: 0.08; }
  .primary:not(:disabled):hover { box-shadow: var(--e1); }
}
