/* =========================================================
   VRF Insight — Diagnóstico e Aprendizado
   Tema: azul-marinho profundo, grafite, ciano (ação), âmbar (atenção),
   vermelho (somente condições críticas).
   ========================================================= */
:root {
  --bg: #050d1a;
  --bg-2: #081427;
  --surface: #121a24;
  --surface-2: #172130;
  --surface-3: #1e2a3a;
  --line: #263446;
  --line-2: #33445a;
  --text: #e8eef6;
  --text-2: #b9c7d8;
  --muted: #8ea0b6;
  --cyan: #22d3ee;
  --cyan-2: #67e8f9;
  --cyan-soft: rgba(34, 211, 238, .12);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, .12);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, .13);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, .12);
  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, .14);
  --liquid: #cbd5e1;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  --focus: 0 0 0 3px rgba(103, 232, 249, .55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.reduce-motion { scroll-behavior: auto; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(34, 211, 238, .08), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(56, 97, 170, .14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .8rem; }
a { color: var(--cyan-2); }
a:hover { color: #fff; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
code, .mono { font-family: var(--mono); font-size: .92em; }
ul, ol { padding-left: 1.2rem; margin: 0 0 .8rem; }
li { margin: .2rem 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ico { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.ico-lg { width: 1.6em; height: 1.6em; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--cyan); color: #00222b; padding: .5rem .9rem; border-radius: 8px; font-weight: 700; }
.skip-link:focus { left: 8px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(5, 13, 26, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 1320px; margin: 0 auto; padding: .6rem 1.2rem; display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); flex: none; }
.brand-mark { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.02rem; }
.brand-text small { color: var(--muted); font-size: .72rem; }
.demo-seal {
  flex: none; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  color: var(--amber); background: var(--amber-soft); border: 1px solid rgba(251, 191, 36, .45);
  padding: .25rem .6rem; border-radius: 999px; white-space: nowrap;
}
.main-nav { display: flex; gap: .1rem; margin-left: auto; flex-wrap: nowrap; }
.main-nav a {
  color: var(--text-2); text-decoration: none; font-size: .86rem; font-weight: 600;
  padding: .45rem .55rem; border-radius: 8px; white-space: nowrap;
}
.main-nav a:hover { color: #fff; background: var(--surface-2); }
.main-nav a[aria-current="page"] { color: var(--cyan-2); background: var(--cyan-soft); }
.main-nav a.nav-rec { border: 1px solid var(--line-2); }
.topbar-actions { display: flex; gap: .4rem; flex: none; }
.topbar .menu-toggle { display: none; }

@media (max-width: 1240px) {
  .topbar .menu-toggle { display: inline-flex; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: .6rem 1rem 1rem; gap: .2rem;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .75rem .8rem; font-size: 1rem; }
  .topbar-actions { margin-left: auto; }
}
@media (max-width: 640px) {
  .topbar-inner { padding: .5rem .75rem; gap: .5rem; flex-wrap: wrap; }
  .brand-text small { display: none; }
  .demo-seal { order: 3; width: 100%; text-align: center; }
  .motion-label { font-size: .78rem; }
}

/* ---------- Layout ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 1.8rem 1.2rem 3rem; animation: viewIn .35s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { margin-bottom: 1.4rem; }
.page-head .lead { color: var(--text-2); max-width: 820px; font-size: 1.05rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; color: var(--cyan); font-weight: 700; margin-bottom: .4rem; display: block; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } .page { padding: 1.2rem .8rem 2.4rem; } }
select { max-width: 100%; }
.report { overflow-wrap: anywhere; }
@media screen and (max-width: 700px) { .report table { display: block; overflow-x: auto; } }

.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}
.card-flat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.card-title { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; margin-bottom: .7rem; }
.card-title .ico { color: var(--cyan); }
.section { margin-top: 2rem; }
.section-title { display: flex; align-items: center; gap: .55rem; margin-bottom: .9rem; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 650; font-size: .95rem; line-height: 1.2;
  padding: .7rem 1.1rem; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface-3); color: var(--text);
  text-decoration: none; transition: background .15s, border-color .15s, transform .1s;
  min-height: 44px;
}
.btn:hover { border-color: var(--cyan); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--cyan); color: #032029; border-color: var(--cyan); }
.btn-primary:hover { background: var(--cyan-2); color: #032029; border-color: var(--cyan-2); }
.btn-ghost { background: transparent; }
.btn-danger { border-color: rgba(248, 113, 113, .55); color: #fecaca; background: transparent; }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); color: #fff; }
.btn-warn { border-color: rgba(251, 191, 36, .6); color: #fde68a; background: transparent; }
.btn-sm { padding: .42rem .7rem; font-size: .85rem; min-height: 36px; }
.btn-lg { padding: .9rem 1.4rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[aria-pressed="true"] { background: var(--cyan-soft); border-color: var(--cyan); color: var(--cyan-2); }
.link-btn { background: none; border: 0; color: var(--cyan-2); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

/* ---------- Chips / tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 700;
  padding: .2rem .55rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2);
  background: var(--surface-3); white-space: nowrap; letter-spacing: .01em;
}
.chip-cyan { color: var(--cyan-2); border-color: rgba(34, 211, 238, .5); background: var(--cyan-soft); }
.chip-amber { color: var(--amber); border-color: rgba(251, 191, 36, .5); background: var(--amber-soft); }
.chip-red { color: #fecaca; border-color: rgba(248, 113, 113, .6); background: var(--red-soft); }
.chip-green { color: var(--green); border-color: rgba(52, 211, 153, .5); background: var(--green-soft); }
.chip-violet { color: #ddd6fe; border-color: rgba(167, 139, 250, .5); background: var(--violet-soft); }
.chip-muted { color: var(--muted); }
.page-head .chip, .hero-meta .chip { white-space: normal; max-width: 100%; }
.tag-evd { color: var(--cyan-2); border-color: rgba(34, 211, 238, .5); background: var(--cyan-soft); }
.tag-hyp { color: var(--text-2); border-style: dashed; border-color: #6b7f99; background: transparent; }
.tag-conf { color: var(--green); border-color: rgba(52, 211, 153, .55); background: var(--green-soft); }

/* ---------- Alertas ---------- */
.alert { display: flex; gap: .7rem; padding: .9rem 1rem; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); }
.alert > .ico { margin-top: .15rem; }
.alert p:last-child { margin-bottom: 0; }
.alert-info { border-color: rgba(34, 211, 238, .4); background: var(--cyan-soft); }
.alert-info > .ico { color: var(--cyan); }
.alert-warn { border-color: rgba(251, 191, 36, .45); background: var(--amber-soft); }
.alert-warn > .ico { color: var(--amber); }
.alert-critical { border-color: rgba(248, 113, 113, .65); background: var(--red-soft); }
.alert-critical > .ico { color: var(--red); }
.alert-ok { border-color: rgba(52, 211, 153, .45); background: var(--green-soft); }
.alert-ok > .ico { color: var(--green); }
.alert > div > strong:first-child { display: block; margin-bottom: .2rem; }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field > label, .field-label { font-weight: 650; font-size: .93rem; }
.field-hint { font-size: .82rem; color: var(--muted); }
input[type="text"], input[type="search"], input[type="number"], select, textarea {
  font: inherit; color: var(--text); background: #0b1422; border: 1px solid var(--line-2);
  border-radius: 9px; padding: .65rem .75rem; min-height: 44px; width: 100%;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: var(--focus); outline: none; }
input::placeholder, textarea::placeholder { color: #6c7f96; }
.check { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--cyan); }

.why {
  display: flex; gap: .5rem; font-size: .84rem; color: var(--text-2);
  background: rgba(34, 211, 238, .06); border-left: 3px solid var(--cyan); padding: .5rem .7rem; border-radius: 0 8px 8px 0;
}
.why .ico { color: var(--cyan); margin-top: .1rem; }

/* Grupos de escolha (rádios / checkboxes estilizados) */
.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .85rem; min-height: 42px;
  border: 1px solid var(--line-2); border-radius: 10px; background: #0d1726; color: var(--text-2);
  font-size: .9rem; font-weight: 600; transition: all .15s;
}
.choice input:hover + span { border-color: var(--cyan); color: #fff; }
.choice input:checked + span { background: var(--cyan-soft); border-color: var(--cyan); color: var(--cyan-2); }
.choice input:focus-visible + span { box-shadow: var(--focus); }
.choice.unknown input:checked + span { background: var(--surface-3); border-color: #6b7f99; color: var(--text); }

.q-block { padding: 1rem 0; border: 0; border-top: 1px solid var(--line); margin: 0; min-width: 0; }
.q-block legend { padding: 0; display: block; width: 100%; }
.q-block:first-of-type { border-top: 0; padding-top: .2rem; }
.q-block h3 { font-size: 1rem; margin-bottom: .5rem; }
.q-block .why { margin-top: .6rem; }
.q-new { animation: qIn .4s ease both; }
@keyframes qIn { from { opacity: 0; transform: translateY(-4px); background: var(--cyan-soft); } to { opacity: 1; transform: none; } }

/* ---------- Página inicial ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2rem; align-items: center; padding: 1.5rem 0 1rem; }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); letter-spacing: -.025em; }
.hero h1 .accent { color: var(--cyan); }
.hero .lead { font-size: 1.1rem; color: var(--text-2); max-width: 580px; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.4rem 0 1rem; }
.hero-meta { display: flex; gap: .5rem; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-visual .card { padding: .8rem; }
.hero-visual-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .2rem .3rem .6rem; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }

.principle { border-top: 3px solid var(--line-2); }
.principle.evd { border-top-color: var(--cyan); }
.principle.hyp { border-top-color: #6b7f99; }
.principle.conf { border-top-color: var(--green); }
.module-card { display: flex; flex-direction: column; gap: .5rem; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; cursor: pointer; text-align: left; font: inherit; }
.module-card:hover { border-color: var(--cyan); transform: translateY(-2px); color: var(--text); }
.module-card .ico-wrap { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--cyan-soft); color: var(--cyan); }
.module-card p { color: var(--text-2); font-size: .92rem; margin: 0; }
.arch-flow { display: flex; align-items: stretch; gap: .5rem; flex-wrap: wrap; }
.arch-step { flex: 1 1 160px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .8rem; font-size: .88rem; }
.arch-step strong { display: block; color: var(--text); margin-bottom: .2rem; }
.arch-step.future { border-style: dashed; color: var(--muted); }

/* ---------- Wizard ---------- */
.stepper { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: .35rem; }
.stepper li { margin: 0; }
.stepper button {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: .3rem;
  background: none; border: 0; color: var(--muted); font: inherit; font-size: .76rem; font-weight: 650;
  cursor: pointer; padding: 0 0 .2rem; text-align: left;
}
.stepper button::before { content: ""; display: block; width: 100%; height: 5px; border-radius: 4px; background: var(--line); }
.stepper .done button { color: var(--text-2); }
.stepper .done button::before { background: rgba(34, 211, 238, .5); }
.stepper .current button { color: var(--cyan-2); }
.stepper .current button::before { background: var(--cyan); box-shadow: 0 0 12px rgba(34, 211, 238, .5); }
.stepper button[disabled] { cursor: default; }
.step-count { font-size: .85rem; color: var(--muted); margin-bottom: .2rem; }
@media (max-width: 760px) {
  .stepper { grid-template-columns: repeat(8, 1fr); }
  .stepper .step-name { display: none; }
}
.wizard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem; align-items: start; }
@media (max-width: 1000px) { .wizard-grid { grid-template-columns: 1fr; } }
.wizard-card h2 { display: flex; align-items: center; gap: .5rem; }
.wizard-nav { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.live-panel { position: sticky; top: 84px; }
.live-panel h3 { display: flex; align-items: center; gap: .45rem; font-size: 1rem; }
.live-item { padding: .6rem 0; border-top: 1px solid var(--line); font-size: .9rem; }
.live-item:first-of-type { border-top: 0; }
.live-item .row-between { gap: .4rem; }
.live-item.pulse { animation: livePulse .8s ease; }
@keyframes livePulse { 0% { background: var(--cyan-soft); } 100% { background: transparent; } }
.assistant-label { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; color: var(--muted); border: 1px solid var(--line-2); padding: .2rem .5rem; border-radius: 999px; }

.symptom-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6rem; }
.symptom { position: relative; }
.symptom input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.symptom .sym-body { display: flex; gap: .7rem; align-items: flex-start; height: 100%; padding: .85rem; border: 1px solid var(--line-2); border-radius: 12px; background: #0d1726; transition: all .15s; }
.symptom .sym-body .ico { color: var(--cyan); width: 1.5em; height: 1.5em; margin-top: .1rem; }
.symptom strong { display: block; font-size: .95rem; }
.symptom small { color: var(--muted); }
.symptom input:hover + .sym-body { border-color: var(--cyan); }
.symptom input:checked + .sym-body { border-color: var(--cyan); background: var(--cyan-soft); box-shadow: inset 0 0 0 1px var(--cyan); }
.symptom input:focus-visible + .sym-body { box-shadow: var(--focus); }

.meas-row { display: grid; grid-template-columns: 1.4fr .8fr .7fr 1.2fr 1.2fr auto; gap: .5rem; align-items: end; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background: #0c1523; margin-bottom: .6rem; }
.meas-row .field { margin: 0; }
.meas-row .field > label { font-size: .78rem; color: var(--text-2); }
.meas-status { grid-column: 1 / -1; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; font-size: .82rem; }
@media (max-width: 900px) { .meas-row { grid-template-columns: 1fr 1fr; } .meas-row .meas-del { grid-column: 1 / -1; } }

.review-list { display: grid; grid-template-columns: 220px 1fr; gap: .45rem 1rem; margin: 0; }
.review-list dt { color: var(--muted); font-size: .88rem; }
.review-list dd { margin: 0; }
@media (max-width: 640px) { .review-list { grid-template-columns: 1fr; } .review-list dt { margin-top: .5rem; } }

/* ---------- Resultado ---------- */
.status-banner { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface-2); margin-bottom: 1.2rem; }
.status-banner.insufficient { border-color: rgba(251, 191, 36, .55); background: linear-gradient(90deg, rgba(251, 191, 36, .12), rgba(251, 191, 36, .03)); }
.status-banner.ranked { border-color: rgba(34, 211, 238, .45); background: linear-gradient(90deg, rgba(34, 211, 238, .1), rgba(34, 211, 238, .02)); }
.status-banner .ico { width: 1.8em; height: 1.8em; }
.status-banner.insufficient .ico { color: var(--amber); }
.status-banner.ranked .ico { color: var(--cyan); }
.status-banner h2 { font-size: 1.15rem; margin-bottom: .25rem; }
.status-banner p { margin: 0; color: var(--text-2); }
.legend-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; font-size: .82rem; color: var(--muted); margin-top: .6rem; }
.result-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.2rem; align-items: start; }
@media (max-width: 1000px) { .result-grid { grid-template-columns: 1fr; } }
.ev-list { list-style: none; padding: 0; margin: 0; }
.ev-list li { display: flex; gap: .6rem; align-items: flex-start; padding: .5rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.ev-list li:first-child { border-top: 0; }
.ev-list .chip { margin-top: .1rem; }
.hyp-list { display: flex; flex-direction: column; gap: .8rem; }
.hyp-card { border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: 12px; background: var(--surface); padding: 1rem; }
.hyp-card.level-alta { border-left-color: var(--cyan); }
.hyp-card.level-media { border-left-color: rgba(34, 211, 238, .55); }
.hyp-card.level-baixa { border-left-color: #6b7f99; }
.hyp-card.level-sem { border-left-color: var(--line-2); opacity: .9; }
.hyp-card.level-enfraquecida { border-left-color: var(--line-2); opacity: .78; }
.hyp-head { display: flex; justify-content: space-between; gap: .6rem; align-items: flex-start; flex-wrap: wrap; }
.hyp-head h3 { font-size: 1rem; margin: 0; flex: 1 1 260px; }
.hyp-meta { display: flex; gap: .35rem; flex-wrap: wrap; margin: .5rem 0; }
.ev-cols { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .6rem; }
@media (max-width: 640px) { .ev-cols { grid-template-columns: 1fr; } }
.ev-col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .3rem; }
.ev-col.sup h4 { color: var(--cyan-2); }
.ev-col.wk h4 { color: var(--amber); }
.ev-col ul { list-style: none; padding: 0; margin: 0; font-size: .87rem; }
.ev-col li { padding: .25rem 0; display: flex; gap: .35rem; }
.rule-id { font-family: var(--mono); font-size: .72rem; color: var(--muted); white-space: nowrap; }
.weight { font-size: .7rem; font-weight: 700; padding: 0 .35rem; border-radius: 4px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; height: fit-content; }
.next-box { margin-top: .7rem; font-size: .88rem; padding: .6rem .7rem; background: #0c1523; border-radius: 9px; border: 1px solid var(--line); }
details { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; background: var(--surface); }
details + details { margin-top: .6rem; }
summary { cursor: pointer; font-weight: 650; }
details[open] summary { margin-bottom: .6rem; }
.action-bar { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.2rem 0; }

/* ---------- Diagrama ---------- */
.diagram-wrap { position: relative; }
.vrf-svg { width: 100%; height: auto; display: block; user-select: none; }
.vrf-svg text { font-family: var(--font); fill: var(--text-2); }
.vrf-svg .unit-body { fill: #0f1a2a; stroke: #2f4058; stroke-width: 2; }
.vrf-svg .unit-title { font-size: 13px; font-weight: 700; letter-spacing: .12em; fill: var(--muted); }
.vrf-svg .lbl { font-size: 14px; font-weight: 600; fill: var(--text-2); opacity: 0; transition: opacity .25s; pointer-events: none; }
.vrf-svg.show-labels .lbl { opacity: 1; }
.vrf-svg .pipe-case { fill: none; stroke: #050d1a; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }
.vrf-svg .pipe { fill: none; stroke: #3a4c63; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.vrf-svg .pipe-int { fill: none; stroke: #33465d; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.vrf-svg .flow { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 7 13; animation: flowDash 1.1s linear infinite; }
.vrf-svg .flow.thin { stroke-width: 2.4; }
.vrf-svg .flow.rev { animation-direction: reverse; }
.vrf-svg .flow.off { opacity: 0; animation: none; }
.vrf-svg .flow.suc { stroke: var(--cyan); }
.vrf-svg .flow.hot { stroke: var(--violet); }
.vrf-svg .flow.liq { stroke: var(--liquid); }
@keyframes flowDash { to { stroke-dashoffset: -40; } }
.vrf-svg .coil { fill: none; stroke: #4b5f78; stroke-width: 2.4; stroke-linejoin: round; transition: stroke .4s; }
.vrf-svg .coil.cold { stroke: var(--cyan); }
.vrf-svg .coil.hot { stroke: var(--violet); }
.vrf-svg .fan-ring { fill: #0b1422; stroke: #40536c; stroke-width: 2; }
.vrf-svg .blade { fill: #5d7290; }
.vrf-svg .spin { animation: spin 1.4s linear infinite; }
.vrf-svg .spin.slow { animation-duration: 2.6s; }
.vrf-svg .spin.stop { animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.vrf-svg .comp-body { fill: #1b2738; stroke: #5a6f8c; stroke-width: 2; }
.vrf-svg .comp-run { animation: compPulse 1.6s ease-in-out infinite; }
@keyframes compPulse { 50% { stroke: var(--cyan); } }
.vrf-svg .valve { fill: #1b2738; stroke: #8193ad; stroke-width: 2; }
.vrf-svg .eev { fill: #0b1422; stroke: var(--cyan-2); stroke-width: 2; }
.vrf-svg .sensor { fill: #0b1422; stroke: var(--amber); stroke-width: 2; }
.vrf-svg .sensor-t { font-size: 10px; font-weight: 800; fill: var(--amber); }
.vrf-svg .comm { fill: none; stroke: var(--green); stroke-width: 2.4; stroke-dasharray: 2 9; stroke-linecap: round; animation: flowDash 1.6s linear infinite; }
.vrf-svg .comm-base { fill: none; stroke: rgba(52, 211, 153, .25); stroke-width: 2; }
.vrf-svg .air { fill: none; stroke: var(--cyan-2); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .8; animation: airDown 1.6s ease-in-out infinite; }
.vrf-svg .air.up { animation-name: airUp; stroke: #94a3b8; }
.vrf-svg .air.hot { stroke: var(--violet); }
.vrf-svg .air.fan { stroke: #94a3b8; }
.vrf-svg .air.d2 { animation-delay: .25s; }
.vrf-svg .air.d3 { animation-delay: .5s; }
@keyframes airDown { 0% { transform: translateY(-6px); opacity: 0; } 40% { opacity: .9; } 100% { transform: translateY(10px); opacity: 0; } }
@keyframes airUp { 0% { transform: translateY(6px); opacity: 0; } 40% { opacity: .9; } 100% { transform: translateY(-10px); opacity: 0; } }
.vrf-svg .tray { fill: none; stroke: #5d7290; stroke-width: 2.4; }
.vrf-svg .filter { fill: url(#filterPattern); stroke: #6b7f99; stroke-width: 1.5; }
.vrf-svg .mode-tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.vrf-svg .mode-tag.cool { fill: var(--cyan); }
.vrf-svg .mode-tag.heat { fill: var(--violet); }
.vrf-svg .mode-tag.fan { fill: #94a3b8; }
.vrf-svg .bs-box { fill: #172133; stroke: var(--violet); stroke-width: 2; stroke-dasharray: 5 4; }
.vrf-svg .joint { fill: #3a4c63; stroke: #050d1a; stroke-width: 2; }
.vrf-svg [data-arch-only="hr"] { display: none; }
.vrf-svg[data-arch="hr"] [data-arch-only="hr"] { display: inline; }
.vrf-svg[data-arch="hr"] [data-arch-only="hp"] { display: none; }
.vrf-svg .flow, .vrf-svg .air, .vrf-svg .lbl, .vrf-svg .comm { pointer-events: none; }
.vrf-svg .hit { fill: transparent; stroke: transparent; }
.vrf-svg .hit-line { fill: none; stroke: transparent; stroke-width: 18; }
.vrf-svg.interactive .comp { cursor: pointer; }
.vrf-svg .comp:focus { outline: none; }
.vrf-svg.interactive .comp:hover .hl, .vrf-svg .comp:focus-visible .hl { stroke: var(--cyan-2); stroke-width: 2; stroke-dasharray: 4 3; fill: rgba(34, 211, 238, .06); }
.vrf-svg .hl { fill: transparent; stroke: transparent; }
.vrf-svg .comp.selected .hl { stroke: var(--amber); stroke-width: 2.5; stroke-dasharray: none; fill: rgba(251, 191, 36, .08); }
.vrf-svg.paused *, .vrf-svg.paused { animation-play-state: paused !important; }
html.reduce-motion .vrf-svg * { animation: none !important; }
html.reduce-motion .vrf-svg .flow:not(.off) { stroke-dasharray: 7 6; }
html.reduce-motion .vrf-svg .air { opacity: .8; }

.sys-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.2rem; align-items: start; }
@media (max-width: 1080px) { .sys-grid { grid-template-columns: 1fr; } }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .8rem; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 11px; padding: 3px; background: #0b1422; flex-wrap: wrap; }
.seg button { font: inherit; font-size: .85rem; font-weight: 650; border: 0; background: transparent; color: var(--text-2); padding: .45rem .7rem; border-radius: 8px; cursor: pointer; display: inline-flex; gap: .35rem; align-items: center; min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--cyan-soft); color: var(--cyan-2); }
.seg button[disabled] { opacity: .4; cursor: not-allowed; }
.seg button:hover:not([disabled]) { color: #fff; }
.comp-panel { position: sticky; top: 84px; }
.comp-panel h3 { color: var(--cyan-2); }
.comp-panel h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1rem 0 .3rem; }
.comp-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem .9rem; font-size: .86rem; margin-top: .8rem; }
.legend-item { display: flex; gap: .55rem; align-items: center; }
.sw { width: 34px; height: 10px; flex: none; border-radius: 3px; }
.sw-suc { background: repeating-linear-gradient(90deg, var(--cyan) 0 7px, transparent 7px 12px); }
.sw-hot { background: repeating-linear-gradient(90deg, var(--violet) 0 7px, transparent 7px 12px); }
.sw-liq { background: repeating-linear-gradient(90deg, var(--liquid) 0 7px, transparent 7px 12px); }
.sw-comm { background: repeating-linear-gradient(90deg, var(--green) 0 2px, transparent 2px 8px); height: 4px; }
.sw-sensor { width: 14px; height: 14px; border: 2px solid var(--amber); border-radius: 50%; }
.sw-eev { width: 18px; height: 12px; background: linear-gradient(135deg, transparent 45%, var(--cyan-2) 45% 55%, transparent 55%), linear-gradient(45deg, transparent 45%, var(--cyan-2) 45% 55%, transparent 55%); border: 2px solid var(--cyan-2); border-radius: 2px; }

/* ---------- Laboratório ---------- */
.case-card { display: flex; flex-direction: column; gap: .6rem; }
.case-card .case-tag { font-family: var(--mono); color: var(--cyan); font-weight: 700; font-size: .85rem; }
.lab-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.2rem; align-items: start; }
@media (max-width: 1000px) { .lab-grid { grid-template-columns: 1fr; } }
.action-group h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1rem 0 .4rem; display: flex; gap: .4rem; align-items: center; }
.action-list { display: grid; gap: .45rem; }
.action-btn {
  text-align: left; font: inherit; font-size: .92rem; color: var(--text); background: #0d1726;
  border: 1px solid var(--line-2); border-radius: 10px; padding: .7rem .8rem; cursor: pointer;
  display: flex; gap: .6rem; align-items: center; justify-content: space-between; min-height: 46px;
}
.action-btn:hover:not([disabled]) { border-color: var(--cyan); }
.action-btn[disabled] { cursor: default; opacity: .7; }
.action-btn.v-ajuda { border-color: rgba(34, 211, 238, .45); }
.action-btn.v-inadequada { border-color: rgba(248, 113, 113, .45); }
.action-btn.v-nao_aplica { border-color: var(--line-2); }
.feedback { border-radius: 12px; padding: 1rem; border: 1px solid var(--line-2); background: var(--surface-2); animation: viewIn .3s ease both; }
.feedback.v-ajuda { border-color: rgba(34, 211, 238, .5); background: var(--cyan-soft); }
.feedback.v-prematura { border-color: rgba(251, 191, 36, .55); background: var(--amber-soft); }
.feedback.v-nao_aplica { border-color: var(--line-2); }
.feedback.v-inadequada { border-color: rgba(248, 113, 113, .6); background: var(--red-soft); }
.feedback h3 { display: flex; gap: .45rem; align-items: center; font-size: 1rem; }
.hyp-board-item { padding: .6rem 0; border-top: 1px solid var(--line); font-size: .9rem; }
.hyp-board-item:first-of-type { border-top: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .9rem; align-items: flex-start; }
.timeline li:first-child { border-top: 0; }
.narrative { font-size: 1rem; color: var(--text-2); }
.conclusion-box { border: 1px solid rgba(52, 211, 153, .5); background: var(--green-soft); border-radius: 12px; padding: 1rem; }

/* ---------- Códigos ---------- */
.code-result { border-left: 4px solid var(--cyan); }
.code-result.missing { border-left-color: var(--amber); }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: .35rem .9rem; margin: 0; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dt { margin-top: .4rem; } }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 650; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }

/* ---------- Aprendizado ---------- */
.topic-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.quiz-q { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.quiz-opts { display: grid; gap: .45rem; margin: .6rem 0; }
.quiz-opt { text-align: left; font: inherit; color: var(--text); background: #0d1726; border: 1px solid var(--line-2); border-radius: 10px; padding: .7rem .85rem; cursor: pointer; min-height: 46px; display: flex; gap: .5rem; align-items: center; }
.quiz-opt:hover:not([disabled]) { border-color: var(--cyan); }
.quiz-opt.correct { border-color: var(--green); background: var(--green-soft); }
.quiz-opt.wrong { border-color: rgba(251, 191, 36, .6); background: var(--amber-soft); }
.quiz-opt[disabled] { cursor: default; }
.progress-bar { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--cyan-2)); transition: width .4s; }

/* ---------- Histórico ---------- */
.hist-item { display: flex; gap: 1rem; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }

/* ---------- Relatório ---------- */
.report-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.report {
  background: #fbfcfe; color: #142033; border-radius: 12px; padding: 2rem 2.2rem; max-width: 900px; margin: 0 auto;
  box-shadow: var(--shadow); font-size: .93rem; line-height: 1.5;
}
.report h1 { font-size: 1.5rem; color: #0b2340; margin-bottom: .2rem; }
.report h2 { font-size: 1.05rem; color: #0b2340; border-bottom: 2px solid #d4dde9; padding-bottom: .25rem; margin: 1.4rem 0 .6rem; }
.report h3 { font-size: .95rem; color: #142033; margin: .8rem 0 .3rem; }
.report table { font-size: .86rem; }
.report th { color: #4a5b72; }
.report th, .report td { border-bottom: 1px solid #dfe5ee; }
.report .muted { color: #5a6b82; }
.report ul { margin-bottom: .4rem; }
.report-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-bottom: 3px solid #0b2340; padding-bottom: .8rem; }
.report-flag { display: inline-block; font-weight: 800; font-size: .78rem; letter-spacing: .06em; padding: .3rem .6rem; border-radius: 6px; border: 2px solid #b45309; color: #92400e; background: #fffbeb; }
.report-flag.user { border-color: #0e7490; color: #155e75; background: #ecfeff; }
.report .kv dt { color: #5a6b82; }
.report .r-tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: .05rem .4rem; border-radius: 4px; border: 1px solid #94a3b8; color: #334155; margin-right: .3rem; white-space: nowrap; }
.report .r-tag.evd { border-color: #0891b2; color: #0e7490; }
.report .r-tag.conf { border-color: #059669; color: #047857; }
.report .r-tag.crit { border-color: #dc2626; color: #b91c1c; }
.report-foot { margin-top: 1.6rem; padding-top: .8rem; border-top: 1px solid #d4dde9; font-size: .8rem; color: #5a6b82; }
.sign-line { margin-top: 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.sign-line div { border-top: 1px solid #94a3b8; padding-top: .3rem; font-size: .8rem; color: #5a6b82; }
@media (max-width: 640px) { .report { padding: 1.2rem 1rem; } }

/* ---------- Tour, toast, diálogo ---------- */
.tour-card {
  position: fixed; z-index: 60; left: 50%; bottom: 18px; transform: translateX(-50%);
  width: min(560px, calc(100% - 24px)); background: #0b1626; border: 1px solid var(--cyan);
  border-radius: 14px; padding: 1rem 1.1rem; box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
.tour-card h2 { font-size: 1.05rem; display: flex; gap: .45rem; align-items: center; }
.tour-card p { color: var(--text-2); font-size: .93rem; }
.tour-progress { display: flex; gap: .3rem; margin-bottom: .6rem; }
.tour-progress span { flex: 1; height: 4px; border-radius: 3px; background: var(--line-2); }
.tour-progress span.on { background: var(--cyan); }
.tour-highlight { position: relative; z-index: 5; box-shadow: 0 0 0 3px var(--amber), 0 0 28px rgba(251, 191, 36, .35) !important; border-radius: 12px; transition: box-shadow .3s; }
.toast {
  position: fixed; z-index: 90; right: 18px; bottom: 18px; max-width: min(420px, calc(100% - 36px));
  background: #0f2236; border: 1px solid var(--cyan); color: var(--text); padding: .8rem 1rem; border-radius: 12px;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: all .25s;
}
.toast.show { opacity: 1; transform: none; }
.toast.warn { border-color: var(--amber); }
.toast.error { border-color: var(--red); }
.confirm-dialog { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 14px; padding: 1.3rem; max-width: 460px; width: calc(100% - 32px); }
.confirm-dialog::backdrop { background: rgba(2, 6, 14, .7); }
.dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }

/* ---------- Rodapé ---------- */
.footer { border-top: 1px solid var(--line); background: rgba(5, 13, 26, .7); }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 1.3rem 1.2rem; }
.footer-sign { font-weight: 700; color: var(--text); margin-bottom: .3rem; }
.footer-note { color: var(--muted); font-size: .82rem; margin: 0; }

/* =========================================================
   ESTÚDIO DE GRAVAÇÃO E MODO APRESENTAÇÃO (16:9)
   ========================================================= */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--line); align-items: flex-start; font-size: .92rem; }
.check-list li:first-child { border-top: 0; }
.check-list .ok { color: var(--green); }
.check-list .no { color: var(--amber); }
.script-table td:first-child { font-family: var(--mono); color: var(--cyan-2); white-space: nowrap; }
.video-preview { width: 100%; max-height: 520px; background: #000; border-radius: 12px; border: 1px solid var(--line); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); display: inline-block; animation: recBlink 1s steps(2) infinite; }
@keyframes recBlink { 50% { opacity: .25; } }

.stage-frame { display: none; }
html.presentation {
  --bar: 64px;
  --sw: min(100vw, calc((100vh - var(--bar)) * 16 / 9));
  --sh: calc(var(--sw) * 9 / 16);
  --stage-top: calc((100vh - var(--bar)) / 2);
  font-size: 17px;
  scroll-behavior: auto;
}
html.presentation.presentation-clean { --bar: 0px; }
html.presentation body { background: #000; overflow: hidden; }
html.presentation .topbar, html.presentation .footer, html.presentation .tour-card, html.presentation .toast { display: none !important; }
html.presentation #main {
  position: fixed; left: 50%; top: var(--stage-top); transform: translate(-50%, -50%);
  width: var(--sw); height: var(--sh); overflow: auto; overflow-x: hidden;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(34, 211, 238, .09), transparent 60%),
    radial-gradient(800px 500px at -10% 20%, rgba(56, 97, 170, .16), transparent 60%),
    var(--bg);
  scrollbar-width: none;
  scroll-behavior: smooth;
}
html.presentation.reduce-motion #main { scroll-behavior: auto; }
html.presentation #main::-webkit-scrollbar { display: none; }
html.presentation .page { max-width: none; padding: 4.2rem 3rem 7.5rem; }
html.presentation .live-panel, html.presentation .comp-panel { top: 1rem; }
html.presentation .stage-frame {
  display: block; position: fixed; left: 50%; top: var(--stage-top); transform: translate(-50%, -50%);
  width: var(--sw); height: var(--sh); pointer-events: none; z-index: 70;
}
.stage-badge, .stage-brand, .stage-caption { z-index: 3; }
.stage-card { z-index: 2; }
.stage-countdown { z-index: 4; }
.demo-cursor { z-index: 5; }
.stage-badge {
  position: absolute; left: 1.4rem; top: 1.1rem; display: inline-flex; gap: .5rem; align-items: center;
  font-weight: 800; font-size: .95rem; color: var(--amber); background: rgba(5, 13, 26, .88);
  border: 1px solid rgba(251, 191, 36, .6); padding: .35rem .8rem; border-radius: 999px;
}
.stage-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); }
.stage-brand { position: absolute; right: 1.4rem; top: 1.1rem; font-weight: 800; color: var(--cyan-2); background: rgba(5, 13, 26, .88); padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line-2); font-size: .95rem; }
.stage-caption {
  position: absolute; left: 50%; bottom: 1.4rem; transform: translateX(-50%) translateY(10px);
  width: min(88%, 1100px); text-align: center; font-size: clamp(1rem, 2.1vw, 1.55rem); font-weight: 700; line-height: 1.3;
  color: #fff; background: rgba(3, 9, 18, .9); border: 1px solid rgba(34, 211, 238, .45);
  padding: .75rem 1.2rem; border-radius: 14px; opacity: 0; transition: opacity .35s, transform .35s;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
.stage-caption.show { opacity: 1; transform: translateX(-50%); }
.stage-caption small { display: block; font-size: .62em; font-weight: 600; color: var(--text-2); margin-top: .2rem; }
.stage-card {
  position: absolute; inset: 0; display: none; place-items: center; text-align: center;
  background: radial-gradient(700px 400px at 50% 40%, rgba(34, 211, 238, .16), transparent 70%), #050d1a;
  opacity: 0; transition: opacity .5s;
}
.stage-card.show { display: grid; }
.stage-card.visible { opacity: 1; }
.stage-card .sc-inner { max-width: 80%; }
.stage-card h1 { font-size: clamp(1.8rem, 4.6vw, 3.6rem); letter-spacing: -.02em; margin-bottom: .6rem; }
.stage-card h1 .accent { color: var(--cyan); }
.stage-card p { font-size: clamp(1rem, 2vw, 1.5rem); color: var(--text-2); }
.stage-card .sc-mark { width: clamp(56px, 8vw, 96px); height: auto; margin-bottom: 1rem; }
.stage-countdown {
  position: absolute; inset: 0; display: none; place-items: center; background: rgba(2, 6, 14, .78);
  font-size: clamp(5rem, 16vw, 11rem); font-weight: 800; color: var(--cyan-2);
}
.stage-countdown.show { display: grid; }
.demo-cursor {
  position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--amber); background: rgba(251, 191, 36, .25); opacity: 0;
  transform: translate(-50%, -50%); transition: left .6s cubic-bezier(.4, 0, .2, 1), top .6s cubic-bezier(.4, 0, .2, 1), opacity .3s;
  box-shadow: 0 0 0 6px rgba(251, 191, 36, .12);
}
.demo-cursor.show { opacity: 1; }
.demo-cursor.click { animation: cursorClick .45s ease; }
@keyframes cursorClick { 50% { box-shadow: 0 0 0 16px rgba(251, 191, 36, .0), 0 0 0 4px rgba(251, 191, 36, .6); transform: translate(-50%, -50%) scale(.8); } }
html.reduce-motion .demo-cursor { transition: opacity .2s; }
.demo-focus { outline: 3px solid var(--amber) !important; outline-offset: 4px; border-radius: 12px; box-shadow: 0 0 30px rgba(251, 191, 36, .35) !important; transition: outline-color .3s; }

.rec-controls {
  position: fixed; z-index: 95; left: 0; right: 0; bottom: 0; height: var(--bar, 64px);
  display: flex; gap: .8rem; align-items: center; justify-content: center;
  background: #070f1c; border-top: 1px solid var(--line-2); padding: 0 1rem;
  font-size: .95rem; color: var(--text);
}
html.presentation-clean .rec-controls { display: none !important; }
.rec-controls .rec-time { font-family: var(--mono); font-weight: 700; min-width: 3.4rem; }
.rec-controls .btn { min-height: 40px; }
.rec-controls .rec-hint { color: var(--muted); font-size: .82rem; }
@media (max-width: 640px) { .rec-controls .rec-hint { display: none; } }

/* ---------- Impressão ---------- */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  html, body { background: #fff !important; color: #000; }
  body * { visibility: hidden; }
  .report, .report * { visibility: visible; }
  .report { position: absolute; left: 0; top: 0; width: 100%; max-width: none; box-shadow: none; border-radius: 0; padding: 0; font-size: 10.5pt; }
  .no-print, .report-actions { display: none !important; }
  .report h2 { break-after: avoid; }
  .report table, .report .hyp-print { break-inside: avoid; }
  .report input { border: 0; }
  a { color: inherit; text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
  .page, .q-new, .feedback { animation: none; }
}
html.reduce-motion .page, html.reduce-motion .q-new, html.reduce-motion .feedback, html.reduce-motion .live-item.pulse { animation: none; }

/* =========================================================
   Vitrine — página inicial, motor ao vivo, paleta de comandos
   ========================================================= */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(103, 232, 249, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(103, 232, 249, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(1000px 620px at 70% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(1000px 620px at 70% 0%, #000 20%, transparent 75%);
}
kbd {
  font-family: var(--mono); font-size: .72rem; font-weight: 700; color: var(--text-2);
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: .05rem .35rem; background: var(--surface);
}
.btn kbd { margin-left: .2rem; }
.icon-btn { padding-left: .55rem; padding-right: .55rem; }
.palette-btn { gap: .45rem; color: var(--muted); }
.main-nav a.nav-rec { display: inline-flex; align-items: center; gap: .4rem; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(248, 113, 113, .6); animation: recPulse 2s infinite; }
@keyframes recPulse { 70% { box-shadow: 0 0 0 7px rgba(248, 113, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); } }

.hero h1 .accent {
  background: linear-gradient(92deg, var(--cyan) 10%, var(--cyan-2) 45%, #a5b4fc 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1rem;
  font-size: .8rem; font-weight: 600; color: var(--text-2);
  padding: .32rem .8rem .32rem .6rem; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(18, 26, 36, .7);
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: greenPulse 2.2s infinite; }
@keyframes greenPulse { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.hero-visual::before {
  content: ""; position: absolute; inset: 8% 4%; z-index: -1; border-radius: 40px;
  background: radial-gradient(closest-side, rgba(34, 211, 238, .22), transparent);
  filter: blur(30px);
}
.hero-visual .card { border-color: rgba(103, 232, 249, .22); box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .04); }

.stats-strip {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 2rem;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, rgba(23, 33, 48, .7), rgba(18, 26, 36, .7));
}
.stat { padding: 1.1rem 1.2rem; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat strong { display: block; font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: #fff; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }
@media (max-width: 900px) {
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:last-child { grid-column: 1 / -1; border-left: 0; }
}

.le-intro { align-items: flex-end; margin-bottom: .9rem; }
.le-intro .section-title { margin-bottom: .3rem; }
.le-intro p { margin: 0; max-width: 760px; }
.live-engine { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1.2rem; min-height: 420px; }
.le-col { min-width: 0; display: flex; flex-direction: column; }
.le-head { display: flex; align-items: center; gap: .45rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .7rem; }
.le-head .ico { color: var(--cyan); }
.le-head-sm { margin-top: 1rem; }
.le-count { margin-left: auto; font-family: var(--mono); color: var(--cyan-2); background: var(--cyan-soft); border-radius: 6px; padding: 0 .45rem; }
.le-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; max-height: 372px; overflow: auto; }
.le-feed li {
  display: flex; gap: .6rem; align-items: baseline; margin: 0; font-size: .9rem; color: var(--text-2);
  padding: .5rem .7rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
  animation: leIn .45s cubic-bezier(.2, .8, .2, 1) both;
}
.le-feed li:last-child { border-color: rgba(34, 211, 238, .45); box-shadow: 0 0 0 3px rgba(34, 211, 238, .08); color: var(--text); }
.le-type { flex: none; font-family: var(--mono); font-size: .7rem; font-weight: 700; color: var(--cyan-2); min-width: 6.3rem; text-transform: uppercase; }
@keyframes leIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.le-hyps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.le-hyp { margin: 0; padding: .65rem .8rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: .45rem; transition: border-color .4s, background .4s; }
.le-hyp.lv-alta { border-color: rgba(34, 211, 238, .55); background: linear-gradient(90deg, rgba(34, 211, 238, .1), var(--surface) 70%); }
.le-hyp.lv-enfraquecida { opacity: .7; }
.le-title { font-size: .92rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.le-bottom { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.le-meter { display: inline-flex; gap: 4px; }
.le-meter i { width: 26px; height: 6px; border-radius: 3px; background: var(--surface-3); transition: background .5s, box-shadow .5s; }
.le-meter i.on { background: var(--cyan); box-shadow: 0 0 10px rgba(34, 211, 238, .5); }
.le-rules { display: flex; flex-wrap: wrap; gap: .35rem; min-height: 2rem; }
.rule { font-family: var(--mono); font-size: .74rem; font-weight: 700; padding: .18rem .5rem; border-radius: 6px; border: 1px solid var(--line-2); cursor: help; }
.rule.up { color: var(--green); border-color: rgba(52, 211, 153, .45); background: var(--green-soft); }
.rule.down { color: var(--amber); border-color: rgba(251, 191, 36, .45); background: var(--amber-soft); }
.rule.new { animation: rulePop .6s cubic-bezier(.2, .8, .2, 1.3) both; }
@keyframes rulePop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@media (max-width: 860px) { .live-engine { grid-template-columns: minmax(0, 1fr); } .le-feed { max-height: 240px; } }

.module-card { position: relative; overflow: hidden; }
.module-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(400px 160px at 0% 0%, rgba(34, 211, 238, .14), transparent 70%);
}
.module-card:hover::after { opacity: 1; }
.module-card:hover { box-shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(34, 211, 238, .25); }

.author-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.3rem; align-items: center; border-color: rgba(103, 232, 249, .2); }
.author-avatar {
  width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center;
  font-weight: 800; font-size: 1.5rem; color: #032029; letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--cyan-2), var(--cyan) 50%, #6366f1);
  box-shadow: 0 12px 30px rgba(34, 211, 238, .25);
}
.author-body h3 { font-size: 1.3rem; margin-bottom: .3rem; }
.author-body .row { gap: .4rem; }
.author-actions { display: flex; flex-direction: column; gap: .5rem; }
@media (max-width: 760px) { .author-card { grid-template-columns: minmax(0, 1fr); } .author-actions { flex-direction: row; flex-wrap: wrap; } }

.palette {
  width: min(640px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 80px)); margin: 10vh auto auto; padding: 0;
  border: 1px solid var(--line-2); border-radius: 16px; background: var(--bg-2); color: var(--text);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .7), 0 0 0 1px rgba(34, 211, 238, .1);
  flex-direction: column; overflow: hidden;
}
.palette[open] { display: flex; animation: palIn .18s ease-out; }
.palette::backdrop { background: rgba(2, 6, 14, .65); backdrop-filter: blur(4px); }
@keyframes palIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
.pal-search { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
.pal-search .ico { color: var(--cyan); width: 1.3em; height: 1.3em; }
.pal-search input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font: inherit; font-size: 1.05rem; outline: none; }
.pal-search input:focus-visible { box-shadow: none; }
.pal-list { list-style: none; margin: 0; padding: .4rem; overflow: auto; flex: 1; }
.pal-list li[role="option"] { display: flex; align-items: center; gap: .7rem; margin: 0; padding: .6rem .7rem; border-radius: 10px; cursor: pointer; color: var(--text-2); }
.pal-list li[role="option"] .ico { color: var(--muted); }
.pal-list li[aria-selected="true"] { background: var(--cyan-soft); color: #fff; }
.pal-list li[aria-selected="true"] .ico { color: var(--cyan); }
.pal-label { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pal-label small { color: var(--muted); font-family: var(--mono); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-group { flex: none; font-size: .72rem; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: .05rem .5rem; }
.pal-empty { padding: 1.2rem; color: var(--muted); text-align: center; }
.pal-foot { display: flex; gap: 1rem; padding: .6rem 1rem; border-top: 1px solid var(--line); font-size: .75rem; color: var(--muted); }
.pal-foot span:last-child { margin-left: auto; }
@media (max-width: 640px) { .palette-btn kbd, .pal-foot span:not(:last-child) { display: none; } }

html.reduce-motion .rec-dot, html.reduce-motion .pulse-dot, html.reduce-motion .le-feed li, html.reduce-motion .rule.new, html.reduce-motion .palette[open] { animation: none; }
@media print { body::before { display: none; } }
