/* Automatize seu Conteúdo e Lucros — mobile-first PWA styles
   Foco: conforto de leitura. Paleta calma (papel / sépia / escuro neutro), poucas sombras,
   blocos de conteúdo planos, tipografia ajustável (tamanho, fonte, espaçamento) pelo painel "Aa". */

:root {
  --bg: #F3F6F8;
  --surface: #FFFFFF;
  --surface-2: #E7ECEF;
  --ink: #111820;
  --ink-2: #444F59;
  --ink-3: #59646E;
  --line: #D9E1E6;
  --accent: #0B6F8C;
  --accent-ink: #FFFFFF;
  --accent-soft: #DCEEF4;
  --good: #2E7D5B;
  --good-soft: #E3F0E9;
  --bad: #B0493F;
  --bad-soft: #F6E4E1;
  --warn: #8A6212;
  --warn-soft: #F6ECD3;
  --code-bg: #EDF2F5;
  --code-ink: #111820;
  --code-ph: #0B6F8C;
  --shadow: 0 1px 2px rgba(10, 30, 40, .06);
  /* Cor de categoria usada como texto: escurecida no claro, clareada no escuro (contraste) */
  --cmix: #000; --cpct: 22%;
  --radius: 14px;
  --serif: "Iowan Old Style", "Charter", "Literata", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --top-h: 56px;
  --tab-h: 62px;
  /* Preferências de leitura (painel "Aa") */
  --read-scale: 1;
  --read-lh: 1.7;
  --read-font: var(--sans);
  color-scheme: light;
}

/* Sépia: papel quente, contraste mais baixo, ideal para sessões longas */
:root[data-theme="sepia"] {
  --bg: #F1E9D8; --surface: #F8F2E5; --surface-2: #E9DFCB; --ink: #3C342A; --ink-2: #665A4A;
  --ink-3: #6B5F47; --line: #DCD0B9; --accent: #8A5A2B; --accent-ink: #FFF9EE; --accent-soft: #EADCC5;
  --good: #4E7A4A; --good-soft: #E2EAD6; --bad: #A6493A; --bad-soft: #F0DDD3; --warn: #8A6212; --warn-soft: #F0E3C4;
  --code-bg: #EADFC9; --code-ink: #3C342A; --code-ph: #8A5A2B; --shadow: 0 1px 2px rgba(60, 40, 20, .06);
  color-scheme: light;
}

/* Escuro neutro (sem tom marrom), superfícies em cinza-grafite, texto off-white */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="sepia"]) {
    --bg: #090C0F; --surface: #11161B; --surface-2: #192027; --ink: #E8EEF2; --ink-2: #ACB7C0;
    --ink-3: #8F9BA5; --line: #252E37; --accent: #45E0F0; --accent-ink: #04222A; --accent-soft: #0F2E36;
    --good: #72C49B; --good-soft: #15302A; --bad: #F0918A; --bad-soft: #3A2423; --warn: #E0B35B; --warn-soft: #3A3120;
    --code-bg: #141B22; --code-ink: #E8EEF2; --code-ph: #7FEAF5; --shadow: 0 1px 2px rgba(0,0,0,.35);
    --cmix: #fff; --cpct: 42%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #090C0F; --surface: #11161B; --surface-2: #192027; --ink: #E8EEF2; --ink-2: #ACB7C0;
  --ink-3: #8F9BA5; --line: #252E37; --accent: #45E0F0; --accent-ink: #04222A; --accent-soft: #0F2E36;
  --good: #72C49B; --good-soft: #15302A; --bad: #F0918A; --bad-soft: #3A2423; --warn: #E0B35B; --warn-soft: #3A3120;
  --code-bg: #141B22; --code-ink: #E8EEF2; --code-ph: #7FEAF5; --shadow: 0 1px 2px rgba(0,0,0,.35);
  --cmix: #fff; --cpct: 42%;
  color-scheme: dark;
}

:root[data-font="serif"] { --read-font: var(--serif); }
:root[data-lh="tight"] { --read-lh: 1.5; }
:root[data-lh="wide"] { --read-lh: 1.9; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
/* Sem "elástico" da página com mouse/trackpad; no toque fica o padrão (puxar para atualizar) */
@media (pointer: fine) { html { overscroll-behavior: none; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .25s, color .25s;
}
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ——— Top bar */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: calc(var(--top-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 8px 0;
  display: flex; align-items: center; gap: 2px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, transform .25s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-title {
  flex: 1; min-width: 0; padding-left: 8px;
  font: 600 16px/1.2 var(--sans); letter-spacing: -.005em; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.icon-btn {
  width: 44px; height: 44px; border: 0; background: none; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer; color: var(--ink);
}
.icon-btn:active { background: var(--surface-2); }
.lang-btn { width: auto; min-width: 44px; padding: 0 10px; font: 700 13px/1 var(--sans); letter-spacing: .06em; }
.lang-btn::after { content: ""; width: 0; height: 0; margin-left: 5px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); display: inline-block; }
.lang-btn { display: inline-flex; align-items: center; }
.aa-btn { font: 600 15px/1 var(--serif); letter-spacing: -.02em; }
.lang-list { margin: 8px 0 4px; box-shadow: none; border: 1px solid var(--line); }
.lang-list .row { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; font: inherit; }
.lang-list .row:last-child { border-bottom: 0; }
.lang-list .row svg { color: var(--good); }
.read-progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 0;
  background: var(--accent); transition: width .1s linear;
}

/* ——— Main view */
main {
  max-width: 640px; margin: 0 auto;
  padding: calc(var(--top-h) + env(safe-area-inset-top) + 8px) 18px calc(var(--tab-h) + env(safe-area-inset-bottom) + 28px);
  outline: none;
}
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ——— Tab bar */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding: 6px 4px env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-top: 1px solid var(--line);
  transition: transform .28s ease;
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); font-size: 11px; font-weight: 600; letter-spacing: .01em;
  border-radius: 12px;
}
.tabbar a.active { color: var(--accent); }
.tabbar a.active svg { stroke-width: 2.3; }
/* Leitura imersiva: ao rolar para baixo no capítulo, a barra de abas some; volta ao rolar para cima */
body.immersive .tabbar { transform: translateY(calc(100% + 20px)); }

/* ——— Typography */
h1, h2, h3 { font-family: var(--serif); letter-spacing: -.012em; line-height: 1.22; margin: 0; font-weight: 600; }
.h-display { font-size: 34px; }
.h-page { font-size: 28px; margin: 8px 0 4px; }
.sub { color: var(--ink-2); margin: 0 0 20px; }
.eyebrow { font: 600 11.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 0 12px; }
.section-title h2 { font-size: 20px; }
.section-title a { font-size: 14px; font-weight: 600; }
.muted { color: var(--ink-3); }

/* ——— Hero (claro, sem bloco preto) */
.hero {
  position: relative; overflow: hidden;
  margin: 4px 0 8px; padding: 26px 22px 22px;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--surface), var(--accent-soft));
  border: 1px solid var(--line);
  color: var(--ink);
}
.hero::after {
  content: ""; position: absolute; right: -70px; top: -70px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
}
.hero .eyebrow { color: var(--accent); }
.hero h1 { font-size: 34px; margin: 10px 0 6px; position: relative; z-index: 1; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin: 0 0 18px; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; position: relative; z-index: 1; max-width: 34em; }
.hero .btn { position: relative; z-index: 1; }

/* ——— Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 12px; border: 0; cursor: pointer;
  font-weight: 600; font-size: 15px;
  background: var(--accent); color: var(--accent-ink);
  transition: transform .1s, filter .15s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn.ghost { background: var(--surface-2); color: var(--ink); }
.btn.outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.block { width: 100%; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }

/* ——— Cards & lists (planos: borda fina, sem sombra pesada) */
.card {
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 16px;
}
.card + .card { margin-top: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  display: flex; flex-direction: column; gap: 10px; min-height: 112px;
  padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--ink);
}
.tile:active { transform: scale(.98); }
.tile .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.tile .ico svg { width: 20px; height: 20px; }
.tile b { font-size: 15px; line-height: 1.25; font-weight: 600; }
.tile small { color: var(--ink-3); font-size: 13px; margin-top: auto; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 4px; }
.stat { background: var(--surface); border-radius: 12px; padding: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat b { display: block; font: 600 22px/1.1 var(--serif); }
.stat span { font-size: 12px; color: var(--ink-3); }

.continue {
  display: flex; align-items: center; gap: 14px; color: var(--ink);
}
.continue .num {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
  font: 600 15px var(--serif);
}
.continue .t { flex: 1; min-width: 0; }
.continue .t small { color: var(--ink-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.continue .t div { font-weight: 600; line-height: 1.3; }

.list { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row:active { background: var(--surface-2); }
.row .badge {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px;
  display: grid; place-items: center; font: 600 14px var(--serif);
  background: var(--surface-2); color: var(--ink-2);
}
.row.done .badge { background: var(--good-soft); color: var(--good); }
.row .body { flex: 1; min-width: 0; }
.row .body b { display: block; font-weight: 600; line-height: 1.3; }
.row .body small { color: var(--ink-3); font-size: 13px; }
.row .chev { color: var(--ink-3); width: 18px; height: 18px; }

.meter { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }

/* ——— Reader */
.reader-head { margin: 8px 0 24px; }
.reader-head .eyebrow { display: block; margin-bottom: 10px; }
.reader-head h1 { font-size: 30px; }
.reader-head .meta { margin-top: 10px; font-size: 14px; color: var(--ink-3); }

/* Texto corrido: obedece ao painel "Aa" (escala, fonte e entrelinha) */
.prose {
  font-family: var(--read-font);
  font-size: calc(17px * var(--read-scale));
  line-height: var(--read-lh);
  color: var(--ink);
  max-width: 38em;
}
.prose p { margin: 0 0 1.1em; }
.prose h2 { font-size: 1.35em; margin: 2em 0 .7em; line-height: 1.25; }
.prose h2:first-child { margin-top: .4em; }
.prose h3 { font-size: 1.1em; margin: 1.6em 0 .6em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--ink-3); }
.prose strong { font-weight: 650; }

/* Destaques: barra lateral + tinta leve (em vez de bloco sólido) */
.callout {
  display: flex; gap: 12px; padding: 14px 16px 14px 14px; margin: 0 0 1.3em;
  border-radius: 12px; font-size: .94em; line-height: 1.6;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
}
.callout .ci { flex-shrink: 0; margin-top: 2px; }
.callout .ci svg { width: 20px; height: 20px; }
.callout b.lbl { display: block; font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.callout.try { border-left-color: var(--accent); }
.callout.try .ci, .callout.try b.lbl { color: var(--accent); }
.callout.pro { border-left-color: var(--good); }
.callout.pro .ci, .callout.pro b.lbl { color: var(--good); }
.callout.warn { border-left-color: var(--bad); }
.callout.warn .ci, .callout.warn b.lbl { color: var(--bad); }
.callout.goal { border-left-color: var(--warn); }
.callout.goal .ci, .callout.goal b.lbl { color: var(--warn); }
.callout .btn { margin-top: 10px; }

/* Caixa de prompt: fundo suave e texto escuro (sem bloco preto na página clara) */
.promptbox {
  position: relative; margin: 0 0 1.3em; border-radius: 12px; overflow: hidden;
  background: var(--code-bg); color: var(--code-ink); border: 1px solid var(--line);
}
.promptbox pre {
  margin: 0; padding: 16px 16px 8px; white-space: pre-wrap; word-wrap: break-word;
  font: 14px/1.65 var(--mono); font-size: calc(14px * var(--read-scale));
}
.promptbox .ph { color: var(--code-ph); font-weight: 600; background: var(--accent-soft); border-radius: 4px; padding: 0 3px; }
.promptbox .pb-actions { display: flex; gap: 6px; padding: 8px 10px 10px; justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 6px; }
.pb-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  border-radius: 9px; border: 0; cursor: pointer; font-size: 13px; font-weight: 600; font-family: var(--sans);
  background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
}
.pb-btn svg { width: 16px; height: 16px; }
.pb-btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: none; }

.compare { display: grid; gap: 10px; margin: 0 0 1.3em; }
.compare > div { padding: 14px 16px; border-radius: 12px; font-size: .94em; line-height: 1.55; border: 1px solid var(--line); background: var(--surface); border-left-width: 4px; }
.compare .b { border-left-color: var(--bad); }
.compare .a { border-left-color: var(--good); }
.compare small { display: block; font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.compare .b small { color: var(--bad); }
.compare .a small { color: var(--good); }

.tric { display: grid; gap: 10px; margin: 0 0 1.3em; }
.tric > div { display: flex; gap: 14px; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.tric .k {
  width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font: 600 22px var(--serif);
}
.tric b { display: block; font-size: 1em; font-weight: 600; }
.tric p { margin: 2px 0 4px !important; font-size: .92em; line-height: 1.5; color: var(--ink-2); }
.tric small { font-size: .82em; color: var(--ink-3); font-style: italic; }

.levels { display: grid; gap: 10px; margin: 0 0 1.3em; }
.level { border-radius: 12px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.level summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.level summary::-webkit-details-marker { display: none; }
.level .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.level .lv { flex: 1; }
.level .lv small { display: block; font-size: .78em; color: var(--ink-3); font-weight: 600; letter-spacing: .04em; font-family: var(--sans); }
.level .lv b { font-size: 1em; font-weight: 600; }
.level .inner { padding: 0 16px 16px; font-size: .94em; }
.level .inner .q { font: 14px/1.6 var(--mono); font-size: calc(13.5px * var(--read-scale)); background: var(--code-bg); padding: 12px; border-radius: 10px; margin-bottom: 10px; border: 1px solid var(--line); }
.level .inner .q .ph { color: var(--code-ph); font-weight: 600; }
.level .inner p { margin: 0 !important; color: var(--ink-2); }
details[open] .chev-d { transform: rotate(90deg); }
.chev-d { width: 18px; height: 18px; color: var(--ink-3); transition: transform .2s; }

.mistakes { counter-reset: m; display: grid; gap: 0; margin: 0 0 1.3em; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.mistake { display: flex; gap: 12px; padding: 13px 14px; font-size: .94em; line-height: 1.5; border-bottom: 1px solid var(--line); }
.mistake:last-child { border-bottom: 0; }
.mistake::before { counter-increment: m; content: counter(m); font: 600 1.1em/1.4 var(--serif); color: var(--accent); width: 18px; flex-shrink: 0; }
.mistake s { text-decoration: none; display: block; font-weight: 600; }
.mistake span { color: var(--good); }

.checklist { list-style: none; padding: 0 !important; margin: 0 0 1.3em; display: grid; gap: 8px; }
.checklist li { margin: 0 !important; }
.check {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; cursor: pointer;
  padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  font-size: .94em; line-height: 1.45; font-family: inherit;
}
.check .box {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0; display: grid; place-items: center;
  box-shadow: inset 0 0 0 2px var(--line); transition: background .15s, box-shadow .15s;
}
.check .box svg { width: 16px; height: 16px; stroke-width: 3; opacity: 0; color: #fff; }
.check[aria-pressed="true"] .box { background: var(--good); box-shadow: none; }
.check[aria-pressed="true"] .box svg { opacity: 1; }
.check[aria-pressed="true"] .lbl { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.check-foot { display: flex; justify-content: space-between; align-items: center; margin: -8px 0 18px; font-size: 13px; color: var(--ink-3); font-family: var(--sans); }
.check-foot button { background: none; border: 0; color: var(--accent); font-weight: 600; cursor: pointer; padding: 6px 0; }

.technique { margin: 0 0 1.4em; padding: 18px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.technique h2 { margin: 0 0 10px !important; font-size: 1.25em !important; display: flex; align-items: center; gap: 10px; }
.technique h2 .n { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 15px; flex-shrink: 0; }
.technique p { font-size: .94em; }
.technique .when { font-size: .9em; color: var(--ink-2); }
.technique h3 { font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 16px 0 8px; }
.tries { display: grid; gap: 6px; }
.try-chip {
  text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer;
  background: var(--code-bg); font: 13.5px/1.5 var(--mono); color: var(--ink);
  display: flex; gap: 8px; align-items: flex-start;
}
.try-chip svg { width: 15px; height: 15px; color: var(--ink-3); margin-top: 2px; }
.avoid { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--bad-soft); font-size: .88em; line-height: 1.5; }
.avoid b { color: var(--bad); }

.steps { margin: 0 0 1.3em; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.steps h3 { font-size: 1em; margin-bottom: 12px; }
.step { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.step:last-child { padding-bottom: 0; }
.step:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background: var(--line); }
.step .sn { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; font-family: var(--sans); }
.step b { display: block; font-size: .94em; font-weight: 600; }
.step span { font-size: .88em; color: var(--ink-2); font-style: italic; }

.combos { display: grid; gap: 10px; margin: 0 0 1.3em; }
.combo { padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.combo b { font-size: .97em; font-weight: 600; }
.combo .for { display: inline-block; margin: 4px 0 8px; font: 600 12px/1 var(--sans); padding: 5px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.combo p { margin: 0 !important; font: 13.5px/1.55 var(--mono); color: var(--ink-2); }

.spectrum { display: grid; gap: 10px; margin: 0 0 1.3em; }
.spectrum > div { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid; background: var(--surface); }
.spectrum .bad { border-left-color: var(--bad); }
.spectrum .good { border-left-color: var(--good); }
.spectrum small { font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.spectrum .bad small { color: var(--bad); }
.spectrum .good small { color: var(--good); }
.spectrum p { margin: 6px 0 0 !important; font-size: .94em; }

.trouble { display: grid; gap: 8px; margin: 0 0 1.3em; }
.trouble details { border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.trouble summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: center; padding: 14px 16px; font-weight: 600; font-size: .94em; }
.trouble summary::-webkit-details-marker { display: none; }
.trouble summary span { flex: 1; }
.trouble .ans { padding: 0 16px 14px; font-size: .92em; }
.trouble .ans div { display: flex; gap: 8px; margin-top: 6px; }
.trouble .ans small { flex-shrink: 0; width: 56px; font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding-top: 4px; }
.trouble .ans .fix { color: var(--good); font-weight: 600; }

.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 1.3em; }
.tools > div { padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: .86em; line-height: 1.5; }
.tools b { display: block; font-size: 1.05em; margin-bottom: 4px; font-weight: 600; }
.tools > div:first-child { background: var(--accent-soft); border-color: transparent; }

.formula { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 1.3em; }
.formula span { padding: 8px 12px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font: 600 14px/1 var(--sans); }
.formula i { color: var(--ink-3); font-style: normal; font-weight: 700; }

.defs { display: grid; gap: 0; margin: 0 0 1.3em; background: var(--surface); border-radius: 12px; border: 1px solid var(--line); overflow: hidden; }
.defs > div { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .94em; }
.defs > div:last-child { border-bottom: 0; }
.defs b { width: 104px; flex-shrink: 0; font-weight: 600; }
.defs span { color: var(--ink-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.3em; }
.chip {
  padding: 8px 13px; border-radius: 99px; border: 0; cursor: pointer;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  font: 500 14px/1.2 var(--sans); color: var(--ink);
}
.chip.on { background: var(--ink); color: var(--bg); box-shadow: none; }

.words { display: grid; gap: 10px; margin: 0 0 1.3em; }
.words > div { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: .94em; }
.words b { display: block; font: 600 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }

.reader-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 36px; }
.reader-nav a {
  display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); min-height: 72px;
}
.reader-nav a small { color: var(--ink-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.reader-nav a b { font-size: 14.5px; line-height: 1.3; font-weight: 600; }
.reader-nav a.next { text-align: right; grid-column: 2; }
.done-banner { margin-top: 28px; padding: 18px; border-radius: 14px; text-align: center; background: var(--good-soft); color: var(--good); font-weight: 600; }

/* ——— Prompt library */
.search {
  position: sticky; top: calc(var(--top-h) + env(safe-area-inset-top)); z-index: 5;
  margin: 0 -18px; padding: 4px 18px 10px; background: var(--bg);
}
.search label {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
}
.search svg { width: 18px; height: 18px; color: var(--ink-3); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; color: var(--ink); font-size: 16px; }
.search label:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.hscroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 18px 4px; margin: 8px -18px 0; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .chip { flex-shrink: 0; }

.pcard {
  display: block; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink);
}
.pcard + .pcard { margin-top: 10px; }
.pcard .top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pcard .cat { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pcard .fav { margin-left: auto; color: var(--accent); }
.pcard .fav svg { width: 18px; height: 18px; fill: currentColor; }
.pcard b { display: block; font: 600 17px/1.3 var(--serif); }
.pcard p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.count { font-size: 13px; color: var(--ink-3); margin: 14px 2px 10px; }
.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty svg { width: 44px; height: 44px; stroke-width: 1.5; margin-bottom: 10px; }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

/* ——— Prompt detail */
.pd-head { margin: 8px 0 18px; }
.pd-head h1 { font-size: 28px; margin: 8px 0 8px; }
.pd-head p { margin: 0; color: var(--ink-2); line-height: 1.55; }
.fields { display: grid; gap: 14px; margin: 0 0 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.field input, .field textarea, .field select {
  width: 100%; border: 0; border-radius: 11px; padding: 12px 14px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  font: inherit; font-size: 16px; color: var(--ink); outline: 0; resize: vertical;
}
.field textarea { min-height: 96px; }
.field input:focus, .field textarea:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.field .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }
.info { display: grid; gap: 10px; margin: 20px 0; }
.info > div { padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; line-height: 1.55; }
.info small { display: block; font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.sticky-actions {
  position: sticky; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 10px); z-index: 4;
  display: flex; gap: 8px; padding: 8px; margin: 18px -8px 0; border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0,0,0,.08);
}
.sticky-actions .btn { flex: 1; padding: 0 10px; white-space: nowrap; }
.sticky-actions .btn:last-child { flex: 1.5; }
.sticky-actions .btn.sq { flex: 0 0 46px; padding: 0; }
.btn.sq.on svg { fill: currentColor; }

/* ——— Plan */
.plan-hero { display: flex; align-items: center; gap: 18px; margin: 4px 0 20px; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.ring { --p: 0; width: 84px; height: 84px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring div { width: 66px; height: 66px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; line-height: 1; }
.ring b { font: 600 22px var(--serif); }
.ring small { display: block; font-size: 10px; color: var(--ink-3); margin-top: 3px; }
.plan-hero .t b { display: block; font: 600 18px/1.25 var(--serif); }
.plan-hero .t span { font-size: 14px; color: var(--ink-2); }
.week { margin: 0 0 22px; }
.week h2 { font-size: 19px; display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.week h2 small { font: 600 12px var(--sans); color: var(--accent); letter-spacing: .08em; text-transform: uppercase; }
.week h2 em { margin-left: auto; font: 600 13px var(--sans); color: var(--ink-3); font-style: normal; }
.day .lbl small { display: block; font-size: 11.5px; font-weight: 700; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 2px; }
.check[aria-pressed="true"] .lbl small { color: var(--ink-3); }
.day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* ——— Builder */
.preview { margin: 18px 0 0; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.seg .chip { font-size: 13px; padding: 7px 11px; }

/* ——— Toast & sheet */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 18px); z-index: 50;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 11px 18px; border-radius: 99px; background: var(--ink); color: var(--bg);
  font-size: 14px; font-weight: 600; text-align: center; width: max-content; max-width: calc(100vw - 32px); transition: transform .25s, opacity .25s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.4); animation: fadeIn .2s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 640px; margin: 0 auto;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0;
  background: var(--surface); animation: up .25s ease; max-height: 86vh; max-height: 86dvh; overflow-y: auto; overscroll-behavior: contain;
}
.sheet .grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 16px; }
.sheet h2 { font-size: 22px; margin-bottom: 8px; }
.sheet ol { padding-left: 20px; }
.sheet li { margin-bottom: 10px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }

/* ——— Painel de leitura ("Aa") */
.rs { display: grid; gap: 18px; margin-top: 14px; }
.rs-row { display: grid; gap: 8px; }
.rs-row > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.rs-size { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.rs-size button {
  height: 46px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--surface-2); color: var(--ink); font-family: var(--serif);
}
.rs-size button:active { filter: brightness(.95); }
.rs-size button:disabled { opacity: .4; }
.rs-size .minus { font-size: 15px; }
.rs-size .plus { font-size: 22px; }
.rs-size b { min-width: 56px; text-align: center; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rs-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.rs-seg button {
  height: 40px; border: 0; border-radius: 9px; cursor: pointer; background: transparent; color: var(--ink-2);
  font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.rs-seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.rs-seg button .sw { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--ink-3); }
.rs-seg button.serif { font-family: var(--serif); }
.rs-sample {
  padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line);
  font-family: var(--read-font); font-size: calc(17px * var(--read-scale)); line-height: var(--read-lh); color: var(--ink);
  max-height: 120px; overflow: hidden; position: relative;
}
.rs-sample::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 36px; background: linear-gradient(transparent, var(--bg)); }
.rs-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.rs-foot .linkish { font-size: 14px; }

/* ——— Gate (login / compra / offline) */
body.gated .tabbar { display: none; }
body.gated main { padding-bottom: calc(env(safe-area-inset-bottom) + 32px); }
.gate { max-width: 420px; margin: 0 auto; padding: 24px 0 8px; text-align: center; animation: fade .25s ease; }
.gate-logo { width: 76px; height: 76px; border-radius: 20px; box-shadow: var(--shadow); display: block; margin: 8px auto 20px; }
.gate h1 { font-size: 27px; margin-bottom: 8px; }
.gate-lead { margin: 0 auto 22px; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.gate-form { display: grid; gap: 12px; text-align: left; }
.gate-err { min-height: 1.2em; margin: -2px 2px 0; font-size: 14px; color: var(--bad); }
.gate-err:empty { display: none; }
.gate-who { margin: 22px 0 0; font-size: 13.5px; color: var(--ink-3); }
.gate-foot { margin: 28px 0 0; font-size: 12.5px; color: var(--ink-3); }
.linkish { border: 0; background: none; padding: 6px 0; cursor: pointer; font: inherit; font-weight: 600; color: var(--accent); }
.opop-btn { gap: 10px; min-height: 52px; font-size: 16px; }
.opop-mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-ink); color: var(--accent); font: 800 15px/1 var(--sans); }
.gate .spinner { margin: 8px auto 20px; }
.btn:disabled { opacity: .55; pointer-events: none; }
.spinner { width: 36px; height: 36px; margin: 32px auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.foot.account { margin-top: 28px; margin-bottom: -24px; }

/* ——— Welcome popup */
.welcome { text-align: center; padding-top: 4px; }
.w-logo { width: 72px; height: 72px; border-radius: 18px; box-shadow: var(--shadow); margin: 4px auto 14px; display: block; }
.welcome h2 { font-size: 24px; margin-bottom: 8px; }
.w-lead { margin: 0 auto 18px; max-width: 420px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.w-steps { display: grid; gap: 10px; margin-bottom: 14px; text-align: left; }
.w-step { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.w-step.ok { background: var(--good-soft); border-color: transparent; }
.w-step.muted-step .w-txt { opacity: .75; }
.w-ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.w-step.ok .w-ico { background: var(--surface); color: var(--good); }
.w-ico svg { width: 20px; height: 20px; }
.w-txt { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.w-txt b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 1px; }
.w-done { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--good); color: #fff; }
.w-done svg { width: 16px; height: 16px; stroke-width: 3; }
.w-step .btn { flex-shrink: 0; }
.welcome-sheet { animation: pop .35s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 700px) {
  .sheet.welcome-sheet { top: 50%; bottom: auto; left: 50%; right: auto; width: 480px; transform: translate(-50%, -50%); border-radius: 22px; padding: 28px 28px 24px; animation: popc .3s ease; }
  .sheet.welcome-sheet .grab { display: none; }
  @keyframes popc { from { opacity: 0; transform: translate(-50%, -46%); } }
}

.remind {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: -6px 0 22px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer; text-align: left; font: inherit; font-size: 14.5px;
  background: var(--surface); color: var(--ink);
}
.remind > svg:first-child { color: var(--accent); }
.remind span { flex: 1; }
.remind b { color: var(--accent); font-size: 14px; }
.remind.on { background: var(--good-soft); border-color: transparent; cursor: default; }
.remind.on > svg { color: var(--good); }

.install-card { display: flex; gap: 14px; align-items: center; margin-top: 14px; }
.install-card .ico { width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; overflow: hidden; }
.install-card .ico img { width: 100%; height: 100%; display: block; }
.install-card .t { flex: 1; min-width: 0; font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.install-card .t b { display: block; color: var(--ink); font-size: 15px; }

.foot { margin-top: 36px; text-align: center; font-size: 12.5px; color: var(--ink-3); }

@media (min-width: 700px) {
  .tabbar { left: 50%; right: auto; width: 560px; transform: translateX(-50%); bottom: 14px; border-radius: 20px; border: 1px solid var(--line); height: var(--tab-h); padding-bottom: 6px; }
  body.immersive .tabbar { transform: translate(-50%, calc(100% + 30px)); }
  main { padding-bottom: calc(var(--tab-h) + 48px); }
  .prose { font-size: calc(18px * var(--read-scale)); }
}
/* ——— Marketing Digital Simples: componentes */
.cbadge, .tcard, .topic, .qcard, .term-head, .ccard { --cc: color-mix(in srgb, var(--c) calc(100% - var(--cpct)), var(--cmix)); }
.row .badge.cbadge, .num.cbadge { background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--cc); }
.tn { font: 700 14px/1 var(--sans); font-variant-numeric: tabular-nums; }
.tn.sm { font-size: 12.5px; letter-spacing: .02em; }
.row .fav { color: var(--accent); display: grid; }
.row .fav svg { width: 16px; height: 16px; fill: currentColor; }
.term-row .body small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Ilustração com placeholder: o desenho aparece até existir o arquivo em app/img/ */
.pic {
  position: relative; margin: 0 0 1.3em; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--c) 35%, transparent), transparent 55%),
    linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, var(--surface)), color-mix(in srgb, var(--c) 6%, var(--surface)));
  border: 1px solid var(--line);
}
.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pic-ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 12px; text-align: center; color: color-mix(in srgb, var(--c) 75%, var(--ink)); }
.pic-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 70%, transparent); box-shadow: 0 6px 20px color-mix(in srgb, var(--c) 25%, transparent); }
.pic-ico svg { width: 32px; height: 32px; stroke-width: 1.7; }
.pic-ph b { font: 700 15px/1.2 var(--sans); letter-spacing: .04em; }
.pic-ph code { font: 11.5px/1.3 var(--mono); padding: 3px 8px; border-radius: 6px; background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--ink-2); }
.hero-img { padding: 0; }
.hero-img::after { display: none; }
.hero-img .hero-pic { margin: 0; border: 0; border-radius: 0; aspect-ratio: 16 / 10; }
.hero-body { padding: 18px 20px 22px; }
.hero-img h1 { font-size: 30px; }
.hero-img h1 em { display: block; }

/* Termo */
.term-head { margin: 4px 0 20px; }
.term-head .term-pic { margin-bottom: 16px; }
.term-head .eyebrow { color: var(--cc); display: inline-block; padding: 4px 0; }
.term-head h1 { font-size: 30px; margin: 6px 0 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.abbr { font: 800 .8em/1 var(--sans); letter-spacing: .02em; color: var(--accent); }
.term-head .aka { margin: 2px 0 0; font-size: 14px; color: var(--ink-3); font-style: italic; }
.term-head .lead { margin: 12px 0 0; font-size: 17px; line-height: 1.5; color: var(--ink); font-weight: 500; padding-left: 12px; border-left: 3px solid var(--cc); }
.calc-link { margin: 6px 0 4px; }
.learn-btn.on { background: var(--good); color: #fff; }
.learn-btn svg { stroke-width: 2.6; }
.callout.ex { border-left-color: var(--accent); }
.callout.ex .ci, .callout.ex b.lbl { color: var(--accent); }

/* Fórmula (fração) — o "celular com a fórmula" do e-book, em versão nativa */
.eq {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 12px;
  margin: 0 0 1.3em; padding: 20px 16px; border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 40%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
  font-family: var(--sans); color: var(--ink); text-align: center;
}
.eq-l { font: 800 20px/1.1 var(--sans); color: var(--accent); }
.eq-op { font: 600 22px/1 var(--sans); color: var(--ink-3); }
.frac { display: inline-grid; justify-items: center; font: 600 15px/1.25 var(--sans); }
.frac > span { padding: 4px 8px; max-width: 14em; }
.frac > span:first-child { border-bottom: 2px solid currentColor; }
.eq-t { font: 600 15px/1.3 var(--sans); max-width: 14em; }
.eq-m { font: 700 15px/1 var(--sans); padding: 6px 10px; border-radius: 99px; background: var(--surface); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line); }

/* X vs Y */
.vs { display: grid; gap: 0; margin: 0 0 1.3em; position: relative; }
.vs-item { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.vs-item.v1 { border-left-color: #C2581E; }
.vs-item b { display: block; font: 700 1em/1.3 var(--sans); }
.vs-item p { margin: 4px 0 0 !important; font-size: .94em; }
.vs-mid { justify-self: center; margin: -6px 0; z-index: 1; padding: 3px 10px; border-radius: 99px; background: var(--ink); color: var(--bg); font: 800 11px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; }

/* Etapas em funil (AIDA, tipos de lead) */
.stages { margin: 0 0 1.3em; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.stages h3 { margin: 0 0 12px !important; font: 600 13px/1.35 var(--sans) !important; letter-spacing: .02em; color: var(--ink-2); }
.stages ol { list-style: none; margin: 0 !important; padding: 0 !important; display: grid; gap: 8px; }
.stages li { margin: 0 !important; display: grid; justify-items: center; gap: 4px; }
.st-bar { width: var(--w); min-width: 42%; padding: 9px 12px; border-radius: 10px; text-align: center; color: var(--accent-ink); background: color-mix(in srgb, var(--accent) calc(var(--o) * 100%), var(--ink)); }
.st-bar b { font: 700 14px/1.2 var(--sans); }
.st-txt { font-size: .9em; line-height: 1.45; color: var(--ink-2); text-align: center; max-width: 30em; }

/* Início: termo do dia e temas */
.tcard { display: block; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c); color: var(--ink); box-shadow: var(--shadow); }
.tcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tcard .cat, .qcard .cat { display: inline-flex; align-items: center; gap: 6px; font: 700 11.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--cc); }
.tcard .cat svg, .qcard .cat svg { width: 16px; height: 16px; }
.tcard .abbr { font-size: 15px; color: var(--cc); }
.tcard b { display: block; font: 600 20px/1.25 var(--serif); }
.tcard p { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.topics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.topic { display: grid; gap: 6px; align-content: start; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow); }
.topic .ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--cc); }
.topic .ico svg { width: 20px; height: 20px; }
.topic b { font-size: 14.5px; line-height: 1.25; font-weight: 650; }
.topic small { color: var(--ink-3); font-size: 12.5px; }
.topic .meter { height: 4px; margin-top: 2px; }
.topic .meter i { background: var(--c); }
.topics .topic:last-child:nth-child(odd) { grid-column: 1 / -1; }
.muted-link { color: var(--ink-3); font-weight: 500; font-size: 13px; }

/* Calculadoras */
.calc-list { display: grid; gap: 12px; }
.ccard { display: grid; gap: 6px; padding: 16px 16px 4px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow); border-left: 4px solid var(--c); }
.ccard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ccard-top b { font: 600 18px/1.25 var(--serif); }
.ccard-top svg { color: var(--ink-3); width: 18px; height: 18px; }
.ccard-desc { font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.ccard .eq { margin: 8px 0 12px; padding: 12px; gap: 6px 8px; }
.ccard .eq-l { font-size: 16px; }
.ccard .frac { font-size: 13px; }
.calc-box { display: grid; gap: 14px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.calc-box .fields { margin: 0; }
.field select {
  width: 100%; border: 0; border-radius: 11px; padding: 12px 14px; font: inherit; font-size: 16px;
  background-color: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); outline: 0; appearance: auto;
}
.field select:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.field select option { background-color: var(--surface); color: var(--ink); }
.field.currency { max-width: 180px; }
.result { padding: 16px; border-radius: 14px; background: var(--accent-soft); text-align: center; }
.result small { display: block; font: 700 11.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.result output { display: block; margin-top: 8px; font: 700 34px/1.15 var(--sans); font-variant-numeric: tabular-nums; color: var(--ink); overflow-wrap: anywhere; }
.result-hint { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); }
.result-hint:empty { display: none; }
.calc-actions { margin-top: 4px; }

/* Quiz */
.quiz-intro { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 0 18px 18px; overflow: hidden; }
.quiz-intro .quiz-pic { justify-self: stretch; margin: 0 -18px 10px; border: 0; border-radius: 0; }
.quiz-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.quiz-ico svg { width: 34px; height: 34px; }
.quiz-intro b { font: 600 19px/1.3 var(--serif); }
.quiz-intro small { color: var(--ink-3); font-size: 13.5px; margin-bottom: 10px; }
.quiz-top { display: grid; gap: 8px; margin: 8px 0 16px; font: 600 13px/1 var(--sans); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.qcard { padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c); box-shadow: var(--shadow); }
.qdef { margin: 10px 0 0; font: 500 19px/1.45 var(--serif); color: var(--ink); }
.qask { font-size: 17px; margin: 22px 2px 10px; font-family: var(--sans); }
.qopts { display: grid; gap: 8px; }
.qopt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 52px; padding: 12px 16px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 15px/1.3 var(--sans); text-align: left; cursor: pointer;
  transition: background-color .15s, border-color .15s, opacity .15s;
}
.qopt:active { background: var(--surface-2); }
.qopt svg { width: 20px; height: 20px; stroke-width: 2.6; }
.qopt.ok { background: var(--good-soft); border-color: var(--good); color: var(--ink); }
.qopt.ok svg { color: var(--good); }
.qopt.bad { background: var(--bad-soft); border-color: var(--bad); }
.qopt.dim { opacity: .55; }
.qopt:disabled { cursor: default; }
.qfeed { display: grid; gap: 12px; margin-top: 14px; }
.qfeed b { font-size: 15px; }
.qfeed.ok b { color: var(--good); }
.qfeed.bad b { color: var(--bad); }
.quiz-end { display: grid; justify-items: center; text-align: center; gap: 6px; margin-top: 12px; }
.quiz-end h1 { font-size: 26px; margin-top: 10px; }
.quiz-end .sub { margin: 0; }
.ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring div { width: 96px; height: 96px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; }
.ring b { font: 700 26px/1 var(--sans); font-variant-numeric: tabular-nums; }

@media (hover: hover) {
  .tcard:hover, .topic:hover, .ccard:hover { border-color: var(--ink-3); }
  .qopt:not(:disabled):hover { border-color: var(--accent); }
}

/* ——— Automatize: ferramentas, fluxo, kit e desafio */
.tool, .flow-step, .tgroup, .cat-head, .kit-chip { --cc: color-mix(in srgb, var(--c) calc(100% - var(--cpct)), var(--cmix)); }
.tool-list { display: grid; gap: 12px; margin-bottom: 18px; }
.tool { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c); box-shadow: var(--shadow); }
.tgroup .tool + .tool { margin-top: 10px; }
.tool-top { display: flex; align-items: center; gap: 12px; }
.tool-mark { width: 44px; height: 44px; flex-shrink: 0; border-radius: 13px; display: grid; place-items: center; font: 800 15px/1 var(--sans); letter-spacing: .02em; color: var(--cc); background: color-mix(in srgb, var(--c) 15%, transparent); }
.tool-mark.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; }
.tool-id { min-width: 0; }
.tool-id h3 { font: 650 18px/1.2 var(--sans); margin: 0; }
.tool-id small { font-size: 12.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.tool-cat { color: var(--cc); font-weight: 700; }
.tool p { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.tool .why { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--good); font-weight: 600; }
.tool .why svg { width: 16px; height: 16px; stroke-width: 2.6; margin-top: 2px; }
.tool-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tool-actions .btn { flex: 1; min-width: 132px; }
.tool-actions .btn svg { width: 16px; height: 16px; }
.kit-btn.on { background: var(--good); color: #fff; }

.flow-sub { margin: -6px 0 12px; font-size: 14.5px; }
.flow-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.flow-steps li { position: relative; padding-bottom: 10px; }
.flow-steps li:not(:last-child)::after { content: ""; position: absolute; left: 31px; top: 52px; bottom: 0; width: 2px; background: linear-gradient(var(--line), var(--line)); }
.flow-step { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow); }
.fs-ico { width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--cc); }
.fs-ico svg { width: 20px; height: 20px; }
.fs-body { flex: 1; min-width: 0; }
.fs-body small { display: block; font: 700 11px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--cc); }
.fs-body b { display: block; font-size: 14.5px; line-height: 1.3; font-weight: 650; }
.fs-n { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center; font: 700 12.5px/1 var(--sans); background: var(--surface-2); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.flow-step .chev { color: var(--ink-3); width: 18px; height: 18px; }

.tgroup { margin: 0 0 26px; }
.tgroup-head { display: flex; align-items: center; gap: 12px; color: var(--ink); margin-bottom: 6px; }
.tgroup-head > span:nth-child(2) { flex: 1; min-width: 0; }
.tgroup-head small { display: block; font: 700 11px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--cc); }
.tgroup-head b { display: block; font: 600 19px/1.25 var(--serif); }
.tgroup-head .chev { color: var(--ink-3); width: 18px; height: 18px; }
.use { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.use b { color: var(--ink); font-weight: 650; }

.cat-head { margin: 4px 0 18px; }
.cat-head .cat-pic { margin-bottom: 16px; }
.cat-head .eyebrow { color: var(--cc); }
.cat-head h1 { font-size: 28px; margin: 8px 0 8px; }
.cat-head .lead { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); padding-left: 12px; border-left: 3px solid var(--cc); }
.cat-head .lead b { color: var(--ink); }

.kit-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.kit-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font: 600 14px/1.2 var(--sans); }
.kit-strip.mini { margin-top: 8px; gap: 6px; }
.kit-strip.mini .kit-chip { padding: 4px 10px; font-size: 12.5px; border-left: 3px solid var(--c); }

.intro-card { font-size: 15.5px; }
.intro-card p { margin: 0 0 .9em; }
.intro-card details summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; color: var(--accent); font: 600 14px/1 var(--sans); padding: 4px 0; }
.intro-card details summary::-webkit-details-marker { display: none; }
.intro-card details[open] summary { margin-bottom: 10px; }
.final-card { background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.final-card p { margin: 0 0 .8em; font-size: 15.5px; line-height: 1.55; }
.final-card .btn { margin-top: 6px; }
.final-card .btn svg { width: 16px; height: 16px; }

.qtitle { font-size: 24px; margin: 6px 0 6px; }
.qopt.on { background: var(--accent-soft); border-color: var(--accent); }
.qopt.on svg { color: var(--accent); }
.btn:disabled { opacity: .45; }
.plan-hero .t { flex: 1; min-width: 0; }
.days .lbl small { display: block; font: 700 11.5px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.days .lbl b { display: block; font-weight: 650; color: var(--ink); }
.days .check[aria-pressed="true"] .lbl b, .days .check[aria-pressed="true"] .lbl small { color: var(--ink-3); }

@media (hover: hover) {
  .tool:hover, .flow-step:hover { border-color: var(--ink-3); }
  .tool:hover { border-left-color: var(--c); }
  .tgroup-head:hover b { text-decoration: underline; }
}

/* ——— Revisão de UI (Web Interface Guidelines) */
h1, h2, h3 { text-wrap: balance; }
.stat b, .count, .niche-prog small, .check-foot span { font-variant-numeric: tabular-nums; }
.skip-link {
  position: fixed; left: 8px; top: calc(env(safe-area-inset-top) + 8px); z-index: 60;
  padding: 10px 14px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
.sheet:focus { outline: none; }
.sheet-lead { margin: 0 0 18px; color: var(--ink-2); line-height: 1.5; }
.btn.danger { background: var(--bad); color: var(--bg); }
.section-title .linkish { font-size: 14px; padding: 0; }
a.chip { display: inline-block; }
.field-err { margin-top: 6px; font-size: 13.5px; color: var(--bad); }
.field-err:empty { display: none; }
.field input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--bad); }
.btn.is-loading::after {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite;
}
@media (pointer: fine) {
  .hscroll { scrollbar-width: thin; }
  .hscroll::-webkit-scrollbar { display: block; height: 6px; }
  .hscroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 9px; }
}
@media (hover: hover) {
  .icon-btn:hover, .row:hover { background: var(--surface-2); }
  .btn:hover, .pb-btn:hover { filter: brightness(1.07); }
  .btn.ghost:hover, .pb-btn:not(.primary):hover { filter: brightness(.96); }
  .tile:hover, .pcard:hover, .card.continue:hover, .ncard:hover, .nbig:hover, .reader-nav a:hover,
  .check:hover, .try-chip:hover, .remind:hover { border-color: var(--ink-3); }
  .chip:not(.on):hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
  .tabbar a:not(.active):hover { color: var(--ink); }
  .linkish:hover, .section-title a:hover, .check-foot button:hover { text-decoration: underline; }
  .step-prompt:hover { filter: brightness(.97); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
