/* ==========================================================================
   Amblify design system
   Tokens first; every component below reuses them (no ad-hoc magic numbers).
   ========================================================================== */
:root {
  /* Palette: warm pastel base, ink text, logo orange as the accent. */
  --ink: #1b1726;
  --ink-2: #4a4458;
  --ink-3: #625b72;          /* muted text: >=5:1 on every pastel tint, not just --bg */
  --bg: #fff8f4;
  --surface: #ffffff;
  --surface-2: #fff1ea;
  --line: #efe3dd;

  --primary: #f27a1a;       /* logo orange (decorative, large text only) */
  --primary-ink: #9a4306;   /* orange for small text: AA on --bg and on --primary-soft/--pink-soft chips */
  --primary-soft: #ffe3c9;

  --pink: #ffb8cc;   --pink-soft: #ffe1ea;   --pink-ink: #8f1d42;
  --lav:  #d9ccff;   --lav-soft:  #efe9ff;   --lav-ink:  #5a3fc4;
  --mint: #b9ebdd;   --mint-soft: #e3f8f1;   --mint-ink: #0f6e54;
  --butter: #ffe08a; --butter-soft: #fff4cc; --butter-ink: #7a5a00;

  --focus: #6a4cf0;         /* focus ring: >=5:1 on --bg/--surface (WCAG 1.4.11 needs 3:1) */

  /* Type: one scale */
  --font-display: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: clamp(2rem, 3.4vw, 2.5rem);
  --fs-4xl: clamp(2.5rem, 5.2vw, 3.75rem);
  --lh-tight: 1.1;
  --lh-snug: 1.25;
  --lh-body: 1.6;

  /* Spacing: 4/8px rhythm */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;

  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-xl: 32px; --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(27, 23, 38, 0.06), 0 2px 8px rgba(27, 23, 38, 0.05);
  --shadow-md: 0 8px 24px rgba(27, 23, 38, 0.10);
  --shadow-lg: 0 24px 60px rgba(90, 63, 196, 0.16);

  --container: 1160px;
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---- Base ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--ink);
  /* Subtle generated pastel texture over the flat token colour (fallback = --bg). */
  background: var(--bg) url("../img/bg-texture.jpg") center top / cover no-repeat fixed;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 720px) {
  /* background-attachment: fixed is poorly supported on mobile; scroll instead. */
  body { background-attachment: scroll; background-size: auto 100vh; background-repeat: repeat-y; }
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-4);
  text-wrap: balance;
}
h1 { font-size: var(--fs-4xl); line-height: var(--lh-tight); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); }
p { margin: 0 0 var(--s-4); }
a { color: var(--primary-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
/* <picture> is only a WebP/PNG switch — it must not become a layout box of its own. */
picture { display: contents; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--r-sm); }
/* Every interactive element gets the same clear ring on keyboard focus; component
   :focus styles below add borders/halos but must never remove this outline. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [role="button"]:focus-visible,
[role="tab"]:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: var(--s-3) var(--s-4); border-radius: var(--r-md);
}
.skip-link:focus { top: var(--s-4); }

.container { width: min(100% - var(--s-10), var(--container)); margin-inline: auto; }
@media (max-width: 640px) { .container { width: min(100% - var(--s-8), var(--container)); } }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: var(--s-3) var(--s-6);
  border-radius: var(--r-pill); border: 1.5px solid transparent;
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-md);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #2a2438; color: #fff; box-shadow: var(--shadow-md); }
.btn-accent { background: linear-gradient(120deg, var(--primary), #ff8fb0); color: var(--ink); }
.btn-accent:hover { color: var(--ink); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink); }
.btn-soft { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-soft:hover { border-color: var(--ink); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.forgot-form { border-top: 1px solid var(--line); margin-top: var(--s-4); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-lg { min-height: 56px; padding-inline: var(--s-8); font-size: var(--fs-lg); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: wait; transform: none; }

/* ---- Header / nav ------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: var(--s-6); }
.nav-links { display: flex; align-items: center; gap: var(--s-6); list-style: none; }
.nav-links a { color: var(--ink-2); font-weight: 500; text-decoration: none; padding: var(--s-2) 0; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: var(--ink); border-bottom-color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: var(--s-3); }
.nav-actions .btn { min-height: 42px; padding-inline: var(--s-5); }
.nav-link { color: var(--ink); font-weight: 600; text-decoration: none; padding: var(--s-2) var(--s-3); }
.nav-toggle {
  display: none; margin-left: auto;
  width: 48px; height: 48px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); cursor: pointer; place-items: center;
}
.nav-toggle .bars { position: relative; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: background 120ms; }
.nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 200ms var(--ease), top 200ms var(--ease);
}
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: grid; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    padding: var(--s-2) 0 var(--s-4);
  }
  .nav.is-open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a, .nav-actions .nav-link {
    display: block; width: 100%; padding: var(--s-4) var(--s-6);
    font-size: var(--fs-lg); border-bottom: 1px solid var(--line);
  }
  .nav-links a:hover { background: var(--surface-2); border-bottom-color: var(--line); }
  .nav-actions { flex-direction: column; align-items: stretch; gap: var(--s-3); padding: var(--s-4) var(--s-6) 0; }
  .nav-actions .btn { min-height: 52px; }
}

/* ---- Layout helpers ---------------------------------------------------- */
.section { padding-block: var(--s-20); }
.section-tight { padding-block: var(--s-12); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: var(--s-10); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block; margin-bottom: var(--s-3);
  font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary-ink);
}
.lede { font-size: var(--fs-lg); color: var(--ink-2); }
.grid { display: grid; gap: var(--s-6); }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 880px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Section illustrations (guud-gen-image, clay-pastel style matching the hero) */
.section-art { margin: var(--s-8) 0 0; }
.section-art img { width: 100%; border-radius: var(--r-lg); box-shadow: var(--shadow-md); aspect-ratio: 3 / 2; object-fit: cover; }
.section-split { align-items: center; margin-bottom: var(--s-10); }
.section-split .section-head { margin-bottom: 0; }
.section-split .section-art { margin-top: 0; }
@media (max-width: 600px) { .section-split .section-art { order: 2; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-6); box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: var(--s-2); }
.card p:last-child { margin-bottom: 0; }
@media (max-width: 640px) { .card { padding: var(--s-5); } }
.tint-pink { background: var(--pink-soft); border-color: transparent; }
.tint-lav { background: var(--lav-soft); border-color: transparent; }
.tint-mint { background: var(--mint-soft); border-color: transparent; }
.tint-butter { background: var(--butter-soft); border-color: transparent; }
.tint-peach { background: var(--primary-soft); border-color: transparent; }

.icon {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: var(--r-md);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md);
  margin-bottom: var(--s-4);
}
.icon svg { width: 20px; height: 20px; }
.icon-pink { background: var(--pink-soft); color: var(--pink-ink); }
.icon-lav { background: var(--lav-soft); color: var(--lav-ink); }
.icon-mint { background: var(--mint-soft); color: var(--mint-ink); }
.icon-butter { background: var(--butter-soft); color: var(--butter-ink); }
.icon-peach { background: var(--primary-soft); color: var(--primary-ink); }

.pill {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-1) var(--s-3); border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 600; background: var(--mint-soft); color: var(--mint-ink);
}

/* ---- Hero -------------------------------------------------------------- */
.hero { padding-block: var(--s-16) var(--s-20); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s-12); align-items: center; }
.hero h1 { margin-top: var(--s-4); }
.hero .lede { max-width: 540px; }
.benefits { list-style: none; display: grid; gap: var(--s-3); margin: var(--s-6) 0 var(--s-8); }
.benefits li { display: flex; gap: var(--s-3); align-items: flex-start; color: var(--ink-2); }
.benefits .icon { width: 32px; height: 32px; margin: 0; border-radius: var(--r-pill); font-size: var(--fs-sm); }
.benefits .icon svg { width: 16px; height: 16px; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.cta-note { margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--ink-3); }
.hero-media { position: relative; }
.hero-media img { border-radius: var(--r-xl); box-shadow: var(--shadow-lg); aspect-ratio: 3 / 2; object-fit: cover; }
.hero-media::before {
  content: ""; position: absolute; inset: 10% -6% -8% 8%; z-index: -1;
  background: radial-gradient(closest-side, var(--lav) 0%, transparent 70%);
  filter: blur(20px); opacity: 0.8;
}
@media (max-width: 880px) {
  .hero { padding-block: var(--s-10) var(--s-16); }
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-8); }
  .hero-media { order: 2; }
}

/* ---- Brand strip ------------------------------------------------------- */
.brand-strip { padding-block: var(--s-8); border-block: 1px solid var(--line); background: var(--surface); }
.brand-strip .label { font-size: var(--fs-sm); color: var(--ink-3); text-align: center; margin-bottom: var(--s-4); }
.brand-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); list-style: none; }
.brand-logos li a, .brand-logos li span {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-4); border-radius: var(--r-pill);
  background: var(--bg); border: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 600; color: var(--ink); text-decoration: none;
}
.brand-logos li a:hover { border-color: var(--primary); }
.brand-logos .dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--pink)); }

/* ---- Problem / lists --------------------------------------------------- */
.pain-list { list-style: none; display: grid; gap: var(--s-3); align-content: start; }
.pain-list li { display: flex; gap: var(--s-3); align-items: flex-start; }
.pain-list .icon { width: 32px; height: 32px; margin: 0; border-radius: var(--r-pill); font-size: var(--fs-sm); }
.pain-list .icon svg { width: 16px; height: 16px; }

/* ---- Points table ------------------------------------------------------ */
.points-table { width: 100%; border-collapse: collapse; }
.points-table th, .points-table td { text-align: left; padding: var(--s-3) var(--s-2); border-bottom: 1px solid var(--line); vertical-align: top; }
.points-table th { font-family: var(--font-display); font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.points-table td.pts { font-family: var(--font-display); font-weight: 700; white-space: nowrap; color: var(--lav-ink); }
.points-table tr:last-child td { border-bottom: 0; }

/* ---- Steps ------------------------------------------------------------- */
.steps { list-style: none; counter-reset: step; display: grid; gap: var(--s-6); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps li { counter-increment: step; position: relative; }
.steps li .num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-pill);
  background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 700; margin-bottom: var(--s-4);
}
@media (max-width: 880px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }

/* ---- Stats ------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.stat { padding: var(--s-6); border-radius: var(--r-lg); text-align: center; }
.stat .value { display: block; font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 700; line-height: var(--lh-tight); }
.stat .label { display: block; margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--ink-2); }
.stat .stat-note { display: block; margin-top: var(--s-1); font-size: var(--fs-xs, 0.75rem); line-height: var(--lh-tight); color: var(--ink-2); }
@media (max-width: 880px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Live counters (GET /api/stats): compact variant above the brand signup card */
.stats-compact { gap: var(--s-3); }
.stats-compact .stat { padding: var(--s-4); }
.stats-compact .stat .value { font-size: var(--fs-xl); }
.auth-main-stacked { flex-direction: column; gap: var(--s-6); }
.auth-main-stacked .stats-compact { width: min(100%, 640px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.auth-wrap.is-signed-in .stats-compact { display: none; }
.stat.is-live .value { font-variant-numeric: tabular-nums; }

/* ---- FAQ --------------------------------------------------------------- */
.faq { max-width: 760px; margin-inline: auto; display: grid; gap: var(--s-3); }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 var(--s-5); }
.faq summary {
  cursor: pointer; list-style: none; padding: var(--s-4) 0; padding-right: var(--s-8);
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg); position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--r-pill);
  background: var(--lav-soft); color: var(--lav-ink); font-weight: 700;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); padding-bottom: var(--s-4); }
.faq details p + .faq-calendar { margin-top: calc(-1 * var(--s-3)); }
.faq-calendar { color: var(--ink-2); padding: 0 0 var(--s-4) var(--s-5); display: grid; gap: var(--s-2); }
.faq-calendar strong { color: var(--ink); }

/* ---- Final CTA --------------------------------------------------------- */
.cta-panel {
  position: relative; overflow: hidden; text-align: center;
  padding: var(--s-16) var(--s-6); border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--primary-soft) 0%, var(--pink-soft) 45%, var(--lav-soft) 100%);
}
.cta-panel h2 { max-width: 640px; margin-inline: auto; }
.cta-panel .lede { max-width: 520px; margin-inline: auto; }
.cta-panel .cta-row { justify-content: center; margin-top: var(--s-6); }

/* ---- Footer ------------------------------------------------------------ */
.site-footer { padding-block: var(--s-12) var(--s-4); border-top: 1px solid var(--line); background: var(--surface); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-8); align-items: flex-start; }
.footer-grid .brand img { height: 26px; }
.footer-grid p { color: var(--ink-3); font-size: var(--fs-sm); max-width: 320px; margin-top: var(--s-3); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); list-style: none; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--ink); }
.footer-meta { margin-top: var(--s-10); border-top: 1px solid var(--line); padding-top: var(--s-4); font-size: var(--fs-sm); color: var(--ink-3); text-align: center; }
.guud-badge { text-align: center; padding: 10px 0; }

/* ---- Auth page --------------------------------------------------------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-aside {
  background: linear-gradient(160deg, var(--lav-soft), var(--pink-soft) 50%, var(--primary-soft));
  padding: var(--s-16) var(--s-12); display: flex; flex-direction: column; justify-content: center;
}
.auth-aside h2 { max-width: 420px; }
/* Signed in: the "claim your handle" sales pitch is noise, so drop it and let the account card take the width. */
.auth-wrap.is-signed-in { grid-template-columns: 1fr; }
.auth-wrap.is-signed-in .auth-aside { display: none; }
.auth-wrap.is-signed-in .auth-card { width: min(100%, 640px); }
.auth-aside .benefits { margin-bottom: 0; }
.auth-main { padding: var(--s-12) var(--s-6); display: flex; align-items: flex-start; justify-content: center; }
.auth-card { width: min(100%, 460px); }
.tabs { display: flex; padding: var(--s-1); background: var(--surface-2); border-radius: var(--r-pill); margin-bottom: var(--s-6); }
.tabs [role="tab"] {
  flex: 1; min-height: 44px; border: 0; border-radius: var(--r-pill); background: transparent;
  font-family: var(--font-display); font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.tabs [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.field { display: grid; gap: var(--s-2); margin-bottom: var(--s-4); }
.field label { font-weight: 600; font-size: var(--fs-sm); }
.field .hint { font-size: var(--fs-xs); color: var(--ink-3); }
.input,
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
.field select, .field textarea {
  width: 100%; min-height: 48px; padding: var(--s-3) var(--s-4);
  border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}
.field select, select.input {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: var(--s-8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23555' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right var(--s-4) center;
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 4px var(--lav-soft); }
.input[aria-invalid="true"], .field input[aria-invalid="true"] { border-color: var(--pink-ink); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.alert {
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md); font-size: var(--fs-sm); margin-bottom: var(--s-4);
  background: var(--butter-soft); color: var(--butter-ink);
}
.alert-error { background: var(--pink-soft); color: var(--pink-ink); }
.alert-ok { background: var(--mint-soft); color: var(--mint-ink); }
/* Admin support session (app.js bootImpersonation): shown above the site header. */
.imp-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: var(--s-2) var(--s-4); padding: var(--s-2) var(--s-4); font-size: var(--fs-sm);
  background: var(--pink-soft); color: var(--pink-ink); border-bottom: 1px solid currentColor;
}
.imp-banner .btn { padding: var(--s-1) var(--s-3); }
.alert:empty { display: none; }
.form-foot { text-align: center; font-size: var(--fs-sm); color: var(--ink-3); margin-top: var(--s-4); }
.welcome dl { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4) var(--s-5); margin: var(--s-2) 0; align-items: baseline; }
.welcome dt { color: var(--ink-3); font-size: var(--fs-sm); }
.welcome dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .welcome dl { grid-template-columns: 1fr; gap: var(--s-1); }
  .welcome dd + dt { margin-top: var(--s-4); }
}
[hidden] { display: none !important; }
@media (max-width: 880px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { padding: var(--s-10) var(--s-6); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---- Bounties (campaigns.html) ---------------------------------------- */
.campaign-toolbar { display: grid; gap: var(--s-3); margin-bottom: var(--s-6); }
.campaign-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s-3); align-items: end; }
.campaign-toolbar-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.campaign-filter { display: grid; gap: var(--s-2); font-weight: 600; font-size: var(--fs-sm); min-width: 0; }
.campaign-filter-q { grid-column: span 2; }
@media (max-width: 640px) { .campaign-filter-q { grid-column: auto; } }
.campaign-filter .input { min-height: 44px; }
.campaign-count { font-size: var(--fs-sm); color: var(--ink-3); }
/* Phase-10 P14b: paged results (brand ambassador search) */
.dash-loading { display: flex; align-items: center; gap: var(--s-2); color: var(--ink-3); font-size: var(--fs-sm); padding: var(--s-4) 0; }
.dash-spinner { width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: dash-spin .8s linear infinite; }
@keyframes dash-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dash-spinner { animation: none; } }
.dash-table-wrap[aria-busy="true"] { opacity: .5; pointer-events: none; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-2); margin-top: var(--s-3); }
.pager-pages { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.pager-pages .btn[aria-current="page"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pager-gap { color: var(--ink-3); padding: 0 var(--s-1); }
.pager-status { font-size: var(--fs-sm); color: var(--ink-3); }
.campaign-list { list-style: none; margin: 0; padding: 0; }
.campaign-card { display: flex; flex-direction: column; gap: var(--s-3); position: relative; }
.campaign-card.is-guud { border-color: var(--primary-soft); background: linear-gradient(180deg, #fff 0%, var(--surface-2) 100%); }
.campaign-card.is-featured { border-color: var(--butter-soft); }
.campaign-card .campaign-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-md); background: var(--surface-2); }
.campaign-card .campaign-brand { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; }
.campaign-card .campaign-brand img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.campaign-card .campaign-brand .dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--pink)); flex: none; }
.campaign-card h3 { margin: 0; font-size: var(--fs-lg); }
.campaign-card h3 a { color: inherit; text-decoration: none; }
.campaign-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.campaign-card h3 a:focus-visible { outline: none; }
.campaign-card:has(h3 a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.campaign-card .campaign-rates { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.campaign-card .campaign-rates li { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); padding: var(--s-1) var(--s-3); border-radius: var(--r-pill); background: var(--lav-soft); color: var(--lav-ink); }
.campaign-card .campaign-badges { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: auto; }
.badge { display: inline-flex; align-items: center; gap: var(--s-1); padding: var(--s-1) var(--s-3); border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; line-height: 1.4; }
.badge-followers { background: var(--butter-soft); color: var(--butter-ink); }
.badge-open { background: var(--mint-soft); color: var(--mint-ink); }
.badge-countries { background: var(--lav-soft); color: var(--lav-ink); }
.badge-guud { background: var(--primary-soft); color: var(--primary-ink); }
.badge-ads { background: var(--pink-soft); color: var(--pink-ink); }
.badge-guuds { background: var(--lav-soft); color: var(--lav-ink); }
.badge-blitz { background: linear-gradient(135deg, var(--primary-soft), var(--pink-soft)); color: var(--primary-ink); }
.badge-featured { background: linear-gradient(135deg, var(--butter-soft), var(--primary-soft)); color: var(--butter-ink); }
/* guuds / blitz listings: product image is a square-ish product shot, store name leads the brand line */
.campaign-card.is-product .campaign-product-img { aspect-ratio: 4 / 3; object-fit: contain; background: var(--surface); border: 1px solid var(--line); }
.campaign-card.is-blitz { border-color: var(--primary-soft); }
.campaign-store-by { font-weight: 500; color: var(--ink-3); }
.campaign-card .campaign-commission-hero { margin: 0; font-family: var(--font-display); font-size: var(--fs-sm); color: var(--ink-2); }
.campaign-card .campaign-commission-hero strong { font-size: var(--fs-2xl); font-weight: 700; color: var(--pink-ink); margin-right: var(--s-1); line-height: 1; }
.bounty-commission-hero { margin: 0 0 var(--s-3); font-family: var(--font-display); font-size: var(--fs-md); color: var(--ink-2); display: flex; flex-direction: column; gap: var(--s-1); }
.bounty-commission-hero strong { font-size: var(--fs-4xl, 2.5rem); font-weight: 700; color: var(--pink-ink); line-height: 1; }
.bounty-commission-hero small { font-size: var(--fs-xs); color: var(--ink-3); }
.campaign-skel { min-height: 220px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: campaign-shimmer 1.2s linear infinite; }
@keyframes campaign-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.campaign-empty { text-align: center; padding: var(--s-12) var(--s-4); border: 1px dashed var(--line); border-radius: var(--r-lg); }
.campaign-empty .cta-row { justify-content: center; margin-top: var(--s-4); }
@media (prefers-reduced-motion: reduce) { .campaign-skel { animation: none; } }

/* ---- Bounty detail (campaign.html) ------------------------------------ */
.bounty-back { margin-bottom: var(--s-4); font-size: var(--fs-sm); }
.bounty-back a { color: var(--ink-2); text-decoration: none; }
.bounty-back a:hover { color: var(--ink); text-decoration: underline; }
.bounty-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-8); align-items: start; }
.bounty-layout > *, .bounty-claim-card > * { min-width: 0; }
.bounty-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-lg); background: var(--surface-2); margin-bottom: var(--s-5); }
.bounty-brand { margin-bottom: var(--s-2); display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; }
.bounty-brand img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.bounty-brand .dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--pink)); flex: none; }
.bounty-brand a { color: inherit; }
.bounty-title { font-size: var(--fs-3xl); margin-bottom: var(--s-3); }
.bounty-block { margin-top: var(--s-8); }
.bounty-block .h3 { margin-bottom: var(--s-3); }
.bounty-prose p { margin: 0 0 var(--s-3); white-space: pre-line; }
.bounty-prose .muted, .bounty-inclusions .muted { color: var(--ink-3); }
.bounty-inclusions { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.bounty-inclusions li { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.bounty-inclusions li::before { content: "✓"; flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: var(--fs-xs); font-weight: 700; background: var(--mint-soft); color: var(--mint-ink); }
.bounty-rules ol { padding-left: 1.25em; color: var(--ink-2); display: grid; gap: var(--s-2); }
.bounty-side { position: sticky; top: var(--s-6); }
.bounty-claim-card { display: grid; gap: var(--s-4); }
.bounty-rates { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.bounty-rates li { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-md); padding: var(--s-2) var(--s-4); border-radius: var(--r-pill); background: var(--lav-soft); color: var(--lav-ink); }
.bounty-meta { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) var(--s-4); margin: 0; font-size: var(--fs-sm); }
.bounty-meta dt { color: var(--ink-3); }
.bounty-meta dd { margin: 0; font-weight: 600; }
.bounty-claim-card .alert { margin-bottom: 0; }
.bounty-claim-actions { display: grid; gap: var(--s-2); }
.bounty-claim-actions .btn { width: 100%; }
.bounty-claim-actions:empty { display: none; }
.bounty-link { display: grid; gap: var(--s-2); margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.bounty-link .btn { width: 100%; }
.bounty-link-result { display: grid; gap: var(--s-2); }
.bounty-link-row { display: flex; gap: var(--s-2); align-items: center; }
.bounty-link-row .btn { width: auto; flex: 0 0 auto; }
.bounty-link-url { flex: 1 1 auto; min-width: 0; font-size: var(--fs-sm); }
.bounty-link-share { width: 100%; font-size: var(--fs-sm); resize: vertical; }
.bounty-claim-card .form-foot { margin-top: 0; }
.bounty-claim-card .form-foot:empty { display: none; }
@media (max-width: 880px) {
  .bounty-layout { grid-template-columns: 1fr; }
  .bounty-side { position: static; }
  .bounty-title { font-size: var(--fs-2xl); }
}

/* ---- Brand: new bounty form (brand/new-campaign.html) ---------------------- */
.auth-card.auth-card-wide { width: min(100%, 620px); }
.type-picker { border: 0; padding: 0; margin: 0 0 var(--s-4); }
.type-picker legend { font-weight: 600; font-size: var(--fs-sm); padding: 0; margin-bottom: var(--s-2); }
.type-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.type-option { position: relative; display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease); }
.type-option input { margin-top: 4px; accent-color: var(--pink-ink); }
.type-option span { display: grid; gap: 2px; }
.type-option small { font-size: var(--fs-xs); color: var(--ink-3); }
.type-option:has(input:checked) { border-color: var(--focus); box-shadow: 0 0 0 4px var(--lav-soft); }
.type-option:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.rate-fields { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.rate-fields .field[hidden] { display: none; }
.rate-hint { margin: calc(-1 * var(--s-2)) 0 var(--s-4); }
/* Tiered rewards (brand/new-campaign.html): "Pay by follower count" switch + tier ladder.
   --tier-cols is set from JS to match the rate columns the bounty type uses. */
.rate-tiers { margin: 0 0 var(--s-4); padding: var(--s-4); border: 1.5px solid var(--line); border-radius: var(--r-md); }
.rate-tiers[hidden] { display: none; }
.rate-tiers-toggle { display: flex; gap: var(--s-3); align-items: flex-start; cursor: pointer; }
.rate-tiers-toggle > span { display: grid; gap: 2px; min-width: 0; }
.rate-tiers-toggle small { font-size: var(--fs-xs); }
.rate-tiers-body { margin-top: var(--s-4); display: grid; gap: var(--s-2); }
.rate-tiers-body[hidden] { display: none; }
.rate-tier-head, .rate-tier-row { display: grid; grid-template-columns: var(--tier-cols, minmax(0, 1.3fr) minmax(0, 1fr) 2.75rem); gap: var(--s-2); align-items: center; }
.rate-tier-head { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); }
.rate-tier-head [hidden], .rate-tier-row [hidden] { display: none; }
.rate-tier-row .input { min-width: 0; min-height: 44px; padding: var(--s-2) var(--s-3); }
.rate-tier-row .input::-webkit-outer-spin-button, .rate-tier-row .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rate-tier-row .input { -moz-appearance: textfield; }
@media (max-width: 420px) { .rate-tier-row .input { padding: var(--s-2); } .rate-tier-head, .rate-tier-row { gap: var(--s-1); } }
.rate-tier-row .input[readonly] { background: var(--bg, #f6f3f8); color: var(--ink-3); }
.rate-tier-remove { min-height: 44px; padding: 0; width: 2.75rem; }
.rate-tier-remove-spacer { width: 2.75rem; }
.rate-tier-add { justify-self: start; }
.rate-tier-preview { margin: 0; font-size: var(--fs-sm); color: var(--ink-2, var(--ink)); overflow-wrap: anywhere; }
.rate-tier-preview:empty { display: none; }
@media (max-width: 520px) { .type-options, .form-row { grid-template-columns: 1fr; } }

/* ---- Brand dashboard (brand/dashboard.html) ---------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s-4); margin-bottom: var(--s-8); }
.dash-head > div { min-width: 0; }
.dash-head h1, .dash-card h2 { overflow-wrap: anywhere; }
.dash-head .lede { margin-bottom: 0; }
.dash-stats { margin-bottom: var(--s-8); }
.dash-grid { margin-bottom: var(--s-6); align-items: start; }
.dash-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); align-content: start; min-width: 0; }
/* Grid items default to min-width:auto, so a long URL / wide table would stretch the card past the viewport. */
.dash-card > * { min-width: 0; }
/* Stacked panels (ambassador dashboard, brand sub-pages) need breathing room; .dash-grid already spaces via gap. */
.dash-card + .dash-card { margin-top: var(--s-6); }
.dash-grid > .dash-card { margin-top: 0; }
.dash-card .h3 { margin-bottom: 0; }
.dash-card .alert { margin-bottom: 0; }
.dash-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3); }
.dash-tally { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.dash-tally li { font-size: var(--fs-xs); font-weight: 600; padding: var(--s-1) var(--s-3); border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); }
.dash-tally li.is-active { background: var(--mint-soft); color: var(--mint-ink); }
.dash-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.dash-list li { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.dash-list li a { font-weight: 600; color: inherit; text-decoration: none; }
.dash-list li a:hover { text-decoration: underline; }
.dash-list .rates { font-size: var(--fs-sm); color: var(--ink-2); text-align: right; flex: none; }
.dash-list-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s-2); flex: none; }
.dash-table-wrap { overflow-x: auto; position: relative; min-width: 0; -webkit-overflow-scrolling: touch; } /* relative: keeps .sr-only cells inside the scroller instead of widening the page */
.dash-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.dash-table th, .dash-table td { padding: var(--s-3) var(--s-3); border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.dash-table th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.dash-table tbody tr:last-child td { border-bottom: 0; }
.dash-table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.dash-table td:last-child { text-align: right; }
#plan-payments-table td:last-child, #plan-payments-table th:last-child { text-align: left; }
.dash-table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; color: var(--ink-2); word-break: break-all; }
.dash-table .btn { min-height: 38px; padding-inline: var(--s-4); font-size: var(--fs-sm); }
.badge-overdue { background: var(--pink-soft); color: var(--pink-ink); }
.badge-partial { background: var(--butter-soft); color: var(--butter-ink); }
.badge-paid { background: var(--mint-soft); color: var(--mint-ink); }
/* Invoice actions: PayPal is the button, self-reporting Venmo is a demoted text link beneath it. */
.invoice-actions { white-space: nowrap; }
.invoice-actions .btn { display: block; margin-left: auto; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: var(--fs-xs); color: var(--ink-3); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
.link-btn[disabled] { opacity: .6; cursor: default; }
.invoice-venmo { display: inline-block; margin-top: var(--s-1); }
.invoice-receipt { white-space: normal; }
.invoice-doc { display: block; margin: var(--s-1) 0 0 auto; }
.dash-card .invoice-pay-to { margin: var(--s-1) 0 0; max-width: 34ch; margin-left: auto; white-space: normal; text-align: right; }
.invoice-pay-to strong { color: var(--ink); }
.invoice-pay-copy { margin-left: var(--s-1); }
.badge-reported { background: var(--lav-soft); color: var(--lav-ink); }
.badge-offer { background: var(--pink-soft); color: var(--pink-ink); margin-left: var(--s-1); }
.badge-self-reported { background: var(--butter-soft); color: var(--butter-ink); cursor: help; padding: 0 var(--s-2); font-weight: 500; }
.creator-socials { display: inline-flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); font-size: var(--fs-sm); }
.creator-followers { white-space: nowrap; }
.invoice-reported { display: table; margin: 0 0 var(--s-1) auto; white-space: normal; }
.dash-card .hint, .dash-card > .hint { margin: 0; font-size: var(--fs-xs); color: var(--ink-3); }
.dash-empty { margin: 0; color: var(--ink-3); }
.dash-skel { height: 44px; border-radius: var(--r-md); background: var(--surface-2); }
@media (max-width: 600px) {
  .dash-list li { flex-direction: column; align-items: flex-start; }
  .dash-list .rates { text-align: left; }
  .dash-list-side { justify-content: flex-start; }
  .dash-stats { gap: var(--s-3); }
  .dash-stats .stat { padding: var(--s-4); }
  .dash-head .cta-row .btn { flex: 1 1 auto; }
  .dash-card-head > .btn, .dash-card-head .cta-row .btn { flex: 1 1 auto; }
}

/* ---- ambassador dashboard (dashboard.html): claims + inline proof form ---- */
.claim-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.claim { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); padding: var(--s-4) var(--s-5); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.claim-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3); }
.claim-title { font-weight: 600; color: inherit; text-decoration: none; font-size: var(--fs-md); overflow-wrap: anywhere; }
.claim-title:hover { text-decoration: underline; }
.claim-brand { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; }
.claim-brand img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.claim-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: var(--fs-sm); color: var(--ink-2); }
.claim-dates { color: var(--mint-ink); font-weight: 600; }
.badge-status-claimed { background: var(--butter-soft); color: var(--butter-ink); }
.badge-status-proof_submitted { background: var(--lav-soft); color: var(--ink); }
.badge-status-verified, .badge-status-live, .badge-status-paid { background: var(--mint-soft); color: var(--mint-ink); }
.badge-status-rejected { background: var(--pink-soft); color: var(--pink-ink); }
.badge-status-at_risk { background: var(--butter-soft); color: var(--pink-ink); }
.badge-status-review { background: var(--lav-soft); color: var(--ink); }
.dash-tally .is-warn { background: var(--pink-soft); color: var(--pink-ink); }
/* At-risk banners (dashboard claims panel): panel-level summary + per-claim detail with Re-submit proof. */
.claim-attention { display: grid; gap: var(--s-2); padding: var(--s-4) var(--s-5); margin-bottom: var(--s-4); border-radius: var(--r-md); background: var(--pink-soft); color: var(--pink-ink); border: 1px solid var(--pink); }
.claim-attention h3 { margin: 0; color: inherit; }
.claim-attention p { margin: 0; font-size: var(--fs-sm); }
.claim-attention-kicker { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.claim-attention-links { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-1); }
.claim-attention-links .btn { color: inherit; border-color: currentColor; }
.claim.is-attention { border-color: var(--pink); }
.claim-risk { display: grid; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--butter-soft); color: var(--butter-ink); border-left: 4px solid var(--butter); }
.claim-risk.is-rejected { background: var(--pink-soft); color: var(--pink-ink); border-left-color: var(--pink); }
.claim-risk.is-recovered { background: var(--mint-soft); color: var(--mint-ink); border-left-color: var(--mint); }
/* Proof parked for the brand to check by hand (metadata.review = pending): informational, not a failure. */
.claim-risk.is-review { background: var(--lav-soft); color: var(--ink); border-left-color: var(--lav); }
.claim-risk-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); }
.claim-risk-when { font-size: var(--fs-xs); opacity: .85; }
.claim-risk-detail { margin: 0; font-size: var(--fs-sm); font-style: italic; }
.claim-risk .hint { margin: 0; color: inherit; opacity: .9; }
.claim-risk-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.claim-risk .proof-form { margin-top: var(--s-2); padding-top: var(--s-3); border-top: 1px solid rgba(0,0,0,.08); }
.proof-form { display: grid; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-md); background: var(--surface-2); }
.proof-form .field { margin-bottom: 0; }
.proof-row { display: grid; grid-template-columns: 1fr auto; gap: var(--s-3); align-items: end; }
.proof-row .field { min-width: 0; }
.proof-kind { display: flex; flex-wrap: wrap; gap: var(--s-4); font-size: var(--fs-sm); }
.proof-kind label { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 500; }
.proof-form .alert { margin: 0; }
.proof-form .btn { white-space: nowrap; }
.dash-empty .btn { margin-top: var(--s-4); }
@media (max-width: 640px) { .proof-row { grid-template-columns: 1fr; } .proof-row .btn { width: 100%; } }
.proof-mine { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-2); }
.proof-mine .hint { margin: 0; }
.proof-linkpage { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.proof-linkpage .hint { margin: 0; }
.proof-other { display: grid; gap: var(--s-3); }
.proof-other > summary { cursor: pointer; font-size: .9rem; text-decoration: underline; width: max-content; }
.proof-other[open] > summary { margin-bottom: var(--s-2); }
@media (max-width: 640px) { .proof-linkpage .btn { width: 100%; } }
.proof-mine[hidden] { display: none; }

/* ---- ambassador dashboard: 'Picked for you' strip ---- */
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-3); }
.pick { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); min-width: 0; }
.pick-rate { font-weight: 700; font-size: var(--fs-md); }
.pick-why { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); flex: 1 1 auto; }
.pick .btn { align-self: flex-start; }
.pick-skel { height: 140px; }

/* ---- ambassador dashboard: brand invites panel ---- */
.invite-message { margin: 0; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); color: var(--ink-2); font-style: italic; }
.invite-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.invite-actions .alert { margin: 0; flex: 1 1 100%; }
.badge-status-invited { background: var(--butter-soft); color: var(--butter-ink); }
.badge-status-accepted { background: var(--mint-soft); color: var(--mint-ink); }
.badge-status-declined { background: var(--surface-2); color: var(--ink-3); }
.badge-status-paused { background: var(--butter-soft); color: var(--butter-ink); }
.badge-status-closed { background: var(--surface-2); color: var(--ink-3); }
.badge-status-draft { background: var(--lav-soft); color: var(--ink); }
@media (max-width: 640px) { .invite-actions .btn { flex: 1 1 auto; } }

/* ---- ambassador dashboard: points panel ---- */
.points-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s-3); }
.points-summary .stat { padding: var(--s-4); }
.points-summary .stat .value { font-size: var(--fs-xl); }
.points-ledger td:last-child { text-align: right; }
.points-ledger .num.is-neg { color: var(--pink-ink); }
.points-ledger .num.is-pos { color: var(--mint-ink); }
.points-ledger .prog { font-size: var(--fs-xs); font-weight: 600; padding: 2px var(--s-2); border-radius: var(--r-pill); background: var(--lav-soft); white-space: nowrap; }
.points-ledger .prog.is-brand { background: var(--pink-soft); color: var(--pink-ink); }
.points-ledger .when { white-space: nowrap; color: var(--ink-2); }
.dash-skel-row td { padding: 0; border: 0; }

/* ---- ambassador dashboard: earnings panel ---- */
.earnings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-4); margin-bottom: var(--s-5); }
.earnings-col { padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface-2); }
.earnings-title { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; margin: 0; }
.earnings-month { font-weight: 500; color: var(--ink-2); font-size: var(--fs-sm); }
.earnings-total { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 700; line-height: var(--lh-tight); margin: var(--s-2) 0 var(--s-3); }
.earnings-src { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.earnings-src li { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); font-size: var(--fs-sm); }
.earnings-src .num { font-weight: 600; font-variant-numeric: tabular-nums; }
.earnings-src .src { font-size: var(--fs-xs); font-weight: 600; padding: 2px var(--s-2); border-radius: var(--r-pill); background: var(--pink-soft); color: var(--pink-ink); white-space: nowrap; }
.earnings-src .src.is-comm { background: var(--mint-soft); color: var(--mint-ink); }
.earnings-src .src.is-pool { background: var(--lav-soft); color: var(--ink); }
.earnings-col .hint { margin-top: var(--s-3); }
.pool-meter { margin-bottom: var(--s-5); }
.pool-meter-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); margin-bottom: var(--s-2); }
.pool-meter-pct { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700; }
.meter { height: 12px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.meter-fill { display: block; height: 100%; width: 0; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--lav-soft), var(--pink-ink)); transition: width .4s ease; }
.pool-meter-detail { margin: var(--s-2) 0 0; font-size: var(--fs-sm); color: var(--ink-2); }
.pool-meter-detail strong { color: var(--ink); }

/* annual statement download (earnings panel) */
.earn-statement { margin: 0 0 var(--s-4); }
.earn-statement-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); }
.earn-statement-row .field { margin-bottom: 0; min-width: 120px; }
.earn-statement .alert:not(:empty) { margin-top: var(--s-3); }

/* ---- ambassador dashboard: payouts panel ---- */
.payout-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s-3); margin-bottom: var(--s-4); }
.payout-next .stat { padding: var(--s-4); }
.payout-next .stat .value { font-size: var(--fs-xl); }
.payout-ledger .when { white-space: nowrap; color: var(--ink-2); }
.payout-ledger .src { font-size: var(--fs-xs); font-weight: 600; padding: 2px var(--s-2); border-radius: var(--r-pill); background: var(--pink-soft); color: var(--pink-ink); white-space: nowrap; }
.payout-ledger .src.is-pool { background: var(--lav-soft); color: var(--ink); }
.payout-ledger .src.is-referral { background: var(--butter-soft); color: var(--butter-ink); }
/* the inline "Brand referral" pill in the Refer a brand card's explainer */
#refer-panel .src { font-size: var(--fs-xs); font-weight: 600; padding: 2px var(--s-2); border-radius: var(--r-pill); background: var(--butter-soft); color: var(--butter-ink); white-space: nowrap; }
.badge-payout-paid { background: var(--mint-soft); color: var(--mint-ink); }
.badge-payout-pending, .badge-payout-in_transit { background: var(--butter-soft); color: var(--butter-ink); }
.badge-payout-held_tax { background: var(--lav-soft); color: var(--ink); }
/* held-payout banner (tax_hold) in the dashboard payouts panel */
.tax-hold-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-4); }
.tax-hold-banner[hidden] { display: none; }
.tax-hold-banner p { margin: 0; flex: 1 1 260px; }
.dash-card .tax-hold-banner { margin-bottom: var(--s-4); }
.badge-payout-canceled, .badge-payout-failed { background: var(--pink-soft); color: var(--pink-ink); }

/* ---- public link page (link.html?u=) ---- */
/* Theme tokens come from GET /api/linkpage/:uname `theme` (accent, background); the defaults
   match the backend's fallbacks. --lp-ink is auto-picked in JS from the background's luminance. */
.linkpage-body { --lp-accent: #f5a623; --lp-bg: #fff7ed; --lp-ink: var(--ink); --lp-ink-2: var(--ink-2); background: var(--lp-bg); background-image: none; color: var(--lp-ink); }
.linkpage-accent-bar { height: 6px; background: linear-gradient(90deg, var(--lp-accent), color-mix(in srgb, var(--lp-accent) 55%, #fff)); }
.linkpage { min-height: 100vh; padding: var(--s-10) var(--s-4) var(--s-12); }
.linkpage-inner { max-width: 560px; margin: 0 auto; display: grid; gap: var(--s-8); }
.linkpage-profile { text-align: center; display: grid; justify-items: center; gap: var(--s-2); }
.linkpage-avatar { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; background: var(--surface); border: 4px solid var(--lp-accent); box-shadow: var(--shadow-lg); }
.linkpage-avatar-fallback { display: grid; place-items: center; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: var(--fs-2xl, 2rem); color: var(--lp-ink); background: color-mix(in srgb, var(--lp-accent) 28%, #fff); }
.linkpage-name { margin: var(--s-3) 0 0; font-size: var(--fs-2xl, 2rem); color: var(--lp-ink); }
.linkpage-handle { margin: 0; color: var(--lp-ink-2); font-weight: 600; }
.linkpage-headline { margin: var(--s-3) 0 0; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-xl); line-height: var(--lh-snug); color: var(--lp-ink); max-width: 30ch; }
.linkpage-bio { margin: var(--s-2) 0 0; color: var(--lp-ink-2); max-width: 44ch; }
.linkpage-group { display: grid; gap: var(--s-3); }
.linkpage-group .eyebrow { text-align: center; margin: 0; color: var(--lp-ink-2); }
.linkpage-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.linkpage-link {
  display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  color: var(--ink); font-weight: 600; text-decoration: none; box-shadow: var(--shadow-sm, none);
  transition: transform .12s ease, box-shadow .12s ease;
}
.linkpage-link:hover, .linkpage-link:focus-visible { transform: translateY(-1px); box-shadow: var(--shadow-lg); border-color: var(--lp-accent); text-decoration: none; }
.linkpage-link:focus-visible { outline: 3px solid var(--lp-accent); outline-offset: 2px; }
.linkpage-link .lp-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: var(--r-md); object-fit: cover; background: var(--surface-2); display: grid; place-items: center; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); }
.linkpage-link .lp-text { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.linkpage-link .lp-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkpage-link .lp-sub { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkpage-link .lp-arrow { flex: 0 0 auto; color: var(--ink-3); }
.linkpage-deals .linkpage-link, .linkpage-shop .linkpage-link { border-color: color-mix(in srgb, var(--lp-accent) 45%, #fff); }
.linkpage-link .lp-arrow { color: var(--lp-accent); }
.linkpage-dark .linkpage-link { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.16); color: var(--lp-ink); }
.linkpage-dark .linkpage-link .lp-sub { color: var(--lp-ink-2); }
.linkpage-dark .linkpage-link .lp-icon { background: rgba(255,255,255,0.12); color: var(--lp-ink); }
.linkpage-dark .linkpage-skel { background: linear-gradient(90deg, rgba(255,255,255,0.08) 25%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0.08) 75%); background-size: 200% 100%; }
.linkpage-products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
@media (min-width: 480px) { .linkpage-products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.linkpage-product { display: grid; gap: var(--s-2); padding: var(--s-3); background: var(--surface); border: 1px solid color-mix(in srgb, var(--lp-accent) 45%, #fff); border-radius: var(--r-lg); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm, none); transition: transform .12s ease, box-shadow .12s ease; }
.linkpage-product:hover, .linkpage-product:focus-visible { transform: translateY(-1px); box-shadow: var(--shadow-lg); border-color: var(--lp-accent); text-decoration: none; }
.linkpage-product:focus-visible { outline: 3px solid var(--lp-accent); outline-offset: 2px; }
.linkpage-product .lp-product-img { display: grid; place-items: center; aspect-ratio: 1; width: 100%; border-radius: var(--r-md); background: var(--surface-2); object-fit: cover; overflow: hidden; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: var(--fs-xl); color: var(--ink-3); }
.linkpage-product .lp-product-name { font-weight: 600; font-size: var(--fs-sm); line-height: var(--lh-snug); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.linkpage-product .lp-product-price { font-size: var(--fs-sm); font-weight: 600; color: var(--lp-accent); }
.linkpage-dark .linkpage-product { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.16); color: var(--lp-ink); }
.linkpage-dark .linkpage-product .lp-product-img { background: rgba(255,255,255,0.12); color: var(--lp-ink); }
@media (prefers-reduced-motion: reduce) { .linkpage-product { transition: none; } }

/* Product showcase blocks on the public link page (GET /api/linkpage/:uname -> blocks). The
   card markup matches what the Design-tab stylesheet paints (.linkpage-product > img +
   .linkpage-product-body), so a creator with a published design and one without look the same
   shape; these rules are the undesigned fallback. Two columns on a phone, auto-fill above. */
.linkpage-blocks { display: grid; gap: var(--s-5); }
.linkpage-showcase { display: grid; gap: var(--s-3); }
.linkpage-showcase .linkpage-products { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.linkpage-product-card { display: block; padding: 0; gap: 0; overflow: hidden; }
.linkpage-product-card > img,
.linkpage-product-card > .linkpage-product-img-fallback { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-2); }
.linkpage-product-card > .linkpage-product-img-fallback { display: grid; place-items: center; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: var(--fs-xl); color: var(--ink-3); }
.linkpage-product-body { display: block; padding: var(--s-2) var(--s-3) var(--s-3); }
.linkpage-product-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; font-size: var(--fs-sm); line-height: var(--lh-snug); }
.linkpage-product-price { display: block; margin-top: 2px; font-size: var(--fs-sm); font-weight: 600; color: var(--lp-accent); }
.linkpage-products-empty { margin: 0; font-size: var(--fs-sm); color: var(--ink-3); }
.linkpage-dark .linkpage-product-card > .linkpage-product-img-fallback { background: rgba(255,255,255,0.12); color: var(--lp-ink); }
.linkpage-dark .linkpage-products-empty { color: var(--lp-ink-2, var(--lp-ink)); }
/* "Shop <creator>'s brands": the visitor-facing search over every affiliated brand's catalog.
   Same card grid as the showcase blocks; the input inherits the page's designed surface. */
.linkpage-brandsearch { display: grid; gap: var(--s-3); }
.linkpage-brandsearch .linkpage-products { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.linkpage-brandsearch-input { width: 100%; }
.linkpage-dark .linkpage-brandsearch-input { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.22); color: var(--lp-ink); }
.linkpage-dark .linkpage-brandsearch-input::placeholder { color: var(--lp-ink-2, var(--lp-ink)); opacity: 0.8; }
.linkpage-empty { text-align: center; color: var(--lp-ink-2); margin: 0; }
.linkpage-foot { text-align: center; margin: var(--s-4) 0 0; }
.linkpage-powered { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); color: var(--lp-ink-2); text-decoration: none; }
.linkpage-powered img { height: 22px; width: auto; }
.linkpage-skel { height: 64px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface) 25%, var(--line) 50%, var(--surface) 75%); background-size: 200% 100%; animation: lp-shimmer 1.2s infinite; }
@keyframes lp-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .linkpage-skel { animation: none; } .linkpage-link { transition: none; } }

/* ---- Brand: tracking install guide (brand/tracking.html) ------------------------------ */
.tracking-page .dash-card { margin-top: var(--s-6); }
.tracking-page .h4 { margin: var(--s-6) 0 var(--s-2); font-size: var(--fs-lg); }
.tracking-toc { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin-top: var(--s-4); font-size: var(--fs-sm); }
.tracking-toc a { color: var(--ink-2); text-decoration: none; padding: var(--s-1) var(--s-3); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.tracking-toc a:hover { color: var(--ink); border-color: var(--ink); }
.tracking-list { padding-left: 1.2em; margin: 0 0 var(--s-3); }
.tracking-list li { margin-bottom: var(--s-2); }
.tracking-page code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 4px; }
.tracking-fields td:first-child { white-space: nowrap; }
.code-block { margin: var(--s-3) 0 var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--ink); color: #f7f3ff; }
.code-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3); font-size: var(--fs-sm); color: #cbc3dc; background: rgba(255,255,255,0.06); border-bottom: 1px solid rgba(255,255,255,0.1); }
.code-head .btn { padding: 4px 12px; font-size: var(--fs-sm); background: transparent; color: #fff; border-color: rgba(255,255,255,0.3); }
.code-head .btn:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.code-head .btn.is-copied { border-color: var(--primary); color: var(--primary); }
.code-block pre { margin: 0; padding: var(--s-4); overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55; -webkit-overflow-scrolling: touch; }
.code-block pre code { background: none; padding: 0; color: inherit; font-size: inherit; white-space: pre; }

/* ---- ambassador link manager (me/links.html) ---- */
.link-form { display: grid; gap: var(--s-3); }
.link-form-row { display: grid; grid-template-columns: 1fr 1.6fr auto auto; gap: var(--s-3); align-items: end; }
.link-form-row .field { margin-bottom: 0; min-width: 0; }
.link-form .alert { margin: 0; }
.link-form .btn { white-space: nowrap; }
.link-row { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: grab; }
.link-row.is-dragging { opacity: .5; }
.link-row.is-over { border-color: var(--ink); box-shadow: var(--shadow-sm); }
.link-row.is-busy { opacity: .6; pointer-events: none; }
.link-handle { color: var(--ink-3); font-size: var(--fs-lg); line-height: 1; user-select: none; }
.link-body { display: grid; gap: 2px; min-width: 0; }
.link-label { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); font-weight: 600; }
.link-url { font-size: var(--fs-sm); color: var(--ink-2); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-url:hover { text-decoration: underline; }
.link-actions { display: flex; gap: var(--s-2); }
.link-actions .btn { min-height: 36px; padding-inline: var(--s-3); font-size: var(--fs-sm); }
.badge-kind-personal { background: var(--lav-soft); color: var(--ink); }
.badge-kind-shop { background: var(--mint-soft); color: var(--mint-ink); }
.badge-kind-deal { background: var(--butter-soft); color: var(--butter-ink); }
@media (max-width: 760px) {
  .link-form-row { grid-template-columns: 1fr; }
  .link-form-row .btn { width: 100%; }
  .link-row { grid-template-columns: auto 1fr; }
  .link-actions { grid-column: 1 / -1; }
}

/* ---- Link Page analytics (me/links.html Analytics tab) ---- */
/* Three tabs above the editor; narrower than the full-width auth tabs so it reads as a pill row. */
.links-tabs { max-width: 440px; }
.la-ranges { list-style: none; margin: 0; padding: 0; }
.la-range {
  min-height: 34px; padding: var(--s-1) var(--s-3); border: 0; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--ink-2); font: 600 var(--fs-xs)/1.4 var(--font-body); cursor: pointer;
}
.la-range[aria-pressed="true"] { background: var(--ink); color: #fff; }
.la-chart-wrap { margin-top: var(--s-4); }
/* One column per day; views is the pale back bar, clicks the solid front bar inside it. */
.la-chart { display: flex; align-items: flex-end; gap: 2px; height: 160px; padding-bottom: 1px; border-bottom: 1px solid var(--line); }
.la-day { flex: 1 1 0; min-width: 3px; height: 100%; display: flex; align-items: flex-end; }
.la-day-bars { position: relative; width: 100%; height: 100%; display: flex; align-items: flex-end; }
.la-bar-views { width: 100%; background: var(--lav); border-radius: 3px 3px 0 0; min-height: 1px; }
.la-bar-clicks { position: absolute; left: 25%; right: 25%; bottom: 0; background: var(--mint-ink); border-radius: 3px 3px 0 0; min-height: 1px; }
.la-axis { display: flex; justify-content: space-between; margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.la-legend { align-items: center; }
.la-key::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: var(--s-1); vertical-align: -1px; }
.la-key-views::before { background: var(--lav); }
.la-key-clicks::before { background: var(--mint-ink); }
.la-table-link { display: block; color: var(--ink); font-weight: 600; }
/* Row headers hold link names, so undo the uppercase column-header styling for them. */
#la-table tbody th { font-size: var(--fs-sm); text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 600; }
@media (max-width: 640px) {
  .la-chart { height: 130px; }
}

/* ---- brand campaign report: daily chart (brand/campaign-report.html) ---- */
/* Reuses the .la-chart columns; visits stack clean (solid) under filtered-as-suspicious (pink). */
.cr-actions { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-2); max-width: 36rem; }
.cr-run-again-note { margin: 0; padding: var(--s-2) var(--s-3); border-radius: var(--r-md, 12px); background: var(--mint-soft); color: var(--mint-ink); font-size: var(--fs-sm); text-align: right; }
.btn.cr-run-again-hl { box-shadow: 0 0 0 3px var(--mint-soft), 0 0 0 5px var(--mint-ink); }
@media (max-width: 640px) { .cr-actions { align-items: stretch; max-width: none; } .cr-run-again-note { text-align: left; } }
.cr-metrics { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.cr-daily-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-2); margin-top: var(--s-2); }
.cr-daily-meta .hint { margin: 0; }
.cr-chart-wrap { position: relative; padding-top: var(--s-5); }
.cr-chart-max { position: absolute; top: 0; left: 0; font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cr-chart { background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px); background-size: 100% 50%; }
.cr-day { flex: 1 1 0; min-width: 2px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.cr-bar { display: block; width: 100%; }
.cr-bar:first-child { border-radius: 3px 3px 0 0; }
.cr-bar-visits { background: var(--mint-ink); }
.cr-bar-filtered { background: var(--pink); }
.cr-bar-conversions { background: var(--lav-ink); }
.cr-bar-revenue { background: var(--primary); }
.cr-day.is-zero .cr-bar { min-height: 0; }
.cr-key-visits::before { background: var(--mint-ink); }
.cr-key-filtered::before { background: var(--pink); }
.cr-key-conversions::before { background: var(--lav-ink); }
.cr-key-revenue::before { background: var(--primary); }
.cr-chart.is-loading .cr-day { justify-content: flex-end; }
.cr-chart.is-loading .cr-bar { background: linear-gradient(90deg, var(--surface-2) 0%, var(--line) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: campaign-shimmer 1.2s linear infinite; }
.cr-daily-details { margin-top: var(--s-4); }
.cr-daily-details summary { cursor: pointer; font-weight: 600; font-size: var(--fs-sm); color: var(--ink-2); min-height: 44px; display: flex; align-items: center; }
.cr-daily-details .dash-table-wrap { max-height: 360px; overflow-y: auto; }
@media (max-width: 640px) {
  .cr-chart { height: 140px; }
  .cr-metrics { width: 100%; }
  .cr-metrics li { flex: 1 1 0; }
  .cr-metrics .la-range { width: 100%; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .cr-chart.is-loading .cr-bar { animation: none; } }

/* ---- ambassador dashboard: "Your page" panel ---- */
.page-form { display: grid; gap: var(--s-3); }
.page-form-row { display: grid; grid-template-columns: 1fr auto; gap: var(--s-3); align-items: start; }
.page-form-row .field { margin-bottom: 0; min-width: 0; }
.page-form-row .btn { white-space: nowrap; margin-top: calc(var(--fs-sm) * 1.5 + var(--s-2)); }
.page-form .alert { margin: 0; }
.page-form .alert:empty { display: none; }
.uname-input { display: flex; align-items: center; min-height: 48px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.uname-input:focus-within { border-color: var(--focus); box-shadow: 0 0 0 4px var(--lav-soft); }
.uname-at { padding: 0 var(--s-2) 0 var(--s-3); color: var(--ink-3); font-weight: 600; }
.uname-input input { border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: 12px var(--s-3) 12px 0; flex: 1; min-width: 0; }
.uname-input input:focus { outline: none; box-shadow: none; }
.uname-input:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.page-url { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-2); padding: var(--s-4); border-radius: var(--r-md); background: var(--surface-2); min-width: 0; }
.page-url-label { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.page-url-row { display: flex; gap: var(--s-3); align-items: center; min-width: 0; }
.page-url-link { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--fs-sm); color: var(--ink); }
.page-url-row .btn { min-height: 36px; padding-inline: var(--s-3); font-size: var(--fs-sm); white-space: nowrap; }
.page-url-row .btn.is-copied { border-color: var(--primary); color: var(--primary); }
.page-gen { display: grid; gap: var(--s-3); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.page-gen-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3); }
.page-gen-head > div { flex: 1 1 200px; min-width: 0; display: grid; gap: var(--s-1); }
.page-gen .alert { margin: 0; }
.page-gen .alert:empty { display: none; }
.page-preview { display: grid; gap: var(--s-2); }
.page-preview-card { --lp-accent: #f5a623; --lp-bg: #fff7ed; position: relative; overflow: hidden; padding: var(--s-5) var(--s-5) var(--s-4); border-radius: var(--r-lg); background: var(--lp-bg); border: 1px solid var(--line); }
.page-preview-accent { position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--lp-accent); }
.page-preview-headline { margin: 0 0 var(--s-2); font-size: var(--fs-xl); }
.page-preview-bio { margin: 0 0 var(--s-3); color: var(--ink-2); white-space: pre-line; }
.page-preview-theme { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-4); font-size: var(--fs-sm); color: var(--ink-3); }
.page-preview-theme li { display: inline-flex; align-items: center; gap: var(--s-2); }
.page-preview-theme code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
.page-preview-theme .swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); display: inline-block; }
@media (max-width: 640px) {
  .page-form-row { grid-template-columns: 1fr; }
  .page-form-row .btn { width: 100%; margin-top: 0; }
  .page-url-row { flex-wrap: wrap; }
}

/* Vanity link page (u/index.html): copy-link button under the profile. */
.linkpage-share { margin: var(--s-3) 0 0; display: flex; align-items: center; justify-content: center; gap: var(--s-3); flex-wrap: wrap; }
.linkpage-share .btn { min-height: 36px; padding-inline: var(--s-4); font-size: var(--fs-sm); color: var(--lp-ink); border-color: var(--lp-accent); }
.linkpage-share .btn.is-copied { background: var(--lp-accent); color: var(--ink); }
.linkpage-share-msg { font-size: var(--fs-sm); color: var(--lp-ink-2); }
.linkpage-share-msg:empty { display: none; }

/* Signup step 3: link-page import preview */
.form-row-inline { display: flex; gap: var(--s-2); align-items: stretch; }
.form-row-inline .input { flex: 1 1 auto; min-width: 0; }
.check-list { border: 1px solid var(--line, #e6e6ef); border-radius: 12px; padding: var(--s-4); margin: var(--s-4) 0 0; }
.check-list legend { font-weight: 600; padding: 0 var(--s-2); }
.check-list .check { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-2) 0; border-bottom: 1px solid var(--line, #e6e6ef); cursor: pointer; }
.check-list .check:last-of-type { border-bottom: 0; }
.check-list .check input { margin-top: 0.35em; flex: 0 0 auto; width: 1.1em; height: 1.1em; accent-color: var(--lav-ink, #5b4bd6); }
.check-list .check-label { display: block; font-weight: 500; overflow-wrap: anywhere; }
.check-list .check-url { display: block; font-size: var(--fs-sm); color: var(--ink-3); overflow-wrap: anywhere; }

/* Profile panel (dashboard #profile) */
.profile-form { display: grid; gap: var(--s-3); }
.profile-form .form-row .field { margin-bottom: 0; min-width: 0; }
.profile-socials { border: 1px solid var(--line); border-radius: var(--r-md, 12px); padding: var(--s-4); margin: 0; display: grid; gap: var(--s-3); }
.profile-socials legend { font-weight: 600; font-size: var(--fs-sm); padding: 0 var(--s-2); }
.profile-payout { border: 1px solid var(--line); border-radius: var(--r-md, 12px); padding: var(--s-4); margin: 0; display: grid; gap: var(--s-3); }
.profile-payout legend { font-weight: 600; font-size: var(--fs-sm); padding: 0 var(--s-2); }
.profile-payout > .hint { margin: 0; }
.payout-rail { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.payout-rail-opt { display: inline-flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: var(--fs-sm); font-weight: 600; }
.payout-rail-opt:has(input:checked) { border-color: var(--brand, currentColor); background: var(--tint-lav, rgba(0,0,0,.04)); }
.payout-rail-opt input { margin: 0; accent-color: var(--brand, currentColor); }
.profile-payout .field.is-inactive label { opacity: .65; }
/* Payout-day SMS opt-in (#profile › Payout-day text): pill toggle, dimmed while it is locked
   because no phone number is on file yet. */
.sms-toggle { display: inline-flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: var(--fs-sm); font-weight: 600; }
.sms-toggle input { margin: 0; accent-color: var(--brand, currentColor); }
.sms-toggle:has(input:checked) { border-color: var(--brand, currentColor); background: var(--tint-lav, rgba(0,0,0,.04)); }
.sms-toggle:has(input:disabled) { opacity: .6; cursor: not-allowed; }
/* Email preferences card (account.html#email): one row per category, a switch that saves on flip,
   and a per-row inline status ("✓ Saved" / error). */
.email-prefs { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.email-pref { border: 1px solid var(--line); border-radius: var(--r-md, 12px); padding: var(--s-3) var(--s-4); display: grid; gap: var(--s-1); }
.email-pref-label { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); cursor: pointer; }
.email-pref-text { display: grid; gap: 2px; min-width: 0; }
.email-pref-text .hint { margin: 0; }
.email-pref-status { font-size: var(--fs-sm); font-weight: 600; transition: opacity .4s; }
.email-pref-status:empty { display: none; }
.email-pref-status.is-ok { color: var(--mint-ink); }
.email-pref-status.is-error { color: var(--pink-ink); }
.email-pref-status.is-fading { opacity: 0; }
.switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 44px; height: 26px; margin: 0; border-radius: 999px; background: #b9aec2; border: 1px solid #b9aec2; cursor: pointer; transition: background 150ms, border-color 150ms; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform 150ms; }
.switch:checked { background: var(--lav-ink); border-color: var(--lav-ink); }
.switch:checked::after { transform: translateX(18px); }
.switch:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--lav-soft); }
.switch:disabled { opacity: .55; cursor: wait; }
.profile-actions { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.profile-saved { font-weight: 600; color: var(--mint-ink); transition: opacity .4s; }
.profile-saved[hidden] { display: none; }
.profile-saved.is-fading { opacity: 0; }

/* "Your data" block on dashboard.html#profile: export + delete-account confirm. */
.btn-danger { background: var(--pink-soft); color: var(--pink-ink); border-color: var(--pink); }
.btn-danger:hover { background: var(--pink); color: var(--pink-ink); box-shadow: var(--shadow-sm); }
.account-data { border-top: 1px solid var(--line); margin-top: var(--s-5); padding-top: var(--s-4); }
.account-data-title { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
/* Inline per-field error (brand/dashboard.html#billing-details): the 400 `field` message under its input. */
.field-error { display: block; margin-top: var(--s-1); color: var(--pink-ink); font-size: var(--fs-sm); }
.field textarea[aria-invalid="true"] { border-color: var(--pink-ink); }
#billing-details textarea { resize: vertical; min-height: 6rem; }
.account-actions { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.account-confirm {
  margin-top: var(--s-4); padding: var(--s-4); border-radius: var(--r-md);
  border: 1px solid var(--pink); background: var(--pink-soft);
  display: grid; gap: var(--s-3);
}
.account-confirm[hidden] { display: none; }
.account-confirm-warn { margin: 0; font-size: var(--fs-sm); color: var(--pink-ink); }
.account-confirm .field { max-width: 22rem; }
.account-confirm .alert { margin-bottom: 0; }

/* Finish-setting-up checklist (dashboard.html#setup) */
.setup-card { border-color: var(--lav-soft, var(--border)); }
.setup-hint { margin: var(--s-1) 0 0; }
.setup-pct { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700; }
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.setup-step { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-md, 10px); background: var(--surface-2); }
.setup-step a { flex: 1; color: inherit; text-decoration: none; }
.setup-step a:hover { text-decoration: underline; }
.setup-step .setup-tick { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink-3); display: inline-grid; place-items: center; font-size: 13px; line-height: 1; }
.setup-step.is-done { color: var(--ink-3); }
.setup-step.is-done a { text-decoration: line-through; }
.setup-step.is-done .setup-tick { background: var(--pink-ink); border-color: var(--pink-ink); color: #fff; }
.setup-step .setup-go { font-size: var(--fs-xs); color: var(--ink-2); }
.setup-foot { display: flex; justify-content: flex-end; }
.setup-hide, .setup-show-wrap .nav-link { background: none; border: 0; cursor: pointer; font: inherit; font-size: var(--fs-sm); color: var(--ink-2); padding: 0; }
.setup-show-wrap { margin: 0; text-align: center; }

/* ---- Product card + blitz (campaign.html, guuds / blitz listings) --------- */
.bounty-product { margin-bottom: var(--s-5); }
.product-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s-5); align-items: start; padding: var(--s-4); }
.product-card.is-compact { grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-3); padding: var(--s-3); }
.product-card-img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.product-card-img-empty { background: linear-gradient(135deg, var(--surface-2), var(--lav-soft)); }
.product-card-body { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.product-card-store { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); text-transform: lowercase; letter-spacing: .01em; }
.product-card-title { margin: 0; font-size: var(--fs-xl); overflow-wrap: anywhere; }
.product-card.is-compact .product-card-title { font-size: var(--fs-md); }
.product-card-rate { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); color: var(--pink-ink); }
.product-card-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-1); }
.product-card-bounty { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); text-decoration: none; }
.product-card-bounty:hover { color: var(--ink); text-decoration: underline; }
.btn-sm { padding: var(--s-1) var(--s-3); font-size: var(--fs-sm); }
.bounty-blitz { padding: var(--s-5); border: 1px solid var(--primary-soft); border-radius: var(--r-lg); background: linear-gradient(180deg, #fff 0%, var(--surface-2) 100%); }
.blitz-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); font-size: var(--fs-sm); color: var(--ink-2); }
.blitz-meta a { color: inherit; font-weight: 600; }
.blitz-bundle { list-style: none; margin: var(--s-3) 0 0; padding: 0; }
.blitz-bundle li { position: relative; }
.blitz-board-head { margin-top: var(--s-6); }
.leaderboard-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); margin-top: var(--s-2); }
.leaderboard-table th, .leaderboard-table td { padding: var(--s-2) var(--s-2); text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.leaderboard-table th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.leaderboard-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.leaderboard-table .num small { color: var(--ink-3); font-weight: 500; }
.leaderboard-table .rank { width: 2.5em; font-family: var(--font-display); font-weight: 700; color: var(--ink-2); }
.leaderboard-table .who { display: flex; align-items: center; gap: var(--s-2); font-weight: 600; }
.leaderboard-table .who img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.leaderboard-table .who .dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--pink)); flex: none; }
.leaderboard-table .who a { color: inherit; text-decoration: none; }
.leaderboard-table .who a:hover { text-decoration: underline; }
.leaderboard-table tr.is-me td { background: var(--butter-soft, var(--surface-2)); }
.leaderboard-table tbody tr:nth-child(1) .rank { color: var(--primary-ink); }
@media (max-width: 640px) {
  .product-card { grid-template-columns: 1fr; }
  .product-card-img { max-width: 240px; }
}

/* Launch a blitz (blitz/new.html): product picker rows reuse .check-list */
.blitz-products { margin-top: 0; margin-bottom: var(--s-4); }
.blitz-product-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow: auto; }
.blitz-product .blitz-product-img { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }

/* ---- Legal pages (terms / privacy) + 404 --------------------------------- */
.legal-updated { font-size: var(--fs-sm); color: var(--ink-3); margin-top: calc(-1 * var(--s-2)); }
.legal-toc { max-width: 760px; margin-bottom: var(--s-8); padding: var(--s-4) var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.legal-toc ol { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-2) var(--s-4); font-size: var(--fs-sm); }
.legal-toc a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.legal-toc a:hover { color: var(--ink); }
.legal { max-width: 760px; }
.legal section { padding-block: var(--s-6); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + var(--s-4)); }
.legal section:first-child { border-top: 0; padding-top: 0; }
.legal .help-group { scroll-margin-top: calc(var(--header-h) + var(--s-4)); }
.legal .help-group > section:first-child { border-top: 1px solid var(--line); padding-top: var(--s-6); }
.legal h2 { font-size: var(--fs-xl); margin-bottom: var(--s-3); }
.legal h3 { font-size: var(--fs-md); margin: var(--s-4) 0 var(--s-2); }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { list-style: disc; padding-left: var(--s-5); display: grid; gap: var(--s-2); margin-bottom: var(--s-4); }
.legal code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--surface-2); padding: 1px var(--s-1); border-radius: var(--r-sm); }
/* Partner API docs (docs/api.html): method pill, field tables, placeholder sections. */
.api-docs .legal { max-width: 860px; }
.api-docs .section-head code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; background: var(--surface-2); padding: 1px var(--s-1); border-radius: var(--r-sm); word-break: break-all; }
.api-method { display: inline-block; vertical-align: middle; margin-right: var(--s-1); padding: 2px var(--s-2); border-radius: var(--r-sm); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--fs-sm); font-weight: 700; background: var(--ink); color: #fff; }
.api-method-get { background: var(--mint-soft); color: var(--mint-ink); }
.api-docs .legal h2 { overflow-wrap: anywhere; }
.api-table-wrap { overflow-x: auto; margin: var(--s-3) 0 var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.api-fields { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.api-fields th, .api-fields td { text-align: left; vertical-align: top; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); color: var(--ink-2); }
.api-fields th { font-family: var(--font-display); color: var(--ink); background: var(--surface-2); }
.api-fields tr:last-child td { border-bottom: 0; }
.api-fields td:first-child { white-space: nowrap; }
.api-placeholder p { color: var(--ink-3); font-style: italic; }
.footer-legal { display: inline-block; margin-left: var(--s-2); }
.footer-legal a { color: var(--ink-3); text-decoration: none; }
.footer-legal a:hover, .footer-legal a[aria-current] { color: var(--ink); }
.notfound { min-height: 55vh; display: grid; align-items: center; text-align: center; }
.notfound .lede { max-width: 560px; margin-inline: auto; }
.notfound .cta-row { margin-top: var(--s-6); }
.notfound code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--surface-2); padding: 1px var(--s-1); border-radius: var(--r-sm); }
.linkpage-legal { text-align: center; margin: var(--s-2) 0 0; font-size: var(--fs-xs); }
.linkpage-legal a { color: var(--lp-ink-2); text-decoration: none; }
.linkpage-legal a:hover { color: var(--lp-ink); text-decoration: underline; }

/* ---- Testimonials (index + brands; fed by assets/testimonials.json) ---- */
.testimonial { display: flex; flex-direction: column; gap: var(--s-4); }
.testimonial blockquote { margin: 0; font-size: var(--fs-md, 1.05rem); line-height: 1.55; flex: 1; }
.testimonial blockquote::before { content: "\201C"; color: var(--primary); font-weight: 700; margin-right: 2px; }
.testimonial blockquote::after { content: "\201D"; color: var(--primary); font-weight: 700; margin-left: 2px; }
.testimonial footer { display: flex; align-items: center; gap: var(--s-3); }
.testimonial .avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 44px;
  background: var(--surface-2); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--primary);
}
.testimonial .who { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.testimonial .who strong { font-size: var(--fs-sm, .9rem); }
.testimonial .who span { font-size: var(--fs-xs, .8rem); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.testimonial .role { margin-left: auto; }

/* ---- "What's new" panel (both dashboards; fed by GET /api/whats-new) ---- */
.whats-new .wn-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; margin-left: var(--s-1); background: linear-gradient(135deg, var(--primary), var(--pink)); }
.wn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.wn-item { padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.wn-date { display: block; font-size: var(--fs-xs); color: var(--ink-3); }
.wn-title { display: block; margin-top: 2px; }
.wn-summary { margin: var(--s-1) 0 0; font-size: var(--fs-sm); color: var(--ink-2); }

/* ---- brand dashboard: plan & billing (#billing, GET /api/brands/me/plan) ---- */
.trial-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); background: var(--lav-soft); color: var(--lav-ink); }
.trial-banner.is-ended { background: var(--butter-soft); color: var(--butter-ink); }
.trial-banner-text { margin: 0; font-weight: 600; }
.plan-now { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface-2); }
.plan-now-main { min-width: 0; }
.plan-now-name { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700; margin: var(--s-1) 0 var(--s-2); }
.plan-now-price { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.plan-facts { margin: 0; display: grid; gap: var(--s-2); align-content: start; min-width: 0; }
.plan-facts dt { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.plan-facts dd { margin: 0; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.usage-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); }
.usage-row { display: grid; gap: var(--s-2); }
.usage-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.usage-label { font-weight: 600; font-size: var(--fs-sm); }
.usage-count { font-size: var(--fs-sm); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.usage-row .meter-fill.is-full { background: linear-gradient(90deg, var(--butter-soft), var(--pink-ink)); }
.usage-note { color: var(--pink-ink) !important; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-4); }
.plan-card { display: grid; gap: var(--s-2); align-content: start; padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.plan-card.is-current { border-color: var(--primary); background: var(--surface-2); }
.plan-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-2); }
.plan-card-name { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 700; margin: 0; }
.plan-card-price { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700; margin: 0; }
.plan-card-features { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); font-size: var(--fs-sm); }
.plan-card-features li::before { content: "\2713"; color: var(--mint-ink); font-weight: 700; margin-right: var(--s-2); }
.plan-card .btn { justify-self: start; margin-top: var(--s-2); }
.plan-card-note { margin: var(--s-2) 0 0; }
.billing-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.coupon-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); }
.coupon-form .field { flex: 1 1 220px; min-width: 0; }
.coupon-msg { margin: var(--s-2) 0 0; }
.coupon-msg.is-ok { color: var(--mint-ink); font-weight: 600; }
.coupon-msg.is-error { color: var(--pink-ink); }

/* ---- plan-limit upgrade prompt (402 plan_limit on new-campaign/invite/bonuses) ---- */
.plan-limit { display: grid; gap: var(--s-3); margin: var(--s-4) 0; padding: var(--s-4); border: 1px solid var(--primary); border-radius: var(--r-lg); background: var(--surface-2); }
.plan-limit-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-2); }
.plan-limit-title { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 700; margin: 0; }
.plan-limit-error { margin: 0; font-size: var(--fs-sm); }
.plan-limit-card { display: grid; gap: var(--s-2); align-content: start; padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.plan-limit-card .btn { justify-self: start; margin-top: var(--s-2); }
.plan-limit-gain { margin: 0; font-size: var(--fs-sm); font-weight: 600; }
.plan-limit-foot { margin: 0; }
.plan-card.is-wanted { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }

/* Public pricing table on brands.html (#pricing) — reuses the billing panel's .plan-card. */
.pricing .plan-cards-public { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: stretch; }
.pricing .plan-card { background: var(--surface); }
.plan-card-limits { font-weight: 500; }
.plan-card-trial { justify-self: start; font-size: var(--fs-sm); font-weight: 600; color: var(--primary); }

/* ---- Earn points (me/points.html) ---- */
/* Big type, plain language, no tables: the hero is one sentence a creator can read at a glance. */
.earn-hero { padding: var(--s-6) 0 var(--s-8); max-width: 56ch; }
.earn-big { font-family: var(--font-display); font-size: var(--fs-4xl); line-height: var(--lh-tight); letter-spacing: -0.02em; margin: var(--s-2) 0 var(--s-3); }
.earn-num { background: linear-gradient(120deg, var(--primary-ink), var(--pink-ink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.earn-sub { font-size: var(--fs-xl); color: var(--ink-2); margin: 0 0 var(--s-2); }
.earn-sub strong { color: var(--ink); }
.earn-hint { color: var(--ink-3); margin: 0 0 var(--s-5); }
.earn-skeleton { color: var(--ink-3); opacity: .55; }
.earn-block { margin-top: var(--s-6); }
.earn-list { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.earn-item { display: grid; grid-template-columns: 1fr auto; gap: var(--s-2) var(--s-4); align-items: baseline; padding: var(--s-4) var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.earn-item-label { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; }
.earn-item-rate { grid-column: 1; font-size: var(--fs-sm); color: var(--ink-2); }
.earn-item-pts { grid-row: 1 / span 2; font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 700; white-space: nowrap; }
.earn-item-pts small { display: block; font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 500; color: var(--ink-3); text-align: right; }
@media (max-width: 600px) {
  .earn-item { grid-template-columns: 1fr; }
  .earn-item-pts { grid-row: auto; }
  .earn-item-pts small { text-align: left; }
}

/* ---- earn points: ranked next-action cards + first-week path (me/points.html) ---- */
.earn-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--s-4); margin-top: var(--s-4); }
.earn-card { display: grid; gap: var(--s-2); align-content: start; padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); }
.earn-card:first-child { border-color: var(--primary); background: var(--surface-2); }
.earn-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.earn-card-rank { font-size: var(--fs-xs); font-weight: 600; padding: 2px var(--s-2); border-radius: var(--r-pill); background: var(--lav-soft); color: var(--ink); }
.earn-card-offer { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 700; line-height: var(--lh-tight); text-align: right; white-space: nowrap; }
.earn-card-offer small { display: block; font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 500; color: var(--ink-3); }
.earn-card-title { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; margin: 0; }
.earn-card-why { margin: 0; color: var(--ink-2); }
.earn-card-rate { margin: 0; font-size: var(--fs-sm); color: var(--ink-3); }
.earn-card-progress { display: grid; gap: var(--s-2); margin-top: var(--s-1); }
.earn-card-cta { margin-top: var(--s-2); align-items: center; }
.earn-card-effort { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }

.earn-start { padding: var(--s-5); margin-top: var(--s-4); border: 1px solid var(--primary); border-radius: var(--r-xl); background: var(--surface-2); }
.earn-start .h3 { margin: var(--s-1) 0 var(--s-2); }
.earn-steps { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.earn-step { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); align-items: start; padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface); }
.earn-step-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-family: var(--font-display); font-weight: 700; background: var(--lav-soft); color: var(--ink); }
.earn-step.is-done .earn-step-mark { background: var(--mint-soft); color: var(--mint-ink); }
.earn-step-body { display: grid; gap: var(--s-2); justify-items: start; min-width: 0; }
.earn-step-title { font-family: var(--font-display); font-weight: 600; }
.earn-step.is-done .earn-step-title { text-decoration: line-through; color: var(--ink-2); }
.earn-step-hint { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.earn-step-done { font-size: var(--fs-xs); font-weight: 600; padding: 2px var(--s-2); border-radius: var(--r-pill); background: var(--mint-soft); color: var(--mint-ink); }
@media (max-width: 600px) {
  .earn-cards { grid-template-columns: 1fr; }
  .earn-card, .earn-start { padding: var(--s-4); }
  .earn-card-cta .btn { width: 100%; }
}

/* ---- Link Page design (me/links.html Design tab, part 1a) ---- */
/* Controls on the left, preview on the right; the preview column is a placeholder until the
   later pieces render the page itself. Stacks to one column on narrow screens. */
.design-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.design-preview { position: sticky; top: var(--s-6); }
/* Preset gallery (part 1b): every tile is a live miniature of the /u/ page under that preset —
   real background, real font pair, real button colour and corner shape — so the choice is made by
   looking rather than by reading labels. Inline styles from app.js carry the preset's own values. */
.dz-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-3); margin-top: var(--s-4); }
.dz-preset {
  display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-2);
  border: 2px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.dz-preset:hover { border-color: var(--ink-2); }
.dz-preset:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.dz-preset[aria-checked="true"] { border-color: var(--ink); box-shadow: var(--shadow-sm); }
.dz-thumb {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  height: 124px; padding: 10px 8px; border-radius: var(--r-sm); overflow: hidden;
}
.dz-thumb-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 999px; flex: none;
  font-size: 10px; font-weight: 700; line-height: 1;
}
.dz-thumb-name { font-size: 11px; font-weight: 700; line-height: 1.1; }
.dz-thumb-bio { display: block; width: 58%; height: 3px; border-radius: 999px; }
.dz-thumb-buttons { display: flex; flex-direction: column; gap: 4px; width: 100%; margin-top: 2px; }
.dz-thumb-btn {
  display: flex; align-items: center; justify-content: center;
  height: 16px; font-size: 8px; font-weight: 600; line-height: 1; letter-spacing: .02em;
}
.dz-preset-foot { display: flex; flex-direction: column; gap: 2px; }
.dz-preset-label { font: 600 var(--fs-xs)/1.3 var(--font-body); }
.dz-preset-meta { font: 400 11px/1.3 var(--font-body); color: var(--ink-3); }
.dz-preset[aria-checked="true"] .dz-preset-label::after { content: " · selected"; color: var(--ink-2); font-weight: 400; }
.dz-bg-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s-4); margin-top: var(--s-4); }
.dz-color { width: 100%; min-height: 44px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }
.dz-bg-thumb img { width: 120px; height: 80px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }
.dz-shapes { border: 0; padding: 0; margin: var(--s-4) 0 0; }
.dz-shapes legend { font: 600 var(--fs-sm)/1.4 var(--font-body); padding: 0; }
.dz-shapes > div { display: flex; gap: var(--s-2); margin-top: var(--s-2); flex-wrap: wrap; }
.dz-shape {
  min-height: 40px; padding: var(--s-2) var(--s-4); border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink-2); font: 600 var(--fs-xs)/1.4 var(--font-body); cursor: pointer;
}
.dz-shape[aria-checked="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.dz-shape-square { border-radius: 2px; }
.dz-shape-rounded { border-radius: var(--r-sm); }
.dz-shape-pill { border-radius: var(--r-pill); }
.dz-save { margin-top: var(--s-6); }

/* Live preview (part 1c): a phone-sized miniature of the creator's real /u/ page. Every colour,
   font and radius comes from --lp-* custom properties set in JS from the theme being edited —
   the same vocabulary the backend's themeRender ships to the public page — so the preview and
   the published page cannot drift apart. */
.dz-phone {
  margin-top: var(--s-4); border-radius: 26px; padding: 10px;
  background: var(--ink); box-shadow: var(--shadow-sm);
}
.dz-page {
  --lp-bg-color: #fff; --lp-bg-image: none; --lp-bg-size: auto; --lp-bg-repeat: no-repeat;
  --lp-text: #1f1a17; --lp-text-muted: rgba(31,26,23,.72); --lp-text-shadow: none;
  --lp-card-bg: rgba(0,0,0,.06); --lp-card-border: rgba(0,0,0,.12); --lp-card-blur: none;
  --lp-button-bg: #f5a623; --lp-button-text: #111; --lp-button-border: rgba(0,0,0,.14);
  --lp-button-shadow: none; --lp-button-radius: 14px; --lp-avatar-radius: 999px;
  --lp-font-heading: var(--font-head); --lp-font-body: var(--font-body);
  height: 520px; overflow-y: auto; border-radius: 18px;
  background-color: var(--lp-bg-color); background-image: var(--lp-bg-image);
  background-size: var(--lp-bg-size); background-repeat: var(--lp-bg-repeat); background-position: center;
  color: var(--lp-text); font-family: var(--lp-font-body);
}
.dz-page-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 16px 16px; text-align: center; }
.dz-page-avatar {
  width: 56px; height: 56px; border-radius: var(--lp-avatar-radius); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--lp-button-bg); color: var(--lp-button-text);
  font: 700 20px/1 var(--lp-font-heading);
}
.dz-page-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dz-page-name { font: 700 18px/1.2 var(--lp-font-heading); text-shadow: var(--lp-text-shadow); }
.dz-page-handle { font: 500 13px/1.3 var(--lp-font-body); color: var(--lp-text-muted); text-shadow: var(--lp-text-shadow); }
.dz-page-bio { font: 400 13px/1.45 var(--lp-font-body); color: var(--lp-text-muted); text-shadow: var(--lp-text-shadow); max-width: 30ch; }
.dz-page-groups { width: 100%; display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.dz-page-group {
  display: flex; flex-direction: column; gap: 8px; padding: 12px 10px;
  background: var(--lp-card-bg); border: 1px solid var(--lp-card-border);
  border-radius: calc(var(--lp-button-radius) / 1.5 + 6px);
  backdrop-filter: var(--lp-card-blur); -webkit-backdrop-filter: var(--lp-card-blur);
}
.dz-page-group h3 {
  margin: 0; font: 600 10px/1.2 var(--lp-font-body); letter-spacing: .12em; text-transform: uppercase;
  color: var(--lp-text-muted); text-shadow: var(--lp-text-shadow);
}
.dz-page-btn {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; text-align: left;
  background: var(--lp-button-bg); color: var(--lp-button-text);
  border: 1px solid var(--lp-button-border); border-radius: var(--lp-button-radius);
  box-shadow: var(--lp-button-shadow); font: 600 13px/1.25 var(--lp-font-body);
}
.dz-page-btn .dz-page-btn-text { flex: 1; min-width: 0; }
.dz-page-btn .dz-page-btn-sub { display: block; font-weight: 400; font-size: 11px; opacity: .78; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-page-btn .dz-page-btn-arrow { opacity: .7; }
.dz-page-empty { font: 400 13px/1.45 var(--lp-font-body); color: var(--lp-text-muted); text-shadow: var(--lp-text-shadow); }
.dz-page-foot { margin-top: 6px; font: 400 11px/1.3 var(--lp-font-body); color: var(--lp-text-muted); text-shadow: var(--lp-text-shadow); }
@media (prefers-reduced-motion: no-preference) {
  .dz-page { transition: background-color .15s ease; }
}

@media (max-width: 860px) {
  .design-grid { grid-template-columns: 1fr; }
  .design-preview { position: static; }
}

/* ---- Guuds brands directory (guuds-brands.html) -------------------------- */
.gb-list { list-style: none; margin: 0; padding: 0; }
.gb-card { display: flex; flex-direction: column; gap: var(--s-4); }
.gb-head { display: flex; align-items: center; gap: var(--s-3); }
.gb-logo { width: 48px; height: 48px; border-radius: var(--r-md); object-fit: cover; background: var(--surface-2); flex: 0 0 auto; }
.gb-logo-fallback { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display, inherit); font-weight: 700; color: var(--primary-ink); background: var(--primary-soft); }
.gb-head-text { min-width: 0; }
.gb-name { margin: 0; font-size: var(--fs-lg); line-height: 1.3; word-break: break-word; }
.gb-meta { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-top: var(--s-1); }
.gb-rate { font-weight: 700; }
.gb-section-label { margin: 0 0 var(--s-2); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft, inherit); opacity: .75; }
.gb-instructions { margin: 0; white-space: pre-wrap; }
.gb-products { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.gb-product { display: flex; align-items: center; gap: var(--s-3); }
.gb-product img { width: 40px; height: 40px; border-radius: var(--r-sm, 8px); object-fit: cover; background: var(--surface-2); flex: 0 0 auto; }
.gb-product-title { font-weight: 600; }
.gb-product-price { opacity: .75; }
.gb-more { font-size: var(--fs-xs); opacity: .75; }

@media (max-width: 640px) {
  .gb-head { align-items: flex-start; }
}

/* Join / showcase actions on a brand card (guuds-brands.html, part 2) */
.gb-actions { margin-top: auto; }
.gb-action-msg { margin: 0; font-size: var(--fs-xs); }
.gb-action-msg:empty { display: none; }
.gb-action-error { color: var(--danger, #b3261e); }

/* Showcase picker dialog */
.gb-picker { width: min(560px, calc(100vw - var(--s-6))); max-height: 85vh; padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg, 16px); background: var(--surface); color: inherit; }
.gb-picker::backdrop { background: rgba(0, 0, 0, .45); }
.gb-picker-inner { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); max-height: 85vh; }
.gb-picker-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); overflow: auto; }
.gb-picker-label { display: flex; align-items: center; gap: var(--s-3); cursor: pointer; }
.gb-picker-text { display: flex; flex-direction: column; min-width: 0; }
.gb-picker-actions { margin-top: var(--s-2); }

/* Account facts at the top of the dashboard's My profile (was auth.html#account). */
.account-facts { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3) var(--s-5); margin: 0 0 var(--s-5); padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--radius, 12px); align-items: baseline; }
.account-facts dt { color: var(--ink-3); font-size: var(--fs-sm); }
.account-facts dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.account-facts-ref { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
@media (max-width: 560px) {
  .account-facts { grid-template-columns: 1fr; gap: var(--s-1); }
  .account-facts dd + dt { margin-top: var(--s-3); }
}
/* Jump links (#profile, #setup, …) land below the sticky header, not under it. */
#amb-dash [id], #amb-account [id] { scroll-margin-top: calc(var(--header-h) + var(--s-4)); }

/* Brand new-bounty: title input + 'Draft it for me' button (audit 1005 S5.3). */
.title-row { display: flex; gap: var(--s-2); align-items: stretch; }
.title-row .input { flex: 1 1 auto; min-width: 0; }
.title-row .btn { flex: 0 0 auto; white-space: nowrap; }
.draft-brief { margin-bottom: var(--s-4); }
@media (max-width: 520px) { .title-row { flex-direction: column; } }

/* Brand webhooks add form + one-time signing secret (brand/dashboard.html#webhooks) */
.webhook-form { display: grid; gap: var(--s-3); margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.webhook-form .h4 { margin: 0; font-size: var(--fs-lg); }
.webhook-form .check-list { margin: 0; }
.webhook-form .alert { margin: 0; }
.webhook-form .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
.webhook-secret { margin-top: var(--s-4); padding: var(--s-4); border: 2px solid var(--butter-ink); border-radius: var(--r-md); background: var(--butter-soft); color: var(--butter-ink); }
.webhook-secret-title { margin: 0; }
.webhook-secret .code-block { margin: var(--s-3) 0; }
.webhook-secret .code-head span { overflow-wrap: anywhere; }
.webhook-secret .code-block pre code { white-space: pre-wrap; word-break: break-all; }
.embed-card .code-block pre code { white-space: pre-wrap; word-break: break-all; }
.embed-preview { margin: var(--s-3) 0; }
.embed-preview iframe { display: block; width: 100%; max-width: 400px; height: 560px; border: 0; border-radius: 16px; background: var(--surface-2, #f4f4f5); }
.embed-export { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin: var(--s-3) 0; }
.embed-export .hint { margin: 0; }
.webhook-secret .hint { color: inherit; opacity: .85; }
/* Per-webhook Deliveries expander: a detail row under each webhook with its delivery log */
.webhook-actions { white-space: nowrap; }
.webhook-actions .link-btn + .link-btn { margin-left: var(--s-3); }
.webhook-expander::after { content: " ▸"; text-decoration: none; display: inline-block; }
.webhook-expander[aria-expanded="true"]::after { content: " ▾"; }
.dash-table tr.webhook-deliveries-row > td { padding-top: 0; background: var(--surface-2, transparent); text-align: left; }
.webhook-deliveries { padding: var(--s-2) 0; }
.webhook-deliveries .dash-empty, .webhook-deliveries .alert { margin: 0; }
.webhook-deliveries-table { font-size: var(--fs-xs); }
.webhook-deliveries-table th, .webhook-deliveries-table td { padding: var(--s-2) var(--s-3); }
.webhook-deliveries-table td:last-child { text-align: left; white-space: nowrap; }
.webhook-deliveries-table .is-ok { color: var(--mint-ink); }
.webhook-deliveries-table .is-fail { color: var(--pink-ink); }
.webhook-delivery-error { max-width: 28ch; overflow-wrap: anywhere; color: var(--ink-2); }

/* "Where your customers are" country multi-select (brand/dashboard.html#settings) */
.countries-form { display: grid; gap: var(--s-3); }
.country-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.country-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 12px; font-size: var(--fs-sm); font-weight: 600; }
.country-chip-x { border: 0; background: none; cursor: pointer; font-size: 1.1em; line-height: 1; padding: 4px 8px; border-radius: 999px; color: inherit; min-width: 32px; min-height: 32px; }
.country-chip-x:hover:not(:disabled) { background: var(--line); }
.country-chip-x:disabled { opacity: .35; cursor: not-allowed; }
.country-list { border: 1px solid var(--line); border-radius: var(--r-md, 12px); margin: 0; padding: var(--s-2); max-height: 240px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px var(--s-3); min-width: 0; }
.country-list[disabled] { opacity: .6; }
.country-opt { display: flex; align-items: center; gap: var(--s-2); padding: 6px 4px; cursor: pointer; min-width: 0; }
.country-opt[hidden] { display: none; }
.country-opt span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Bounty Countries picker (brand/new-campaign.html) — reuses .country-list/.country-opt above */
.campaign-countries { display: grid; gap: var(--s-2); }
.campaign-countries .country-list { max-height: 200px; }
.campaign-countries[aria-invalid="true"] .country-list { border-color: var(--pink-ink); }

/* ---- creator media kit (/u/#<uname>?kit=1, initMediaKit in app.js) ---- */
.mediakit[hidden], .mediakit [hidden] { display: none !important; }
.mediakit-eyebrow { text-align: center; margin: 0; color: var(--lp-ink-2); }
.mediakit-loading { display: grid; justify-items: center; gap: var(--s-3); }
.mediakit-skel-avatar { width: 112px; height: 112px; border-radius: 50%; background: linear-gradient(90deg, var(--surface) 25%, var(--line) 50%, var(--surface) 75%); background-size: 200% 100%; animation: lp-shimmer 1.2s infinite; }
.mediakit-skel-line { width: 70%; height: 28px; }
.mediakit-skel-short { width: 45%; height: 20px; }
.mediakit-header { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: var(--s-8) var(--s-6); }
.mediakit-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); margin: var(--s-4) 0 0; }
.mediakit-fact { min-width: 140px; padding: var(--s-3) var(--s-4); border-radius: var(--r-lg); background: color-mix(in srgb, var(--lp-accent) 12%, #fff); }
.mediakit-fact dt { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.mediakit-fact dd { margin: var(--s-1, 4px) 0 0; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.5rem; color: var(--ink); }
.mediakit-niches { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); }
.mediakit-niche { padding: 4px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--lp-accent) 40%, var(--line)); background: #fff; color: var(--ink); font-size: 0.85rem; font-weight: 600; }
.mediakit-stars { display: block; color: #b07d00; letter-spacing: 1px; white-space: nowrap; }
.mediakit-rating-count { display: block; margin-top: 2px; font-family: inherit; font-size: 0.8rem; font-weight: 500; color: var(--ink-2); }
.mediakit-note { margin: 0; font-size: 0.8rem; color: var(--ink-2); }
.mediakit-socials { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); }
.mediakit-social { display: inline-flex; gap: 6px; align-items: baseline; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; }
.mediakit-social:hover, .mediakit-social:focus-visible { border-color: var(--lp-accent); }
.mediakit-social-handle { font-weight: 500; color: var(--ink-2); }
.mediakit-linkpage { margin: var(--s-3) 0 0; }
.mediakit-linkpage a { color: var(--ink); font-weight: 600; }
.mediakit-notfound { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-8) var(--s-6); }
.mediakit-notfound h1 { margin: 0 0 var(--s-2); color: var(--ink); }
.mediakit-notfound p { color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .mediakit-skel-avatar { animation: none; } }
.mediakit-block { margin-top: var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6); text-align: center; }
.mediakit-block-title { margin: 0 0 var(--s-3); font-size: 1.1rem; color: var(--ink); }
.mediakit-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin: 0 0 var(--s-3); }
.mediakit-stat { padding: var(--s-4); border-radius: var(--r-lg); background: color-mix(in srgb, var(--lp-accent) 12%, #fff); }
.mediakit-stat dt { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.mediakit-stat dd { margin: 4px 0 0; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 2rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.mediakit-empty { margin: 0; color: var(--ink-2); }
.mediakit-brands { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: var(--s-3); }
.mediakit-brand { display: flex; align-items: center; justify-content: center; min-height: 76px; padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.mediakit-brand-logo { max-width: 100%; max-height: 56px; width: auto; height: auto; object-fit: contain; }
.mediakit-brand-fallback { font-family: 'Outfit', sans-serif; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; line-height: 1.2; }
/* P13c: verified posts list + Copy link */
.mediakit-share { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-2); margin: var(--s-4) 0 0; }
.mediakit-share .btn.is-copied { background: var(--lp-accent); border-color: var(--lp-accent); color: var(--ink); }
.mediakit-copy-status { font-size: 0.85rem; color: var(--ink-2); overflow-wrap: anywhere; }
.mediakit-count { font-weight: 500; color: var(--ink-2); }
.mediakit-posts { list-style: none; margin: 0 0 var(--s-3); padding: 0; display: grid; gap: var(--s-2); text-align: left; }
.mediakit-post { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; color: var(--ink); text-decoration: none; min-height: 44px; }
.mediakit-post:hover, .mediakit-post:focus-visible { border-color: var(--lp-accent); }
.mediakit-post-thumb { flex: 0 0 auto; width: 72px; height: 72px; border-radius: var(--r-md, 10px); overflow: hidden; display: grid; place-items: center; background: color-mix(in srgb, var(--lp-accent) 18%, #fff); }
.mediakit-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mediakit-post-thumb-fallback { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.4rem; color: var(--ink); }
.mediakit-post-body { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.mediakit-post-title { font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.mediakit-post-meta { font-size: 0.8rem; color: var(--ink-2); }
.mediakit-post-go { flex: 0 0 auto; color: var(--ink-2); padding-right: var(--s-1, 4px); }
/* P14a: Save star toggle on brand/ambassadors.html rows (brand shortlist) */
.save-star-cell { width: 1%; padding-right: 0; }
.save-star { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); font-size: 1.4rem; line-height: 1; cursor: pointer; transition: color 120ms var(--ease), background 120ms var(--ease); }
.save-star:hover { background: var(--butter-soft); color: var(--butter-ink); }
.save-star:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.save-star[aria-pressed="true"] { color: var(--primary); }
.save-star[aria-busy="true"] { opacity: 0.6; }

/* ---- Phase-10 P14b: brand/ambassadors.html Find / Shortlist tabs ---- */
.amb-tabs { max-width: 420px; }
.amb-tab-count:not(:empty) { display: inline-block; min-width: 1.6em; margin-left: var(--s-1); padding: 0 var(--s-2); border-radius: var(--r-pill); background: var(--surface-2); font-size: var(--fs-xs); }
.shortlist-bulk { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); margin: var(--s-4) 0; }
.shortlist-bulk .campaign-filter { flex: 1 1 240px; }
.shortlist-selected { font-size: var(--fs-sm); color: var(--ink-3); padding-bottom: var(--s-2); }
.shortlist-check { width: 1%; }
.shortlist-check input { width: 20px; height: 20px; cursor: pointer; }
.shortlist-note { width: 100%; min-width: 200px; min-height: 44px; resize: vertical; font: inherit; }
.shortlist-note-status { display: block; min-height: 1.2em; font-size: var(--fs-xs); color: var(--ink-3); }
.shortlist-note-status.is-error { color: var(--pink-ink); }
.shortlist-table tr.is-invited td { opacity: .75; }

/* Phase-10 P14: direct-offer rate fields in the brand/ambassadors.html invite card. */
.offer-fields { border: 1px dashed var(--line); border-radius: var(--radius, 12px); padding: var(--s-3) var(--s-4); margin: var(--s-3) 0; }
.offer-fields legend { font-weight: 600; font-size: var(--fs-sm); padding: 0 var(--s-2); }
.offer-fields .hint { margin: 0 0 var(--s-2); }
.offer-fields .form-row { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.offer-fields .field { margin-bottom: 0; min-width: 0; }
.offer-fields .field[hidden] { display: none; }

/* Niche picker (phase 10 P14) — shared chip selector from assets/js/niche-picker.js.
   Used on dashboard.html#profile; auth.html step 2 reuses it. */
.niche-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-3) 0 var(--s-2); }
.niche-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 var(--fs-sm)/1.2 var(--font-body); cursor: pointer; transition: background .15s, border-color .15s, opacity .15s; }
.niche-chip:hover:not(.is-blocked) { border-color: var(--primary); }
.niche-chip.is-on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-ink); }
.niche-chip.is-on::before { content: "\2713"; font-weight: 700; }
.niche-chip.is-blocked { opacity: .45; cursor: not-allowed; }
.niche-chip-skel { width: 88px; background: var(--surface-2); border-color: transparent; cursor: default; }
.niche-count.is-full { color: var(--primary-ink); }
.niche-count.is-error { color: var(--pink-ink); }
.niche-actions { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .niche-chip { transition: none; } }
/* auth.html signup step 2 niche fieldset (P14 part 1b) */
.setup-niches { border: 0; padding: 0; margin-inline: 0; min-width: 0; }
.setup-niches legend { font-weight: 600; font-size: var(--fs-sm); padding: 0; margin-bottom: var(--s-2); }

/* ---- Campaign report: rate this creator (phase 10 P14) ------------------ */
.dash-table td.cr-rate { min-width: 11rem; text-align: left; }
.cr-rate > .cr-rate-box + .cr-rate-box { margin-top: var(--s-3); }
.cr-rate-box { display: grid; gap: var(--s-2); justify-items: start; }
.cr-rate-form { display: grid; gap: var(--s-2); width: 100%; min-width: 14rem; }
.cr-stars { display: inline-flex; gap: 2px; }
.cr-star { background: none; border: 0; padding: 2px; font-size: 1.375rem; line-height: 1; color: #9a92a8; cursor: pointer; border-radius: var(--r-sm); transition: color 100ms var(--ease), transform 100ms var(--ease); }
.cr-star.on { color: #b07d00; }
.cr-star:hover { transform: scale(1.12); }
.cr-star:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.cr-rate-text { width: 100%; font: inherit; font-size: var(--fs-sm); padding: var(--s-2); border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--surface); resize: vertical; }
.cr-rate-err { margin: 0; font-size: var(--fs-sm); color: var(--pink-ink); }
.cr-rate-err:empty { display: none; }
.cr-rate-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.amb-rating { white-space: nowrap; }
.amb-rating-stars { color: #b07d00; letter-spacing: 1px; }
.cr-stars-saved { color: #b07d00; font-size: var(--fs-lg); letter-spacing: 1px; white-space: nowrap; }
.cr-rate-comment { display: inline-block; max-width: 18rem; white-space: normal; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .cr-star { transition: none; } .cr-star:hover { transform: none; } }

/* Tiered bounty rewards (part 4b): campaign page tier table + the viewer's own rate */
.bounty-tiers { margin-top: var(--s-3); }
.bounty-your-rate { margin: 0 0 var(--s-2); padding: var(--s-2) var(--s-3); border-radius: var(--r-md, 10px); background: var(--butter-soft, var(--surface-2)); font-size: var(--fs-sm); }
.tier-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.tier-table-label { display: block; margin-bottom: var(--s-1, 4px); }
.tier-table th, .tier-table td { padding: var(--s-2); text-align: left; border-bottom: 1px solid var(--line); }
.tier-table th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.tier-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.tier-table tr.is-me td { background: var(--butter-soft, var(--surface-2)); font-weight: 600; }
.tier-table .tier-you { color: var(--lav-ink); font-weight: 700; }
