/* Cliffhanger — dark cinematic UI */
:root {
  color-scheme: dark;
  --bg: #08080a;
  --bg-2: #0d0d10;
  --surface: #131317;
  --surface-2: #1a1a1f;
  --surface-3: #222229;
  --border: #26262d;
  --border-strong: #363640;
  --text: #f4f3f0;
  --text-2: #bdbcc6;
  --text-3: #8b8a96;
  --accent: #ff3d6e;
  --accent-2: #ff7a3d;
  --accent-soft: rgba(255, 61, 110, 0.13);
  --accent-line: rgba(255, 61, 110, 0.4);
  --money: #3ddc84;
  --good: #0ca30c;
  --good-ink: #4ade80;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #e5484d;
  --info: #3987e5;
  --chart-line: #ff4d7d;
  --chart-bar: #3987e5;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Anton', Impact, 'Haettenschweiler', 'Arial Narrow Bold', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0; }
::selection { background: var(--accent); color: #fff; }
.muted { color: var(--text-3); }
.dim { color: var(--text-2); }
.money { color: var(--money); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: 0.01em; text-transform: uppercase; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 20px 14px; border-right: 1px solid var(--border); background: var(--bg-2); }
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-family: var(--display); font-size: 24px; letter-spacing: 0.04em; text-transform: uppercase; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(255, 61, 110, 0.35); }
.logo-mark svg { width: 18px; height: 18px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-3); padding: 14px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.on { background: var(--accent-soft); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: 0.85; }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: linear-gradient(135deg, #2a2a33, #3a3a46); color: var(--text); flex: none; }
.me-name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.me-role { font-size: 12px; color: var(--text-3); }
.balance-chip { display: block; margin: 0 4px 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.balance-chip:hover { border-color: var(--border-strong); }
.balance-chip .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); }
.balance-chip .v { font-size: 22px; font-weight: 700; }
.main { min-width: 0; }
.page { max-width: 1200px; margin: 0 auto; padding: 32px 36px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; font-weight: 750; }
.page-head p { color: var(--text-2); margin-top: 6px; }
.crumbs { font-size: 13px; color: var(--text-3); margin-bottom: 8px; }
.crumbs a:hover { color: var(--text); }
.demo-banner { background: linear-gradient(90deg, rgba(250, 178, 25, 0.12), rgba(250, 178, 25, 0.03)); border-bottom: 1px solid rgba(250, 178, 25, 0.25); color: #f7d38a; font-size: 13px; padding: 8px 36px; }

/* ---------- public top nav ---------- */
.topnav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 14px 40px; background: rgba(8, 8, 10, 0.78); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.topnav .logo { padding: 0; }
.topnav .links { display: flex; gap: 22px; color: var(--text-2); font-weight: 500; font-size: 14px; }
.topnav .links a:hover { color: var(--text); }
.topnav .right { margin-left: auto; display: flex; gap: 10px; }

/* ---------- buttons, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.05s; }
.btn:hover { background: var(--surface-3); border-color: #45454f; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: linear-gradient(135deg, var(--accent), #ff5a5f); border-color: transparent; color: #fff; box-shadow: 0 8px 24px rgba(255, 61, 110, 0.28); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface); color: var(--text); }
.btn.danger { color: #ff8a8d; border-color: rgba(229, 72, 77, 0.45); background: rgba(229, 72, 77, 0.08); }
.btn.good { color: #86efac; border-color: rgba(12, 163, 12, 0.5); background: rgba(12, 163, 12, 0.1); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.lg { height: 50px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn.block { width: 100%; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field small, .hint { font-size: 12px; color: var(--text-3); }
.input, .select, .textarea { width: 100%; height: 42px; padding: 0 13px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text); outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.textarea { height: auto; min-height: 96px; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-pre { position: relative; }
.input-pre > b { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-weight: 500; pointer-events: none; }
.input-pre > .input { padding-left: 28px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.checks-row { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-2); cursor: pointer; user-select: none; font-size: 14px; }
.toggle input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.toggle:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); gap: 2px; }
.seg button { height: 32px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent; color: var(--text-2); font-weight: 600; font-size: 13px; cursor: pointer; }
.seg button.on { background: var(--surface-3); color: var(--text); }
.err { color: #ff8a8d; font-size: 14px; }

/* ---------- cards, tiles, tables ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h3 { font-size: 16px; font-weight: 700; }
.card-head .sub { font-size: 13px; color: var(--text-3); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.tile .k svg { width: 14px; height: 14px; flex: none; }
.tile .k { font-size: 12px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; display: flex; align-items: center; gap: 6px; }
.tile .v { font-size: 26px; font-weight: 750; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.tile .s { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.tile.tile-hero { background: linear-gradient(140deg, rgba(61, 220, 132, 0.12), rgba(61, 220, 132, 0.02) 60%), var(--surface); border-color: rgba(61, 220, 132, 0.28); }
.tile.tile-hero .v { font-size: 34px; color: var(--money); }
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; padding: 0 12px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.t td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t th.r, .t td.r { text-align: right; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: rgba(255, 255, 255, 0.02); }
.t .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.t .who .avatar { width: 30px; height: 30px; font-size: 12px; }
.link-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; color: var(--text-2); }
.link-cell:hover { color: var(--text); text-decoration: underline; }
.empty { text-align: center; padding: 40px 20px; color: var(--text-3); }
.empty h3 { color: var(--text); font-size: 17px; margin-bottom: 6px; }
.empty .btn { margin-top: 14px; }

/* ---------- pills & badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid; white-space: nowrap; }
.pill svg { width: 13px; height: 13px; }
.pill.good { color: #86efac; border-color: rgba(12, 163, 12, 0.45); background: rgba(12, 163, 12, 0.1); }
.pill.warning { color: #fcd34d; border-color: rgba(250, 178, 25, 0.4); background: rgba(250, 178, 25, 0.08); }
.pill.serious { color: #f6a982; border-color: rgba(236, 131, 90, 0.45); background: rgba(236, 131, 90, 0.1); }
.pill.critical { color: #ff9a9d; border-color: rgba(229, 72, 77, 0.45); background: rgba(229, 72, 77, 0.1); }
.pill.neutral { color: var(--text-2); border-color: var(--border-strong); background: var(--surface-2); }
.pill.info { color: #9cc3f5; border-color: rgba(57, 135, 229, 0.45); background: rgba(57, 135, 229, 0.1); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 13px; font-weight: 500; }
.chip.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text); }
button.chip { cursor: pointer; }
.chip svg { width: 14px; height: 14px; }
.plat { display: inline-flex; width: 26px; height: 26px; border-radius: 8px; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text); flex: none; }
.plat svg { width: 14px; height: 14px; }
.plats { display: inline-flex; gap: 5px; }
.tag { font-family: var(--mono); font-size: 12.5px; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); }

/* ---------- budget bar ---------- */
.budget .bar { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.budget .bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.budget .bar.low span { background: var(--serious); }
.budget-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-3); margin-top: 7px; }
.budget-meta b { color: var(--text); font-weight: 650; }

/* ---------- campaign cards ---------- */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.ccard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s; }
.ccard:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.ccard-poster { position: relative; aspect-ratio: 9 / 16; overflow: hidden; background: #000; } /* the full vertical cover, uncropped */
.ccard-poster img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.ccard-poster::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 18%); pointer-events: none; }
.ccard-rate { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 4px 10px 5px; border-radius: 999px; background: rgba(8, 8, 10, 0.72); border: 1px solid rgba(255, 255, 255, 0.14); backdrop-filter: blur(6px); font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.ccard-rate small { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.75); margin-left: 3px; }
.ccard-flag { position: absolute; top: 10px; right: 10px; z-index: 1; }
.ccard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ccard-studio { font-size: 12px; color: var(--text-3); font-weight: 500; }
.ccard h3 { font-size: 16px; font-weight: 700; }
.ccard .ctitle { font-size: 13.5px; color: var(--text-2); margin-top: 2px; }
.ccard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 8px; }
.cpa { font-size: 12px; font-weight: 600; color: var(--money); }

/* ---------- campaign hero ---------- */
.chero { display: grid; grid-template-columns: 190px 1fr; gap: 28px; align-items: start; margin-bottom: 22px; }
.chero .poster { width: 190px; aspect-ratio: 9 / 16; border-radius: 16px; box-shadow: var(--shadow); object-fit: cover; }
.chero h1 { font-size: 34px; font-weight: 800; margin: 4px 0 4px; }
.chero .lead { color: var(--text-2); max-width: 680px; }
.rates { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.rate { padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); min-width: 120px; }
.rate .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); font-weight: 600; }
.rate .v { font-size: 18px; font-weight: 750; }
.rate.big { background: var(--accent-soft); border-color: var(--accent-line); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs button, .tabs a { height: 42px; padding: 0 14px; border: 0; background: transparent; color: var(--text-3); font-weight: 600; font-size: 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.tabs .on { color: var(--text); border-bottom-color: var(--accent); }
.tabs button:hover { color: var(--text); }
.rules { display: grid; gap: 10px; }
.rule { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.rule svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent); }
.brief { white-space: pre-wrap; color: var(--text-2); line-height: 1.65; }
.hook { display: grid; grid-template-columns: 74px 1fr auto; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border); }
.hook + .hook { margin-top: 10px; }
.ep { text-align: center; border-radius: 10px; padding: 8px 4px; background: var(--surface-3); }
.ep b { display: block; font-size: 20px; font-weight: 800; line-height: 1; }
.ep span { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.hook h4 { font-size: 15px; font-weight: 650; }
.hook p { font-size: 13.5px; color: var(--text-2); margin-top: 2px; }
.ts { font-family: var(--mono); font-size: 12.5px; color: var(--accent); }
.copybox { display: flex; gap: 8px; align-items: stretch; }
.copybox .input { font-family: var(--mono); font-size: 13.5px; }
.caption { padding: 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; }
.caption + .caption { margin-top: 10px; }
.caption p { flex: 1; white-space: pre-wrap; font-size: 14px; color: var(--text-2); }
.locked { position: relative; padding: 32px; text-align: center; border: 1px dashed var(--border-strong); border-radius: 14px; color: var(--text-3); }
.locked svg { width: 26px; height: 26px; margin: 0 auto 8px; color: var(--text-2); display: block; }

/* ---------- check list ---------- */
.checks { display: grid; gap: 6px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; }
.check .ic { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.check .ic svg { width: 11px; height: 11px; }
.check.pass .ic { background: rgba(12, 163, 12, 0.22); color: #86efac; }
.check.fail .ic { background: rgba(229, 72, 77, 0.22); color: #ff9a9d; }
.check.unknown .ic { background: var(--surface-3); color: var(--text-3); }
.check small { display: block; color: var(--text-3); font-size: 12px; }
.flagbox { padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(236, 131, 90, 0.45); background: rgba(236, 131, 90, 0.08); font-size: 13.5px; color: #f6c3ab; display: flex; gap: 10px; }
.flagbox svg { width: 18px; height: 18px; flex: none; color: var(--serious); }

/* ---------- review queue ---------- */
.rq { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.rq + .rq { margin-top: 14px; }
.rq.flagged { border-color: rgba(236, 131, 90, 0.5); }
.rq-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text-3); margin: 6px 0 14px; }
.rq-meta b { color: var(--text); }
.rq-side { display: flex; flex-direction: column; gap: 10px; border-left: 1px solid var(--border); padding-left: 18px; }
.rq-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rq-stats div { background: var(--bg-2); border-radius: 10px; padding: 8px 10px; }
.rq-stats .k { font-size: 11px; color: var(--text-3); }
.rq-stats .v { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-label { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart-tip { position: absolute; pointer-events: none; z-index: 5; background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; box-shadow: var(--shadow); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); opacity: 0; transition: opacity 0.1s; }
.chart-tip b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.chart-tip.show { opacity: 1; }
.hbars { display: grid; gap: 12px; }
.hbar { display: grid; grid-template-columns: 130px 1fr 92px; gap: 12px; align-items: center; font-size: 13.5px; position: relative; }
.hbar .lbl { display: flex; align-items: center; gap: 8px; color: var(--text-2); min-width: 0; }
.hbar .track { height: 22px; position: relative; }
.hbar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--chart-bar); min-width: 2px; }
.hbar .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.hbar .val small { display: block; font-weight: 500; color: var(--text-3); font-size: 11.5px; }
.funnel .fill { background: var(--chart-bar); }
.spark { width: 90px; height: 26px; }

/* ---------- modal & toast ---------- */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade 0.15s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 20px; box-shadow: var(--shadow); animation: pop 0.18s; }
.modal.wide { width: min(820px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 0; }
.modal-head h3 { font-size: 19px; font-weight: 750; }
.modal-body { padding: 18px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 22px; }
.x { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--text-3); cursor: pointer; display: grid; place-items: center; }
.x:hover { background: var(--surface-3); color: var(--text); }
.x svg { width: 18px; height: 18px; }
.ep b svg { width: 18px; height: 18px; margin: 0 auto; }
.link-cell svg { width: 13px; height: 13px; vertical-align: -2px; }
.hint svg, .rule .hint svg { width: 13px; height: 13px; vertical-align: -2px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: 14px; max-width: 380px; animation: pop 0.18s; display: flex; gap: 10px; align-items: flex-start; }
.toast.ok { border-color: rgba(12, 163, 12, 0.5); }
.toast.bad { border-color: rgba(229, 72, 77, 0.55); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } }
.loading { padding: 80px 0; text-align: center; color: var(--text-3); }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--border-strong); border-top-color: var(--accent); animation: spin 0.8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- landing ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 40px 40px; }
.hero::before { content: ''; position: absolute; inset: -20% -10% auto; height: 720px; background: radial-gradient(600px 380px at 75% 30%, rgba(255, 61, 110, 0.22), transparent 70%), radial-gradient(500px 300px at 20% 10%, rgba(255, 122, 61, 0.12), transparent 70%); pointer-events: none; }
.hero-in { position: relative; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.03); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good-ink); box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.15); }
.hero h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(54px, 7.4vw, 104px); line-height: 0.92; letter-spacing: 0.005em; margin: 22px 0 20px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { font-size: 18.5px; color: var(--text-2); max-width: 540px; line-height: 1.55; }
.hero .ctas { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.phones { position: relative; height: 560px; }
.phone { position: absolute; width: 230px; aspect-ratio: 9 / 16; border-radius: 26px; overflow: hidden; border: 6px solid #1c1c22; box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6); background: #000; }
.phone img { width: 100%; height: 100%; object-fit: cover; }
.phone .ov { position: absolute; right: 10px; top: 38px; padding: 7px 11px; border-radius: 12px; background: rgba(10, 10, 12, 0.72); backdrop-filter: blur(8px); font-size: 11px; color: var(--text-2); text-align: right; }
.phone .ov b { display: block; font-size: 17px; color: var(--money); }
.phone:nth-child(1) { left: 0; top: 70px; transform: rotate(-7deg); }
.phone:nth-child(2) { left: 32%; top: 0; z-index: 2; }
.phone:nth-child(3) { right: 0; top: 90px; transform: rotate(7deg); }
.statstrip { max-width: 1200px; margin: 40px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.statstrip div { background: var(--bg-2); padding: 22px 24px; }
.statstrip b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.statstrip span { color: var(--text-3); font-size: 13.5px; }
.section { max-width: 1200px; margin: 0 auto; padding: 72px 40px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section-head h2 { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; }
.section-head p { color: var(--text-2); margin-top: 8px; max-width: 560px; }
.how { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.how .card { padding: 28px; }
.how h3 svg { width: 22px; height: 22px; color: var(--accent); }
.how h3 { font-size: 20px; font-weight: 750; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.steps { display: grid; gap: 16px; counter-reset: s; }
.step { display: grid; grid-template-columns: 34px 1fr; gap: 14px; }
.step::before { counter-increment: s; content: counter(s); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); }
.step b { display: block; font-weight: 650; }
.step span { color: var(--text-2); font-size: 14px; }
.fair { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.fair .card { padding: 20px; }
.fair svg { width: 22px; height: 22px; color: var(--accent); margin-bottom: 10px; }
.fair b { display: block; margin-bottom: 4px; }
.fair span { color: var(--text-2); font-size: 14px; }
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.calc .big { font-size: 56px; font-weight: 800; letter-spacing: -0.03em; color: var(--money); font-variant-numeric: tabular-nums; }
.range { width: 100%; accent-color: var(--accent); }
.footer { max-width: 1200px; margin: 80px auto 0; padding: 28px 40px 50px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; color: var(--text-3); font-size: 13.5px; flex-wrap: wrap; gap: 12px; }

/* ---------- auth ---------- */
.auth { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 30px 16px; }
.auth-card { width: min(440px, 100%); }
.auth-card h1 { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.auth-card .card { padding: 26px; }
.demo-logins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12px; margin: 20px 0; text-transform: uppercase; letter-spacing: 0.1em; }
.or::before, .or::after { content: ''; height: 1px; background: var(--border); flex: 1; }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-pick label { padding: 14px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--bg-2); cursor: pointer; }
.role-pick label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.role-pick input { display: none; }
.role-pick b { display: block; }
.role-pick span { font-size: 13px; color: var(--text-3); }

/* ---------- series grid ---------- */
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.scard img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 14px; border: 1px solid var(--border); }
.scard h4 { font-size: 14.5px; margin-top: 10px; }
.scard p { font-size: 12.5px; color: var(--text-3); }
.palettes { display: flex; gap: 8px; flex-wrap: wrap; }
.palettes label { cursor: pointer; }
.palettes input { display: none; }
.palettes span { display: block; width: 44px; height: 44px; border-radius: 12px; border: 2px solid transparent; }
.palettes input:checked + span { border-color: #fff; }
.code-block { font-family: var(--mono); font-size: 13px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px; overflow-x: auto; white-space: pre; color: var(--text-2); }
.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); width: 0; transition: width 0.2s; }
.acct { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.acct + .acct { margin-top: 10px; }
.acct .plat { width: 40px; height: 40px; border-radius: 12px; }
.acct .plat svg { width: 20px; height: 20px; }
.verify-box { margin-top: 12px; padding: 14px; border-radius: 12px; background: var(--bg-2); border: 1px dashed var(--border-strong); }
.code-chip { font-family: var(--mono); font-size: 18px; font-weight: 700; letter-spacing: 0.08em; padding: 6px 12px; border-radius: 10px; background: var(--surface-3); color: #fff; }
.mobile-nav { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .split, .hero-in, .calc { grid-template-columns: 1fr; }
  .phones { height: 480px; max-width: 560px; margin: 0 auto; width: 100%; }
  .phone { width: 200px; }
  .fair { grid-template-columns: repeat(2, 1fr); }
  .rq { grid-template-columns: 1fr; }
  .rq-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 14px; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .mobile-nav { display: flex; position: sticky; top: 0; z-index: 30; gap: 4px; align-items: center; padding: 10px 16px; background: rgba(13, 13, 16, 0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); overflow-x: auto; }
  .mobile-nav .logo { padding: 0 8px 0 0; font-size: 18px; }
  .mobile-nav .logo-mark { width: 26px; height: 26px; }
  .mobile-nav a.tab { padding: 7px 11px; border-radius: 9px; color: var(--text-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
  .mobile-nav a.tab.on { background: var(--accent-soft); color: var(--text); }
  .page { padding: 22px 16px 70px; }
  .demo-banner { padding: 8px 16px; }
  .g2, .g3, .g4, .how, .form-grid { grid-template-columns: 1fr; }
  .chero { grid-template-columns: 1fr; gap: 14px; }
  .chero .poster { width: 120px; }
  .chero h1 { font-size: 26px; }
  .rates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .rate { min-width: 0; padding: 9px 12px; }
  .rate .v { font-size: 16px; }
  .rq-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .demo-banner { font-size: 12px; }
  .topnav { padding: 12px 16px; gap: 12px; }
  .topnav .links { display: none; }
  .hero { padding: 40px 16px 20px; }
  .section { padding: 56px 16px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head h2 { font-size: 28px; }
  .statstrip { grid-template-columns: repeat(2, 1fr); margin: 30px 16px 0; }
  .fair { grid-template-columns: 1fr; }
  .phones { height: 400px; }
  .phone { width: 160px; border-width: 4px; border-radius: 20px; }
  .footer { padding: 24px 16px 40px; }
  .hook { grid-template-columns: 58px 1fr; }
  .hook > :last-child { grid-column: 1 / -1; }
  .hbar { grid-template-columns: 96px 1fr 76px; }
  .demo-logins { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .table-wrap { margin: 0 -18px; padding: 0 18px; }
}

/* Upgrades: studio updates feed, view reports */
.update { padding: 12px 0; border-top: 1px solid var(--border); }
.update:first-of-type { border-top: 0; padding-top: 0; }
.update p { white-space: pre-wrap; margin: 2px 0 0; color: var(--text-2); }
.claimbox { padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(124, 140, 255, 0.45); background: rgba(124, 140, 255, 0.08); font-size: 13.5px; color: var(--text-2); display: flex; gap: 10px; margin-bottom: 12px; }
.claimbox svg { width: 18px; height: 18px; flex: none; color: #9aa6ff; }
.claimbox a { color: var(--text); text-decoration: underline; }
.pubwrap { max-width: 1040px; margin: 0 auto; padding: 28px 20px 60px; }

/* Clip player */
.player { display: block; margin: 0 auto; width: 100%; max-width: 340px; max-height: 68vh; border-radius: 14px; background: #000; object-fit: contain; }
.hook .acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

/* Ready-to-post versions under a hook moment */
.hook > .ready { grid-column: 1 / -1; display: grid; gap: 6px; padding-top: 12px; border-top: 1px dashed var(--border-strong); }
.ready-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); }
.ready-h svg { width: 14px; height: 14px; color: var(--accent); }
.ready-h span { font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-3); }
.ready-row { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.ready-row > b { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.ready-row .q { font-size: 13.5px; color: var(--text); }
.ready-row .q small { display: block; font-size: 12px; color: var(--text-3); }
.ready-row .acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 720px) {
  .hook > :last-child { grid-column: auto; }
  .hook > .acts, .hook > .ready { grid-column: 1 / -1; }
  .ready-row { grid-template-columns: 26px 1fr; }
  .ready-row .acts { grid-column: 1 / -1; justify-content: flex-start; }
}
/* A downloadable file: title on top, buttons underneath, so long titles don't get squeezed */
.hook.file { grid-template-columns: 1fr; gap: 8px; }
.hook.file .acts { justify-content: flex-start; }
/* Studio dashboard */
.needs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid rgba(250, 178, 25, 0.35); }
.needs > b { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2); margin-right: 4px; display: inline-flex; align-items: center; gap: 6px; }
.needs > b svg { width: 15px; height: 15px; }
.needs.clear { border-color: var(--border); }
.needs a.pill { text-decoration: none; }
.needs a.pill:hover { background: rgba(250, 178, 25, 0.18); }
.trend { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.trend .spark { width: 72px; height: 22px; }
.reasons { margin-top: 14px; display: grid; gap: 6px; font-size: 13.5px; }
.reasons > b { font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); }
.reasons > div { display: flex; justify-content: space-between; gap: 12px; color: var(--text-2); padding-bottom: 6px; border-bottom: 1px solid var(--border); }
@media (max-width: 900px) { .grid.g2 { grid-template-columns: 1fr; } }
.one-line { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Prepaid funding */
.fundnote { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); font-size: 13.5px; color: var(--text-2); }
.fundnote > svg { width: 18px; height: 18px; flex: none; color: #86efac; }
.fundnote > div { flex: 1; min-width: 0; }
.fundnote b { color: var(--text); }
.fundnote.warn { border-color: rgba(250, 178, 25, 0.4); background: rgba(250, 178, 25, 0.07); }
.fundnote.warn > svg { color: #fcd34d; }
.kv { display: grid; gap: 8px; font-size: 14px; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.kv > div > b { color: var(--text); font-variant-numeric: tabular-nums; text-align: right; }
.kv > div.total { border-bottom: 0; font-size: 16px; color: var(--text); }
.kv > div.total > b { color: var(--money, #86efac); }
@media (max-width: 720px) { .fundnote { flex-wrap: wrap; } }
/* Campaign cards on a phone: two vertical covers side by side */
@media (max-width: 560px) {
  .cgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .ccard-body { padding: 10px 12px 12px; gap: 8px; }
  .ccard h3 { font-size: 14.5px; }
  .ccard .ctitle { display: none; }
  .ccard-rate { font-size: 14px; }
}
