/* Super SMM by RVRS · phone-first · tokens match the approved prototype */
:root {
  --bg: #0f0e12; --panel: #1a1820; --panel-2: #242129; --rule: #2e2a36; --fg: #f2eee6; --muted: #a39db0;
  --accent: #b9acff; --accent-ink: #1a1430; --good: #9bd3a8; --warn: #f0c27a; --bad: #f2a79c;
  --display: "Bricolage Grotesque", system-ui, sans-serif; --body: "Manrope", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--body); -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.app { min-height: 100%; }
.shell { min-height: 100%; display: flex; flex-direction: column; }
.suite-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 8px; border-bottom: 1px solid var(--rule); }
.suite-nav .sn-brand { font: 700 15px var(--display); color: var(--fg); text-decoration: none; }
.suite-nav .sn-mods { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; }
.suite-nav .sn-mods a { font-size: 12px; font-weight: 700; color: var(--muted); text-decoration: none; padding: 6px 11px; border-radius: 999px; }
.suite-nav .sn-mods a[aria-current] { color: var(--fg); background: var(--panel-2); }
.suite-sso { display: flex; align-items: center; justify-content: center; text-decoration: none; width: min(100%, 360px); }
.screen { flex: 1 1 auto; max-width: 720px; width: 100%; margin: 0 auto; padding-inline: 16px; padding-block: calc(var(--sat) + 18px) 24px; display: flex; flex-direction: column; gap: 18px; }
.screen.center { justify-content: center; align-items: center; min-height: 100vh; gap: 24px; }

.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
h1 { font: 700 26px/1.1 var(--display); margin: 0; }
.eyebrow { font: 600 12px var(--body); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.link { color: var(--accent); font-weight: 700; font-size: 13px; min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; }

.brand { display: flex; align-items: baseline; gap: 8px; }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); align-self: center; }
.brand-name { font: 700 28px var(--display); } .brand-by { color: var(--muted); font-size: 13px; }

.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.stack.tight { gap: 4px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--rule); border-radius: 18px; padding: 14px 16px; min-width: 0; }
.card.list { padding: 0; overflow: hidden; }
.list > .item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; min-height: 52px; border-bottom: 1px solid var(--rule); }
.list > .item:last-child { border-bottom: 0; }
.list .empty { padding: 14px; color: var(--muted); font-size: 13px; }

.input { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--rule); background: var(--panel-2); color: var(--fg); }
.btn { min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--rule); background: var(--panel-2); color: var(--fg); font-weight: 700; cursor: pointer; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.good { background: var(--good); color: var(--accent-ink); border-color: transparent; }
.btn.small { min-height: 40px; padding: 0 12px; font-size: 13px; border-radius: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--rule); color: var(--fg); font-size: 12px; font-weight: 700; cursor: pointer; }
.chip.accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.tag { font-size: 11px; font-weight: 700; white-space: nowrap; }
.tag.good { color: var(--good); } .tag.warn { color: var(--warn); } .tag.bad { color: var(--bad); } .tag.accent { color: var(--accent); }

.step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.step-n { width: 28px; height: 28px; border-radius: 999px; background: var(--panel-2); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; margin-top: 2px; }
.step-n.done { background: var(--good); color: var(--accent-ink); } .step-n.accent { background: var(--accent); color: var(--accent-ink); }

.recorder { align-items: center; text-align: center; }
.meter { display: flex; align-items: flex-end; gap: 3px; height: 40px; }
.meter span { width: 4px; border-radius: 2px; background: #3a3545; height: 8px; transition: height .08s linear, background .2s; }
.meter.live span { background: var(--accent); }
.timer { font: 500 22px var(--mono); font-variant-numeric: tabular-nums; }
.rec { width: 72px; height: 72px; border-radius: 999px; background: var(--accent); border: 4px solid var(--rule); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.rec .rec-dot { width: 28px; height: 28px; border-radius: 999px; background: var(--accent-ink); transition: all .15s; }
.rec.on { background: var(--bad); } .rec.on .rec-dot { width: 24px; height: 24px; border-radius: 6px; }
.rec:disabled { opacity: .5; }

audio { width: 100%; height: 36px; }
.voice-card { display: flex; flex-direction: column; gap: 10px; }
.engine { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--rule); background: var(--panel-2); }
.engine.on { border-color: var(--good); }
.progress { display: flex; align-items: center; gap: 10px; }
.spinner { width: 16px; height: 16px; border-radius: 999px; border: 2px solid var(--rule); border-top-color: var(--accent); animation: spin 1s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } .meter span { transition: none; } }

/* Brief chat */
.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; }
.msg.ai { align-self: flex-start; background: var(--panel); border: 1px solid var(--rule); border-bottom-left-radius: 4px; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; font-weight: 600; }
.msg.wait { color: var(--muted); }
.composer { position: sticky; bottom: calc(var(--sab) + 70px); display: flex; gap: 8px; padding: 8px 0 0; background: var(--bg); }
.composer .input { flex: 1 1 auto; min-width: 0; border-radius: 999px; }
.composer .btn { border-radius: 999px; }
.bible summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; min-height: 32px; }
.bible summary::-webkit-details-marker { display: none; }
.bible-grid { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 12px; margin-top: 12px; font-size: 13.5px; }
.bible-grid .k { color: var(--muted); font-weight: 600; text-transform: capitalize; padding-top: 6px; }
.bible-grid textarea { width: 100%; min-height: 40px; resize: vertical; font: inherit; font-size: 13.5px; line-height: 1.4; color: var(--fg); background: var(--panel-2); border: 1px solid var(--rule); border-radius: 10px; padding: 6px 10px; }
@media (min-width: 900px) { .composer { bottom: 0; } }

/* Plan + Approve */
.modes { display: flex; flex-direction: column; gap: 6px; }
.mode { text-align: left; display: flex; flex-direction: column; gap: 2px; background: var(--panel-2); border: 1px solid var(--rule); border-radius: 14px; padding: 10px 14px; min-height: 48px; color: var(--fg); cursor: pointer; font: inherit; }
.mode.on { background: #15131a; border-color: var(--accent); }
.day { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: start; }
.day .d { font: 600 12px var(--mono); color: var(--muted); padding-top: 12px; }
.slot { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--rule); border-radius: 14px; padding: 8px 10px; min-height: 56px; }
.slot img, .slot .ph { width: 40px; height: 50px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; background: var(--panel-2); }
.slot .ph { display: flex; align-items: center; justify-content: center; font: 500 10px var(--mono); color: var(--muted); }
.actions { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 8px; }
textarea.caption-edit { width: 100%; min-height: 96px; resize: vertical; font: inherit; font-size: 13.5px; line-height: 1.45; color: var(--fg); background: var(--panel-2); border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; }

/* Samples */
.sample { display: flex; flex-direction: column; gap: 10px; }
.media img { width: 100%; border-radius: 12px; display: block; aspect-ratio: 4 / 5; object-fit: cover; }
.media.strip { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.media.strip img { width: 78%; flex: 0 0 auto; scroll-snap-align: start; }
.caption { color: #d9d4cc; line-height: 1.45; white-space: pre-wrap; }
.reactions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

/* Strategy */
.thesis { font: 600 19px/1.35 var(--display); text-wrap: balance; max-width: 40ch; }
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Reading view: script text scrolls, recorder bar stays pinned */
.reader { position: fixed; inset: 0; z-index: 20; background: var(--bg); display: flex; flex-direction: column; }
.reader-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: calc(var(--sat) + 10px) 16px 10px; border-bottom: 1px solid var(--rule); }
.reader-text { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 20px 24px; max-width: 760px; width: 100%; margin: 0 auto; font: 400 21px/1.6 var(--display); }
.reader-text h2 { font: 600 15px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin: 28px 0 10px; }
.reader-text h2 .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.reader-text p { margin: 0 0 16px; max-width: 60ch; }
.reader-text p.hint { font: 500 14px/1.5 var(--body); color: var(--muted); }
.reader-text p.q { font-weight: 600; }
.reader-text em { font-style: normal; font: 500 13px var(--mono); color: var(--muted); }
.reader-bar { border-top: 1px solid var(--rule); background: #121116; padding: 10px 16px calc(var(--sab) + 12px); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.reader-bar .meter { height: 28px; }
.reader-controls { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 760px; }
.reader-controls .rec { width: 64px; height: 64px; flex: 0 0 auto; }
.reader-controls .timer { font-size: 18px; min-width: 86px; }

.tabs { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--rule); background: #121116; padding: 8px 8px calc(var(--sab) + 10px); }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; min-height: 44px; color: var(--muted); font-size: 11px; font-weight: 700; }
.tabs a.on { color: var(--accent); }
.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 900px) {
  .shell { flex-direction: row; flex-wrap: wrap; align-content: flex-start; }
  .suite-nav { flex: 0 0 100%; }
  .shell > .screen { flex: 1; min-width: 0; }
  .tabs { position: static; flex: 0 0 220px; grid-template-columns: 1fr; align-content: start; gap: 4px; border-top: 0; border-right: 1px solid var(--rule); padding: 28px 12px; min-height: 100vh; }
  .tabs a { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 14px; }
  .tabs a.on { background: var(--panel); }
  .screen { padding-block: 32px; }
}

/* agent */
.agent .bubble { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; }
.agent .me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.agent .ai { align-self: flex-start; background: var(--panel); border: 1px solid var(--rule); border-bottom-left-radius: 6px; }
.agent .ai.wait { color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.agent .props { display: grid; gap: 8px; margin-top: 10px; }
.agent .prop { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; background: var(--panel-2); }
.agent .prop b { display: block; font-size: 13.5px; }
.agent .diff { margin-top: 6px; display: grid; gap: 4px; font-size: 12.5px; line-height: 1.4; }
.agent .diff .old { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.25); }
.agent .diff .new { color: var(--fg); }
.agent .prop .act { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }
.agent .sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.agent .sugg .chip { cursor: pointer; font-size: 12.5px; }
.agent .composer { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: flex-end; background: var(--bg); padding: 8px 0; }
.agent .composer textarea { flex: 1; min-height: 48px; max-height: 160px; resize: vertical; font: inherit; font-size: 14.5px; color: var(--fg); background: var(--panel-2); border: 1px solid var(--rule); border-radius: 14px; padding: 12px 14px; }
.agent .props { white-space: normal; }

/* agent pop-out: floating button + sheet (phone) / side panel (desktop) */
.fab { position: fixed; right: 16px; bottom: calc(var(--sab) + 84px); z-index: 40; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 14px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); font: 700 14px var(--body); box-shadow: 0 12px 30px -8px rgba(0,0,0,.6); cursor: pointer; }
.fab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.fab .dot { position: absolute; top: 6px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 2px var(--accent); }
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .25s; }
.scrim.on { opacity: 1; }
.drawer { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; height: 92vh; height: 92dvh; display: flex; flex-direction: column; background: var(--bg); border-top: 1px solid var(--rule); border-radius: 22px 22px 0 0; box-shadow: 0 -20px 60px -20px #000; transform: translateY(102%); transition: transform .32s cubic-bezier(.16,1,.3,1); visibility: hidden; }
.drawer.on { transform: none; visibility: visible; }
.drawer-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 18px 10px; border-bottom: 1px solid var(--rule); }
.drawer-h h2 { margin: 2px 0 0; font: 700 22px var(--display); }
.drawer .x { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--rule); background: var(--panel); color: var(--fg); display: grid; place-items: center; cursor: pointer; }
.drawer .x svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.drawer .agent { flex: 1; overflow-y: auto; padding: 14px 18px calc(var(--sab) + 8px); }
body.drawer-open { overflow: hidden; }
@media (min-width: 900px) {
  .fab { bottom: 24px; right: 24px; }
  .drawer { left: auto; top: 0; right: 0; bottom: 0; width: 440px; height: 100vh; border-top: 0; border-left: 1px solid var(--rule); border-radius: 0; transform: translateX(102%); }
}
@media (prefers-reduced-motion: reduce) { .drawer, .scrim { transition: none; } }

/* learn */
.learn .kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.learn .kpi { background: var(--panel); border: 1px solid var(--rule); border-radius: 16px; padding: 12px 14px; }
.learn .kpi b { display: block; font: 700 26px var(--display); }
.learn .kpi span { font-size: 12px; color: var(--muted); }
@media (min-width: 560px) { .learn .kpis { grid-template-columns: repeat(5, 1fr); } }
.learn .lp { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; }
.learn .lp img, .learn .lp .ph { width: 64px; height: 80px; object-fit: cover; border-radius: 10px; background: var(--panel-2); display: grid; place-items: center; font-size: 10px; color: var(--muted); }
.learn .nums { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 500 12.5px var(--mono); color: var(--muted); margin-top: 4px; }
.learn .nums b { color: var(--fg); font-weight: 600; }
.learn .acts2 { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.learn .kit { display: grid; gap: 8px; margin-top: 10px; }
.learn .kit textarea { width: 100%; min-height: 70px; resize: vertical; font: inherit; font-size: 13px; color: var(--fg); background: var(--panel-2); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 10px; }
.learn .boostbox { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.learn select { height: 40px; border-radius: 10px; background: var(--panel-2); color: var(--fg); border: 1px solid var(--rule); padding: 0 10px; font: inherit; }
