/* SettleUp design-system — shared screen styles (light) */
:root {
  /* semantic tokens */
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-muted: #f5f5f4;
  --fg: #1c1917;
  --muted: #57534e;
  --border: #e7e5e4;
  --border-strong: color-mix(in oklch, var(--border) 82%, var(--muted));
  --accent: #0f766e;
  --accent-strong: oklch(0.47 0.074 183);
  --accent-bright: #2dd4bf;
  --accent-soft: oklch(0.96 0.018 175);
  --accent-contrast: #ffffff;
  --accent-2: #f59e0b;
  /* Bantay's warm La Union tones — see "Mascot contract (Bantay)".
     Colour exception: if these are ever used, they may appear ONLY inside the
     card or hero area that holds Bantay — never on a page background and never
     where money is shown. They are currently reserved: the delivered artwork
     carries its own colour and white glow edge, so no extra surface is laid
     behind him. Do not reintroduce a filled tile — the glow shows up as a
     halo on anything but the page's own light surface. */
  --mascot-sand: oklch(0.95 0.035 78);
  --mascot-sun: oklch(0.88 0.075 74);
  --pos: var(--accent);
  --neg: oklch(0.45 0.10 40);
  --danger: oklch(0.46 0.16 29);
  --shadow-sheet: 0 4px 16px rgba(0, 0, 0, 0.08);
  --radius-s: 8px;
  --radius-b: 12px;
  --radius-c: 16px;
  --control-h: 48px;
  --gutter: 16px;
  --speed: 200ms;
  --ease: cubic-bezier(0.25, 0.8, 0.35, 1);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

a { color: inherit; text-decoration: none; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.phone {
  position: relative;
  width: 390px;
  height: 100dvh;
  max-height: 844px;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 480px) {
  body { display: grid; place-items: center; background: var(--surface-muted); }
  .phone {
    height: 844px;
    max-height: calc(100vh - 48px);
    border: 1px solid var(--border);
    border-radius: 32px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
  }
}

.screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- top bar ---------- */
.topbar {
  padding: 18px var(--gutter) 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.topbar .titles { flex: 1; min-width: 0; }
.topbar h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.icon-btn {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--fg);
  cursor: pointer;
  transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.icon-btn:hover { background: var(--surface-muted); border-color: var(--border-strong); }
.icon-btn:active { background: var(--border); }
.icon-btn svg { width: 20px; height: 20px; }

/* circular avatar button in topbar */
.avatar-btn {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 700;
  font-size: 14px;
  color: var(--fg);
  cursor: pointer;
  display: grid;
  place-items: center;
  letter-spacing: 0.02em;
}
.avatar-btn:hover { border-color: var(--border-strong); background: var(--surface-muted); }

/* ---------- scroll body ---------- */
.body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px var(--gutter) 24px;
  scrollbar-width: none;
}
.body::-webkit-scrollbar { display: none; }

.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 20px 0 8px;
}
.section-label:first-child { margin-top: 8px; }

/* ---------- search ---------- */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--muted);
  margin-bottom: 12px;
}
.search svg { flex: none; width: 18px; height: 18px; }
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-weight: 500;
  color: var(--fg);
}
.search input::placeholder { color: var(--muted); opacity: 0.8; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

/* ---------- filter chips ---------- */
.chips {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  height: 36px;
  padding: 0 14px;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.chip svg { width: 14px; height: 14px; }
.chip:hover { border-color: var(--border-strong); }
.chip[aria-pressed="true"] {
  background: var(--fg);
  border-color: var(--fg);
  color: #ffffff;
}

/* ---------- group cards ---------- */
.group-list { display: flex; flex-direction: column; gap: 8px; }
.group-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-c);
  cursor: pointer;
  font: inherit;
  transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.group-card:hover { background: var(--surface-muted); border-color: var(--border-strong); }
.group-card:active { background: var(--border); }
.group-card .avatar-stack { flex: none; }
.group-card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.group-card .name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-card .meta {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}
.group-btn {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  max-width: 46%;
}
.group-btn .amount {
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}
.group-btn .word {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}
.group-btn.pos .amount { color: var(--pos); }
.group-btn.neg .amount { color: var(--neg); }
.group-btn.settled .amount { color: var(--muted); font-weight: 600; }

.money-pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- avatars ---------- */
.av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.03em;
}
.av-xs { width: 24px; height: 24px; font-size: 10px; }
.av-sm { width: 32px; height: 32px; font-size: 11px; }
.av-lg { width: 44px; height: 44px; font-size: 15px; }
.avatar-stack { display: flex; }
.avatar-stack .av { border: 2px solid var(--surface); margin-left: -8px; }
.avatar-stack .av:first-child { margin-left: 0; }
/* hashed avatar shades — decorative only (amber never used as text on white) */
.sh-0 { background: var(--accent); }
.sh-1 { background: var(--accent-2); color: var(--fg); }
.sh-2 { background: var(--muted); }
.sh-3 { background: color-mix(in oklch, var(--muted) 45%, var(--border)); }
.sh-4 { background: var(--accent-strong); }
.sh-5 { background: oklch(0.55 0.15 45); }

/* ---------- money rows ---------- */
.rows { display: flex; flex-direction: column; }
.money-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 8px 8px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-b);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background var(--speed) var(--ease);
}
.money-row:hover { background: var(--surface-muted); }
.money-row:active { background: var(--border); }
.money-row .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.money-row .who { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.money-row .when { font-size: 12.5px; color: var(--muted); font-weight: 500; letter-spacing: 0.01em; }
.money-cell {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.money-cell .amount {
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}
.money-cell .word { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); white-space: nowrap; }
.money-cell.pos .amount { color: var(--pos); }
.money-cell.neg .amount { color: var(--neg); }
.money-cell.settled .amount { color: var(--muted); font-weight: 600; font-size: 20px; }
/* expense card (list of expenses) */
.expense-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 8px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-b);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background var(--speed) var(--ease);
}
.expense-row .col { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex: none; }
.expense-row:hover { background: var(--surface-muted); }
.expense-row .cat {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-s);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--fg);
  flex: none;
}
.expense-row .cat svg { width: 18px; height: 18px; }
.expense-row .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.expense-row .what { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expense-row .when { font-size: 12.5px; color: var(--muted); font-weight: 500; letter-spacing: 0.01em; }
.expense-row .amount {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.expense-row .pay {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

/* ---------- buttons ---------- */
.btn {
  height: var(--control-h);
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-b);
  border: 1px solid transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease), transform 120ms var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--fg); }
.btn-secondary:hover { background: var(--surface-muted); border-color: var(--border-strong); }
.btn-danger { background: var(--surface); border-color: var(--border); color: var(--danger); }
.btn-danger:hover {
  background: color-mix(in oklch, var(--danger) 8%, var(--surface));
  border-color: color-mix(in oklch, var(--danger) 30%, var(--border));
}
.btn-block { width: 100%; }
.btn-lg { height: 56px; font-size: 16px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* sticky bottom CTA area */
.cta-zone {
  flex: none;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cta-zone.row { flex-direction: row; gap: 8px; }

/* ---------- bottom sheet ---------- */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 9, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--speed) var(--ease);
  z-index: 40;
}
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border-radius: var(--radius-c) var(--radius-c) 0 0;
  box-shadow: var(--shadow-sheet);
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateY(104%);
  transition: transform var(--speed) var(--ease);
  z-index: 41;
  max-height: 86%;
  overflow-y: auto;
}
.phone[data-sheet-open="true"] .sheet-backdrop { opacity: 1; pointer-events: auto; }
.phone[data-sheet-open="true"] .sheet { transform: translateY(0); }
.sheet .grab {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  margin: 6px auto 14px;
}
.sheet h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.sheet .sheet-sub { font-size: 13.5px; color: var(--muted); font-weight: 500; margin-bottom: 16px; }
.sheet-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-b);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.sheet-item:hover { background: var(--surface-muted); border-color: var(--border-strong); }
.sheet-item .grow { flex: 1; min-width: 0; }
.sheet-item .note { font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 1px; }
.sheet-item svg { width: 20px; height: 20px; color: var(--fg); flex: none; }
.sheet-item .chev { color: var(--muted); }

/* toast */
.toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 92px;
  background: var(--fg);
  color: #fafaf9;
  border-radius: var(--radius-b);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-sheet);
  display: flex;
  gap: 8px;
  align-items: center;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease);
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.show svg { animation: check-pop 0.22s var(--ease); }
@keyframes check-pop {
  0% { transform: scale(0.4); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.toast svg { width: 16px; height: 16px; flex: none; color: var(--accent-bright); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- tab bar (home) ---------- */
.tabbar {
  flex: none;
  display: flex;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
}
.tab-spacer { flex: 1; max-width: 64px; }
.tab {
  flex: 1;
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius-s);
  text-decoration: none;
  transition: color var(--speed) var(--ease);
}
.tab svg { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--accent); }
.tab:hover { color: var(--fg); }
.tab[aria-current="page"]:hover { color: var(--accent); }

/* ---------- segmented control ---------- */
.segmented {
  height: 44px;
  padding: 3px;
  display: flex;
  gap: 2px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  margin-bottom: 12px;
}
.segmented button {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}
.segmented button:hover { color: var(--fg); }
.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--fg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* ---------- FAB (center dock) ---------- */
.fab {
  position: absolute;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sheet);
  transition: background var(--speed) var(--ease), transform 120ms var(--ease);
  z-index: 30;
}
.fab:hover { background: var(--accent-strong); }
.fab:active { transform: translateX(-50%) scale(0.96); }
.fab svg { width: 24px; height: 24px; }
.fab-badge {
  position: absolute;
  left: 16px;
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  z-index: 29;
}

/* ---------- Bantay, the barkada buddy (mascot) ---------- */
/* He supports the moment, never carries it: at most one per screen, and
   only in an empty state, the onboarding art or a loading state. Money and
   the primary action stay the loudest things on screen. The art is
   decorative — alt="" and aria-hidden="true"; the copy carries meaning. */
.bantay { display: block; height: auto; margin: 0 auto; }
.bantay--onb { width: 250px; }
.bantay--board { width: 168px; }
.bantay--notfound { width: 160px; }
.bantay--join { width: 120px; }
.bantay--empty { width: 132px; }
/* new-group: smallest placement. Sits in normal flow at the end of the form so
   he is pushed down as people are added, and never meets the sticky footer. */
.bantay--form { width: 96px; margin: 18px auto 0; }

/* ---------- empty state (Bantay's moment) ---------- */
.empty {
  text-align: center;
  padding: 28px 16px 12px;
}
.empty svg { width: 132px; height: auto; display: block; margin: 0 auto 12px; }
.empty .bantay { margin: 0 auto 12px; }
.empty .empty-title { font-weight: 700; font-size: 16px; text-wrap: balance; }
.empty .empty-sub { color: var(--muted); font-size: 13.5px; font-weight: 500; margin-top: 2px; }

/* ---------- inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); }
.input {
  height: 48px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  font: inherit;
  font-weight: 500;
  color: var(--fg);
  width: 100%;
  outline: 0;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.input.error { border-color: var(--danger); box-shadow: 0 0 0 2px color-mix(in oklch, var(--danger) 12%, var(--surface)); }
.field .error-msg {
  display: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--danger);
}
.field.has-error .error-msg { display: block; }

.amount-input {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-b);
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.amount-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.amount-input .peso { font-size: 30px; font-weight: 600; color: var(--muted); }
.amount-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.amount-input input::placeholder { color: var(--border-strong); font-weight: 600; }

/* ---------- card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-c);
  padding: 16px;
}
.card + .card { margin-top: 8px; }
.card.plain { border-radius: var(--radius-b); padding: 12px; }

/* divided list inside a card */
.divided > * + * { border-top: 1px solid var(--border); }

/* ---------- onboarding & join additions ---------- */

/* disabled with a reason — never a mystery grey button */
.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.btn-primary:disabled,
.btn-primary[disabled] { background: var(--accent); border-color: var(--accent); }
.btn-primary:disabled:hover,
.btn-primary[disabled]:hover { background: var(--accent); border-color: var(--accent); }

/* quiet inline text button ("Skip", "Paste a link instead", "Try the demo") */
.text-btn {
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius-s);
  transition: color var(--speed) var(--ease), background var(--speed) var(--ease);
}
.text-btn:hover { color: var(--accent-strong); background: var(--accent-soft); }
.text-btn:active { background: color-mix(in oklch, var(--accent) 14%, var(--surface)); }
.text-btn.quiet { color: var(--muted); }
.text-btn.quiet:hover { color: var(--fg); background: var(--surface-muted); }
.text-link { text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* "Demo" badge — amber family, derived tones only */
.pill-demo {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--accent-2) 16%, var(--surface));
  border: 1px solid color-mix(in oklch, var(--accent-2) 38%, var(--border));
  color: color-mix(in oklch, var(--accent-2) 42%, var(--fg));
  white-space: nowrap;
}

/* loading skeleton rows */
.skeleton {
  border: 1px solid var(--border);
  border-radius: var(--radius-b);
  background: var(--surface);
  animation: pulse-soft 1.4s var(--ease) infinite;
}
.skeleton .sk-line {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-muted);
}
@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* inline form error (outside .field) */
.form-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--danger);
  line-height: 1.4;
}
.form-error svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
