/* ================= Upstero design system v2 =================
   Reference: clean/professional/trustworthy — white cards on soft
   gray, black pill CTAs, pastel icon chips, Inter. */

* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #ebeef5; --card: #ffffff; --ink: #111827; --muted: #8a94a6;
  --line: #eef1f6; --line-2: #e3e8f0;
  --blue: #3b82f6; --blue-bg: #eef4ff;
  --green: #22c55e; --green-bg: #e9f9f0;
  --red: #ef4444; --red-bg: #feeef0;
  --amber: #f59e0b; --amber-bg: #fdf4e3;
  --violet: #8b5cf6; --violet-bg: #f3efff;
  --r: 16px; --r-sm: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);

  /* ONE gutter for every full-bleed surface. The topbar, the sidebar and the
     page content all read it, so they share a left edge at any viewport
     width — that alignment is the only thing holding a full-width layout
     together once the centring max-width is gone. It scales with the
     viewport so a 4K monitor doesn't get a 14px margin and a phone doesn't
     get a 44px one. */
  --gutter: clamp(16px, 2.6vw, 56px);
  /* The sidebar grows a little on wide screens so long labels stop wrapping,
     but it is capped: past ~264px it is just white space, and every pixel it
     takes is a pixel off the table beside it. */
  --side-w: clamp(206px, 15vw, 264px);
}
html {
  font-size: 15px;
  /* iOS Safari inflates text after a portrait->landscape rotation unless this
     is pinned. Nothing else triggers it, and nothing else fixes it. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Kills the grey flash iOS paints over any tapped element. */
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
a { color: inherit; text-decoration: none; }
h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; }
h3 { font-size: 1rem; font-weight: 600; }
code { background: #f3f5f9; padding: .12em .4em; border-radius: 6px; font-size: .88em; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, Consolas, monospace; font-size: .85em; }
.green { color: #16a34a; }
.amber { color: #d97706; }
.red { color: #dc2626; }
.center { text-align: center; }

/* ---------- public marketing pages ---------- */
.site-nav a.on { color: var(--ink); font-weight: 700; }

.page-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  max-width: 1140px; margin: 0 auto; padding: 56px 28px 40px;
}
.page-hero-narrow { grid-template-columns: 1fr; max-width: 780px; text-align: center; }
.page-hero-narrow .hero-actions { justify-content: center; }
.page-hero h1 { font-size: 2.4rem; line-height: 1.12; letter-spacing: -.03em; }
.lede { font-size: 1.08rem; color: #4b5565; margin-top: 14px; max-width: 56ch; }
.page-hero-narrow .lede { margin-left: auto; margin-right: auto; }

.prose-wrap { max-width: 1140px; margin: 0 auto; padding: 0 28px 56px; }
.prose-block { background: #fff; border: 1px solid #e7ebf2; border-radius: var(--r);
  box-shadow: var(--shadow); padding: 30px 34px; margin-bottom: 20px; }
.prose-block h2 { font-size: 1.3rem; margin-bottom: 12px; }
.prose-block p { color: #4b5565; margin-bottom: 12px; max-width: 74ch; }
.prose-block p:last-child { margin-bottom: 0; }

.site-figure { margin-top: 20px; border-radius: 14px; overflow: hidden; background: #eef2fa; }
.site-figure img, .site-figure svg { display: block; width: 100%; height: auto; }
.page-hero .site-figure { margin-top: 0; }
.site-figure-placeholder svg { aspect-ratio: 16 / 9; }

.closing-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  max-width: 1140px; margin: 0 auto 60px; padding: 34px; background: #111827; color: #fff;
  border-radius: var(--r);
}
.closing-cta h2 { font-size: 1.35rem; }
.closing-cta p { color: #aeb7c7; margin-top: 6px; }
.closing-cta .btn-dark { background: #fff; color: #111827; box-shadow: none; }
.closing-cta .btn-dark:hover { background: #f1f3f7; }

/* FAQ — <details> so it works with no JavaScript under a strict CSP */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 14px 16px; }
.faq-item summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; color: var(--muted); font-weight: 400; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin-top: 10px; color: #4b5565; }

.public-offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.public-offer { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; margin: 0; }
.public-offer-body { min-width: 0; }
.public-offer-body small { display: block; margin-top: 4px; font-size: .78rem; }
.public-offer-pay { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 12px; }

@media (max-width: 860px) {
  .page-hero { grid-template-columns: 1fr; padding-top: 36px; }
  .page-hero h1 { font-size: 1.9rem; }
  .closing-cta { margin-left: 20px; margin-right: 20px; }
}

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 1.15rem; font-weight: 500; letter-spacing: -.02em; }
.brand b { font-weight: 800; }
.brand-mark {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px;
  background: #111827; color: #fff; font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 4px 10px rgba(17, 24, 39, .25);
}
.brand-invert { color: #fff; }

/* ---------- buttons ---------- */
.btn-dark, .btn-ghost, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem;
  padding: 10px 20px; border-radius: 999px; transition: transform .05s, background .15s, box-shadow .15s;
}
.btn-dark { background: #111827; color: #fff; box-shadow: 0 6px 16px rgba(17, 24, 39, .22); }
.btn-dark:hover { background: #000; }
.btn-dark:active { transform: translateY(1px); }
.btn-dark[disabled] { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn-dark .arr { font-weight: 400; transform: translateY(-.5px); }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line-2); }
.btn-ghost:hover { background: #f6f8fb; }
.btn-danger { background: var(--red-bg); color: #b91c1c; }
.btn-danger:hover { background: #fdd8dc; }
.btn-sm { padding: 7px 14px; font-size: .82rem; }
.btn-lg { padding: 13px 26px; font-size: .98rem; }
.btn-block { display: flex; width: 100%; }
.linklike { background: none; border: 0; cursor: pointer; font: inherit; color: var(--blue); font-weight: 600; font-size: .85rem; }
.linklike:hover { text-decoration: underline; }
a.linklike:hover { text-decoration: underline; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: 14px; }
input, select, textarea {
  width: 100%; margin-top: 6px; padding: 10px 14px; border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm); font: inherit; background: #fff; color: var(--ink);
  /* iOS renders selects and some inputs with native chrome that ignores the
     border-radius and padding above; Safari on desktop does the same to
     selects. appearance:none hands the styling back to us on every engine. */
  -webkit-appearance: none; appearance: none;
}
/* A select still needs an affordance once the native arrow is removed. Inline
   SVG as a data URI — an external image would break under img-src 'self'. */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%238a94a6' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 36px;
}
input:focus, select:focus { outline: none; border-color: #111827; }
form .btn-dark { margin-top: 4px; }
.search-box {
  display: inline-flex; align-items: center; gap: 8px; background: #f3f5f9;
  border-radius: 999px; padding: 8px 14px; margin: 0; font-weight: 400;
}
.search-box .ic { width: 16px; height: 16px; color: var(--muted); display: inline-flex; }
.search-box .ic svg { width: 16px; height: 16px; }
.search-box input { border: 0; background: none; margin: 0; padding: 0; width: 150px; font-size: .86rem; }
.search-box input:focus { outline: none; }

.alert { background: var(--red-bg); color: #991b1b; padding: 11px 15px; border-radius: var(--r-sm); margin-bottom: 14px; font-size: .88rem; }
.alert-ok { background: var(--green-bg); color: #14532d; }
.alert-plain { background: #f3f5f9; color: var(--muted); }

/* ---------- topbar ---------- */
/* 100dvh, falling back to 100vh. On iOS Safari 100vh is measured against the
   viewport WITHOUT the URL bar, so a 100vh page is always taller than what you
   can see and the last rows sit under the toolbar. dvh tracks the visible
   height as the bar hides and shows. */
.app-body { min-height: 100vh; min-height: 100dvh; }
.topbar {
  display: flex; align-items: center; gap: clamp(12px, 2vw, 28px);
  background: #fff; padding: 12px var(--gutter); box-shadow: 0 1px 0 var(--line-2);
  position: sticky; top: 0; z-index: 40;
}
.topbar-nav { display: flex; gap: 8px; margin: 0 auto; }
.role-chip { padding: 6px 14px; border-radius: 999px; font-size: .84rem; font-weight: 600; color: var(--muted); }
.role-chip.on { background: #111827; color: #fff; }
.muted-chip { background: #f3f5f9; }
/* margin-left:auto, not inherited from .topbar-nav's `margin: 0 auto`. Below
   860px the nav is hidden, and with it went the only thing pushing this group
   to the right — the bell ended up beside the logo, and the dropdown anchored
   to it (right: 0) opened 133px off the left edge of the screen. */
.topbar-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.lang { font-size: .84rem; color: var(--muted); font-weight: 600; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 50%; background: #f3f5f9; cursor: pointer; list-style: none;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn::-webkit-details-marker { display: none; }
.badge {
  position: absolute; top: -2px; right: -4px; background: var(--red); color: #fff;
  font-size: .62rem; font-weight: 700; padding: 1px 5px; border-radius: 999px; border: 2px solid #fff;
}
.user-pill { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; list-style: none; }
.user-pill::-webkit-details-marker { display: none; }
.user-name { font-weight: 600; font-size: .9rem; }
.caret { color: var(--muted); font-size: .7rem; }
.avatar {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  color: #fff; font-weight: 700; font-size: .95rem; flex: none;
}
.avatar.big { width: 56px; height: 56px; font-size: 1.3rem; margin-bottom: 8px; }

/* dropdowns */
.dd { position: relative; }
.dd summary { user-select: none; }
.dd-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 360px; max-width: 92vw;
  background: #fff; border-radius: var(--r); box-shadow: 0 12px 40px rgba(16, 24, 40, .16);
  z-index: 60; overflow: hidden; padding: 6px;
}
.dd-panel-sm { width: 240px; }
.dd-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 8px; }
.dd-me { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.dd-me b { display: block; font-size: .92rem; }
.dd-me small { color: var(--muted); font-size: .78rem; }
.dd-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  font-size: .87rem;
}
.dd-item:hover { background: #f6f8fb; }
.dd-item.unread { background: #f6f9ff; }
.dd-item.danger { color: #b91c1c; }
.dd-item b { display: block; font-size: .85rem; }
.dd-item small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.dd-body { flex: 1; min-width: 0; }
.dd-item time { color: var(--muted); font-size: .72rem; flex: none; }
.dd-empty { padding: 22px 12px; text-align: center; color: var(--muted); font-size: .86rem; }
.dd-foot { display: block; text-align: center; padding: 10px; font-weight: 600; font-size: .84rem; color: var(--blue); border-top: 1px solid var(--line); }
.mini-ic { display: inline-flex; width: 16px; height: 16px; color: var(--muted); }
.mini-ic svg { width: 16px; height: 16px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 5px; align-self: flex-start; }
.dot-conversion { background: var(--green); }
.dot-payout { background: var(--blue); }
.dot-approval { background: var(--violet); }
.dot-signup { background: var(--amber); }
.dot-offer { background: #06b6d4; }
.dot-system { background: var(--muted); }

/* ---------- layout ----------
   Full-bleed on desktop. There is no max-width: the topbar is full width, so
   capping the content below it left a band of dead space on the right of any
   wide screen and the two never lined up. The sidebar is a fixed rail and the
   main column takes whatever is left.

   `minmax(0, 1fr)` and not `1fr`: a bare `1fr` is `minmax(auto, 1fr)`, and a
   wide table inside it sets a min-content floor that pushes the track past
   the viewport — the whole page then scrolls sideways instead of the table
   scrolling inside its card. */
.layout {
  display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr);
  gap: clamp(14px, 1.5vw, 30px);
  padding: clamp(16px, 1.5vw, 30px) var(--gutter); align-items: start;
}
/* On a wide screen the extra room goes to the main column, but a two-column
   page can afford a roomier side rail as well. */

/* Mobile nav disclosure. Hidden on desktop, where the rail is always shown.
   The default state is OPEN so that with JavaScript unavailable the nav is
   still on the page — public/js/app.js collapses it on small screens at load
   and toggles it from here. Failing open costs a scroll; failing closed would
   leave a phone with no navigation at all. */
.side-toggle {
  display: none; align-items: center; gap: 10px; width: 100%;
  background: #fff; border: 1px solid #e7ebf2; border-radius: var(--r-sm);
  box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 14px;
  font: inherit; font-weight: 600; font-size: .9rem; color: var(--ink); cursor: pointer;
}
.side-toggle .ic { display: inline-flex; width: 18px; height: 18px; color: var(--muted); }
.side-toggle .ic svg { width: 18px; height: 18px; }
.side-toggle .arr { margin-left: auto; color: var(--muted); font-size: .7rem; }
.side-toggle[aria-expanded="true"] .arr { transform: rotate(180deg); }

.side { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 18px; }
.side-card { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 10px; }
.side-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px;
  font-size: .89rem; font-weight: 500; color: #4b5563; margin: 1px 0;
}
.side-item:hover { background: #f6f8fb; }
.side-item.on { background: #f1f3f8; color: var(--ink); font-weight: 700; }
.side-item .ic { display: inline-flex; width: 18px; height: 18px; color: #9aa3b2; }
.side-item.on .ic { color: var(--ink); }
.side-item .ic svg { width: 18px; height: 18px; }
.side-label { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 12px 4px; }
.side-badge { margin-left: auto; background: var(--red); color: #fff; font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.side-promo {
  background: #fff; border-radius: var(--r); box-shadow: var(--shadow);
  padding: 16px 16px 8px; position: relative;
}
.side-promo b { font-size: .92rem; display: block; }
.side-promo small { color: var(--muted); font-size: .78rem; }
.doodle { width: 100%; margin-top: 6px; }
.doodle-lg { width: 200px; margin: 0 auto 10px; display: block; }

.main { min-width: 0; }

/* ---------- page furniture ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { font-size: .9rem; }
.range-tabs { display: inline-flex; background: #fff; border-radius: 999px; padding: 4px; box-shadow: var(--shadow); }
.range-tabs a { padding: 6px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.range-tabs a.on { background: #111827; color: #fff; }
.row-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; align-items: center; }
.filters select { margin: 0; width: auto; border-radius: 999px; padding: 8px 14px; font-size: .86rem; }

.card { background: var(--card); border: 1px solid #e7ebf2; border-radius: var(--r); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
/* Side column scales with the viewport rather than stepping at breakpoints —
   the same reason --gutter is a clamp. minmax(0,1fr) on the main column stops
   a wide table forcing the grid wider than the screen. */
.cols {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 21vw, 400px);
  gap: clamp(14px, 1.4vw, 24px); align-items: start;
}
.cols-even { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.col-main, .col-side { min-width: 0; }
.stack { display: flex; flex-direction: column; }

/* Snapshot: six figures in a bare grid, no card chrome per figure */
.snap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.snap-grid > div { display: flex; flex-direction: column; gap: 2px; }
.snap-grid small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.snap-grid b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }

/* Token / link copy row */
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-input {
  flex: 1; min-width: 0; padding: 10px 12px; border: 1.5px solid var(--line-2);
  border-radius: 10px; background: #f8fafc; color: var(--ink);
}

/* Inline create form (postback pixels) */
.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-row label { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 180px; }
.form-row label > span { font-size: .75rem; color: var(--muted); font-weight: 600; }
.form-row input, .form-row select {
  padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: 10px;
  background: #fff; color: var(--ink); font: inherit;
}
.small-mono { font-size: .78rem; word-break: break-all; }

/* Offer creative */
.creative-box {
  border: 1px dashed var(--line-2); border-radius: var(--r-sm);
  background: #f8fafc; overflow: hidden;
}
.creative-img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: contain; }
.creative-empty { display: grid; place-items: center; aspect-ratio: 16 / 10; font-size: .85rem; }

/* Legal / company pages. Deliberately NOT full-bleed: this is body copy, and
   at 15px a 780px column is already ~95 characters per line. Stretching it to
   a 2560px monitor would put ~300 characters on a line, which is the one
   place where filling the screen actively makes the page worse. Everything
   else on the site went full width; these stay a readable column. */
.legal { max-width: 820px; margin: 0 auto; padding: 56px var(--gutter) 80px; }
.legal h1 { font-size: 2rem; margin: 0 0 6px; }
.legal h2 { font-size: 1.05rem; margin: 34px 0 10px; }
.legal p { line-height: 1.68; color: #363c47; margin: 0 0 14px; }
.legal ul { margin: 0 0 16px; padding-left: 20px; }
.legal li { line-height: 1.68; color: #363c47; margin-bottom: 7px; }
.legal a { color: var(--blue); }
.legal .table { margin: 8px 0 20px; }
.legal-meta { color: var(--muted); font-size: .85rem; margin-bottom: 26px !important; }
.legal-notice {
  background: #fffaf0; border: 1px solid #f2ddb0; border-radius: 12px;
  padding: 14px 16px; margin-bottom: 28px;
}
.legal-notice p { margin: 6px 0 0; font-size: .9rem; }
.legal code {
  background: #eef1f7; padding: 1px 5px; border-radius: 5px;
  font-family: ui-monospace, Consolas, monospace; font-size: .85em;
}
@media (max-width: 700px) { .legal { padding: 36px var(--gutter) 60px; } }

/* KPI cards */
/* auto-fit tracks also need an explicit 0 minimum on the CONTENT side — the
   minmax() here bounds the track, not the item, so a long figure inside a
   kpi-card can still force it wider. .kpi-card gets min-width: 0 below. */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-row-5 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.kpi-row-6 { grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
.kpi-card {
  display: flex; align-items: center; gap: 13px; background: #fff; border: 1px solid #e7ebf2;
  border-radius: var(--r); box-shadow: var(--shadow); padding: 15px 16px;
  /* Both halves of the same blowout: a flex ITEM defaults to min-width:auto,
     so a long figure like "$1,234.56" refuses to shrink and pushes the grid
     track wider than the screen. Fixing only the track leaves this. */
  min-width: 0;
}
.kpi-card > div { min-width: 0; }
.kpi-card b { overflow-wrap: anywhere; }
.kpi-card b { display: block; font-size: 1.22rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-card small { color: var(--muted); font-size: .76rem; font-weight: 500; }
.kpi-dark { background: #111827; }
.kpi-dark b { color: #fff; }
.kpi-dark small { color: #9aa3b2; }
.chip {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex: none;
}
.chip svg { width: 20px; height: 20px; }
.chip-sm { width: 38px; height: 38px; }
.chip-sm svg { width: 17px; height: 17px; }
.chip-blue { background: var(--blue-bg); color: var(--blue); }
.chip-green { background: var(--green-bg); color: #16a34a; }
.chip-red { background: var(--red-bg); color: var(--red); }
.chip-amber { background: var(--amber-bg); color: #d97706; }

/* deltas — always paired with the period they compare to */
.delta { display: block; font-size: .7rem; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.delta-up { color: #16a34a; }
.delta-down { color: #dc2626; }
.delta-flat { color: var(--muted); }
.kpi-dark .delta-up { color: #4ade80; }
.kpi-dark .delta-down { color: #f87171; }
.compare-note { margin: -10px 0 18px 2px; }
.compare-note b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* charts */
.chart-line, .chart-bars { width: 100%; height: auto; display: block; }
.spark { width: 64px; height: 18px; display: inline-block; vertical-align: middle; }
.mini-spark { flex: none; margin: 0 10px; display: inline-flex; }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.table th { text-align: left; color: var(--muted); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 9px 10px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfe; }
.total-row td { border-top: 2px solid var(--line-2); font-weight: 700; background: #fafbfe; }
.actions { display: flex; gap: 6px; }
.actions form { display: inline; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user .avatar { width: 32px; height: 32px; font-size: .8rem; }

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-green { background: var(--green-bg); color: #15803d; }
.pill-amber { background: var(--amber-bg); color: #b45309; }
.pill-red { background: var(--red-bg); color: #b91c1c; }
.pill-blue { background: var(--blue-bg); color: #1d4ed8; }
.pill-plain { background: #f3f5f9; color: #4b5563; font-weight: 500; }
.pill-plain i { display: none; }

/* tabs (activity) */
.activity-head { gap: 16px; }
.tabs { display: flex; gap: 4px; margin-right: auto; }
.tab { background: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: .86rem; color: var(--muted); padding: 6px 12px; border-bottom: 2px solid transparent; }
.tab.on { color: var(--ink); border-bottom-color: #111827; }
.tab-pane { display: none; overflow-x: auto; }
.tab-pane.on { display: block; }

/* balance card */
.balance-card { display: flex; flex-direction: column; gap: 8px; }
.balance-card .chip-sm { margin-top: 2px; }
.balance-num { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; }
.legend { display: flex; gap: 16px; margin: 6px 0 8px; font-size: .78rem; color: var(--muted); }
.legend i { display: inline-block; width: 22px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.lg-blue { background: var(--blue); }
.lg-amber { background: var(--amber); }

/* tier + progress */
.progress { height: 9px; background: #f1f3f8; border-radius: 999px; overflow: hidden; margin: 6px 0 8px; }
.progress span { display: block; height: 100%; background: #111827; border-radius: 999px; }

/* misc cards */
.top-offers-card .mini-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .87rem; }
.top-offers-card .mini-row:last-child { border-bottom: 0; }
.mini-name { color: #4b5563; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 12px; }
.manager-card { text-align: center; }
.manager-card .avatar { margin: 0 auto 6px; }
.mgr-links { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; font-size: .82rem; color: var(--muted); }
.meta-rows div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .86rem; }
.meta-rows div:last-child { border-bottom: 0; }
.meta-rows span { color: var(--muted); flex: none; }
.meta-rows b { text-align: right; font-weight: 600; }
.meta-rows + .btn-dark, .card .btn-dark.btn-sm { margin-top: 12px; }

/* notifications page */
.notif-list { padding: 8px; }
.notif-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-sm); }
.notif-row:hover { background: #f6f8fb; }
.notif-row.unread { background: #f6f9ff; }
.notif-row + .notif-row { margin-top: 2px; }
.notif-body { flex: 1; min-width: 0; }
.notif-body b { display: block; font-size: .92rem; }
.notif-body small { display: block; margin-top: 1px; }

/* campaigns */
.campaign-list { display: flex; flex-direction: column; gap: 16px; }
.campaign-card { display: grid; grid-template-columns: 86px 1fr 230px; gap: 20px; margin-bottom: 0; }
.campaign-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.campaign-title b { font-size: 1.02rem; }
.campaign-info p { font-size: .88rem; margin: 3px 0 6px; }
.campaign-info small { display: block; margin-top: 2px; }
.cr-bar { height: 6px; background: #f1f3f8; border-radius: 999px; margin: 6px 0 6px; max-width: 220px; }
.cr-bar span { display: block; height: 100%; border-radius: 999px; background: var(--amber); }
.campaign-side { display: flex; flex-direction: column; gap: 7px; border-left: 1px solid var(--line); padding-left: 20px; }
.pay-line { display: flex; justify-content: space-between; font-size: .84rem; color: var(--muted); }
.pay-line b { color: var(--ink); }
.campaign-side .btn-dark, .campaign-side .btn-ghost { margin-top: 4px; }
.offer-emoji { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; font-size: 1.4rem; }
.offer-emoji.lg { width: 86px; height: 86px; font-size: 2.4rem; border-radius: 20px; }
.offer-emoji.sm { width: 30px; height: 30px; font-size: 1rem; border-radius: 9px; vertical-align: middle; }

/* links page */
.link-box { display: flex; gap: 10px; align-items: center; background: #111827; border-radius: var(--r-sm); padding: 14px 16px; }
.link-box code { background: none; color: #86efac; font-size: .92rem; flex: 1; }
.protip { background: #fdf4e3; border-radius: var(--r-sm); padding: 13px 16px; margin-top: 15px; font-size: .86rem; }
.protip a { color: var(--blue); font-weight: 600; }
.link-try { margin-top: 15px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 50px 20px; }

/* report tabs */
.report-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.rtab { padding: 7px 15px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); font-size: .82rem; font-weight: 600; color: var(--muted); }
.rtab.on { background: #111827; color: #fff; }

/* ---------- auth ---------- */
.auth-body { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 24px; background: var(--bg); }
.auth-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 34px; width: 100%; max-width: 440px; }
.auth-card h1 { margin: 18px 0 4px; }
.auth-card > .muted { margin-bottom: 18px; }
.auth-card a { color: var(--blue); font-weight: 600; }
.auth-card a.brand, .auth-card a.btn-dark { color: inherit; }
.auth-card .btn-dark { color: #fff; }

/* checkout */
.checkout-card { max-width: 480px; }
.secure { font-size: .72rem; color: #16a34a; font-weight: 700; margin-left: 6px; }
.order-box { display: flex; align-items: center; gap: 14px; background: #f6f8fb; border-radius: var(--r-sm); padding: 14px; margin: 18px 0 12px; }
.order-amt { margin-left: auto; font-weight: 800; font-size: 1.2rem; }

/* ---------- landing ---------- */
.site-body { background: #fff; }
.site-header { display: flex; align-items: center; gap: 34px; padding: 16px 6vw; position: sticky; top: 0; background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); z-index: 30; box-shadow: 0 1px 0 var(--line); }
.site-nav { display: flex; gap: 24px; margin-right: auto; }
.site-nav a { color: var(--muted); font-weight: 500; font-size: .92rem; }
.site-nav a:hover { color: var(--ink); }
.site-cta { display: flex; gap: 10px; }
/* The header markup has always shipped a <details class="nav-toggle">, but it
   had no styles at all — so on a phone the six nav links laid out inline and
   pushed the marketing site ~460px wider than the screen. Hidden above the
   breakpoint; below it, it is the only nav affordance. A disclosure rather
   than a scripted drawer because script-src is 'self' with no inline
   handlers: the open state IS the menu state, and it works with JS off. */
.nav-toggle { display: none; }
.nav-toggle > summary {
  list-style: none; cursor: pointer; width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.nav-toggle > summary::-webkit-details-marker { display: none; }
/* Three bars out of one <span>: the element is the middle bar, its two
   pseudo-elements are the outer two, positioned absolutely so they add no
   height and the icon stays optically centred. */
.nav-toggle > summary > span { position: relative; display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
.nav-toggle > summary > span::before,
.nav-toggle > summary > span::after {
  content: ''; position: absolute; left: 0; width: 18px; height: 2px;
  background: var(--ink); border-radius: 2px;
}
.nav-toggle > summary > span::before { top: -6px; }
.nav-toggle > summary > span::after { top: 6px; }
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px; align-items: center; padding: 70px 6vw 56px; }
.pill-tag { display: inline-block; background: #f3f5f9; font-weight: 600; font-size: .8rem; border-radius: 999px; padding: 6px 14px; margin-bottom: 18px; }
.hero h1 { font-size: 2.9rem; line-height: 1.1; letter-spacing: -.03em; }
.underlined { box-shadow: inset 0 -0.35em 0 var(--green-bg); }
.hero p { color: var(--muted); font-size: 1.04rem; margin: 18px 0 24px; max-width: 520px; }
.hero-actions { display: flex; gap: 12px; margin-bottom: 32px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; }
.hero-stats b { font-size: 1.35rem; display: block; letter-spacing: -.02em; }
.hero-stats span { color: var(--muted); font-size: .84rem; }
.hero-card { background: #111827; border-radius: 22px; padding: 26px; color: #e5e7eb; box-shadow: 0 30px 70px rgba(17, 24, 39, .35); }
.mock-kpi small { color: #6b7280; font-size: .66rem; letter-spacing: .1em; font-weight: 700; }
.mock-kpi b { display: block; font-size: 2.1rem; color: #fff; letter-spacing: -.02em; }
.mock-kpi .up { color: #4ade80; font-size: .82rem; }
.mock-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #1f2937; font-size: .9rem; }
.mock-row b { color: #fff; }
.mock-paid { margin-top: 14px; background: rgba(34, 197, 94, .12); color: #86efac; border-radius: 12px; padding: 10px 13px; font-size: .8rem; }
.strip { display: flex; flex-wrap: wrap; gap: 12px 36px; justify-content: center; padding: 18px 6vw; background: #111827; color: #e5e7eb; font-weight: 600; font-size: .88rem; }
.how, .offers { padding: 70px 6vw; text-align: center; }
.section-sub { color: var(--muted); margin: 10px auto 34px; max-width: 560px; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; text-align: left; }
.how-card { background: #f6f8fb; border-radius: 18px; padding: 24px; }
.how-card span { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #111827; color: #fff; font-weight: 800; margin-bottom: 12px; }
.how-card h3 { margin-bottom: 6px; }
.how-card p { color: var(--muted); font-size: .88rem; }
.offers { background: var(--bg); }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 28px; }
.offer-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 22px; text-align: left; }
.offer-card small { display: block; color: var(--muted); margin: 3px 0 12px; }
.offer-pay { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed var(--line-2); padding-top: 10px; font-size: .84rem; color: var(--muted); }
.offer-pay b { color: #16a34a; font-size: 1.05rem; }
.offer-card .offer-emoji { margin-bottom: 10px; }
.vendors-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; padding: 70px 6vw; }
.vendors-cta p { color: var(--muted); margin: 12px 0 22px; }
.code-block { background: #111827; color: #86efac; border-radius: 18px; padding: 26px; font-size: .84rem; overflow-x: auto; line-height: 1.7; }
.site-footer { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding: 46px 6vw; background: #111827; color: #9ca3af; }
.site-footer b { color: #e5e7eb; display: block; margin-bottom: 10px; }
.site-footer a { display: block; color: #9ca3af; margin-bottom: 6px; font-size: .9rem; }
.site-footer p { font-size: .86rem; margin-top: 10px; }

/* ---------- vendor demo ---------- */
.vendor-body { background: #fff; }
.vendor-top { display: flex; justify-content: space-between; gap: 10px; padding: 10px 5vw; background: #fdf4e3; color: #92400e; font-size: .78rem; flex-wrap: wrap; }
.vendor-page { max-width: 980px; margin: 0 auto; padding: 50px 5vw 80px; text-align: center; }
.vendor-emoji { display: inline-grid; place-items: center; width: 110px; height: 110px; border-radius: 30px; font-size: 3.4rem; margin-bottom: 18px; }
.vendor-hero h1 { font-size: 2.2rem; }
.vendor-blurb { color: var(--muted); font-size: 1.08rem; margin: 12px auto 14px; max-width: 520px; }
.vendor-badges { display: flex; gap: 18px; justify-content: center; color: #16a34a; font-weight: 600; font-size: .86rem; margin-bottom: 40px; flex-wrap: wrap; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 40px; }
.pack-card { border: 1.5px solid var(--line-2); border-radius: 20px; padding: 28px 20px; position: relative; background: #fff; }
.pack-best { border-color: #111827; box-shadow: 0 14px 38px rgba(17, 24, 39, .12); }
.pack-flag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; font-size: .64rem; font-weight: 800; letter-spacing: .08em; padding: 4px 13px; border-radius: 999px; }
.pack-price b { font-size: 1.9rem; letter-spacing: -.02em; display: block; margin: 10px 0 2px; min-height: 1.2em; }
.pack-save { color: #16a34a; font-weight: 700; display: block; min-height: 1.2em; }
.pack-card .btn-dark { margin-top: 14px; }
.vendor-legal { color: #9ca3af; font-size: .78rem; max-width: 620px; margin: 0 auto; min-height: 2em; }

/* Charts scale with the container. Aspect ratio is preserved — stretching an
   SVG distorts its type, which is why preserveAspectRatio is left alone. */
.chart-area { width: 100%; height: auto; display: block; }

/* ---------- responsive ---------- */
@media (max-width: 1120px) {
  .cols { grid-template-columns: 1fr; }
  .cols-even { grid-template-columns: 1fr; }
  .cols-3 { grid-template-columns: 1fr; }
}
/* Public marketing header collapses to brand + CTA + hamburger, with the
   links dropping onto their own row underneath. flex-basis:100% on the nav is
   what makes it wrap below the brand row rather than compete for width in it. */
@media (max-width: 900px) {
  .site-header { gap: 10px; padding: 12px var(--gutter); flex-wrap: wrap; }
  .nav-toggle { display: block; order: 3; }
  .site-cta { order: 2; margin-left: auto; gap: 8px; }
  .site-cta .btn-ghost, .site-cta .btn-dark { padding: 9px 14px; font-size: .88rem; }
  .site-nav {
    order: 4; flex-basis: 100%; margin-right: 0;
    display: none; flex-direction: column; gap: 0;
    padding-top: 6px; border-top: 1px solid var(--line);
  }
  .nav-toggle[open] ~ .site-nav { display: flex; }
  .site-nav a { padding: 12px 2px; font-size: 1rem; }
}
@media (max-width: 1000px) {
  .hero, .vendors-cta { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .campaign-card { grid-template-columns: 60px 1fr; }
  .campaign-side { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
}
/* Tablet / phone: the nav rail stops being a rail and becomes a disclosure
   above the content. It used to drop in as a 14-item grid, which meant every
   page on a phone opened with roughly a screen and a half of navigation
   before the first number. */
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .side-promo { display: none; }
  .side-toggle { display: flex; }
  body.side-closed .side { display: none; }
  .topbar-nav { display: none; }
  /* Dropdowns become full-width sheets from tablet down. Anchoring a 360px
     panel to `right: 0` of a button is fine on desktop; on a narrow screen it
     hangs off an edge. Pinning both edges makes overflow impossible rather
     than merely unlikely. */
  .dd-panel, .dd-panel-sm {
    position: fixed; left: 8px; right: 8px; top: 64px; width: auto; max-width: none;
  }
  .card { padding: 16px; }
  .activity-head .search-box { width: 100%; }
  .search-box input { width: 100%; flex: 1; }
}
@media (max-width: 560px) {
  html { font-size: 14px; }
  .hero h1 { font-size: 2.1rem; }
  .user-name, .caret, .lang { display: none; }
  /* Every KPI grid variant, not just two of them — the 4/5/6-column rows were
     previously left at auto-fit and collapsed to one cramped column. */
  /* minmax(0, 1fr), never plain 1fr. A `1fr` track has a min-content floor,
     so a card whose content is wider than half the screen pushes the track
     out and the whole page scrolls sideways — 4px on a 360px phone, which is
     enough to feel broken. The 0 minimum lets the card shrink instead. */
  .kpi-row, .kpi-row-3, .kpi-row-4, .kpi-row-5, .kpi-row-6 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .dd-panel { position: fixed; left: 8px; right: 8px; top: 64px; width: auto; }
  .snap-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .form-row { flex-direction: column; align-items: stretch; }
  .form-row label { min-width: 0; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .range-tabs, .report-tabs, .tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .range-tabs a, .rtab, .tab { white-space: nowrap; }
  /* Wide tables scroll inside their own card rather than the page body. */
  .card { padding: 14px; }
  .table { min-width: 560px; }
  /* ...but a legal page has no card to scroll inside, so that 560px floor
     pushed the PAGE sideways instead — on /terms and /contact, the two pages
     a processor reviews first. These tables are short label/value pairs and
     read fine at phone width, so drop the floor and let the headers wrap. */
  .legal .table { min-width: 0; }
  .legal .table th, .legal .table td { padding: 8px 6px; white-space: normal; }
  .copy-row { flex-direction: column; align-items: stretch; }
}
/* Small phones (360-380px logical). Everything above still applies; this
   only buys back horizontal room that a 4.7" screen doesn't have. */
@media (max-width: 400px) {
  .kpi-row, .kpi-row-3, .kpi-row-4, .kpi-row-5, .kpi-row-6, .snap-grid { grid-template-columns: 1fr; }
  .balance-num { font-size: 1.6rem; }
  .page-head h1, h1 { font-size: 1.3rem; }
  .link-box { flex-direction: column; align-items: stretch; }
  .link-box code { font-size: .8rem; }
}

/* Tables never make the page scroll sideways — the card scrolls instead. */
.card { overflow-x: auto; }
@media (hover: none) {
  /* Touch targets: 44px is the smallest reliably tappable size.
     .btn-sm is NOT exempted. It used to sit at 38px to keep table rows
     compact, but the two places it actually lands are the stacked full-width
     CTAs on /app/campaigns and the Approve/Void/Refund trio in the admin
     tables — adjacent targets, one of them destructive. Six pixels of row
     height is a cheaper price than a mis-tapped Void. */
  .side-item, .btn-dark, .btn-ghost, .btn-danger, .btn-sm,
  .tab, .range-tabs a, .rtab { min-height: 44px; }
  /* Icon-only controls in the topbar are square, so height alone isn't the
     target — pin both axes. */
  .icon-btn, .user-pill { min-height: 44px; min-width: 44px; }
}

/* ================= cross-browser compatibility =================
   Appended last so these win over anything above at equal specificity.
   Chrome, Edge, Opera and Brave all run Chromium and behave alike; almost
   everything here is for Safari/iOS, which is the real divergence.

   Keep this as the ONE such block. It was briefly two, which is how
   :focus-visible ended up declared blue in one and black in the other —
   whichever came last silently won and the other was dead weight. */

/* Older Safari (and iOS < 13) only honour the prefixed value. Declared first
   so a browser that understands the unprefixed one overwrites it. */
.topbar { position: -webkit-sticky; position: sticky; }
.side   { position: -webkit-sticky; position: sticky; }

/* Momentum scrolling for the horizontally-scrolling cards on iOS. Without it
   a table drags stiffly and stops dead instead of gliding. */
.card, .tab-pane, .table-wrap { -webkit-overflow-scrolling: touch; }

/* Checkbox/radio tint — Chromium and Firefox honour this, Safari 15.4+ too.
   Without it every browser paints its own default blue. */
input[type="checkbox"], input[type="radio"] { accent-color: #111827; width: auto; margin-top: 0; }

/* THE iOS ONE THAT ACTUALLY BITES.
   Mobile Safari zooms the whole page whenever a focused field has a computed
   font-size below 16px — the layout jumps and the user has to pinch back out.
   Our base is 15px (14px under 560px), so every input triggered it. 16px is
   the threshold, not a preference. `pointer: coarse` targets touch devices
   rather than a narrow desktop window, so resizing a desktop browser doesn't
   inflate the form. */
/* Fields use `font: inherit`, and their nearest styled ancestor is
   `label { font-size: .86rem }` — so every input was rendering at 12.9px,
   which is uncomfortable to read in any browser. Pin them to the body size
   instead of whatever they happen to inherit. */
input, select, textarea { font-size: 1rem; }

@media (pointer: coarse), (max-width: 860px) {
  /* !important is deliberate. Class-scoped rules like `.search-box input`
     (0,1,1) outrank a bare `input` (0,0,1), and this is not a style
     preference that should lose a specificity argument — below 16px iOS
     zooms the viewport and the layout jumps. It is a platform constraint. */
  input, select, textarea,
  .search-box input, .form-row input, .form-row select, .copy-input {
    font-size: 16px !important;
  }
}

/* Safari applies the elastic overscroll to the page even when the intent was
   to scroll a card sideways; this keeps the gesture inside the scroller. */
.card, .tab-pane { overscroll-behavior-x: contain; }

/* Respect the OS "reduce motion" setting — Safari and iOS surface it
   prominently, and our transitions are decorative. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

/* Firefox draws a dotted inner outline on focused buttons; and every browser
   needs a visible focus ring for keyboard users. :focus-visible keeps it off
   mouse clicks. */
:focus-visible { outline: 2px solid #111827; outline-offset: 2px; }
button::-moz-focus-inner { border: 0; }

/* Safari and Chrome paint number inputs with spin buttons that sit on top of
   our right padding; Firefox needs the -moz- spelling to drop them at all.
   Every number field here (payout threshold, price, rate) is typed, not
   nudged, so the steppers are only ever in the way. */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Safari ignores box-shadow on <option> and renders selects natively; give the
   custom-appearance select a caret back so it does not look like a text input. */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a94a6' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
