/* =============================================================
   ourcodefund v2 — focused single-page prototype styles

   Sections:
     0. Tokens + reset
     1. Top navigation bar
     2. Hero
     3. Campaign grid
     4. Modal shell (shared)
     5. Stage 1 — Intake form modal (v2 expanded)
     6. Stage 2 — Refinement modal (locked → unlocked)
     7. Invoice modal (v2 — $3 shown as seeded deposit)
     8. Payment simulation modal
     9. Compliance footer
    10. Toast
    11. Responsive
============================================================= */

/* =============================================================
   v12 THEME SYSTEM
   Pure grayscale in both modes. No accent color, no brand hue.
   The base :root block below holds the dark theme tokens (the v10
   defaults) so pages without a data-theme attribute still render.
   [data-theme="light"] overrides every token to grayscale whites.
   Set data-theme on <html> via the inline boot in nav.js, OR fall
   back to the OS preference if the user has never toggled.
============================================================= */
:root {
  /* DARK (default) — kept from v10 with grayscale scrub. */
  --bg-0:        #0e0f14;
  --bg-1:        #15171f;
  --bg-2:        #1c1f2a;
  --bg-3:        #242836;
  --line:        #2a2e3e;
  --line-soft:   #1f2330;

  --ink-1:       #f1f2f6;   /* strongest text */
  --ink-2:       #b9bcc8;   /* body text */
  --ink-3:       #7d8194;   /* muted */
  --ink-4:       #4f5364;   /* placeholder */

  /* Accent stays grayed out — used by old components.
     Pages that want to keep their old look continue to use these.
     The navbar + theme toggle deliberately do not paint an accent. */
  --accent:      #6b7280;
  --accent-2:    #9ca3af;
  --accent-ink:  #d1d5db;
  --accent-soft: #1f242c;

  --ok:          #19c37d;
  --warn:        #f5b400;
  --danger:      #ff5470;

  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 18px;
  --shadow-1: 0 1px 0 rgba(255,255,255,.03) inset, 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 24px 60px rgba(0,0,0,.5);
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "SF Mono", Consolas, monospace;
}

:root[data-theme="light"] {
  /* LIGHT grayscale — paper white-ish, no warm tint. */
  --bg-0:        #f4f5f7;
  --bg-1:        #ffffff;
  --bg-2:        #e9ebf0;
  --bg-3:        #d9dce4;
  --line:        #c6cad4;
  --line-soft:   #dde0e7;

  --ink-1:       #0e1018;   /* strongest text */
  --ink-2:       #3c4050;   /* body text */
  --ink-3:       #6a6e7c;   /* muted */
  --ink-4:       #959aa8;   /* placeholder */

  --accent:      #4b5161;
  --accent-2:    #6b7280;
  --accent-ink:  #1a1d27;
  --accent-soft: #d9dce4;

  --shadow-1: 0 1px 0 rgba(255,255,255,.6) inset, 0 1px 2px rgba(20,22,32,.07);
  --shadow-2: 0 18px 50px rgba(20,22,32,.12);
}

/* Pages that ship their own hardcoded rgba(255,255,255,*) backgrounds
   are still readable against both themes because the foreground ink-1
   is the dominant text color. The v11 page-specific <style> blocks
   fallback with var() defaults where available. The few hardcoded
   rgba whites in those legacy blocks are overridden globally by the
   rules below so neither theme shows a transparent-white card on a
   similarly-colored background. */
:root[data-theme="light"] .proj-msg,
:root[data-theme="light"] .acct-row,
:root[data-theme="light"] .acct-contrib-row,
:root[data-theme="light"] .lib-card,
:root[data-theme="light"] .acct-wallet {
  /* Cards get a solid white surface and a dark text default in light. */
  background: var(--bg-1);
  border-color: var(--line-soft);
  color: var(--ink-2);
}
:root[data-theme="light"] .proj-back-link:hover { color: var(--ink-1); }

:root[data-theme="light"] .v11-disclaimer,
:root[data-theme="light"] .acct-wallet {
  background: var(--bg-2);
  border-color: var(--line);
}

/* Smooth theme switch on the things users notice first. */
html, body, .navbar, .footer, .proj-msg, .acct-row, .acct-contrib-row,
.lib-card, .card, .acct-wallet, .modal, .doc-body, .toast, .nav-toast {
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

/* =============================================================
   v12 NAV.THEME TOGGLE BUTTON
   Square icon button at the right edge of the nav. Pure grayscale.
============================================================= */
.nav-theme {
  margin-left: 6px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-2);
  color: var(--ink-1);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 16px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.nav-theme:hover {
  background: var(--bg-3);
  border-color: var(--line);
}
.nav-theme:active { transform: translateY(1px); }
.nav-theme-icon {
  line-height: 1;
  display: inline-block;
  font-family: var(--font-mono);
}

/* Nav-toast (used by nav.js on pages without app.js) */
.nav-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  padding: 10px 16px;
  background: var(--bg-2);
  color: var(--ink-1);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  box-shadow: var(--shadow-2);
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  transition: opacity .22s ease, transform .22s ease;
}
.nav-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* Light mode: a subtle hairline separator between sticky nav and page */
:root[data-theme="light"] .navbar {
  background: rgba(244,245,247,.92);
}
:root .navbar { /* dark default */
  background: rgba(14,15,20,.85);
}

/* ---------- 0. Tokens (kept here as the v11 base — overridden
   above for both themes; the section header kept for context). ---------- */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  background: var(--bg-0);
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, legend { color: var(--ink-1); margin: 0; font-weight: 600; letter-spacing: -.01em; }
.muted { color: var(--ink-3); font-size: 13px; }

/* =============================================================
   1. TOP NAVIGATION BAR
============================================================= */
.navbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10,11,16,.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; gap: 24px;
}
.nav-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink-1); }
/* v2: on the home page the brand wordmark acts as the page title —
   muted and non-clickable. Visually softer than the active link list. */
.nav-logo-current { color: var(--ink-2); cursor: default; opacity: .85; }
.nav-logo-current:hover { color: var(--ink-2); }
.nav-logo-trigger { cursor: pointer; }
.nav-logo-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }

/* v2: minimal shell page layout for placeholder pages (library,
   ourswarms, faq, account, login) before their real content lands. */
.shell-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}
.shell-inner {
  max-width: 720px;
}
.shell-inner h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.06;
  letter-spacing: -.02em;
  margin: 8px 0 12px;
  color: var(--ink-1);
}
.shell-inner p {
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.55;
}
.logo-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset, 0 4px 16px rgba(124,92,255,.4);
}
.logo-mark-sm { width: 18px; height: 18px; border-radius: 5px; }
.logo-name { letter-spacing: -.01em; }
.nav-links { display: flex; gap: 18px; margin-left: 8px; }
.nav-login-link {
  margin-left: 4px;
  font-weight: 600;
  color: var(--ink-1);
}
.nav-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nav-link {
  color: var(--ink-2); font-size: 13.5px; padding: 6px 4px;
  transition: color .15s;
}
.nav-link:hover { color: var(--ink-1); }
/* v2: active link in the nav is brighter and underlined — this is
   the page-title indicator now that the brand is the home identity. */
.nav-link.is-active {
  color: var(--ink-1);
  font-weight: 600;
  box-shadow: inset 0 -1px 0 0 var(--accent);
}
.nav-login {
  margin-left: auto;
  padding: 8px 16px;
  background: var(--bg-2); color: var(--ink-1);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  transition: background .15s, border-color .15s;
}
.nav-login:hover {
  background: var(--bg-3); border-color: var(--accent); color: var(--accent-ink);
}

/* =============================================================
   2. HERO
============================================================= */
.hero {
  position: relative;
  padding: 80px 24px 72px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(900px 380px at 50% -10%, rgba(124,92,255,.18), transparent 60%),
    radial-gradient(700px 320px at 80% 20%, rgba(183,148,255,.10), transparent 65%),
    var(--bg-0);
}
.hero-inner { max-width: 720px; margin: 0 auto; position: relative; }
.hero-title {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.03em;
  margin: 0 0 18px;
  color: var(--ink-1);
}
.grad {
  /* v12: pure grayscale gradient. The old purple→yellow is gone. */
  background: linear-gradient(120deg, var(--ink-1) 0%, var(--ink-2) 60%, var(--ink-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 17px;
  color: var(--ink-2);
}
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  font-weight: 600; font-size: 16px;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 12px 30px rgba(124,92,255,.35), 0 1px 0 rgba(255,255,255,.15) inset;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.cta:hover {
  background: #6a4dee;
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(124,92,255,.45), 0 1px 0 rgba(255,255,255,.18) inset;
}
.cta:active { transform: translateY(0); }
.cta-arrow, .btn-arrow { font-size: 16px; transition: transform .15s; }
.cta:hover .cta-arrow { transform: translateX(2px); }
.hero-note {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--ink-3);
  font-family: var(--font-mono);
}

/* v04 — benevolent slogan rotator above the CTA.
   Layout-shift fix: the stage is a fixed-height container and
   each slogan span is absolutely-positioned so swapping text
   never changes the document height. */
.hero-rotator {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px;             /* fixed: tallest slogan fits */
  margin: 0 auto 14px;
  padding: 0 4px;
  max-width: 640px;
  overflow: hidden;
}
.hero-rotator-stage {
  position: relative;
  display: inline-block;
  height: 100%;
  width: 100%;
  text-align: center;
}
.hero-rotator-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-block;
  width: 100%;
  font-size: 14px;
  letter-spacing: .01em;
  color: var(--accent-ink);
  font-weight: 500;
  font-style: italic;
  /* Allow wrap as a safety net so a wider slogan never overflows the
     640px rotator on tiny viewports. */
  white-space: normal;
  transition: opacity .35s ease, transform .35s ease;
  opacity: 0;
  pointer-events: none;
}
.hero-rotator-text.is-current {
  opacity: 1;
  pointer-events: auto;
}

/* v03 — row holding primary + secondary CTA buttons */
.hero-ctas {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* v03 — secondary CTA: same shape as primary but quieter */
.cta-secondary {
  background: var(--bg-2);
  color: var(--ink-1);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  padding: 16px 22px;
}
.cta-secondary:hover {
  background: var(--bg-3);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 18px rgba(124,92,255,.15), 0 1px 0 rgba(255,255,255,.10) inset;
}

/* =============================================================
   3. CAMPAIGN GRID
============================================================= */
.campaigns {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}
.campaigns-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.campaigns-head h2 { font-size: 18px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* v04 — single-card layout: stretch to fill, give the lone card more weight */
.card-grid-single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 720px;
  margin: 0 auto;
}
.card-single {
  padding: 26px;
}
.card-single .card-title { font-size: 19px; }
.card-single .card-sub {
  min-height: 0;
  font-size: 14px;
  margin-bottom: 22px;
}
.card-single .bar { height: 10px; margin-bottom: 12px; }
.card-single .bar-meta { font-size: 13px; margin-bottom: 18px; }

.card-link {
  display: flex;
  flex-direction: column;
  gap: 0;
  color: inherit;
  text-decoration: none;
  /* The whole card is the click target */
  cursor: pointer;
}
.card-link:hover .card-title { color: var(--accent-ink); }
.card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--r-md);
}
.card-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.card-cta-hint {
  font-size: 12px;
  color: var(--ink-3);
}
.card-cta-arrow {
  font-size: 18px;
  color: var(--accent);
  transition: transform .15s;
}
.card-link:hover .card-cta-arrow {
  transform: translateX(4px);
}
.card {
  display: flex; flex-direction: column;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-1);
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--line); transform: translateY(-2px); }
.card-title { font-size: 16px; color: var(--ink-1); margin-bottom: 6px; }
.card-sub {
  font-size: 13px; color: var(--ink-3);
  margin-bottom: 18px; min-height: 40px;
}
.bar {
  height: 8px;
  background: var(--bg-3);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  transition: width .6s cubic-bezier(.2,.8,.3,1.2);
}
.bar-meta {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--ink-3);
  margin-bottom: 18px;
  font-variant-numeric: tabular-nums;
}
.bar-meta b { color: var(--ink-1); font-weight: 600; }

/* v03 — transparent attribution line on each campaign card */
.attribution {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
}
.attribution-label { color: var(--ink-3); }
.attribution-name { color: var(--ink-1); font-weight: 600; }
.attribution-tag {
  margin-left: auto;
  padding: 2px 7px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.attribution-tag-human {
  color: var(--ink-2);
  background: var(--bg-1);
  border-color: var(--line);
}
.attribution-tag-agent {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: rgba(124,92,255,.4);
}

/* =============================================================
   Buttons (shared)
============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  font-weight: 600; font-size: 13.5px;
  border: 1px solid transparent;
  transition: background .15s, transform .1s, border-color .15s, opacity .15s;
}
.btn-sm { padding: 8px 12px; font-size: 12.5px; }
.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 6px 18px rgba(124,92,255,.22), 0 1px 0 rgba(255,255,255,.08) inset;
}
.btn-primary:hover { background: #6a4dee; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled {
  background: var(--bg-3);
  color: var(--ink-4);
  cursor: not-allowed;
  box-shadow: none;
}
.btn-ghost {
  background: var(--bg-2);
  border-color: var(--line-soft);
  color: var(--ink-1);
}
.btn-ghost:hover { background: var(--bg-3); }

/* =============================================================
   4. MODAL SHELL
============================================================= */
.shroud {
  position: fixed; inset: 0;
  background: rgba(5,6,10,.72);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 60;
  padding: 20px;
  animation: fade .2s ease;
}
.shroud[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-2);
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: min(92vh, 760px);
  animation: pop .25s cubic-bezier(.2,.8,.3,1.2);
}
@keyframes pop {
  from { transform: translateY(20px) scale(.97); opacity: 0; }
  to   { transform: translateY(0)    scale(1);   opacity: 1; }
}

.modal-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
  gap: 12px;
}
.modal-head h3 { font-size: 16px; }
.modal-sub { font-size: 12px; color: var(--ink-3); margin: 4px 0 0; }
.x {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  color: var(--ink-3);
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}
.x:hover { background: var(--bg-2); color: var(--ink-1); }

.modal-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-1);
}

.stage-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 8px;
  background: var(--accent-soft);
  border: 1px solid rgba(124,92,255,.25);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent-ink);
  margin-bottom: 10px;
}
.stage-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-3);
}
.stage-dot-active {
  background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .6; transform: scale(.85); }
}

/* =============================================================
   5. STAGE 1 — INTAKE FORM MODAL (v2 expanded)
============================================================= */
.modal-form { max-width: 600px; }
.form-body {
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.field {
  display: flex; flex-direction: column; gap: 6px;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.field legend, .field > label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-1);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 0;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink-1);
  outline: none;
  transition: border-color .15s, background .15s;
  font-family: inherit;
}
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  background: var(--bg-1);
}
.field-hint { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }

/* ----- radio-card grid ----- */
.radio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.radio-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}
.radio-card:hover { border-color: var(--line); background: var(--bg-3); }
.radio-card input {
  position: absolute; opacity: 0; pointer-events: none;
}
.radio-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-0);
  transition: color .15s, border-color .15s, background .15s;
}
.radio-text { display: flex; flex-direction: column; gap: 1px; }
.radio-text b { color: var(--ink-1); font-size: 13px; font-weight: 600; letter-spacing: -.005em; }
.radio-text i { color: var(--ink-3); font-style: normal; font-size: 11.5px; }
.radio-card:has(input:checked) {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft), var(--bg-2));
  box-shadow: 0 0 0 1px var(--accent) inset, 0 4px 14px rgba(124,92,255,.18);
}
.radio-card:has(input:checked) .radio-icon {
  color: var(--accent-ink);
  border-color: var(--accent);
  background: var(--bg-1);
}

/* ----- native select, styled ----- */
.select-wrap { position: relative; }
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  cursor: pointer;
}
.select-wrap select option {
  background: var(--bg-1);
  color: var(--ink-1);
}
.select-caret {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--ink-3);
  font-size: 12px;
}

/* The big "Deposit $1 Escrow & Finalize with AI" submit button */
.btn-deposit {
  padding: 11px 16px;
  font-size: 13.5px;
}
.deposit-coin {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: white;
  border: 1px solid rgba(255,255,255,.25);
}

/* =============================================================
   6. STAGE 2 — REFINEMENT MODAL (locked → unlocked)
============================================================= */
.modal-refine { max-width: 880px; }
.refine-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.refine-inputs {
  background: var(--bg-2);
  border-right: 1px solid var(--line-soft);
  padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
}
.refine-section { display: flex; flex-direction: column; gap: 3px; }
.refine-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
  font-weight: 600;
}
.refine-val {
  font-size: 13px;
  color: var(--ink-1);
  line-height: 1.45;
  word-break: break-word;
}
#editBtn { margin-top: auto; align-self: flex-start; }

.llm { display: flex; flex-direction: column; min-height: 0; }
.llm-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.llm-meta { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.llm-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink-3);
  transition: background .3s, box-shadow .3s;
}
.llm-dot.is-live {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}
.llm-name { color: var(--ink-1); font-weight: 600; }
.llm-status {
  color: var(--warn);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 10.5px;
}
.llm-status.is-done { color: var(--ok); }
.llm-status.is-locked { color: var(--ink-3); }
.llm-stats { display: flex; gap: 14px; color: var(--ink-3); }
.llm-stats b { color: var(--ink-1); font-weight: 500; }

.llm-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background:
    radial-gradient(700px 260px at 50% -10%, rgba(124,92,255,.06), transparent 60%),
    var(--bg-1);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-1);
  white-space: pre-wrap;
}
.llm-cursor {
  display: inline-block;
  width: 7px; height: 14px;
  background: var(--accent-2);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* LOCKED state — paywall inside the LLM body */
.locked-wall {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  height: 100%;
  padding: 40px 20px;
  gap: 14px;
}
.locked-wall .lock-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.locked-wall .lock-title {
  color: var(--ink-1);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
}
.locked-wall .lock-sub {
  color: var(--ink-3);
  font-family: var(--font-ui);
  font-size: 13px;
  max-width: 320px;
  line-height: 1.5;
}
.locked-wall .lock-amt {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
}
.locked-wall .lock-amt b { color: var(--accent-ink); }

.llm-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-1);
}

/* =============================================================
   7. INVOICE MODAL (v2 — $3 shown as seeded deposit)
============================================================= */
.modal-invoice { max-width: 640px; }
.invoice-body { padding: 20px; overflow-y: auto; }

.blueprint {
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  margin-bottom: 18px;
}
.blueprint-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.blueprint-text {
  color: var(--ink-1);
  font-size: 14px;
  line-height: 1.45;
}
.blueprint-text em {
  font-style: normal;
  color: var(--accent-ink);
}

.lines { display: flex; flex-direction: column; }
.line {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.line:last-child { border-bottom: 0; }
.line-title {
  color: var(--ink-1);
  font-size: 14px;
  font-weight: 500;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.muted-inline { color: var(--ink-3); font-weight: 400; font-size: 12px; }
.line-sub { color: var(--ink-3); font-size: 12px; margin-top: 3px; }
.line-amt {
  color: var(--ink-1);
  font-weight: 600;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: flex; align-items: center; gap: 4px;
}

.badge-done {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: rgba(25,195,125,.10);
  color: var(--ok);
  border: 1px solid rgba(25,195,125,.25);
  border-radius: 999px;
}
.line-deposited .line-amt { color: var(--ok); }

.line-editable .line-amt {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 4px 8px;
}
.line-editable .line-amt input {
  width: 60px;
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  color: inherit;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.line-toggle { grid-template-columns: 1fr auto auto; }
.switch { position: relative; width: 38px; height: 22px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background .2s, border-color .2s;
}
.switch-slider::before {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  left: 2px; top: 2px;
  background: var(--ink-2);
  border-radius: 50%;
  transition: transform .2s, background .2s;
}
.switch input:checked + .switch-slider {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.switch input:checked + .switch-slider::before {
  transform: translateX(16px);
  background: var(--accent-2);
}
.line-toggle .line-amt {
  min-width: 64px; justify-content: flex-end;
  transition: color .2s;
}
.line-toggle.is-on .line-amt { color: var(--accent-2); }

.grand {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 16px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--line);
}
.grand span {
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 12px;
  font-weight: 600;
}
.grand b {
  color: var(--ink-1);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.fine {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
}

/* =============================================================
   8. PAYMENT SIMULATION MODAL
============================================================= */
.modal-pay { max-width: 360px; }
.pay-body {
  padding: 36px 24px 32px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.pay-spinner {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 3px solid var(--bg-3);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  margin-bottom: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pay-title { font-size: 15px; }
.pay-sub { font-size: 12.5px; color: var(--ink-3); margin: 0; }
.pay-success {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--ok);
  color: #042418;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
  font-size: 26px;
  margin-bottom: 6px;
  animation: popSuccess .35s cubic-bezier(.2,.8,.3,1.4);
}
@keyframes popSuccess {
  from { transform: scale(.4); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* =============================================================
   9. COMPLIANCE FOOTER
============================================================= */
.footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-1);
  margin-top: 40px;
}
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 22px 24px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
}
.footer-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.footer-name { color: var(--ink-1); font-weight: 600; }
.footer-links { display: inline-flex; align-items: center; gap: 10px; }
.footer-link {
  color: var(--ink-3); font-size: 12.5px;
  transition: color .15s;
}
.footer-link:hover { color: var(--accent-ink); }
.footer-sep { color: var(--ink-4); font-size: 11px; }
.footer-meta { font-size: 11.5px; color: var(--ink-4); }

/* =============================================================
   10. TOAST
============================================================= */
.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-2);
  color: var(--ink-1);
  font-size: 13px;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: transform .25s cubic-bezier(.2,.8,.3,1.2), opacity .25s;
}
.toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast[hidden] { display: none; }
.toast-orb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ok);
  color: #042418;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px;
}

/* =============================================================
   11. v03 — AI AGENT API MODAL (Bot-to-Bot Protocol)
============================================================= */
.modal-api { max-width: 720px; }

.api-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 8px;
  background: var(--accent-soft);
  border: 1px solid rgba(124,92,255,.30);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent-ink);
  margin-bottom: 10px;
}
.api-tag-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}

.api-body {
  padding: 18px 20px 20px;
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.api-lede {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.55;
}

.api-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.api-compare-cell {
  padding: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-align: center;
}
.api-compare-cell-agent {
  border-color: rgba(124,92,255,.45);
  background:
    linear-gradient(180deg, rgba(124,92,255,.10), var(--bg-2)),
    var(--bg-2);
}
.api-compare-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.api-compare-amt {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}
.api-compare-cell-agent .api-compare-amt { color: var(--accent-2); }
.api-compare-sub {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.4;
}

.api-h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .10em;
  color: var(--ink-3);
  margin: 4px 0 -6px;
}
.api-code {
  margin: 0;
  padding: 12px 14px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-1);
  white-space: pre;
  overflow-x: auto;
}
.api-code code { font: inherit; color: inherit; }

.api-note {
  margin: 4px 0 0;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
}
.api-link {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-color: rgba(124,92,255,.4);
  text-underline-offset: 2px;
}
.api-link:hover { color: var(--accent-2); }

/* =============================================================
   12. v03 — DOCS MODAL (User Agreement, Legal Disclaimer, Dev Docs)
============================================================= */
.modal-doc { max-width: 720px; }
.doc-tag {
  display: inline-block;
  padding: 4px 10px;
  margin-bottom: 10px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
}
.doc-body {
  padding: 18px 22px 22px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.65;
}
.doc-section {
  margin: 0 0 18px;
}
.doc-section:last-child { margin-bottom: 0; }
.doc-h {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-1);
  letter-spacing: -.005em;
  margin: 0 0 6px;
}
.doc-p {
  margin: 0;
  color: var(--ink-2);
}

/* =============================================================
   13. RESPONSIVE
============================================================= */
@media (max-width: 880px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .refine-body { grid-template-columns: 1fr; }
  .refine-inputs { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .radio-grid { grid-template-columns: 1fr; }
  .api-compare { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .navbar { padding: 0; }
  .nav-inner { padding: 10px 14px; gap: 12px; }
  .nav-links { gap: 12px; }
  .nav-login { padding: 7px 12px; font-size: 12.5px; }
  .hero { padding: 56px 18px 56px; }
  .hero-ctas { width: 100%; }
  .hero-ctas .cta { flex: 1 1 auto; justify-content: center; }
  .campaigns { padding: 18px 16px 40px; }
  .card-grid { grid-template-columns: 1fr; }
  .campaigns-head { flex-direction: column; gap: 4px; align-items: flex-start; }
  .modal { max-height: 100vh; height: 100vh; border-radius: 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; }
  .line-toggle { grid-template-columns: 1fr auto; }
  .line-toggle .line-amt { grid-column: 2; grid-row: 1; }
  .attribution { font-size: 10.5px; }
}


/* =============================================================
   v05 ADDITIONS
   - Marketing screen (16:9 hero placeholder)
   - Shrunk hero rotator
   - Library / Completed tools cards
   - Product page (detail)
   - Backer profile
   - Search results
   - FAQ on index
   - Tip-the-platform line in pledge modal
   ============================================================= */

/* ---------- Hero rotator — shrunk (v05) ---------- */
.hero-rotator { min-height: 28px; font-size: 15px; }
.hero-rotator-text { font-size: 15px; }

/* ---------- Marketing screen (16:9 placeholder) ---------- */
.marketing-screen {
  display: block;
  max-width: 1180px;
  margin: 0 auto 36px;
  padding: 0 24px;
}
.marketing-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 20% 10%, rgba(140,120,255,0.18), transparent 60%),
    radial-gradient(120% 80% at 80% 90%, rgba(0,200,180,0.12), transparent 60%),
    linear-gradient(160deg, #0e0f14 0%, #14161e 100%);
  border: 1px solid var(--line-soft);
  box-shadow: 0 18px 40px -20px rgba(0,0,0,0.55);
  cursor: pointer;
  transition: transform 200ms ease;
}
.marketing-frame:hover { transform: translateY(-2px); }
.marketing-frame::after {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 60px);
  pointer-events: none;
}
.marketing-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 92px; height: 92px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.4), 0 14px 40px rgba(0,0,0,0.5);
  transition: transform 200ms ease, background 200ms ease;
}
.marketing-frame:hover .marketing-play { transform: translate(-50%, -50%) scale(1.06); background: #fff; }
.marketing-play svg { width: 36px; height: 36px; fill: #0e0f14; margin-left: 4px; }
.marketing-caption {
  position: absolute; left: 22px; bottom: 18px;
  display: flex; flex-direction: column; gap: 4px;
  color: rgba(255,255,255,0.85);
  font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
}
.marketing-caption strong { font-size: 18px; letter-spacing: 0; text-transform: none; color: #fff; }
.marketing-runtime {
  position: absolute; right: 18px; bottom: 18px;
  background: rgba(0,0,0,0.55); color: #fff;
  padding: 4px 8px; border-radius: 6px; font-size: 12px; font-weight: 600;
}

/* ---------- FAQ on index (standalone, does not depend on campaign.css) ---------- */
.index-faq {
  max-width: 880px; margin: 60px auto 0; padding: 0 24px;
}
.index-faq h2 { font-size: 22px; margin: 0 0 16px; }
.index-faq-list { display: flex; flex-direction: column; }
.index-faq-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.index-faq-item:last-child { border-bottom: 0; }
.index-faq-q {
  font-size: 14.5px; font-weight: 600;
  color: var(--ink-1); margin: 0 0 6px;
}
.index-faq-a { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }

/* ---------- Generic page header (library, product, backer, search) ---------- */
.page-header {
  max-width: 1180px; margin: 0 auto;
  padding: 56px 24px 28px;
}
.page-header h1 {
  font-size: 34px; margin: 0 0 10px; letter-spacing: -0.01em;
}
.page-header p {
  margin: 0; font-size: 15px; color: var(--ink-2); max-width: 640px;
}
.page-eyebrow {
  display: inline-block;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 12px;
}

/* ---------- Completed Library cards ---------- */
.library-grid-wrap {
  max-width: 1180px; margin: 0 auto; padding: 0 24px 60px;
}
.library-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.lib-card {
  display: block;
  background: var(--surface-1);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 22px;
  aspect-ratio: 1 / 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  text-decoration: none; color: inherit;
  transition: transform 160ms ease, border-color 160ms ease;
}
.lib-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-2);
}
.lib-card h3 { font-size: 16px; margin: 0 0 6px; }
.lib-card p  { font-size: 13px; color: var(--ink-2); margin: 0 0 14px; line-height: 1.5; }
.lib-card-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--ink-3);
  margin-top: auto;
}
.lib-card-meta b { color: var(--ink-1); font-weight: 600; }
.lib-card-tag {
  display: inline-block;
  font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(80, 200, 120, 0.12);
  color: rgb(80, 200, 120);
  margin-bottom: 12px;
}

/* ---------- Product detail page ---------- */
.product-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px 80px; }
.product-hero {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px;
  margin-top: 8px;
}
.product-art {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 16px; overflow: hidden;
  background:
    radial-gradient(120% 80% at 30% 30%, rgba(140,120,255,0.22), transparent 60%),
    radial-gradient(120% 80% at 70% 70%, rgba(0,200,180,0.18), transparent 60%),
    linear-gradient(160deg, #14161e 0%, #0e0f14 100%);
  border: 1px solid var(--line-soft);
}
.product-side { display: flex; flex-direction: column; gap: 16px; }
.product-title { font-size: 28px; margin: 0; letter-spacing: -0.01em; }
.product-sub   { margin: 4px 0 0; color: var(--ink-2); font-size: 14.5px; }
.download-card {
  background: var(--surface-1);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 22px;
}
.download-card h3 { margin: 0 0 6px; font-size: 16px; }
.download-card p  { margin: 0 0 16px; color: var(--ink-2); font-size: 13px; }
.download-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-top: 1px solid var(--line-soft);
}
.download-row:first-of-type { border-top: 0; padding-top: 0; }
.download-row .label { font-size: 13px; color: var(--ink-2); }
.download-row .size  { font-size: 12px; color: var(--ink-3); }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; }
.btn-bypass {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #ffd166, #f59f00);
  color: #1a1300;
  border: 0;
  padding: 9px 14px;
  font-size: 13px; font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 120ms ease;
}
.btn-bypass:hover { transform: translateY(-1px); }
.btn-fund-v2 {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  border: 0;
  padding: 12px 18px;
  font-size: 14px; font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 120ms ease;
}
.btn-fund-v2:hover { transform: translateY(-1px); }
.product-section { margin-top: 40px; }
.product-section h2 {
  font-size: 18px; margin: 0 0 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line-soft);
}
.product-section p, .product-section li {
  font-size: 13.5px; color: var(--ink-2); line-height: 1.6;
}
.product-section ul { padding-left: 18px; }
.doc-block {
  background: var(--surface-1);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 12px;
}
.doc-block h4 { margin: 0 0 6px; font-size: 14px; }
.doc-block p, .doc-block li { font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.source-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--accent-ink);
  text-decoration: none;
  padding: 8px 12px; border: 1px solid var(--line-soft); border-radius: 8px;
}
.source-link:hover { border-color: var(--accent-2); }
.fund-cta {
  margin-top: 32px;
  padding: 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(140,120,255,0.10), rgba(0,200,180,0.06));
  border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.fund-cta-text strong { display: block; font-size: 16px; margin-bottom: 4px; }
.fund-cta-text span  { font-size: 13px; color: var(--ink-2); }

/* ---------- Backer profile ---------- */
.backer-wrap { max-width: 880px; margin: 0 auto; padding: 0 24px 80px; }
.backer-head {
  display: flex; align-items: center; gap: 18px;
  padding: 24px;
  background: var(--surface-1);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
}
.backer-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-ink));
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.backer-handle { font-size: 22px; margin: 0; font-weight: 700; }
.backer-meta   { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.backer-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 24px 0;
}
.backer-stat {
  background: var(--surface-1);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.backer-stat .v { font-size: 20px; font-weight: 700; }
.backer-stat .l { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; letter-spacing: 0.04em; text-transform: uppercase; }
.backer-history { margin-top: 24px; }
.backer-history h2 { font-size: 18px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-table th, .history-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.history-table th {
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.history-table td.amount { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.history-table tr.tool-row td:first-child a { color: var(--accent-ink); text-decoration: none; font-weight: 600; }
.history-table tr.tool-row td:first-child a:hover { text-decoration: underline; }

/* ---------- Search results ---------- */
.search-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px 80px; }
.search-summary {
  font-size: 13px; color: var(--ink-3); margin-bottom: 20px;
}
.search-summary b { color: var(--ink-1); }
.search-filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.search-chip {
  background: var(--surface-1);
  border: 1px solid var(--line-soft);
  color: var(--ink-2);
  padding: 6px 12px;
  font-size: 12px; font-weight: 500;
  border-radius: 999px;
  cursor: pointer;
}
.search-chip.is-active {
  background: var(--accent-ink); color: #fff; border-color: var(--accent-ink);
}
.search-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.search-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  aspect-ratio: 1 / 1;
  min-height: 0;
  background: var(--surface-1);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  text-decoration: none; color: inherit;
  align-items: center;
  transition: transform 160ms ease, border-color 160ms ease;
}
.search-row:hover { transform: translateY(-2px); border-color: var(--accent-2); }
.search-row .kind {
  font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.search-row h3 { margin: 0 0 4px; font-size: 15px; }
.search-row p  { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.search-row .amount {
  margin-top: auto;
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--ink-1);
}
.search-row .amount small { display: block; font-size: 11px; font-weight: 500; color: var(--ink-3); margin-top: 2px; }
.search-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-3);
  font-size: 14px;
}

/* ---------- Pledge modal — Tip the Platform (v05) ---------- */
.back-form-tipline {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  margin-top: 10px;
  background: rgba(255, 209, 102, 0.06);
  border: 1px dashed rgba(255, 209, 102, 0.4);
  border-radius: 10px;
  gap: 12px;
}
.back-form-tipline .tipline-text {
  font-size: 12.5px; color: var(--ink-2);
}
.back-form-tipline .tipline-text b { color: var(--ink-1); }
.back-form-tipline .tipline-amt {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-1); font-weight: 600;
}
.back-form-tipline select {
  background: var(--surface-1);
  color: var(--ink-1);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  font-family: inherit;
}
.back-form-summary-row.tipline-row { color: var(--ink-2); font-size: 12.5px; }
.back-form-summary-row.tipline-row b { color: var(--ink-1); }
.back-form-fine {
  font-size: 11px; color: var(--ink-3);
  margin-top: 8px; line-height: 1.5;
}

/* ---------- Responsive (v05 additions) ---------- */
@media (max-width: 880px) {
  .library-grid, .search-list { grid-template-columns: 1fr 1fr; }
  .product-hero { grid-template-columns: 1fr; }
  .backer-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .library-grid, .search-list { grid-template-columns: 1fr; }
  .marketing-frame { border-radius: 12px; }
  .marketing-play { width: 64px; height: 64px; }
  .marketing-play svg { width: 26px; height: 26px; }
  .product-title { font-size: 22px; }
  .fund-cta { flex-direction: column; align-items: stretch; }
}

/* =============================================================
   v06 ADDITIONS — start here
   ============================================================= */

/* ---------- v06: nav Donate to Platform button ---------- */
.nav-donate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  margin-left: 10px;
  background: rgba(255, 209, 102, 0.10);
  color: var(--ink-1);
  border: 1px solid rgba(255, 209, 102, 0.4);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.nav-donate:hover {
  background: rgba(255, 209, 102, 0.18);
  border-color: rgba(255, 209, 102, 0.7);
}
.nav-donate:active { transform: translateY(1px); }
.nav-donate-orb {
  color: #d8a93d;
  font-size: 13px;
  line-height: 1;
}

/* ---------- v06: pristine 16:9 marketing frame ---------- */
.marketing-frame-pristine {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.04));
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  overflow: hidden;
  cursor: default;
  text-decoration: none;
}
.marketing-frame-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  opacity: 0.5;
}
.marketing-frame-corner {
  position: absolute;
  width: 14px; height: 14px;
  border-color: rgba(255, 255, 255, 0.45);
  border-style: solid;
  border-width: 0;
}
.marketing-frame-corner-tl { top: 10px; left: 10px;  border-top-width: 2px; border-left-width: 2px; }
.marketing-frame-corner-tr { top: 10px; right: 10px; border-top-width: 2px; border-right-width: 2px; }
.marketing-frame-corner-bl { bottom: 10px; left: 10px;  border-bottom-width: 2px; border-left-width: 2px; }
.marketing-frame-corner-br { bottom: 10px; right: 10px; border-bottom-width: 2px; border-right-width: 2px; }
.marketing-frame-tag {
  position: absolute;
  top: 12px; left: 50%; transform: translateX(-50%);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}

/* ---------- v06: unified doc modal tab bar ---------- */
.modal-doc-unified { max-width: 720px; }
.doc-tabs {
  display: flex;
  gap: 4px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 0;
}
.doc-tab {
  background: transparent;
  border: 0;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.doc-tab:hover { color: var(--ink-2); }
.doc-tab.is-active {
  color: var(--ink-1);
  border-bottom-color: var(--brand, #5b8cff);
}

/* ---------- v06: donate modal ---------- */
.modal-donate { max-width: 520px; }
.donate-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d8a93d;
  font-weight: 700;
}
.donate-tag-orb { font-size: 12px; }
.donate-body {
  padding: 4px 22px 18px;
}
.donate-lede {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0 0 16px;
}
.donate-tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.donate-tier {
  flex: 0 1 auto;
  min-width: 64px;
  padding: 9px 12px;
  background: var(--surface-1);
  color: var(--ink-1);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.donate-tier:hover { border-color: var(--ink-3); }
.donate-tier.is-selected {
  background: rgba(91, 140, 255, 0.10);
  border-color: var(--brand, #5b8cff);
  color: var(--brand, #5b8cff);
}
.donate-tier-custom {
  flex: 1 1 100px;
  min-width: 0;
}
.donate-tier-custom input {
  width: 70px;
  background: transparent;
  border: 0;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-1);
}
.donate-summary {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.donate-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-2);
}
.donate-summary-row b { color: var(--ink-1); font-size: 15px; }
.donate-fine {
  font-size: 11px;
  color: var(--ink-3);
  margin: 8px 0 0;
  line-height: 1.5;
}

/* v10: donate gate panel — shown for Tier 1 (no auth) and Tier 2
   (no funds). Tier 3 hides it and shows the normal donate flow. */
[hidden] { display: none !important; }
.donate-gate {
  padding: 18px 22px 4px;
}
.donate-gate-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 18px 14px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg, 12px);
}
.donate-gate-icon {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 2px;
}
.donate-gate-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-1);
  margin: 0;
}
.donate-gate-body {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
  max-width: 420px;
}
.donate-gate-fine {
  font-size: 11px;
  color: var(--ink-3);
  margin: 4px 0 8px;
  line-height: 1.5;
}
.donate-gate-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  margin-top: 4px;
}
.donate-gate-cta .btn {
  width: 100%;
  justify-content: center;
}

/* v10: library download gate. Shares the donate-gate visual
   language but in a dedicated shroud for clarity. */
.modal-lib-gate { max-width: 480px; }
.lib-gate-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand, #5b8cff);
  font-weight: 700;
}
.lib-gate-body { padding: 4px 22px 22px; }
.lib-gate-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 18px 14px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg, 12px);
}
.lib-gate-icon { font-size: 26px; line-height: 1; }
.lib-gate-body-text {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
  max-width: 420px;
}
.lib-gate-fine {
  font-size: 11px;
  color: var(--ink-3);
  margin: 4px 0 8px;
  line-height: 1.5;
}
.lib-gate-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  margin-top: 4px;
}
.lib-gate-cta .btn {
  width: 100%;
  justify-content: center;
}

/* ---------- v06: library filter + promise + empty state ---------- */
.library-promise {
  max-width: 760px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.library-promise b { color: var(--ink-1); font-weight: 700; }
.library-filter {
  max-width: 720px;
  margin: 0 auto 28px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.library-filter-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface-1, rgba(255,255,255,0.04));
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  transition: border-color 0.15s;
}
.library-filter-search:focus-within {
  border-color: var(--brand, #5b8cff);
}
.library-filter-icon {
  width: 16px; height: 16px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.library-filter-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink-1);
}
.library-filter-input::placeholder { color: var(--ink-3); }
.library-filter-count {
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}
.library-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--ink-3);
}
.library-empty p { margin: 0 0 12px; font-size: 14px; }

/* ---------- v06: product download dual-button + fast-forward ---------- */
.download-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
  align-items: stretch;
}
.btn-disabled-free {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-3);
  border: 1px dashed var(--line-soft);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: not-allowed;
  opacity: 0.75;
}
.btn-disabled-free .btn-countdown {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink-2);
  background: rgba(255,255,255,0.04);
  padding: 2px 8px;
  border-radius: 6px;
}
.btn-disabled-icon { font-size: 14px; }
.btn-bypass {
  background: linear-gradient(135deg, #ffd166, #f4a936);
  color: #1a1d29;
  border: 0;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(244, 169, 54, 0.25);
}
.btn-bypass:hover { box-shadow: 0 6px 18px rgba(244, 169, 54, 0.35); }
.btn-bypass:active { transform: translateY(1px); }
.btn-bypass .btn-arrow { font-size: 14px; }

.dev-fastforward {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--ink-3);
  cursor: pointer;
  user-select: none;
}
.dev-fastforward input { margin: 0; accent-color: var(--brand, #5b8cff); }
.dev-fastforward-label { font-family: ui-monospace, monospace; }

/* ---------- v06: package (.zip) row ---------- */
.package-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  margin-top: 8px;
}
.package-icon { font-size: 28px; line-height: 1; }
.package-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}
.package-meta b { color: var(--ink-1); }
.package-meta .muted { font-size: 11.5px; }

/* ---------- v06: release section (scrubbed history) ---------- */
.release-summary {
  font-size: 14px;
  color: var(--ink-1);
  margin: 0 0 8px;
}
.release-detail {
  font-size: 12px;
  margin: 0;
}
.release-detail code {
  background: rgba(255,255,255,0.05);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11.5px;
}

/* ---------- v06: Circuit Breaker panel ---------- */
.circuit-breaker {
  max-width: 1180px;
  margin: 18px auto 0;
  padding: 18px 22px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  font-size: 13px;
}
.circuit-breaker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.circuit-breaker-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 700;
}
.circuit-breaker-orb {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
  display: inline-block;
}
.cb-orb-warn { background: #f5b942; box-shadow: 0 0 8px rgba(245, 185, 66, 0.6); }
.cb-orb-trip { background: #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.7); animation: cbPulse 1.2s ease-in-out infinite; }
@keyframes cbPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.circuit-breaker-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}
.cb-state-warn .circuit-breaker-status { background: rgba(245, 185, 66, 0.14); color: #f5b942; }
.cb-state-trip .circuit-breaker-status { background: rgba(239, 68, 68, 0.14); color: #ef4444; }

.circuit-breaker-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 18px;
}
.circuit-breaker-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.circuit-breaker-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-weight: 700;
}
.circuit-breaker-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}
.circuit-breaker-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4ade80, #38c172);
  transition: width 0.4s ease, background 0.3s;
}
.cb-state-warn .circuit-breaker-bar-fill { background: linear-gradient(90deg, #f5b942, #e09a17); }
.cb-state-trip .circuit-breaker-bar-fill { background: linear-gradient(90deg, #ef4444, #b91c1c); }
.circuit-breaker-bar-fill-burn {
  background: linear-gradient(90deg, #5b8cff, #7e5cff);
}
.circuit-breaker-bar-burn { background: rgba(91, 140, 255, 0.10); }
.cb-state-warn .circuit-breaker-bar-fill-burn { background: linear-gradient(90deg, #f5b942, #e09a17); }
.cb-state-trip .circuit-breaker-bar-fill-burn { background: linear-gradient(90deg, #ef4444, #b91c1c); }
.circuit-breaker-val {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.circuit-breaker-val b {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}
.circuit-breaker-val .muted { font-size: 11px; }
.circuit-breaker-fine {
  font-size: 11.5px;
  color: var(--ink-3);
  margin: 14px 0 0;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .circuit-breaker-grid { grid-template-columns: 1fr; }
  .nav-donate { padding: 6px 10px; font-size: 11.5px; }
}

/* ---------- v06: login page ---------- */
.page-login { background: var(--surface-0, #0d1017); }
.login-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  max-width: 980px;
  margin: 40px auto 60px;
  padding: 0 22px;
  align-items: stretch;
}
.login-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 28px;
}
.login-eyebrow {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}
.login-head h1 {
  margin: 6px 0 8px;
  font-size: 28px;
}
.login-head p {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
}
.sso-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sso-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: var(--surface-1, rgba(255,255,255,0.04));
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-1);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.sso-btn:hover { background: rgba(255,255,255,0.06); }
.sso-btn-apple .sso-icon::before {
  content: "";
  display: inline-block;
  width: 16px; height: 16px;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"/></svg>') center/contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"/></svg>') center/contain no-repeat;
}
.sso-btn-google .sso-icon { display: inline-flex; }
.login-divider {
  text-align: center;
  margin: 18px 0 12px;
  position: relative;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.login-divider::before, .login-divider::after {
  content: ""; position: absolute; top: 50%;
  width: 38%; height: 1px;
  background: var(--line-soft);
}
.login-divider::before { left: 0; }
.login-divider::after  { right: 0; }
.login-divider span { background: var(--surface-0, #0d1017); padding: 0 12px; }
.login-ghost {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: 1px dashed var(--line-soft);
  border-radius: 10px;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.login-ghost:hover { color: var(--ink-1); border-color: var(--ink-3); }
.login-fine {
  font-size: 11px;
  color: var(--ink-3);
  margin: 16px 0 0;
  line-height: 1.6;
  text-align: center;
}
.login-fine a { color: var(--ink-2); text-decoration: underline; }
.login-side {
  background: linear-gradient(160deg, rgba(91, 140, 255, 0.10), rgba(126, 92, 255, 0.06));
  border: 1px solid rgba(91, 140, 255, 0.18);
  border-radius: 16px;
  padding: 28px;
}
.login-side h2 { margin: 0 0 10px; font-size: 20px; }
.login-side p {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.6;
  margin: 0 0 16px;
}
.login-side-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.8;
}
.login-side-list b { color: var(--ink-1); }

@media (max-width: 760px) {
  .login-wrap { grid-template-columns: 1fr; }
}

/* ---------- v06: wallet view ---------- */
.wallet-wrap {
  max-width: 1100px;
  margin: 28px auto 60px;
  padding: 0 22px;
}
.wallet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.wallet-eyebrow {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}
.wallet-head h1 { margin: 6px 0 4px; font-size: 26px; }
.wallet-sub { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.wallet-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wallet-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5b8cff, #7e5cff);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.wallet-user-meta { display: flex; flex-direction: column; font-size: 12px; }
.wallet-user-meta b { font-size: 13px; }

.wallet-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}
.wallet-grid .wallet-activity-card { grid-column: 1 / -1; }

.wallet-balance-card,
.wallet-fee-card,
.wallet-activity-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 22px;
}
.wallet-balance-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-weight: 700;
}
.wallet-balance-amount {
  font-size: 44px;
  font-weight: 800;
  margin: 6px 0 8px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.wallet-balance-note { font-size: 12.5px; color: var(--ink-2); }
.wallet-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.wallet-badge-empty { background: rgba(122, 126, 145, 0.20); color: var(--ink-3); }
.wallet-badge-low   { background: rgba(245, 185, 66, 0.16); color: #f5b942; }
.wallet-badge-ok    { background: rgba(74, 222, 128, 0.16); color: #4ade80; }

.wallet-fill { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line-soft); }
.wallet-fill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.wallet-fill-head b { font-size: 14px; }
.wallet-fill-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.wallet-fill-amt {
  flex: 1 1 60px;
  padding: 10px 0;
  background: var(--surface-1, rgba(255,255,255,0.04));
  color: var(--ink-1);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.wallet-fill-amt:hover { border-color: var(--ink-3); }
.wallet-fill-amt.is-selected {
  background: rgba(91, 140, 255, 0.10);
  border-color: var(--brand, #5b8cff);
  color: var(--brand, #5b8cff);
}
.btn-fill { width: 100%; }
.wallet-fill-fine {
  font-size: 11px;
  color: var(--ink-3);
  margin: 10px 0 0;
  line-height: 1.5;
}

.wallet-fee-icon {
  font-size: 26px;
  margin-bottom: 8px;
  opacity: 0.85;
}
.wallet-fee-card h3 { margin: 0 0 8px; font-size: 17px; }
.wallet-fee-card p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0 0 12px;
}
.wallet-fee-list {
  margin: 0;
  padding-left: 16px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.7;
}
.wallet-fee-list b { color: var(--ink-1); }

.wallet-activity-card h3 { margin: 0 0 12px; font-size: 16px; }
.wallet-activity {
  list-style: none;
  margin: 0;
  padding: 0;
}
.wallet-activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
.wallet-activity-row:last-child { border-bottom: 0; }
.wallet-activity-empty {
  text-align: center;
  padding: 16px 0;
  color: var(--ink-3);
  font-size: 13px;
  list-style: none;
}
.wallet-activity-amt {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.wallet-activity-amt.is-up { color: #4ade80; }
.wallet-activity-amt.is-down { color: var(--ink-2); }

@media (max-width: 760px) {
  .wallet-grid { grid-template-columns: 1fr; }
  .wallet-head { flex-direction: column; align-items: flex-start; }
}

/* =============================================================
   v07 ADDITIONS — start here

   v07 reorganised the homepage hero (video frame on top, text
   below) and split search into two dedicated, context-bound
   inputs. These rules supplement the design system above rather
   than rewriting it. New selectors live in this block only.
   ============================================================= */

/* ---------- v07: homepage hero rebalance ----------
   The 16:9 marketing frame sits above the slogan/CTAs.
   - Less top padding (the frame owns the first impression).
   - Tighter bottom padding (text below is smaller).
   - Tighter typography inside .hero-inner so the text reads as
     "secondary" rather than dominating. */
.hero:has(.hero-marketing-screen) {
  padding: 28px 24px 56px;
}
.hero-marketing-screen {
  max-width: 1180px;
  margin: 0 auto 28px;
  padding: 0;
}
.hero-marketing-screen .marketing-frame-pristine {
  border-radius: 18px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 24px 60px rgba(0,0,0,.45);
}
.hero:has(.hero-marketing-screen) .hero-inner {
  max-width: 720px;
  margin: 0 auto;
}
.hero:has(.hero-marketing-screen) .hero-title {
  font-size: clamp(26px, 4.2vw, 38px);
  margin: 0 0 10px;
}
.hero:has(.hero-marketing-screen) .hero-sub {
  font-size: 14.5px;
  margin: 0 auto 18px;
}
.hero:has(.hero-marketing-screen) .hero-rotator {
  height: 22px;
  margin: 0 auto 12px;
}
.hero:has(.hero-marketing-screen) .cta {
  padding: 11px 20px;
  font-size: 14px;
}
.hero:has(.hero-marketing-screen) .hero-note {
  margin-top: 12px;
  font-size: 12px;
}

/* ---------- v07: homepage "Search Active Campaigns" ---------- */
.campaign-search-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 24px 28px;
  display: grid;
  grid-template-columns: 1fr minmax(0, 520px);
  gap: 32px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
}
.campaign-search-copy .page-eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.campaign-search-copy h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 6px;
}
.campaign-search-copy p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
}
.campaign-search-form { width: 100%; }
.campaign-search-form > label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.campaign-search-control {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 4px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.campaign-search-control:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,92,255,.18);
}
.campaign-search-control svg {
  width: 18px; height: 18px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.campaign-search-control input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 12px 0;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink-1);
}
.campaign-search-control input::placeholder { color: var(--ink-4); }
.campaign-search-control .btn { white-space: nowrap; padding: 9px 16px; }
@media (max-width: 760px) {
  .campaign-search-section {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 28px 18px 24px;
  }
}

/* ---------- v07: library page filter ---------- */
.library-filter {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 24px 8px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.library-filter-search {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
.library-filter-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,92,255,.18);
}
.library-filter-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
  white-space: nowrap;
  padding: 10px 12px 10px 0;
  border-right: 1px solid var(--line);
}
.library-filter-icon {
  width: 18px; height: 18px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.library-filter-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 12px 0;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink-1);
}
.library-filter-input::placeholder { color: var(--ink-4); }
.library-filter-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}
@media (max-width: 600px) {
  .library-filter { padding: 20px 18px 8px; }
  .library-filter-label {
    flex: 1 1 100%;
    border-right: 0;
    padding: 0 0 4px;
  }
}

/* ---------- v07: pure SSO login card ---------- */
.login-wrap-pure {
  /* Override the base .login-wrap's 2-col grid for this single-card page.
     Without this, the lone .login-card drops into the 1.1fr left column
     of the inherited grid-template-columns and the page renders as a
     narrow vertical stick off to one side. */
  display: flex;
  justify-content: center;
  grid-template-columns: 1fr;
  max-width: 480px;
  margin: 60px auto 80px;
  padding: 0 24px;
}
.login-wrap-pure .login-card {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: var(--shadow-2);
}
.login-wrap-pure .login-head { margin-bottom: 22px; }
.login-wrap-pure .login-head .login-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.login-wrap-pure .login-head h1 {
  font-size: 24px;
  margin: 0 0 6px;
}
.login-wrap-pure .login-head p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-3);
}
.login-wrap-pure .sso-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.login-wrap-pure .login-fine {
  margin: 18px 0 0;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.55;
}
.login-wrap-pure .login-fine a { color: var(--accent-ink); text-decoration: underline; }

/* ---------- v07: account.html (exact wallet) ---------- */
.account-wrap { max-width: 1180px; margin: 0 auto; padding: 32px 24px 80px; }
.wallet-exact-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.wallet-exact-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,92,255,.18);
}
.wallet-exact-field span {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-2);
}
.wallet-exact-field input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 4px 0;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}
.wallet-exact-field input::placeholder { color: var(--ink-4); font-weight: 500; }
.wallet-exact-hint {
  margin: 8px 0 0;
  font-size: 11.5px;
  color: var(--ink-3);
}

/* ---------- v07: faq.html page ---------- */
.faq-page-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 24px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.faq-page-main #faqPageList { min-width: 0; }

/* ---------- v07: pledge modal polish ---------- */
.back-form-goodwill {
  margin-top: 6px;
  padding: 10px 12px;
  background: rgba(245, 180, 0, 0.08);
  border: 1px solid rgba(245, 180, 0, 0.35);
  border-radius: var(--r-md);
  font-size: 12px;
  color: #ffd57a;
}
.back-form-fine {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.5;
}
.back-form-tipline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
}
.tipline-text {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.4;
}
.tipline-text b { color: var(--ink-1); }
.tipline-amt {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
}
.tipline-amt span {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink-2);
}
.tipline-amt input {
  width: 80px;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 4px 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-1);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tipline-amt input::placeholder { color: var(--ink-4); }

/* v07: mobile override for the new hero pattern. The general
   .hero mobile rule (line ~1270) sets padding: 56px 18px 56px,
   which would dominate the framed hero at small widths. */
@media (max-width: 600px) {
  .hero:has(.hero-marketing-screen) {
    padding: 18px 14px 36px;
  }
  .hero-marketing-screen { margin-bottom: 22px; }
  .hero:has(.hero-marketing-screen) .hero-title {
    font-size: 22px;
  }
}

/* =============================================================
   v11 P3 ADDITIONS — own-LLM submission helper
   ============================================================= */
.intake-ai-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  padding: 12px 14px;
  background: rgba(124, 92, 255, .08);
  border: 1px solid rgba(124, 92, 255, .28);
  border-radius: var(--r-md);
}
.intake-ai-copy { min-width: 0; }
.intake-ai-title {
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.intake-ai-copy p {
  margin: 3px 0 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
}
.copy-prompt-status {
  grid-column: 1 / -1;
  min-height: 16px;
  color: var(--ok);
  font-size: 11.5px;
}
.ai-submission-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
}
.ai-submission-check input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--accent);
  flex: 0 0 auto;
}
.ai-submission-check span { display: flex; flex-direction: column; gap: 2px; }
.ai-submission-check b { color: var(--ink-1); font-size: 12px; }
.ai-submission-check small { color: var(--ink-3); font-size: 11.5px; line-height: 1.4; }
.intake-safety-note { padding: 0 2px; }
.intake-safety-note b { color: var(--ink-2); }
@media (max-width: 600px) {
  .intake-ai-tools { grid-template-columns: 1fr; }
  .intake-ai-tools .btn { width: 100%; }
}


/* ---------- v08: 16:9 local image cycler ---------- */
.media-cycler {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--bg-2);
  box-shadow: 0 18px 40px -20px rgba(0,0,0,.55);
}
.media-cycler-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity .7s ease, transform 4.5s ease;
}
.media-cycler-image.is-active {
  opacity: 1;
  transform: scale(1);
}
.media-cycler-status {
  position: absolute;
  right: 14px;
  bottom: 12px;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  background: rgba(8,9,14,.72);
  color: rgba(255,255,255,.9);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
}

/* ---------- v08: custom-first donation field ---------- */
.donate-primary-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.donate-primary-control {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-2);
}
.donate-primary-control:focus-within { border-color: var(--accent); }
.donate-primary-control b { color: var(--ink-2); font-size: 18px; }
.donate-primary-control input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink-1);
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
}
.donate-quick-select > span {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
@media (max-width: 600px) {
  .media-cycler { border-radius: 12px; }
}

/* ---------- v10: page-header actions (Create a Campaign entry point) ---------- */
.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}
.page-header-actions .btn-create-campaign {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
}

/* =============================================================
   SALES PITCH — bottom of home page (v12 brand + copy pass)
   ============================================================= */
.pitch {
  background: var(--bg-1, #161821);
  border-top: 1px solid var(--line-1, rgba(255,255,255,0.08));
  padding: 56px 24px 64px;
}
.pitch-inner {
  max-width: 760px;
  margin: 0 auto;
}
.pitch-eyebrow {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3, #8b8e9a);
  margin: 0 0 18px;
  font-weight: 600;
}
.pitch-body {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2, #c8cad2);
  margin: 0 0 18px;
}
.pitch-body:last-child {
  margin-bottom: 0;
}
:root[data-theme="light"] .pitch {
  background: var(--bg-1, #f7f8fa);
  border-top-color: var(--line-1, rgba(0,0,0,0.08));
}
:root[data-theme="light"] .pitch-body {
  color: var(--ink-2, #2a2d36);
}
:root[data-theme="light"] .pitch-eyebrow {
  color: var(--ink-3, #5a5d68);
}

/* =============================================================
   12. v2 WALLET GATE — before Codey (baby step 4a)
   The former rejected six-field intake surface has been removed.
   This section is the hard ≥$1 gate with two doors: cash or one
   general Banana Buck. All paint uses existing theme tokens.
============================================================= */

.cc-wallet-gate {
  max-width: 780px;
  max-height: min(96vh, 820px);
}
.cc-wallet-gate .modal-head h3 {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: -.025em;
}
.cc-wallet-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  padding: 20px;
  overflow-y: auto;
}
.cc-wallet-balance-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.cc-wallet-balance-label {
  display: block;
  margin-bottom: 3px;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cc-wallet-balance {
  display: block;
  color: var(--ink-1);
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1;
  letter-spacing: -.035em;
}
.cc-wallet-status {
  max-width: 270px;
  padding: 8px 11px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}
.cc-wallet-status[data-kind="ready"] {
  border-color: var(--ok);
  color: var(--ok);
}
.cc-wallet-status[data-kind="error"] {
  border-color: var(--danger);
  color: var(--danger);
}
.cc-wallet-doors {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  align-items: stretch;
}
.cc-wallet-doors[hidden],
.cc-codey-placeholder[hidden] {
  display: none;
}
.cc-wallet-door {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 20px;
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.cc-wallet-door-number {
  position: absolute;
  top: 10px;
  right: 14px;
  color: var(--ink-4);
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.05em;
  opacity: .5;
}
.cc-wallet-door-copy {
  position: relative;
  padding-right: 28px;
}
.cc-wallet-door .page-eyebrow {
  display: block;
  margin-bottom: 8px;
}
.cc-wallet-door h4,
.cc-codey-placeholder h4 {
  margin: 0;
  color: var(--ink-1);
  font-size: 18px;
  letter-spacing: -.015em;
}
.cc-wallet-door p,
.cc-codey-placeholder p {
  margin: 7px 0 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
}
.cc-wallet-door small,
.cc-wallet-cash-control small {
  display: block;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.45;
}
.cc-wallet-cash-control {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: auto;
}
.cc-wallet-cash-control > label {
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.cc-wallet-amount-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding-left: 11px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink-2);
  transition: background .15s, border-color .15s;
}
.cc-wallet-amount-row:focus-within {
  background: var(--bg-1);
  border-color: var(--accent);
}
.cc-wallet-amount-row input {
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink-1);
  font: inherit;
  font-weight: 700;
}
.cc-wallet-amount-row .btn {
  align-self: stretch;
  border-radius: 0 calc(var(--r-md) - 1px) calc(var(--r-md) - 1px) 0;
  box-shadow: none;
  white-space: nowrap;
}
.cc-wallet-share {
  width: 100%;
  margin-top: auto;
  padding-block: 11px;
  white-space: normal;
}
.cc-wallet-or {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cc-wallet-or::before,
.cc-wallet-or::after {
  width: 1px;
  height: 34%;
  background: var(--line);
  content: "";
}
.cc-wallet-or {
  flex-direction: column;
  gap: 9px;
}
.cc-codey-placeholder {
  padding: 34px 24px;
  background: var(--bg-2);
  border: 1px solid var(--ok);
  border-radius: var(--r-lg);
  text-align: center;
  outline: none;
}
.cc-codey-placeholder:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.cc-codey-placeholder h4 {
  margin-top: 8px;
  font-size: 23px;
}
.cc-wallet-foot {
  min-height: 58px;
}
.cc-wallet-rule {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.cc-modal-cancel {
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 12.5px;
  cursor: pointer;
  transition: color .15s;
}
.cc-modal-cancel:hover { color: var(--ink-1); }

@media (max-width: 680px) {
  .cc-wallet-gate { max-height: 94vh; }
  .cc-wallet-gate .modal-head,
  .cc-wallet-body { padding: 16px; }
  .cc-wallet-balance-panel {
    align-items: flex-start;
    flex-direction: column;
  }
  .cc-wallet-status {
    max-width: none;
    text-align: left;
  }
  .cc-wallet-doors {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .cc-wallet-or {
    flex-direction: row;
    gap: 9px;
  }
  .cc-wallet-or::before,
  .cc-wallet-or::after {
    width: 30%;
    height: 1px;
  }
  .cc-wallet-foot {
    align-items: flex-start;
    flex-direction: column-reverse;
  }
}

/* =============================================================
   13. TOP NAVIGATION v2 — single-row layout + auth state
============================================================= */
.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-left {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}
.nav-left .nav-logo { flex-shrink: 0; }
.nav-left .nav-links { margin-left: 0; gap: 14px; }

.nav-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav-right-cta,
.nav-right-auth {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* Subtle vertical divider between CTA cluster and auth cluster */
.nav-right-auth {
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--line-soft);
}

/* Generic nav button (new style — replaces .nav-login / inline ad-hoc).
   Three variants: text (Log In), primary (Sign Up), ghost (Start). */
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-1);
  transition: background .15s, border-color .15s, color .15s, transform .12s;
  text-decoration: none;
  white-space: nowrap;
}
.nav-btn:active { transform: translateY(1px); }
.nav-btn-text {
  color: var(--ink-2);
  border-color: transparent;
}
.nav-btn-text:hover { color: var(--ink-1); background: var(--bg-2); }
.nav-btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 6px 18px rgba(124,92,255,.22), 0 1px 0 rgba(255,255,255,.08) inset;
}
.nav-btn-primary:hover { background: #6a4dee; }
.nav-btn-ghost {
  background: var(--bg-2);
  border-color: var(--line-soft);
  color: var(--ink-1);
}
.nav-btn-ghost:hover { background: var(--bg-3); border-color: var(--accent); color: var(--accent-ink); }

.nav-start-plus {
  font-size: 16px;
  line-height: 1;
  margin-right: 2px;
}

.nav-btn-donate {
  /* Keep visual continuity with the old .nav-donate button but apply
     the same .nav-btn sizing/padding so the row stays aligned. */
  background: transparent;
  border-color: var(--line-soft);
  color: var(--ink-1);
}
.nav-btn-donate:hover {
  background: var(--bg-2);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.nav-donate-orb {
  color: #ff6b8a;
  font-size: 13px;
  line-height: 1;
}

/* =============================================================
   Wallet pill (logged-in state, top-right).
============================================================= */
.nav-wallet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,213,79,.12), rgba(255,213,79,.06));
  border: 1px solid rgba(255,213,79,.35);
  color: var(--ink-1);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .12s;
}
.nav-wallet:hover {
  background: linear-gradient(180deg, rgba(255,213,79,.18), rgba(255,213,79,.10));
  border-color: rgba(255,213,79,.55);
}
.nav-wallet-banana { font-size: 14px; line-height: 1; }
.nav-wallet-amount { font-variant-numeric: tabular-nums; }

/* =============================================================
   "My Account" dropdown.
============================================================= */
.nav-account { position: relative; }
.nav-account-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  color: var(--ink-1);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  font-family: inherit;
}
.nav-account-btn:hover { background: var(--bg-3); border-color: var(--accent); color: var(--accent-ink); }
.nav-account-caret {
  font-size: 10px;
  line-height: 1;
  color: var(--ink-3);
  transition: transform .15s;
}
.nav-account.is-open .nav-account-caret { transform: rotate(180deg); }
.nav-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(0,0,0,.32), 0 2px 8px rgba(0,0,0,.18);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 60;
  /* hidden attr is the source of truth; this is a visual transition */
  animation: navAccountIn .14s ease-out;
}
@keyframes navAccountIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-account-item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  background: transparent;
  border: 0;
  color: var(--ink-1);
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.nav-account-item:hover { background: var(--bg-3); color: var(--accent-ink); }
.nav-account-signout {
  margin-top: 4px;
  border-top: 1px solid var(--line-soft);
  border-radius: 0 0 6px 6px;
  color: var(--ink-2);
}
.nav-account-signout:hover { color: #ff8aa3; }

/* =============================================================
   Responsive navigation.
============================================================= */
@media (max-width: 960px) {
  .nav-inner { gap: 12px; }
  .nav-left .nav-links { gap: 10px; }
  .nav-btn { padding: 0 10px; }
}
@media (max-width: 720px) {
  .nav-inner { gap: 8px; }
  .nav-left .nav-links { display: none; }   /* overflow guard */
  .nav-right-cta .nav-btn { display: none; }
  .nav-wallet-amount { display: none; }
}

/* =============================================================
   v2.1 — OUR LIBRARY PAGE
   Full-width two-tab workspace: Library + Search.
============================================================= */
.our-library-page {
  min-height: calc(100vh - 72px);
  padding-bottom: 72px;
  background:
    radial-gradient(900px 320px at 12% 0%, rgba(124,92,255,.09), transparent 65%),
    var(--bg-0);
}
/* Match the home page rhythm: h1 around the same level as .hero-title
   (a touch smaller since this is a secondary page), lead text matching
   .hero-sub (17px), and tighter vertical padding. */
.library-hero {
  max-width: 1180px;
  padding: 56px 24px 32px;
}
.library-hero-copy { max-width: 1040px; }
.library-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.02em;
}
.library-hero .library-hero-declaration {
  max-width: 720px;
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
}
.library-hero .library-promise {
  max-width: 720px;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-3);
}
.library-hero-total {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 18px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.library-hero-total strong {
  color: var(--ink-1);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.library-workspace {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--bg-1);
}
.library-toolbar-copy p {
  margin: 4px 0 0;
  color: var(--ink-1);
  font-size: 15px;
  font-weight: 600;
}
.library-toolbar-kicker {
  display: block;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.library-search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 440px);
  padding: 4px 6px 4px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  transition: border-color .15s, box-shadow .15s;
}
.library-search-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,92,255,.14);
}
.library-search-icon { width: 18px; height: 18px; flex: 0 0 auto; color: var(--ink-3); }
.library-search-form input {
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink-1);
  font: inherit;
  font-size: 14px;
}
.library-search-form input::placeholder { color: var(--ink-4); }
.library-search-clear {
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--ink-3);
  font-size: 11px;
  white-space: nowrap;
}
.library-search-clear:hover { background: var(--bg-3); color: var(--ink-1); }
.library-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line-soft);
  border-top: 0;
  background: var(--bg-1);
}
.library-tab {
  position: relative;
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  min-height: 68px;
  padding: 13px 20px;
  border: 0;
  border-right: 1px solid var(--line-soft);
  color: var(--ink-2);
  text-align: left;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.library-tab:last-child { border-right: 0; }
.library-tab:hover { background: var(--bg-2); color: var(--ink-1); }
.library-tab.is-active {
  color: var(--ink-1);
  background: var(--bg-2);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.library-tab > span:first-child { font-size: 15px; font-weight: 700; }
.library-tab small {
  grid-column: 1 / -1;
  color: var(--ink-3);
  font-size: 11px;
}
.library-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 21px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--ink-1);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}
.library-panel {
  padding: 30px 20px 34px;
  border: 1px solid var(--line-soft);
  border-top: 0;
  background: var(--bg-0);
}
.library-panel[hidden] { display: none; }
.library-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.library-panel-head .page-eyebrow { margin-bottom: 7px; }
.library-panel-head h2 {
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -.025em;
}
.library-panel-meta {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}
.our-library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.our-library-card {
  display: flex;
  min-height: 282px;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--bg-1);
  color: inherit;
  box-shadow: var(--shadow-1);
  transition: transform .16s, border-color .16s, background .16s;
}
.our-library-card:hover {
  transform: translateY(-3px);
  border-color: var(--line);
  background: var(--bg-2);
}
.our-library-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  margin-bottom: 22px;
}
.library-state-badge,
.search-result-stage {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}
.library-state-badge.shipped,
.search-result-stage.shipped { color: var(--ok); border-color: rgba(25,195,125,.35); }
.library-state-badge.beta,
.search-result-stage.beta { color: var(--warn); border-color: rgba(245,180,0,.35); }
.library-state-badge.raising,
.search-result-stage.raising { color: var(--accent-ink); border-color: var(--line); }
.library-state-badge.shelved,
.search-result-stage.shelved { color: var(--ink-3); }
.our-library-card-arrow,
.search-result-arrow { color: var(--ink-3); font-size: 18px; transition: transform .16s, color .16s; }
.our-library-card:hover .our-library-card-arrow,
.search-result-row:hover .search-result-arrow { color: var(--ink-1); transform: translate(2px, -2px); }
.our-library-card h3 {
  margin: 0 0 8px;
  color: var(--ink-1);
  font-size: 18px;
  line-height: 1.2;
}
.our-library-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
}
.our-library-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
  padding-top: 20px;
}
.our-library-tag {
  padding: 3px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 9px;
}
.our-library-card-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-3);
  font-size: 11px;
}
.our-library-card-meta strong {
  color: var(--ink-1);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}
.search-results-list { display: flex; flex-direction: column; gap: 8px; }
.search-result-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) minmax(150px, auto) 24px;
  align-items: center;
  gap: 16px;
  padding: 15px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--bg-1);
  color: inherit;
  transition: background .15s, border-color .15s, transform .15s;
}
.search-result-row:hover { background: var(--bg-2); border-color: var(--line); transform: translateX(2px); }
.search-result-copy { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.search-result-copy strong { overflow: hidden; color: var(--ink-1); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.search-result-copy span { overflow: hidden; color: var(--ink-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.search-result-detail { display: flex; flex-direction: column; gap: 3px; text-align: right; }
.search-result-detail small { color: var(--ink-3); font-size: 10px; }
.search-result-detail b { color: var(--ink-2); font-size: 11px; font-weight: 500; }
.library-empty-state {
  padding: 52px 20px 36px;
  color: var(--ink-3);
  text-align: center;
}
.library-empty-state[hidden] { display: none; }
.library-empty-mark {
  display: block;
  margin-bottom: 10px;
  color: var(--ink-4);
  font-family: var(--font-mono);
  font-size: 28px;
}
.library-empty-state h3 { margin: 0 0 6px; color: var(--ink-1); font-size: 16px; }
.library-empty-state p { max-width: 420px; margin: 0 auto; font-size: 13px; }
.library-footnote {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 2px 0;
  color: var(--ink-3);
  font-size: 11.5px;
}
.library-footnote strong { color: var(--ink-2); font-weight: 600; }
.library-footnote-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--ok); box-shadow: 0 0 9px rgba(25,195,125,.45); }
.library-admin-entry {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  max-width: 1180px;
  margin: 30px auto 0;
  padding: 0 24px;
  color: var(--ink-4);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.library-admin-entry a {
  padding: 5px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--ink-3);
}
.library-admin-entry a:hover { border-color: var(--line); color: var(--ink-1); }
.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; }
@media (max-width: 880px) {
  .our-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-result-row { grid-template-columns: 96px minmax(0, 1fr) 24px; }
  .search-result-detail { display: none; }
}
@media (max-width: 600px) {
  .library-hero { padding: 48px 18px 26px; }
  .library-workspace { padding: 0 16px; }
  .library-toolbar { align-items: stretch; flex-direction: column; gap: 16px; padding: 16px; }
  .library-search-form { width: 100%; }
  .library-tab { padding: 12px 14px; }
  .library-panel { padding: 24px 14px 28px; }
  .library-panel-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .our-library-grid { grid-template-columns: 1fr; }
  .our-library-card { min-height: 250px; }
  .search-result-row { grid-template-columns: 1fr 20px; gap: 8px 12px; }
  .search-result-stage { grid-column: 1; grid-row: 1; }
  .search-result-copy { grid-column: 1; grid-row: 2; }
  .search-result-arrow { grid-column: 2; grid-row: 1 / span 2; }
  .library-footnote { align-items: flex-start; }
}

/* =============================================================
   14. v07 SPARK FRONT DESK — public landing intake
   Phase 07 scaffold replaced by the full v02 layout. The Spark
   intake section lives on the home page right under the hero;
   the chat composer + auth row + Working Brief card share the
   same shell as the v02 modal system but stay page-level so
   unauthenticated visitors can still reach the form.
============================================================= */
.intake-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 24px 56px;
}
.intake-card {
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.intake-head { display: flex; flex-direction: column; gap: 6px; }
.intake-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.intake-head h2 {
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -.025em;
  margin: 0;
}
.intake-sub { color: var(--ink-3); margin: 0; font-size: 14.5px; }

/* Auth row used on Spark + campaign page */
.auth-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--ink-3);
}
.auth-row .auth-row-label { font-weight: 600; color: var(--ink-2); }
.auth-row input {
  flex: 1; min-width: 200px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: var(--bg-0);
  color: var(--ink-1);
  font: inherit;
}
.auth-row input:focus { border-color: var(--accent); outline: none; }
.auth-row .auth-row-status { color: var(--ink-2); font-size: 12.5px; }

/* Chat shell */
.chat {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 14px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}
.messages {
  flex: 1; overflow-y: auto;
  padding: 6px 6px 12px;
  display: flex; flex-direction: column; gap: 10px;
  max-height: 420px;
}
.msg {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.45;
  font-size: 14.5px;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.msg .who {
  display: block;
  font-size: 10.5px;
  color: var(--ink-3);
  margin-bottom: 4px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.msg.user {
  align-self: flex-end;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  color: var(--ink-1);
}
.msg.user .who { color: var(--accent-ink); }
.msg.spark {
  align-self: flex-start;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  color: var(--ink-1);
}
.msg.system {
  align-self: center;
  background: transparent;
  color: var(--ink-3);
  font-size: 12.5px;
  text-align: center;
}

/* Working Brief card */
.brief {
  align-self: flex-start;
  max-width: 92%;
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  font-size: 13.5px;
}
.brief h3 { margin: 0 0 6px; color: var(--accent-ink); font-size: 14px; }
.brief dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 10px;
}
.brief dt { color: var(--ink-3); font-size: 11.5px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.brief dd { margin: 0; color: var(--ink-2); }
.brief .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.brief .tag {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  color: var(--ink-1);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-family: var(--font-mono);
}

/* Composer */
form.composer { display: flex; gap: 8px; margin-top: 12px; }
form.composer textarea {
  flex: 1;
  resize: vertical;
  min-height: 48px;
  max-height: 180px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: var(--bg-1);
  color: var(--ink-1);
  font: inherit;
}
form.composer textarea:focus { border-color: var(--accent); outline: none; }
form.composer button { min-width: 88px; }
form.composer button[disabled] { opacity: 0.6; cursor: not-allowed; }

.err { color: var(--danger); font-size: 13px; margin-top: 8px; }

@media (max-width: 540px) {
  .intake-section { padding: 16px 14px 40px; }
  .intake-card { padding: 18px 14px; }
  .msg { max-width: 92%; }
  form.composer { flex-direction: column; }
  form.composer button { width: 100%; }
}

/* ---------- v07: authenticated-state nav + hero polish ----------
   When ocf.session exists, the navbar swaps to a prominent
   "Dashboard" pill and the hero on public pages shows a dismissible
   "Signed in — view your dashboard" pill. */

/* Mount point inside .hero-inner — empty unless session is active. */
.hero-auth-pill-slot {
  display: flex;
  justify-content: center;
  margin: 0 auto 14px;
  min-height: 0;
}
.hero-auth-pill-slot:empty { display: none; }

/* The pill itself: a green-tinted badge with a check, link text,
   arrow, and a tiny ✕ dismiss control on the right. */
.hero-auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(80,200,120,.18), rgba(80,200,120,.10));
  border: 1px solid rgba(80,200,120,.35);
  color: var(--ink-1);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: transform .12s ease, background .15s ease;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset;
}
.hero-auth-pill:hover {
  background: linear-gradient(135deg, rgba(80,200,120,.28), rgba(80,200,120,.16));
  transform: translateY(-1px);
}
.hero-auth-pill-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(80,200,120,.85);
  color: #0d1f12;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.hero-auth-pill-text { white-space: nowrap; }
.hero-auth-pill-arrow {
  font-size: 14px;
  color: var(--accent-ink);
  transition: transform .12s ease;
}
.hero-auth-pill:hover .hero-auth-pill-arrow { transform: translateX(2px); }
.hero-auth-pill-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.06);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  margin-left: 2px;
}
.hero-auth-pill-x:hover { background: rgba(255,255,255,.12); color: var(--ink-1); }

/* Compact form on mobile. */
@media (max-width: 540px) {
  .hero-auth-pill { font-size: 12px; padding: 5px 5px 5px 10px; }
  .hero-auth-pill-text { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
}

/* Navbar "Dashboard" pill — primary-style CTA, links to account.html.
   Replaces the quiet .nav-wallet link when the user is signed in. */
.nav-dashboard {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.nav-dashboard-banana { font-size: 14px; line-height: 1; }
.nav-dashboard-amount { font-variant-numeric: tabular-nums; }
.nav-dashboard-label {
  padding-left: 8px;
  margin-left: 4px;
  border-left: 1px solid rgba(255,255,255,.18);
}
.nav-dashboard-arrow {
  font-size: 14px;
  transition: transform .12s ease;
}
.nav-dashboard:hover .nav-dashboard-arrow { transform: translateX(2px); }

@media (max-width: 720px) {
  .nav-dashboard-label,
  .nav-dashboard-amount { display: none; }
  .nav-dashboard-label { padding-left: 0; margin-left: 0; border-left: 0; }
}

/* =============================================================
   v08 — Responsive global drawer
   =============================================================
   The hamburger button (#navHamburger) opens a slide-in drawer
   containing the canonical set of global destinations. On
   screens <= 768px the inline .nav-links (Library / Swarms) are
   hidden — they remain reachable from the drawer — and the
   hamburger is always visible regardless of breakpoint.
============================================================= */

/* --- Hamburger trigger (with visible "Menu" label) --- */
.nav-hamburger {
  display: inline-flex;           /* visible on desktop AND mobile per V05 nav polish */
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  min-width: 40px;
  margin-left: 8px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--ink-1);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  order: 2;                       /* sits between .nav-left and .nav-right */
}
.nav-hamburger:hover {
  background: var(--bg-2);
  border-color: var(--accent);
  color: var(--accent);
}
.nav-hamburger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.nav-hamburger-label {
  display: inline-block;
  line-height: 1;
  white-space: nowrap;
}
.nav-hamburger-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 14px;
  flex-shrink: 0;
}
.nav-hamburger-bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}
/* Animate the bars into an ✕ when the drawer is open + hide the label
   so the closed state reads clean as "Menu ☰" and the open state reads
   clean as "✕". */
.nav-hamburger[aria-expanded="true"] .nav-hamburger-label {
  opacity: 0;
  width: 0;
  margin: 0;
  overflow: hidden;
}
.nav-hamburger[aria-expanded="true"] {
  padding: 0;
  min-width: 40px;
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger-bar:nth-child(2) {
  opacity: 0;
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* --- Drawer (off-canvas by default; .is-open slides it in) --- */
.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100dvh;                 /* respects mobile browser chrome */
  width: min(320px, 86vw);
  max-width: 360px;
  background: var(--bg-1);
  border-right: 1px solid var(--line-soft);
  box-shadow: 24px 0 60px rgba(0, 0, 0, .35);
  z-index: 60;                    /* above the sticky .navbar (z-index:40) */
  transform: translateX(-100%);
  transition: transform .18s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 15px;
}
.nav-drawer.is-open { transform: translateX(0); }

/* --- Backdrop (dimmed scrim behind the drawer) --- */
.nav-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 55;
  opacity: 0;
  transition: opacity .18s ease;
}
.nav-drawer-backdrop.is-open { opacity: 1; }

/* --- Drawer internals --- */
.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.nav-drawer-title {
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink-1);
  font-size: 15.5px;
}
.nav-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--ink-1);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: background .15s ease, border-color .15s ease;
}
.nav-drawer-close:hover {
  background: var(--bg-2);
  border-color: var(--accent);
}
.nav-drawer-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 10px 8px;
  overflow-y: auto;
  flex: 1 1 auto;
}
.nav-drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  margin: 2px 0;
  border-radius: 10px;
  color: var(--ink-1);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: background .12s ease, color .12s ease;
}
.nav-drawer-link:hover,
.nav-drawer-link:focus-visible {
  background: var(--bg-2);
  color: var(--accent-ink);
  outline: none;
}
.nav-drawer-link.is-active {
  background: var(--bg-3);
  color: var(--accent-ink);
}
.nav-drawer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 16px;
  line-height: 1;
}
.nav-drawer-label {
  flex: 1 1 auto;
  letter-spacing: -.005em;
}

.nav-drawer-foot {
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line-soft);
}
.nav-drawer-foot-muted {
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--font-mono);
}

/* --- Lock body scroll while drawer is open --- */
html.cc-drawer-open,
html.cc-drawer-open body {
  overflow: hidden;
  touch-action: none;
}

/* --- Breakpoint: <= 768px ---
   - Hide the inline .nav-links (Library / Swarms) — they remain
     reachable via the drawer. The Menu button stays visible (already
     inline-flex in the base rule); on very small screens the label
     collapses to just the icon. */
@media (max-width: 768px) {
  .nav-links { display: none; }
  /* Slight padding reduction so the new button fits cleanly. */
  .nav-inner { gap: 12px; padding: 10px 16px; }
}

/* Tiny-screen polish: shrink drawer width slightly so icons
   always fit on a 320px iPhone SE viewport; collapse the Menu
   label to icon-only to free horizontal space. */
@media (max-width: 380px) {
  .nav-drawer { width: 88vw; }
  .nav-drawer-link { padding: 11px 10px; font-size: 14.5px; }
  .nav-hamburger-label { display: none; }
  .nav-hamburger { padding: 0; min-width: 40px; }
}
