/* Estilo do Escrévius (escrevius.com): fundo #F8F7F4, cartões brancos, oxblood #7A382C, Georgia nos títulos e Inter no texto. */
:root {
  --bg: #f8f7f4;
  --surface: #ffffff;
  --surface-2: #f0ece7;
  --surface-3: #f4f0ea;
  --border: #ddd8d1;
  --border-card: #e2d9ce;
  --border-strong: #cdc6be;
  --text: #272320;
  --title: #23201d;
  --text-2: #68615b;
  --text-3: #7a7168;
  --accent: #7a382c;
  --accent-ink: #6f3127;
  --accent-soft: #efe4de;
  --accent-ring: #9c675e;
  --badge: #f6e1dc;
  --on-accent: #ffffff;
  --danger: #a43b2f;
  --radius: 9px;
  --radius-card: 12px;
  --sans: "Inter", ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }

/* Barra do topo */
.barra-topo { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--border); }
.barra-topo .dentro { max-width: 640px; margin: 0 auto; height: 64px; padding: 0 16px; display: flex; align-items: center; gap: 12px; }
.barra-topo img { height: 24px; width: auto; }
.barra-topo .passo { margin-left: auto; color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.icone-voltar { width: 44px; height: 44px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); display: grid; place-items: center; color: var(--text); }
.icone-voltar:hover { background: var(--surface-2); }
.progresso { height: 3px; background: var(--surface-2); }
.progresso i { display: block; height: 100%; background: var(--accent); transition: width .35s ease; }

main { max-width: 640px; margin: 0 auto; padding: 28px 16px 72px; }
.tela { animation: entra .25s ease both; }
@keyframes entra { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tela, .progresso i { animation: none; transition: none; } }

/* Tipografia */
.rotulo-topo { font-size: 11px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 12px; }
h1, h2 { font-family: var(--serif); font-weight: 500; color: var(--title); margin: 0; }
h1 { font-size: clamp(32px, 8vw, 44px); line-height: 1.08; letter-spacing: -0.035em; margin-bottom: 14px; }
h2 { font-size: clamp(24px, 6vw, 30px); line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 10px; }
h3 { font-family: var(--sans); font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--title); margin: 0 0 6px; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
p { margin: 0 0 14px; }
.lead { font-size: 16px; color: var(--text-2); margin: 0 0 24px; }
.lead strong { color: var(--text); font-weight: 600; }
.texto-2 { color: var(--text-2); }
.pequeno { font-size: 13px; color: var(--text-3); line-height: 1.5; }

/* Formulários */
.campo { margin-bottom: 16px; }
.campo label { display: block; font-size: 13px; font-weight: 600; color: var(--title); margin-bottom: 6px; }
.entrada, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius); outline: none; transition: border-color .15s, box-shadow .15s;
}
.entrada { height: 48px; padding: 0 14px; }
textarea { min-height: 160px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.entrada::placeholder, textarea::placeholder { color: #a39a91; }
.entrada:focus, textarea:focus { border-color: var(--accent-ring); box-shadow: 0 0 0 3px rgba(156, 103, 94, .18); }
.com-prefixo { position: relative; }
.com-prefixo span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.com-prefixo .entrada { padding-left: 32px; }
.erro { color: var(--danger); font-size: 13px; margin: 8px 0 0; }
.erro:empty { display: none; }

/* Botões */
.botao {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 12px 16px;
  border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: var(--on-accent);
  font-size: 15px; font-weight: 500; text-decoration: none; transition: background .15s;
}
.botao:hover { background: #6a3026; }
.botao[disabled] { opacity: .55; cursor: default; }
.botao.secundario { background: var(--surface); color: var(--text); border-color: var(--border); }
.botao.secundario:hover { background: var(--surface-2); }
.botao-texto { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; background: none; border: 0; padding: 6px 0; color: var(--accent-ink); font-size: 14px; font-weight: 600; }
.acoes { margin-top: 20px; display: grid; gap: 8px; justify-items: center; }
.acoes .botao { width: 100%; }

/* Opções */
.opcoes { display: grid; gap: 8px; margin-top: 6px; }
.opcao {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 13px 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 15px; line-height: 1.4; color: var(--text);
  transition: border-color .15s, background .15s;
}
.opcao:hover { border-color: var(--border-strong); }
.opcao .marca { flex: 0 0 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; background: var(--surface); }
.opcao.escolhida { background: var(--accent-soft); border-color: var(--accent); }
.opcao.escolhida .marca { border-color: var(--accent); }
.opcao.escolhida .marca::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.opcoes.grade { grid-template-columns: 1fr 1fr; }
.opcoes.grade .opcao { min-height: 48px; padding: 10px 12px; gap: 10px; font-size: 14px; }

.portas { display: grid; gap: 10px; }
.porta {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px; background: var(--surface);
  border: 1px solid var(--border-card); border-radius: var(--radius-card); transition: border-color .15s;
}
.porta:hover { border-color: var(--accent); }
.porta .icone { flex: 0 0 36px; height: 36px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; color: var(--accent); }
.porta .t { display: block; font-size: 15px; font-weight: 600; color: var(--title); line-height: 1.35; }
.porta .d { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.porta > svg { margin-left: auto; flex: 0 0 auto; color: var(--text-3); }

.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 16px 0 0; padding: 0; list-style: none; color: var(--text-2); font-size: 13px; }
.meta li { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { color: var(--accent); }

/* Espera */
.espera { text-align: center; padding-top: 14vh; }
.pontos { display: flex; justify-content: center; gap: 8px; margin: 0 0 22px; }
.pontos i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulsa 1.2s ease-in-out infinite; }
.pontos i:nth-child(2) { animation-delay: .15s; } .pontos i:nth-child(3) { animation-delay: .3s; }
@keyframes pulsa { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: none; } }

/* Cartões e seções */
.cartao { background: var(--surface); border: 1px solid var(--border-card); border-radius: var(--radius-card); padding: 20px; margin-top: 14px; }
.cartao.destaque { background: linear-gradient(120deg, var(--surface-3) 0, var(--surface-3) 60%, #fff 100%); }
.cartao.alerta { position: relative; }
.cartao.alerta::before { content: ""; position: absolute; left: -1px; top: 18px; width: 4px; height: 26px; border-radius: 0 3px 3px 0; background: var(--accent); }
.titulo-cartao { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 12px; }
.secao { margin-top: 40px; }

/* Leitura */
.trilha { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.trilha .seg { height: 6px; border-radius: 3px; background: var(--surface-2); margin-bottom: 8px; }
.trilha .nome { font-size: 12px; color: var(--text-3); text-align: center; }
.trilha .feita .seg { background: #d9c4bb; }
.trilha .atual .seg { background: var(--accent); }
.trilha .atual .nome { color: var(--title); font-weight: 600; }
.trilha-legenda { font-size: 14px; color: var(--text-2); margin: 14px 0 0; }

.placar { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.placar .numero { font-family: var(--serif); font-size: 56px; line-height: 1; letter-spacing: -0.04em; color: var(--accent); }
.placar .legenda { font-size: 13px; color: var(--text-2); line-height: 1.4; }
.elemento { padding: 14px 0; border-top: 1px solid var(--border); }
.elemento .linha { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.elemento strong { font-size: 15px; font-weight: 600; color: var(--title); }
.elemento .nota { font-size: 13px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.medidor { height: 6px; border-radius: 3px; background: var(--surface-2); margin: 8px 0; overflow: hidden; }
.medidor i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.elemento p { font-size: 14px; color: var(--text-2); margin: 0; }

.frase-rotulo { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin: 16px 0 6px; }
.frase { font-family: var(--serif); font-size: 18px; line-height: 1.5; padding: 14px 16px; border-radius: 10px; }
.frase.antes { background: var(--surface-2); color: var(--text-2); border-left: 3px solid var(--border-strong); }
.frase.depois { background: var(--accent-soft); color: var(--title); border-left: 3px solid var(--accent); }

.checks { list-style: none; padding: 0; margin: 0; }
.checks li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 15px; color: var(--text); line-height: 1.5; }
.checks li:first-child { border-top: 0; padding-top: 2px; }
.checks li::before {
  content: ""; flex: 0 0 22px; height: 22px; margin-top: 1px; border-radius: 6px; background: var(--surface-2) center / 12px no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a382c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
}

.numeros-autoridade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.numeros-autoridade div { background: var(--surface-3); border: 1px solid var(--border-card); border-radius: 10px; padding: 12px 8px; text-align: center; }
.numeros-autoridade b { display: block; font-family: var(--serif); font-weight: 500; font-size: 20px; color: var(--title); letter-spacing: -0.02em; }
.numeros-autoridade span { display: block; font-size: 12px; color: var(--text-2); line-height: 1.3; margin-top: 2px; }

.paginas { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; margin: 12px -2px 0; scroll-snap-type: x mandatory; }
.pagina { flex: 0 0 68%; min-height: 200px; position: relative; padding: 16px; background: var(--surface); border: 1px solid var(--border-card); border-radius: var(--radius-card); scroll-snap-align: start; }
.pagina .n { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 8px; }
.pagina h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; letter-spacing: -0.02em; }
.pagina p { font-size: 14px; color: var(--text-2); }
.pagina.aberta { border-color: var(--accent); }
.pagina.trancada .conteudo { filter: blur(3px); opacity: .5; user-select: none; }
.pagina .cadeado { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }

.pergunta-aplicacao { margin-bottom: 22px; }
.pergunta-aplicacao > label { display: block; font-size: 15px; font-weight: 600; color: var(--title); line-height: 1.4; margin-bottom: 8px; }
.pergunta-aplicacao .num { color: var(--text-3); font-weight: 500; margin-right: 4px; }

@media (min-width: 720px) {
  main { padding-top: 48px; }
  .cartao { padding: 24px; }
  .pagina { flex-basis: 44%; }
}

/* Perfil do Instagram */
.perfil { display: flex; align-items: center; gap: 14px; }
.perfil-dados { display: flex; flex-direction: column; min-width: 0; }
.perfil-dados strong { font-size: 16px; font-weight: 600; color: var(--title); }
.avatar { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-card); background: var(--surface-2); }
.avatar.vazio { display: grid; place-items: center; font-family: var(--serif); font-size: 20px; color: var(--accent); }
.avatar.grande { width: 72px; height: 72px; flex-basis: 72px; }
.avatar.grande.vazio { font-size: 26px; }
.avatar.carregando { animation: pulsa 1.2s ease-in-out infinite; }
.bio { white-space: pre-line; font-size: 15px; line-height: 1.55; color: var(--text); margin: 14px 0 0; }
.bio mark { background: var(--badge); color: var(--accent-ink); border-radius: 4px; padding: 0 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
