/* Acabamento interno · setembro 2026.
   Conserva a composição publicada: missão, formatos, percurso e salas.
   Carregado depois das folhas de cada tela, apenas na área de estudo. */
:root {
  --app-refine-canvas: #f6f7fb;
  --app-refine-shadow: 0 2px 4px rgba(29, 39, 70, .035), 0 10px 28px -20px rgba(29, 39, 70, .18);
  --app-refine-press: 0 3px 0 #8fca39, 0 5px 10px -7px rgba(63, 91, 26, .25);
  --app-refine-focus: #586ee8;
  --app-refine-duration: 160ms;
}

/* Uma superfície branca continua branca; o fundo faz a separação. */
body.app-body { background: var(--app-refine-canvas); }
.app-body :is(.ep-page-head, .hm-id, .ev-head, .cs-head, .pf-head) h1 {
  line-height: 1.12;
  letter-spacing: -.038em;
}
.app-body :is(.ep-page-head, .hm-id, .ev-head, .cs-head, .pf-head) p { line-height: 1.6; }
.app-body :is(.ep-eyebrow, .ep-focus-kicker, .th-trilha-estado, .th-history-link small) {
  font-size: .6875rem;
  letter-spacing: .085em;
  line-height: 1.5;
}
.app-body :is(button, a, input, textarea, select, summary):focus-visible,
html.esp-corrigir2 :is(button, a, input, textarea, select, summary):focus-visible {
  outline: 3px solid var(--app-refine-focus);
  outline-offset: 3px;
}
.app-body :is(input, textarea, select),
html.esp-corrigir2 :is(input, textarea, select) {
  transition: border-color var(--app-refine-duration) ease, box-shadow var(--app-refine-duration) ease;
}

/* Hoje: preserva a missão azul e o ciclo ao lado. */
.ep-home .ep-focus.ep-mission {
  box-shadow: none;
}
.ep-home .ep-mission > :is(.hm-mission-main, .hm-mission-cycle) {
  box-shadow: 0 3px 6px rgba(29, 39, 70, .08), 0 18px 34px -26px rgba(29, 39, 70, .42);
}
.ep-home .ep-mission h2 { line-height: 1.12; letter-spacing: -.035em; }
.ep-home .ep-mission .ep-focus-meta { color: #bdc7e0; line-height: 1.6; }
.ep-home .ep-mission .ep-focus-reason { color: #d5ddef; line-height: 1.65; }
.ep-home .hm-mission-cycle > span { color: #afbad4; font-size: .6875rem; }
.ep-home .hm-mission-cycle small { color: #b6c0d9; line-height: 1.5; }
.ep-home .hm-mission-cycle .hm-cycle-depois { opacity: 1; }
.ep-home .hm-mission-cycle .hm-cycle-feito b { color: #c1cbe1; }
.ep-home .hm-support small { font-size: .6875rem; }

/* Treinar: o caso segue primeiro e os formatos continuam no mesmo rodapé. */
.th-body .th-page-head h1 { line-height: 1.12; letter-spacing: -.038em; }
.th-practice-stage {
  background: var(--app-paper);
  border-color: var(--app-line);
  box-shadow: var(--app-refine-shadow);
}
.th-recommend {
  background: linear-gradient(100deg, var(--app-primary-soft), var(--app-paper) 40%);
}
.th-recommend-copy { padding-block: 40px; }
.th-recommend .ep-focus h2,
.th-recommend h2 {
  font-size: clamp(32px, 3.65vw, 46px);
  line-height: 1.13;
  letter-spacing: -.035em;
}
.th-recommend .ep-focus-kicker { font-size: .6875rem; letter-spacing: .09em; }
.th-recommend .ep-focus-meta { color: var(--app-muted-reading); font-size: .8125rem; line-height: 1.65; }
.th-recommend .ep-focus-reason { color: var(--app-ink-soft); line-height: 1.65; }
.th-recommend-rail { border-right-color: var(--app-border-base); }
.th-alternatives { background: var(--app-paper-soft); }
.th-alternatives > span { color: var(--app-muted-reading); font-size: .625rem; line-height: 1.5; }
.th-page .th-alternatives .th-mode-copy b { line-height: 1.4; }
.th-page .th-alternatives .th-mode-copy > span { line-height: 1.5; }
.th-page .th-alternatives .th-mode {
  transition: color var(--app-refine-duration) ease, background-color var(--app-refine-duration) ease;
}
.th-page .th-alternatives .th-mode:hover { background: var(--app-primary-soft); }
.th-page .th-alternatives .th-mode:focus-visible { outline-offset: -4px; }
.th-trilha-corpo .th-trilha-estado { font-size: .6875rem; color: var(--app-muted-reading); }
.th-trilha-corpo b { line-height: 1.5; }
.th-trilha-corpo small { line-height: 1.6; }
.th-trilha-item--feito > a,
.th-trilha-item--aberto > a { opacity: 1; }
.th-trilha-item--aberto .th-trilha-corpo b { color: var(--app-ink-soft); }
.th-trilha-item--feito .th-trilha-corpo b { color: var(--app-muted-reading); }
.th-trilha-item--agora > a { box-shadow: none; }
.th-trilha-item--agora .th-trilha-corpo b { line-height: 1.45; }
.th-trilha-item--agora .th-trilha-corpo .th-trilha-estado { color: var(--app-primary-strong); }
.th-review { background: var(--app-paper); box-shadow: var(--app-refine-shadow); }
.th-review .ep-section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
.th-review .ep-section-head > div { display: contents; }
.th-review .ep-section-head .ep-eyebrow { grid-column: 1 / -1; }
.th-review .ep-section-head h2 { line-height: 1.25; letter-spacing: -.025em; }
.th-review .ep-section-head h2 { grid-row: 2; align-self: center; }
.th-review .ep-section-head > div > span:last-child { grid-column: 1 / -1; grid-row: 3; margin: 0; line-height: 1.5; }
.th-review .ep-section-head > a { grid-column: 2; grid-row: 2; font-size: .75rem; min-height: 44px; white-space: normal; }
.th-review-next-reason { line-height: 1.6; }
.th-history-link small { font-size: .6875rem; }

/* O placeholder ocupa a mesma composição do caso, antes de haver dados. */
.th-load-grid { grid-template-columns: minmax(0, 1fr); width: min(1080px, 100%); }
.th-load-main { gap: 0; overflow: hidden; border: 1px solid var(--app-line); border-radius: 24px; }
.th-load-card.th-load-recommend { min-height: 390px; padding: 44px 54px 44px 116px; border: 0; border-radius: 0; }
.th-load-main .th-load-modes { min-height: 86px; border: 0; border-top: 1px solid var(--app-line); border-radius: 0; }
.th-load-main .th-load-modes > div { min-height: 86px; }
.th-load-grid > .th-load-review { margin-top: 32px; min-height: 180px; }

/* Ação principal: mesma cor e uma pequena resposta tátil em todas as salas. */
.ep-home .ep-mission .ep-primary,
.th-recommend .ep-primary,
.egc-control.is-primary,
.egc-review-actions .egc-review-complete,
.c2-journey-controls button:last-child {
  border: 1px solid #a1da47;
  border-radius: var(--app-radius-control);
  background: var(--app-action);
  color: #253517;
  box-shadow: var(--app-refine-press);
  transition: background-color var(--app-refine-duration) ease, box-shadow var(--app-refine-duration) ease, transform var(--app-refine-duration) ease;
}
@media (hover: hover) {
  .ep-home .ep-mission .ep-primary:hover,
  .th-recommend .ep-primary:hover,
  .egc-control.is-primary:hover:not(:disabled),
  .egc-review-actions .egc-review-complete:hover:not(:disabled),
  .c2-journey-controls button:last-child:hover:not(:disabled) {
    background: #b9ef66;
    box-shadow: var(--app-refine-press);
    transform: translateY(-1px);
  }
}
.ep-home .ep-mission .ep-primary:active,
.th-recommend .ep-primary:active,
.egc-control.is-primary:active:not(:disabled),
.egc-review-actions .egc-review-complete:active:not(:disabled),
.c2-journey-controls button:last-child:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #8fca39;
}

/* Sala de treino: texto, envio e apoio conservam suas posições. */
html.esp-corrigir2.esp-app-chrome .c2-workspace-head strong { line-height: 1.14; letter-spacing: -.035em; }
html.esp-corrigir2.esp-app-chrome .c2-workspace-head small { line-height: 1.65; }
html.esp-corrigir2.esp-app-chrome .c2-session-rail { box-shadow: var(--app-refine-shadow); }
html.esp-corrigir2.esp-app-chrome .esp-ta { line-height: 1.8; }
html.esp-corrigir2.esp-app-chrome :is(.esp-drop, .c2-optional-material) { box-shadow: none; }
html.esp-corrigir2.esp-app-chrome .esp-drop {
  border-color: var(--app-line-strong);
  background: var(--app-paper-soft);
  transition: background-color var(--app-refine-duration) ease, border-color var(--app-refine-duration) ease;
}
html.esp-corrigir2.esp-app-chrome .esp-drop:hover { background: var(--app-primary-soft); border-color: var(--app-primary); }

/* Cinco etapas existentes: seleção azul, leitura e confirmação no mesmo lugar. */
.c2-result-journey { box-shadow: var(--app-refine-shadow); }
.c2-journey-steps button { transition: color 160ms ease, background-color 160ms ease; }
.c2-journey-steps button:hover { background: var(--app-paper-soft); }
.c2-journey-steps button.is-active { background: var(--app-primary-soft); }
.c2-journey-steps button.is-active span { background: var(--app-primary); border-color: var(--app-primary); color: #fff; }
html.esp-corrigir2.esp-corrigir-page .c2-journey-head h2 { line-height: 1.2; letter-spacing: -.03em; }
html.esp-corrigir2.esp-corrigir-page .c2-journey-panel :is(h2, h3) { letter-spacing: -.03em; line-height: 1.2; }
html.esp-corrigir2 .c2-full-correction .c2-criterion-tab.is-active {
  border-color: var(--app-primary);
  background: var(--app-primary-soft);
  box-shadow: inset 3px 0 var(--app-primary);
}
html.esp-corrigir2 .c2-full-correction .c2-criterion-panel { line-height: 1.7; }

/* Reescrita: a cor do critério ativo reaparece no trecho, com o papel limpo. */
.egc-stage { border-color: var(--app-line); box-shadow: var(--app-refine-shadow); }
.egc-source { background: var(--app-paper); border-right-color: var(--app-line); }
.egc-source-head { background: var(--app-paper-soft); padding: 20px 24px; }
.egc-source-body { padding: 26px; color: var(--app-ink-soft); font-size: .9375rem; line-height: 1.9; }
.egc-source-body mark {
  border-bottom: 2px solid var(--app-primary);
  border-radius: 2px;
  background: var(--app-primary-soft);
  color: var(--app-ink);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.egc-coach { padding: 26px; background: var(--app-paper-soft); }
.egc-criterion-title { color: var(--app-primary-strong); line-height: 1.3; }
.egc-reading-section { background: transparent; padding: 4px 0 4px 14px; border-left-color: var(--app-line-strong); }
.egc-reading-section.is-guidance { background: transparent; border-left-color: #b7d883; }
.egc-reading-section p { color: var(--app-ink-soft); line-height: 1.65; }
.egc-reading-section > span { font-size: .6875rem; letter-spacing: .07em; line-height: 1.5; }
.egc-textarea { background: var(--app-paper); line-height: 1.75; border-color: var(--app-line-strong); }
.egc-textarea:focus { border-color: var(--app-primary); box-shadow: 0 0 0 3px var(--app-primary-soft); }
html.esp-corrigir2 .egc-textarea:focus-visible { outline: 2px solid var(--app-primary); outline-offset: 2px; box-shadow: none; }
.egc-step { transition: background-color 160ms ease, border-color 160ms ease; }
.egc-step.is-active { background: var(--app-primary-soft); border-color: var(--app-primary); box-shadow: none; }
.egc-step.is-active strong { color: var(--app-primary-strong); }
.egc-step small { font-size: .6875rem; color: var(--app-muted-reading); }
.egc-progress-track { height: 6px; background: var(--app-border-base); }
.egc-progress-fill { background: var(--app-primary); }
.egc-field-meta { min-height: 32px; color: var(--app-muted-reading); line-height: 1.5; }
.egc-char-count { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.egc-save-status { display: inline-flex; align-items: flex-start; gap: 7px; }
.egc-save-status[data-state="saved"]::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 4px;
  border: 1.5px solid var(--app-success);
  transform: rotate(45deg);
}
.egc-save-status.is-confirmed { color: var(--app-state-positive); }
.egc-save-status.is-confirmed::before { animation: app-saved 320ms ease-out; background: var(--app-success-soft); }

/* Arquivo enviado não traz uma transcrição integral para o navegador. Nesse modo,
   o trecho realmente localizado ganha uma faixa própria e evita uma coluna vazia
   fingindo conter a peça inteira. */
.egc-workbench.is-evidence-only .egc-stage {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}
.egc-workbench.is-evidence-only .egc-source {
  grid-template-rows: auto auto;
  border-right: 0;
  border-bottom: 1px solid var(--app-line);
  background: var(--app-paper);
}
.egc-workbench.is-evidence-only .egc-source-body {
  max-height: none;
  padding: 22px 26px;
  overflow: visible;
  white-space: normal;
}
.egc-workbench.is-evidence-only .egc-source-body blockquote {
  max-width: 76ch;
  background: var(--app-primary-soft);
}

/* O roteiro e o próximo treino são decisões diferentes. O espaço deixa o CTA
   encerrar a primeira antes de o cartão seguinte começar. */
html.esp-corrigir2 .c2-journey-panel.is-5 > .c2-guided-workbench + .c2-continuity {
  margin-top: 34px;
}

/* Textos extensos da rubrica continuam completos, agora com ritmo de checklist. */
html.esp-corrigir2 .c2-panel-reading .c2-reading-copy {
  display: grid;
  gap: 10px;
}
html.esp-corrigir2 .c2-panel-reading .c2-reading-copy p { margin: 0; }
html.esp-corrigir2 .c2-panel-reading .c2-reading-copy ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--app-ink-soft);
  font-size: var(--esp-type-support, .875rem);
  line-height: 1.55;
}
html.esp-corrigir2 .c2-panel-reading .is-evidence .c2-reading-copy {
  padding-left: 12px;
  border-left: 3px solid #8da0e7;
}
html.esp-corrigir2 .c2-panel-reading .is-evidence .c2-reading-copy p {
  padding-left: 0;
  border-left: 0;
}
html.esp-corrigir2 .c2-panel-reading .is-action .c2-reading-copy :is(p, li) {
  color: #344159;
  font-weight: 650;
}
@keyframes app-saved {
  0% { transform: rotate(45deg) scale(.5); }
  60% { transform: rotate(45deg) scale(1.3); }
  100% { transform: rotate(45deg) scale(1); }
}

/* Dados e acervo: bordas discretas, marcas nítidas e texto útil legível. */
.app-body :is(.ev-summary, .cs-case, .pf-form, .cv-head) { box-shadow: var(--app-refine-shadow); }
.ev-page .ev-summary { border-color: var(--app-line); }
.ev-page :is(.ev-summary-stats, .ev-chart, .ev-score-reference) { font-variant-numeric: tabular-nums; }
.ev-page svg :is(path, line, polyline) { vector-effect: non-scaling-stroke; }
.ev-page .ma-spark { display: block; max-width: 100%; height: auto; }
.ev-page .ev-progress-bar { background: #c1caf0; border-radius: 5px 5px 1px 1px; }
.ev-page .ev-progress-bar.is-last { background: var(--app-primary); box-shadow: none; }
.ev-page .ev-progress-bar > b { color: var(--app-primary-strong); }
.ev-page :is(.ev-summary-copy, .ev-coach) h2 { line-height: 1.25; letter-spacing: -.028em; }
.ev-page .ev-summary-stat span { line-height: 1.5; color: var(--app-muted-reading); }
.ev-page :is(.ev-tabs button, .ev-filter) { transition: color 160ms ease, background-color 160ms ease; }
.cs-case h3 { line-height: 1.4; letter-spacing: -.022em; }
.cs-case p { line-height: 1.6; }
.cs-case { transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease; }
.cs-case:hover { border-color: var(--app-primary); box-shadow: var(--app-refine-shadow); }
.cv :is(.cv-head-titulo, h2, h3) { line-height: 1.3; }
.cv :is(.cv-evidencia, .cv-esperado) { line-height: 1.75; }
.pf-page :is(input, select) { border-color: var(--app-line-strong); background: var(--app-paper); }
.pf-page .pf-form-head h2 { line-height: 1.3; }

/* Simulado: o relógio e a configuração mantêm o foco da sala. */
#view-simulados .sim-stage { box-shadow: var(--app-refine-shadow); }
#view-simulados .sim-stage h2 { line-height: 1.12; letter-spacing: -.035em; }
#view-simulados .sim-stage-copy > p { line-height: 1.65; }
#view-simulados .sim-clock b { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
#view-simulados :is(.sim-primary-button, .sim-area-select) { border-radius: var(--app-radius-control); }
#view-simulados .sim-area-plan { background: var(--app-paper); border-color: var(--app-line-strong); }
#view-simulados .sim-launch-actions > a { color: var(--app-primary-strong); font-size: .8125rem; font-weight: 600; }
#view-simulados .sim-primary-button:not(:disabled),
.pf-page .pf-save:not(:disabled) {
  background: var(--app-action);
  color: #253517;
  box-shadow: var(--app-refine-press);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}
#view-simulados .sim-primary-button:active:not(:disabled),
.pf-page .pf-save:active:not(:disabled) { box-shadow: 0 1px 0 #8fca39; }

@media (max-width: 820px) {
  /* O avatar tem espaço reservado, inclusive com saudações e nomes longos. */
  .app-main:has(> .app-mobile-account) { padding-top: max(72px, calc(58px + env(safe-area-inset-top))); }
  .app-main .app-mobile-account { top: max(14px, env(safe-area-inset-top)); }
  .ep-home .hm-id h1 { padding-right: 0; line-height: 1.15; letter-spacing: -.035em; }
  .app-mobile-account + #view-inicio .ep-page-head,
  .app-mobile-account + #view-inicio .app-hoje { padding-right: 0; }
  .app-shell .app-streak-trigger { box-shadow: 0 2px 8px rgba(29, 39, 70, .09); background: var(--app-paper); }
  .app-shell > .app-streak-dock { transition: opacity 140ms ease, visibility 140ms ease; }
  .app-shell.is-writing > .app-streak-dock { opacity: 0; visibility: hidden; pointer-events: none; }
  .app-shell > .app-bottombar { box-shadow: 0 -2px 12px rgba(29, 39, 70, .045); }
  .egc-source-body { padding: 22px; font-size: .9375rem; }
  .egc-coach { padding: 22px; }
  .egc-textarea { font-size: 1rem; }
}
@media (max-width: 760px) {
  .th-recommend-copy { padding: 20px 21px 27px; }
  .th-recommend .ep-focus h2,
  .th-recommend h2 { font-size: clamp(28px, 8vw, 36px); line-height: 1.16; }
  .th-recommend .ep-focus-reason { font-size: .8125rem; }
  .th-load-card.th-load-recommend { min-height: 395px; padding: 32px 22px; }
  .th-load-main .th-load-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .th-load-main .th-load-modes > div { padding: 12px; min-height: 102px; }
  .th-load-main .th-load-modes > div + div { border-top: 0; border-left: 1px solid var(--app-line); }
  .th-load-modes .th-placeholder--icon { display: none; }
  .th-page .th-alternatives .th-mode-copy b { font-size: .75rem; }
  .ep-home .hm-mission-cycle small { font-size: .75rem; }
  .ep-home .ep-mission h2 { line-height: 1.16; }
  #view-simulados .sim-clock span { color: #b5c0d9; font-size: .6875rem; }
  #view-simulados .sim-launch-copy > span { font-size: .6875rem; }
  #view-simulados .sim-action-note { font-size: .75rem; line-height: 1.6; }
  #view-simulados .sim-rules b { font-size: .75rem; }
  #view-simulados .sim-rules > div > span:last-child { font-size: .75rem; line-height: 1.5; }
  .egc-controls { flex-wrap: wrap; }
  .egc-control { min-height: 44px; }
  .egc-field-meta { flex-wrap: wrap; gap: 4px 12px; }
  .egc-source-head { padding: 18px 22px; }
  .c2-result-journey .c2-journey-steps button b { font-size: .6875rem; }
}
@media (prefers-reduced-motion: reduce) {
  .app-body *, html.esp-corrigir2 * { scroll-behavior: auto; }
  .egc-save-status.is-confirmed::before { animation: none; }
  .egc-progress-fill,
  .egc-step,
  .c2-journey-steps button,
  .app-shell > .app-streak-dock,
  .ep-home .ep-mission .ep-primary,
  .th-recommend .ep-primary,
  .egc-control.is-primary,
  .egc-review-actions .egc-review-complete,
  .c2-journey-controls button:last-child { transition: none; }
  .ep-home .ep-mission .ep-primary:is(:hover, :active),
  .th-recommend .ep-primary:is(:hover, :active),
  .egc-control.is-primary:is(:hover, :active),
  .egc-review-actions .egc-review-complete:is(:hover, :active),
  .c2-journey-controls button:last-child:is(:hover, :active) { transform: none; }
}
