/* Professor · identidade visual
   Verde-petróleo (calma, crescimento) + sol (energia, acolhimento) + creme (papel, leveza). */
:root {
  --bg: #fbf7f0;
  --surface: #ffffff;
  --surface-2: #f3eee4;
  --text: #16302b;
  --muted: #5d6b67;
  --line: #e6dfd2;
  --brand: #0f6b5c;
  --brand-2: #138a75;
  --brand-ink: #ffffff;
  --brand-soft: #e2f1ec;
  --faixa: #dcefe8;
  --sun: #f2a93b;
  --sun-soft: #fdf0d9;
  --ok: #176b41;
  --ok-soft: #e1f3e8;
  --meio: #9a5b00;
  --meio-soft: #fff1d6;
  --erro: #b93a32;
  --erro-soft: #fbe6e3;
  --info: #285e9e;
  --info-soft: #e6eff9;
  --shadow: 0 1px 2px rgba(22, 48, 43, .06), 0 6px 20px rgba(22, 48, 43, .06);
  --radius: 18px;
  --ic-traco: #1d2b29;
  --ic-sol: #ffe08a;
  --ic-rosa: #ffc6d3;
  --ic-menta: #b6eadb;
  --ic-lilas: #d9cdf6;
  --ic-raio: #eaa93a;
  --cta-1: #0f6b5c;
  --cta-2: #0d7262;
  --cta-texto: #ffffff;
  --foco: #0b5d50;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, sans-serif;
  --font-titulo: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1716; --surface: #172221; --surface-2: #1f2d2b; --text: #eaf2ef; --muted: #9fb1ac; --line: #2a3a37;
    --brand: #3cc3a5; --brand-2: #5fd6bb; --brand-ink: #062520; --brand-soft: #173a33; --faixa: #14302a;
    --sun: #f6b955; --sun-soft: #3a2d14; --ok: #5fd39a; --ok-soft: #163327; --meio: #f2b357; --meio-soft: #3a2b12;
    --erro: #ff8a80; --erro-soft: #3d1d1b; --info: #8cb8ff; --info-soft: #1a2a42;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35); color-scheme: dark;
    --ic-traco: #e9f3f0; --ic-sol: #d9b94f; --ic-rosa: #d98ea3; --ic-menta: #5fb8a0; --ic-lilas: #9d8bd6; --ic-raio: #f6c25e;
    --cta-1: #135a4e; --cta-2: #176a5b; --cta-texto: #ffffff; --foco: #f6c25e;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1716; --surface: #172221; --surface-2: #1f2d2b; --text: #eaf2ef; --muted: #9fb1ac; --line: #2a3a37;
  --brand: #3cc3a5; --brand-2: #5fd6bb; --brand-ink: #062520; --brand-soft: #173a33; --faixa: #14302a;
  --sun: #f6b955; --sun-soft: #3a2d14; --ok: #5fd39a; --ok-soft: #163327; --meio: #f2b357; --meio-soft: #3a2b12;
  --erro: #ff8a80; --erro-soft: #3d1d1b; --info: #8cb8ff; --info-soft: #1a2a42;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35); color-scheme: dark;
    --ic-traco: #e9f3f0; --ic-sol: #d9b94f; --ic-rosa: #d98ea3; --ic-menta: #5fb8a0; --ic-lilas: #9d8bd6; --ic-raio: #f6c25e;
    --cta-1: #135a4e; --cta-2: #176a5b; --cta-texto: #ffffff; --foco: #f6c25e;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-titulo); line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.015em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; }
p { margin: .35rem 0; }
small { color: var(--muted); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.pular { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--brand-ink); padding: .5rem 1rem; z-index: 10; border-radius: 0 0 8px 0; }
.pular:focus { left: 0; }

/* ---------- Layout e menu ---------- */
/* Barra no topo (marca + botão de tema), abas logo abaixo e uma faixa colorida atrás do título da tela.
   O conteúdo fica numa coluna central de largura confortável; no celular o menu vira barra inferior. */
body { --larg: 1320px; --nav-h: 108px; position: relative; }
body::before { content: ""; position: absolute; z-index: -1; inset: var(--nav-h) 0 auto 0; height: 190px; background: var(--faixa); pointer-events: none; }
body.sem-menu::before { display: none; }
.layout { display: block; min-height: 100vh; }
.nav {
  position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 1rem;
  padding: 0 max(16px, calc((100% - var(--larg)) / 2)); background: var(--surface); border-bottom: 1px solid var(--line);
}
.marca { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: .65rem; padding: .6rem 0; text-decoration: none; color: var(--text); }
.marca b { display: block; font-family: var(--font-titulo); font-size: 1.2rem; line-height: 1.1; }
.marca small { font-size: .78rem; }
.nav-links { grid-column: 1 / -1; grid-row: 2; display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; margin-inline: -.5rem; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { display: flex; gap: .5rem; align-items: center; padding: .7rem .8rem .6rem; border-bottom: 3px solid transparent; color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; }
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--brand); font-weight: 700; border-bottom-color: var(--brand); }
.nav-ic { width: 1.4em; text-align: center; }
.nav-links .nav-ic { width: 22px; display: inline-flex; justify-content: center; }
.nav-links .nav-ic svg { width: 20px; height: 20px; }
main { padding: 2rem 16px 6rem; max-width: var(--larg); width: 100%; margin-inline: auto; outline: none; }
@media (min-width: 761px) { main { padding-inline: 0; } .nav { --larg: 1320px; } }
@media (max-width: 1400px) and (min-width: 761px) { main { padding-inline: 24px; } }
body.sem-menu .nav { display: none; }
body.sem-menu main { margin: 0 auto; }

@media (max-width: 760px) {
  body::before { inset: 0 0 auto 0; height: 150px; }
  .nav {
    position: fixed; inset: auto 0 0 0; top: auto; display: block; padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom));
    border-bottom: 0; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .05);
  }
  .nav-links { display: flex; justify-content: space-around; margin: 0; overflow: visible; }
  .marca, .so-desktop { display: none !important; }
  .nav-links a { flex-direction: column; gap: 0; font-size: .72rem; padding: .35rem .4rem; min-width: 60px; text-align: center; border-radius: 10px; border-bottom: 0; }
  .nav-links a[aria-current="page"] { background: var(--brand-soft); }
  .nav-links .nav-ic svg { width: 26px; height: 26px; }
  main { padding: 1.1rem 16px 6.5rem; }
}

/* ---------- Blocos comuns ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.25rem; box-shadow: var(--shadow); margin: 1rem 0; }
.card.desativado { opacity: .8; }
details > summary { cursor: pointer; font-weight: 650; }
details.card > summary { list-style-position: outside; }
.grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 1rem; }
.grade > .card { display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; }
.titulo-tela { margin-bottom: 1.1rem; }
.titulo-tela p { color: var(--muted); font-size: 1.05rem; max-width: 62ch; }
.tag { display: inline-block; font-size: .76rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); padding: .22rem .65rem; border-radius: 99px; }
.rotulo-mini { display: block; font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: .6rem 0 .25rem; }
.dica-mini { color: var(--muted); font-size: .9rem; }
.grande { font-size: 1.12rem; }
.voltar { display: inline-block; margin-bottom: .8rem; font-weight: 600; text-decoration: none; }

.hero { display: flex; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.hero > div { flex: 1; }
.hero h1 { margin: 0; }
.hero p { color: var(--muted); margin: 0; }
.fogo { font-weight: 800; font-size: 1.1rem; background: var(--sun-soft); color: var(--meio); padding: .35rem .8rem; border-radius: 99px; white-space: nowrap; }
.mascote { display: inline-flex; flex: none; }
.mascote svg { display: block; }

.cta, .continuar {
  display: flex; gap: 1.2rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  border-radius: calc(var(--radius) + 4px); padding: 1.35rem 1.5rem; margin: 1rem 0; box-shadow: var(--shadow);
}
.cta { background: linear-gradient(135deg, var(--cta-1) 0%, var(--cta-2) 100%); color: var(--cta-texto); }
.cta > div, .continuar-txt { flex: 1 1 300px; }
.cta p { color: var(--cta-texto); margin: 0; }
.cta .btn.prim { background: #fff; color: #0b4f44; }
.continuar { background: var(--surface); border: 2px solid var(--brand); }
.continuar h2 { margin: .45rem 0 .1rem; }
.continuar p { color: var(--muted); margin: 0 0 .6rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin: 1rem 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.stat strong { font-family: var(--font-titulo); font-size: 1.4rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat span { color: var(--muted); font-size: .86rem; }
.mini-barra { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: .45rem 0 .25rem; }
.mini-barra > div { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 99px; transition: width .4s ease; }

.pilares { list-style: none; padding: 0; margin: .3rem 0 0; display: grid; gap: .65rem; }
.pilares li { display: flex; gap: .7rem; align-items: flex-start; }
.pilares li > span { font-size: 1.3rem; }
.pilares b { display: block; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 1px solid transparent; border-radius: 14px;
  padding: .65rem 1.1rem; font-weight: 650; cursor: pointer; transition: transform .08s, background .15s, box-shadow .15s, filter .15s;
  min-height: 44px; line-height: 1.15; text-align: center;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .ic svg { width: 20px; height: 20px; display: block; }
.btn.prim { background: var(--brand); color: var(--brand-ink); box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.btn.prim:hover { filter: brightness(1.07); }
.btn.prim.grande { font-size: 1.08rem; padding: .85rem 1.5rem; }
.btn.prim.destaque { animation: pulsar 1.6s ease-in-out infinite; }
.btn.sec { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn.sec:hover { background: var(--surface-2); }
.btn.sec.tocando { border-color: var(--brand); color: var(--brand); }
.btn.mini { min-height: 34px; min-width: 34px; padding: .3rem .45rem; border-radius: 10px; vertical-align: middle; }
.btn.mini .ic svg { width: 16px; height: 16px; }
.btn.link, button.link { background: none; border: 0; color: var(--brand); padding: .3rem 0; min-height: 0; cursor: pointer; font-weight: 650; box-shadow: none; }
.btn.perigo { background: var(--erro-soft); color: var(--erro); }
.btn.mic { background: var(--text); color: var(--bg); padding: .75rem 1.35rem; font-size: 1.05rem; }
.btn.mic.ouvindo { background: var(--erro); color: #fff; animation: pulsar 1.2s ease-in-out infinite; }
@keyframes pulsar { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sun) 55%, transparent); } 50% { box-shadow: 0 0 0 10px transparent; } }
.linha { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin: .6rem 0; }
.linha.centro { justify-content: center; }
.linha.acoes { margin: 1rem 0 .6rem; }

/* ---------- Boas-vindas ---------- */
.boas-vindas-tela { max-width: 560px; margin: 4vh auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.boas-vindas-tela p { color: var(--muted); }
.pontos { display: flex; gap: .4rem; margin-bottom: .5rem; }
.pontos span { width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: width .3s; }
.pontos span.on { width: 24px; background: var(--brand); }
.promessas { list-style: none; padding: 0; margin: .3rem 0 .6rem; text-align: left; display: grid; gap: .5rem; }
.promessas li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .65rem .9rem; }
.promessas li::before { content: "✓ "; color: var(--ok); font-weight: 800; }
.escolhas { display: grid; gap: .6rem; width: 100%; text-align: left; }
.linha-escolhas { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); text-align: center; }
.escolha { display: flex; flex-direction: column; gap: .1rem; padding: .85rem 1rem; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; }
.escolha.on { border-color: var(--brand); background: var(--brand-soft); }
.campo.grande-nome { font-size: 1.4rem; text-align: center; max-width: 360px; }

/* ---------- Trilha e unidade ---------- */
.trilha-lista { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .45rem; }
.trilha-item { display: grid; grid-template-columns: auto 1fr auto; gap: .85rem; align-items: center; padding: .75rem 1rem; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, transform .1s; }
.trilha-item:hover { border-color: var(--brand); }
.trilha-item.atual { border: 2px solid var(--brand); background: var(--brand-soft); }
.trilha-item.futura { opacity: .78; }
.un-num { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); font-weight: 800; }
.trilha-item.atual .un-num { background: var(--brand); color: var(--brand-ink); }
.trilha-item.feita .un-num { background: var(--ok); color: #fff; }
.un-tit { display: flex; flex-direction: column; min-width: 0; }
.un-tit small { font-size: .87rem; }
.un-tags { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: flex-end; }
@media (max-width: 560px) { .trilha-item { grid-template-columns: auto 1fr; } .un-tags { grid-column: 2; justify-content: flex-start; } }

.unidade-hero { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 1.3rem 1.4rem; box-shadow: var(--shadow); }
.unidade-hero h1 { margin: .5rem 0 .1rem; }
.unidade-hero p { color: var(--muted); }
.metas { background: var(--sun-soft); border-color: transparent; }
.checks { list-style: none; padding: 0; margin: .2rem 0 0; display: grid; gap: .35rem; }
.checks li { padding-left: 1.6rem; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 1.2rem; height: 1.2rem; margin-top: .2rem; border-radius: 99px; background: var(--ok); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.etapas { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .55rem; }
.etapa { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .8rem 1rem; }
.etapa.feita { background: var(--ok-soft); border-color: transparent; }
.etapa.teste { border: 2px dashed var(--sun); }
.etapa.teste.feita { border-style: solid; }
.etapa-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); font-size: 1.25rem; }
.etapa.feita .etapa-ic { background: var(--ok); color: #fff; font-weight: 800; }
.etapa-txt { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 560px) { .etapa { grid-template-columns: auto 1fr; } .etapa > .btn { grid-column: 1 / -1; } }
.gramatica .regra { border-top: 1px solid var(--line); padding: .7rem 0; }
.gramatica .regra:first-child { border-top: 0; }
.exemplos { padding-left: 1.1rem; }
.exemplos li { margin: .25rem 0; }
.exemplos .resp { color: var(--muted); }
.lista-frases { list-style: none; padding: 0; display: grid; gap: .4rem; }
.lista-frases li { display: grid; grid-template-columns: 1fr auto; gap: 0 .6rem; align-items: center; border-top: 1px solid var(--line); padding-top: .4rem; }
.lista-frases li small { grid-column: 1; }
.lista-frases li .btn { grid-row: 1 / span 2; grid-column: 2; }
.aprovado { background: var(--ok-soft); border-radius: 16px; padding: 1rem 1.2rem; margin: 1rem 0; }

/* ---------- Central de treino ---------- */
.hub { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; margin: 1rem 0; }
.hub-item { display: flex; flex-direction: column; gap: .2rem; padding: 1.2rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: transform .12s, border-color .15s; }
.hub-item:hover { border-color: var(--brand); transform: translateY(-2px); }
.hub-ic { font-size: 1.8rem; }
.hub-item b { font-size: 1.1rem; }

/* ---------- Exercícios ---------- */
.sessao-topo { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.sessao-topo strong { text-align: center; flex: 1; }
.contador { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.barra { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-bottom: 1.3rem; }
.barra-cheia { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--sun)); border-radius: 99px; transition: width .35s ease; }
.ex { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: clamp(1rem, 3vw, 1.8rem); box-shadow: var(--shadow); }
.ex-cab { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ex-sub { color: var(--muted); font-size: .92rem; }
.cartao-frase { background: var(--surface-2); border-radius: var(--radius); padding: 1.3rem 1.2rem; text-align: center; }
.frase-en { font-family: var(--font-titulo); font-size: clamp(1.4rem, 4.2vw, 2rem); font-weight: 650; line-height: 1.35; margin: .2rem 0; overflow-wrap: anywhere; }
.frase-pt { color: var(--muted); font-size: 1.05rem; }
.frase-pt.grande { font-size: clamp(1.25rem, 3.6vw, 1.7rem); color: var(--text); font-weight: 600; }
.palavra { background: none; border: 0; padding: 0 .05em; font: inherit; color: inherit; cursor: pointer; border-radius: 6px; text-decoration: underline transparent; text-underline-offset: 6px; text-decoration-thickness: 3px; }
.palavra:hover { background: color-mix(in srgb, var(--brand) 12%, transparent); }
.palavra.ok { color: var(--ok); }
.palavra.quase { color: var(--meio); text-decoration-color: var(--meio); text-decoration-style: wavy; }
.palavra.falta { color: var(--erro); text-decoration-color: var(--erro); text-decoration-style: wavy; }
.parcial { min-height: 1.4em; color: var(--muted); font-style: italic; margin: .2rem 0; }
.resultado { margin-top: .6rem; }
.placar { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; border-radius: 14px; font-weight: 600; }
.placar .pct { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.placar.ok { background: var(--ok-soft); color: var(--ok); }
.placar.meio { background: var(--meio-soft); color: var(--meio); }
.placar.ruim { background: var(--erro-soft); color: var(--erro); }
.ouvido { color: var(--muted); }
.dicas { background: var(--info-soft); border-radius: 14px; padding: .8rem 1rem; margin: .7rem 0; }
.dicas h4 { margin: 0 0 .3rem; font-size: .95rem; color: var(--info); }
.dicas ul { margin: 0; padding-left: 1.1rem; }
.dicas li { margin: .35rem 0; }
.dica-txt { color: var(--text); font-size: .95rem; }
.ipa { font-family: "Segoe UI Symbol", "Lucida Sans Unicode", var(--font); color: var(--muted); }
.ipa-linha { color: var(--muted); }
.foco { border: 2px dashed var(--sun); border-radius: 14px; padding: .7rem 1rem; margin-bottom: 1rem; background: var(--sun-soft); }
.foco p { margin: .2rem 0; }
.partes { margin: .7rem 0; }
.partes summary { color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .55rem 0; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: .45rem .9rem; cursor: pointer; font-weight: 550; min-height: 40px; }
.chip.ativo { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.chip.estatico { cursor: default; display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .3rem .2rem .85rem; }
.campo { width: 100%; padding: .75rem .95rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin: .3rem 0; }
.campo:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.campo.grande { font-size: 1.4rem; letter-spacing: .15em; text-transform: uppercase; text-align: center; }
.rodape { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 1.4rem; padding-top: 1rem; }
.instrucao { font-size: 1.15rem; font-weight: 650; }
.opcoes { display: grid; gap: .6rem; margin: 1rem 0; }
.opcao { text-align: left; padding: .9rem 1.1rem; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; font-size: 1.12rem; font-weight: 550; min-height: 52px; }
.opcao:hover { border-color: var(--muted); }
.opcao.certa { border-color: var(--ok); background: var(--ok-soft); }
.opcao.errada { border-color: var(--erro); background: var(--erro-soft); }
.letras-grandes { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.letras-grandes .opcao { text-align: center; font-size: 2rem; }
.montagem { min-height: 64px; display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; padding: .7rem; margin: 1rem 0 .5rem; border: 2px dashed var(--line); border-radius: 14px; }
.montagem.certa { border: 2px solid var(--ok); background: var(--ok-soft); }
.montagem.errada { border: 2px solid var(--erro); background: var(--erro-soft); }
.banco { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; min-height: 44px; }
.letras, .alfabeto { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: .45rem; margin: .7rem 0; }
.letra { display: flex; flex-direction: column; align-items: center; padding: .5rem .2rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.letra b { font-size: 1.35rem; }
.letra.certa { border-color: var(--ok); background: var(--ok-soft); }
.letra.atencao { border: 2px solid var(--sun); }
.letra.errada { border-color: var(--erro); background: var(--erro-soft); }
.notas { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.nota { flex-direction: column; gap: 0; background: var(--surface); border-color: var(--line); }
.nota small { font-weight: 400; font-size: .76rem; }
.nota.sugerido { outline: 3px solid var(--sun); outline-offset: 1px; }
.nota-errei span { color: var(--erro); }
.nota-dificil span { color: var(--meio); }
.nota-acertei span { color: var(--ok); }
.verso { margin-top: 1rem; text-align: center; }
.exemplo { color: var(--muted); }
.correcoes { padding-left: 1.2rem; }
.correcoes li { margin: .3rem 0; }
.modelo { background: var(--ok-soft); border-radius: 14px; padding: .7rem 1rem; margin: .7rem 0; }
.modelo p { font-size: 1.22rem; font-weight: 650; margin: .1rem 0; }
.ia { border-left: 4px solid var(--info); background: var(--info-soft); border-radius: 0 14px 14px 0; padding: .7rem 1rem; margin: .7rem 0; }
.ia h4 { color: var(--info); margin: 0 0 .25rem; }
.ia.carregando { color: var(--muted); font-style: italic; }
.aviso { border-radius: 14px; padding: .75rem 1rem; margin: .6rem 0; }
.aviso.info { background: var(--info-soft); }
.aviso.ok { background: var(--ok-soft); color: var(--ok); }
.aviso.meio { background: var(--meio-soft); }
.aviso.erro { background: var(--erro-soft); color: var(--erro); }
.concluido { text-align: center; padding: .5rem 0; display: flex; flex-direction: column; align-items: center; }
.concluido .stats, .concluido .aprovado, .concluido .aviso { width: 100%; }

/* ---------- Listas, tabelas, gráficos ---------- */
.lista { list-style: none; padding: 0; margin: .4rem 0 .6rem; display: grid; gap: .45rem; }
.item-lista, .item-estatico { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .7rem 1rem; }
.item-lista { cursor: pointer; }
.item-lista:hover { border-color: var(--brand); }
.item-lista > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.badge { font-size: .78rem; font-weight: 700; padding: .22rem .6rem; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.meio { background: var(--meio-soft); color: var(--meio); }
.badge.aqui { background: var(--brand); color: var(--brand-ink); }
.regras details { border-top: 1px solid var(--line); padding: .6rem 0; }
.tabela { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.tabela th, .tabela td { text-align: left; padding: .45rem .4rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabela th { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.erro-aula { border-top: 1px solid var(--line); padding: .6rem 0; }
.lista-erros { list-style: none; padding: 0; }
.lista-erros li { border-top: 1px solid var(--line); padding: .6rem 0; }
.caixas { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; align-items: end; margin: .8rem 0; }
.caixa { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.caixa small { font-size: .74rem; text-align: center; }
.caixa-barra { height: 90px; width: 100%; max-width: 48px; display: flex; align-items: flex-end; background: var(--surface-2); border-radius: 10px; overflow: hidden; }
.caixa-barra > div { width: 100%; background: var(--brand); border-radius: 10px 10px 0 0; min-height: 2px; }
.caixa-barra > .c0 { background: var(--muted); }
.caixa-barra > .c4, .caixa-barra > .c5 { background: var(--ok); }
.grafico { display: grid; grid-template-columns: repeat(14, 1fr); gap: .3rem; height: 170px; align-items: end; margin-top: .6rem; }
.coluna { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .2rem; }
.coluna .valor { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.barra-v { width: 100%; max-width: 26px; background: var(--brand); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.barra-v.meta { background: var(--ok); }
.coluna small { font-size: .72rem; }

/* ---------- Painel lateral (Hoje) ---------- */
.painel-lateral .card { margin: 0 0 1rem; }
.lateral h3 { font-size: 1rem; }
.palavra-dia { font-family: var(--font-titulo); font-size: 1.7rem; font-weight: 700; color: var(--brand); margin: .1rem 0; }
.exemplo-dia { font-style: italic; color: var(--muted); }
.grafico.semana { grid-template-columns: repeat(7, 1fr); height: 120px; }
.coluna small.hoje-dia { color: var(--brand); font-weight: 800; }
.proximas { list-style: none; padding: 0; margin: .2rem 0 .6rem; display: grid; gap: .4rem; counter-reset: prox; }
.proximas a { display: flex; flex-direction: column; padding: .55rem .8rem; border-radius: 12px; background: var(--surface-2); color: var(--text); text-decoration: none; }
.proximas a:hover { outline: 2px solid var(--brand); }

/* ---------- Telas largas (computador) ---------- */
@media (min-width: 1180px) {
  /* Hoje: conteúdo principal + painel lateral fixo à direita. */
  .painel { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }
  .painel-principal > :first-child { margin-top: 0; }
  .painel-lateral { position: sticky; top: 1.5rem; }
  /* Trilha: os dois livros lado a lado. */
  .livros { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
  .livros > .card { margin: 0; }
  /* Unidade: etapas à esquerda, gramática e vocabulário à direita. */
  .unidade-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
  .unidade-grid .col > :first-child { margin-top: 0; }
  /* Listas de frases em duas colunas. */
  .lista { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
  .hub { grid-template-columns: repeat(4, 1fr); }
  /* Exercícios: centralizados numa largura confortável de leitura. */
  .sessao-topo, .barra, .ex { max-width: 920px; margin-inline: auto; }
}
@media (min-width: 1600px) {
  .painel { grid-template-columns: minmax(0, 1fr) 380px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Formulário ---------- */
.form .campo-ajuste { display: grid; gap: .25rem; margin: .8rem 0; }
.form .campo-ajuste > span { font-weight: 650; }
.form input[type="text"], .form input[type="email"], .form input[type="password"], .form input[type="number"], .form input[type="date"], .form select {
  padding: .65rem .85rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); max-width: 520px; width: 100%;
}
.form input[type="range"] { width: min(320px, 100%); accent-color: var(--brand); }

/* ---------- Ícones ilustrados ---------- */
.ico { display: inline-flex; flex: none; line-height: 0; }
.ico svg { display: block; overflow: visible; fill: none; stroke: var(--ic-traco); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ico .s { fill: var(--ic-sol); }
.ico .r { fill: var(--ic-rosa); }
.ico .m { fill: var(--ic-menta); }
.ico .l { fill: var(--ic-lilas); }
.ico .w { fill: var(--surface); }
.ico .raio { stroke: var(--ic-raio); fill: none; }
.com-ic { display: flex; align-items: center; gap: .6rem; }
h1.com-ic { gap: .8rem; }
.nav-ic { width: 28px; display: inline-flex; justify-content: center; }
.nav a[aria-current="page"] .ico svg { transform: scale(1.08); }
.fogo { display: inline-flex; align-items: center; gap: .3rem; }
.stat.com-icone { flex-direction: row; align-items: center; gap: .8rem; }
.stat-txt { display: flex; flex-direction: column; gap: .1rem; min-width: 0; flex: 1; }
.pilares li > .ico { margin-top: -.15rem; }
.etapa-ic { position: relative; width: 52px; height: 52px; background: var(--surface-2); }
.etapa.feita .etapa-ic { background: var(--surface); }
.feito-marca { position: absolute; right: -6px; bottom: -6px; width: 22px; height: 22px; border-radius: 99px; background: var(--ok); color: #fff; font-size: .75rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }
.hub-ic { margin-bottom: .35rem; }
.cta > .ico, .continuar > .ico { flex: none; }
.cta > .ico { padding: .45rem; background: rgba(255, 255, 255, .92); border-radius: 18px; }
.cta > .ico .w { fill: #fff; }
@media (max-width: 560px) { .cta > .ico, .continuar > .ico { display: none; } }

/* ---------- Proteção de dados ---------- */
.lembrete { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.lembrete > div:nth-child(2) { flex: 1 1 260px; }
.lembrete .linha { margin: 0; }
.status-dados { list-style: none; padding: 0; margin: .6rem 0; display: grid; gap: .35rem; }
.status-dados li { padding-left: 1.6rem; position: relative; }
.status-dados li::before { content: "•"; position: absolute; left: .5rem; color: var(--muted); }
.status-dados li.ok::before { content: "✓"; left: .3rem; color: var(--ok); font-weight: 800; }
.status-dados li.falha { color: var(--erro); font-weight: 650; }
.status-dados li.falha::before { content: "!"; left: .45rem; color: var(--erro); font-weight: 800; }

/* ---------- Resistência a falhas ---------- */
.tela-erro { max-width: 560px; margin: 8vh auto 0; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.5rem; box-shadow: var(--shadow); }
.tela-erro p { color: var(--muted); }
.tela-erro details { text-align: left; margin-top: 1rem; }
.erro-detalhe { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); padding: .7rem; border-radius: 10px; font-size: .85rem; }
.aviso-conexao { position: fixed; top: 0; left: 0; right: 0; z-index: 20; background: var(--meio-soft); color: var(--text); border-bottom: 2px solid var(--sun); padding: .55rem 16px; text-align: center; font-weight: 600; font-size: .92rem; }
body.offline main { padding-top: 3.6rem; }
.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 30; background: var(--text); color: var(--bg); padding: .7rem 1.1rem; border-radius: 12px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
@media (max-width: 760px) { .toast { bottom: 5.2rem; } }
.registro-erros { max-height: 260px; overflow: auto; }

/* ---------- Nota de pronúncia (Azure) ---------- */
.azure { border-left: 4px solid var(--brand); background: var(--brand-soft); border-radius: 0 14px 14px 0; padding: .8rem 1rem; margin: .7rem 0; }
.azure.carregando { color: var(--muted); font-style: italic; }
.azure h4 { margin: 0 0 .5rem; }
.medidores { display: grid; gap: .35rem; margin-bottom: .5rem; }
.medidor { display: grid; grid-template-columns: 9.5rem 1fr 2.2rem; gap: .6rem; align-items: center; }
.medidor .mini-barra { margin: 0; }
.medidor b { text-align: right; font-variant-numeric: tabular-nums; }
.fonemas { list-style: none; padding: 0; margin: .3rem 0 0; display: grid; gap: .5rem; }
.sons { display: inline-flex; flex-wrap: wrap; gap: .2rem; margin-left: .4rem; vertical-align: middle; }
.som { font-family: "Segoe UI Symbol", var(--font); font-size: .85rem; padding: .05rem .4rem; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.som.ok { border-color: var(--ok); color: var(--ok); }
.som.quase { border-color: var(--meio); color: var(--meio); }
.som.falta { border-color: var(--erro); color: var(--erro); font-weight: 700; }
.passos-config { padding-left: 1.2rem; margin: .3rem 0; }
@media (max-width: 560px) { .medidor { grid-template-columns: 1fr 2.2rem; } .medidor .mini-barra { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Whisper local ---------- */
.fonte-nota { color: var(--muted); font-size: .9rem; margin: .3rem 0; }
.fonte-nota .ico { flex: none; }

/* ---------- Agenda e tarefas ---------- */
.tarefas { list-style: none; padding: 0; margin: .4rem 0; display: grid; gap: .35rem; }
.tarefa label { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: 12px; background: var(--surface-2); cursor: pointer; flex-wrap: wrap; }
.tarefa input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.tarefa span:first-of-type { flex: 1 1 160px; }
.tarefa.feita span:first-of-type { text-decoration: line-through; color: var(--muted); }
.tarefa.revisao label { border-left: 4px solid var(--ic-lilas); }
.agenda-hoje .aviso { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.agenda-hoje .aviso p { margin: 0; flex: 1 1 220px; }

/* ---------- Meu curso ---------- */
.etapas-curso { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .5rem; counter-reset: etapa; }
.etapa-curso { border: 1px solid var(--line); border-radius: 14px; padding: .55rem .7rem; background: var(--surface); }
.etapa-curso.feita { background: var(--ok-soft); border-color: transparent; }
.etapa-linha { display: flex; align-items: center; gap: .5rem; }
.etapa-check input { width: 22px; height: 22px; accent-color: var(--ok); }
.etapa-titulo { flex: 1; min-width: 0; border: 1px solid transparent; background: transparent; border-radius: 8px; padding: .35rem .5rem; font-weight: 600; }
.etapa-titulo:hover, .etapa-titulo:focus { border-color: var(--line); background: var(--surface); outline: none; }
.etapa-curso.feita .etapa-titulo { text-decoration: line-through; color: var(--muted); }
.etapa-acoes { display: flex; gap: .25rem; }
.etapa-notas summary { font-weight: 500; color: var(--brand); font-size: .9rem; margin-top: .3rem; }
.etapa-notas textarea, .form textarea { width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; resize: vertical; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#main input[type="text"]:not(.campo):not(.etapa-titulo), #main input[type="date"], #main input.num, #main select:not(.form select) { padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
#main input.num { width: 5.5rem; }

/* ---------- Calendário ---------- */
.cal-topo { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.cal-topo h2 { margin: 0; font-size: 1.15rem; }
.cal-grade { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; }
.cal-sem { text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); padding-bottom: .2rem; }
.cal-dia { aspect-ratio: 1 / 1; min-height: 44px; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: .25rem .1rem; cursor: pointer; font: inherit; color: var(--text); }
.cal-dia:hover { border-color: var(--brand); }
.cal-dia.folga { background: var(--surface-2); color: var(--muted); }
.cal-dia.hoje { border: 2px solid var(--brand); }
.cal-dia.sel { background: var(--brand-soft); border-color: var(--brand); }
.cal-dia.completo .cal-num::after { content: " ✓"; color: var(--ok); font-weight: 800; }
.cal-dia.atrasado { border-color: var(--erro); }
.cal-num { font-weight: 650; font-size: .92rem; }
.cal-pontos { display: flex; gap: 2px; margin-top: auto; flex-wrap: wrap; justify-content: center; }
.cal-pontos i { width: 7px; height: 7px; border-radius: 99px; background: var(--sun); display: block; }
.cal-pontos i.f { background: var(--ok); }
.cal-pontos i.r { background: var(--ic-lilas); }
.cal-dia small { font-size: .65rem; }
.meta.atrasada { border-color: var(--erro); }
.meta-topo { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.meta-topo h3 { margin: 0; }
.submetas { list-style: none; padding: 0; margin: .6rem 0; display: grid; gap: .4rem; }
.submeta { display: grid; grid-template-columns: 1fr auto; gap: 0 .5rem; align-items: center; padding: .45rem .6rem; border-radius: 10px; background: var(--surface-2); }
.submeta label { display: flex; gap: .55rem; align-items: center; cursor: pointer; font-weight: 600; }
.submeta input { width: 20px; height: 20px; accent-color: var(--ok); flex: none; }
.submeta small { grid-column: 1; padding-left: 1.9rem; }
.submeta .btn { grid-column: 2; grid-row: 1 / span 2; }
.submeta.feita label span { text-decoration: line-through; color: var(--muted); }
.nova-submeta { gap: .4rem; }
.nova-submeta input[type="text"] { flex: 1 1 200px; }

/* ---------- Curva de aprendizagem ---------- */
.grafico-wrap { width: 100%; max-width: 720px; overflow: hidden; }
.grafico-linhas { width: 100%; height: auto; display: block; }
.grafico-linhas .eixo { stroke: var(--line); stroke-width: 1.5; }
.grafico-linhas .marca-hoje { stroke: var(--muted); stroke-dasharray: 3 4; }
.grafico-linhas .rotulo { fill: var(--muted); font-size: 11px; }
.grafico-linhas polyline { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.grafico-linhas .planejado { stroke: var(--muted); stroke-dasharray: 6 5; }
.grafico-linhas .realizado { stroke: var(--ok); }
.legenda-linhas { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.leg::before { content: ""; display: inline-block; width: 22px; height: 0; border-top: 3px solid; vertical-align: middle; margin-right: .35rem; }
.leg.planejado::before { border-top-style: dashed; color: var(--muted); }
.leg.realizado::before { color: var(--ok); }
.dominio { list-style: none; padding: 0; margin: .4rem 0; display: grid; gap: .45rem; }
.dominio li { display: grid; grid-template-columns: 11rem 1fr 3rem 3rem; gap: .6rem; align-items: center; }
.dominio .mini-barra { margin: 0; }
.dominio b { text-align: right; font-variant-numeric: tabular-nums; }
.dominio .sobe { color: var(--ok); font-weight: 700; }
.dominio .desce { color: var(--erro); font-weight: 700; }
@media (max-width: 560px) { .dominio li { grid-template-columns: 1fr 3rem 3rem; } .dominio .mini-barra { grid-column: 1 / -1; grid-row: 2; } }
@media (max-width: 560px) {
  .cal-grade { gap: .2rem; }
  .cal-dia { aspect-ratio: auto; min-height: 46px; border-radius: 8px; padding: .2rem 0; }
  .card.calendario { padding: .9rem .6rem; }
  .meta-topo { flex-direction: column; gap: .2rem; }
}

/* ---------- Visão semanal, previsão e arrastar ---------- */
.alternar { display: flex; gap: .35rem; margin: 0 0 .7rem; }
.semana-grade { display: grid; grid-template-columns: 1fr; gap: .35rem; }
.semana-dia { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .6rem; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: .5rem .6rem; background: var(--surface); }
.semana-dia.hoje { border: 2px solid var(--brand); }
.semana-dia.folga { background: var(--surface-2); }
.semana-dia h4 { margin: .3rem 0 0; font-size: .92rem; }
.semana-dia h4 small { display: block; font-weight: 500; }
.semana-dia .tarefas { margin: 0; }
.semana-dia > .dica-mini { margin: .3rem 0 0; }
@media (max-width: 420px) { .semana-dia { grid-template-columns: 1fr; gap: .2rem; } }
.previsao { font-size: .9rem; color: var(--muted); margin: .4rem 0; padding-left: .7rem; border-left: 3px solid var(--line); }
.previsao.adiantado { border-left-color: var(--ok); color: var(--text); }
.previsao.atrasado { border-left-color: var(--erro); color: var(--text); }
.etapa-curso[draggable="true"] { cursor: grab; }
.etapa-curso.arrastando { opacity: .5; }
.etapa-curso.alvo-soltar { outline: 2px dashed var(--brand); outline-offset: 2px; }

/* ---------- Páginas de texto (privacidade) ---------- */
.pagina-texto { max-width: 760px; margin: 0 auto; padding: 1.5rem 16px 4rem; }
.pagina-texto h1 { margin: .4rem 0 .2rem; }
.pagina-texto .card h2 { font-size: 1.15rem; }
.pagina-texto ul { padding-left: 1.2rem; }
.pagina-texto li { margin: .35rem 0; }
.pagina-texto code { background: var(--surface-2); padding: .05rem .35rem; border-radius: 6px; }

/* ---------- Botão de tema (claro/escuro) ---------- */
.nav-tema { grid-column: 3; grid-row: 1; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.nav-tema:hover { background: var(--surface-2); }
.nav-tema .nav-ic { width: auto; }
.nav-tema-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.tema-btn { padding: .35rem .5rem; }
.hero .tema-btn { display: none; }
@media (max-width: 760px) { .nav-tema { display: none; } .hero .tema-btn { display: inline-flex; flex: none; } }
.tela-erro-404 { margin-top: 12vh; }

/* ---------- Anti-sobreposição e responsividade (auditoria de layout, 320 a 2560 px) ----------
   Regras de base: nada passa da largura da tela, textos longos quebram em vez de vazar, filhos de flex/grid podem
   encolher (min-width: 0) e a barra inferior nunca fica por cima de campos nem de botões. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
main { min-width: 0; overflow-wrap: anywhere; }
img, svg, video, canvas, table { max-width: 100%; }
input, select, textarea, button { max-width: 100%; }
input, select, textarea { min-width: 0; }
.card, .aviso, .continuar, .cta, .hub-item, .stat, .painel > *, .grade > *, .stats > * { min-width: 0; }
.tabela th, .tabela td { overflow-wrap: anywhere; word-break: normal; }
.tabela { table-layout: auto; }
.nav-links a, .nav-links { overflow-wrap: normal; }

/* Tela Hoje: o texto do título pode encolher e quebrar; o botão de tema e o fogo não ficam por baixo dele. */
.hero { flex-wrap: wrap; row-gap: .6rem; }
.hero > div { flex: 1 1 12rem; min-width: 0; }
.hero h1 { overflow-wrap: anywhere; }

/* Tarefas, metas e submetas (calendário e Hoje) com textos longos. */
.tarefa label { min-width: 0; }
.tarefa span:first-of-type { min-width: 0; overflow-wrap: anywhere; }
.submeta { grid-template-columns: minmax(0, 1fr) auto; }
.submeta > * { min-width: 0; }
.submeta label span { min-width: 0; overflow-wrap: anywhere; }

/* Curso: linha de cada etapa. No celular, a primeira linha tem marcar + ações e o título ocupa a linha de baixo. */
.etapa-curso { min-width: 0; }
.etapa-linha { flex-wrap: wrap; min-width: 0; }
.etapa-titulo { flex: 1 1 10rem; }
.etapa-acoes { flex: none; flex-wrap: nowrap; }
.etapa-notas, .etapa-notas label, .etapa-notas textarea, .form textarea, .form input, .form select, .campo-ajuste { min-width: 0; max-width: 100%; }
@media (max-width: 560px) {
  .etapa-check { order: 1; }
  .etapa-acoes { order: 2; margin-left: auto; }
  .etapa-titulo { order: 3; flex: 1 1 100%; }
}

/* Barra de abas inferior no celular: 6 abas dividem a largura (cabem em 320 px) e não cobrem o fim da página. */
@media (max-width: 760px) {
  .nav-links { gap: 0; }
  .nav-links a { flex: 1 1 0; min-width: 0; padding: .35rem .1rem; font-size: .7rem; line-height: 1.15; justify-content: center; }
  main { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom)); }
  body { scroll-padding-bottom: 6rem; }
}
@media (max-width: 380px) {
  .nav-links a { font-size: .62rem; padding-inline: 0; }
  main { padding-inline: 12px; }
  .nav-links .nav-ic svg { width: 24px; height: 24px; }
}

/* Alvos de toque de pelo menos 44 x 44 px em celular e telas de toque. */
@media (max-width: 760px), (pointer: coarse) {
  .btn, .btn.mini, .chip, .tema-btn { min-height: 44px; min-width: 44px; }
  .btn.link, button.link { display: inline-flex; align-items: center; min-height: 44px; padding-block: .3rem; }
  a.voltar { display: inline-flex; align-items: center; min-height: 44px; }
  summary { min-height: 44px; display: flex; align-items: center; }
  select, #main input[type="text"], #main input[type="date"], #main input.num, input.campo { min-height: 44px; }
  input[type="range"] { min-height: 44px; width: 100%; }
  .palavra { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .etapa-titulo { min-height: 44px; }
  .etapa-check { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .tarefa input, .submeta input { width: 24px; height: 24px; }
  .tarefa label, .submeta label { min-height: 44px; }
}

/* Telas largas: o texto corrido não estica demais. */
.titulo-tela p, .grande, .hero p { max-width: 70ch; }

/* Calendário em celular estreito: espaçamento menor entre os dias (links dentro de frases são dispensados do 44 px pela WCAG). */
@media (max-width: 760px), (pointer: coarse) {
  .cal-grade, .cal-grid, .cal-semana { gap: 3px; }
}
@media (max-width: 380px) { .card { padding-inline: .8rem; } }

/* Tablet (761 a 960 px): as 7 abas do topo cabem sem cortar a última. */
@media (min-width: 761px) and (max-width: 960px) {
  .nav-links { gap: 0; margin-inline: -.35rem; }
  .nav-links a { padding-inline: .5rem; gap: .35rem; font-size: .92rem; }
}

/* ---------- Ajuda, guia de primeira vez e rodapé ---------- */
.nav-acoes { grid-column: 3; grid-row: 1; display: flex; align-items: center; gap: .5rem; }
.nav-tema { grid-column: auto; grid-row: auto; }
.nav-ajuda { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; }
.nav-ajuda:hover, .nav-ajuda[aria-current="page"] { background: var(--brand-soft); border-color: var(--brand); }
.nav-ajuda .nav-ic { width: auto; }
.nav-ajuda .nav-ic svg { width: 24px; height: 24px; }
.hero .ajuda-btn { display: none; flex: none; align-items: center; justify-content: center; text-decoration: none; padding: .35rem .5rem; }
@media (max-width: 760px) { .nav-acoes { display: none; } .hero .ajuda-btn { display: inline-flex; } }

.rodape-site { max-width: var(--larg); margin: 0 auto; padding: 1.2rem 16px 2.5rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.rodape-links { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: 0 0 .4rem; }
.rodape-links a { min-height: 32px; display: inline-flex; align-items: center; }
.rodape-aviso { margin: 0; max-width: 70ch; }
body.sem-menu .rodape-site { display: none; }
main { padding-bottom: 2rem; }
@media (min-width: 761px) { .rodape-site { padding-inline: 0; } }
@media (min-width: 761px) and (max-width: 1400px) { .rodape-site { padding-inline: 24px; } }
@media (max-width: 760px) { .rodape-site { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom)); } .rodape-links a { min-height: 44px; } main { padding-bottom: 1.5rem; } }

.guia-inicial { border: 2px solid var(--brand); }
.passos-curtos { padding-left: 1.3rem; margin: .4rem 0 .9rem; display: grid; gap: .35rem; }
.ajuda-atalhos { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.ajuda-atalhos .chip { text-decoration: none; display: inline-flex; align-items: center; }
.passos-guia { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .9rem; }
.passo-guia { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: .8rem; align-items: start; padding: .9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.passo-num { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 800; background: var(--brand); color: var(--brand-ink); }
.passo-txt h3 { margin: 0 0 .2rem; }
.passo-txt p { margin: 0 0 .6rem; color: var(--muted); }
@media (max-width: 560px) { .passo-guia { grid-template-columns: auto minmax(0, 1fr); } .passo-guia > .ico { display: none; } }

.ajuda-conversa { display: grid; gap: .7rem; margin: .8rem 0; max-height: 26rem; overflow-y: auto; padding: .3rem; }
.balao { max-width: min(100%, 46rem); padding: .7rem .9rem; border-radius: 16px; overflow-wrap: anywhere; }
.balao.eu { justify-self: end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; }
.balao.pe { justify-self: start; display: flex; gap: .6rem; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.balao-texto { min-width: 0; }
.balao-texto p { margin: 0 0 .4rem; }
.balao-texto ol, .balao-texto ul { margin: .4rem 0; padding-left: 1.2rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.chips .chip { text-align: left; }
.relacionadas { margin-top: .7rem; }
.ajuda-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.ajuda-form .campo { flex: 1 1 14rem; min-width: 0; }

.faq-grupo { margin: 1rem 0 1.4rem; }
.faq-grupo h3 { margin: 0 0 .5rem; }
.faq-item { margin: .5rem 0; padding: .6rem .9rem; }
.faq-item summary { font-weight: 650; cursor: pointer; }
.faq-resposta { margin-top: .6rem; }
.faq-resposta ol, .faq-resposta ul { padding-left: 1.2rem; }
.glossario { display: grid; grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr); gap: .4rem 1rem; margin: .5rem 0 0; }
.glossario dt { font-weight: 700; }
.glossario dd { margin: 0; color: var(--muted); }
@media (max-width: 560px) { .glossario { grid-template-columns: 1fr; } .glossario dd { margin-bottom: .5rem; } }

/* Blocos recolhíveis (Ajustes avançados e ajuda rápida) e ancoras da página de Ajuda. */
.avancado { margin-top: 1.4rem; padding: .8rem 1rem; }
.avancado > summary, .ajuda-rapida > summary { font-weight: 700; cursor: pointer; }
.avancado .card { box-shadow: none; }
.ajuda-rapida { margin: .8rem 0; padding: .6rem 1rem; }
.ajuda-rapida ol { margin: .6rem 0 .2rem; padding-left: 1.2rem; display: grid; gap: .3rem; }
#guia, #ajuda-assistente, #faq, #glossario, .faq-grupo { scroll-margin-top: 7.5rem; }
.hero .ajuda-btn span:not(.ico) { margin-left: .35rem; font-weight: 650; }

/* ---------- Página de entrada (/entrar) e conta ---------- */
.entrar .card { margin: 1rem 0; }
.aceite { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; margin: .6rem 0 1.2rem; }
.aceite input { width: 24px; height: 24px; flex: none; accent-color: var(--brand); margin-top: .1rem; }
.aceite span { min-width: 0; overflow-wrap: anywhere; }
.ou { text-align: center; color: var(--muted); margin: 1rem 0; }
.turnstile { min-height: 65px; margin: .6rem 0; }
.entrar .btn[disabled] { opacity: .5; cursor: not-allowed; }

.aceite a { white-space: nowrap; }
.entrar .form input[type="email"], .entrar .form input[type="text"] { min-height: 44px; }
.pagina-texto p a, .aceite a { padding-block: .15rem; }
