/* ─── PHRASALS · SISTEMA VISUAL NOVO ────────────────────────────────────────
 * Folha em branco: NÃO importa styles.css. Serve de piloto pro redesign
 * do app inteiro. Se funcionar aqui, vira a base do resto.
 *
 * Princípios:
 *   - superfície elevada em vez de borda dura (borda de 1px envelhece rápido)
 *   - escala tipográfica maior — o app é usado no celular, em pé, com pressa
 *   - alvo de toque nunca menor que 48px
 *   - progresso é herói, não rodapé
 *   - uma cor de acento só, com gradiente; o resto é neutro
 * ──────────────────────────────────────────────────────────────────────── */

:root {
  /* superfícies — do fundo pro topo */
  --bg:       #0b0c0f;
  --surf-1:   #14161b;
  --surf-2:   #1c1f26;
  --surf-3:   #262a33;

  /* texto */
  --ink:      #f2f4f8;
  --ink-2:    #a8b0c0;
  --ink-3:    #6b7484;

  /* acento */
  --acc:      #7c8cff;
  --acc-2:    #a97cff;
  --acc-grad: linear-gradient(135deg, #7c8cff 0%, #a97cff 100%);
  --acc-soft: rgba(124,140,255,.14);

  /* semânticos */
  --ok:       #3ddc97;
  --ok-soft:  rgba(61,220,151,.14);
  --warn:     #ffc75a;
  --err:      #ff6b7a;
  --err-soft: rgba(255,107,122,.14);

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;

  --shadow: 0 2px 8px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.25);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 620px; margin: 0 auto; padding: 0 18px; }

/* ─── TOPO ──────────────────────────────────────────────────────────── */
.bar {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 0 10px;
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(to bottom, var(--bg) 72%, transparent);
}
.bar-back {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%; border: 0;
  background: var(--surf-2); color: var(--ink);
  font-size: 20px; line-height: 1;
  display: grid; place-items: center;
  text-decoration: none; cursor: pointer;
}
.bar-back:active { background: var(--surf-3); }
.bar-title { font-size: 17px; font-weight: 500; letter-spacing: -.01em; flex: 1; }
.bar-sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }

/* ─── TÍTULO GRANDE ─────────────────────────────────────────────────── */
.hero { padding: 8px 0 22px; }
.hero h1 {
  margin: 0;
  font-size: 34px; line-height: 1.1;
  font-weight: 600; letter-spacing: -.03em;
}
.hero h1 em {
  font-style: normal;
  background: var(--acc-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }

/* ─── CARTÃO DE PROGRESSO (herói) ───────────────────────────────────── */
.prog-card {
  background: var(--surf-1);
  border-radius: var(--r-lg);
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.prog-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.prog-big { font-size: 40px; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.prog-of { font-size: 14px; color: var(--ink-3); margin-left: 6px; font-weight: 400; }
.prog-tag {
  font-size: 12px; font-weight: 500;
  padding: 6px 12px; border-radius: 100px;
  background: var(--acc-soft); color: var(--acc);
}

/* barra de degraus */
.steps { display: flex; gap: 5px; }
.step { flex: 1; height: 7px; border-radius: 100px; background: var(--surf-3); overflow: hidden; }
.step > i { display: block; height: 100%; background: var(--acc-grad); border-radius: 100px; }
.steps-key {
  display: flex; justify-content: space-between;
  margin-top: 9px; font-size: 10px; color: var(--ink-3);
  letter-spacing: .02em;
}

/* ─── BOTÃO PRINCIPAL ───────────────────────────────────────────────── */
.cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px;
  border: 0; border-radius: var(--r);
  background: var(--acc-grad); color: #0b0c0f;
  font-size: 16px; font-weight: 600; font-family: inherit;
  text-decoration: none; cursor: pointer;
  margin-bottom: 12px;
}
.cta:active { transform: scale(.985); }
.cta.ghost { background: var(--surf-2); color: var(--ink); }
.cta.ghost:active { background: var(--surf-3); }
.cta[disabled] { opacity: .4; pointer-events: none; }

/* saída discreta — "sempre pular". Presente, sem competir com o botão principal */
.pular-sempre {
  display: block; width: 100%; min-height: 44px;
  background: none; border: 0; color: var(--ink-3);
  font-size: 13px; font-family: inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.pular-sempre:active { color: var(--ink-2); }

/* ─── SEÇÃO ─────────────────────────────────────────────────────────── */
.sec {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-3);
  margin: 30px 2px 12px;
}

/* ─── LINHAS DE MENU ────────────────────────────────────────────────── */
.rows { display: flex; flex-direction: column; gap: 9px; }
.row {
  display: flex; align-items: center; gap: 15px;
  min-height: 68px; padding: 13px 16px;
  background: var(--surf-1); border-radius: var(--r);
  text-decoration: none; color: var(--ink); cursor: pointer;
  border: 0; width: 100%; text-align: left; font-family: inherit;
}
.row:active { background: var(--surf-2); }
.row-ic {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 13px; display: grid; place-items: center;
  font-size: 21px; background: var(--surf-3);
}
.row-mid { flex: 1; min-width: 0; }
.row-t { font-size: 15.5px; font-weight: 500; letter-spacing: -.01em; }
.row-d { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.35; }
.row-n {
  font-size: 13px; font-weight: 600; color: var(--ink-3);
  flex-shrink: 0; display: flex; align-items: center; gap: 8px;
}
.row-chev { color: var(--ink-3); font-size: 17px; flex-shrink: 0; }

.pill {
  font-size: 11px; font-weight: 600; padding: 4px 9px;
  border-radius: 100px; background: var(--acc-soft); color: var(--acc);
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }

/* ─── ESCOLHER DEGRAU DE ENTRADA ────────────────────────────────────── */
/* A escada é sugestão, não porteira: dá pra entrar em qualquer degrau. */
.degraus { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.degrau-chip {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  min-height: 78px; padding: 13px 8px;
  background: var(--surf-1); border: 2px solid transparent;
  border-radius: var(--r); color: var(--ink);
  text-decoration: none; font-family: inherit; cursor: pointer;
}
.degrau-chip:active { background: var(--surf-2); }
.degrau-chip.ativo { border-color: var(--acc); background: var(--acc-soft); }
.degrau-chip .dc-ic { font-size: 21px; line-height: 1; }
.degrau-chip .dc-lb { font-size: 11.5px; font-weight: 500; text-align: center; line-height: 1.25; }
.degrau-chip .dc-n { font-size: 10px; color: var(--ink-3); }

.toggle {
  display: flex; align-items: center; gap: 13px;
  min-height: 60px; padding: 12px 16px; margin-top: 10px;
  background: var(--surf-1); border: 0; border-radius: var(--r);
  color: var(--ink); font-family: inherit; text-align: left;
  width: 100%; cursor: pointer;
}
.toggle:active { background: var(--surf-2); }
.toggle-mid { flex: 1; min-width: 0; }
.toggle-t { font-size: 14.5px; font-weight: 500; }
.toggle-d { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.toggle-sw {
  width: 46px; height: 27px; flex-shrink: 0;
  border-radius: 100px; background: var(--surf-3);
  position: relative; transition: background .16s;
}
.toggle-sw::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--ink-2); transition: transform .16s, background .16s;
}
.toggle.on .toggle-sw { background: var(--acc); }
.toggle.on .toggle-sw::after { transform: translateX(19px); background: #fff; }

/* ─── BUSCA ─────────────────────────────────────────────────────────── */
.search {
  width: 100%; min-height: 50px;
  background: var(--surf-1); border: 0; border-radius: var(--r);
  color: var(--ink); padding: 0 16px;
  font-size: 15px; font-family: inherit;
  margin-bottom: 8px;
}
.search::placeholder { color: var(--ink-3); }
.search:focus { outline: 2px solid var(--acc); outline-offset: -2px; }

/* ─── TREINO ────────────────────────────────────────────────────────── */
.tr-head { padding: 14px 0 18px; }
.tr-bar { height: 5px; background: var(--surf-2); border-radius: 100px; overflow: hidden; }
.tr-bar > i { display: block; height: 100%; background: var(--acc-grad); transition: width .3s ease; }
.tr-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 11px; font-size: 12px; color: var(--ink-3);
}
.tr-degrau { display: flex; align-items: center; gap: 7px; font-weight: 500; color: var(--ink-2); }

.card {
  background: var(--surf-1); border-radius: var(--r-lg);
  padding: 24px 20px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.q-int {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; color: var(--acc); margin-bottom: 12px;
}
.q-txt { font-size: 20px; line-height: 1.35; font-weight: 500; letter-spacing: -.015em; }
.q-txt em { font-style: normal; color: var(--acc); }
.q-sub { font-size: 14px; color: var(--ink-2); margin-top: 10px; line-height: 1.45; }

/* frase de exposição */
.expo-en {
  font-size: 23px; line-height: 1.3; font-weight: 500;
  letter-spacing: -.02em; margin-bottom: 12px;
}
.expo-pt { font-size: 15px; color: var(--ink-2); }
.expo-tip {
  margin-top: 18px; padding: 14px;
  background: rgba(255,199,90,.09); border-radius: var(--r-sm);
  font-size: 13.5px; line-height: 1.5; color: #ffd98a;
}

/* opções */
.opts { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.opt {
  display: flex; align-items: center; gap: 13px;
  min-height: 58px; padding: 14px 16px;
  background: var(--surf-2); border: 2px solid transparent;
  border-radius: var(--r); color: var(--ink);
  font-size: 15.5px; line-height: 1.35; font-family: inherit; text-align: left;
  cursor: pointer; width: 100%;
}
.opt:active { background: var(--surf-3); }
.opt.certo { border-color: var(--ok); background: var(--ok-soft); }
.opt.errado { border-color: var(--err); background: var(--err-soft); }
.opt.revela { border-color: var(--ok); }
.opt[disabled] { cursor: default; }
.opt-mark { flex-shrink: 0; font-size: 17px; width: 22px; }

/* tokens (ordenar) */
.tok-alvo {
  min-height: 62px; padding: 12px; margin-top: 18px;
  background: var(--surf-2); border-radius: var(--r);
  display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start;
}
.tok-fonte { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tok {
  padding: 10px 14px; min-height: 44px;
  background: var(--surf-3); border: 0; border-radius: var(--r-sm);
  color: var(--ink); font-size: 15px; font-family: inherit; cursor: pointer;
}
.tok:active { background: var(--acc-soft); }
.tok.usado { opacity: .25; pointer-events: none; }

/* entrada de texto */
.resp {
  width: 100%; min-height: 110px; resize: vertical;
  background: var(--surf-2); border: 2px solid transparent;
  border-radius: var(--r); color: var(--ink);
  padding: 15px; font-size: 16px; font-family: inherit; line-height: 1.5;
  margin-top: 18px;
}
.resp:focus { outline: none; border-color: var(--acc); }
.resp::placeholder { color: var(--ink-3); }

/* microfone */
.mic-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 22px; }
.mic {
  width: 92px; height: 92px; border-radius: 50%; border: 0;
  background: var(--acc-grad); color: #0b0c0f;
  font-size: 38px; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 8px 28px rgba(124,140,255,.32);
}
.mic:active { transform: scale(.95); }
.mic.rec { background: var(--err); animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,107,122,.5); }
  50%     { box-shadow: 0 0 0 20px rgba(255,107,122,0); }
}
.mic-hint { font-size: 13px; color: var(--ink-3); text-align: center; }
.mic-txt {
  width: 100%; margin-top: 6px; padding: 15px;
  background: var(--surf-2); border-radius: var(--r);
  font-size: 17px; line-height: 1.4; min-height: 56px;
}
.mic-txt:empty::before { content: 'Sua fala aparece aqui…'; color: var(--ink-3); font-size: 15px; }

/* botão de ouvir */
.ouvir {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px; margin-top: 16px;
  background: var(--surf-2); border: 0; border-radius: 100px;
  color: var(--ink); font-size: 14px; font-weight: 500;
  font-family: inherit; cursor: pointer;
}
.ouvir:active { background: var(--surf-3); }

/* feedback */
.fb { border-radius: var(--r); padding: 17px; margin-bottom: 16px; font-size: 14.5px; line-height: 1.55; }
.fb.ok { background: var(--ok-soft); color: #a8f0cd; }
.fb.no { background: var(--err-soft); color: #ffc0c7; }
.fb.neutro { background: var(--surf-2); color: var(--ink-2); }
.fb strong { color: var(--ink); }
.fb-t { font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }

/* ─── FIM DE SESSÃO ─────────────────────────────────────────────────── */
.fim { text-align: center; padding: 46px 0; }
.fim-ic { font-size: 60px; }
.fim h2 { font-size: 27px; font-weight: 600; letter-spacing: -.02em; margin: 18px 0 8px; }
.fim p { color: var(--ink-2); margin: 0 0 30px; }
.fim-nums { display: flex; gap: 10px; margin-bottom: 30px; }
.fim-num { flex: 1; background: var(--surf-1); border-radius: var(--r); padding: 18px 10px; }
.fim-num b { display: block; font-size: 27px; font-weight: 600; letter-spacing: -.02em; }
.fim-num span { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }

/* ─── CONSULTA ──────────────────────────────────────────────────────── */
.cons-item {
  background: var(--surf-1); border-radius: var(--r);
  padding: 15px 17px; margin-bottom: 8px;
}
.cons-en { font-size: 16.5px; font-weight: 500; }
.cons-pt { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; }
.cons-ex { font-size: 13px; color: var(--ink-3); margin-top: 9px; font-style: italic; line-height: 1.5; }
.aviso {
  background: var(--surf-1); border-left: 3px solid var(--warn);
  border-radius: var(--r-sm); padding: 15px 17px; margin-bottom: 22px;
  font-size: 13.5px; line-height: 1.55; color: var(--ink-2);
}

.vazio { text-align: center; padding: 50px 20px; color: var(--ink-3); }
.espaco { height: 40px; }
