/* RVALY Studio 2 - file location: /assets/style.css
   Dark and light themes: <html data-theme="dark|light">, set by assets/theme.js (follows the device until the visitor picks one). */
:root {
  --bg: #f3f5fb;
  --bg-glow-1: rgba(124, 92, 255, .14);
  --bg-glow-2: rgba(34, 211, 238, .12);
  --surface: rgba(255, 255, 255, .82);
  --surface-solid: #ffffff;
  --sunk: #eef1f8;
  --ink: #0b1020;
  --muted: #5a6479;
  --line: #dfe4ef;
  --blue: #5b3df5;
  --blue-2: #0ea5c6;
  --blue-ink: #ffffff;
  --red: #e11d48;
  --green: #059669;
  --amber: #b45309;
  --film: #0d1324;
  --film-ink: #e8ecf8;
  --gold: #f5c84b;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 30px -12px rgba(30, 30, 80, .18);
  --radius: 14px;
  --side-w: 248px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #060914;
  --bg-glow-1: rgba(124, 92, 255, .22);
  --bg-glow-2: rgba(34, 211, 238, .14);
  --surface: rgba(20, 27, 48, .72);
  --surface-solid: #111830;
  --sunk: rgba(255, 255, 255, .045);
  --ink: #e9eefb;
  --muted: #98a3bd;
  --line: rgba(255, 255, 255, .09);
  --blue: #8b74ff;
  --blue-2: #22d3ee;
  --blue-ink: #0a0d1a;
  --red: #fb7185;
  --green: #34d399;
  --amber: #fbbf24;
  --film: #03050c;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 20px 50px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  background:
    radial-gradient(900px 600px at 0% -10%, var(--bg-glow-1), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, var(--bg-glow-2), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  font: 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Bengali", "Noto Sans Devanagari", "Noto Sans Arabic", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 750; margin: 2rem 0 .8rem; }
h3 { font-size: 1.04rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.grad-text { background: linear-gradient(100deg, var(--blue), var(--blue-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 22px; padding-bottom: 96px; }

/* ---------- app shell: sidebar, top bar, bottom bar ---------- */
.top { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid var(--line); color: var(--ink); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 60px; }
.top-tools { display: flex; align-items: center; gap: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: 1.05rem; letter-spacing: .04em; white-space: nowrap; }
.brand b { font-weight: 800; letter-spacing: 0; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; flex: none; position: relative;
  background: conic-gradient(from 210deg, var(--blue), var(--blue-2), #f472b6, var(--blue));
  box-shadow: 0 6px 18px -6px var(--blue); }
.brand-mark::after { content: ""; position: absolute; inset: 8px; border-radius: 4px; background: var(--bg); clip-path: polygon(20% 10%, 90% 50%, 20% 90%); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.icon-btn:hover { border-color: var(--blue); }
.icon-btn svg { width: 19px; height: 19px; }
.lang-pick { min-height: 40px; height: 40px; width: auto; max-width: 150px; padding: 6px 10px; border-radius: 12px; font-size: .9rem; background: var(--surface); }
.menu-btn { display: none; }

.app { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: calc(100vh - 61px); }
.side { position: sticky; top: 61px; align-self: start; height: calc(100vh - 61px); overflow-y: auto; padding: 16px 12px 24px;
  border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface-solid) 55%, transparent); }
.side h4 { margin: 18px 10px 6px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.side h4:first-child { margin-top: 4px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin: 2px 0; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .94rem; font-weight: 550; }
.side a:hover { background: var(--sunk); }
.side a[aria-current="page"] { background: linear-gradient(100deg, color-mix(in srgb, var(--blue) 22%, transparent), color-mix(in srgb, var(--blue-2) 12%, transparent));
  color: var(--ink); box-shadow: inset 3px 0 0 var(--blue); }
.side .ico { width: 18px; height: 18px; flex: none; opacity: .85; }
.side-card { margin: 18px 6px 0; padding: 14px; border-radius: 14px; background: linear-gradient(140deg, color-mix(in srgb, var(--blue) 30%, transparent), color-mix(in srgb, var(--blue-2) 18%, transparent)); border: 1px solid var(--line); }
.side-card b { display: block; font-size: 1.25rem; }
.side-card span { color: var(--muted); font-size: .82rem; }
.content { min-width: 0; }
.content .wrap { max-width: 1100px; }

.bottomnav { display: none; }
.scrim { display: none; }

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .menu-btn { display: inline-grid; }
  .side { position: fixed; top: 0; left: 0; z-index: 60; width: min(86vw, 300px); height: 100vh; transform: translateX(-102%);
    transition: transform .25s ease; background: var(--surface-solid); box-shadow: var(--shadow); }
  body.side-open .side { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .45); }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .bottomnav a, .bottomnav button { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; color: var(--muted); text-decoration: none;
    font: inherit; font-size: .7rem; font-weight: 600; background: none; border: 0; border-radius: 10px; cursor: pointer; }
  .bottomnav svg { width: 22px; height: 22px; }
  .bottomnav a[aria-current="page"] { color: var(--blue); background: var(--sunk); }
}

/* ---------- shared pieces ---------- */
.bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.back { display: inline-block; font-size: .9rem; margin-bottom: 4px; }
.panel, .server, .list, .empty, .result, .qitem, fieldset, .table-wrap, .feats article, .look, .plan, .how li, .stat, .solo-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.panel { padding: 20px; margin-bottom: 18px; }
.panel > h2:first-child { margin-top: 0; }
.hint { color: var(--muted); font-size: .88rem; font-weight: 400; }
.lead { max-width: 72ch; color: var(--muted); }
.note { border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; border: 1px solid; overflow-wrap: anywhere; }
.note-ok   { background: color-mix(in srgb, var(--green) 12%, transparent); border-color: color-mix(in srgb, var(--green) 55%, transparent); }
.note-warn { background: color-mix(in srgb, var(--amber) 13%, transparent); border-color: color-mix(in srgb, var(--amber) 55%, transparent); }
.note-err  { background: color-mix(in srgb, var(--red) 12%, transparent); border-color: color-mix(in srgb, var(--red) 55%, transparent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 18px;
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:hover { border-color: var(--blue); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-main { color: #fff; border: 0; background: linear-gradient(100deg, var(--blue), color-mix(in srgb, var(--blue-2) 80%, var(--blue)));
  box-shadow: 0 10px 24px -10px var(--blue); }
.btn-main:hover { box-shadow: 0 14px 30px -10px var(--blue); }
.btn-danger { color: var(--red); }
.btn-danger:hover { border-color: var(--red); }
.btn-big { min-height: 52px; padding: 12px 24px; font-size: 1.05rem; border-radius: 14px; }
.btn-ghost { background: transparent; color: inherit; border-color: color-mix(in srgb, var(--ink) 25%, transparent); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- status words ---------- */
.st { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 700; white-space: nowrap; padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, currentColor 13%, transparent); }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-queued, .st-pending, .st-submitting { color: var(--amber); }
.st-running, .st-processing, .st-in_progress { color: var(--blue); }
.st-done, .st-completed, .st-approved, .st-answered { color: var(--green); }
.st-failed, .st-rejected { color: var(--red); }
.st-canceled, .st-refunded, .st-closed { color: var(--muted); }
.st-review, .st-partial, .st-open { color: var(--blue-2); }
@media (prefers-reduced-motion: no-preference) {
  .st-running::before, .st-processing::before, .st-in_progress::before, .server.is-on .lamp { animation: tally 1.4s ease-in-out infinite; }
}
@keyframes tally { 50% { opacity: .25; } }

.server { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 20px; }
.lamp { width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--muted); }
.server.is-on .lamp { background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 22%, transparent); }
.server-text { display: grid; gap: 2px; }
.server-text span { color: var(--muted); font-size: .92rem; }

/* ---------- stat cards and charts ---------- */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); margin-bottom: 18px; }
.stat { padding: 16px; position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--blue) 30%, transparent), transparent 70%); }
.stat span { color: var(--muted); font-size: .82rem; font-weight: 600; }
.stat b { display: block; font-size: 1.45rem; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding: 10px 4px 0; }
.bars div { flex: 1; min-width: 6px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--blue), var(--blue-2)); position: relative; }
.bars div:hover::after { content: attr(data-v); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: .72rem; white-space: nowrap;
  background: var(--surface-solid); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; }
.bars-x { display: flex; gap: 6px; font-size: .7rem; color: var(--muted); padding: 4px 4px 0; }
.bars-x span { flex: 1; text-align: center; min-width: 6px; overflow: hidden; }

/* ---------- lists, tables ---------- */
.list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.list li + li { border-top: 1px solid var(--line); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 16px; color: inherit; text-decoration: none; }
.row:hover { background: var(--sunk); }
.row-main { display: grid; gap: 2px; min-width: 0; }
.row-title { font-weight: 650; overflow-wrap: anywhere; }
.row-sub { color: var(--muted); font-size: .86rem; }
.row-side { display: flex; align-items: center; gap: 10px; flex: none; }
.row-pct { font-variant-numeric: tabular-nums; font-size: .85rem; color: var(--muted); }
.mini { width: 64px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.mini i { display: block; height: 100%; background: var(--blue); }
.empty { border-style: dashed; padding: 30px 22px; max-width: 64ch; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 650; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; background: var(--sunk); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--sunk); }
.tbl .off { color: var(--muted); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filters label { flex: 1 1 150px; }

/* ---------- production strip (YouTube videos) ---------- */
.strip { list-style: none; margin: 0 0 12px; padding: 10px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; background: var(--film); border-radius: 12px; }
.strip li { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 4px; border-radius: 8px; text-align: center;
  font-size: .8rem; font-weight: 650; color: #8b96a8; background: rgba(255, 255, 255, .06); }
.strip li.past { background: #e8ecf8; color: #0d1324; }
.strip li.now { background: linear-gradient(100deg, var(--blue), var(--blue-2)); color: #fff; }
.meter { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-2)); transition: width .6s ease; }
[data-status="done"] .meter i { background: var(--green); }
[data-status="queued"] .meter i, [data-status="canceled"] .meter i { background: var(--muted); }
.stage { margin: 8px 0 0; font-variant-numeric: tabular-nums; color: var(--muted); }
.stage [data-pct] { color: var(--ink); font-weight: 700; }
.results { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.result { padding: 14px; min-width: 0; }
.result header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.result video { display: block; width: 100%; max-height: 70vh; background: #000; border-radius: 10px; }
.yt { margin-top: 14px; display: grid; gap: 10px; }
details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 650; padding: 6px 0; }
.script { color: var(--muted); max-width: 70ch; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 6px 18px; margin: 14px 0 0; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.log { list-style: none; margin: 0; padding: 12px 14px; background: var(--film); color: var(--film-ink); border-radius: var(--radius); font-size: .86rem; max-height: 320px; overflow: auto; }
.log li { padding: 2px 0; overflow-wrap: anywhere; }
.log time { color: #8b96a8; font-variant-numeric: tabular-nums; margin-right: 8px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: grid; gap: 12px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px var(--bg); }
.timeline time { color: var(--muted); font-size: .8rem; display: block; }

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; max-width: 780px; }
.form-flat { gap: 12px; }
.form-wide { max-width: 900px; }
fieldset { margin: 0; padding: 18px; display: grid; gap: 12px; min-width: 0; }
legend { font-weight: 750; padding: 0 6px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
input, select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--sunk); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent); }
select option { background: var(--surface-solid); color: var(--ink); }
textarea { resize: vertical; line-height: 1.45; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; padding: 0; flex: none; accent-color: var(--blue); box-shadow: none; }
input[readonly], textarea[readonly] { cursor: copy; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84rem; word-break: break-all; }
pre.code { white-space: pre-wrap; background: var(--film); color: #d6def5; padding: 14px; border-radius: 12px; overflow-x: auto; margin: 8px 0 14px; }
.grid2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.grid3 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; grid-template-columns: none; align-items: center; gap: 8px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--sunk); cursor: pointer; font-weight: 600; }
.chip:has(input:checked) { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 14%, transparent); }
.check, .pick { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; cursor: pointer; }
.pick b { display: block; }
.choice { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.choice .pick { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunk); transition: border-color .15s; }
.choice .pick:has(input:checked) { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent); }
.choice .pick .hint { display: block; }
.steps { margin: 0 0 14px; padding-left: 1.3rem; max-width: 72ch; }
.steps li { margin-bottom: 6px; }
.copied { outline: 3px solid var(--green); }
.inline { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 4px 0; }
.inline input, .inline select { width: auto; min-width: 0; flex: 1 1 90px; min-height: 38px; padding: 6px 9px; }
.inline .btn { min-height: 38px; padding: 6px 12px; }
.cost { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--film); color: var(--gold); font-weight: 700; }
.price-box { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-radius: 12px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--blue) 16%, transparent), color-mix(in srgb, var(--blue-2) 10%, transparent)); border: 1px solid var(--line); }
.price-box b { font-size: 1.35rem; }
.credits-big { font-size: 2.2rem; font-weight: 800; }
.badge { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: linear-gradient(100deg, var(--blue), var(--blue-2)); color: #fff; font-size: .74rem; font-weight: 700; }

/* ---------- studio pages (review, plan a month, create) ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab { min-height: 42px; padding: 8px 14px; font: inherit; font-weight: 650; cursor: pointer; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.tab.is-on { background: linear-gradient(100deg, var(--blue), var(--blue-2)); color: #fff; border-color: transparent; }
.scene-no { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0; margin-top: 0; background: linear-gradient(transparent, var(--bg) 30%); }
.idea { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.idea p { margin-bottom: 6px; }
.idea-list { margin: 0; padding-left: 1.6rem; max-height: 340px; overflow: auto; display: grid; gap: 4px; }
.idea-list b { font-weight: 650; }
.note .actions { margin-top: 10px; }
.niche-hint { margin: 0; font-size: .92rem; }
.qlist { display: grid; gap: 14px; }
.qitem { padding: 16px; min-width: 0; scroll-margin-top: 80px; }
.qitem header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.qprompt { overflow-wrap: anywhere; margin-bottom: 10px; }
.qgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); margin-top: 10px; }
.qgrid figure { margin: 0; display: grid; gap: 6px; align-content: start; }
.qgrid img, .qgrid video { display: block; width: 100%; height: auto; max-height: 60vh; object-fit: contain; background: #000; border-radius: 10px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.thumbs img { width: 84px; height: 84px; object-fit: contain; background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; }
.payinfo { white-space: pre-wrap; font: inherit; background: var(--sunk); border: 1px dashed var(--line); border-radius: 12px; padding: 12px; margin: 0 0 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- sign-in pages ---------- */
.solo { min-height: 100vh; display: grid; place-items: start center; padding: 6vh 16px; }
.solo-card { width: 100%; max-width: 560px; padding: 26px; display: grid; gap: 16px; }
.solo-narrow { max-width: 420px; }
.solo-card form { display: grid; gap: 14px; }
.solo-card .brand { color: var(--ink); }
.solo-tools { position: fixed; top: 12px; right: 12px; display: flex; gap: 8px; }
.checks { list-style: none; margin: 0; padding: 0; font-size: .9rem; display: grid; gap: 3px; }
.checks .ok { color: var(--green); }
.checks .bad { color: var(--red); font-weight: 700; }
.foot { padding-top: 14px; padding-bottom: 28px; color: var(--muted); font-size: .85rem; }
.foot a { color: var(--muted); }

/* ---------- homepage with the 3D scene ---------- */
.home .top { background: color-mix(in srgb, var(--bg) 55%, transparent); }
.home-nav { display: flex; gap: 4px; align-items: center; }
.home-nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .94rem; }
.home-nav a:hover { background: var(--sunk); }
.hero { position: relative; overflow: hidden; padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 30px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); line-height: 1.05; letter-spacing: -.035em; max-width: 16ch; }
.hero-sub { max-width: 58ch; color: var(--muted); font-size: 1.08rem; margin: 18px 0 8px; }
.hero-note { color: var(--muted); font-weight: 600; margin-top: 12px; font-size: .92rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: .82rem; font-weight: 650; color: var(--muted); margin-bottom: 16px; }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 25%, transparent); }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; }
.orb.a { width: 420px; height: 420px; background: var(--blue); top: -120px; right: 10%; }
.orb.b { width: 320px; height: 320px; background: var(--blue-2); bottom: -140px; right: 35%; opacity: .35; }
.stage3d { perspective: 1100px; height: 440px; position: relative; }
.scene3d { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(14deg) rotateY(-22deg); transition: transform .3s ease-out; }
.card3d { position: absolute; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow), 0 40px 80px -30px rgba(40, 20, 120, .45);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: 16px; transform-style: preserve-3d; }
.card3d.main3d { left: 6%; top: 8%; width: 74%; height: 70%; transform: translateZ(0); }
.card3d.phone { right: 2%; top: 22%; width: 34%; height: 74%; transform: translateZ(90px); padding: 10px; border-radius: 26px; }
.card3d.chip3d { left: 0; bottom: 4%; transform: translateZ(140px); padding: 12px 16px; display: flex; gap: 10px; align-items: center; font-weight: 700; }
.card3d.chip3d.two { left: 42%; bottom: -2%; transform: translateZ(60px); }
.mock-bar { display: flex; gap: 6px; margin-bottom: 12px; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.mock-stats div { border-radius: 10px; background: var(--sunk); padding: 10px; font-size: .72rem; color: var(--muted); }
.mock-stats b { display: block; color: var(--ink); font-size: 1rem; }
.mock-chart { height: 46%; display: flex; align-items: flex-end; gap: 6px; }
.mock-chart span { flex: 1; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--blue), var(--blue-2)); opacity: .9; }
.phone-screen { height: 100%; border-radius: 18px; overflow: hidden; position: relative;
  background: radial-gradient(circle at 30% 20%, #f472b6, transparent 50%), radial-gradient(circle at 80% 70%, var(--blue-2), transparent 55%), linear-gradient(160deg, #1e1b4b, #312e81); }
.phone-screen::after { content: ""; position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: rgba(255, 255, 255, .9); clip-path: polygon(38% 28%, 74% 50%, 38% 72%); }
.phone-cap { position: absolute; left: 10px; right: 10px; bottom: 12px; color: #fff; font-size: .72rem; font-weight: 700; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.dot-ok { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--green) 20%, transparent); color: var(--green); font-weight: 800; }
@media (prefers-reduced-motion: no-preference) {
  .card3d.phone { animation: float 6s ease-in-out infinite; }
  .card3d.chip3d { animation: float 7s ease-in-out infinite reverse; }
  .card3d.chip3d.two { animation-duration: 8s; }
}
@keyframes float { 50% { margin-top: -12px; } }
.home section.sec { margin: 48px 0; }
.sec-head { max-width: 640px; margin-bottom: 18px; }
.sec-head h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 8px; }
.feats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.feats article { padding: 20px; transition: transform .2s ease; }
.feats article:hover { transform: translateY(-4px) rotateX(2deg); }
.feats .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 12px; color: #fff;
  background: linear-gradient(140deg, var(--blue), var(--blue-2)); box-shadow: 0 10px 20px -10px var(--blue); }
.feats .ic svg { width: 22px; height: 22px; }
.feats h3 { margin-bottom: 6px; }
.feats p { color: var(--muted); margin: 0; }
.looks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.look { display: grid; gap: 4px; padding: 16px; border-left: 3px solid var(--blue); }
.look span { color: var(--muted); font-size: .92rem; }
.how { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); counter-reset: how; }
.how li { counter-increment: how; padding: 18px; display: grid; gap: 4px; }
.how li::before { content: counter(how); width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(140deg, var(--blue), var(--blue-2)); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 6px; }
.how span { color: var(--muted); }
.plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.plan { display: grid; gap: 6px; align-content: start; padding: 20px; }
.plan.is-picked, .plan.hot { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue), var(--shadow); }
.plan .price { font-size: 2rem; font-weight: 800; margin: 0; }
.plan .price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.plan ul { margin: 0 0 8px; padding-left: 1.1rem; color: var(--muted); }
.cta-band { border-radius: 22px; padding: 34px 26px; text-align: center; color: #fff; background: linear-gradient(120deg, var(--blue), #7c3aed 45%, var(--blue-2)); box-shadow: 0 30px 60px -30px var(--blue); }
.cta-band h2 { margin: 0 0 8px; font-size: clamp(1.4rem, 3vw, 2rem); }
.cta-band .btn { background: #fff; color: #1e1b4b; border: 0; }
.svc-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.svc-card { display: grid; gap: 6px; padding: 16px; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.svc-card:hover { border-color: var(--blue); }
.svc-card b { font-size: 1rem; }
.svc-card .p { font-weight: 800; color: var(--blue); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .stage3d { height: 330px; margin-top: 10px; }
  .home-nav a.hide-sm { display: none; }
}

/* ---------- toasts and skeletons ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: grid; gap: 8px; max-width: min(92vw, 380px); }
@media (max-width: 980px) { .toasts { bottom: 84px; left: 16px; right: 16px; max-width: none; } }
.toast { padding: 12px 14px; border-radius: 12px; background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 600; font-size: .92rem;
  border-left: 4px solid var(--green); animation: toastIn .25s ease; }
.toast.err { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--amber); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.skel { border-radius: 10px; background: linear-gradient(90deg, var(--sunk), color-mix(in srgb, var(--sunk) 40%, var(--line)), var(--sunk)); background-size: 200% 100%; animation: skel 1.2s linear infinite; min-height: 18px; }
@keyframes skel { to { background-position: -200% 0; } }

/* the translator marks text while it works */
html.translating .content, html.translating main { opacity: .75; transition: opacity .2s; }
[dir="rtl"] .side { border-right: 0; border-left: 1px solid var(--line); }

@media (max-width: 560px) {
  .tbl.stack thead { display: none; }
  .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .tbl.stack td { border: 0; padding: 4px 12px; }
  .tbl.stack td.num { text-align: left; }
  .tbl.stack td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: .8rem; }
  h1 { font-size: 1.45rem; }
  .strip { grid-template-columns: repeat(3, 1fr); }
  .row { flex-direction: column; align-items: flex-start; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 8px; }
  .actions .btn { flex: 1 1 auto; }
  .lang-pick { max-width: 104px; }
  .brand-name { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- 2.2.0: Reels studio, calendar grid, quality check, insights ---------- */
.st-planning, .st-rendering, .st-editing, .st-finishing, .st-publishing, .st-scheduled { color: var(--blue); }
.st-draft, .st-approval { color: var(--amber); }
.st-posted { color: var(--green); }
.st-editfail, .st-dead { color: var(--red); }
.st-ignored { color: var(--muted); }
.st-received { color: var(--blue-2); }
.reel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.reel-card { padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.reel-card .cover { width: 100%; aspect-ratio: 9 / 16; max-height: 300px; object-fit: cover; border-radius: 10px; background: var(--sunk); border: 1px solid var(--line); }
.reel-card h3 { margin: 0; font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.reel-video { width: 100%; max-width: 360px; max-height: 70vh; border-radius: 14px; background: #000; display: block; }
.reel-video.wide { max-width: 640px; }
.reel-layout { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .reel-layout { grid-template-columns: 1fr; } }
.hooks { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.hook-card { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sunk); display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.hook-card:has(input:checked) { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent); }
.hook-card b { font-size: 1.02rem; }
.hook-card small, .scene small { color: var(--muted); }
.scene { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; background: var(--surface); }
.scene header { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-weight: 700; }
.qc { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.qc li { padding: 9px 12px; border-radius: 10px; background: var(--sunk); border-left: 4px solid var(--green); font-size: .92rem; }
.qc li.warn { border-left-color: var(--amber); }
.qc li.fail { border-left-color: var(--red); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-h { font-size: .75rem; font-weight: 700; color: var(--muted); text-align: center; text-transform: uppercase; letter-spacing: .05em; }
.cal-d { min-height: 96px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: .8rem; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-d.out { opacity: .45; }
.cal-d.today { border-color: var(--blue); }
.cal-d .n { font-weight: 700; }
.cal-d a { display: block; padding: 2px 6px; border-radius: 6px; background: var(--sunk); color: inherit; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--muted); }
.cal-d a.s-scheduled, .cal-d a.s-publishing { border-left-color: var(--blue); }
.cal-d a.s-posted { border-left-color: var(--green); }
.cal-d a.s-failed { border-left-color: var(--red); }
.cal-d a.s-draft, .cal-d a.s-approval { border-left-color: var(--amber); }
@media (max-width: 640px) { .cal-d { min-height: 64px; font-size: .7rem; padding: 4px; } .cal-d a { padding: 1px 3px; } }
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.int { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunk); display: flex; flex-direction: column; gap: 4px; }
.int b { font-size: .95rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.src-list { font-size: .85rem; margin: 6px 0 0; padding-left: 18px; }
.src-list a { overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; }
.mini-bars { display: flex; align-items: flex-end; gap: 3px; height: 70px; }
.mini-bars i { flex: 1; background: linear-gradient(180deg, var(--blue), var(--blue-2)); border-radius: 3px 3px 0 0; min-height: 2px; }
