/* Treino: área do aluno com as questões do Enem. Usa os tokens de base.css. */

/* Cores das áreas nos gráficos: tons das áreas do site, ajustados para linha e ponto sobre o fundo
   (validados: faixa de luminosidade, separação para daltonismo e contraste ≥ 3:1). */
:root { --g-LC: #d9486f; --g-CH: #b98100; --g-CN: #1f9a76; --g-MT: #6a35b0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --g-LC: #e0577e; --g-CH: #b8890f; --g-CN: #26ad84; --g-MT: #9a76e0; } }
:root[data-theme="dark"] { --g-LC: #e0577e; --g-CH: #b8890f; --g-CN: #26ad84; --g-MT: #9a76e0; }

.treino h1 { font-family: var(--serifa); font-size: clamp(26px, 4.6vw, 36px); line-height: 1.12; margin: 10px 0 8px; }
.treino h2 { font-size: 19px; margin: 0 0 4px; }
.treino h3 { margin: 22px 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.treino .botoes { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.t-voltar { margin: 16px 0 0; }
.t-bola { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; flex: none; }
.t-sub { color: var(--muted); margin: 0 0 14px; font-size: 15px; }
.t-vazio { color: var(--muted); background: var(--bg); border: 1.5px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; margin: 8px 0; }

/* painel */
.t-hero { display: flex; gap: 22px; align-items: center; }
.t-hero-txt { flex: 1; min-width: 0; }
.t-hero-txt p { margin: 0; color: var(--muted); }
.t-anel { position: relative; width: 132px; height: 132px; flex: none; }
.t-anel-svg { width: 100%; height: 100%; }
.t-anel-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.t-anel-txt b { font-size: 24px; line-height: 1; }
.t-anel-txt small { font-size: 12px; color: var(--muted); font-weight: 600; max-width: 90px; }
.t-atalhos { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.t-atalho { text-align: left; display: grid; gap: 4px; align-content: start; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; color: var(--text); font: inherit; box-shadow: var(--shadow-sm); }
.t-atalho:hover { border-color: var(--brand); }
.t-atalho b { font-size: 16px; }
.t-atalho span { font-size: 13px; color: var(--muted); }
.t-cob-total { margin: 0 0 14px; }
.t-areas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 22px; }
.t-area-topo { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.t-area-topo small { color: var(--muted); font-weight: 600; }
.t-barra { display: flex; gap: 2px; height: 10px; border-radius: 99px; background: var(--vazio); overflow: hidden; margin: 6px 0 4px; }
.t-barra i { display: block; height: 100%; }
.t-barra i.fei { opacity: .35; }
.t-nota { color: var(--muted); }
.t-meta { display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.t-meta p { margin: 4px 0 0; }
.t-config-curta { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.t-config-curta > div:first-child { display: grid; flex: 1; min-width: 180px; }
.t-config-curta small { color: var(--muted); }

/* ---------- sessão em tela cheia ---------- */
html.t-imersivo, html.t-imersivo body { overflow: hidden; overscroll-behavior: none; }
html.t-imersivo .rodape { display: none; }
html.t-imersivo #treino { position: fixed; top: var(--barra-h, var(--topo-h)); left: 0; right: 0; bottom: 0; max-width: none; margin: 0; padding: 0 12px calc(8px + env(safe-area-inset-bottom)); }
@media (max-width: 860px) { html.t-imersivo .nav { display: none; } html.t-imersivo .barra-in { padding-bottom: 8px; } }

.t-sessao { height: 100%; max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-areas: "topo" "cab" "visor" "resp"; gap: 8px; }
.t-q-topo { grid-area: topo; display: flex; align-items: center; gap: 12px; padding: 8px 0 0; }
.t-prog { flex: 1; height: 8px; border-radius: 99px; background: var(--vazio); overflow: hidden; }
.t-prog i { display: block; height: 100%; background: var(--brand); transition: width .3s; }
.t-cont { font-variant-numeric: tabular-nums; }
.t-cab { grid-area: cab; min-width: 0; }
.t-q-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 14px; color: var(--muted); font-weight: 600; }
.t-chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 99px; border: 1.5px solid var(--line); color: var(--text); font-weight: 700; background: var(--card); }
.t-rev { color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 1px 8px; font-size: 13px; }
.t-visor { grid-area: visor; }
.t-resp { grid-area: resp; min-height: 0; display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px 12px 12px; box-shadow: var(--shadow-sm); }
.t-alts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.t-alt { font: 800 20px/1 "Plus Jakarta Sans", sans-serif; padding: 13px 0; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; transition: transform .08s; }
.t-alt:active { transform: scale(.96); }
.t-alt[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.t-alt.certa { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.t-alt.errada { border-color: var(--err); background: var(--err-soft); color: var(--err); }
.t-alt:disabled { cursor: default; }
.t-acoes { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.t-acoes .btn:only-child { margin-left: auto; }
.t-acoes .btn { white-space: nowrap; flex: none; }
.t-acoes .t-confirmar { margin-left: auto; }
.t-fonte { margin: 0; min-width: 0; }
.t-retorno:empty { display: none; }
.t-retorno { max-height: 32vh; overflow-y: auto; }
.t-retorno p { margin: 0; }
.t-ok b { color: var(--ok); font-size: 17px; }
.t-err b { color: var(--err); font-size: 17px; }
.t-quando { color: var(--muted); font-size: 14px; font-weight: 600; }
.t-info-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.t-info-chip { display: inline-flex; align-items: center; gap: 4px; font: 600 13px/1 inherit; padding: 6px 6px 6px 10px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
.t-info-chip:hover { border-color: var(--brand); }
.t-info-chip i { font-style: normal; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 12px; }
.t-hab-txt, .t-resol { display: none; }
.t-hab-txt { font-size: 14px; margin-top: 10px !important; }
.t-resol { margin-top: 8px !important; }
.t-sim-lado { display: none; }
.t-sim-tit { flex: 1; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.t-relogio { font-variant-numeric: tabular-nums; padding: 4px 10px; border-radius: 8px; background: var(--brand-soft); }
.t-relogio.acabando { background: var(--warn-soft); color: var(--warn); }

/* Tela larga: questão à esquerda, ocupando toda a altura; respostas e explicação ao lado. */
@media (min-width: 1000px) {
  .t-sessao { grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "topo topo" "visor cab" "visor resp"; column-gap: 16px; row-gap: 10px; }
  .t-cab { padding-top: 2px; }
  .t-resp { align-self: start; max-height: 100%; overflow-y: auto; }
  .t-resp .t-alts { order: 1; } .t-resp .t-acoes { order: 2; } .t-resp .t-retorno { order: 3; max-height: none; border-top: 1.5px solid var(--line); padding-top: 10px; }
  .t-resp .t-sim-lado { order: 4; }
  .t-alts { gap: 6px; }
  .t-hab-txt, .t-resol { display: block; }
  .t-sim-lado { display: grid; gap: 8px; border-top: 1.5px solid var(--line); padding-top: 10px; }
  .t-qs { display: none; }
}
@media (max-width: 999px) { .t-fonte { font-size: 12px; } }
@media (max-width: 420px) { .t-fonte { display: none; } .t-alt { padding: 12px 0; font-size: 18px; } .t-q-meta { font-size: 13px; } }

/* visor da questão: pinça, roda com Ctrl e botões */
.tv { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 12px; touch-action: none; user-select: none; -webkit-user-select: none; min-height: 140px; outline: none; }
.tv:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tv.tv-livre { cursor: grab; }
.tv.tv-livre:active { cursor: grabbing; }
.tv-folha { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.tv-folha img { display: block; width: 100%; height: auto; pointer-events: none; }
.tv::before, .tv::after { content: ""; position: absolute; left: 0; right: 0; height: 28px; pointer-events: none; z-index: 1; opacity: 0; transition: opacity .2s; }
.tv::before { top: 0; background: linear-gradient(rgba(0,0,0,.12), transparent); }
.tv::after { bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.14)); }
.tv.tv-cima::before, .tv.tv-baixo::after { opacity: 1; }
.tv-ctrl { position: absolute; right: 8px; bottom: 8px; z-index: 2; display: flex; gap: 2px; padding: 2px; border-radius: 10px; border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 94%, transparent); box-shadow: var(--shadow-sm); }
.tv-ctrl button { min-width: 36px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--text); font: 700 18px/1 "Plus Jakarta Sans", sans-serif; cursor: pointer; }
.tv-ctrl button:hover { background: var(--brand-soft); }
.tv-ctrl .tv-pct { font-size: 12px; min-width: 50px; font-variant-numeric: tabular-nums; }
.tv-dica { position: absolute; left: 8px; bottom: 10px; max-width: calc(100% - 170px); z-index: 2; font-size: 12px; font-weight: 700; background: var(--line-strong); color: var(--bg); padding: 5px 10px; border-radius: 99px; pointer-events: none; opacity: .9; }
.tv-dica:empty { display: none; }
:root[data-theme="dark"] .tv { background: #1b1c20; }
:root[data-theme="dark"] .tv-folha img { filter: invert(.92) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tv { background: #1b1c20; }
  :root:not([data-theme="light"]) .tv-folha img { filter: invert(.92) hue-rotate(180deg); }
}

/* fim, simulado */
.t-fim { text-align: center; }
.t-fim .botoes { justify-content: center; }
.t-fim .compartilhar { justify-content: center; }
.t-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 5px; }
.t-grade button { padding: 7px 0; border-radius: 8px; border: 1.5px solid var(--line); background: var(--card); color: var(--muted); font-weight: 700; cursor: pointer; }
.t-grade button.feita { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.t-grade button.atual { border-color: var(--line-strong); color: var(--text); }
.t-entregar { margin-top: 6px; width: 100%; }
.t-gab { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; text-align: center; }
.t-gab span { display: grid; border-radius: 8px; padding: 4px 0; border: 1.5px solid var(--line); }
.t-gab span.ok { background: var(--ok-soft); border-color: transparent; }
.t-gab span.err { background: var(--err-soft); border-color: transparent; }
.t-gab small { font-size: 11px; color: var(--muted); }
.t-gab s { font-size: 12px; color: var(--err); }
.t-provas { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 14px; }
.t-prova, .t-erro { display: grid; gap: 2px; text-align: left; padding: 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; font: inherit; }
.t-prova:hover, .t-erro:hover { border-color: var(--brand); }
.t-prova span, .t-erro small, .t-prova small { font-size: 13px; color: var(--muted); }
.t-prova small { color: var(--ok); font-weight: 700; }

/* treino livre */
.t-campo { border: 0; padding: 0; margin: 0 0 16px; }
.t-campo legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.t-campo select { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); max-width: 100%; }
.t-hab-sel { margin: 6px 0 0; }
.t-linha { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.t-erros-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }

/* ---------- janela de explicação ---------- */
.t-janela { width: min(580px, 100%); }
.t-janela .gaveta-topo b { font-size: 18px; }
.t-cita { margin: 14px 0 10px; padding: 12px 14px; border-left: 4px solid var(--brand); background: var(--brand-soft); border-radius: 0 10px 10px 0; font-size: 15px; line-height: 1.5; }
.t-comp { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.t-comp small { display: block; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; font-size: 11px; color: var(--text); margin-bottom: 2px; }
.t-dif-topo { margin: 12px 0; }
.t-faixa { display: inline-block; font-weight: 800; padding: 2px 10px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); }
.t-fig { margin: 8px 0 10px; }
.t-fig figcaption { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.t-param { padding-left: 18px; margin: 8px 0; display: grid; gap: 6px; font-size: 14px; }

/* ---------- gráficos ---------- */
.tg { position: relative; width: 100%; }
.tg svg { display: block; overflow: visible; touch-action: pan-y; }
.tg-linha { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tg-ponto { stroke: var(--card); stroke-width: 2; }
.tg-ponto.peq { stroke-width: 1.5; }
.tg-ref { stroke: var(--text); stroke-width: 1; opacity: .5; }
.tg-ref-txt { font-weight: 700; }
.tg-realce { fill: var(--line); opacity: .55; }
.tg-tip { min-width: 0; }
.tg-tip-l { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.tg-tip-l i { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1.5px var(--bg); }
.tg-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.tg-leg span { display: inline-flex; align-items: center; gap: 6px; }
.tg-leg i { width: 14px; height: 4px; border-radius: 2px; }
.t-tab { margin-top: 8px; font-size: 14px; }
.t-tab summary { cursor: pointer; color: var(--muted); font-weight: 700; font-size: 13px; }
.t-tab table { font-variant-numeric: tabular-nums; }

/* ---------- evolução ---------- */
.t-dash-topo { margin: 6px 0 14px; }
.t-dash-topo h1 { margin-bottom: 2px; }
.t-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.t-kpi { display: grid; gap: 2px; align-content: start; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.t-kpi small { font-size: 13px; font-weight: 700; color: var(--muted); }
.t-kpi b { font-size: 30px; line-height: 1.15; font-weight: 700; }
.t-kpi span { font-size: 13px; color: var(--muted); }
.t-kpis.mini-k { grid-template-columns: repeat(2, 1fr); margin: 12px 0 4px; }
.t-kpis.mini-k .t-kpi { box-shadow: none; background: var(--bg); padding: 10px 12px; }
.t-kpis.mini-k b { font-size: 24px; }
.t-sec { margin-bottom: 18px; }
.t-notas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 14px; }
.t-nota-area { display: grid; gap: 1px; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.t-nota-area small { font-weight: 700; color: var(--muted); font-size: 13px; display: flex; align-items: center; }
.t-nota-area b { font-size: 26px; line-height: 1.2; }
.t-nota-area span { font-size: 12px; color: var(--muted); }

.t-calor { display: grid; gap: 4px; align-items: center; }
.t-calor-dif { grid-template-columns: 120px repeat(3, minmax(0, 1fr)); max-width: 560px; }
.t-calor-anos { grid-template-columns: 110px repeat(var(--n), minmax(26px, 1fr)); min-width: 560px; }
.t-calor-cab { font-size: 12px; color: var(--muted); text-align: center; }
.t-calor-lin { font-size: 14px; display: flex; align-items: center; }
.t-cel { --p: 0; display: grid; place-items: center; min-height: 32px; border-radius: 6px; background: var(--vazio); font: 700 12px/1 "Plus Jakarta Sans", sans-serif; color: var(--muted); border: 0; padding: 0; font-variant-numeric: tabular-nums; }
.t-cel.tem { background: color-mix(in srgb, var(--map-4) calc(var(--p) * 100%), var(--map-0)); color: var(--text); }
.t-cel.alto { color: #fff; }
:root[data-theme="dark"] .t-cel.alto { color: #121316; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .t-cel.alto { color: #121316; } }
button.t-cel { cursor: pointer; }
button.t-cel:hover, button.t-cel:focus-visible { outline: 2px solid var(--line-strong); outline-offset: 1px; }
.t-calor-leg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; color: var(--muted); font-weight: 600; margin: 10px 0 0; }
.t-calor-leg > .t-cel { width: 16px; min-height: 16px; border-radius: 4px; }
.t-escala { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.t-escala i { width: 110px; height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--map-0), var(--map-4)); }
.t-mapa-h { display: grid; gap: 8px; }
.t-mapa-lin { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; }
.t-mapa-lin > b { font-size: 14px; display: flex; align-items: center; }
.t-mapa-cels { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; }
.t-mapa-cels .t-cel { min-height: 28px; font-size: 10px; }
.t-fracas { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.t-fracas li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; }
.t-fraca-txt { display: grid; gap: 2px; min-width: 0; }
.t-fraca-txt b { display: flex; align-items: center; font-size: 14px; }
.t-fraca-txt span { font-size: 13px; color: var(--muted); }
.t-fraca-num { display: grid; text-align: right; }
.t-fraca-num b { font-size: 18px; }
.t-fraca-num small { font-size: 12px; color: var(--muted); }

/* ---------- guia ---------- */
.t-faixas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.t-faixa-box { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border-top: 4px solid var(--map-2); }
.t-faixa-box.media { border-top-color: var(--map-3); }
.t-faixa-box.dificil { border-top-color: var(--map-4); }
.t-faixa-box b { font-size: 17px; }
.t-faixa-box span { font-size: 14px; }
.t-faixa-box small { font-size: 12px; color: var(--muted); }
.t-guia-habs { display: grid; gap: 8px; margin-top: 12px; }
.t-comp-bloco { border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; }
.t-comp-bloco summary { cursor: pointer; padding: 12px 0; display: grid; gap: 2px; list-style: none; }
.t-comp-bloco summary::-webkit-details-marker { display: none; }
.t-comp-bloco summary b { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--brand); }
.t-comp-bloco summary span { font-size: 14px; }
.t-comp-bloco ul { list-style: none; padding: 0 0 12px; margin: 0; display: grid; gap: 6px; }
.t-comp-bloco li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.t-h { font-size: 14px; }
.t-h-txt { font-size: 14px; }
.t-h-num { display: grid; text-align: right; }
.t-h-num small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.t-linha-tempo { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; counter-reset: passo; }
.t-linha-tempo li { text-align: center; padding: 10px 4px; border-radius: 10px; background: var(--brand-soft); font-size: 14px; }
.t-linha-tempo li.dom { background: var(--ok-soft); }

@media (max-width: 760px) {
  .t-hero { flex-direction: column-reverse; align-items: flex-start; }
  .t-anel { width: 110px; height: 110px; }
  .t-atalhos { grid-template-columns: repeat(2, 1fr); }
  .t-areas { grid-template-columns: 1fr; }
  .t-meta { flex-direction: column; align-items: flex-start; }
  .t-notas { grid-template-columns: repeat(2, 1fr); }
  .t-kpis { grid-template-columns: repeat(2, 1fr); }
  .t-kpi b { font-size: 24px; }
  .t-mapa-lin { grid-template-columns: 1fr; gap: 4px; }
  .t-mapa-cels { grid-template-columns: repeat(15, minmax(0, 1fr)); }
  .t-calor-dif { grid-template-columns: 96px repeat(3, minmax(0, 1fr)); }
  .t-faixas { grid-template-columns: 1fr; }
  .t-fracas li { grid-template-columns: minmax(0, 1fr) auto; }
  .t-fracas li .btn { grid-column: 1 / -1; justify-self: start; }
  .t-comp-bloco li { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .t-comp-bloco li .btn { grid-column: 2 / -1; justify-self: start; }
  .t-linha-tempo { grid-template-columns: repeat(3, 1fr); }
}
.t-sec table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.t-sec th, .t-sec td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t-sec th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }

/* o que treinar: área e matéria */
.t-foco-topo { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.t-foco-topo small { color: var(--muted); font-weight: 600; }
.t-foco-abas { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg); }
.t-foco-aba { flex: 1 1 auto; display: inline-flex; white-space: nowrap; align-items: center; justify-content: center; padding: 10px 6px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: 700 15px/1.1 "Plus Jakarta Sans", sans-serif; cursor: pointer; }
.t-foco-aba:hover { color: var(--text); }
.t-foco-aba[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }
.t-foco-mats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-top: 12px; }
.t-mat { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; font: inherit; }
.t-mat:hover { border-color: var(--brand); }
.t-mat[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.t-mat b { font-size: 15px; }
.t-mat small { font-size: 12px; color: var(--muted); font-weight: 600; }
.t-foco .mini { margin: 10px 0 0; }
.t-mats-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 28px; }
.t-mats-area h3 { display: flex; align-items: center; margin: 12px 0 6px; }
.t-mat-lin { display: grid; grid-template-columns: minmax(0, 150px) minmax(60px, 1fr) 42px 64px auto; gap: 10px; align-items: center; padding: 4px 0; font-size: 14px; }
.t-mat-nome { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-mat-barra { height: 8px; border-radius: 99px; background: var(--vazio); overflow: hidden; }
.t-mat-barra i { display: block; height: 100%; border-radius: 99px; }
.t-mat-pct { text-align: right; font-variant-numeric: tabular-nums; }
.t-mat-n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
@media (max-width: 760px) {
  .t-foco-aba { font-size: 14px; padding: 9px 10px; }
  .t-foco-mats { grid-template-columns: repeat(2, 1fr); }
  .t-mats-grade { grid-template-columns: 1fr; }
  .t-mat-lin { grid-template-columns: minmax(0, 1fr) 70px 38px auto; }
  .t-mat-n { display: none; }
}
