/* Search One GEO Engine — design system
   Cores e fontes conforme o briefing: branco, preto, slate #0F172A, ciano #00A5FF.
   Assinatura visual: as pílulas de citação [1] [2] [3] da capa do e-book. */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800;900&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --paper: #FFFFFF;
  --ice: #F3F5F8;
  --ice-2: #E9EDF2;
  --line: #DDE2E9;
  --line-2: #C9D0DA;
  --ink: #000000;
  --slate: #0F172A;
  --text-2: #3D4656;           /* texto secundário: 9.6:1 sobre branco */
  --text-3: #5B6474;           /* legendas: 6:1 */
  --cyan: #00A5FF;
  --cyan-hover: #0088D6;
  --cyan-ink: #0072B5;         /* ciano para texto sobre branco (4.9:1) */
  --cyan-wash: #E6F6FF;
  --green: #10B981; --green-ink: #047857; --green-wash: #E7F8F1;
  --amber: #F59E0B; --amber-ink: #A85A06; --amber-wash: #FEF4E2;
  --red: #EF4444;   --red-ink: #B91C1C;   --red-wash: #FDECEC;
  --wa: #25D366; --wa-hover: #1EBE5D;

  --f-display: 'Outfit', 'Montserrat', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 80px; --s10: 120px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-pill: 999px;
  --side: 264px;
  --wrap: 1120px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--cyan-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--slate); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--cyan); color: var(--ink); }
.ic { flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--f-mono); font-feature-settings: "zero" 0; }
.muted { color: var(--text-3); }
.hidden { display: none !important; }

/* ── Tipografia ─────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--f-display); color: var(--ink); margin: 0; letter-spacing: -0.02em; }
.h-xl { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.5rem); line-height: 1.04; font-weight: 800; letter-spacing: -0.035em; }
.h-lg { font-size: clamp(1.6rem, 1.15rem + 1.9vw, 2.5rem); line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; }
.h-md { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem); line-height: 1.2; font-weight: 700; }
.h-sm { font-size: 1.125rem; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
.lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--text-2); max-width: 62ch; }
.label { font-size: .8125rem; font-weight: 600; color: var(--text-3); letter-spacing: .01em; }
p { margin: 0 0 var(--s4); max-width: 68ch; }
p:last-child { margin-bottom: 0; }

/* ── Botões ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 10px 20px; border-radius: var(--r-sm);
  border: 1.5px solid transparent; background: var(--ice); color: var(--ink);
  font: 600 15px/1.2 var(--f-body); text-decoration: none; cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--cyan); color: var(--ink); }
.btn-primary:hover { background: var(--cyan-hover); color: var(--ink); }
.btn-dark { background: var(--slate); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-line { background: var(--paper); border-color: var(--line-2); }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--ice); color: var(--ink); }
.btn-wa { background: var(--wa); color: #04210F; }
.btn-wa:hover { background: var(--wa-hover); color: #04210F; }
.btn-danger { background: var(--red-wash); color: var(--red-ink); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-lg { min-height: 52px; padding: 14px 26px; font-size: 16px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; }

/* ── Pílulas de citação (assinatura) ────────────────────── */
.cite {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 26px; padding: 0 9px; border-radius: var(--r-pill);
  border: 1.5px solid var(--line-2); font: 700 12px/1 var(--f-mono); color: var(--text-2);
  background: var(--paper); transition: all .25s var(--ease);
}
.cite.is-on { background: var(--cyan); border-color: var(--cyan); color: var(--ink); }
.cite.is-done { background: var(--slate); border-color: var(--slate); color: #fff; }
.on-ink .cite { background: transparent; border-color: #3A4458; color: #A9B4C6; }
.on-ink .cite.is-on { background: var(--cyan); border-color: var(--cyan); color: var(--ink); }

/* ── Chips / status ─────────────────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-pill); background: var(--ice); font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.chip-cyan { background: var(--cyan-wash); color: var(--cyan-ink); }
.chip-green { background: var(--green-wash); color: var(--green-ink); }
.chip-amber { background: var(--amber-wash); color: var(--amber-ink); }
.chip-red { background: var(--red-wash); color: var(--red-ink); }
.chip-dark { background: var(--slate); color: #fff; }

/* ── Superfícies ────────────────────────────────────────── */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); }
.panel-ice { background: var(--ice); border-color: transparent; }
.ink {
  background: var(--slate); color: #fff; border-radius: var(--r-lg); padding: var(--s5);
  background-image: repeating-linear-gradient(-28deg, transparent 0 22px, rgba(255,255,255,.035) 22px 23px);
}
.ink h1, .ink h2, .ink h3 { color: #fff; }
.ink .muted, .ink .label { color: #A9B4C6; }
.ink a { color: var(--cyan); }
.divider { height: 1px; background: var(--line); border: 0; margin: var(--s6) 0; }

/* ── App shell ──────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  border-right: 1px solid var(--line); padding: var(--s5) var(--s4); background: var(--paper); overflow-y: auto;
}
.side .brand { display: flex; align-items: center; gap: 10px; padding: 0 var(--s2) var(--s5); text-decoration: none; color: var(--ink); }
.brand img { height: 30px; width: auto; }
.brand span { font: 700 13px/1.2 var(--f-display); color: var(--text-3); border-left: 1px solid var(--line); padding-left: 10px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav .nav-sub-title {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm);
  color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 15px;
}
.nav a:hover { background: var(--ice); color: var(--ink); }
.nav a.is-active { background: var(--ice); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--cyan); }
.nav-sub { margin: var(--s2) 0 var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.nav-sub-title { font-size: 13px !important; font-weight: 600 !important; color: var(--text-3) !important; padding: 6px 12px !important; }
.nav-sub a { font-size: 14px; padding: 8px 12px; }
.nav .tick { margin-left: auto; color: var(--green); }
.side-foot { margin-top: auto; padding-top: var(--s5); }
.mini-level { display: flex; gap: 12px; align-items: center; padding: var(--s3); border-radius: var(--r-md); background: var(--ice); text-decoration: none; color: var(--ink); }
.mini-level b { display: block; font: 700 14px/1.2 var(--f-display); }
.mini-level small { color: var(--text-3); font-size: 12px; }

.main { min-width: 0; }
.topbar { display: none; }
.page { max-width: var(--wrap); margin: 0 auto; padding: var(--s7) var(--s6) var(--s9); }
.page-narrow { max-width: 820px; }
.page-head { margin-bottom: var(--s6); }
.page-head .lead { margin-top: var(--s3); }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-3); text-decoration: none; margin-bottom: var(--s4); }
.crumb:hover { color: var(--ink); }

/* Drawer + botão flutuante (mobile) */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); background: var(--paper); z-index: 90; transform: translateX(100%); transition: transform .25s var(--ease); padding: var(--s4); overflow-y: auto; display: flex; flex-direction: column; }
.drawer.from-left { left: 0; right: auto; transform: translateX(-100%); }
body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
body.drawer-open .drawer { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s4); }
.fab-modules { display: none; }

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
    position: sticky; top: 0; z-index: 50; height: 60px; padding: 0 var(--s4);
    background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px);
  }
  .topbar .brand img { height: 24px; }
  .page { padding: var(--s5) var(--s4) var(--s10); }
  .fab-modules {
    display: inline-flex; position: fixed; left: var(--s4); bottom: calc(var(--s4) + env(safe-area-inset-bottom)); z-index: 60;
    align-items: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: var(--r-pill); border: 0;
    background: var(--slate); color: #fff; font-weight: 600; font-size: 15px; cursor: pointer;
  }
}

/* ── Flash ──────────────────────────────────────────────── */
.flash { padding: 12px 16px; border-radius: var(--r-md); margin-bottom: var(--s4); font-size: 15px; display: flex; gap: 10px; align-items: flex-start; }
.flash-ok { background: var(--green-wash); color: var(--green-ink); }
.flash-err { background: var(--red-wash); color: var(--red-ink); }
.flash-info { background: var(--cyan-wash); color: var(--cyan-ink); }

/* ── Formulários ────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s4); }
.field label { font-size: 14px; font-weight: 600; color: var(--slate); }
.field .help { font-size: 13px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--paper); font-size: 16px; transition: border-color .15s;
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-wash); }
.input::placeholder, .textarea::placeholder { color: #8A93A3; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); cursor: pointer; transition: border-color .15s, background .15s; }
.check:hover { border-color: var(--line-2); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--cyan); flex: none; }
.check.is-on { border-color: var(--cyan); background: var(--cyan-wash); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s4); }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.counter { font: 500 12px/1 var(--f-mono); color: var(--text-3); align-self: flex-end; }

/* ── Login ──────────────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { position: relative; padding: var(--s7); display: flex; flex-direction: column; justify-content: space-between; border-radius: 0; overflow: hidden; }
.auth-art .brand img { height: 40px; }
.auth-q { font: 500 clamp(1.05rem, .9rem + .5vw, 1.3rem)/1.4 var(--f-body); color: #E7ECF3; display: flex; gap: 10px; }
.auth-q::before { content: "›"; color: var(--cyan); font-weight: 700; }
.auth-lines { margin: var(--s5) 0; display: grid; gap: 10px; }
.auth-lines i { display: block; height: 10px; border-radius: 6px; background: #2A3447; }
.auth-title { font: 800 clamp(2.4rem, 1.4rem + 3.5vw, 4.2rem)/1 var(--f-display); letter-spacing: -0.04em; color: #fff; margin-bottom: var(--s4); }
.auth-sub { color: var(--cyan); font: 500 clamp(1.05rem, .95rem + .4vw, 1.3rem)/1.4 var(--f-body); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: var(--s7) var(--s5); }
.auth-form > div { width: 100%; max-width: 400px; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: var(--s5); min-height: auto; }
  .auth-art .auth-hide { display: none; }
  .auth-form { padding: var(--s6) var(--s4) var(--s8); align-items: flex-start; }
}

/* ── Dashboard ──────────────────────────────────────────── */
.hero-dash { display: grid; grid-template-columns: 1fr 1.08fr; gap: var(--s6); align-items: stretch; margin-bottom: var(--s7); }
.hero-dash .hello { display: flex; flex-direction: column; justify-content: center; }
.hero-dash .hello .h-xl { margin-bottom: var(--s4); }
.hero-dash .hello .actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
@media (max-width: 1080px) { .hero-dash { grid-template-columns: 1fr; gap: var(--s5); } }

/* Painel "resposta da IA" — progresso do aluno */
.answer { display: flex; flex-direction: column; gap: var(--s4); min-height: 320px; }
.answer-q { display: flex; gap: 10px; font-weight: 500; font-size: 16px; line-height: 1.45; color: #E7ECF3; padding-bottom: var(--s4); border-bottom: 1px solid #263046; }
.answer-q b { color: var(--cyan); }
.answer-body { display: grid; gap: 10px; }
.answer-line { position: relative; height: 10px; border-radius: 6px; background: #222C3F; overflow: hidden; }
.answer-line i { position: absolute; inset: 0 auto 0 0; width: 0; background: #3E4B63; border-radius: 6px; transition: width .7s var(--ease); }
.answer-line.is-filled i { background: #8FA0BA; }
.answer-text { font-size: 15px; line-height: 1.6; color: #D9E1EC; }
.answer-text mark { background: transparent; color: var(--cyan); font-weight: 600; }
.answer-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.answer-foot .label { margin-right: 4px; }
.answer-foot .cite { min-width: 30px; height: 24px; padding: 0 6px; font-size: 11px; }
.answer-foot { gap: 6px; }
@media (prefers-reduced-motion: reduce) { .answer-line i { transition: none; } }

.statline { display: flex; flex-wrap: wrap; gap: var(--s6); padding: var(--s5) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: var(--s7); }
.stat { display: flex; gap: var(--s3); align-items: center; }
.stat b { display: block; font: 800 1.6rem/1 var(--f-display); letter-spacing: -0.02em; }
.stat small { display: block; font-size: 13px; color: var(--text-3); margin-top: 4px; }
.ring { width: 52px; height: 52px; }
.ring circle { fill: none; stroke-width: 5; }
.ring .bg { stroke: var(--ice-2); }
.ring .fg { stroke: var(--cyan); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .8s var(--ease); }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap; }

/* Trilha */
.trail { list-style: none; margin: 0 0 var(--s8); padding: 0; position: relative; }
.trail::before { content: ""; position: absolute; left: 23px; top: 24px; bottom: 24px; width: 2px; background: var(--line); }
.trail li { position: relative; }
.mission {
  display: grid; grid-template-columns: 48px 1fr auto; gap: var(--s4); align-items: center;
  padding: var(--s4) var(--s4) var(--s4) 0; text-decoration: none; color: var(--ink); border-radius: var(--r-md);
}
a.mission:hover .mission-title { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--cyan); text-underline-offset: 4px; }
.node {
  position: relative; z-index: 1; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--line-2); font: 700 15px/1 var(--f-mono); color: var(--text-3);
}
.mission[data-state="open"] .node, .mission[data-state="practice"] .node { border-color: var(--cyan); color: var(--ink); background: var(--cyan-wash); }
.mission[data-state="done"] .node { background: var(--slate); border-color: var(--slate); color: #fff; }
.mission[data-state="locked"] { color: var(--text-3); }
.mission[data-state="locked"] .mission-title { color: var(--text-3); }
.mission-title { font: 700 1.15rem/1.25 var(--f-display); letter-spacing: -0.01em; }
.mission-sub { font-size: 14.5px; color: var(--text-2); margin-top: 2px; }
.mission-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.mission-go { display: flex; align-items: center; gap: 8px; }
.mission.is-next { background: var(--ice); padding-left: 0; }
.mission.is-next .node { box-shadow: 0 0 0 6px var(--paper), 0 0 0 8px var(--cyan); }
@media (max-width: 640px) {
  .mission { grid-template-columns: 48px 1fr; }
  .mission-go { grid-column: 2; }
}

.tools-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: var(--s8); }
.tool-tile { background: var(--paper); padding: var(--s5); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: var(--s2); min-height: 150px; transition: background .15s; }
.tool-tile:hover { background: var(--ice); color: var(--ink); }
@media (max-width: 1180px) { .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tools-grid { grid-template-columns: 1fr; } .tool-tile { min-height: 0; } }
.tool-tile .ic { color: var(--cyan-ink); }
.tool-tile b { font: 700 1.05rem/1.25 var(--f-display); }
.tool-tile span { font-size: 14px; color: var(--text-2); }
.tool-tile .chip { margin-top: auto; align-self: flex-start; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } }
.promo { display: flex; flex-direction: column; gap: var(--s3); align-items: flex-start; }
.promo .h-md { max-width: 22ch; }

/* ── Modal ──────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--s4); background: rgba(15,23,42,.55); }
.modal-box { background: var(--paper); border-radius: var(--r-lg); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; padding: var(--s6); position: relative; }
.modal-close { position: absolute; top: 12px; right: 12px; }

/* ── Toast + XP ─────────────────────────────────────────── */
.toasts { position: fixed; z-index: 120; right: var(--s4); bottom: var(--s4); display: grid; gap: 8px; }
.toast { background: var(--slate); color: #fff; padding: 12px 16px; border-radius: var(--r-md); font-size: 15px; display: flex; align-items: center; gap: 10px; animation: toast-in .3s var(--ease); max-width: 360px; }
.toast .xp { font: 700 14px/1 var(--f-mono); color: var(--ink); background: var(--cyan); padding: 5px 8px; border-radius: var(--r-pill); }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 960px) { .toasts { left: var(--s4); right: var(--s4); bottom: 80px; } .toast { max-width: none; } }

/* ── Player (aula) ──────────────────────────────────────── */
.player { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); background: var(--paper); }
.player > * { min-width: 0; }
.player-top { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
.player-top-in { display: flex; align-items: center; gap: var(--s4); padding: 10px var(--s4); max-width: 1200px; margin: 0 auto; }
.player-title { flex: 1; min-width: 0; }
.player-title b { display: block; font: 700 15px/1.2 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-title small { color: var(--text-3); font-size: 13px; }
.steps { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; padding: 8px var(--s4) 12px; max-width: 1200px; margin: 0 auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.steps .cite { cursor: pointer; flex: none; }
.steps .cite[disabled] { cursor: default; opacity: .55; }
.xp-pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--r-pill); background: var(--ice); font: 700 14px/1 var(--f-mono); }
.xp-pill .ic { color: var(--cyan-ink); }
.xp-pill.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.15); background: var(--cyan); } }

.stage { display: flex; align-items: flex-start; justify-content: center; padding: var(--s7) var(--s4) var(--s8); }
.card { width: 100%; max-width: 720px; animation: card-in .35s var(--ease); }
.card.wide { max-width: 980px; }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card, .toast { animation: none; } }
.card-kicker { display: inline-flex; margin-bottom: var(--s4); }
.card .h-lg { margin-bottom: var(--s4); }
.card .h-md { margin-bottom: var(--s4); }
.card-hint { font-size: 14px; color: var(--text-3); margin: calc(var(--s2) * -1) 0 var(--s5); display: flex; gap: 6px; align-items: center; }
.card-body p, .card-body li { font-size: 1.125rem; line-height: 1.65; color: var(--text-2); }
.card-body strong { color: var(--ink); }
.qlist { list-style: none; padding: 0; margin: 0 0 var(--s4); display: grid; gap: 8px; }
.qlist li { padding: 12px 16px; border-left: 3px solid var(--cyan); background: var(--ice); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--ink) !important; font-weight: 500; }

.player-bottom { position: sticky; bottom: 0; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); }
.player-bottom-in { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); max-width: 720px; margin: 0 auto; padding: 12px var(--s4) calc(12px + env(safe-area-inset-bottom)); }
.player-bottom .count { font: 500 13px/1 var(--f-mono); color: var(--text-3); }

/* Card: stat */
.bigstat { font: 900 clamp(4rem, 2.5rem + 8vw, 8rem)/.9 var(--f-display); letter-spacing: -0.05em; color: var(--ink); margin-bottom: var(--s3); }
.bigstat-label { font: 700 clamp(1.2rem, 1rem + .9vw, 1.6rem)/1.25 var(--f-display); margin-bottom: var(--s5); max-width: 24ch; }
.source { font-size: 13px; color: var(--text-3); border-top: 1px solid var(--line); padding-top: var(--s3); margin-top: var(--s5); max-width: 68ch; }

/* Card: flip */
.flips { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s3); }
.flip { position: relative; min-height: 170px; perspective: 900px; border: 0; padding: 0; background: none; cursor: pointer; text-align: left; }
.flip-in { position: absolute; inset: 0; transition: transform .45s var(--ease); transform-style: preserve-3d; }
.flip.is-flipped .flip-in { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: var(--r-md); padding: var(--s5); display: flex; flex-direction: column; justify-content: space-between; }
.flip-front { background: var(--ice); border: 1.5px solid var(--line); }
.flip-front b { font: 800 1.45rem/1.15 var(--f-display); letter-spacing: -0.02em; }
.flip-front small { color: var(--text-3); font-size: 13px; display: flex; gap: 6px; align-items: center; }
.flip-back { background: var(--slate); color: #E7ECF3; transform: rotateY(180deg); font-size: 15.5px; line-height: 1.55; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .flip-in { transition: none; } }

/* Card: table compare */
.ctable { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.ctable th { text-align: left; font: 700 14px/1.2 var(--f-display); padding: 10px 12px; color: var(--text-3); border-bottom: 2px solid var(--ink); }
.ctable th:last-child { color: var(--cyan-ink); }
.ctable td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ctable td:first-child { font-weight: 600; color: var(--slate); width: 30%; }
.ctable tr.is-hidden td:not(:first-child) { color: transparent; }
.ctable tr.is-hidden td:not(:first-child)::after { content: ""; display: block; height: 10px; background: var(--ice-2); border-radius: 6px; margin-top: -1.2em; }
.ctable tr { cursor: pointer; }
.ctable tr:not(.is-hidden) td:last-child { font-weight: 600; color: var(--ink); }
@media (max-width: 640px) {
  .ctable thead { display: none; }
  .ctable tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .ctable td { display: block; border: 0; padding: 2px 0; width: auto !important; }
  .ctable td:first-child { margin-bottom: 4px; }
  .ctable td[data-h]::before { content: attr(data-h) ": "; color: var(--text-3); font-weight: 500; }
}

/* Card: reveal list */
.reveals { display: grid; gap: 8px; }
.reveal { border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--paper); text-align: left; padding: 0; cursor: pointer; width: 100%; transition: border-color .15s; }
.reveal-head { display: flex; gap: 12px; align-items: center; padding: 14px 16px; font-weight: 600; font-size: 16px; }
.reveal-head .n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--f-mono); background: var(--ice); }
.reveal-body { display: none; padding: 0 16px 16px 56px; color: var(--text-2); font-size: 15.5px; }
.reveal.is-open .reveal-body { display: block; }
.reveal.is-open { border-color: var(--line-2); background: var(--ice); }
.tone-red .reveal.is-open { border-color: var(--red); background: var(--red-wash); }
.tone-red .reveal.is-open .n { background: var(--red); color: #fff; }
.tone-amber .reveal.is-open { border-color: var(--amber); background: var(--amber-wash); }
.tone-amber .reveal.is-open .n { background: var(--amber); color: var(--ink); }
.tone-cyan .reveal.is-open { border-color: var(--cyan); background: var(--cyan-wash); }
.tone-cyan .reveal.is-open .n { background: var(--cyan); color: var(--ink); }

/* Card: trio */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); position: relative; }
.trio-item { border-top: 3px solid var(--ink); padding-top: var(--s4); }
.trio-item b { display: block; font: 800 1.35rem/1.2 var(--f-display); margin-bottom: 6px; }
.trio-item span { color: var(--text-2); font-size: 15.5px; }
.trio-center { margin-top: var(--s5); padding: var(--s4) var(--s5); background: var(--cyan-wash); border-radius: var(--r-md); font: 700 1.15rem/1.3 var(--f-display); color: var(--slate); }
@media (max-width: 640px) { .trio { grid-template-columns: 1fr; } }

/* Card: layers */
.layers { display: flex; flex-direction: column-reverse; gap: 6px; }
.layer { text-align: left; border: 0; border-radius: var(--r-md); padding: 16px 18px; cursor: pointer; background: var(--ice); transition: background .2s, color .2s; width: 100%; }
.layer b { font: 700 1.1rem/1.2 var(--f-display); display: flex; gap: 10px; align-items: center; }
.layer b .mono { font-size: 13px; color: var(--text-3); }
.layer p { display: none; margin: 8px 0 0; color: var(--text-2); font-size: 15.5px; }
.layer.is-open { background: var(--slate); color: #fff; }
.layer.is-open p { display: block; color: #CBD5E1; }
.layer.is-open b .mono { color: var(--cyan); }
.layer:nth-child(2) { margin: 0 4%; } .layer:nth-child(3) { margin: 0 8%; }

/* Card: steps */
.steplist { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 0; }
.steplist li { display: grid; grid-template-columns: 40px 1fr; gap: var(--s4); padding: 14px 0; border-bottom: 1px solid var(--line); }
.steplist li:last-child { border-bottom: 0; }
.steplist .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--f-mono); background: var(--ice); }
.steplist li.is-on .n { background: var(--cyan); }
.steplist b { font: 700 1.05rem/1.3 var(--f-display); display: block; }
.steplist span { color: var(--text-2); font-size: 15.5px; }

/* Card: before / after */
.ba-toggle { display: inline-flex; background: var(--ice); padding: 4px; border-radius: var(--r-pill); margin-bottom: var(--s4); }
.ba-toggle button { border: 0; background: none; padding: 8px 16px; border-radius: var(--r-pill); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--text-2); }
.ba-toggle button.is-on { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2); }
.ba-box { border-radius: var(--r-md); padding: var(--s5); font-size: 1.15rem; line-height: 1.6; border: 1.5px solid; min-height: 140px; }
.ba-box.bad { border-color: var(--red); background: var(--red-wash); color: #4A1010; }
.ba-box.good { border-color: var(--green); background: var(--green-wash); color: #06291D; }
.ba-box .tag { display: inline-flex; margin-bottom: var(--s3); }
.note { margin-top: var(--s4); padding-left: var(--s4); border-left: 3px solid var(--cyan); color: var(--text-2); font-size: 16px; max-width: 68ch; }

/* Card: anatomy */
.anat-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s4); }
.anat-tags button { border: 1.5px solid var(--line-2); background: var(--paper); border-radius: var(--r-pill); padding: 7px 14px; font-weight: 600; font-size: 14px; cursor: pointer; }
.anat-text { font-size: 1.2rem; line-height: 1.8; padding: var(--s5); background: var(--ice); border-radius: var(--r-md); }
.anat-text span { transition: background .2s, color .2s; border-radius: 4px; padding: 1px 0; color: var(--text-2); }
.anat-text span.is-on { background: var(--cyan); color: var(--ink); box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 2px 4px; }
.anat-tags button.is-seen { border-color: var(--slate); background: var(--slate); color: #fff; }
.anat-tags button.is-on { border-color: var(--cyan); background: var(--cyan); color: var(--ink); }
.wordcount { margin-top: var(--s3); font: 500 13px/1 var(--f-mono); color: var(--text-3); }

/* Card: spot */
.spot-text { font-size: 1.25rem; line-height: 2; padding: var(--s5); border: 1.5px solid var(--line); border-radius: var(--r-md); }
.spot-text button { font: inherit; border: 0; background: none; padding: 1px 2px; border-radius: 4px; cursor: pointer; border-bottom: 2px dashed var(--line-2); color: var(--ink); }
.spot-text button:hover { background: var(--ice); }
.spot-text button.hit { background: var(--red-wash); color: var(--red-ink); border-bottom-color: var(--red); text-decoration: line-through; text-decoration-thickness: 2px; }
.spot-text button.miss { background: var(--green-wash); color: var(--green-ink); border-bottom-color: var(--green); }
.spot-score { margin-top: var(--s3); font-weight: 600; }

/* Card: sort */
.sort-items { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s5); min-height: 48px; }
.sort-item { border: 1.5px solid var(--line-2); background: var(--paper); border-radius: var(--r-sm); padding: 10px 14px; font-size: 15px; font-weight: 500; cursor: pointer; text-align: left; }
.sort-item.is-picked { border-color: var(--cyan); background: var(--cyan-wash); box-shadow: 0 0 0 3px var(--cyan-wash); }
.sort-buckets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s3); }
.bucket { border: 2px dashed var(--line-2); border-radius: var(--r-md); padding: var(--s4); min-height: 130px; background: var(--paper); cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.bucket.is-target { border-color: var(--cyan); background: var(--cyan-wash); }
.bucket > b { font: 700 1rem/1.2 var(--f-display); }
.bucket .placed { font-size: 14px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--green-wash); color: var(--green-ink); font-weight: 500; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* Card: quiz */
.quiz-q { font: 700 clamp(1.3rem, 1.1rem + .9vw, 1.75rem)/1.25 var(--f-display); letter-spacing: -0.02em; margin-bottom: var(--s5); }
.opts { display: grid; gap: 10px; }
.opt { display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; border: 1.5px solid var(--line-2); background: var(--paper); border-radius: var(--r-md); padding: 14px 16px; font-size: 16.5px; cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover:not(:disabled) { border-color: var(--ink); }
.opt .k { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ice); font: 700 13px/1 var(--f-mono); }
.opt.right { border-color: var(--green); background: var(--green-wash); }
.opt.right .k { background: var(--green); color: #fff; }
.opt.wrong { border-color: var(--red); background: var(--red-wash); }
.opt.wrong .k { background: var(--red); color: #fff; }
.opt:disabled { cursor: default; }
.explain { margin-top: var(--s4); padding: var(--s4); border-radius: var(--r-md); background: var(--ice); font-size: 16px; }
.explain b { display: block; margin-bottom: 4px; }

/* Card: quote */
.quote { font: 700 clamp(1.5rem, 1.15rem + 1.6vw, 2.3rem)/1.22 var(--f-display); letter-spacing: -0.025em; margin: 0 0 var(--s5); padding-left: var(--s5); border-left: 4px solid var(--cyan); max-width: 30ch; }
.quote-by { color: var(--text-3); font-size: 15px; padding-left: var(--s5); }

/* Card: serp (buscador × IA) */
.serp-tabs { display: inline-flex; background: var(--ice); padding: 4px; border-radius: var(--r-pill); margin-bottom: var(--s4); }
.serp-tabs button { border: 0; background: none; padding: 9px 16px; border-radius: var(--r-pill); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--text-2); display: inline-flex; gap: 8px; align-items: center; }
.serp-tabs button.is-on { background: var(--slate); color: #fff; }
.serp { border: 1.5px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.serp-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--ice); font-size: 15px; }
.serp-results { padding: var(--s4); display: grid; gap: var(--s4); max-height: 330px; overflow: hidden; position: relative; }
.serp-results::after { content: ""; position: absolute; inset: auto 0 0; height: 80px; background: linear-gradient(transparent, #fff); }
.serp-r small { display: block; color: var(--text-3); font-size: 13px; }
.serp-r b { display: block; color: #1A0DAB; font-weight: 500; font-size: 17px; }
.serp-r i { display: block; height: 8px; border-radius: 4px; background: var(--ice-2); margin-top: 6px; width: 90%; font-style: normal; }
.serp-ai { padding: var(--s5); }
.serp-ai p { font-size: 16.5px; color: var(--slate); }
.serp-ai .cite { height: 22px; min-width: 28px; font-size: 11px; vertical-align: 2px; margin: 0 1px; }
.serp-sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: var(--s4); }
.serp-sources div { padding: 10px 12px; border-radius: var(--r-sm); background: var(--ice); font-size: 13px; }
.serp-sources div b { display: block; font-size: 13px; }
@media (max-width: 640px) { .serp-sources { grid-template-columns: 1fr; } }
.caption { margin-top: var(--s4); color: var(--text-2); font-size: 16px; max-width: 64ch; }

/* Card: pipeline (simulador) */
.pipe { display: grid; grid-template-columns: 220px 1fr; gap: var(--s5); }
.pipe-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; align-content: start; }
.pipe-steps button { width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: var(--r-sm); display: flex; gap: 10px; align-items: center; font-size: 14.5px; font-weight: 500; color: var(--text-3); cursor: pointer; }
.pipe-steps button .cite { height: 24px; min-width: 30px; font-size: 11px; }
.pipe-steps button.is-on { background: var(--ice); color: var(--ink); font-weight: 600; }
.pipe-steps button.is-past { color: var(--slate); }
.pipe-view { min-height: 380px; }
.pipe-view h3 { font: 700 1.25rem/1.2 var(--f-display); margin-bottom: 6px; }
.pipe-view .desc { color: var(--text-2); font-size: 15.5px; margin-bottom: var(--s4); }
.term { font: 500 13.5px/1.7 var(--f-mono); color: #E2E8F0; }
.term .c { color: var(--cyan); }
.term .g { color: #6EE7B7; }
.term .r { color: #FCA5A5; text-decoration: line-through; text-decoration-color: rgba(252,165,165,.5); }
.term .d { color: #94A3B8; }
.cand { display: grid; gap: 6px; }
.cand-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); background: rgba(255,255,255,.04); border: 1px solid #263046; font-family: var(--f-body); font-size: 14px; }
.cand-row small { display: block; color: #94A3B8; font-size: 12.5px; }
.cand-row.out { opacity: .55; }
.cand-row.out b { text-decoration: line-through; }
.cand-row.in { border-color: var(--cyan); }
.pipe-switch { display: inline-flex; gap: 4px; padding: 4px; background: rgba(255,255,255,.06); border-radius: var(--r-pill); margin-bottom: var(--s4); }
.pipe-switch button { border: 0; background: none; color: #CBD5E1; padding: 7px 14px; border-radius: var(--r-pill); font-weight: 600; font-size: 13.5px; cursor: pointer; font-family: var(--f-body); }
.pipe-switch button.is-on { background: var(--cyan); color: var(--ink); }
@media (max-width: 760px) {
  .pipe { grid-template-columns: 1fr; }
  .pipe-steps { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .pipe-steps li { flex: none; }
  .pipe-steps button { white-space: nowrap; }
}

/* Card: obscalc / titlelab */
.sliders { display: grid; gap: var(--s4); margin: var(--s4) 0 var(--s5); }
.slider label { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 6px; }
.slider label .mono { font-size: 15px; }
input[type=range] { width: 100%; accent-color: var(--cyan); height: 28px; }
.eq { font: 800 clamp(1.4rem, 1rem + 2vw, 2.2rem)/1.2 var(--f-display); display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.eq .res { color: var(--ink); background: var(--cyan); padding: 2px 12px; border-radius: var(--r-sm); font-family: var(--f-mono); }
.eq .op { color: var(--text-3); font-weight: 500; }
.gauge { height: 12px; border-radius: 6px; background: var(--ice-2); position: relative; overflow: hidden; margin: var(--s3) 0; }
.gauge i { position: absolute; inset: 0 auto 0 0; background: var(--cyan); border-radius: 6px; transition: width .3s var(--ease), background .3s; }
.gauge .zone { position: absolute; top: 0; bottom: 0; background: rgba(16,185,129,.2); border-left: 2px solid var(--green); border-right: 2px solid var(--green); }
.signals { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s3); }

/* Card: bars */
.bars { display: grid; gap: 10px; margin: var(--s4) 0; }
.bar-row { display: grid; grid-template-columns: 190px 1fr 56px; gap: 12px; align-items: center; font-size: 15px; }
.bar-track { height: 26px; position: relative; }
.bar-track::before { content: ""; position: absolute; left: 16%; top: -4px; bottom: -4px; width: 1px; background: var(--line-2); }
.bar-fill { position: absolute; top: 0; bottom: 0; left: 16%; background: var(--cyan); border-radius: 0 4px 4px 0; width: 0; transition: width .8s var(--ease); }
.bar-fill.neg { left: auto; right: 84%; background: var(--red); border-radius: 4px 0 0 4px; }
.bar-val { font: 700 14px/1 var(--f-mono); text-align: right; }
.bar-val.neg { color: var(--red-ink); }
@media (max-width: 640px) { .bar-row { grid-template-columns: 1fr 52px; } .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; } }

/* Card: roadmap */
.road { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 3px solid var(--ink); }
.road > div { padding: var(--s4) var(--s4) 0 0; }
.road b { font: 800 1.15rem/1.2 var(--f-display); display: block; margin-bottom: var(--s3); }
.road ul { margin: 0; padding: 0 0 0 18px; color: var(--text-2); }
.road li { margin-bottom: 6px; }
@media (max-width: 640px) { .road { grid-template-columns: 1fr; } .road > div { border-bottom: 1px solid var(--line); padding-bottom: var(--s4); } }

/* Fim de missão */
.finish { text-align: left; }
.finish .xp-big { font: 900 clamp(3.5rem, 2rem + 6vw, 6rem)/1 var(--f-mono); letter-spacing: -0.04em; color: var(--ink); }
.finish .xp-big span { color: var(--cyan-ink); }
.finish-list { display: grid; gap: 8px; margin: var(--s5) 0; }
.finish-list div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.finish-list div .mono { font-weight: 700; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 200; }

/* ── Ferramentas ────────────────────────────────────────── */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: var(--s6); }
.pillars > div { padding: var(--s4) var(--s5); }
.pillars > div + div { border-left: 1px solid var(--line); }
.pillars b { display: block; font: 700 14px/1.3 var(--f-display); margin-bottom: 4px; color: var(--cyan-ink); }
.pillars span { font-size: 15px; color: var(--text-2); }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } .pillars > div + div { border-left: 0; border-top: 1px solid var(--line); } }

.tool-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.tool-grid > .sticky { position: sticky; top: 24px; }
@media (max-width: 1000px) { .tool-grid { grid-template-columns: 1fr; } .tool-grid > .sticky { position: static; } }
.mission-done-bar { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; justify-content: space-between; padding: var(--s4) var(--s5); border-radius: var(--r-lg); background: var(--cyan-wash); margin-bottom: var(--s5); }
.mission-done-bar.is-done { background: var(--green-wash); }

.score-big { font: 800 clamp(3.2rem, 2rem + 5vw, 5rem)/1 var(--f-mono); letter-spacing: -0.04em; }
.score-big small { font-size: .35em; color: #94A3B8; letter-spacing: 0; }
.meter { display: grid; gap: 14px; margin-top: var(--s5); }
.meter-row label { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; color: #CBD5E1; }
.meter-row label .mono { color: #fff; }
.meter-track { height: 8px; border-radius: 4px; background: #263046; overflow: hidden; }
.meter-track i { display: block; height: 100%; border-radius: 4px; background: var(--cyan); transition: width .4s var(--ease), background .3s; }
.issues { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; gap: 8px; }
.issues li { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.5; color: #E2E8F0; }
.issues li .ic { margin-top: 2px; }
.issues .bad .ic { color: #FCA5A5; } .issues .warn .ic { color: #FCD34D; } .issues .good .ic { color: #6EE7B7; }

.hl { white-space: pre-wrap; word-wrap: break-word; font-size: 15.5px; line-height: 1.7; padding: var(--s4); border-radius: var(--r-md); background: var(--ice); color: var(--text-2); max-height: 320px; overflow-y: auto; }
.hl .h-num { background: var(--green-wash); color: var(--green-ink); border-radius: 3px; font-weight: 600; }
.hl .h-year { background: var(--cyan-wash); color: var(--cyan-ink); border-radius: 3px; font-weight: 600; }
.hl .h-bad { background: var(--red-wash); color: var(--red-ink); border-radius: 3px; font-weight: 600; text-decoration: underline wavy var(--red); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.list-rows { display: grid; gap: 8px; }
.qrow { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--paper); }
.qrow.is-prio { border-color: var(--cyan); background: var(--cyan-wash); }
.qrow .qtext { font-weight: 500; }
.qrow .qctl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.qrow .select { min-height: 36px; padding: 4px 10px; font-size: 14px; width: auto; }
.star { border: 0; background: none; cursor: pointer; color: var(--line-2); padding: 6px; border-radius: var(--r-sm); }
.star.is-on { color: var(--cyan-ink); }
.star.is-on svg { fill: var(--cyan); stroke: var(--cyan-ink); }
.templates { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s4); }
.templates button { border: 1.5px dashed var(--line-2); background: var(--paper); border-radius: var(--r-pill); padding: 7px 12px; font-size: 14px; cursor: pointer; }
.templates button:hover { border-color: var(--cyan); border-style: solid; background: var(--cyan-wash); }

.code { position: relative; }
.code pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 500 13px/1.6 var(--f-mono); color: #E2E8F0; max-height: 420px; overflow: auto; }
.code .copy { position: absolute; top: 12px; right: 12px; }

.engine-grid { display: grid; gap: var(--s3); }
.eng-q { border: 1.5px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.eng-q-head { padding: 12px 14px; background: var(--ice); display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.eng-q-head b { font-weight: 600; }
.eng-q-head .links { display: flex; gap: 6px; flex-wrap: wrap; }
.eng-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.eng-table th { text-align: left; font-weight: 600; color: var(--text-3); padding: 8px 10px; font-size: 13px; }
.eng-table td { padding: 6px 10px; border-top: 1px solid var(--line); }
.eng-table td:first-child { font-weight: 600; }
.tg { display: inline-flex; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.tg button { border: 0; background: var(--paper); padding: 5px 10px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-3); min-width: 40px; }
.tg button + button { border-left: 1.5px solid var(--line-2); }
.tg button.yes.is-on { background: var(--green); color: #fff; }
.tg button.no.is-on { background: var(--red-wash); color: var(--red-ink); }
@media (max-width: 640px) {
  .eng-table thead { display: none; }
  .eng-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
  .eng-table td { border: 0; padding: 0; }
  .eng-table td:first-child { grid-column: 1 / -1; }
  .eng-table td[data-h]::before { content: attr(data-h); display: block; font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
}

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #263046; border-radius: var(--r-md); overflow: hidden; }
.kpis > div { background: var(--slate); padding: var(--s4); }
.kpis b { display: block; font: 800 1.9rem/1 var(--f-mono); color: #fff; margin-bottom: 6px; }
.kpis span { font-size: 13px; color: #A9B4C6; }
@media (max-width: 640px) { .kpis { grid-template-columns: 1fr 1fr; } }
.chart { width: 100%; height: auto; }

.fact { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); }
.fact b { font-size: 14px; color: var(--text-3); font-weight: 600; }
.fact p { margin: 0; font-weight: 500; }
.fact small { color: var(--text-3); grid-column: 1; }
.fact .del { grid-row: 1 / span 3; grid-column: 2; align-self: start; }

/* Arena */
.arena-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s4); }
.arena-score { font: 800 2rem/1 var(--f-mono); }
.arena-lifelines { display: flex; gap: 6px; }
.arena-case { font-size: 1.15rem; line-height: 1.6; color: #E2E8F0; margin-bottom: var(--s5); }
.arena-case b { color: #fff; }
.arena .opt { background: rgba(255,255,255,.04); border-color: #334155; color: #fff; }
.arena .opt .k { background: #1E293B; color: #CBD5E1; }
.arena .opt:hover:not(:disabled) { border-color: var(--cyan); }
.arena .opt.right { background: rgba(16,185,129,.15); border-color: var(--green); }
.arena .opt.wrong { background: rgba(239,68,68,.15); border-color: var(--red); }
.arena .explain { background: rgba(255,255,255,.06); color: #E2E8F0; }
.hint-box { border-left: 3px solid var(--cyan); padding: 12px 16px; background: rgba(0,165,255,.08); color: #E2E8F0; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin-bottom: var(--s4); font-size: 15.5px; }

/* Diagnóstico */
.radar { width: 100%; max-width: 420px; margin: 0 auto; }
.radar text { font: 600 12px var(--f-body); fill: #CBD5E1; }
.dq { padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.dq p { font-weight: 600; margin-bottom: 10px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1.5px solid var(--line-2); background: var(--paper); border-radius: var(--r-sm); padding: 8px 12px; font-size: 14px; cursor: pointer; font-weight: 500; }
.seg button.is-on { border-color: var(--slate); background: var(--slate); color: #fff; }

/* Roteiro */
.week { margin-bottom: var(--s6); }
.week-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); margin-bottom: var(--s3); border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.progress { height: 10px; border-radius: 5px; background: var(--ice-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--cyan); border-radius: 5px; transition: width .4s var(--ease); }

/* Biblioteca */
.lib { display: grid; grid-template-columns: 260px 1fr; gap: var(--s6); align-items: start; }
.lib-toc { position: sticky; top: 24px; display: grid; gap: 2px; font-size: 14px; max-height: calc(100vh - 48px); overflow-y: auto; }
.lib-toc a { color: var(--text-2); text-decoration: none; padding: 6px 10px; border-radius: var(--r-sm); }
.lib-toc a:hover { background: var(--ice); color: var(--ink); }
.lib-toc .ch { font-weight: 700; color: var(--ink); margin-top: var(--s3); font-family: var(--f-display); }
.lib-ch { margin-bottom: var(--s8); }
.lib-ch > .label { display: block; margin-bottom: 6px; }
.lib-sec { padding: var(--s5) 0; border-top: 1px solid var(--line); }
.lib-sec h3 { font: 700 1.25rem/1.3 var(--f-display); margin-bottom: var(--s3); }
.lib-sec p { color: var(--text-2); font-size: 16.5px; line-height: 1.7; }
.lib-sec ul { color: var(--text-2); padding-left: 20px; }
.lib-sec mark { background: var(--cyan-wash); color: var(--ink); padding: 0 2px; border-radius: 2px; }
.search-bar { position: sticky; top: 0; z-index: 5; background: var(--paper); padding: var(--s3) 0; margin-bottom: var(--s4); }
.search-bar .input { padding-left: 44px; }
.search-bar .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
@media (max-width: 960px) { .lib { grid-template-columns: 1fr; } .lib-toc { display: none; } .search-bar { top: 60px; } }

/* Plano / impressão */
.plan-sec { padding: var(--s6) 0; border-top: 1px solid var(--line); }
.plan-sec > h2 { margin-bottom: var(--s4); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s4); }
.plan-kv b { display: block; font-size: 13px; color: var(--text-3); font-weight: 600; }
.plan-kv span { font-weight: 500; }
.todo { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.todo li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.todo li .n { width: 26px; height: 26px; border-radius: 50%; background: var(--cyan); display: grid; place-items: center; font: 700 12px/1 var(--f-mono); }
.cert { border: 2px solid var(--ink); border-radius: var(--r-lg); padding: var(--s8) var(--s7); text-align: left; position: relative; overflow: hidden; }
.cert .brand img { height: 44px; }

@media print {
  .side, .topbar, .fab-modules, .no-print, .toasts { display: none !important; }
  .shell { display: block; }
  .page { padding: 0; max-width: none; }
  body { font-size: 12pt; }
  .ink { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .plan-sec { break-inside: avoid; }
}

/* ── Admin ──────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 760px; }
.tbl th { text-align: left; font-weight: 600; color: var(--text-3); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--ice); font-size: 13px; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tbl .actions form { margin: 0; }
.admin-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); margin-bottom: var(--s6); }
.admin-kpis > div { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4) var(--s5); }
.admin-kpis b { display: block; font: 800 2rem/1.1 var(--f-display); }
.admin-kpis span { color: var(--text-3); font-size: 14px; }
@media (max-width: 760px) { .admin-kpis { grid-template-columns: 1fr 1fr; } }
.mini-bar { width: 90px; height: 6px; background: var(--ice-2); border-radius: 3px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 8px; }
.mini-bar i { display: block; height: 100%; background: var(--cyan); }
.reveal-pass { font: 700 18px/1 var(--f-mono); background: var(--ice); padding: 12px 16px; border-radius: var(--r-sm); display: inline-block; letter-spacing: .05em; user-select: all; }
.blink { animation: blink 1s steps(1) infinite; color: var(--cyan); }
@keyframes blink { 50% { opacity: 0; } }

/* Botões dentro de painéis escuros: o link padrão do .ink não pode sobrescrever a cor */
.ink a.btn-primary, .ink a.btn-primary:hover { color: var(--ink); }
.ink a.btn-wa, .ink a.btn-wa:hover { color: #04210F; }
.ink a.btn-line { color: #fff; background: transparent; border-color: #475569; }
.ink a.btn-line:hover { border-color: #fff; color: #fff; }
.ink .pipe-view .desc, .pipe-view.ink .desc { color: #A9B4C6; }

/* ── Correções da rodada de testes (nov/2026) ───────────── */
[hidden], .chip[hidden] { display: none !important; }
.tool-grid > *, .grid-2 > *, .panel { min-width: 0; }
.qrow .qtext, .panel p, .panel label, .templates button { overflow-wrap: anywhere; }
.templates button { white-space: normal; text-align: left; max-width: 100%; }
.saved-at { position: fixed; right: 16px; top: 12px; z-index: 60; padding: 6px 12px; border-radius: var(--r-pill); background: var(--slate); color: #fff; font-size: 13px; font-weight: 600; opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; pointer-events: none; }
.saved-at.is-on { opacity: 1; transform: none; }
@media (max-width: 640px) {
  .btn { white-space: normal; }
  .tg button { min-height: 44px; min-width: 52px; }
  .btn-sm { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .saved-at { transition: none; } }
.ai-box { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 var(--s4); }
.ai-box > div { flex-basis: 100%; }
.ai-list { display: grid; gap: 8px; margin-top: 4px; }
.ai-item { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1.5px dashed var(--line-2); border-radius: 10px; background: var(--paper); }
.ai-item > div { min-width: 0; overflow-wrap: anywhere; }
.ai-result { margin-top: 16px; border-left: 4px solid var(--cyan); }
/* rodada 2 */
.saved-at { top: auto; right: auto; left: 16px; bottom: 16px; }
.fab-modules { transition: transform .2s, opacity .2s; }
.fab-modules.is-away { transform: translateY(140%); opacity: 0; pointer-events: none; }
@media (max-width: 960px) {
  .saved-at { bottom: 84px; }
  .page { padding-bottom: 120px; }
}
@media (max-width: 640px) {
  .star { min-width: 44px; min-height: 44px; }
  .btn-icon.btn-sm { width: 44px; min-height: 44px; }
  .select, .input { min-height: 44px; }
  .check { min-height: 44px; align-items: center; }
}
@media (prefers-reduced-motion: reduce) { .fab-modules { transition: none; } }
.templates button { display: inline-flex; align-items: center; gap: 6px; }
.templates button .ic { flex: none; }
.input[readonly] { background: var(--ice); color: var(--text-2); cursor: not-allowed; }
.credit-form { display: inline-flex; gap: 4px; align-items: center; }
.credit-form .input-sm { width: 72px; min-height: 32px; height: 32px; padding: 0 8px; font-size: 14px; }
.ai-credits { font-size: 14px; font-weight: 600; color: var(--text-2); }
.ai-credits.is-zero { color: var(--red, #b42318); }
