/* SpeakRoute — Checkpoint da Rota 1 · Teacher Ana Maira */

:root {
  --burgundy: #5E1A26;
  --burgundy-2: #7A2433;
  --burgundy-ink: #4A1520;
  --brown: #3E2A21;
  --brown-2: #5A4034;
  --muted: #6A564B;
  --offwhite: #FAF6EF;
  --paper: #FFFDF9;
  --line: #E6DCCD;
  --gold: #B48A3C;
  --gold-soft: #E9D7AE;
  --ok: #2F5A2A;
  --warn: #8A5300;
  --bad: #8E1B2C;
  --focus: #B48A3C;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(62, 42, 33, .06), 0 8px 24px rgba(62, 42, 33, .07);
  --font-title: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Poppins', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--offwhite);
  color: var(--brown);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 24px 16px 48px; outline: none; }
h1, h2, h3 { font-family: var(--font-title); color: var(--burgundy); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3.6vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--burgundy-2); }
[hidden] { display: none !important; }
[tabindex="-1"]:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--paper); padding: 8px 14px; z-index: 100; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* Header / footer */
.site-header { background: var(--burgundy); color: var(--offwhite); border-bottom: 3px solid var(--gold); }
.site-header__inner { max-width: 860px; margin: 0 auto; padding: 12px 16px; }
.brandmark { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brandmark__route { font-family: var(--font-title); font-weight: 700; font-size: 1.2rem; letter-spacing: .02em; }
.brandmark__sep { color: var(--gold-soft); font-size: .7rem; }
.brandmark__sig { font-size: .9rem; color: var(--gold-soft); }
.site-footer { text-align: center; padding: 28px 16px 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.site-footer__tagline { font-family: var(--font-title); color: var(--burgundy); font-size: 1.1rem; font-style: italic; margin-bottom: .2em; }
.site-footer__sig { margin-bottom: .4em; }
.site-footer__note { max-width: 560px; margin: 0 auto; }

/* Cards */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 20px; margin-bottom: 20px; }
@media (min-width: 640px) { .card { padding: 32px; } }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.eyebrow--dark { color: var(--brown-2); }
.lead { font-size: 1.05rem; color: var(--brown-2); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.gold-rule { width: 64px; height: 3px; background: var(--gold); border: 0; margin: 16px 0 20px; border-radius: 2px; }

/* Start */
.hero { text-align: left; }
.hero__sig { font-family: var(--font-title); font-style: italic; color: var(--brown-2); margin-top: -4px; }
.facts { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.facts li { display: flex; gap: 12px; align-items: flex-start; }
.facts li::before { content: '◆'; color: var(--gold); font-size: .7rem; margin-top: .45em; flex: none; }
.resume-box { border: 2px solid var(--gold); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; background: #FFF9EC; }
.resume-box h2 { font-size: 1.2rem; }

/* Forms */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--brown); }
.field input {
  width: 100%; font: inherit; font-size: 1rem; padding: 14px 14px; min-height: 52px;
  border: 1.5px solid #C9B9A5; border-radius: var(--radius-sm); background: #fff; color: var(--brown);
}
.field input:focus { border-color: var(--burgundy); outline: 3px solid var(--gold-soft); outline-offset: 0; }
.field input[aria-invalid="true"] { border-color: var(--bad); }
.field__error { color: var(--bad); font-size: .9rem; margin-top: 6px; font-weight: 500; }
.privacy { font-size: .9rem; color: var(--muted); background: var(--offwhite); border-left: 3px solid var(--gold); padding: 10px 14px; border-radius: 0 8px 8px 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  min-height: 52px; padding: 14px 22px; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--burgundy); color: #fff; border-color: var(--burgundy); }
.btn--primary:hover { background: var(--burgundy-ink); }
.btn--gold { background: var(--gold); color: #1F140F; border-color: var(--gold); }
.btn--gold:hover { background: #A07A31; }
.btn--ghost { background: transparent; color: var(--burgundy); border-color: var(--burgundy); }
.btn--ghost:hover { background: #F3E9E4; }
.btn--quiet { background: transparent; color: var(--brown-2); border-color: transparent; text-decoration: underline; min-height: 44px; padding: 10px 12px; }
.btn--danger { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn--whatsapp { background: #1E6B3E; color: #fff; border-color: #1E6B3E; font-size: 1.05rem; }
.btn--whatsapp:hover { background: #17532F; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row--split { justify-content: space-between; }

/* Test header */
.test-top { position: sticky; top: 0; z-index: 20; background: rgba(250, 246, 239, .97); backdrop-filter: blur(6px); padding: 12px 0 10px; margin: -24px 0 16px; border-bottom: 1px solid var(--line); }
.progress-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .9rem; color: var(--brown-2); margin-bottom: 6px; flex-wrap: wrap; }
.progress-meta strong { color: var(--burgundy); }
.progress { height: 10px; background: #EADFCF; border-radius: 999px; overflow: hidden; }
.progress__bar { height: 100%; background: linear-gradient(90deg, var(--burgundy), var(--burgundy-2)); border-radius: 999px; transition: width .25s ease; }
.saved-note { font-size: .8rem; color: var(--muted); }

.theme-nav { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 8px; scrollbar-width: thin; }
.theme-nav__btn {
  flex: none; min-width: 48px; min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper);
  font: inherit; font-size: .85rem; font-weight: 600; color: var(--brown-2); cursor: pointer; padding: 4px 8px; line-height: 1.1;
}
.theme-nav__btn small { display: block; font-weight: 500; font-size: .68rem; color: var(--muted); }
.theme-nav__btn.is-complete { border-color: var(--gold); }
.theme-nav__btn.is-complete small { color: var(--ok); }
.theme-nav__btn[aria-current="step"] { background: var(--burgundy); color: #fff; border-color: var(--burgundy); }
.theme-nav__btn[aria-current="step"] small { color: var(--gold-soft); }

.theme-head { margin-bottom: 8px; }
.theme-head__emoji { font-size: 1.6rem; margin-right: 6px; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; font-family: var(--font-body); font-size: .95rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brown-2); }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.section-title span.focus { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); }

/* Questions */
.question { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); padding: 18px 16px; margin: 0 0 16px; box-shadow: var(--shadow); scroll-margin-top: 140px; }
.question.is-answered { border-color: #D8C49B; }
.question.is-flagged { border: 2px solid var(--bad); }
.question legend { float: left; padding: 0; margin-bottom: 12px; font-size: 1.05rem; font-weight: 500; color: var(--brown); width: 100%; }
.question__num { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.options { display: grid; gap: 10px; clear: both; }
.option { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 14px; border: 1.5px solid #D9CCBA; border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .12s, background-color .12s; }
.option:hover { border-color: var(--burgundy-2); }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option__letter { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--brown-2); display: grid; place-items: center; font-weight: 600; font-size: .9rem; color: var(--brown-2); text-transform: lowercase; }
.option__text { flex: 1; }
.option:has(input:checked) { border-color: var(--burgundy); background: #F7EDEA; }
.option:has(input:checked) .option__letter { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }
.option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
/* fallback sem :has */
.option.is-checked { border-color: var(--burgundy); background: #F7EDEA; }
.option.is-checked .option__letter { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }

.step-footer { margin-top: 24px; }
.step-footer__status { font-size: .92rem; color: var(--brown-2); margin-bottom: 12px; }
.pause-note { margin-top: 16px; padding: 14px 16px; border-radius: 12px; border: 1px dashed var(--gold); background: #FFF9EC; font-size: .92rem; }

.banner { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: .92rem; border-left: 4px solid; background: var(--paper); }
.banner--warn { border-color: var(--warn); }
.banner--error { border-color: var(--bad); }

/* Review (antes de entregar) */
.missing-group { margin-bottom: 16px; }
.missing-group h3 { font-family: var(--font-body); font-size: 1rem; color: var(--brown); margin-bottom: 8px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chip-btn { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--bad); background: #fff; color: var(--bad); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; }
.chip-btn:hover { background: #F7EDEA; }
.all-done { color: var(--ok); font-weight: 600; }

/* Results */
.result-hero { text-align: center; background: var(--burgundy); color: var(--offwhite); border: 0; position: relative; overflow: hidden; }
.result-hero::before { content: ''; position: absolute; inset: 10px; border: 1px solid rgba(233, 215, 174, .45); border-radius: 10px; pointer-events: none; }
.result-hero h1, .result-hero h2 { color: #fff; }
.result-hero .eyebrow { color: var(--gold-soft); }
.result-hero__name { font-family: var(--font-title); font-size: clamp(1.5rem, 4.5vw, 2.1rem); margin-bottom: 2px; color: #fff; }
.result-hero__date { color: var(--gold-soft); font-size: .9rem; }
.big-pct { font-family: var(--font-title); font-weight: 700; font-size: clamp(3.4rem, 15vw, 5.2rem); line-height: 1; margin: 18px 0 6px; color: #fff; }
.big-pct small { font-size: .45em; color: var(--gold-soft); }
.result-hero__hits { font-size: 1.05rem; margin-bottom: 8px; }
.result-hero__band { display: inline-block; background: rgba(255, 255, 255, .1); border: 1px solid var(--gold); border-radius: 999px; padding: 8px 18px; font-weight: 500; }

.stat-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 20px; }
@media (min-width: 560px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat__label { font-size: .82rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--brown-2); }
.stat__value { font-family: var(--font-title); font-size: 2rem; color: var(--burgundy); font-weight: 700; line-height: 1.1; margin: 4px 0; }
.stat__sub { font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.meter { height: 8px; background: #EADFCF; border-radius: 999px; overflow: hidden; }
.meter__bar { height: 100%; background: var(--gold); border-radius: 999px; }

.reco { border-left: 5px solid var(--gold); }
.reco.is-ok { border-left-color: var(--ok); }
.reco__note { font-size: .9rem; color: var(--muted); margin: 0; }

@media (prefers-reduced-motion: reduce) { .progress__bar { transition: none; } }

.actions { display: grid; gap: 12px; margin-bottom: 24px; }
@media (min-width: 640px) { .actions { grid-template-columns: 1fr 1fr; } }
.wa-card { border: 2px solid #1E6B3E; text-align: center; }
.wa-card h2 { color: #1E6B3E; }
.wa-note { font-size: .85rem; color: var(--muted); margin: -4px 0 20px; text-align: center; }

.badge { display: inline-block; font-size: .74rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; color: #fff; white-space: nowrap; vertical-align: middle; }
.badge--consolidated { background: var(--ok); }
.badge--review { background: var(--warn); }
.badge--priority { background: var(--bad); }

.theme-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.theme-table caption { text-align: left; color: var(--muted); font-size: .85rem; padding-bottom: 8px; }
.theme-table th, .theme-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.theme-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brown-2); }
.theme-table .score { font-weight: 600; color: var(--brown); display: block; }
.theme-table .pctl { color: var(--muted); font-size: .85rem; }
@media (max-width: 639px) {
  .theme-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .theme-table, .theme-table tbody, .theme-table tr, .theme-table th, .theme-table td { display: block; width: 100%; }
  .theme-table tr { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; background: #fff; }
  .theme-table th[scope="row"] { border: 0; padding: 0 0 6px; font-family: var(--font-title); color: var(--burgundy); font-size: 1.05rem; }
  .theme-table caption { display: block; width: 100%; }
  .theme-table td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
  .theme-table td::before { content: attr(data-label); font-weight: 600; color: var(--brown-2); font-size: .85rem; }
  .theme-table .cellwrap { text-align: right; }
}

.list-clean { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.strengths { display: flex; flex-wrap: wrap; gap: 8px; }
.strength { flex: 1 1 260px; display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }

.prio { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 18px 16px; margin-bottom: 16px; }
.prio__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 4px; }
.prio__head h3 { margin: 0; }
.prio__focus { font-size: .88rem; color: var(--muted); margin-bottom: 12px; }
.skill { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.skill h4 { margin: 0 0 6px; font-size: 1rem; color: var(--brown); }
.skill dl { margin: 0; display: grid; gap: 6px; }
.skill dt { font-size: .76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.skill dd { margin: 0 0 4px; }
.example-en { font-weight: 600; color: var(--burgundy); }
.example-pt { color: var(--muted); font-size: .92rem; }

.plan { padding-left: 1.3em; margin: 0; }
.plan li { margin-bottom: 10px; padding-left: 4px; }
.plan li::marker { color: var(--gold); font-weight: 700; }

.observation { font-size: .92rem; color: var(--brown-2); background: #FFF9EC; border: 1px solid var(--gold-soft); border-radius: 12px; padding: 14px 16px; }

details.answers { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); margin-bottom: 20px; box-shadow: var(--shadow); }
details.answers > summary { cursor: pointer; padding: 18px 20px; font-family: var(--font-title); font-size: 1.25rem; color: var(--burgundy); font-weight: 700; min-height: 52px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.answers > summary::-webkit-details-marker { display: none; }
details.answers > summary::after { content: '+'; font-family: var(--font-body); font-size: 1.5rem; color: var(--gold); }
details.answers[open] > summary::after { content: '–'; }
.answers__body { padding: 0 20px 20px; }
.answers__theme { margin: 18px 0 8px; font-size: 1.05rem; }
.answer { border-left: 4px solid var(--line); padding: 10px 12px; margin-bottom: 10px; background: #fff; border-radius: 0 10px 10px 0; }
.answer.is-right { border-left-color: var(--ok); }
.answer.is-wrong { border-left-color: var(--bad); }
.answer__q { font-weight: 500; margin-bottom: 6px; }
.answer__line { font-size: .92rem; margin: 0 0 2px; }
.answer__tag { font-weight: 600; }
.answer.is-right .answer__tag { color: var(--ok); }
.answer.is-wrong .answer__tag { color: var(--bad); }
.answer__exp { font-size: .9rem; color: var(--muted); margin: 6px 0 0; }

/* Dialog */
.dialog { border: 0; border-radius: var(--radius); padding: 0; max-width: 440px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); color: var(--brown); background: var(--paper); }
.dialog::backdrop { background: rgba(40, 20, 16, .55); }
.dialog__inner { padding: 24px 20px; }
.dialog__title { font-size: 1.35rem; }
.dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* Print */
.print-only { display: none; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 11pt; color: #000; }
  .site-header, .skip-link, .actions, .wa-note, .no-print, .dialog, .theme-nav, .test-top { display: none !important; }
  .print-only { display: block; }
  main { max-width: none; padding: 0; }
  .card, .stat, .prio, details.answers { box-shadow: none; break-inside: avoid; }
  .prio, .theme-table tr, .answer { break-inside: avoid; }
  .result-hero { background: #fff !important; color: #000; border: 2px solid var(--burgundy); }
  .result-hero::before { display: none; }
  .result-hero *, .result-hero h1, .result-hero h2 { color: var(--burgundy) !important; }
  .result-hero__band { border-color: var(--gold); background: #fff; }
  .badge { color: #000 !important; background: #fff !important; border: 1px solid #000; }
  details.answers:not([open]) { display: none; }
  .site-footer { border-top: 1px solid #ccc; }
  a[href]::after { content: ''; }
}
