/* Gerado por docs/design/build_demos.py: edite o protótipo, não este arquivo. */
@font-face { font-family: "Geist"; src: url("../assets/fonts/geist-latin-wght.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../assets/fonts/geist-mono-latin-wght.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../assets/fonts/instrument-serif-latin-italic.woff2") format("woff2"); font-style: italic; font-display: swap; }

/* Protótipo de design (docs/design). Tokens de docs/design/DESIGN.md e frontend/assets/tokens.css. */
:root {
  color-scheme: light;
  --bg: #EDF0FA; --blob-a: #7C95FF; --blob-b: #C3B5FF; --blob-c: #9FE3CF;
  --glass: rgba(255,255,255,.58); --glass-strong: rgba(255,255,255,.88); --glass-edge: rgba(255,255,255,.75);
  --hairline: rgba(22,32,74,.09); --shadow: rgba(30,44,110,.28);
  --ink: #0E1532; --ink-2: #465074; --ink-3: #6E779A;
  --accent: #2F5BFF; --accent-ink: #2448D8; --accent-soft: rgba(47,91,255,.10); --violet: #6A5CFF;
  --live: #15803D; --live-soft: rgba(21,128,61,.12); --warn: #A15C07; --warn-soft: rgba(194,120,10,.13); --danger: #B42318; --danger-soft: rgba(180,35,24,.10);
  --f-ui: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-accent: "Instrument Serif", ui-serif, Georgia, serif;
  --f-mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2,.7,.2,1);
  --app-bg: linear-gradient(160deg, #E3E9FF 0%, #EEF0FB 45%, #E9F6F2 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #080C1A; --blob-a: #2B3FA8; --blob-b: #4A3A9C; --blob-c: #15564A;
    --glass: rgba(24,31,60,.52); --glass-strong: rgba(22,28,54,.92); --glass-edge: rgba(255,255,255,.10);
    --hairline: rgba(210,220,255,.10); --shadow: rgba(0,0,0,.55);
    --ink: #EEF1FF; --ink-2: #B3BBDA; --ink-3: #8A93B6;
    --accent: #7D9AFF; --accent-ink: #9DB2FF; --accent-soft: rgba(125,154,255,.16); --violet: #9A8FFF;
    --live: #4ADE80; --live-soft: rgba(74,222,128,.14); --warn: #F4B34A; --warn-soft: rgba(244,179,74,.14); --danger: #FF8A7A; --danger-soft: rgba(255,138,122,.12);
    --app-bg: linear-gradient(160deg, #121A3A 0%, #0B1024 45%, #0C1F1C 100%);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080C1A; --blob-a: #2B3FA8; --blob-b: #4A3A9C; --blob-c: #15564A;
  --glass: rgba(24,31,60,.52); --glass-strong: rgba(22,28,54,.92); --glass-edge: rgba(255,255,255,.10);
  --hairline: rgba(210,220,255,.10); --shadow: rgba(0,0,0,.55);
  --ink: #EEF1FF; --ink-2: #B3BBDA; --ink-3: #8A93B6;
  --accent: #7D9AFF; --accent-ink: #9DB2FF; --accent-soft: rgba(125,154,255,.16); --violet: #9A8FFF;
  --live: #4ADE80; --live-soft: rgba(74,222,128,.14); --warn: #F4B34A; --warn-soft: rgba(244,179,74,.14); --danger: #FF8A7A; --danger-soft: rgba(255,138,122,.12);
  --app-bg: linear-gradient(160deg, #121A3A 0%, #0B1024 45%, #0C1F1C 100%);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--f-ui); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background: radial-gradient(38vmax 30vmax at 18% 12%, color-mix(in srgb, var(--blob-a) 50%, transparent), transparent 70%),
    radial-gradient(34vmax 28vmax at 86% 18%, color-mix(in srgb, var(--blob-b) 50%, transparent), transparent 70%),
    radial-gradient(40vmax 30vmax at 70% 88%, color-mix(in srgb, var(--blob-c) 40%, transparent), transparent 70%); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 12px; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
em { font-family: var(--f-accent); font-style: italic; font-weight: 400; color: var(--accent-ink); }
.label { font: 500 .72rem/1.2 var(--f-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- Página ---------- */
.page { max-width: 1440px; margin: 0 auto; padding: 28px 24px 48px; }
.brief { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-bottom: 18px; }
.brief h1 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1.1; letter-spacing: -.02em; margin: 6px 0 8px; }
.brief p { color: var(--ink-2); margin: 0; max-width: 70ch; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--glass-strong); font-weight: 600; font-size: .84rem; }
.flow { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.flow button { width: 100%; height: 100%; text-align: left; padding: 10px 12px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-edge); display: grid; gap: 2px; }
.flow button[aria-current="step"] { background: var(--glass-strong); border-color: var(--accent); box-shadow: 0 10px 26px -18px var(--accent); }
.flow .n { font: 600 .72rem var(--f-mono); color: var(--accent-ink); }
.flow strong { font-size: .95rem; }
.flow span.d { color: var(--ink-3); font-size: .8rem; line-height: 1.35; }
.compare { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare div { padding: 14px 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-edge); font-size: .88rem; color: var(--ink-2); }
.compare b { color: var(--ink); }
.compare ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Moldura do navegador ---------- */
.browser { border-radius: 18px; overflow: hidden; background: #0B1024; box-shadow: 0 40px 80px -36px rgba(14,21,50,.5); border: 1px solid #252C55; }
.chrome { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #161C3A; color: #B3BBDA; font-size: 12px; }
.chrome i { width: 11px; height: 11px; border-radius: 50%; background: #3A4270; }
.chrome .url { margin-left: 12px; padding: 4px 14px; border-radius: 8px; background: #0B1024; font-family: var(--f-mono); }
.app { position: relative; height: 820px; overflow: hidden; background: var(--app-bg); display: grid; grid-template-rows: auto 1fr; }

/* barra superior do app */
.appbar { height: 56px; display: flex; align-items: center; gap: 18px; padding: 0 18px; background: var(--glass-strong); border-bottom: 1px solid var(--hairline); }
.brand { font: 620 1.35rem/1 var(--f-ui); letter-spacing: -.055em; color: var(--accent); }
.brand b { color: var(--ink); font-weight: inherit; }
.topnav { display: flex; gap: 16px; color: var(--ink-2); font-weight: 600; font-size: .86rem; }
.topnav span { display: inline-flex; align-items: center; gap: 6px; }
.live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--live-soft); color: var(--live); font-weight: 700; font-size: .8rem; }
.live.rec { background: var(--danger-soft); color: var(--danger); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.live.rec i { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.org { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--hairline); font-weight: 650; font-size: .84rem; }
.me { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; background: linear-gradient(135deg, #1fb5a8, var(--accent)); }

.body { min-height: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; padding: 16px; }
.rail { border-radius: 24px; background: var(--glass); border: 1px solid var(--glass-edge); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; }
.rail .b { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--ink-2); border: 0; background: none; position: relative; }
.rail .b.on { background: var(--glass-strong); color: var(--accent); box-shadow: 0 2px 10px rgba(40,56,110,.1); }
.rail .b.on::after { content: ""; position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.rail .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; background: linear-gradient(135deg, var(--violet), var(--accent)); box-shadow: 0 0 0 3px var(--live-soft), 0 0 0 5px var(--live); margin: 4px 0; }
.rail hr { width: 30px; border: 0; border-top: 1px solid var(--hairline); margin: 4px 0; }

.main { min-height: 0; overflow-y: auto; display: grid; gap: 14px; align-content: start; padding-right: 4px; scrollbar-width: thin; }
.ctx { display: flex; align-items: center; gap: 18px; padding: 12px 18px; border-radius: 20px; background: var(--glass-strong); border: 1px solid var(--glass-edge); }
.ctx h2 { margin: 0; font-size: 1.05rem; } .ctx small { color: var(--ink-3); font-size: .78rem; }
.ctx .pt { display: flex; align-items: center; gap: 10px; padding-left: 18px; border-left: 1px solid var(--hairline); }
.ctx .pt .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; background: linear-gradient(135deg, var(--violet), var(--accent)); }
.ctx .pt b { display: block; }
.alert { margin-left: 6px; padding: 3px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: .75rem; }
.card { border-radius: 24px; background: var(--glass-strong); border: 1px solid var(--glass-edge); padding: 18px 20px; box-shadow: 0 20px 50px -40px var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head h3 { margin: 0; font-size: 1.02rem; } .card-head small { color: var(--ink-3); }
.actions { display: flex; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--glass-strong); font-weight: 650; font-size: .86rem; color: var(--ink-2); transition: all .3s var(--ease); }
.btn.fin.ready { background: var(--live); border-color: var(--live); color: #fff; box-shadow: 0 12px 24px -12px var(--live); animation: glowok 2.2s ease-in-out infinite; }
@keyframes glowok { 50% { box-shadow: 0 12px 24px -12px var(--live), 0 0 0 6px color-mix(in srgb, var(--live) 16%, transparent); } }

/* ---------- A linha de controles: o estado atual cresce ---------- */
.controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px; border-radius: 20px; background: color-mix(in srgb, var(--glass) 70%, transparent); border: 1px solid var(--hairline); min-height: 80px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--hairline); }
.seg button { border: 0; background: none; min-height: 32px; padding: 0 14px; border-radius: 999px; font-weight: 650; font-size: .84rem; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--glass-strong); }
.primary { display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 26px 0 20px; border-radius: 999px; border: 0; color: #fff; font-weight: 700; font-size: 1.02rem;
  background: linear-gradient(135deg, var(--accent), var(--violet)); box-shadow: 0 16px 30px -16px var(--accent); animation: nudge 2.4s ease-in-out infinite; }
.primary svg { width: 22px; height: 22px; }
.primary .orbmini { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(from 210deg, #9FB0FF, #B6A8FF, #BFF0E0, #9FB0FF); box-shadow: inset 0 0 0 3px rgba(255,255,255,.35); }
.primary .orbmini svg { width: 16px; height: 16px; color: #fff; }
@keyframes nudge { 50% { box-shadow: 0 16px 30px -16px var(--accent), 0 0 0 6px color-mix(in srgb, var(--accent) 14%, transparent); } }
.quiet { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px dashed var(--hairline); background: transparent; color: var(--ink-3); font-weight: 600; font-size: .84rem; }
.quiet b { color: var(--ink-2); font-weight: 650; }
.quiet[disabled] { opacity: .55; cursor: default; }
.model { border-style: dashed; border-color: color-mix(in srgb, var(--accent) 35%, var(--hairline)); background: var(--glass-strong); color: var(--ink-2); }
.model b { color: var(--ink); max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tools-r { margin-left: auto; display: inline-flex; gap: 8px; }
.spacer { flex: 1; }
.tool { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--glass-strong); font-weight: 650; font-size: .84rem; color: var(--ink-2); }
.tool.attn { animation: nudge 2s ease-in-out infinite; border-color: var(--accent); color: var(--accent-ink); }
.recbar { display: inline-flex; align-items: center; gap: 14px; min-height: 54px; padding: 0 8px 0 18px; border-radius: 999px; background: var(--glass-strong); border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--hairline)); }
.recbar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: blink 1s steps(2) infinite; }
.recbar.paused .dot { animation: none; background: var(--ink-3); }
.timer { font: 500 1.35rem/1 var(--f-mono); font-variant-numeric: tabular-nums; min-width: 72px; }
.wave { display: flex; align-items: center; gap: 3px; height: 30px; }
.wave span { width: 4px; border-radius: 2px; height: 6px; background: linear-gradient(var(--accent), var(--violet)); transition: height .12s linear; }
.round { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--hairline); background: var(--glass-strong); }
.stop { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--danger); color: #fff; font-weight: 700; box-shadow: 0 12px 24px -14px var(--danger); }
.donepill { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 6px 0 12px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--hairline); font-weight: 650; font-size: .84rem; color: var(--ink-2); }
.donepill i { width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.donepill button { border: 0; min-height: 28px; padding: 0 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: .78rem; }
.progress { flex: 1; min-width: 320px; display: grid; gap: 8px; }
.bar { height: 6px; border-radius: 999px; background: var(--hairline); overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--violet)); border-radius: 999px; transition: width .2s linear; }
.steps { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-3); }
.steps .done { color: var(--live); } .steps .now { color: var(--ink); font-weight: 650; }
.hintline { font-size: .8rem; color: var(--ink-3); margin: 8px 4px 0; }

.sect { font: 500 .72rem var(--f-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin: 16px 0 6px; display: flex; justify-content: space-between; align-items: center; }
.box { border-radius: 16px; border: 1px solid var(--hairline); background: var(--glass-strong); padding: 12px 14px; color: var(--ink-2); font-size: .88rem; min-height: 64px; }
.box.muted { color: var(--ink-3); }
.anam { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; }
.anam h4 { margin: 0 0 2px; font: 600 .72rem var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.anam p { margin: 0 0 6px; color: var(--ink); font-size: .88rem; }
.ai { color: var(--warn); font-size: .78rem; }
.row2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.rx { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--hairline); background: var(--glass-strong); margin-bottom: 8px; }
.rx small { display: block; color: var(--ink-3); }
.rx button { border: 0; min-height: 30px; padding: 0 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: .8rem; }
.thumbs { display: flex; gap: 8px; }
.thumbs div { width: 64px; height: 64px; border-radius: 12px; background: linear-gradient(135deg, #C9B39A, #8E6E58); }
.thumbs div.pdf { background: var(--glass-strong); border: 1px solid var(--hairline); display: grid; place-items: center; font-size: .72rem; color: var(--accent-ink); font-weight: 700; }

/* assistente em janela */
.drawer { position: absolute; top: 68px; right: 16px; bottom: 16px; width: 420px; z-index: 20; border-radius: 24px; background: var(--glass-strong); border: 1px solid var(--glass-edge);
  box-shadow: 0 30px 60px -20px rgba(20,30,70,.45); padding: 16px; display: flex; flex-direction: column; gap: 10px; animation: slide .3s var(--ease); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
@keyframes slide { from { transform: translateX(110%); } }
.drawer header { display: flex; justify-content: space-between; align-items: start; }
.drawer h3 { margin: 0; } .drawer small { color: var(--ink-3); }
.msg { width: fit-content; max-width: 88%; padding: 10px 12px; border-radius: 16px; font-size: .86rem; }
.msg.me { align-self: flex-end; background: linear-gradient(135deg, var(--accent), var(--violet)); color: #fff; }
.msg.bot { background: var(--glass); border: 1px solid var(--glass-edge); }
.chatbox { margin-top: auto; display: flex; gap: 8px; }
.chatbox div { flex: 1; min-height: 44px; border-radius: 16px; border: 1px solid var(--hairline); display: flex; align-items: center; padding: 0 12px; color: var(--ink-3); }
.chatbox button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; }
.toast { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 30; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--glass-strong); font-weight: 600; font-size: .84rem; }
.finished { display: grid; place-items: center; gap: 8px; text-align: center; padding: 30px; }
.finished .ok { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; background: var(--live); color: #fff; }
.finished .ok svg { width: 32px; height: 32px; stroke-width: 2.4; }

@media (max-width: 1100px) { .flow { grid-template-columns: repeat(3, 1fr); } .brief { grid-template-columns: 1fr; } .tools { justify-content: flex-start; } .compare { grid-template-columns: 1fr; } .app { overflow-x: auto; } .body { min-width: 1080px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; } }

.sprite { position: absolute; }
.dim { color: var(--ink-3); }
.m0 { margin: 0; }
html.embed, html.embed body { background: transparent; }
html.embed body::before, html.embed body::after { display: none; }

html.embed .brief, html.embed .compare { display: none; }
html.embed .page { max-width: none; padding: 4px 4px 16px; }
