/* Colour tokens. Light values here; dark ones at the end of this file ([data-theme="dark"], or the
   device setting when the person chose "System"). Use these instead of hard-coded colours so new pages
   get dark mode for free. --accent is for text, links and lines; --accent-fill for filled buttons/pills. */
:root {
  color-scheme: light;
  --brand-accent: #635bff;
  --accent: #635bff;
  --accent-fill: var(--accent);
  --ink: #0a2540;
  --ink-soft: #425466;
  --ink-faint: #8792a2;
  --line: #e3e8ee;
  --line-strong: #cdd5df;
  --bg: #f6f9fc;
  --surface: #ffffff;
  --subtle: #fafbfc;
  --hover: #f1f4f8;
  --fill: #eef1f5;
  --field: #ffffff;
  --neutral-bg: #eef2f6;
  --neutral-ink: #3d4b5c;
  --info-bg: #eef2ff;
  --info-ink: #3730a3;
  --ok-bg: #e4f7ec;
  --ok-ink: #14532d;
  --ok-line: #b5e3c8;
  --err-bg: #fdecea;
  --err-ink: #b3261e;
  --err-line: #f6d0cc;
  --warn-bg: #fdf3d7;
  --warn-ink: #7a5a12;
  --warn-line: #e9b949;
  --paused-bg: #fff4e5;
  --paused-ink: #9a5b00;
  --gold-soft: #fff4cc;
  --gold-line: #f3dc8a;
  --inverse-bg: #0a2540;
  --inverse-ink: #ffffff;
  --banner-bg: #0a2540;
  --danger-fill: #b3261e;
  --acct-brand-ink: #4b44d6;
  --acct-creator-ink: #0b7a5f;
  --logo-accent: #635bff;
  --radius: 12px;
  --font-head: "Satoshi", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Satoshi", -apple-system, BlinkMacSystemFont, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font-body); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; }
h1, h2, h3, .logo { font-family: var(--font-head); letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: 26px; margin: 0 0 16px; }
h2 { font-size: 19px; margin: 28px 0 12px; }
a { color: var(--accent); }
code { background: var(--fill); padding: 1px 5px; border-radius: 4px; font-size: 13px; }

/* App shell: left sidebar, slim top bar + drawer on mobile */
.logo { font-weight: 900; font-size: 18px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.logo span { color: var(--accent); }
.ico { flex: none; }
.side { position: fixed; inset: 0 auto 0 0; width: 240px; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px 14px; z-index: 20; overflow-y: auto; }
.side-top { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; padding: 2px 10px 18px; }
.side-top .logo { white-space: normal; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.side-close { display: none; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: 14px; }
.side-nav a:hover { background: var(--hover); color: var(--ink); }
.side-nav a.on { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent); font-weight: 700; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.side-foot form { margin: 0; }
.side-foot .switch select { width: 100%; max-width: none; }
.side-who { display: grid; padding: 0 10px; font-size: 13px; line-height: 1.35; min-width: 0; }
.side-who strong, .side-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-who span { color: var(--ink-soft); }
.side-out { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink-soft); font: 500 14px var(--font-body); cursor: pointer; text-align: left; }
.side-out:hover { background: var(--hover); color: var(--ink); }
.side-guest { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px; }
.side-guest a:not(.btn) { text-decoration: none; font-weight: 500; }
.main { margin-left: 240px; min-width: 0; }
.nav-toggle, .mbar, .scrim { display: none; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 28px 24px 64px; }
.wrap.wide { max-width: 1280px; }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent-fill); color: #fff; border: 1px solid var(--accent-fill); border-radius: 10px; padding: 11px 18px; font: 600 15px var(--font-body); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(0.95); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.danger { background: var(--danger-fill); border-color: var(--danger-fill); }
.btn.small { padding: 7px 12px; font-size: 14px; border-radius: 8px; }
button.link { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; font-weight: 500; }
form.inline { display: inline; }
.stack { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 14px; }
label.inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 20px; flex-wrap: wrap; }
legend { font-weight: 500; font-size: 14px; margin-bottom: 6px; padding: 0; }
input, select, textarea { font: 15px var(--font-body); padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--ink); width: 100%; }
input[type="radio"], input[type="checkbox"] { width: auto; }
input[type="color"] { height: 44px; padding: 4px; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, var(--surface)); border-color: var(--accent); }
input:disabled { background: var(--fill); color: var(--ink-soft); }
small { font-weight: 400; }

/* Text helpers */
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.center { text-align: center; }
.empty { padding: 24px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.err-text { color: var(--err-ink); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }

/* Cards and layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.card h2:first-child { margin-top: 0; }
.card.narrow { max-width: 460px; margin: 24px auto; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 28px; align-items: start; }
.grid-2 > section > h2:first-child { margin-top: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; }

.flash { padding: 10px 14px; border-radius: 8px; margin: 0 0 16px; font-size: 14px; }
.flash.ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash.err { background: var(--err-bg); color: var(--err-ink); }
.flash.warn { background: var(--warn-bg); color: var(--warn-ink); }
.flash.dev { background: var(--info-bg); color: var(--info-ink); word-break: break-all; }

/* Homepage */
.hero { padding: 40px 0 16px; max-width: 720px; }
.hero h1 { font-size: 40px; line-height: 1.12; margin-bottom: 16px; }
.eyebrow { color: var(--accent); font-weight: 600; margin: 0 0 8px; }
.lead { font-size: 18px; color: var(--ink-soft); margin: 0 0 24px; }
.steps { padding-left: 22px; display: grid; gap: 10px; max-width: 720px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; max-width: 720px; }
details summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--ink-soft); }

/* Upload */
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 22px; text-align: center; cursor: pointer; font-weight: 500; color: var(--ink-soft); }
.drop:hover { border-color: var(--accent); }
.drop input { border: 0; padding: 0; margin: 0 auto 6px; max-width: 260px; }
.progress { background: var(--fill); border-radius: 8px; overflow: hidden; position: relative; height: 34px; }
.progress .bar { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); height: 100%; width: 0; transition: width 0.3s; }
.progress-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }

/* Status pills */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.submitted { background: var(--neutral-bg); color: var(--neutral-ink); }
.pill.approved { background: var(--ok-bg); color: var(--ok-ink); }
.pill.rejected { background: var(--err-bg); color: var(--err-ink); }
.pill.live { background: var(--accent-fill); color: #fff; }

/* Creator video list */
.video-list { display: grid; gap: 12px; }
.video-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.video-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.caption { margin: 8px 0 4px; font-weight: 500; overflow-wrap: anywhere; }
.reason { background: var(--err-bg); color: var(--err-ink); padding: 8px 10px; border-radius: 8px; margin: 8px 0 0; }

/* Admin library */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters select { width: auto; min-width: 150px; }
.library { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.tile video { width: 100%; background: #111; display: block; aspect-ratio: 9 / 16; max-height: 420px; object-fit: contain; }
.tile video.ar-16x9 { aspect-ratio: 16 / 9; }
.tile video.ar-1x1 { aspect-ratio: 1; }
.tile video.ar-4x5 { aspect-ratio: 4 / 5; }
.tile-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.tile-body p { margin: 2px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; align-items: flex-start; }
.reject { border: 0; padding: 0; margin: 0; background: none; flex-basis: auto; }
.reject[open] { flex-basis: 100%; }
.reject summary { list-style: none; }
.reject summary::-webkit-details-marker { display: none; }
.reject form { margin-top: 8px; }

/* Stats and tables */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat span { display: block; color: var(--ink-soft); font-size: 13px; }
.stat strong { font: 900 24px var(--font-head); }
.tabs { display: flex; gap: 4px; background: var(--fill); padding: 4px; border-radius: 10px; overflow-x: auto; }
.tabs a { padding: 6px 12px; border-radius: 7px; text-decoration: none; color: var(--ink-soft); white-space: nowrap; font-size: 14px; font-weight: 500; }
.tabs a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--ink-soft); font-size: 13px; background: var(--subtle); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.pay-form, .rate-form { display: flex; gap: 6px; flex-wrap: wrap; min-width: 280px; }
.pay-form input, .rate-form input, .rate-form select { width: auto; padding: 6px 8px; font-size: 14px; }
.pay-form input[name="amount"], .rate-form input { max-width: 90px; }
.pay-form input[name="reference"] { max-width: 150px; }

@media (max-width: 820px) {
  .main { margin-left: 0; }
  .mbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
  .mbar .logo { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .menu-btn { display: inline-flex; flex-direction: row; flex: none; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--ink); cursor: pointer; background: var(--surface); }
  .nav-toggle { display: block; position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
  .nav-toggle:focus-visible ~ .mbar .menu-btn, .nav-toggle:focus-visible ~ .side .side-close { outline: 2px solid var(--accent); outline-offset: 2px; }
  .side { width: min(280px, 84vw); transform: translateX(-100%); visibility: hidden; transition: transform 0.2s ease, visibility 0.2s; box-shadow: 0 10px 40px rgba(10, 37, 64, 0.18); }
  .side-close { display: flex; flex: none; padding: 6px; margin: -6px -6px -6px 0; border-radius: 8px; color: var(--ink-soft); cursor: pointer; }
  .nav-toggle:checked ~ .side { transform: none; visibility: visible; }
  .nav-toggle:checked ~ .scrim { display: block; position: fixed; inset: 0; background: rgba(10, 37, 64, 0.35); z-index: 15; }
  body.app:has(.nav-toggle:checked) { overflow: hidden; }
  .wrap { padding: 20px 16px 48px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .card { padding: 18px; }
  .card.narrow { margin: 8px auto; }
  .library { grid-template-columns: 1fr; }
  .filters, .filters select { width: 100%; }
}

/* ---------- Public homepage (Stripe-style: white, purple, a skewed gradient band) ---------- */
body.site { background: var(--surface); }
.site-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.site-top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.85); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid rgba(227, 232, 238, 0.7); }
.site-top .site-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.site-nav { display: flex; gap: 24px; flex: 1; }
.site-nav a, .site-signin { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.site-nav a:hover, .site-signin:hover { color: var(--accent); }
.site-actions { display: flex; align-items: center; gap: 18px; white-space: nowrap; }
.btn { border-radius: 999px; font-family: var(--font-body); font-weight: 700; }
.btn.small { border-radius: 999px; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }

.hero-band { position: relative; padding: 96px 0 150px; }
/* The slant is cut with clip-path from the band's own bottom corners, so its lowest point is always
   below the text (left) and it can never cross a line of copy at any width. */
.hero-grad { position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 170px), 0 100%); z-index: 0;
  background: radial-gradient(at 88% 18%, rgba(255, 110, 196, 0.55) 0, transparent 45%), radial-gradient(at 78% 85%, rgba(144, 224, 255, 0.45) 0, transparent 40%),
    linear-gradient(125deg, #3a2fc4 0%, #4f46e5 30%, #635bff 55%, #7c3aed 80%, #8b3fd9 100%); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.hero-band h1 { font-size: 56px; line-height: 1.05; letter-spacing: -0.035em; font-weight: 900; color: #fff; margin: 0 0 20px; }
.hero-copy { color: #fff; }
.hero-band .eyebrow { color: #fff; opacity: 0.9; }
.hero-band .lead { color: #fff; opacity: 0.92; font-size: 19px; max-width: 540px; }
.hero-signin { margin: 18px 0 0; color: rgba(255, 255, 255, 0.85); font-size: 15px; }
.hero-signin a { color: #fff; font-weight: 700; }
.btn.white { background: #fff; color: var(--accent-fill); border-color: #fff; }
.btn.outline-white { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.85); }
.btn.outline-white:hover { background: rgba(255, 255, 255, 0.12); filter: none; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 15px; margin: 0 0 12px; }
.lead { font-size: 18px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 28px; }
.small-lead { font-size: 17px; }

.mock { background: var(--surface); border-radius: 14px; box-shadow: 0 50px 100px -20px rgba(50, 50, 93, 0.25), 0 30px 60px -30px rgba(0, 0, 0, 0.3); overflow: hidden; }
.mock-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--subtle); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock-body { padding: 18px; display: grid; gap: 10px; }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 4px; }
.mock-stats div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.mock-stats span { display: block; font-size: 12px; color: var(--ink-soft); }
.mock-stats strong { font-size: 18px; font-weight: 900; }
.mock-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; }
.mock-row p { margin: 0; font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-row small { grid-column: 2; color: var(--ink-soft); font-size: 12px; }
.mock-row .pill { grid-row: span 2; }

.site-section { padding: 96px 0; }
.site-section.alt { background: var(--bg); }
.site-section h2 { font-size: 38px; line-height: 1.15; letter-spacing: -0.03em; margin: 0 0 32px; font-weight: 900; }
.flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.flow li { border-top: 2px solid var(--line); padding-top: 18px; position: relative; }
.flow li::before { content: ""; position: absolute; top: -2px; left: 0; width: 40px; height: 2px; background: var(--accent-fill); }
.flow .num { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); font-weight: 700; font-size: 14px; align-items: center; justify-content: center; }
.flow h3 { font-size: 18px; margin: 12px 0 6px; }
.flow p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.split h2 { font-size: 30px; margin-bottom: 20px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { padding-left: 30px; position: relative; color: var(--ink-soft); }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.formula { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: 0 13px 27px -5px rgba(50, 50, 93, 0.12); display: grid; gap: 12px; }
.formula > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.formula span { color: var(--ink-soft); }
.formula strong { font-size: 26px; font-weight: 900; color: var(--accent); }
.formula p { margin: 0; }
.narrow-inner { max-width: 760px; }
.site-section details { max-width: none; border-radius: 12px; padding: 16px 20px; }
.site-section details summary { font-size: 16px; }
.site-foot { border-top: 1px solid var(--line); padding: 28px 0; color: var(--ink-soft); font-size: 14px; }
.site-foot .site-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-foot a { color: var(--ink-soft); text-decoration: none; }

/* ---------- Sign in / sign up (Stripe-style centered card) ---------- */
body.auth { background: var(--surface); min-height: 100vh; display: flex; flex-direction: column; position: relative; overflow-x: hidden; }
.auth-bg { position: absolute; left: 0; right: 0; top: 0; height: 420px; transform: skewY(-6deg); transform-origin: 0; z-index: 0;
  background: linear-gradient(120deg, #7a73ff 0%, #635bff 35%, #a960ee 70%, #ff6ec4 100%); opacity: 0.9; }
.auth-top { position: relative; z-index: 1; padding: 28px 32px; }
.auth-top .logo { color: #fff; font-size: 20px; }
.auth-top .logo span { color: #fff; opacity: 0.8; }
.auth-main { position: relative; z-index: 1; flex: 1; padding: 8px 16px 48px; }
.auth .card.narrow { max-width: 440px; margin: 24px auto; padding: 40px; border: 0; border-radius: 8px; box-shadow: 0 15px 35px 0 rgba(60, 66, 87, 0.08), 0 5px 15px 0 rgba(0, 0, 0, 0.12); }
.auth .card h1 { font-size: 24px; }
.auth .btn { width: 100%; border-radius: 8px; }
.auth input, .auth select, .auth textarea { border-radius: 6px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03); }
.auth-foot { position: relative; z-index: 1; display: flex; gap: 20px; justify-content: center; padding: 20px; font-size: 14px; }
.auth-foot a { color: var(--ink-soft); text-decoration: none; }

@media (max-width: 900px) {
  .site-nav { display: none; }
  .site-top .site-inner { justify-content: space-between; gap: 12px; }
  .hero-grid, .split { grid-template-columns: 1fr; gap: 40px; }
  .hero-band { padding: 48px 0 72px; }
  .hero-grad { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 56px), 0 100%); }
  .hero-band { padding-bottom: 88px; }
  .hero-band h1 { font-size: 38px; }
  .flow { grid-template-columns: 1fr; gap: 24px; }
  .site-section { padding: 64px 0; }
  .site-section h2 { font-size: 30px; }
  .site-inner { padding: 0 16px; }
}
@media (max-width: 480px) {
  .site-signin { display: none; }
  .auth .card.narrow { padding: 28px 22px; }
  .auth-top { padding: 20px 16px; }
  .mock-stats strong { font-size: 15px; }
}

.mock-bar { align-items: center; }
.mock-bar span { margin-left: 8px; font-size: 12px; color: var(--ink-soft); font-weight: 500; }
.pill.paused { background: var(--paused-bg); color: var(--paused-ink); }

/* Feature rows with product illustrations */
.feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; padding: 48px 0; border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: 0; }
.feature.flip .feature-text { order: 2; }
.feature-step { display: flex; align-items: center; gap: 10px; color: var(--accent); font-weight: 700; margin: 0 0 10px; }
.feature-step .num { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-fill); color: #fff; font-size: 14px; align-items: center; justify-content: center; }
.feature h3 { font-size: 28px; letter-spacing: -0.02em; margin: 0 0 12px; font-weight: 900; }
.feature-text p:last-child { color: var(--ink-soft); font-size: 17px; line-height: 1.6; margin: 0; }
.feature-vis { background: linear-gradient(135deg, #f0eeff 0%, var(--bg) 60%, #fdf0fa 100%); border-radius: 18px; padding: 36px; display: flex; justify-content: center; }
.vis-card { background: #fff; border-radius: 12px; padding: 18px; width: 100%; max-width: 420px; box-shadow: 0 30px 60px -20px rgba(50, 50, 93, 0.25), 0 18px 36px -18px rgba(0, 0, 0, 0.2); display: grid; gap: 12px; }
.vis-card.tight { max-width: 360px; }
.vis-label { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.vis-file { display: flex; gap: 12px; align-items: center; border: 1px dashed #c9c6ff; background: #f7f6ff; border-radius: 10px; padding: 12px; }
.vis-file-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.vis-file strong, .vis-ad-row strong, .vis-pay strong { display: block; font-size: 14px; }
.vis-file small, .vis-ad-row small, .vis-pay small, .vis-field small { color: var(--ink-soft); font-size: 12px; }
.vis-field { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: grid; }
.vis-field span { font-size: 14px; font-weight: 500; }
.vis-progress { position: relative; height: 34px; background: #f1f2f6; border-radius: 8px; overflow: hidden; }
.vis-progress div { height: 100%; background: linear-gradient(90deg, #b9b5ff, #8f88ff); }
.vis-progress span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.vis-review { display: flex; gap: 20px; align-items: center; background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 30px 60px -20px rgba(50, 50, 93, 0.25); max-width: 460px; width: 100%; }
.vis-phone { width: 140px; flex: none; aspect-ratio: 9 / 16; border-radius: 14px; position: relative; overflow: hidden; display: flex; align-items: flex-end;
  background: radial-gradient(at 30% 25%, #ffd6a5 0, transparent 45%), radial-gradient(at 70% 70%, #a5b4fc 0, transparent 50%), linear-gradient(160deg, #f9a8d4, #818cf8); }
.vis-phone p { margin: 0; padding: 10px; color: #fff; font-size: 12px; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
.vis-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.vis-review-side { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.vis-review-side small { color: var(--ink-soft); font-size: 12px; }
.vis-buttons { display: flex; gap: 8px; margin-top: 4px; }
.vis-btn { display: inline-flex; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 700; background: #fff; white-space: nowrap; }
.vis-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.vis-btn.big { padding: 12px 20px; font-size: 15px; box-shadow: 0 10px 24px -8px rgba(99, 91, 255, 0.6); }
.vis-note { background: #f7f6ff; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-top: 4px; }
.vis-note small { display: block; }
.vis-meta { display: flex; align-items: center; gap: 16px; width: 100%; justify-content: center; }
.vis-arrow { font-size: 26px; color: var(--accent); font-weight: 700; }
.vis-ad-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.vis-ad-row strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vis-ad-row > div { min-width: 0; }
.vis-ad-row.faded { opacity: 0.55; }
.vis-thumb { width: 28px; height: 44px; border-radius: 4px; background: linear-gradient(160deg, #f9a8d4, #818cf8); }
.vis-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vis-stats div { background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.vis-stats small { display: block; color: var(--ink-soft); font-size: 12px; }
.vis-stats strong { font-size: 17px; font-weight: 900; }
.vis-bars { display: flex; align-items: flex-end; gap: 6px; height: 90px; padding: 0 2px; border-bottom: 1px solid var(--line); }
.vis-bars i { flex: 1; background: linear-gradient(180deg, #8f88ff, var(--accent)); border-radius: 4px 4px 0 0; }
.vis-table { display: grid; grid-template-columns: 1fr auto auto; gap: 8px 16px; font-size: 13px; }
.vis-table span:nth-child(3n + 1) { font-weight: 700; }
.vis-table span:nth-child(3n) { color: var(--accent); font-weight: 700; }
.vis-pay { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }

/* Get started: one door for creators, one for brands */
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.door { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: 0 13px 27px -5px rgba(50, 50, 93, 0.1); display: flex; flex-direction: column; gap: 18px; }
.door h3 { font-size: 24px; margin: 0; font-weight: 900; }
.door .checks { flex: 1; }
.door-tag { align-self: flex-start; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); font-weight: 700; font-size: 13px; padding: 4px 12px; border-radius: 999px; }

/* Creator / Brand switch on auth cards */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--fill); border-radius: 10px; padding: 4px; margin-bottom: 24px; }
.seg a { text-align: center; padding: 9px; border-radius: 7px; text-decoration: none; color: var(--ink-soft); font-weight: 700; font-size: 14px; }
.seg a.on { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }

/* Settings invite link, brand switcher */
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; font-size: 14px; }
.switch select { width: auto; max-width: 220px; padding: 6px 10px; font-size: 14px; }

@media (max-width: 900px) {
  .feature, .doors { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .feature-text { order: 0; }
  .feature { padding: 36px 0; }
  .feature h3 { font-size: 24px; }
  .feature-vis { padding: 20px 14px; }
  .vis-meta { flex-direction: column; }
  .vis-arrow { transform: rotate(90deg); }
  .door { padding: 24px; }
}
@media (max-width: 480px) {
  .vis-phone { width: 104px; }
  .vis-review { gap: 12px; padding: 12px; }
  .vis-pay { grid-template-columns: 1fr auto; }
  .vis-pay > :last-child { grid-column: 1 / -1; justify-self: start; }
  .switch select { max-width: 140px; }
}

/* Demo: buttons on public pages, banner inside the app */
.demo-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 16px; font-size: 14px; color: var(--ink-soft); justify-content: center; }
.demo-links form { margin: 0; }
.demo-links button.link { font-weight: 700; font-size: 14px; }
.demo-links.hero { justify-content: flex-start; margin-top: 10px; color: rgba(255, 255, 255, 0.85); font-size: 15px; }
.demo-links.hero button.link { color: #fff; text-decoration: underline; text-underline-offset: 3px; font-size: 15px; }
.demo-card { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-top: 20px; padding: 14px 16px; border-radius: 10px; background: var(--info-bg); border: 1px solid #e4e1ff; }
.demo-card div { display: grid; gap: 2px; flex: 1 1 200px; font-size: 14px; }
.demo-card span { color: var(--ink-soft); }
.demo-card form { margin: 0; }
.auth .demo-card .btn { width: auto; border-radius: 999px; }
.door .demo-card { margin-top: 0; }
.demo-banner { background: var(--banner-bg); color: #fff; padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; font-size: 14px; }
.demo-banner p { margin: 0; }
.demo-banner-actions { display: flex; align-items: center; gap: 16px; }
.demo-banner-actions a:not(.btn) { color: #fff; opacity: 0.85; font-weight: 500; }
.demo-banner.flash-blocked { background: #5b21b6; }
@media (max-width: 820px) {
  .demo-banner { padding: 10px 16px; }
}

/* How it works: For creators / For brands toggle (CSS only) */
.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; opacity: 0; pointer-events: none; }
.how-seg { max-width: 360px; margin: -8px 0 16px; }
.how-seg label { text-align: center; padding: 10px; border-radius: 7px; color: var(--ink-soft); font-weight: 700; font-size: 15px; cursor: pointer; }
#how-creators:checked ~ .how-seg label[for="how-creators"],
#how-brands:checked ~ .how-seg label[for="how-brands"] { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
#how-creators:focus-visible ~ .how-seg label[for="how-creators"],
#how-brands:focus-visible ~ .how-seg label[for="how-brands"] { outline: 2px solid var(--accent); }
.how-brands, #how-brands:checked ~ .how-creators { display: none; }
#how-brands:checked ~ .how-brands { display: block; }
.vis-btn.block { justify-content: center; padding: 10px; }
.vis-status { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.vis-status .pill { grid-row: span 2; }
.vis-status strong { font-size: 14px; }
.vis-status small { color: var(--ink-soft); font-size: 12px; }
.vis-connect, .vis-person { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.vis-person { grid-template-columns: auto 1fr; }
.vis-connect strong, .vis-person strong { display: block; font-size: 14px; }
.vis-connect small, .vis-person small { color: var(--ink-soft); font-size: 12px; }
.vis-logo { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; }
.vis-logo.meta { background: #1877f2; }
.vis-logo.drive { background: linear-gradient(135deg, #34a853, #fbbc04 55%, #4285f4); font-size: 14px; }
.vis-avatar { width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 15%, white); color: var(--accent); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.vis-copy { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 6px 6px 12px; font-size: 13px; }
.vis-copy span:first-child { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-soft); }
.vis-status .pill.rejected { white-space: nowrap; }
.vis-meta .vis-card { flex: 1 1 280px; min-width: 0; }
.vis-meta .vis-btn.big { flex: none; }
.vis-meta { flex-direction: column; gap: 10px; }
.vis-meta .vis-card { flex: none; width: 100%; max-width: 400px; }
.vis-arrow { transform: rotate(90deg); }

/* Mobile number field (sign-up, profile) and WhatsApp links (Creators). */
.phone-field { flex-direction: column; gap: 6px; }
.phone-row { display: flex; gap: 8px; }
.phone-row select { width: auto; flex: 0 1 auto; max-width: 48%; }
.phone-row input { flex: 1; min-width: 0; }
.phone-links { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; white-space: nowrap; }

/* "Continue with Google" (Google's branding: white, 1px #747775 border, Roboto-like 14px medium, the G at 18px). */
.google-form { margin: 16px 0 0; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 44px; padding: 0 12px; background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 8px; font: 500 14px/20px "Roboto", var(--font-body); letter-spacing: .25px; cursor: pointer; }
.google-btn:hover { background: #f8f9fa; box-shadow: 0 1px 2px rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15); }
.google-btn:focus-visible { outline: 2px solid #0b57d0; outline-offset: 2px; }
.google-btn svg { flex: none; }
.or-line { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--ink-soft); font-size: 13px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Google profile picture next to your name in the sidebar. */
.side-who.has-av { grid-template-columns: 32px minmax(0, 1fr); column-gap: 10px; }
.side-who.has-av > * { grid-column: 2; }
.side-who .side-av { grid-column: 1; grid-row: 1 / span 3; align-self: center; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

/* /privacy and /terms */
.legal { max-width: 760px; padding-top: 40px; padding-bottom: 64px; line-height: 1.6; }
.legal h1 { margin: 12px 0 4px; }
.legal h2 { margin-top: 32px; font-size: 20px; }
.legal ul { padding-left: 20px; }
.legal li { margin: 6px 0; }
.legal-draft { background: #fff4d6; border: 1px solid #f0c75e; border-radius: 8px; padding: 10px 14px; color: #5c4400; }
.legal-links { margin-top: 40px; }

/* Creator sign-up: the five steps as a compact strip */
.cs-mini { list-style: none; padding: 12px 6px; margin: 4px 0 20px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; background: var(--info-bg); border: 1px solid #e4e1ff; border-radius: 10px; }
.cs-mini li { display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center; min-width: 0; }
.cs-mini-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-fill); color: #fff; }
.cs-mini-text { font-size: 12px; line-height: 1.25; font-weight: 700; color: var(--ink); }
.cs-mini-n { color: var(--accent); }

/* ---------- Light / Dark / System switch (src/ui/theme.tsx, public/theme.js) ---------- */
.theme-sw { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; margin: 0; padding: 3px; border: 0; background: var(--fill); border-radius: 10px; }
.theme-sw legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.theme-sw button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; padding: 6px 4px; border: 0; border-radius: 7px; background: none; color: var(--ink-soft); font: 600 12.5px var(--font-body); cursor: pointer; white-space: nowrap; }
.theme-sw button:hover { color: var(--ink); }
.theme-sw button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.theme-sw button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.side-foot .theme-sw { margin: 0 2px; }
.theme-sw.big { max-width: 420px; padding: 4px; }
.theme-sw.big button { padding: 9px 8px; font-size: 14px; gap: 7px; }

/* ---------- Dark mode ----------
   The same tokens twice: once for an explicit choice (<html data-theme="dark">, set from the user's
   saved preference / the theme cookie), once for "System" (no data-theme) when the device is dark.
   Public pages (home, sign-in, legal) carry data-theme="light" and never go dark. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent: color-mix(in srgb, var(--brand-accent) 70%, #fff);
  --accent-fill: var(--brand-accent);
  --ink: #e6e9f5;
  --ink-soft: #a4abc4;
  --ink-faint: #767d99;
  --line: #2a2f4a;
  --line-strong: #3d4466;
  --bg: #0f1222;
  --surface: #171a2e;
  --subtle: #13162a;
  --hover: #20243c;
  --fill: #232842;
  --field: #12152a;
  --neutral-bg: #262b45;
  --neutral-ink: #c5cae0;
  --info-bg: #25244d;
  --info-ink: #c0bcff;
  --ok-bg: #12301f;
  --ok-ink: #6ee3a0;
  --ok-line: #1f5236;
  --err-bg: #3a1a1f;
  --err-ink: #ff8f86;
  --err-line: #5c2a2f;
  --warn-bg: #352a10;
  --warn-ink: #f4cd6c;
  --warn-line: #7a5f1c;
  --paused-bg: #3a2a12;
  --paused-ink: #f7b267;
  --gold-soft: #3a3214;
  --gold-line: #6b5a1e;
  --silver-soft: #262b40;
  --bronze-soft: #3a2618;
  --up: #6ee3a0;
  --down: #ff9e6b;
  --inverse-bg: #e6e9f5;
  --inverse-ink: #0f1222;
  --banner-bg: #2a2670;
  --danger-fill: #d93a30;
  --acct-brand-ink: #b4b0ff;
  --acct-creator-ink: #5fd7b5;
  --logo-accent: #8b85ff;
  --grid: #232842;
  --axis: #3d4466;
  --axis-ink: #8f96b3;
  --series-2: #f08a5d;
  --up-ink: #6ee3a0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --accent: color-mix(in srgb, var(--brand-accent) 70%, #fff);
    --accent-fill: var(--brand-accent);
    --ink: #e6e9f5;
    --ink-soft: #a4abc4;
    --ink-faint: #767d99;
    --line: #2a2f4a;
    --line-strong: #3d4466;
    --bg: #0f1222;
    --surface: #171a2e;
    --subtle: #13162a;
    --hover: #20243c;
    --fill: #232842;
    --field: #12152a;
    --neutral-bg: #262b45;
    --neutral-ink: #c5cae0;
    --info-bg: #25244d;
    --info-ink: #c0bcff;
    --ok-bg: #12301f;
    --ok-ink: #6ee3a0;
    --ok-line: #1f5236;
    --err-bg: #3a1a1f;
    --err-ink: #ff8f86;
    --err-line: #5c2a2f;
    --warn-bg: #352a10;
    --warn-ink: #f4cd6c;
    --warn-line: #7a5f1c;
    --paused-bg: #3a2a12;
    --paused-ink: #f7b267;
    --gold-soft: #3a3214;
    --gold-line: #6b5a1e;
    --silver-soft: #262b40;
    --bronze-soft: #3a2618;
    --up: #6ee3a0;
    --down: #ff9e6b;
    --inverse-bg: #e6e9f5;
    --inverse-ink: #0f1222;
    --banner-bg: #2a2670;
    --danger-fill: #d93a30;
    --acct-brand-ink: #b4b0ff;
    --acct-creator-ink: #5fd7b5;
    --logo-accent: #8b85ff;
    --grid: #232842;
    --axis: #3d4466;
    --axis-ink: #8f96b3;
    --series-2: #f08a5d;
    --up-ink: #6ee3a0;
  }
}
