/* Themes: paper (default), darkroom, signal. Every color comes from these tokens. */
:root, [data-theme="light"], [data-theme="paper"] {
  --bg: #FDFDFA; --surface: #FFFFFF; --soft: #F2F3EE; --ink: #161716; --muted: #5E5F59; --line: #E2E3DC; --line-strong: #CFD0C8;
  --accent: #161716; --on-accent: #FDFDFA; --band: #161716; --on-band: #F2F2EC; --band-muted: #A9AAA2; --ok: #2F6B3B; --warn: #8A5A00; --bad: #A8322A;
  --display: "Inter", "Helvetica Neue", Arial, sans-serif; --serif: "Instrument Serif", Georgia, serif; --radius: 14px; --stage: #0E0E0F;
}
[data-theme="dark"], [data-theme="darkroom"] {
  --bg: #0B0B0C; --surface: #151517; --soft: #1C1C1F; --ink: #EDEDE8; --muted: #9C9C95; --line: #242427; --line-strong: #34343A;
  --accent: #F2B33D; --on-accent: #0B0B0C; --band: #151517; --on-band: #EDEDE8; --band-muted: #9C9C95; --ok: #7BC48A; --warn: #F2B33D; --bad: #FF8A80;
  --display: "Inter", Arial, sans-serif; --serif: "Inter", Arial, sans-serif; --radius: 18px; --stage: #000;
}
[data-theme="signal"] {
  --bg: #F6F5F0; --surface: #FFFFFF; --soft: #EEEFF6; --ink: #16205A; --muted: #46507F; --line: #DDDCD3; --line-strong: #C9C8BE;
  --accent: #16205A; --on-accent: #FFFFFF; --band: #16205A; --on-band: #F4F4F8; --band-muted: #C9CCE0; --ok: #1E6B45; --warn: #9A4A12; --bad: #B3261E;
  --display: "Space Grotesk", Arial, sans-serif; --serif: "Space Grotesk", Arial, sans-serif; --radius: 16px; --stage: #0E1230;
}
* { box-sizing: border-box; }
html { color-scheme: light; } [data-theme="dark"], [data-theme="darkroom"] { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 Inter, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; } a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; } button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid #4C7BD9; outline-offset: 2px; }
h1, h2, h3, p { margin: 0; } h1, h2, h3 { font-family: var(--display); font-weight: 550; letter-spacing: -0.035em; }
[hidden] { display: none !important; }
.skip { position: fixed; left: 12px; top: -80px; background: var(--surface); padding: 10px 14px; z-index: 50; border-radius: 8px; }
.skip:focus { top: 12px; }
.wrap { max-width: 1296px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 48px); }
.muted { color: var(--muted); } .small { font-size: 14px; } .tiny { font-size: 12.5px; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 500; font-size: 15px; text-decoration: none !important; }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn.danger { color: var(--bad); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Masthead */
.mast { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.mast .row { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -0.04em; }
.brand svg path { fill: var(--ink); }
.mast nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: 15px; }
.mast nav a { color: var(--muted); } .mast nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.mast .acct { display: flex; gap: 8px; align-items: center; }
.credits-pill { font-size: 14px; padding: 7px 12px; border-radius: 999px; background: var(--soft); }
.theme-switch { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--soft); }
.theme-switch button { border: 0; background: transparent; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; }
.theme-switch button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* Home */
.hero { padding: clamp(48px, 8vw, 96px) 0 48px; }
.hero h1 { font-size: clamp(48px, 7vw, 92px); line-height: .96; letter-spacing: -0.06em; max-width: 1000px; }
.hero .lede { margin-top: 24px; font-size: 20px; color: var(--muted); max-width: 640px; }
.composer { margin-top: 36px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); padding: 16px; max-width: 960px; }
.composer textarea { width: 100%; border: 0; resize: vertical; font-size: 19px; background: transparent; outline: none; min-height: 64px; }
.composer .bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; padding-bottom: 80px; }
.gallery figure { margin: 0; } .gallery img, .gallery video { width: 100%; object-fit: cover; border-radius: var(--radius); display: block; background: var(--soft); }
.gallery figcaption { display: flex; justify-content: space-between; font-size: 14px; padding-top: 8px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; padding: 72px 0; border-top: 1px solid var(--line); }
.features h3 { font-size: 20px; margin-bottom: 8px; }
.band { background: var(--band); color: var(--on-band); } .band .muted { color: var(--band-muted); }
.band .inner { padding: 88px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.band h2 { font-size: clamp(36px, 4.5vw, 52px); line-height: 1.02; }
.band .claims div { padding: 18px 0; border-top: 1px solid color-mix(in srgb, var(--on-band) 18%, transparent); }
.section { padding: 88px 0; } .section h2 { font-size: clamp(34px, 4.5vw, 52px); margin-bottom: 32px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.plan.featured { border: 1.5px solid var(--ink); }
.plan .price { font-size: 38px; letter-spacing: -0.04em; font-family: var(--display); }
footer.site { border-top: 1px solid var(--line); } footer.site .row { padding-top: 28px; padding-bottom: 28px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-size: 14px; color: var(--muted); }
footer.site nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* App shell */
.shell { display: flex; flex-wrap: wrap; min-height: calc(100vh - 69px); }
.side { flex: 1 1 200px; max-width: 220px; border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; }
.side a { padding: 10px 12px; border-radius: 10px; font-size: 15px; text-decoration: none; }
.side a[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
.side .wallet { margin-top: auto; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 14px; }
.work { flex: 999 1 520px; min-width: 0; padding: 22px clamp(16px, 2.4vw, 28px); display: flex; flex-direction: column; gap: 18px; }
.panel { flex: 1 1 320px; max-width: 390px; border-left: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 900px) { .side { display: none; } .panel { max-width: none; border-left: 0; border-bottom: 1px solid var(--line); order: 1; } .work { order: 2; } .threads { max-width: none; border-right: 0; border-bottom: 1px solid var(--line); } .mast nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; } }
.seg { display: flex; flex-wrap: wrap; gap: 4px; background: var(--soft); padding: 4px; border-radius: 10px; }
.seg button { flex: 1 1 auto; border: 0; background: transparent; padding: 8px 10px; border-radius: 7px; font-size: 13.5px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--muted); }
.field input, .field textarea, .field select { border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; background: var(--surface); color: var(--ink); font-size: 15px; }
.field textarea { resize: vertical; min-height: 110px; line-height: 1.45; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.models { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.model { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--surface); text-align: left; }
.model[aria-pressed="true"], .model:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.model .meta { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.label-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13px; display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; }
.label-card dt { color: var(--muted); } .label-card dd { margin: 0; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.total strong { font-size: 18px; }
.stage { background: var(--stage); border-radius: var(--radius); overflow: hidden; min-height: 300px; display: grid; place-items: center; color: #CFCFC8; }
.stage video, .stage img { width: 100%; max-height: 62vh; object-fit: contain; display: block; }
.stage audio { width: min(520px, 90%); }
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.card .thumb { aspect-ratio: 16/10; background: var(--soft); display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.card .thumb img, .card .thumb video { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.card .prompt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .actions { display: flex; gap: 4px; flex-wrap: wrap; }
.card[aria-current="true"] { outline: 2px solid var(--ink); }
.state { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--soft); }
.state.succeeded { color: var(--ok); } .state.failed { color: var(--bad); } .state.unconfirmed { color: var(--warn); }
.notice { padding: 12px 14px; border-radius: 10px; background: var(--soft); font-size: 14px; }
.notice.bad { color: var(--bad); }
.picker { display: flex; gap: 8px; flex-wrap: wrap; }
.picker button { width: 72px; height: 54px; padding: 0; border-radius: 8px; border: 1px solid var(--line-strong); overflow: hidden; background: var(--soft); }
.picker button[aria-pressed="true"] { outline: 3px solid var(--ink); }
.picker img { width: 100%; height: 100%; object-fit: cover; }

/* Chat */
.chat { display: flex; flex-wrap: wrap; flex: 1; min-height: 0; }
.threads { flex: 1 1 220px; max-width: 260px; border-right: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.threads button.thread { text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.threads button.thread[aria-current="true"] { background: var(--soft); }
.conv { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; }
.messages { flex: 1; overflow: auto; padding: 24px clamp(16px, 4vw, 64px); display: flex; flex-direction: column; gap: 18px; min-height: 360px; }
.msg { max-width: 760px; white-space: pre-wrap; line-height: 1.6; }
.msg.user { align-self: flex-end; background: var(--soft); padding: 10px 14px; border-radius: 14px; }
.chat-input { border-top: 1px solid var(--line); padding: 14px clamp(16px, 4vw, 64px); display: flex; flex-direction: column; gap: 10px; }
.chat-input textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px; background: var(--surface); min-height: 56px; resize: vertical; }

/* Forms / pages */
.narrow { max-width: 440px; margin: 64px auto; padding: 0 20px; display: flex; flex-direction: column; gap: 16px; }
.doc { max-width: 760px; margin: 0 auto; padding: 56px 20px 96px; display: flex; flex-direction: column; gap: 14px; }
.doc h1 { font-size: 44px; } .doc h2 { font-size: 24px; margin-top: 18px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; } th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); max-width: 460px; padding: 24px; }
dialog::backdrop { background: rgba(0,0,0,.45); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-size: 14px; z-index: 60; max-width: 90vw; }

/* Pop-up player */
dialog.player { max-width: min(1100px, 94vw); width: 100%; padding: 0; overflow: hidden; background: var(--surface); }
dialog.player::backdrop { background: rgba(0,0,0,.78); }
.player-stage { background: #000; display: grid; place-items: center; min-height: 240px; }
.player-stage video, .player-stage img { width: 100%; max-height: 72vh; object-fit: contain; display: block; }
.player-stage audio { width: min(560px, 90%); margin: 60px 0; }
.player-info { display: flex; gap: 12px; align-items: center; padding: 12px 16px; flex-wrap: wrap; font-size: 14px; }
.chat-input select, .work select { border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 10px; background: var(--surface); color: var(--ink); font-size: 14px; }

/* Debate */
.debate-setup { display: flex; flex-direction: column; gap: 10px; }
.debaters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.debater-pick { display: flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 4px 6px 4px 4px; }
.badge { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--soft); white-space: nowrap; }
.badge-a { background: color-mix(in srgb, #4C7BD9 18%, var(--surface)); }
.badge-b { background: color-mix(in srgb, #D9822B 20%, var(--surface)); }
.badge-c { background: color-mix(in srgb, #2F9E6B 18%, var(--surface)); }
.badge-leader { background: var(--ink); color: var(--bg); }
.turn { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; max-width: 820px; }
.turn header { display: flex; gap: 10px; align-items: center; }
.turn.verdict { border: 1.5px solid var(--ink); }
.round-heading { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-family: inherit; margin-top: 6px; }
.btn, .credits-pill { white-space: nowrap; }
@media (max-width: 900px) { .threads { flex-basis: 100%; border-right: 0; } }

/* Home split: chat/debate (white) | video (dark) */
.split { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 69px); }
.split > div { position: relative; display: flex; align-items: center; overflow: hidden; }
.split-inner { position: relative; z-index: 1; padding: clamp(32px, 5vw, 72px); max-width: 640px; display: flex; flex-direction: column; gap: 20px; }
.split h1 { font-size: clamp(40px, 4.6vw, 68px); line-height: .98; letter-spacing: -0.055em; }
.split .lede, .vl-hero .lede { font-size: 18px; margin: 0; }
.split .composer { margin: 0; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.split-chat { background: #FFFFFF; color: #161716; }
.split-chat .eyebrow, .split-chat .lede, .split-chat .muted { color: #5E5F59; }
.split-chat .composer { background: #FFFFFF; border-color: #CFD0C8; color: #161716; }
.split-chat .btn { background: #FFFFFF; color: #161716; border-color: #CFD0C8; }
.split-chat .btn.primary { background: #161716; color: #FFFFFF; border-color: #161716; }
.how { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: #5E5F59; }
.how strong { color: #161716; }
.split-video, .vl-hero { background: #0B0B0C; color: #F2F2EC; }
.split-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.split-video::after, .vl-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,12,.15), rgba(11,11,12,.75)); }
.split-video .eyebrow, .split-video .lede, .vl-hero .eyebrow, .vl-hero .lede { color: #D6D6CF; }
.btn.accent { background: #F2B33D; color: #0B0B0C; border-color: #F2B33D; font-weight: 600; }
.btn.ghost-light { background: transparent; color: #F2F2EC; border-color: rgba(255,255,255,.35); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split > div { min-height: 70vh; } }
/* Video landing */
.vl-hero { position: relative; min-height: 74vh; display: flex; align-items: flex-end; overflow: hidden; }
.vl-inner { position: relative; z-index: 1; padding-bottom: 72px; display: flex; flex-direction: column; gap: 18px; width: 100%; }
.vl-hero h1 { font-size: clamp(48px, 7vw, 100px); line-height: .94; letter-spacing: -0.06em; max-width: 980px; }
.vl-hero .lede { max-width: 620px; }
.vl-gallery { background: #0B0B0C; color: #F2F2EC; padding: 24px 0 72px; }
.vl-gallery h2 { font-size: 36px; margin-bottom: 20px; }
.vl-grid { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; }
.vl-card { margin: 0; position: relative; border-radius: 18px; overflow: hidden; background: #151517; min-height: 220px; }
.vl-card.big { grid-row: span 2; min-height: 452px; }
.vl-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vl-card figcaption { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.vl-card figcaption div { display: flex; flex-direction: column; } .vl-card .tiny { color: #C9C9C2; }
.vl-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 28px; }
.vl-steps > div { border: 1px solid #242427; border-radius: 16px; padding: 22px; background: #151517; }
.vl-steps h3 { font-size: 20px; margin: 6px 0; } .vl-steps p { color: #9C9C95; margin: 0; } .vl-steps .tiny { color: #F2B33D; font-weight: 600; }
@media (max-width: 900px) { .vl-grid { grid-template-columns: 1fr; } .vl-card.big { grid-row: auto; min-height: 260px; } }
.vl-card::after { content: ""; position: absolute; inset: 45% 0 0 0; background: linear-gradient(180deg, transparent, rgba(0,0,0,.7)); pointer-events: none; }
.vl-card figcaption { z-index: 1; }
.split-video h1 { font-size: clamp(40px, 4.1vw, 60px); }
.split h1, .vl-hero h1 { text-wrap: balance; }

/* One-line ask bar */
.askbar { display: flex; gap: 8px; align-items: center; border: 1px solid #CFD0C8; border-radius: 14px; padding: 6px 6px 6px 16px; background: #FFFFFF; }
.askbar input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 17px; background: transparent; color: #161716; padding: 10px 0; }
.askbar:focus-within { border-color: #161716; }
/* Examples inside the video half */
.examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.example { position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: #151517; border: 1px solid rgba(255,255,255,.14); text-decoration: none !important; color: #F2F2EC; }
.example video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.example:hover video { transform: scale(1.04); }
.example::after { content: ""; position: absolute; inset: 40% 0 0 0; background: linear-gradient(180deg, transparent, rgba(0,0,0,.75)); }
.example-label { position: absolute; z-index: 1; left: 10px; right: 10px; bottom: 9px; display: flex; flex-direction: column; font-size: 13px; }
.example-label span { color: #D6D6CF; font-size: 12px; }
.split > div { min-width: 0; }
.split-inner { width: 100%; box-sizing: border-box; }
.split-video .split-inner { max-width: 680px; }
.askbar .btn { flex: none; }
@media (max-width: 520px) { .askbar { flex-wrap: wrap; padding: 6px; } .askbar input { flex-basis: 100%; padding: 10px; } .askbar .btn { flex: 1; } .split > div { min-height: 0; } .split-inner { padding: 40px 20px; } }
.brand { gap: 9px; font-weight: 600; font-size: 22px; letter-spacing: -0.045em; }
.brand img { display: block; width: 28px; height: 28px; }
.split-video .eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .8; margin-bottom: 10px; }
/* Top bar: white in light theme, black in dark theme */
:root, [data-theme="light"], [data-theme="paper"], [data-theme="signal"] { --mast: #FFFFFF; }
[data-theme="dark"], [data-theme="darkroom"] { --mast: #000000; }
.mast { background: var(--mast); }
/* Sign-in */
.auth-card { gap: 18px; }
.auth-stack { display: flex; flex-direction: column; gap: 10px; }
.btn.provider { width: 100%; justify-content: center; gap: 10px; min-height: 48px; background: var(--surface); }
.btn.provider:hover { border-color: var(--ink); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 3px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--ink); }
/* Chat ⇄ Debate in one conversation */
.mode-switch { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mode-switch .tiny { margin-left: 6px; }
.debate-opts { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.debate-opts .mini { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.debate-opts select { border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 8px; background: var(--surface); color: var(--ink); font-size: 13px; }
.msg-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.msg-actions { padding-left: 4px; }
.msg-actions .linkish { font-size: 12.5px; }
.debate-inline { border: 1px solid var(--line-strong); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.debate-inline-head { display: flex; gap: 8px; align-items: center; }
.debate-inline details { display: flex; flex-direction: column; gap: 8px; }
.debate-inline details > article { margin-top: 8px; }
.debate-inline summary { cursor: pointer; color: var(--muted); }
.model-select { max-width: 100%; }
.model-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 3px; }
.model-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line-strong); color: var(--ink); font-size: 13px; }
.model-chip button { border: 0; background: none; padding: 0 2px; font-size: 15px; line-height: 1; color: var(--muted); }
.model-chip button:hover { color: var(--bad); }
.msg-actions { display: flex; gap: 10px; align-items: center; }
.privacy-note { margin: 2px 0 0; }
/* Model picker */
dialog.model-picker { width: min(720px, 94vw); max-width: none; max-height: 84vh; padding: 18px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); color: var(--ink); display: flex; flex-direction: column; gap: 12px; }
dialog.model-picker:not([open]) { display: none; }
dialog.model-picker::backdrop { background: rgba(0,0,0,.45); }
.picker-head { display: flex; justify-content: space-between; align-items: center; }
.picker-head h2 { font-size: 20px; }
dialog.model-picker input[type=search] { border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; background: var(--bg); color: var(--ink); font-size: 15px; }
.picker-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.picker-filters .chip { padding: 5px 11px; font-size: 13px; }
.picker-list { overflow: auto; display: flex; flex-direction: column; gap: 4px; min-height: 120px; }
.picker-row { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; text-align: left; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; background: none; color: inherit; }
.picker-row:hover, .picker-row:focus-visible { background: var(--soft); }
.picker-row[aria-selected="true"] { border-color: var(--ink); }
.picker-name { font-weight: 550; font-size: 15px; }
.picker-meta { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.tag { font-size: 11.5px; padding: 2px 7px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); }
.tag-private { color: var(--ok); border-color: currentColor; background: transparent; }
.tag-anon { color: var(--warn); border-color: currentColor; background: transparent; }
.picker-btn { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-chip .chip-swap { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.model-chip .chip-swap:hover { text-decoration: underline; text-underline-offset: 3px; }
.composer-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.plus-model { width: 32px; height: 32px; border-radius: 999px; border: 1px dashed var(--line-strong); background: transparent; color: var(--ink); font-size: 18px; line-height: 1; display: inline-grid; place-items: center; }
.plus-model:hover { border-style: solid; border-color: var(--ink); }
.leader-pick { display: inline-flex; gap: 6px; align-items: center; }
.msg-model { padding-left: 4px; }
.plus-wrap { position: relative; display: inline-flex; }
.plus-menu { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 30; min-width: 200px; display: flex; flex-direction: column; padding: 6px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.plus-menu[hidden] { display: none; }
.plus-menu button { text-align: left; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font-size: 14px; }
.plus-menu button:hover, .plus-menu button:focus-visible { background: var(--soft); }
.panel .picker-filters { margin: 4px 0 8px; }
/* Studio: Venice-style composer */
.studio-work { display: flex; flex-direction: column; gap: 16px; min-height: calc(100vh - 69px); }
.studio-feed { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.studio-empty { flex: 1; display: grid; place-items: center; min-height: 40vh; }
.studio-empty h1 { font-size: 30px; }
.studio-composer { position: sticky; bottom: 12px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); padding: 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.06); }
.studio-composer textarea { border: 0; outline: none; resize: vertical; min-height: 64px; background: transparent; color: var(--ink); font-size: 16px; }
.setting-chip { border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 10px; background: var(--soft); color: var(--ink); font-size: 13px; }
.attach-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.attach-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--soft); font-size: 13px; }
.attach-chip img, .attach-chip video { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; }
.attach-chip button { border: 0; background: none; font-size: 15px; color: var(--muted); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; overflow: auto; }
.media-tile { aspect-ratio: 1; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; padding: 0; background: var(--soft); color: var(--ink); }
.media-tile img, .media-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-tile[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: -3px; }
.studio-composer .plus-menu { bottom: calc(100% + 6px); }
/* Studio: compact preview + Recent rail */
.studio-work { flex-direction: row; align-items: stretch; gap: 20px; }
.studio-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.stage-compact { max-width: 760px; width: 100%; margin: 0 auto; aspect-ratio: 16 / 9; max-height: 46vh; display: grid; place-items: center; background: var(--stage); border-radius: 14px; overflow: hidden; }
.stage-compact video, .stage-compact img { width: 100%; height: 100%; object-fit: contain; }
.stage-meta { max-width: 760px; width: 100%; margin: 0 auto; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.studio-rail { flex: 0 0 270px; display: flex; flex-direction: column; gap: 10px; border-left: 1px solid var(--line); padding-left: 16px; max-height: calc(100vh - 110px); position: sticky; top: 84px; }
.rail-head { display: flex; justify-content: space-between; align-items: baseline; }
.rail-head h2 { font-size: 17px; }
.rail-list { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.rail-item { display: flex; gap: 10px; align-items: center; text-align: left; padding: 6px; border: 1px solid transparent; border-radius: 12px; background: none; color: inherit; }
.rail-item:hover, .rail-item[aria-current="true"] { background: var(--soft); border-color: var(--line); }
.rail-thumb { flex: 0 0 88px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--stage); display: grid; place-items: center; color: #ddd; font-size: 11px; }
.rail-thumb video, .rail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rail-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rail-prompt { font-size: 13px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 1100px) { .studio-work { flex-direction: column; } .studio-rail { flex: none; position: static; border-left: 0; padding-left: 0; max-height: none; } .rail-list { flex-direction: row; overflow-x: auto; } .rail-item { flex: 0 0 220px; } }
/* Studio fits the window: nothing overlaps, only Recent scrolls */
.studio-work { height: calc(100vh - 69px); height: calc(100dvh - 69px); min-height: 0; overflow: hidden; padding-bottom: 16px; }
.studio-main { min-height: 0; }
.studio-feed { flex: 1 1 auto; min-height: 0; overflow: hidden; justify-content: center; }
.stage-compact { flex: 0 1 auto; min-height: 0; max-height: 100%; }
.studio-composer { position: static; flex: 0 0 auto; box-shadow: none; }
.studio-rail { position: static; max-height: none; min-height: 0; }
.rail-list { flex: 1 1 auto; min-height: 0; }
@media (max-width: 1100px) { .studio-work { height: auto; overflow: visible; } }
/* ---- Dec 3: Venice-parity features ---- */
.linkish { border: 0; background: none; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }
.fav-star { border: 0; background: none; font-size: 18px; line-height: 1; color: var(--muted); padding: 6px; border-radius: 8px; }
.fav-star[aria-pressed="true"] { color: #D99A1E; }
.fav-star:hover { background: var(--soft); }
.picker-row-wrap { display: flex; align-items: flex-start; gap: 4px; } .picker-row-wrap .picker-row { flex: 1; }
.picker-tools { display: flex; gap: 8px; } .picker-tools input { flex: 1; }
.featured-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 6px; }
.featured-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: linear-gradient(160deg, var(--soft), var(--surface)); color: var(--ink); }
.featured-card:hover, .featured-card[aria-pressed="true"] { border-color: var(--ink); }
/* Video frame slots */
.frame-slots { display: flex; gap: 8px; flex-wrap: wrap; }
.frame-slot { position: relative; display: flex; align-items: center; gap: 10px; min-width: 150px; padding: 6px 12px 6px 6px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--soft); color: var(--ink); font-size: 13px; text-align: left; }
.frame-slot.filled { border-style: solid; }
.frame-slot img, .slot-plus, .frame-slot .audio-dot { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; display: grid; place-items: center; background: var(--surface); font-size: 20px; color: var(--muted); }
.slot-x { position: absolute; top: 2px; right: 6px; color: var(--muted); font-size: 15px; cursor: pointer; }
.audio-dot { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--surface); }
.audio-tile { display: grid; place-items: center; height: 100%; font-size: 28px; }
.wand { width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font-size: 15px; display: inline-grid; place-items: center; }
.wand:hover { border-color: var(--ink); } .wand.busy { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Credits */
dialog.credits-dialog { width: min(520px, 94vw); }
.pack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pack { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 17px; }
.pack[aria-checked="true"] { border: 2px solid var(--ink); padding: 13px; }
.pack-flag { position: absolute; top: -9px; right: 10px; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--ink); color: var(--bg); }
.credits-dialog input[type=number] { border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 12px; background: var(--bg); }
.credits-dialog select { border: 1px solid var(--line-strong); border-radius: 8px; padding: 4px 8px; background: var(--soft); }
/* Templates */
.tpl-wrap { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.tpl-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tpl { position: relative; display: flex; align-items: flex-end; min-height: 150px; border-radius: 14px; overflow: hidden; color: #fff; text-decoration: none !important; isolation: isolate; }
.tpl img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .4s; }
.tpl:hover img { transform: scale(1.04); }
.tpl::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.05) 70%); }
.tpl-text { display: flex; flex-direction: column; gap: 3px; padding: 12px; }
.tpl-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.tpl-prompt { font-size: 12.5px; opacity: .85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tone-stone { background: linear-gradient(135deg, #5b5a55, #2b2a28); } .tone-gold { background: linear-gradient(135deg, #b8863b, #4a3313); }
.tone-warm { background: linear-gradient(135deg, #c46a3c, #3b1d12); } .tone-blue { background: linear-gradient(135deg, #3f6ea8, #14233b); }
.tone-violet { background: linear-gradient(135deg, #7a5bb0, #261a3d); } .tone-teal { background: linear-gradient(135deg, #2f8a83, #0f2e2b); }
.studio-feed:has(.studio-empty) { overflow-y: auto; justify-content: flex-start; }
.studio-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 0; }
/* Studio home */
.studio-home { max-width: 1100px; display: flex; flex-direction: column; gap: 18px; }
.studio-home-title { font-size: clamp(30px, 4vw, 42px); text-align: center; margin-top: 18px; }
.studio-ask { max-width: 760px; width: 100%; margin: 0 auto; border: 1px solid var(--line-strong); border-radius: 18px; padding: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.studio-ask textarea { border: 0; outline: none; resize: none; background: transparent; font-size: 16px; color: var(--ink); }
.tool-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tool-btn { min-width: 96px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); text-align: center; font-weight: 500; font-size: 14px; }
.tool-btn:hover { border-color: var(--ink); text-decoration: none; }
.section-title { font-size: 18px; margin-top: 10px; }
.project-card { min-height: 90px; } .project-card .body { display: flex; flex-direction: column; gap: 4px; }
.project-card.empty { border-style: dashed; }
/* Settings */
.settings { max-width: 1040px; }
.settings-grid { display: grid; grid-template-columns: 190px 1fr; gap: 24px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 84px; }
.settings-nav button { text-align: left; padding: 8px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink); font-size: 14px; }
.settings-nav button:hover { background: var(--soft); } .settings-nav button[aria-current="page"] { background: var(--soft); font-weight: 600; }
.settings-pane { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.set-section { border: 1px solid var(--line); border-radius: 14px; padding: 6px 16px 10px; background: var(--surface); display: flex; flex-direction: column; }
.set-section h2 { font-size: 15px; padding: 10px 0 4px; }
.set-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.set-section h2 + .set-row { border-top: 0; }
.set-title { font-weight: 500; font-size: 14.5px; }
.set-row select, .set-row input:not([type=checkbox]):not([type=range]) { border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 10px; background: var(--bg); max-width: 260px; }
.switch { appearance: none; width: 40px; height: 23px; border-radius: 999px; background: var(--line-strong); position: relative; flex: 0 0 auto; cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--ink); } .switch:checked::after { transform: translateX(17px); }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.range { display: inline-flex; gap: 10px; align-items: center; } .range input { width: 160px; }
.sp-list { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.sp-item { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.sp-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
.sp-new { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.sp-new input, .sp-new textarea { border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; background: var(--bg); }
.sp-new button { align-self: flex-start; }
.model-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; padding: 6px 0 8px; }
.model-checks label { display: flex; gap: 8px; align-items: center; }
@media (max-width: 760px) { .settings-grid { grid-template-columns: 1fr; } .settings-nav { position: static; flex-direction: row; overflow-x: auto; } .set-row { flex-direction: column; align-items: flex-start; } }
.msg-wrap.user-wrap { align-items: flex-end; align-self: flex-end; }
/* Checkout */
.checkout { max-width: 1040px; padding-top: 28px; padding-bottom: 60px; }
.co-grid { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; margin-top: 12px; }
.co-left { display: flex; flex-direction: column; gap: 10px; }
.co-left h1 { font-size: 30px; margin-bottom: 6px; }
.co-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-top: 10px; }
.co-methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.co-method, .co-term { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); text-align: left; }
.co-term { flex-direction: row; justify-content: space-between; align-items: center; width: 100%; }
.co-terms { display: flex; flex-direction: column; gap: 8px; }
.co-method[aria-checked="true"], .co-term[aria-checked="true"] { border: 2px solid var(--ink); padding: 13px; }
.save { font-size: 11px; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: #E3F1E5; color: #2F6B3B; }
.co-input { border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; background: var(--bg); color: var(--ink); width: 100%; }
.co-secure { margin-top: 4px; }
.co-summary { position: sticky; top: 90px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.co-summary h2 { font-size: 18px; }
.co-line { display: flex; justify-content: space-between; font-size: 14px; }
.co-due { border-top: 1px solid var(--line); padding-top: 10px; font-size: 16px; }
.co-note { background: var(--soft); border-radius: 10px; padding: 8px 10px; }
.co-agree { display: flex; gap: 10px; align-items: flex-start; } .co-agree input { margin-top: 3px; }
.co-agree a { text-decoration: underline; }
.co-promo summary { cursor: pointer; text-decoration: underline; }
@media (max-width: 820px) { .co-grid { grid-template-columns: 1fr; } .co-summary { position: static; } }
.plan { position: relative; } .plan-flag { position: absolute; top: -11px; right: 16px; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--ink); color: var(--bg); }

/* ======================================================================
   Firebloom design v7 (Dec 4) — calm, premium, app-first.
   References: ChatGPT / Gemini / Grok (full-height sidebar, centered composer,
   neutral surfaces, one brand accent used sparingly). Overrides everything above.
   ====================================================================== */
:root, [data-theme="light"], [data-theme="paper"] {
  --bg: #FFFFFF; --surface: #FFFFFF; --soft: #F4F4F5; --hover: rgba(0,0,0,.045); --ink: #0D0D0D; --muted: #6B6B72;
  --line: rgba(0,0,0,.08); --line-strong: rgba(0,0,0,.14); --accent: #0D0D0D; --on-accent: #FFFFFF; --sidebar: #F9F9F9;
  --elev: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06); --composer: #FFFFFF; --stage: #0B0B0C;
  --ok: #1F7A4A; --warn: #A15C00; --bad: #C2362B; --mast: rgba(255,255,255,.82); --band: #0D0D0D; --on-band: #F5F5F5; --band-muted: #A1A1A6;
}
[data-theme="dark"], [data-theme="darkroom"] {
  --bg: #0E0E10; --surface: #161618; --soft: #1E1E21; --hover: rgba(255,255,255,.06); --ink: #ECECEE; --muted: #9A9AA2;
  --line: rgba(255,255,255,.07); --line-strong: rgba(255,255,255,.13); --accent: #F4F4F5; --on-accent: #0E0E10; --sidebar: #0A0A0B;
  --elev: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.35); --composer: #1A1A1D; --stage: #000;
  --ok: #5FD08E; --warn: #F0B45A; --bad: #FF7A70; --mast: rgba(14,14,16,.78); --band: #161618; --on-band: #ECECEE; --band-muted: #9A9AA2;
}
:root { --ember: #FF5A2C; --ember-2: #FF2E6A; --ember-grad: linear-gradient(135deg, #FF7A3D 0%, #FF4A3D 45%, #FF2E6A 100%);
  --radius: 16px; --display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; --serif: var(--display); }
body { font: 400 15px/1.55 var(--display); font-feature-settings: "cv11", "ss01", "ss03"; letter-spacing: -0.006em; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; }
.serif { font-family: var(--display); font-style: normal; font-weight: 600; letter-spacing: -0.03em; background: var(--ember-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--ember) 30%, transparent); }
a:hover { text-decoration: none; }
.icon { flex: none; display: block; }

/* Buttons */
.btn { min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font-weight: 500; font-size: 14px; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--bg)); }
.btn.ghost { border-color: transparent; }
.btn.small { min-height: 34px; padding: 5px 13px; font-size: 13.5px; }
.btn.accent, .btn.ember { background: var(--ember-grad); color: #fff; border: 0; font-weight: 600; box-shadow: 0 6px 20px -6px rgba(255,74,61,.55); }
.btn.accent:hover, .btn.ember:hover { filter: brightness(1.06); background: var(--ember-grad); }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; font-size: 13px; }
.chip:hover { background: var(--hover); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.linkish { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.linkish:hover { color: var(--ink); }
.linkish.danger:hover { color: var(--bad); }

/* Public top bar: translucent, quiet */
.mast { background: var(--mast); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
.mast .row { min-height: 60px; }
.mast nav { gap: 4px; font-size: 14px; }
.mast nav a { color: var(--muted); padding: 6px 12px; border-radius: 999px; transition: color .15s, background .15s; }
.mast nav a:hover { color: var(--ink); background: var(--hover); }
.mast nav a[aria-current="page"] { color: var(--ink); background: var(--hover); }
.credits-pill { font-size: 13px; padding: 6px 12px; background: var(--hover); color: var(--ink); }
.brand { font-size: 19px; font-weight: 650; letter-spacing: -0.04em; gap: 8px; }
.brand img { width: 24px; height: 24px; }

/* ---------- App shell: full-height sidebar ---------- */
body.in-app { overflow: hidden; }
.shell { display: flex; flex-wrap: nowrap; height: 100vh; height: 100dvh; min-height: 0; }
.side { flex: 0 0 260px; max-width: 260px; width: 260px; background: var(--sidebar); border-right: 1px solid var(--line); padding: 10px 10px 10px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 10px 8px; }
.side-new { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; border: 1px solid var(--line-strong); background: var(--surface); margin-bottom: 10px; }
.side-new:hover { background: var(--hover); }
.side-group { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 8px; }
.side-label { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 8px 12px 4px; letter-spacing: .02em; }
.side a.nav-item { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 10px; font-size: 14px; color: color-mix(in srgb, var(--ink) 88%, var(--muted)); }
.side a.nav-item .icon { color: var(--muted); }
.side a.nav-item:hover { background: var(--hover); }
.side a.nav-item[aria-current="page"] { background: var(--hover); color: var(--ink); font-weight: 500; }
.side a.nav-item[aria-current="page"] .icon { color: var(--ember); }
.side-spacer { flex: 1; }
.side-extra { flex: 1; min-height: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 2px; padding-top: 4px; }
.side .wallet { margin-top: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.wallet-row { display: flex; justify-content: space-between; align-items: baseline; }
.wallet-row strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.wallet-add { margin-top: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 8px; padding: 7px; font-size: 13px; font-weight: 600; color: #fff; background: var(--ember-grad); }
.wallet-add:hover { filter: brightness(1.06); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; margin-top: 6px; border-radius: 10px; color: var(--ink); }
.side-user:hover, .side-user[aria-current="page"] { background: var(--hover); }
.side-user > .icon { margin-left: auto; color: var(--muted); }
.avatar { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; font-weight: 600; font-size: 13px; color: #fff; background: var(--ember-grad); flex: none; }
.side-user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.side-user-mail { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.work { flex: 1 1 auto; min-width: 0; overflow-y: auto; padding: 24px clamp(16px, 3vw, 40px); }
.panel { border-left: 1px solid var(--line); background: var(--bg); overflow-y: auto; }

/* Threads inside the sidebar */
.threads { flex: 1; min-height: 0; max-width: none; border: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; overflow: hidden; }
.threads-head { display: flex; justify-content: space-between; align-items: center; padding-right: 6px; }
.threads > .thread, .threads button.thread { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 12px; border-radius: 9px; font-size: 13.5px; color: color-mix(in srgb, var(--ink) 85%, var(--muted)); flex: none; }
.threads button.thread span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.threads button.thread:hover { background: var(--hover); }
.threads button.thread[aria-current="true"] { background: var(--hover); color: var(--ink); }
.threads { overflow-y: auto; scrollbar-width: thin; }
.threads-foot { margin-top: auto; padding: 8px 10px 2px; display: flex; flex-direction: column; gap: 4px; position: sticky; bottom: 0; background: var(--sidebar); }
.threads-foot .tiny { display: inline-flex; align-items: center; gap: 5px; }
.threads-tools { display: flex; gap: 14px; }

/* ---------- Chat ---------- */
.conv { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; height: 100%; background: var(--bg); }
.messages { flex: 1; overflow-y: auto; padding: 32px 24px 12px; gap: 22px; min-height: 0; align-items: stretch; }
.messages > * { width: 100%; max-width: 768px; margin-left: auto; margin-right: auto; }
.msg { max-width: 768px; font-size: 15.5px; line-height: 1.7; }
.msg.user { align-self: flex-end; width: auto; max-width: min(620px, 80%); margin-right: max(0px, calc((100% - 768px) / 2)); background: var(--soft); padding: 10px 16px; border-radius: 20px; }
.msg.assistant { padding: 0 2px; }
.msg-wrap { align-items: stretch; }
.msg-wrap.user-wrap { align-items: flex-end; }
.chat-input { border: 0; padding: 0 24px 18px; gap: 6px; width: 100%; max-width: 816px; margin: 0 auto; }
.composer-box { border: 1px solid var(--line-strong); border-radius: 26px; background: var(--composer); padding: 12px 12px 10px 18px; box-shadow: var(--elev); display: flex; flex-direction: column; gap: 8px; transition: border-color .15s; }
.composer-box:focus-within { border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.chat-input textarea, .composer-box textarea { border: 0; padding: 4px 0; min-height: 28px; max-height: 240px; resize: none; background: transparent; font-size: 15.5px; outline: none; line-height: 1.55; field-sizing: content; }
.composer-row { gap: 6px; }
.send-btn { width: 36px; height: 36px; border-radius: 999px; border: 0; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); transition: opacity .15s, transform .05s; }
.send-btn:hover { opacity: .88; } .send-btn:active { transform: scale(.96); }
.send-btn:disabled { opacity: .35; }
.model-chip { background: transparent; border: 1px solid var(--line); padding: 5px 11px; font-size: 13px; }
.model-chip:hover { background: var(--hover); }
.plus-model { width: 34px; height: 34px; border: 1px solid var(--line); border-style: solid; color: var(--muted); }
.plus-model:hover { color: var(--ink); background: var(--hover); border-color: var(--line-strong); }
.plus-menu { border-radius: 14px; box-shadow: var(--elev); border-color: var(--line); padding: 6px; }
.fine-print { text-align: center; padding-top: 2px; }
.privacy-note { text-align: center; }
/* Empty state: greeting + composer centered (ChatGPT/Grok) */
.conv.empty { justify-content: center; padding-bottom: 10vh; }
.conv.empty .messages { display: none; }
.greeting { text-align: center; padding: 0 24px 22px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.greeting h1 { font-size: clamp(26px, 3vw, 32px); font-weight: 600; letter-spacing: -0.03em; }
.greeting p { font-size: 14.5px; }
.suggestions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 768px; margin: 10px auto 0; padding: 0 24px; }
.suggestion { text-align: left; border: 1px solid var(--line); border-radius: 14px; background: transparent; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; color: var(--ink); transition: background .15s, border-color .15s; }
.suggestion:hover { background: var(--hover); border-color: var(--line-strong); }
.suggestion strong { font-size: 13.5px; font-weight: 600; }
.suggestion span { font-size: 13px; color: var(--muted); }
.turn { border-radius: 16px; border-color: var(--line); }
.turn.verdict { border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--ember-grad) border-box; }
.badge-leader { background: var(--ember-grad); color: #fff; }
.debate-inline { border-color: var(--line); border-radius: 18px; }

/* ---------- Studio ---------- */
.studio-work { height: 100vh; height: 100dvh; padding: 20px clamp(16px, 2.6vw, 32px) 18px; }
.studio-rail { border-left: 1px solid var(--line); }
.studio-composer { border-radius: 24px; border-color: var(--line-strong); background: var(--composer); box-shadow: var(--elev); padding: 14px; }
.studio-composer textarea { font-size: 15.5px; }
.studio-empty h1, .studio-home-title { font-weight: 600; letter-spacing: -0.035em; }
.setting-chip, .chat-input select, .work select { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.setting-chip:hover, .work select:hover { background: var(--hover); }
.frame-slot { border-radius: 14px; border-color: var(--line-strong); background: transparent; }
.frame-slot img, .slot-plus, .frame-slot .audio-dot { background: var(--hover); border-radius: 10px; }
.tpl { border-radius: 16px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.tpl-grid { gap: 12px; }
.rail-item { border-radius: 12px; }
.rail-item:hover, .rail-item[aria-current="true"] { background: var(--hover); border-color: transparent; }
.stage-compact { border-radius: 18px; }
.studio-ask { border-radius: 24px; background: var(--composer); box-shadow: var(--elev); border-color: var(--line-strong); padding: 14px 16px; }
.tool-btn { border-radius: 14px; border-color: var(--line); background: transparent; }
.tool-btn:hover { background: var(--hover); border-color: var(--line-strong); }
.card { border-radius: 14px; border-color: var(--line); }
.card[aria-current="true"] { outline: 2px solid var(--ember); }
.featured-card { border-radius: 14px; background: transparent; border-color: var(--line); }
.featured-card:hover, .featured-card[aria-pressed="true"] { background: var(--hover); border-color: var(--line-strong); }
.model { border-radius: 12px; border-color: var(--line); }
.model[aria-pressed="true"], .model:has(input:checked) { border-color: var(--ember); box-shadow: inset 0 0 0 1px var(--ember); }
.wand { border-color: var(--line); color: var(--muted); }
.wand:hover { color: var(--ink); background: var(--hover); border-color: var(--line-strong); }
.seg { background: var(--hover); border-radius: 12px; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.field input, .field textarea, .field select, .co-input, .set-row select, .set-row input:not([type=checkbox]):not([type=range]), .sp-new input, .sp-new textarea, dialog.model-picker input[type=search] {
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); }
.field input:focus, .field textarea:focus, .co-input:focus { outline: none; border-color: color-mix(in srgb, var(--ink) 40%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ember) 14%, transparent); }

/* Dialogs */
dialog, dialog.model-picker { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 24px 80px rgba(0,0,0,.35); }
dialog::backdrop, dialog.model-picker::backdrop { background: rgba(0,0,0,.5); backdrop-filter: blur(4px); }
.picker-row { border-radius: 12px; }
.picker-row:hover { background: var(--hover); }
.picker-row[aria-selected="true"] { border-color: var(--line-strong); background: var(--hover); }
.tag { background: transparent; border-color: var(--line); }
.toast { border-radius: 999px; padding: 10px 18px; box-shadow: var(--elev); }

/* Settings / library */
.set-section { border-color: var(--line); border-radius: 16px; }
.settings-nav button { border-radius: 10px; }
.settings-nav button[aria-current="page"] { background: var(--hover); }
.switch:checked { background: var(--ember); }

/* Pricing */
.plan { border-color: var(--line); border-radius: 20px; padding: 28px; }
.plan.featured { border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--ember-grad) border-box; box-shadow: 0 20px 60px -30px rgba(255,74,61,.45); }
.plan-flag, .pack-flag { background: var(--ember-grad); color: #fff; font-weight: 600; }
.plan .price { font-size: 40px; font-weight: 650; }
.co-method[aria-checked="true"], .co-term[aria-checked="true"], .pack[aria-checked="true"] { border-color: var(--ember); }

/* Auth */
.narrow { margin: 9vh auto; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 32px; box-shadow: var(--elev); }
.btn.provider { border-radius: 12px; background: transparent; }
.btn.provider:hover { background: var(--hover); border-color: var(--line-strong); }

/* ---------- Landing (always dark, cinematic) ---------- */
body.on-landing { background: #08080A; }
body.on-landing .mast { --mast: rgba(8,8,10,.6); --ink: #F4F4F5; --muted: #A1A1A6; --hover: rgba(255,255,255,.07); --line: rgba(255,255,255,.08); --line-strong: rgba(255,255,255,.16); --accent: #F4F4F5; --on-accent: #08080A; color: #F4F4F5; position: fixed; left: 0; right: 0; border-bottom-color: transparent; }
.landing { --ink: #F4F4F5; --muted: #A1A1A6; --line: rgba(255,255,255,.08); --line-strong: rgba(255,255,255,.16); --hover: rgba(255,255,255,.06); --surface: #141416; --accent: #F4F4F5; --on-accent: #08080A;
  background: #08080A; color: var(--ink); overflow: hidden; }
.landing-hero { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 110px 20px 60px; isolation: isolate; }
.landing-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .32; filter: saturate(.9); }
.landing-hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 50% at 50% 38%, rgba(255,90,44,.22), transparent 70%), radial-gradient(40% 40% at 70% 70%, rgba(255,46,106,.12), transparent 70%), linear-gradient(180deg, rgba(8,8,10,.55) 0%, rgba(8,8,10,.35) 40%, #08080A 100%); }
.landing-inner { width: 100%; max-width: 860px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.pill-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.04); font-size: 13px; color: #D4D4D8; backdrop-filter: blur(8px); }
.pill-badge .dot { width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; background: var(--ember-grad); color: #fff; }
.landing h1 { font-size: clamp(42px, 6.4vw, 84px); line-height: 1.0; letter-spacing: -0.05em; font-weight: 650; text-wrap: balance; }
.landing h1 .grad { background: linear-gradient(90deg, #FFB38A, #FF5A2C 40%, #FF2E6A 80%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing .lede { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 620px; line-height: 1.55; }
.hero-composer { width: 100%; max-width: 720px; margin-top: 8px; border: 1px solid var(--line-strong); border-radius: 26px; background: rgba(22,22,25,.82); backdrop-filter: blur(20px); box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02) inset; padding: 14px 14px 12px 20px; text-align: left; }
.hero-composer textarea { width: 100%; border: 0; outline: none; resize: none; background: transparent; color: var(--ink); font-size: 17px; line-height: 1.5; min-height: 56px; }
.hero-composer textarea::placeholder { color: #8A8A92; }
.hero-tabs { display: flex; gap: 4px; align-items: center; }
.hero-tabs button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 999px; font-size: 13.5px; }
.hero-tabs button:hover { color: var(--ink); background: var(--hover); }
.hero-tabs button[aria-pressed="true"] { color: var(--ink); background: rgba(255,255,255,.08); border-color: var(--line); }
.hero-tabs .send-btn { margin-left: auto; background: #F4F4F5; color: #08080A; }
.trust-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 18px; font-size: 13px; color: #7C7C84; }
.trust-row strong { color: #B4B4BB; font-weight: 500; }
.landing-section { max-width: 1180px; margin: 0 auto; padding: 80px 24px; }
.landing-section > header { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; max-width: 640px; }
.landing-section h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.05; letter-spacing: -0.04em; }
.kicker { font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #FF7A50; }
.showcase { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; }
.show-card { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 5; background: #141416; border: 1px solid var(--line); color: #fff; text-decoration: none !important; }
.show-card:first-child { aspect-ratio: auto; }
.show-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.show-card:hover video { transform: scale(1.04); }
.show-card::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(180deg, transparent, rgba(0,0,0,.8)); }
.show-meta { position: absolute; z-index: 1; left: 18px; right: 18px; bottom: 16px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.show-meta strong { font-size: 16px; display: block; } .show-meta span { font-size: 12.5px; color: #C4C4CA; }
.show-meta .go { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; background: rgba(255,255,255,.14); backdrop-filter: blur(6px); flex: none; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature { border: 1px solid var(--line); border-radius: 22px; padding: 26px; background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)); display: flex; flex-direction: column; gap: 10px; }
.feature .ficon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,90,44,.12); color: #FF7A50; }
.feature h3 { font-size: 19px; letter-spacing: -0.02em; }
.feature p { color: var(--muted); font-size: 14.5px; }
.cta-band { margin: 20px auto 90px; max-width: 1132px; border-radius: 28px; padding: 56px 32px; text-align: center; display: flex; flex-direction: column; gap: 18px; align-items: center;
  background: radial-gradient(80% 120% at 50% 0%, rgba(255,90,44,.25), transparent 60%), #111113; border: 1px solid var(--line); }
.cta-band h2 { font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -0.04em; }
.landing footer.site { border-top: 1px solid var(--line); color: var(--muted); }
.landing footer.site .row { color: #7C7C84; }
@media (max-width: 900px) {
  .showcase, .feature-grid { grid-template-columns: 1fr; } .show-card, .show-card:first-child { aspect-ratio: 16 / 10; }
  .side { display: none; } body.in-app { overflow: auto; } .shell { height: auto; min-height: 100vh; }
  .suggestions { grid-template-columns: 1fr; } .studio-work { height: auto; }
}
/* Mobile app bar + sliding sidebar */
.mobile-bar { display: none; }
@media (max-width: 900px) {
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 30; height: 54px; padding: 0 8px; background: var(--mast); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .side { display: flex; position: fixed; inset: 0 auto 0 0; z-index: 50; width: 286px; max-width: 86vw; flex-basis: auto; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 0 0 60px rgba(0,0,0,.4); overflow-y: auto; }
  .side.open { transform: none; }
  .shell { height: auto; min-height: calc(100dvh - 54px); }
  .conv { min-height: calc(100dvh - 54px); }
  .landing-hero { padding-top: 96px; }
}
.burger { display: inline-flex; flex-direction: column; gap: 5px; } .burger i { display: block; width: 18px; height: 1.6px; background: currentColor; border-radius: 2px; }
/* v7 fixes */
.side a.side-user[aria-current="page"] { background: var(--hover); color: var(--ink); }
.threads-head .linkish, .threads-tools .linkish { font-size: 12.5px; }
body.on-landing .mast .icon-btn { display: none; }
body.on-landing { overflow-x: hidden; }
.landing h1 { font-size: clamp(40px, 5.8vw, 76px); max-width: 940px; }
.hero-tabs { flex-wrap: wrap; row-gap: 6px; }
.gen-btn:disabled { background: var(--hover); color: var(--muted); box-shadow: none; opacity: 1; }
@media (max-width: 600px) {
  .landing-inner { gap: 16px; } .hero-composer { padding: 12px; border-radius: 22px; }
  .hero-tabs button { padding: 6px 9px; font-size: 13px; } .hero-tabs button:not(.send-btn) .icon { display: none; } .hero-tabs .send-btn { padding: 0; }
  .landing .lede { font-size: 15.5px; }
  .mast .row { padding: 0 14px; }
}
@media (max-width: 900px) { .side.open + * { } body:has(.side.open)::after { content: ""; position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.45); } }
/* Home page: restored original split design (Dec 4). Keep its own look regardless of the v7 tokens. */
body.home-split .split .btn { border-radius: 10px; min-height: 44px; padding: 10px 18px; font-size: 15px; }
body.home-split .split-chat .btn { background: #FFFFFF; color: #161716; border-color: #CFD0C8; }
body.home-split .split-chat .btn.primary { background: #161716; color: #FFFFFF; border-color: #161716; }
body.home-split .split .btn.accent { background: #F2B33D; color: #0B0B0C; border: 1px solid #F2B33D; box-shadow: none; filter: none; }
body.home-split .split .serif { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -0.01em; background: none; color: inherit; -webkit-background-clip: border-box; background-clip: border-box; }
body.home-split .split h1 { font-weight: 550; }
body.home-split .split .example-label { font-size: 13px; }
body.home-split .split .askbar { border-radius: 14px; }
[data-theme="dark"] body.home-split .split .serif, body.home-split[data-x] .serif { font-family: "Inter", Arial, sans-serif; }
body.home-split .mast { background: var(--mast-solid, #FFFFFF); backdrop-filter: none; -webkit-backdrop-filter: none; }
[data-theme="dark"] body.home-split .mast { background: #000; }
body.home-split .mast .row { min-height: 68px; }
body.home-split .split-chat .eyebrow { color: #5E5F59; margin-bottom: 10px; }
/* Live debate (unfolds in order) */
.debate-inline { gap: 12px; padding: 14px 16px 16px; }
.debate-inline-head { flex-wrap: wrap; gap: 8px 10px; }
.debate-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.debate-status { margin-top: -6px; }
.debate-status.bad { color: var(--bad); }
.live-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ember); padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--ember) 12%, transparent); }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--ember); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
.debate-round { display: flex; flex-direction: column; gap: 10px; }
.debate-round .round-heading { margin: 4px 0 0; font-size: 11.5px; letter-spacing: .08em; }
.turn { max-width: none; padding: 12px 14px; gap: 6px; transition: border-color .2s, box-shadow .2s; animation: turnIn .25s ease-out; }
@keyframes turnIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.turn.speaking { border-color: color-mix(in srgb, var(--ember) 45%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ember) 10%, transparent); }
.turn header { gap: 10px; }
.turn-avatar { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; flex: none; padding: 0; }
.turn-who { display: flex; flex-direction: column; line-height: 1.25; }
.turn-who strong { font-size: 13.5px; }
.turn-text { font-size: 15px; line-height: 1.65; margin-left: 38px; }
.caret::after { content: ""; display: inline-block; width: 7px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--ember); border-radius: 1px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.typing { display: inline-flex; gap: 4px; margin-left: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dots 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .turn, .live-pill i, .caret::after, .typing i { animation: none; } }
@media (max-width: 600px) { .turn-text { margin-left: 0; } }
.turn-avatar.badge-a { background: #4C7BD9; color: #fff; } .turn-avatar.badge-b { background: #D9822B; color: #fff; } .turn-avatar.badge-c { background: #2F9E6B; color: #fff; }
.verify-card { margin-top: 8px; border: 1px solid color-mix(in srgb, var(--ember) 40%, var(--line)); background: color-mix(in srgb, var(--ember) 6%, var(--surface)); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.verify-row { display: flex; gap: 6px; } .verify-row input { flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 8px; background: var(--surface); color: var(--ink); font-size: 13px; }
.doc.legal { gap: 12px; } .doc.legal h2 { font-size: 20px; margin-top: 22px; } .doc.legal p, .doc.legal li { line-height: 1.65; color: color-mix(in srgb, var(--ink) 86%, var(--muted)); }
.doc.legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; } .doc.legal a { text-decoration: underline; text-underline-offset: 3px; }
/* Cast */
.page-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; } .page-head h1 { font-size: 28px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.cast-form { margin-top: 26px; max-width: 620px; border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; background: var(--surface); }
.cast-form h2 { font-size: 19px; }
.cast-card .thumb { aspect-ratio: 4 / 3; } .cast-initial { font-size: 40px; font-weight: 600; color: var(--muted); }
.empty-note { border: 1px dashed var(--line-strong); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 4px; max-width: 620px; }
.picker button[aria-pressed="true"] { outline: 3px solid var(--ember); }

/* Dec 4: chat search, sessions, help */
.thread-search { width: calc(100% - 8px); margin: 2px 4px 8px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: inherit; font: inherit; font-size: 13px; }
.thread-search:focus { outline: 2px solid var(--accent, #f97316); outline-offset: 0; }
.session-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.session-row:last-of-type { border-bottom: 0; }
.session-row .pill { margin-left: 8px; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--soft, rgba(127,127,127,.15)); }
.side button.side-help { width: 100%; display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 10px; background: none; border: 0; cursor: pointer; text-align: left; font: inherit; font-size: 14px; color: color-mix(in srgb, var(--ink) 88%, var(--muted)); }
.side button.side-help .icon { color: var(--muted); }
.side button.side-help:hover { background: var(--hover); }
.help-dialog { max-width: 520px; }
.help-links { display: grid; gap: 2px; }
.help-link { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: inherit; }
.help-link:hover, .help-link:focus-visible { background: var(--soft, rgba(127,127,127,.12)); }
.help-dialog textarea { width: 100%; margin-top: 8px; }
.tag-uncensored { color: #B4532A; border-color: currentColor; background: transparent; }
.picker-group { position: sticky; top: 0; z-index: 1; background: var(--bg, #fff); padding: 10px 12px 6px; font-size: 13px; border-bottom: 1px solid var(--line, #eee); }
/* Video workflow menu (Venice-style) */
.wf-row { display: flex; }
.wf-menu { min-width: 260px; }
.wf-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.wf-item .wf-label { font-weight: 600; }
.wf-item.wf-off .wf-label { opacity: .55; }
.wf-panel { display: flex; flex-direction: column; gap: 6px; }
.wf-head { display: flex; justify-content: space-between; align-items: baseline; }
.neg-row { display: flex; gap: 8px; align-items: center; }
.neg-input { flex: 1; font: inherit; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line, #ddd); border-radius: 10px; background: transparent; color: inherit; }
.shot-row { display: flex; gap: 8px; align-items: center; }
.shot-no { width: 14px; text-align: right; }

/* Director's Cut */
.dc-work { display: flex; flex-direction: column; gap: 16px; max-width: 920px; margin: 0 auto; width: 100%; }
.dc-hero h1 { font-size: 28px; margin: 0 0 4px; }
.dc-card { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line, #e6e3dd); border-radius: 16px; padding: 16px; background: var(--card, transparent); }
.dc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.dc-toggles { display: flex; flex-direction: column; gap: 6px; }
.dc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dc-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.dc-title { font: inherit; font-size: 18px; font-weight: 600; border: 0; background: transparent; color: inherit; flex: 1; padding: 4px 0; }
.dc-shots { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dc-shot { display: grid; grid-template-columns: 112px 1fr auto; gap: 10px; align-items: start; }
.dc-thumb { width: 112px; aspect-ratio: 16/9; border-radius: 10px; background: var(--soft, #f1efea); display: grid; place-items: center; overflow: hidden; }
.dc-thumb video { width: 100%; height: 100%; object-fit: cover; }
.dc-shot-body textarea { width: 100%; font: inherit; font-size: 14px; border: 1px solid var(--line, #e6e3dd); border-radius: 10px; padding: 8px 10px; background: transparent; color: inherit; resize: vertical; }
.dc-shot-side { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.dc-move { display: flex; gap: 6px; }
.dc-progress { flex: 1; min-width: 160px; height: 6px; border-radius: 99px; background: var(--soft, #f1efea); overflow: hidden; }
.dc-progress span { display: block; height: 100%; background: var(--ember, #f05a28); transition: width .4s; }
.dc-film video { width: 100%; border-radius: 12px; background: #000; }
.dc-cuts { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) { .dc-shot { grid-template-columns: 1fr; } .dc-thumb { width: 100%; } }

/* Cloudflare Turnstile: invisible unless a visitor needs a checkbox */
.human-check:empty { display: none; }
.human-check { display: flex; justify-content: center; }

/* Owner dashboard */
.admin h2 { margin-top: 28px; font-size: 18px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.admin-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line, #e5e5e5); border-radius: 12px; }
.admin-stat strong { font-size: 22px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.admin-table th, .admin-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line, #e5e5e5); vertical-align: top; }
.admin-table th { font-weight: 600; color: var(--muted, #666); }
.admin-hot td { background: rgba(220, 50, 50, .07); }

.admin-detail { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--line, #e5e5e5); border-radius: 12px; background: var(--soft, #fafafa); }
.admin-detail p { margin: 6px 0; word-break: break-word; }

/* Debate toggle in the chat composer: greyed with one model, active with 2+ */
.debate-chip { display: inline-flex; align-items: center; gap: 4px; opacity: .55; }
.debate-chip:hover { opacity: .85; }
.debate-chip.is-on { opacity: 1; background: var(--ember, #e8562a); color: #fff; border-color: transparent; cursor: default; }
