﻿/* ════════════════════════════════════════════════════════════════════════════
   APP SHELL — a casa do aluno logado. Densidade de app, não de site.
   Usa os tokens de design-system.css. Uma língua visual só.
════════════════════════════════════════════════════════════════════════════ */

/* ── Base do app (P9): o app não carrega mais o styles.css de marketing (155 KB),
   então replica aqui o reset e a tipografia-base que vinham de lá. São exatamente as
   mesmas regras — reset zerado, fonte Inter herdada, botão/link/imagem normalizados.
   Só afeta as páginas logadas (só elas carregam app.css). ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
/* LOAD-BEARING: o app controla estado pela propriedade .hidden (app.js e minha-area.js
   fazem el.hidden = true/false). As classes app- e ma- definem display, que venceria o
   hidden padrao do navegador — por isso o !important. Sem esta regra, os estados (loading,
   gate, dashboard) aparecem todos empilhados. Vinha do styles.css (P9).
   NAO usar sequencia de asterisco-barra aqui dentro: fecha o comentario e quebra a regra. */
[hidden] { display: none !important; }

.app-body { background: var(--bg-warm); color: var(--preto); }

/* ── Passo 4: acento de marca = ROXO sóbrio (não azul saturado) ──
   O app usava --info (azul) como acento (nav ativa, avatar, foco, spinner, links
   de painel). Remapeia num lugar só, no escopo do app: todos viram roxo do DS,
   coerente com a landing. --info fica disponível caso precise de azul informativo. */
.app-body { --info: var(--accent); --info-soft: var(--accent-soft); }

/* ── Layout base ──
   O shell em si (sidebar, nav, bloco de conta, barra inferior e o offset do
   .app-main) mudou-se para shell.css — fonte única, par do shell.js, carregada
   também pela sala de treino (/corrigir), que não pode herdar este arquivo
   inteiro. Toda página com .app-shell precisa linkar shell.css ANTES do app.css. */
.app-view { max-width: 920px; margin: 0 auto; }
.app-view[hidden] { display: none; }

/* ══════════════════════ HOME "SUA PREPARAÇÃO" ══════════════════════ */
.app-greet { margin-bottom: 26px; }
.app-greet h1 { font-size: var(--esp-type-heading); font-weight: var(--esp-weight-bold); letter-spacing: -0.02em; color: var(--preto); }
.app-greet p { color: var(--cinza-texto); margin-top: 6px; font-size: var(--esp-type-body); }
.app-greet b { color: var(--info); }

/* Card da tarefa de hoje — o empurrão do dia */
.app-task {
  background: linear-gradient(135deg, var(--preto), #4a4a52); color: #fff;
  border-radius: var(--radius-xl); padding: 30px 32px; margin-bottom: 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.app-task-copy { flex: 1; min-width: 260px; }
.app-task-kicker { font-family: var(--esp-micro, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: var(--esp-type-caption); font-weight: var(--esp-weight-bold); color: var(--surface-dark-soft); }
.app-task-title { font-size: var(--esp-type-heading); font-weight: var(--esp-weight-bold); margin: 8px 0 8px; letter-spacing: -0.01em; }
.app-task-desc { color: #d3d7e0; line-height: 1.55; font-size: var(--esp-type-body); max-width: 52ch; }
.app-task-cta {
  display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--preto);
  font-weight: var(--esp-weight-bold); padding: 15px 26px; border-radius: var(--radius-pill); white-space: nowrap;
  text-decoration: none; transition: transform var(--t-fast), box-shadow var(--t-med);
}
.app-task-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -6px rgba(29,39,70,.10); }

/* ── A sessão em si ── */
.app-drill { max-width: 680px; margin: 0 auto; }
.app-drill-load { text-align: center; color: var(--cinza-texto); padding: 60px 0; }
.app-drill-retry { background: none; border: none; color: var(--info); font-weight: var(--esp-weight-bold); text-decoration: underline; }
.app-drill-top { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.app-drill-progress { flex: 1; height: 6px; background: var(--bg2); border-radius: 999px; overflow: hidden; }
.app-drill-progress-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width var(--dur-3) var(--ease); }
.app-drill-count { font-size: var(--esp-type-support); font-weight: var(--esp-weight-bold); color: var(--cinza-texto); font-variant-numeric: tabular-nums; }
.app-drill-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.app-drill-tag {
  font-size: var(--esp-type-caption); font-weight: var(--esp-weight-bold);
  background: var(--accent-soft); color: var(--accent-strong); padding: 4px 10px; border-radius: 999px;
}
.app-drill-tag.muted { background: var(--bg2); color: var(--cinza-texto); }
.app-drill-caso {
  background: var(--surface); border: 1px solid var(--borda); border-radius: var(--radius-md);
  padding: 16px 18px; color: #3a3a42; line-height: 1.6; font-size: var(--esp-type-body);
}
.app-drill-pergunta { font-size: var(--esp-type-subhead); font-weight: var(--esp-weight-bold); color: var(--preto); margin: 20px 0 14px; letter-spacing: -0.01em; }
.app-drill-opcoes { display: flex; flex-direction: column; gap: 10px; }
.app-drill-opcao {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  background: var(--surface); border: 1.5px solid var(--borda); border-radius: var(--radius-md);
  padding: 14px 16px; font-size: var(--esp-type-body); color: var(--preto); font-weight: var(--esp-weight-medium);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.app-drill-opcao:hover:not(:disabled) { border-color: var(--accent); transform: translateX(2px); }
.app-drill-opcao:disabled { cursor: default; }
.app-drill-letra {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; display: grid; place-items: center;
  background: var(--bg2); color: var(--cinza-texto); font-weight: var(--esp-weight-bold); font-size: var(--esp-type-support);
}
.app-drill-opcao.aguardando { opacity: .6; }
.app-drill-opcao.certa { border-color: var(--success); background: var(--success-soft); }
.app-drill-opcao.certa .app-drill-letra { background: var(--success); color: #fff; }
.app-drill-opcao.errada { border-color: var(--danger); background: var(--danger-soft); }
.app-drill-opcao.errada .app-drill-letra { background: var(--danger); color: #fff; }

.app-drill-feedback-slot { min-height: 0; }
.app-drill-fb {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 20px;
  margin-top: 18px; padding: 18px 20px; border-radius: var(--radius-md);
  border: 1px solid var(--borda); background: var(--surface);
  animation: drillfb var(--dur-3) var(--ease-out);
}
@keyframes drillfb { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.app-drill-fb.ok { border-color: var(--success); }
.app-drill-fb.no { border-color: var(--danger); }
.app-drill-fb strong { display: block; font-size: var(--esp-type-body); font-weight: var(--esp-weight-bold); margin-bottom: 6px; }
.app-drill-fb.ok strong { color: var(--success); }
.app-drill-fb.no strong { color: var(--danger); }
.app-drill-fb-copy { min-width: 0; }
.app-drill-answer {
  display: block; max-width: 100%; margin-bottom: 5px; overflow: hidden;
  color: var(--cinza-texto); font-size: var(--esp-type-caption); font-weight: var(--esp-weight-medium); text-overflow: ellipsis; white-space: nowrap;
}
.app-drill-answer b { color: var(--preto); }
.app-drill-fb p { color: #3a3a42; line-height: 1.6; font-size: var(--esp-type-body); }
.app-drill-pegadinha { margin-top: 10px; color: var(--cinza-texto) !important; font-size: var(--esp-type-support) !important; }
.app-drill-pegadinha b { color: var(--preto); }
.app-drill-why { margin-top: 10px; }
.app-drill-why summary {
  width: fit-content; min-height: var(--tap-min); display: flex; align-items: center;
  color: var(--accent-strong); font-size: var(--esp-type-support); font-weight: var(--esp-weight-bold); cursor: pointer;
}
.app-drill-why summary:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; border-radius: 8px; }
.app-drill-fb-action { flex: 0 0 auto; }
.app-drill-next { min-width: 154px; }

/* Hotfix do drill mobile — a resposta vira uma sessão de foco. O feedback toma o
   lugar da navegação inferior, já nasce com espaço reservado e mantém o CTA fora
   da área rolável. Textos longos rolam dentro do corpo; “Próxima” nunca desaparece
   atrás do chrome ou da safe area. */
@media (max-width: 820px) {
  .app-body.app-drill-session .app-shell > .app-bottombar { display: none; }
  .app-body.app-drill-session .app-mobile-account { display: none; }
  .app-body.app-drill-session .app-shell > .app-main {
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .app-body.app-drill-session .app-drill {
    max-width: 620px;
    min-height: calc(100dvh - max(32px, env(safe-area-inset-top)));
    padding-bottom: 220px;
  }
  .app-body.app-drill-session .app-drill-feedback-slot {
    min-height: 220px;
    pointer-events: none;
  }
  .app-body.app-drill-session .app-drill-fb {
    position: fixed;
    z-index: calc(var(--z-header) + 1);
    right: 0;
    bottom: 0;
    left: 0;
    grid-template-columns: minmax(0, 1fr) minmax(132px, auto);
    max-height: min(48dvh, 340px);
    gap: 14px;
    margin: 0;
    padding: 15px max(16px, env(safe-area-inset-right)) max(15px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    overflow: hidden;
    border-width: 1px 0 0;
    border-radius: 18px 18px 0 0;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -18px 46px rgba(35, 46, 80, .15);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
    backdrop-filter: blur(18px) saturate(1.08);
    pointer-events: auto;
  }
  .app-body.app-drill-session .app-drill-fb-copy {
    max-height: calc(min(48dvh, 340px) - max(30px, env(safe-area-inset-bottom)));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .app-body.app-drill-session .app-drill-fb-copy > p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .app-body.app-drill-session .app-drill-why[open] + * { margin-top: 0; }
  .app-body.app-drill-session .app-drill-next { width: 100%; min-width: 0; min-height: 48px; }
}

@media (max-width: 520px) {
  .app-body.app-drill-session .app-drill { padding-bottom: 236px; }
  .app-body.app-drill-session .app-drill-feedback-slot { min-height: 236px; }
  .app-body.app-drill-session .app-drill-top { margin-bottom: 16px; }
  .app-body.app-drill-session .app-drill-caso { padding: 14px 15px; font-size: var(--esp-type-support); line-height: 1.5; }
  .app-body.app-drill-session .app-drill-pergunta { margin: 16px 0 12px; font-size: var(--esp-type-subhead); line-height: 1.35; }
  .app-body.app-drill-session .app-drill-opcoes { gap: 8px; }
  .app-body.app-drill-session .app-drill-opcao { min-height: var(--tap-min); padding: 11px 12px; font-size: var(--esp-type-support); line-height: 1.4; }
  .app-body.app-drill-session .app-drill-fb {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 8px;
    max-height: min(52dvh, 360px);
    padding-top: 13px;
  }
  .app-body.app-drill-session .app-drill-fb strong { margin-bottom: 3px; font-size: var(--esp-type-body); }
  .app-body.app-drill-session .app-drill-fb p { font-size: var(--esp-type-support); line-height: 1.45; }
  .app-body.app-drill-session .app-drill-why { margin-top: 4px; }
  .app-body.app-drill-session .app-drill-why summary { min-height: var(--tap-min); font-size: var(--esp-type-support); }
}

.app-drill-fim { text-align: center; padding-top: 20px; }
.app-drill-placar { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-bottom: 12px; }
.app-drill-placar b { font-size: var(--esp-type-display); font-weight: var(--esp-weight-bold); color: var(--accent); letter-spacing: -0.03em; line-height: 1; }
.app-drill-placar span { font-size: var(--esp-type-subhead); font-weight: var(--esp-weight-bold); color: var(--cinza-texto); }
.app-drill-fim h2 { font-size: var(--esp-type-heading); font-weight: var(--esp-weight-bold); color: var(--preto); letter-spacing: -0.01em; }
.app-drill-rampa { color: var(--cinza-texto); line-height: 1.6; max-width: 52ch; margin: 12px auto 0; }
.app-drill-fim-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.app-drill-fim-nota { font-size: var(--esp-type-support); color: var(--cinza-claro); margin-top: 20px; }

/* ══════════════════════ ACERVO / BIBLIOTECA (Bloco 3) ══════════════════════ */
.app-acervo-area { margin-bottom: 18px; }
.app-acervo-count { font-size: var(--esp-type-support); font-weight: var(--esp-weight-bold); color: var(--cinza-texto); }
.app-acervo-lista { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.app-acervo-item {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  border: 1px solid var(--borda); border-radius: var(--radius-md); padding: 16px 18px;
  background: var(--surface); text-decoration: none;
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-med);
}
.app-acervo-item:hover { border-color: var(--accent); transform: translateX(2px); box-shadow: var(--shadow-sm); }
.app-acervo-copy { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 5px; }
.app-acervo-exame { font-size: var(--esp-type-caption); font-weight: var(--esp-weight-bold); color: var(--cinza-texto); }
.app-acervo-titulo { font-size: var(--esp-type-body); font-weight: var(--esp-weight-bold); color: var(--preto); }
.app-acervo-crits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.app-acervo-crits span {
  font-size: var(--esp-type-caption); font-weight: var(--esp-weight-bold); color: var(--accent-strong);
  background: var(--accent-soft); padding: 3px 8px; border-radius: 999px;
  display: inline-flex; align-items: baseline; gap: 5px;
}
/* O peso do critério na rubrica REAL da prova. Tabular-nums para os números não
   dançarem de largura entre pílulas, e um tom mais forte porque é ele — não o nome
   do critério — que decide se vale a pena treinar este caso. */
.app-acervo-crits span b {
  font-variant-numeric: tabular-nums;
  font-weight: var(--esp-weight-bold);
  color: var(--preto);
  opacity: .78;
}
.app-acervo-fonte {
  margin-top: 5px;
  font-size: var(--esp-type-caption); font-weight: var(--esp-weight-medium); letter-spacing: .01em;
  color: var(--cinza-texto);
}
.app-acervo-cta { font-weight: var(--esp-weight-bold); font-size: var(--esp-type-support); color: var(--accent); white-space: nowrap; }

/* Ícones inline herdam a cor sem depender dos emojis do sistema. */
.esp-icone { width: 1em; height: 1em; display: inline-block; vertical-align: -0.14em; }

/* Card secundário (evolução resumida / atalho) */
.app-panel { background: #fff; border: 1px solid var(--borda); border-radius: var(--radius-lg); padding: 24px 26px; margin-bottom: 18px; }
.app-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.app-panel-head h2 { font-size: var(--esp-type-subhead); font-weight: var(--esp-weight-bold); color: var(--preto); }
.app-panel-head a { font-size: var(--esp-type-support); font-weight: var(--esp-weight-bold); color: var(--info); text-decoration: none; }
.app-panel-head a:hover { text-decoration: underline; }

/* Mini strip de atividade reusada */
/* Mesma correção da faixa da semana: com `1fr` cada dia virava um quadrado de
   61px e a rotina ocupava a largura inteira da coluna com 14 caixas quase todas
   vazias. Tamanho próprio, alinhada à esquerda, e a mesma escala de verde-lima
   que a Evolução usa — é o mesmo dado nas duas telas. */
.app-atividade {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 34px));
  gap: 5px; justify-content: start;
}
.app-atv { aspect-ratio: 1; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--borda); }
.app-atv.l1 { background: #eaf5dc; border-color: #d5ebba; }
.app-atv.l2 { background: #cfe7a6; border-color: #b9db85; }
.app-atv.l3 { background: #a9d472; border-color: #94c655; }
@media (max-width: 560px) {
  .app-atividade { grid-template-columns: repeat(14, 1fr); gap: 3px; }
  .app-atv { border-radius: 8px; }
}

/* Passe chip */
.app-passe-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius-pill); font-weight: var(--esp-weight-bold); font-size: var(--esp-type-support); background: var(--success-soft); color: var(--success); }

/* Simulado — tela de início */
.app-sim-select { width: 100%; padding: 13px 14px; border: 1.5px solid var(--borda); border-radius: var(--radius-md); font-size: var(--esp-type-body); font-family: inherit; color: var(--preto); background: #fff; }
.app-sim-select:focus { outline: none; border-color: var(--info); box-shadow: 0 0 0 3px var(--info-soft); }
.app-sim-start { margin-top: 16px; }

/* Estado "em breve" (Biblioteca) */
.app-soon { text-align: center; padding: 70px 24px; }
.app-soon h2 { font-size: var(--esp-type-heading); font-weight: var(--esp-weight-bold); color: var(--preto); margin-bottom: 10px; }
.app-soon p { color: var(--cinza-texto); max-width: 46ch; margin: 0 auto 20px; line-height: 1.6; }

/* ── Gate de entrada — a primeira folha da plataforma ────────────────────── */
.app-gate {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .72fr);
  min-height: 100svh;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(93, 113, 214, .13) 1px, transparent 1px) 0 0 / 80px 100%,
    linear-gradient(180deg, #f7f8fd 0%, #f1f4fb 100%);
}
.app-gate-story {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: clamp(34px, 5.5vw, 76px);
}
.app-gate-brand {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 12px;
  min-height: var(--tap-min);
  color: var(--esp-ink, #202638);
  text-decoration: none;
}
.app-gate-brand > span:last-child { display: flex; align-items: baseline; gap: 5px; }
.app-gate-brand b { font-family: var(--esp-display); font-size: var(--esp-type-subhead); letter-spacing: var(--esp-title-tracking); }
.app-gate-brand small { color: var(--esp-muted); font-size: var(--esp-type-caption); font-weight: var(--esp-weight-bold); letter-spacing: .08em; }
.app-gate-mark {
  position: relative;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  transform: rotate(45deg);
  border: 2px solid var(--esp-periwinkle, #7d8de1);
}
.app-gate-mark::before { width: 13px; height: 13px; border: 2px solid #aab5ed; content: ""; }
.app-gate-mark i { position: absolute; width: 5px; height: 5px; background: var(--esp-lime, #b9ef60); }
.app-gate-story-copy { width: min(660px, 100%); margin: clamp(56px, 10vh, 110px) 0; }
.app-gate-kicker,
.app-gate-card-kicker,
.app-gate-card-folio {
  color: #5569c8;
  font-family: var(--esp-micro, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: var(--esp-type-caption);
  font-weight: var(--esp-weight-bold);
  letter-spacing: .13em;
}
.app-gate-story-title {
  max-width: 10ch;
  margin: 15px 0 18px;
  color: #17203a;
  font-family: var(--esp-title, var(--esp-display));
  font-size: var(--esp-type-display);
  font-weight: var(--esp-title-weight, var(--esp-weight-bold));
  line-height: 1.02;
  letter-spacing: var(--esp-title-tracking, -.032em);
}
.app-gate-story-copy > p:not(.app-gate-story-title) { max-width: 59ch; margin: 0; color: #5f6b83; font-size: var(--esp-type-body); line-height: 1.65; }
.app-gate-ledger { margin-top: 36px; border-top: 1px solid #cfd6e7; }
.app-gate-ledger > div {
  display: grid;
  grid-template-columns: 30px minmax(118px, .72fr) minmax(90px, 1fr) 44px;
  align-items: center;
  gap: 13px;
  min-height: 54px;
  border-bottom: 1px solid #dbe1ee;
}
.app-gate-ledger span { color: #9aa4b9; font-size: var(--esp-type-caption); font-weight: var(--esp-weight-bold); }
.app-gate-ledger b { color: #2c3650; font-size: var(--esp-type-support); }
.app-gate-ledger i { position: relative; height: 4px; overflow: hidden; background: #e1e5ef; }
.app-gate-ledger em { display: block; height: 100%; background: #6f80d8; }
.app-gate-ledger > div:first-child em { background: #d05c66; }
.app-gate-ledger > div:last-child em { background: #87b73c; }
.app-gate-ledger strong { color: #35415d; font-size: var(--esp-type-support); text-align: right; }
.app-gate-story-note { display: flex; align-items: center; gap: 10px; margin: 0; color: #69758c; font-size: var(--esp-type-caption); font-weight: var(--esp-weight-medium); }
.app-gate-story-note span { width: 8px; height: 8px; border-radius: 50%; background: var(--esp-lime, #b9ef60); box-shadow: 0 0 0 5px rgba(185, 239, 96, .2); }
.app-gate-card {
  position: relative;
  z-index: 2;
  align-self: center;
  width: min(470px, calc(100% - 48px));
  margin: 36px auto;
  padding: 42px 42px 30px 54px;
  overflow: hidden;
  border: 1px solid #d8deec;
  border-radius: 22px;
  background: repeating-linear-gradient(180deg, #fff 0 45px, #f1f3f8 45px 46px);
  box-shadow: 0 28px 70px -42px rgba(29, 39, 70, .42);
  text-align: left;
}
.app-gate-card-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.app-gate-card-folio { color: #929cb0; letter-spacing: .08em; }
.app-gate-card h1 { max-width: 13ch; margin: 0 0 10px; color: #1d263e; font-size: var(--esp-type-heading); font-weight: var(--esp-weight-bold); line-height: 1.1; letter-spacing: var(--esp-title-tracking); }
.app-gate-card > #ent-sub { max-width: 40ch; margin: 0 0 28px; color: #6b768d; font-size: var(--esp-type-support); line-height: 1.58; }
.app-gate-field { display: grid; gap: 7px; margin-bottom: 14px; }
.app-gate-field > span { color: #4f5b73; font-size: var(--esp-type-caption); font-weight: var(--esp-weight-bold); letter-spacing: .04em; }
.app-gate-card .app-input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #cfd6e5;
  border-radius: 9px;
  background: rgba(255, 255, 255, .92);
  color: #242e47;
  font-family: inherit;
  font-size: var(--esp-type-body);
  text-align: left;
}
.app-gate-card .app-input::placeholder { color: #a0a9ba; }
.app-gate-card .app-input:focus { outline: none; border-color: #6377d2; box-shadow: 0 0 0 3px rgba(99, 119, 210, .15); }
.app-gate-btn {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  border: 1px solid #18233e;
  border-radius: 9px;
  background: #18233e;
  color: #fff;
  font-size: var(--esp-type-body);
  font-weight: var(--esp-weight-bold);
  cursor: pointer;
  transition: transform var(--t-fast), background var(--t-med), box-shadow var(--t-med);
}
.app-gate-btn:hover { transform: translateY(-1px); background: #24345c; box-shadow: 0 13px 28px -18px rgba(24, 35, 62, .8); }
/* Foco de teclado (auditoria 30/07): o "Entrar" não tinha NENHUMA regra de foco.
   Quem navega por Tab (ou usa leitor de tela) não via onde estava — no botão que
   dá acesso à conta. Mesmo anel do design system, para não inventar um segundo. */
.app-gate-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.app-gate-foot { margin: 16px 0 0 !important; font-size: var(--esp-type-support); color: var(--cinza-texto); text-align: center; }
.app-gate-foot a { color: var(--info); font-weight: var(--esp-weight-medium); }
.app-gate-foot > a {
  display: inline-flex;
  min-height: var(--tap-min);
  margin-block: -10px;
  padding-block: 10px;
  align-items: center;
}
/* BUG (achado 30/07): o "Criar conta" do /entrar usa a classe .ma-linklike, que só
   existe em minha-area.css — e o /entrar não carrega esse arquivo. Resultado: um
   <button> CRU do navegador (borda outset 2px, fundo #F0F0F0, texto preto) no meio da
   tela de login, que é a primeira tela de quem vai criar conta. Estilo definido aqui,
   no CSS que o /entrar de fato carrega, com área de toque de dedo. */
.app-gate-foot .ma-linklike,
.app-gate-card .ma-linklike {
  appearance: none;
  background: none;
  border: none;
  color: var(--info);
  font: inherit;
  font-weight: var(--esp-weight-bold);
  text-decoration: underline;
  cursor: pointer;
  padding: 10px 4px;
  margin: -10px -4px;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  border-radius: var(--radius-sm);
}
.app-gate-foot .ma-linklike:hover,
.app-gate-card .ma-linklike:hover { color: var(--accent-strong); }
.app-gate-foot .ma-linklike:focus-visible,
.app-gate-card .ma-linklike:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.app-gate-err { color: var(--danger); font-size: var(--esp-type-support); margin-bottom: 10px; }
/* Confirmação de sucesso: o mesmo peso do erro, cor oposta. Sem ela, "enviamos o
   link" ficaria indistinguível de "nada aconteceu" — e a pessoa clica de novo. */
.app-gate-ok {
  margin-top: 14px; padding: 11px 13px;
  border-radius: var(--radius-sm, 12px);
  background: var(--success-soft, var(--success-soft));
  color: var(--approve-ink, var(--approve-ink));
  font-size: var(--esp-type-support); line-height: 1.5; text-align: left;
}
.app-gate-card .app-gate-secure {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 0;
  padding-top: 17px;
  border-top: 1px solid #dce1ec;
  color: #788398;
  font-size: var(--esp-type-caption);
}
.app-gate-secure span { width: 7px; height: 7px; border-radius: 50%; background: #88b940; }

@media (max-width: 880px) {
  .app-gate { grid-template-columns: 1fr; align-content: start; overflow: visible; }
  .app-gate-story { min-height: auto; padding: 28px 22px 0; }
  .app-gate-story-copy { margin: 46px 0 26px; }
  .app-gate-story-title { max-width: 13ch; font-size: var(--esp-type-heading); }
  .app-gate-story-copy > p:not(.app-gate-story-title) { max-width: 46ch; font-size: var(--esp-type-support); }
  .app-gate-ledger { margin-top: 24px; }
  .app-gate-story-note { display: none; }
  .app-gate-card { width: calc(100% - 32px); max-width: 560px; margin: 24px auto 32px; }
}

@media (max-width: 480px) {
  .app-gate-story { padding-inline: 16px; }
  .app-gate-story-copy { margin: 28px 0 0; }
  .app-gate-ledger { display: none; }
  .app-gate-card { margin-top: 18px; padding: 30px 24px 24px 34px; border-radius: 16px; }
  .app-gate-card-head { margin-bottom: 18px; }
}

@media (max-width: 360px) {
  .app-gate-story-copy > p:not(.app-gate-story-title) { display: none; }
}

/* ── Esqueleto de carregamento ──
   Ocupa o mesmo lugar e a mesma forma da home real, para o conteúdo POUSAR no
   layout em vez de substituí-lo. O brilho é lento (1.6s) e de baixo contraste:
   esqueleto que pisca forte compete com o conteúdo que está chegando. */
.app-loading {
  min-height: 100vh;
  padding: 48px 48px 44px calc(248px + 48px);
  color: var(--cinza-texto);
  background: #f6f7fb;
}
.app-esq { width: min(920px, 100%); margin: 0 auto; }
.app-esq-linha,
.app-esq-metrics i,
.app-esq-rows i {
  display: block;
  border-radius: 4px;
  background: linear-gradient(90deg, #eef1f7 25%, #dfe4ef 37%, #eef1f7 63%);
  background-size: 400% 100%;
  animation: app-esq-brilho 1.6s ease-in-out infinite;
}
.app-esq-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
  gap: 44px;
  align-items: end;
  margin-bottom: 22px;
}
.app-esq-title { width: min(340px, 84%); height: 39px; }
.app-esq-copy { width: min(520px, 96%); height: 14px; margin-top: 24px; }
.app-esq-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-block: 1px solid #dce1eb; }
.app-esq-metrics i { min-height: 54px; border-radius: 0; background-color: #edf0f6; border-bottom: 1px solid #dce1eb; }
.app-esq-metrics i:nth-child(even) { border-left: 1px solid #dce1eb; }
.app-esq-metrics i:nth-child(n + 3) { border-bottom: 0; }
.app-esq-mission {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 224px;
  min-height: 344px;
  overflow: hidden;
  border: 1px solid #cfd7e6;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 20px 44px -40px rgba(24, 33, 56, .45);
}
.app-esq-margin {
  border-right: 1px solid #d7def0;
  background-color: #f1f4ff;
  background-image: repeating-linear-gradient(to bottom, transparent 0 17px, rgba(64, 91, 215, .15) 17px 18px);
}
.app-esq-mission-copy { padding: 32px 32px 26px; }
.app-esq-kicker { width: 112px; height: 10px; }
.app-esq-target { width: 174px; height: 20px; margin-top: 25px; }
.app-esq-case { width: min(460px, 92%); height: 62px; margin-top: 22px; }
.app-esq-meta { width: min(390px, 82%); height: 13px; margin-top: 18px; }
.app-esq-cta { width: 188px; height: 48px; margin-top: 34px; background: #dce3fb; }
.app-esq-ruler { position: relative; padding: 35px 24px; border-left: 1px solid #dce1eb; background: #f8f9fc; }
.app-esq-ruler > span { width: 88px; height: 56px; }
.app-esq-ruler i {
  position: absolute;
  right: 24px;
  bottom: 32px;
  left: 24px;
  height: 17px;
  border-bottom: 2px solid #c9d0df;
  background: repeating-linear-gradient(to right, #c9d0df 0 1px, transparent 1px 10%);
}
.app-esq-record { margin-top: 40px; }
.app-esq-section-title { width: min(380px, 70%); height: 24px; }
.app-esq-rows { margin-top: 17px; border-top: 1px solid #dce1eb; }
.app-esq-rows i { height: 51px; border-radius: 0; border-bottom: 1px solid #dce1eb; }
.app-esq-txt {
  width: min(920px, 100%); margin: 20px auto 0;
  font-size: var(--esp-type-support); color: var(--fg-faint, var(--fg-faint));
}
@keyframes app-esq-brilho {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .app-esq-linha, .app-esq-metrics i, .app-esq-rows i { animation: none; background: #eef1f7; }
}
.app-spin { width: 34px; height: 34px; border: 3px solid var(--borda); border-top-color: var(--info); border-radius: 50%; animation: appspin .8s linear infinite; margin: 0 auto 16px; }
@keyframes appspin { to { transform: rotate(360deg); } }

/* ══════════════════════ RESPONSIVO ══════════════════════ */
@media (max-width: 820px) {
  /* sidebar, .app-main e a barra inferior: responsivo agora vive em shell.css */
  .app-loading { padding: max(28px, env(safe-area-inset-top)) 18px calc(98px + env(safe-area-inset-bottom)); }
  .app-esq-head { grid-template-columns: 1fr; gap: 23px; }
  .app-esq-title { width: min(270px, 78%); height: 34px; }
  .app-esq-copy { margin-top: 18px; }
  .app-esq-metrics i { min-height: 51px; }
  .app-esq-mission { display: block; min-height: 0; }
  .app-esq-margin { position: absolute; inset: 0 auto 0 0; width: 13px; }
  .app-esq-mission-copy { padding: 26px 22px 18px 31px; }
  .app-esq-case { height: 76px; }
  .app-esq-ruler { min-height: 98px; margin: 0 22px 0 31px; padding: 18px 0 40px; border-top: 1px solid #dce1eb; border-left: 0; background: transparent; }
  .app-esq-ruler i { right: 0; bottom: 17px; left: 0; }
  .app-esq-record { margin-top: 34px; }
  .app-task { padding: 24px 22px; }
  .app-task-cta { width: 100%; justify-content: center; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   MESA DE PREPARAÇÃO — a tela HOJE
   ══════════════════════════════════════════════════════════════════════════════
   O que estava errado antes não era gradiente nem sombra: era HIERARQUIA. Seis
   blocos empilhados, quase todos card branco com borda e raio iguais — tarefa,
   três métricas, plano, drill, rotina — todos pedindo a mesma atenção. O aluno
   abria a casa e não sabia o que fazer.

   A regra desta tela: UMA superfície dominante (o próximo movimento), o resto em
   ordem decrescente de peso, e nada que não responda a "onde estou / o que faço
   agora / o que fica pra depois". Espaço em branco também organiza — nem todo
   conteúdo precisa de card.
════════════════════════════════════════════════════════════════════════════════ */

/* ── Entrada da tela ──────────────────────────────────────────────────────────
   Os blocos aparecem em sequência curta, de cima para baixo. Não é enfeite: uma
   tela que surge inteira, pronta, no mesmo instante, lê como página carregada;
   a entrada escalonada lê como algo que está sendo montado PARA você, e dá ao
   olho a ordem de leitura que a hierarquia pretende — primeiro onde estou,
   depois o que faço, depois o resto.

   40ms entre blocos e 380ms de duração: rápido o bastante para não atrasar quem
   já sabe o que quer, lento o bastante para o olho seguir. Quem pediu menos
   movimento no sistema não recebe nenhum. */
@keyframes app-entra {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
#view-inicio > * {
  animation: app-entra .38s var(--ease-out, cubic-bezier(.16,1,.3,1)) both;
}
#view-inicio > *:nth-child(1) { animation-delay: 0ms; }
#view-inicio > *:nth-child(2) { animation-delay: 40ms; }
#view-inicio > *:nth-child(3) { animation-delay: 80ms; }
#view-inicio > *:nth-child(4) { animation-delay: 120ms; }
#view-inicio > *:nth-child(5) { animation-delay: 160ms; }
#view-inicio > *:nth-child(n+6) { animation-delay: 200ms; }

/* Troca de aba: mais curta que a carga inicial (240ms contra 380ms) e sem
   escalonar. A navegação foi PEDIDA — o usuário já sabe para onde vai, e
   escalonar aqui só atrasaria o que ele veio buscar. */
@keyframes app-view-entra {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.app-view-entra { animation: app-view-entra .24s var(--ease-out, cubic-bezier(.16,1,.3,1)) both; }

@media (prefers-reduced-motion: reduce) {
  #view-inicio > * { animation: none; }
  .app-view-entra { animation: none; }
}

/* ── Cabeçalho editorial: sem card, sem borda ── */
.app-hoje { margin-bottom: var(--sp-6); }
.app-hoje-kicker {
  display: block;
  font-family: var(--esp-micro, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: var(--esp-type-caption); font-weight: var(--esp-weight-bold);
  color: var(--accent-strong);
}
.app-hoje-passe { font-style: normal; color: var(--approve, var(--approve)); }
.app-hoje h1 {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: var(--esp-type-heading);
  font-weight: var(--esp-weight-bold);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--fg);
}

/* ══ ONBOARDING ══════════════════════════════════════════════════════════════
   Cada campo carrega o MOTIVO logo abaixo. Pedir dado sem dizer para quê é a
   forma mais rápida de a pessoa achar que virou cadastro de newsletter — e esta
   é a primeira tela depois do cadastro, a que o tráfego pago comprou. */
.app-onb {
  max-width: 560px;
  background: var(--surface); border: 1px solid var(--borda);
  border-radius: var(--radius-lg, 20px);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
}
.app-onb-campo + .app-onb-campo { margin-top: 22px; }
.app-onb-label {
  display: block; margin-bottom: 8px;
  font-size: var(--esp-type-body); font-weight: var(--esp-weight-bold); color: var(--fg);
}
.app-onb-input {
  width: 100%; padding: 13px 15px;
  border: 1px solid var(--borda); border-radius: var(--radius-sm, 12px);
  background: var(--surface); color: var(--fg);
  font-family: inherit; font-size: var(--esp-type-body); font-weight: var(--esp-weight-medium);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.app-onb-input:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring);
}
.app-onb-porque {
  display: block; margin-top: 7px;
  font-size: var(--esp-type-support); line-height: 1.45; color: var(--fg-faint, var(--fg-faint));
}
.app-onb-btn { width: 100%; justify-content: center; margin-top: 24px; }
.app-onb .app-gate-err { margin: 14px 0 0; }

/* ══ SIMULADOS ═══════════════════════════════════════════════════════════════
   Um simulado de 5 horas é o compromisso mais pesado do produto. A tela antiga
   pedia isso com a mesma gramática de um formulário de contato. Aqui o briefing
   vem ANTES do botão (ninguém deve descobrir a regra depois de o relógio
   começar), e o "começar" fica na superfície escura — a mesma que a home usa
   para a ação primária. */
.app-sim-lead {
  max-width: 64ch; margin-bottom: var(--sp-8, 32px);
  font-size: var(--esp-type-body); line-height: 1.6; color: var(--fg-soft);
}
.app-sim-brief {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px; background: var(--borda);
  border: 1px solid var(--borda); border-radius: var(--radius-md, 16px);
  overflow: hidden;
}
.app-sim-brief > div {
  display: flex; flex-direction: column; gap: 3px;
  padding: 16px 18px; background: var(--surface);
}
.app-sim-brief b {
  font-family: var(--font-display), Manrope, sans-serif;
  font-size: var(--esp-type-subhead); font-weight: var(--esp-weight-bold); letter-spacing: -.01em; color: var(--fg);
}
.app-sim-brief span { font-size: var(--esp-type-support); line-height: 1.45; color: var(--fg-soft); }

.app-sim-compromisso {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-6, 24px); flex-wrap: wrap;
  background: var(--surface-dark); color: var(--surface-dark-ink, #fff);
  border-radius: var(--radius-xl, 24px);
  padding: 26px 28px; margin-bottom: var(--sp-4, 16px);
  box-shadow: var(--shadow-lg);
}
.app-sim-compromisso .app-sim-select {
  width: 100%; max-width: 360px;
  padding: 13px 15px; border-radius: var(--radius-sm, 12px);
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.07); color: #fff;
  font-family: inherit; font-size: var(--esp-type-body); font-weight: var(--esp-weight-medium);
}
.app-sim-compromisso .app-sim-select:focus-visible {
  outline: none; border-color: var(--lima); box-shadow: 0 0 0 3px rgba(169,220,87,.28);
}
.app-sim-compromisso .app-sim-select option { color: var(--fg); background: #fff; }
.app-sim-start { white-space: nowrap; }
@media (max-width: 640px) {
  .app-sim-compromisso { padding: 20px; }
  .app-sim-compromisso .app-sim-select { max-width: none; }
  .app-sim-start { width: 100%; justify-content: center; }
}

/* ── O veredito do último ajuste ──
   Linha discreta logo abaixo da ação primária: olha pra trás só o suficiente
   para responder "adiantou?" antes de a tela pedir mais uma peça. */
.app-veredito {
  margin: var(--sp-4, 16px) 2px 0;
  padding-left: 12px;
  border-left: 3px solid var(--borda);
  font-size: var(--esp-type-support); line-height: 1.5; color: var(--fg-soft);
}
.app-veredito b { font-weight: var(--esp-weight-bold); font-variant-numeric: tabular-nums; }
.app-veredito.ok { border-left-color: var(--approve, var(--approve)); color: var(--approve, var(--approve)); }
.app-veredito.risco { border-left-color: var(--danger, var(--esp-danger)); color: var(--danger, var(--esp-danger)); }

/* ── Faixa de contexto: substitui os três cards de peso igual ── */
.app-contexto {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-5) var(--sp-8);
  margin: var(--sp-5) 0 var(--sp-8);
  padding: 0 2px;
}
.app-contexto-nota { display: flex; align-items: baseline; gap: 9px; }
.app-contexto-nota b {
  font-family: var(--font-display);
  font-size: var(--esp-type-display); font-weight: var(--esp-weight-bold); line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
  color: var(--warn, var(--warn));
}
.app-contexto-nota.acima b { color: var(--approve, var(--approve)); }
.app-contexto-nota span { font-size: var(--esp-type-support); font-weight: var(--esp-weight-medium); color: var(--fg-soft); }
.app-contexto-nota.vazio span { color: var(--fg-faint, var(--fg-faint)); font-weight: var(--esp-weight-medium); }
/* Régua vertical separando "onde estou" do resto do contexto. */
.app-contexto-resto {
  display: flex; flex-wrap: wrap; gap: var(--sp-5);
  padding-left: var(--sp-8);
  border-left: 1px solid var(--borda);
}
.app-contexto-resto span { font-size: var(--esp-type-support); color: var(--fg-soft); white-space: nowrap; }
.app-contexto-resto b {
  font-weight: var(--esp-weight-bold); font-variant-numeric: tabular-nums; color: var(--fg);
}

/* ── Seções: título tipográfico, sem moldura ── */
.app-secao { margin-bottom: var(--sp-8); }
.app-secao-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.app-secao-head h2 {
  font-family: var(--font-display);
  font-size: var(--esp-type-body); font-weight: var(--esp-weight-bold); letter-spacing: -.01em; color: var(--fg);
}
.app-secao-head span, .app-secao-head a {
  font-size: var(--esp-type-support); font-weight: var(--esp-weight-bold); color: var(--fg-soft); text-decoration: none;
}
.app-secao-head a { color: var(--accent-strong); }
.app-secao-nota { margin-top: var(--sp-3); font-size: var(--esp-type-support); color: var(--fg-faint, var(--fg-faint)); }
.app-secao--rodape { opacity: .85; }

/* ── Esta semana: os sete dias reais ── */
/* Largura própria, alinhada à esquerda. Com `repeat(7, 1fr)` cada dia ficava com
   ~140px numa coluna de 985px: sete retângulos largos e vazios atravessando a
   tela para dizer "você treinou terça e quinta". A faixa informa, não preenche
   linha — e um quadrado de 52px lê como marcador, não como caixa de layout. */
.app-semana {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 52px));
  gap: 6px; justify-content: start;
}
/* Altura fixa, não aspect-ratio: numa coluna de 920px o quadrado perfeito dava
   ~125px de altura por dia — meia tela para uma informação de uma linha. */
.app-dia {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 58px;
  border: 1px solid var(--borda); border-radius: var(--radius-sm);
  background: var(--surface);
}
.app-dia i {
  font-style: normal; font-size: var(--esp-type-caption); font-weight: var(--esp-weight-bold); letter-spacing: .06em;
  color: var(--fg-faint, var(--fg-faint));
}
.app-dia b { font-size: var(--esp-type-body); font-weight: var(--esp-weight-bold); line-height: 1; color: var(--fg); }
/* Verde-lima, e não roxo, para dia treinado: é a mesma cor que a Evolução usa na
   faixa de constância e na linha do corte. Constância e aprovação são a mesma
   ideia no produto — duas cores para ela é o que fazia as telas parecerem
   desenhadas por pessoas diferentes. */
.app-dia.feito { background: #eaf5dc; border-color: #d5ebba; }
.app-dia.feito i, .app-dia.feito b { color: var(--approve-ink, var(--approve-ink)); }
.app-dia.vazio { background: var(--surface-2); border-style: dashed; }
.app-dia.futuro { background: transparent; border-color: transparent; opacity: .45; }
/* Hoje é o único dia com anel — é onde a decisão acontece. */
.app-dia.hoje { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

/* ── Depois: linhas, não cards ── */
.app-depois { display: flex; flex-direction: column; }
.app-depois-item {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-2);
  border-bottom: 1px solid var(--borda);
  text-decoration: none;
  transition: background var(--t-fast), padding-left var(--t-fast);
}
.app-depois-item:first-child { border-top: 1px solid var(--borda); }
.app-depois-item:hover { background: var(--surface-2); padding-left: var(--sp-4); }
.app-depois-item.feito { opacity: .6; }
.app-depois-tag {
  flex: 0 0 auto; min-width: 122px;
  font-size: var(--esp-type-caption); font-weight: var(--esp-weight-bold);
  color: var(--accent-strong);
}
.app-depois-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app-depois-copy b { font-size: var(--esp-type-body); font-weight: var(--esp-weight-bold); color: var(--fg); }
.app-depois-copy > span { font-size: var(--esp-type-support); line-height: 1.45; color: var(--fg-soft); }
.app-depois-seta { flex: 0 0 auto; font-weight: var(--esp-weight-bold); color: var(--fg-faint, var(--fg-faint)); }

@media (max-width: 640px) {
  .app-contexto { gap: var(--sp-4); margin: var(--sp-4) 0 var(--sp-6); }
  .app-contexto-resto {
    width: 100%; padding-left: 0; padding-top: var(--sp-4);
    border-left: 0; border-top: 1px solid var(--borda);
  }
  .app-contexto-nota b { font-size: var(--esp-type-heading); }
  /* No celular sete células de 52px não cabem: aí sim elas dividem a largura. */
  .app-semana { grid-template-columns: repeat(7, 1fr); gap: 4px; }
  .app-dia { height: 50px; }
  /* No celular a etiqueta vira uma linha própria: 122px de coluna fixa esmagavam
     o título do item contra a seta. */
  .app-depois-item { flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); }
  .app-depois-tag { min-width: 0; width: 100%; }
  .app-depois-copy { flex-basis: calc(100% - 28px); }
}
