/* Layout: coluna única de leitura (max 640px); telas de quiz e jornada em formato de app */
:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --soft: #e8efea;
  --ink: #1b2420;
  --muted: #5a6661;
  --line: #dce3de;
  --primary: #1d4f45;
  --primary-ink: #ffffff;
  --accent: #b87a1f;
  --danger: #a43d2f;
  --font-ui: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-read: "Literata", Georgia, "Times New Roman", serif;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111614; --surface: #19201d; --soft: #1f2a26; --ink: #e5ebe8; --muted: #9ba8a2;
    --line: #2b3632; --primary: #6cc0a8; --primary-ink: #0c1311; --accent: #e3a54a; --danger: #e07a6b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111614; --surface: #19201d; --soft: #1f2a26; --ink: #e5ebe8; --muted: #9ba8a2;
  --line: #2b3632; --primary: #6cc0a8; --primary-ink: #0c1311; --accent: #e3a54a; --danger: #e07a6b;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-ui); font-size: 16px; line-height: 1.55;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; }
a { color: var(--primary); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.wrap {
  max-width: 640px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.stack { display: flex; flex-direction: column; gap: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { font-size: .75rem; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.4rem; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; }

/* Barra superior */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; text-decoration: none; color: var(--ink); }
.brand img { width: 28px; height: 28px; }
.link-btn { background: none; border: 0; color: var(--primary); cursor: pointer; padding: .25rem; font-weight: 500; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 52px; padding: .8rem 1.4rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--primary); color: var(--primary-ink); font-weight: 600; font-size: 1.02rem; text-decoration: none;
}
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--primary); border: 1.5px solid var(--line); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Landing */
.hero { padding-block: 1.5rem 2.5rem; display: flex; flex-direction: column; gap: 1.1rem; }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 34ch; }
.hero .meta { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { font-size: .82rem; padding: .3rem .7rem; border-radius: 999px; background: var(--soft); color: var(--ink); }
.section { padding-block: 2rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 1.1rem; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 2.2rem 1fr; gap: .8rem; align-items: start; counter-increment: s; }
.steps li::before {
  content: counter(s); width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--soft); color: var(--primary); font-weight: 700;
}
.day-sample { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; display: flex; flex-direction: column; gap: .7rem; }
.day-sample .row { display: grid; grid-template-columns: 6.5rem 1fr; gap: .75rem; }
.day-sample .row span:first-child { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding-top: .15rem; }
.calendar { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.calendar li { display: grid; grid-template-columns: 7.5rem 1fr; gap: .75rem; padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.calendar li strong { font-variant-numeric: tabular-nums; }
.faq details { border-bottom: 1px solid var(--line); padding-block: .9rem; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin-top: .6rem; color: var(--muted); }
.notice { background: var(--soft); border-radius: var(--radius); padding: 1rem 1.1rem; font-size: .92rem; }
.footer { padding-block: 2rem 3rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1rem; font-size: .85rem; color: var(--muted); }

/* Quiz */
.quiz { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--primary); width: 0; transition: width .3s; }
.quiz-body { flex: 1; display: flex; flex-direction: column; gap: 1.2rem; padding-block: 1.5rem; }
.quiz-body .q { font-size: 1.35rem; font-weight: 700; line-height: 1.25; text-wrap: balance; }
.options { display: flex; flex-direction: column; gap: .6rem; }
.option {
  text-align: left; width: 100%; padding: 1rem 1.1rem; border-radius: var(--radius); cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); font-weight: 500;
}
.option[aria-pressed="true"] { border-color: var(--primary); background: var(--soft); }
.field { width: 100%; padding: .95rem 1rem; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--surface); }
textarea.field { min-height: 7rem; resize: vertical; }
.quiz-foot { position: sticky; bottom: 0; padding-block: 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); background: var(--bg); display: flex; flex-direction: column; gap: .6rem; }
.check { display: grid; grid-template-columns: 1.4rem 1fr; gap: .7rem; align-items: start; padding: 1rem; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; accent-color: var(--primary); }

/* Carregamento */
.loading { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; gap: 1.2rem; }
.loading ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .7rem; }
.loading li { color: var(--muted); transition: color .3s; }
.loading li.done { color: var(--ink); }
.loading li.done::before { content: "✓ "; color: var(--primary); font-weight: 700; }

/* Oferta */
.plan-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; display: flex; flex-direction: column; gap: .6rem; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.plan {
  position: relative; text-align: left; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 1.1rem 1rem; cursor: pointer; display: flex; flex-direction: column; gap: .25rem; min-width: 0;
}
.plan[aria-pressed="true"] { border: 2px solid var(--primary); }
.plan .tag { position: absolute; top: -.7rem; left: 1rem; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .06em; padding: .15rem .55rem; border-radius: 999px; text-transform: uppercase; }
.plan .price { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.benefits { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .8rem; }
.benefits li { display: grid; grid-template-columns: 1.3rem 1fr; gap: .6rem; }
.benefits li::before { content: "✓"; color: var(--primary); font-weight: 700; }
.paybar { position: sticky; bottom: 0; background: var(--bg); padding-block: .9rem calc(.9rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .5rem; text-align: center; }

/* Jornada */
.journey-head { display: flex; flex-direction: column; gap: .6rem; padding-block: .5rem 1rem; }
.bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; gap: .9rem; }
.read { font-family: var(--font-read); font-size: 1.08rem; line-height: 1.7; }
.ref { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--primary); }
.block-label { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.passo { border-left: 3px solid var(--accent); padding-left: .9rem; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: .4rem; }
.days button {
  aspect-ratio: 1; max-width: 100%; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; padding: 0;
}
.days button.done { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.days button.today { outline: 2px solid var(--accent); outline-offset: 1px; }
.days button[disabled] { opacity: .4; cursor: not-allowed; }
.tabs { display: flex; gap: .5rem; flex-wrap: wrap; }
.status-ok { color: var(--primary); font-weight: 600; }
.error { color: var(--danger); font-size: .9rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 380px) { .plans { grid-template-columns: 1fr; } }
