/* Identidade: violeta vibrante como cor de marca, amarelo como destaque de ação,
   verde/vermelho reservados para correção. Mobile-first. */
@font-face {
  font-family: 'Jakarta';
  src: url('/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jakarta';
  src: url('/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --bg: #f6f5fc;
  --surface: #efedf9;
  --card: #ffffff;
  --text: #13112e;
  --muted: #5d5b7a;
  --border: #e2dff2;
  --accent: #5b3df5;
  --accent-strong: #4526e0;
  --accent-text: #ffffff;
  --accent-soft: #eeeaff;
  --highlight: #ffd23f;
  --highlight-text: #1d1442;
  --hero-1: #4a25e1;
  --hero-2: #7b2ff7;
  --hero-3: #2f7bf6;
  --ok: #18794e;
  --ok-soft: #e3f7ec;
  --bad: #c0262d;
  --bad-soft: #fdeceb;
  --warn: #8a5a00;
  --warn-soft: #fff4d6;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgb(30 20 90 / .06), 0 1px 1px rgb(30 20 90 / .04);
  --shadow-md: 0 10px 30px -12px rgb(60 30 180 / .25), 0 2px 6px rgb(30 20 90 / .06);
  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0d1f;
    --surface: #17162e;
    --card: #1a1934;
    --text: #eeecff;
    --muted: #a9a7c9;
    --border: #2c2a4d;
    --accent: #8f7dff;
    --accent-strong: #a597ff;
    --accent-text: #120b33;
    --accent-soft: #272254;
    --highlight: #ffd23f;
    --highlight-text: #1d1442;
    --hero-1: #3a1fc0;
    --hero-2: #6424d6;
    --hero-3: #2463d4;
    --ok: #4fd18b;
    --ok-soft: #12301f;
    --bad: #ff8a87;
    --bad-soft: #3a1a20;
    --warn: #f3c262;
    --warn-soft: #332914;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
    --shadow-md: 0 12px 30px -12px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Jakarta, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.02em; font-weight: 800; }
p { margin: 0 0 .75rem; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

.container { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
main { padding-top: 20px; padding-bottom: 96px; outline: none; }
main:focus, main:focus-visible { box-shadow: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--card); padding: 8px 12px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }

/* Cabeçalho */
.site-header {
  position: sticky; top: 0; z-index: 5; color: #fff;
  background: linear-gradient(90deg, var(--hero-1), var(--hero-2));
  border-bottom: 1px solid rgb(255 255 255 / .14);
  box-shadow: 0 6px 20px -12px rgb(20 8 80 / .6);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: #fff; text-decoration: none; font-size: 1.12rem; letter-spacing: -.02em; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #fff; color: var(--hero-1); box-shadow: 0 4px 12px -4px rgb(0 0 0 / .4); }
.brand-mark svg { width: 18px; height: 18px; stroke: currentColor; }
.site-nav { display: flex; gap: 4px; align-items: center; }
.site-nav a { color: rgb(255 255 255 / .85); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: #fff; background: rgb(255 255 255 / .14); }
.site-nav a[aria-current="page"] { color: #fff; background: rgb(255 255 255 / .2); }
.site-nav .nav-cta { background: var(--highlight); color: var(--highlight-text); font-weight: 700; }
.site-nav .nav-cta:hover, .site-nav .nav-cta[aria-current="page"] { background: #ffdc5e; color: var(--highlight-text); }
.site-header .btn { background: rgb(255 255 255 / .12); border-color: rgb(255 255 255 / .35); color: #fff; }
.site-header .btn:hover:not(:disabled) { background: rgb(255 255 255 / .22); border-color: #fff; color: #fff; }
.site-header :focus-visible { box-shadow: 0 0 0 3px rgb(255 210 63 / .7); }
/* Durante a resolução, a navegação some para não distrair. */
body.focus-mode .site-nav { display: none; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--card); color: var(--text);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease;
}
.btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); box-shadow: 0 6px 16px -8px var(--accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-text); box-shadow: 0 10px 22px -10px var(--accent); }
.btn-highlight { background: var(--highlight); border-color: var(--highlight); color: var(--highlight-text); box-shadow: 0 10px 24px -10px rgb(0 0 0 / .45); }
.btn-highlight:hover:not(:disabled) { background: #ffdc5e; border-color: #ffdc5e; color: var(--highlight-text); transform: translateY(-1px); }
.btn-ghost { background: rgb(255 255 255 / .12); border-color: rgb(255 255 255 / .35); color: #fff; }
.btn-ghost:hover:not(:disabled) { background: rgb(255 255 255 / .2); border-color: #fff; color: #fff; }
.btn-danger { color: var(--bad); }
.btn-lg { min-height: 54px; padding: 0 24px; font-size: 1.05rem; border-radius: 14px; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .9rem; border-radius: 10px; }
.btn-block { display: flex; width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Blocos */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.section { margin-top: 32px; }
.section-title { font-size: 1.15rem; }
.page-title { font-size: 1.6rem; margin-bottom: 16px; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 36em; }
.empty { text-align: center; padding: 40px 16px; border: 1px dashed var(--border); border-radius: var(--radius); }
.empty p { color: var(--muted); }
.notice { display: block; padding: 10px 12px; border-radius: 8px; margin: 8px 0; }
.notice-error { background: var(--bad-soft); color: var(--bad); }
.notice-warn { background: var(--warn-soft); color: var(--warn); }
.notice-ok { background: var(--ok-soft); color: var(--ok); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--card);
  color: var(--text); text-decoration: none; font: inherit; font-size: .92rem; cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip-count { color: var(--muted); font-size: .85em; }

/* Formulários */
.field { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: .85rem; font-weight: 600; color: var(--muted); }
input[type="search"], input[type="text"], input[type="number"], input[type="password"], input[type="email"], input[type="url"], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--text); font: inherit;
}
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.field-msg { font-size: .9rem; margin: 6px 0 0; min-height: 1.2em; }
.field-msg-error { color: var(--bad); }

/* Filtros */
.filters { display: flex; flex-direction: column; gap: 10px; }
.filters-more summary { cursor: pointer; font-weight: 600; padding: 6px 0; color: var(--muted); }
.filters-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
@media (min-width: 720px) { .filters-grid { grid-template-columns: repeat(3, 1fr); } }
.filters-more .btn-link { margin-top: 10px; }

/* Lista de questões */
.result-count { margin: 16px 0 8px; }
.q-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.q-card .q-excerpt { margin: 8px 0 4px; white-space: pre-line; }
.context { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .78rem; font-weight: 600; background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.badge-past { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge-cat { background: var(--highlight); color: var(--highlight-text); border-color: transparent; }
.badge-demo { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.meta { font-size: .85rem; color: var(--muted); margin: 4px 0 10px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); border-top: 1px solid var(--border); backdrop-filter: blur(6px); }
.sticky-cta .btn { max-width: 728px; margin: 0 auto; }

/* Configuração */
.setup { display: flex; flex-direction: column; gap: 18px; }
.setup-block { border: 0; padding: 0; margin: 0; min-width: 0; }
.setup-block legend { font-weight: 700; font-size: 1.05rem; margin-bottom: 10px; padding: 0; }
.setup-block:disabled { opacity: .55; }
.available { margin: 10px 0 0; font-weight: 600; }
.count-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.count-row input { width: 110px; }
.modes { display: grid; gap: 10px; }
@media (min-width: 600px) { .modes { grid-template-columns: 1fr 1fr; } }
.mode { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; background: var(--card); }
.mode:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.mode input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; }
.mode small { display: block; color: var(--muted); font-size: .88rem; margin-top: 2px; }

/* Resolução */
.solve-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.solve-mode { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.progress { height: 6px; background: var(--surface); border-radius: 99px; overflow: hidden; margin-top: 12px; border: 1px solid var(--border); }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.progress-text { font-size: .85rem; margin: 6px 0 14px; }
.question { margin-top: 4px; }
.statement { font-size: 1.08rem; white-space: pre-line; margin: 12px 0; }
.q-image { margin: 0 0 14px; }
.q-image img { border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.q-state { display: inline-block; font-size: .82rem; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: var(--surface); color: var(--muted); margin-bottom: 10px; }
.q-state-answered, .q-state-selected { background: var(--accent-soft); color: var(--accent); }
.q-state-correct { background: var(--ok-soft); color: var(--ok); }
.q-state-incorrect { background: var(--bad-soft); color: var(--bad); }

.alternatives { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.alt {
  position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; min-height: 52px;
  border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--card); cursor: pointer;
}
.alt:hover { border-color: var(--muted); }
.alt input { position: absolute; opacity: 0; pointer-events: none; }
.alt:has(input:focus-visible) { box-shadow: var(--focus); }
.alt:has(input:disabled) { cursor: default; }
.alt-letter {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--border); font-weight: 700; font-size: .9rem;
}
.alt-text { flex: 1; padding-top: 2px; }
.alt-checked { border-color: var(--accent); background: var(--accent-soft); }
.alt-checked .alt-letter { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.alt-correct { border-color: var(--ok) !important; background: var(--ok-soft) !important; }
.alt-correct .alt-letter { background: var(--ok); border-color: var(--ok); color: #fff; }
.alt-wrong { border-color: var(--bad) !important; background: var(--bad-soft) !important; }
.alt-wrong .alt-letter { background: var(--bad); border-color: var(--bad); color: #fff; }
.alt-tag { flex: none; align-self: center; font-size: .75rem; font-weight: 700; color: var(--ok); }
.alt-tag-mine { color: var(--muted); }

.feedback { margin-top: 14px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); }
.feedback-ok { border-color: var(--ok); }
.feedback-bad { border-color: var(--bad); }
.feedback-title { font-weight: 700; }
.feedback-ok .feedback-title { color: var(--ok); }
.feedback-bad .feedback-title { color: var(--bad); }
.explanation { background: var(--surface); border-radius: 8px; padding: 10px 12px; margin-top: 8px; }
.explanation p { margin: 4px 0 0; white-space: pre-line; }

.solve-nav { display: flex; justify-content: space-between; gap: 10px; margin: 20px 0 12px; }
.solve-nav .btn { flex: 1; max-width: 220px; }

.qmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; margin-bottom: 14px; }
.qmap-item { min-height: 40px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.qmap-answered, .qmap-selected { background: var(--accent-soft); border-color: var(--accent); }
.qmap-correct { background: var(--ok-soft); border-color: var(--ok); }
.qmap-incorrect { background: var(--bad-soft); border-color: var(--bad); }
.qmap-current { outline: 2px solid var(--text); outline-offset: 1px; }

/* Resultado */
.score { margin-bottom: 8px; }
.score-main { font-size: 1.05rem; color: var(--muted); }
.score-value { display: block; font-size: 2.6rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.stats div { background: var(--surface); border-radius: 8px; padding: 10px; text-align: center; }
.stats dt { font-size: .78rem; color: var(--muted); }
.stats dd { margin: 0; font-size: 1.4rem; font-weight: 700; }
.stat-ok dd { color: var(--ok); }
.stat-bad dd { color: var(--bad); }
@media (max-width: 420px) { .stats { grid-template-columns: 1fr 1fr; } }
.segmented { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.seg { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; }
.seg-on { background: var(--text); color: var(--bg); border-color: var(--text); }
.review { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.review-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.review-num { font-weight: 700; }
.pill { font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: var(--surface); color: var(--muted); }
.pill-correct { background: var(--ok-soft); color: var(--ok); }
.pill-incorrect { background: var(--bad-soft); color: var(--bad); }
.review-alts { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.review-alts li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.review-alts .alt-letter { width: 24px; height: 24px; font-size: .8rem; }

/* Diálogo */
.dialog { border: 1px solid var(--border); border-radius: 14px; padding: 20px; max-width: min(420px, calc(100vw - 32px)); background: var(--card); color: var(--text); }
.dialog::backdrop { background: rgb(0 0 0 / .45); }
.dialog h2 { font-size: 1.15rem; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Fórmulas (MathML gerado pelo KaTeX) */
.katex-display { display: block; margin: .7em 0; overflow-x: auto; overflow-y: hidden; }
.katex math { font-size: 1.12em; font-family: "Cambria Math", "STIX Two Math", "Latin Modern Math", math; }
.alt-text .katex math, .review-alts .katex math { font-size: 1.05em; }

/* ---------- Planos e conta ---------- */
.site-nav .nav-premium::after { content: "★"; margin-left: 6px; color: var(--highlight); }

.locked { margin-top: 10px; padding: 12px 14px; border-radius: 10px; border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--border)); background: var(--accent-soft); }
.locked-title { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-weight: 700; color: var(--accent-strong); }
.locked p.small { margin: 0 0 10px; }
.locked-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.auth { display: grid; place-items: center; padding: 24px 0 40px; }
.auth-card { width: 100%; max-width: 420px; padding: 24px; }
.auth-title { margin: 0 0 4px; font-size: 1.5rem; }
.auth-sub { margin: 0 0 12px; }
.auth-tabs { margin: 12px 0 14px; }
.auth-tabs .seg { flex: 1; }
.auth-form { display: grid; gap: 12px; }
.auth-form input { width: 100%; }
.auth-foot { margin: 14px 0 0; color: var(--muted); }
.btn-google { gap: 10px; background: var(--card); }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 14px 0; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.account { max-width: 640px; margin: 0 auto; }
.account-card { margin-bottom: 14px; padding: 18px; }
.account-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.account-name { margin: 0; font-weight: 800; font-size: 1.15rem; }
.account-head .muted { margin: 2px 0 0; word-break: break-all; }
.plan-badge { flex: none; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface); color: var(--muted); }
.plan-badge.plan-premium { background: var(--highlight); color: var(--highlight-text); }
.plan-badge.plan-free { background: var(--accent-soft); color: var(--accent-strong); }
.usage { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 0; }
.usage div { background: var(--surface); border-radius: 10px; padding: 10px 12px; }
.usage dt { font-size: .8rem; color: var(--muted); font-weight: 600; }
.usage dd { margin: 2px 0 0; font-weight: 700; }
@media (max-width: 480px) { .usage { grid-template-columns: 1fr; } }

.plans { max-width: 960px; margin: 0 auto; padding-bottom: 24px; }
.plans-lead { margin: -4px 0 20px; }
.plan-cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .plan-cards { grid-template-columns: 1fr 1fr 1.3fr; align-items: stretch; } }
.plan-card { position: relative; display: flex; flex-direction: column; padding: 20px; }
.plan-card h2 { margin: 0; font-size: 1.1rem; }
.plan-price { margin: 8px 0 0; font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; }
.plan-price small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.plan-card > .muted { margin: 0 0 12px; }
.plan-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; flex: 1; }
.plan-list li { display: flex; gap: 8px; align-items: flex-start; }
.plan-list svg { flex: none; margin-top: 3px; color: var(--ok); }
.plan-list .plan-off { color: var(--muted); text-decoration: line-through; padding-left: 24px; }
.plan-card-premium { border: 2px solid var(--accent); box-shadow: var(--shadow-md); }
.plan-tag { position: absolute; top: -11px; right: 16px; background: var(--highlight); color: var(--highlight-text); font-size: .75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.plan-current { margin: 0; text-align: center; font-weight: 700; color: var(--accent-strong); padding: 10px; border-radius: 10px; background: var(--accent-soft); }
.plan-actions { display: grid; gap: 8px; }
.plan-actions p { margin: 2px 0 0; }
.plan-table { width: 100%; border-collapse: collapse; margin: 22px 0 10px; font-size: .92rem; }
.plan-table th, .plan-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: center; }
.plan-table th[scope="row"] { text-align: left; font-weight: 600; }
.plan-table .plan-col-premium { background: var(--accent-soft); font-weight: 700; }
.plan-table svg { color: var(--ok); vertical-align: middle; }
.plan-no { color: var(--muted); }
@media (max-width: 560px) { .plan-table { font-size: .82rem; } .plan-table th, .plan-table td { padding: 8px 4px; } }
@media (max-width: 560px) {
  .site-nav { gap: 2px; }
  .site-nav a { padding: 8px 10px; font-size: .9rem; }
  .site-nav #nav-plans { display: none; }
}
@media (max-width: 380px) { .brand-text { display: none; } }

/* ---------- Montar prova (passo a passo) ---------- */
.builder { display: flex; flex-direction: column; gap: 26px; max-width: 860px; margin: 0 auto; padding-bottom: 96px; }
.builder-head .page-title { margin-bottom: 4px; }
.builder-head p { margin: 0; }
.step-title { scroll-margin-top: 84px; display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 1.08rem; }
.step-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: .85rem; font-weight: 800; flex: none; }
.step-hint { margin: 8px 0 0; }

.pick-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 860px) { .pick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pick-grid-2 { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .pick-grid-2 { grid-template-columns: 1fr 1fr; } }
.pick { position: relative; display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--card); color: var(--text); font: inherit; cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color .15s, background .15s, transform .1s; }
.pick strong { font-size: 1rem; line-height: 1.25; }
.pick small { color: var(--muted); font-size: .85rem; }
.pick:hover { border-color: var(--accent); }
.pick:active { transform: scale(.98); }
.pick:focus-visible, .chip:focus-visible, .count-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.pick.is-on { border-color: var(--accent); background: var(--accent-soft); }
.pick.is-on::after { content: ""; position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 10.5l3 3 7-7'/%3E%3C/svg%3E") center / 12px no-repeat; }
.pick-all { border-style: dashed; box-shadow: none; }
.pick-mode { padding: 16px 18px; }
.pick-mode strong { font-size: 1.05rem; }

.builder .chip { cursor: pointer; font: inherit; font-size: .92rem; }
.chip.is-on, .chip.is-on:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.chip.is-on .chip-count { color: inherit; opacity: .8; }

.count-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.count-btn { min-width: 58px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.count-btn:hover { color: var(--accent); }
.count-btn.is-on { background: var(--card); color: var(--accent-strong); box-shadow: var(--shadow-sm); }

.more { border-top: 1px solid var(--border); padding-top: 14px; }
.more summary { cursor: pointer; font-weight: 700; }
.more summary .muted { font-weight: 400; font-size: .9rem; }
.more-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: .75rem; }
.more .filters-grid { margin-top: 12px; }
@media (min-width: 640px) { .more .filters-grid { grid-template-columns: repeat(3, 1fr); } }
.more .btn-link { margin-top: 10px; }

.start-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.start-info { display: flex; flex-direction: column; min-width: 0; }
.start-info .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.start-bar .btn { flex: none; min-width: 140px; }
@media (max-width: 480px) { .start-bar .btn { min-width: 0; padding-inline: 18px; } }
.filters-main { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .filters-main { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.filters-main .field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.filters-foot { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 16px; }
.filters-foot .filters-more { flex: 1 1 100%; order: 2; }
.filters-foot .filters-more:not([open]) { flex: 0 1 auto; order: 0; }
.filters-clear { padding: 6px 0; }

/* Passos que se fecham + listas que crescem */
.wsteps { display: flex; flex-direction: column; gap: 10px; }
.wstep { border: 1px solid var(--border); border-radius: 18px; background: var(--card); box-shadow: var(--shadow-sm); }
.wstep.is-open { padding: 18px; border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); box-shadow: var(--shadow-md); }
@media (min-width: 640px) { .wstep.is-open { padding: 22px 24px; } }
.wstep.is-locked { background: transparent; box-shadow: none; border-style: dashed; }
.wstep.is-locked .wstep-title { margin: 0; padding: 14px 18px; color: var(--muted); font-size: 1rem; font-weight: 700; }
.wstep.is-locked .step-n { background: var(--surface); color: var(--muted); }
.wstep-title { scroll-margin-top: 84px; display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1.1rem; }
.wstep-body { display: flex; flex-direction: column; gap: 12px; }
.wstep-body > .field-label { margin: 6px 0 -4px; font-weight: 700; color: var(--text); }
.wstep-row { scroll-margin-top: 84px; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border: 0; border-radius: 18px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.wstep-row:hover .wstep-edit { text-decoration: underline; }
.wstep-row:focus-visible { outline: none; box-shadow: var(--focus); }
.wstep.is-done .step-n { background: var(--ok); color: #fff; }
.wstep-sum { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wstep-sum small { color: var(--muted); font-size: .8rem; }
.wstep-sum strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wstep-edit { color: var(--accent); font-weight: 700; font-size: .9rem; flex: none; }

.picker-search input { width: 100%; min-height: 48px; padding-left: 42px; font-size: 1rem; border-radius: 12px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a87ad' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 14px center / 18px no-repeat; }
.tabs-scroll { display: flex; flex-wrap: wrap; gap: 6px; }
.tab { flex: none; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--muted); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--accent); border-color: var(--accent); }
.tab.is-on { background: var(--text); border-color: var(--text); color: var(--bg); }
.tab:focus-visible { outline: none; box-shadow: var(--focus); }
.picker-label { margin: 2px 0 -4px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.row-list { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .row-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.row-pick { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.row-pick:hover { border-color: var(--accent); }
.row-pick:focus-visible { outline: none; box-shadow: var(--focus); }
.row-pick.is-on { border-color: var(--accent); background: var(--accent-soft); }
.row-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.row-main small { color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-count { flex: none; font-size: .8rem; font-weight: 700; color: var(--muted); background: var(--surface); padding: 3px 9px; border-radius: 999px; }
.row-pick.is-on .row-count { background: var(--accent); color: var(--accent-text); }
.picker-more { margin-top: 2px; }
.picker-more-link { align-self: flex-start; }
.picker-empty { margin: 4px 0; color: var(--muted); }
.picker-alt { margin: 0; text-align: center; font-size: .92rem; }
.builder .start-bar { margin-top: 6px; }

/* Seletor de período do Premium (semanal / mensal / anual) */
.period-seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 4px; margin: 12px 0 2px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.period-btn { position: relative; min-width: 0; min-height: 36px; padding: 0 4px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; }
.period-btn:hover { color: var(--accent); }
.period-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.period-btn.is-on { background: var(--card); color: var(--accent-strong); box-shadow: var(--shadow-sm); }
.period-off { position: absolute; top: -9px; right: -2px; padding: 1px 6px; border-radius: 999px; background: var(--highlight); color: var(--highlight-text); font-size: .66rem; font-weight: 800; }

.verify-box p { margin: 0; }
.verify-box p + p { margin-top: 4px; }
