/* Perguntas da Especialidade com a identidade da Dioscope (proposta, 2026-09-29).
   Base: o desenho do dioscope.com (homepage do Ricardo, topo.css, interior.css):
   fundo #f4f7fb, texto navy #0c2c3d, azul #357ded nos destaques grandes e #245fcf
   em botoes e links (AA), Poppins leve nos titulos, etiquetas em maiusculas
   espacadas, botoes em pilula, cartoes de vidro com linha fina.
   Adaptacao a' PE: logotipo proprio, etiqueta PNA 2027, a folha de respostas
   (bolhas A-E) no lugar das esferas de particulas e as cores de estado do estudo
   (certa, errada, marcada). Prefixo pe-. Tudo por tokens: o tema escuro so' troca
   variaveis. */

/* ---------- Fontes (auto-hospedadas, como no dioscope.com) ---------- */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/poppins-300-latin-ext.woff2) format('woff2'); 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; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/poppins-300-latin.woff2) format('woff2'); 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: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/poppins-400-latin-ext.woff2) format('woff2'); 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; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/poppins-400-latin.woff2) format('woff2'); 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: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/poppins-500-latin-ext.woff2) format('woff2'); 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; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/poppins-500-latin.woff2) format('woff2'); 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: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/poppins-600-latin-ext.woff2) format('woff2'); 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; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/poppins-600-latin.woff2) format('woff2'); 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: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/poppins-700-latin-ext.woff2) format('woff2'); 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; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/poppins-700-latin.woff2) format('woff2'); 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; }

/* ---------- Tokens ---------- */
:root {
  /* marca (iguais ao dioscope.com) */
  --pe-navy: #0c2c3d;          /* texto principal, botao escuro */
  --pe-blue: #357ded;          /* destaques grandes: numeros, palavra em azul no titulo, graficos */
  --pe-blue-strong: #245fcf;   /* botoes e links com texto branco/sobre branco: 5,6:1 (AA) */
  --pe-blue-deep: #1b4aa6;     /* hover de links */
  --pe-blue-soft: #e8f0fd;     /* fundos de realce, item ativo */
  --pe-btn: #245fcf;           /* fundo do botao principal: branco por cima a 5,6:1 nos dois temas */
  --pe-aqua: #94d2df;          /* anel do logotipo; apontamentos, nunca texto */
  --pe-aqua-2: #8bcbd3;

  /* superficies */
  --pe-bg: #f4f7fb;
  --pe-bg-rgb: 244,247,251;
  --pe-surface: #ffffff;
  --pe-card: rgba(255,255,255,.72);
  --pe-glass: rgba(255,255,255,.6);
  --pe-glass-2: rgba(255,255,255,.86);
  --pe-sunk: #eaf0f7;          /* poços: barras de progresso, campos desativados */

  /* texto */
  --pe-ink: #0c2c3d;
  --pe-ink-2: #3b4d5e;         /* corpo */
  --pe-ink-3: #5d6f81;         /* secundario: 4,9:1 no fundo */
  --pe-on-blue: #ffffff;

  /* linhas e sombras */
  --pe-line: rgba(12,44,61,.12);
  --pe-line-2: rgba(12,44,61,.2);
  --pe-shadow: 0 1px 2px rgba(12,44,61,.04), 0 8px 24px rgba(12,44,61,.06);
  --pe-shadow-lift: 0 2px 4px rgba(12,44,61,.05), 0 18px 40px rgba(12,44,61,.12);
  --pe-glow: radial-gradient(50% 90% at 88% 0%, rgba(53,125,237,.13), transparent 70%);
  --pe-glow-left: radial-gradient(45% 80% at 8% 10%, rgba(53,125,237,.10), transparent 70%);
  --pe-grad: linear-gradient(90deg, #2158de 0%, #638ae8 100%); /* gradiente da marca (variante E) */
  --pe-tint: linear-gradient(135deg, #dfe9f8 0%, #e9f0fb 45%, #ffffff 100%);

  /* estados do estudo */
  --pe-ok: #1d7a52;       --pe-ok-bg: #e6f4ec;    --pe-ok-line: #9fd3b6;
  --pe-bad: #b3372c;      --pe-bad-bg: #fbeceb;   --pe-bad-line: #eeb1ab;
  --pe-flag: #8a5a0b;     --pe-flag-bg: #fdf3e1;  --pe-flag-line: #efcf8f;
  --pe-info: var(--pe-blue-strong); --pe-info-bg: var(--pe-blue-soft);

  /* graficos: tu, a coorte, referencia */
  --pe-c1: #357ded; --pe-c2: #0c2c3d; --pe-c3: #8bcbd3; --pe-c4: #9fb3c8;

  /* forma e ritmo */
  --pe-r-sm: 10px; --pe-r: 16px; --pe-r-lg: 22px; --pe-r-pill: 999px;
  --pe-ease: cubic-bezier(.215,.61,.355,1);
  --pe-ease-soft: cubic-bezier(.5,1,.89,1);
  --pe-font: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --pe-side-w: 248px;
  --pe-top-h: 72px;
  --pe-pad-x: 20px;
  color-scheme: light;
}
@media (min-width: 768px)  { :root { --pe-pad-x: 32px; } }
@media (min-width: 1024px) { :root { --pe-pad-x: 48px; } }
@media (min-width: 1366px) { :root { --pe-pad-x: 120px; } }

/* Tema escuro (estudo a' noite): so' troca tokens. Opcao do aluno nas Definicoes. */
[data-tema="escuro"] {
  --pe-bg: #081a29; --pe-bg-rgb: 8,26,41;
  --pe-surface: #0e2436; --pe-card: rgba(255,255,255,.04); --pe-glass: rgba(255,255,255,.07); --pe-glass-2: rgba(14,36,54,.92);
  --pe-sunk: rgba(255,255,255,.08);
  --pe-ink: #ffffff; --pe-ink-2: #c3ccd6; --pe-ink-3: #93a1b0;
  --pe-blue-strong: #5b93f2; --pe-blue-deep: #8ab2ff; --pe-blue-soft: rgba(53,125,237,.16);
  --pe-line: rgba(255,255,255,.1); --pe-line-2: rgba(255,255,255,.18);
  --pe-shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25); --pe-shadow-lift: 0 18px 40px rgba(0,0,0,.4);
  --pe-glow: radial-gradient(50% 90% at 88% 0%, rgba(53,125,237,.22), transparent 70%);
  --pe-tint: linear-gradient(135deg, #0a2540 0%, #0c2c3d 45%, #16437a 100%);
  --pe-ok: #6fd39f; --pe-ok-bg: rgba(111,211,159,.12); --pe-ok-line: rgba(111,211,159,.4);
  --pe-bad: #ff9a8f; --pe-bad-bg: rgba(255,154,143,.12); --pe-bad-line: rgba(255,154,143,.4);
  --pe-flag: #f3c46b; --pe-flag-bg: rgba(243,196,107,.12); --pe-flag-line: rgba(243,196,107,.4);
  --pe-c2: #c3ccd6;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.pe, .pe-scope {
  margin: 0; font-family: var(--pe-font); font-weight: 300; font-size: 16px; line-height: 1.6;
  color: var(--pe-ink-2); background: var(--pe-bg); -webkit-font-smoothing: antialiased;
}
.pe-scope { background: var(--pe-bg); }
/* base com especificidade zero (:where) para os componentes ganharem sempre */
:where(.pe, .pe-scope) :where(h1,h2,h3,h4,p,ul,ol,figure) { margin: 0; }
:where(.pe, .pe-scope) :where(h1,h2,h3,h4) { color: var(--pe-ink); font-weight: 400; letter-spacing: -.02em; line-height: 1.15; }
:where(.pe, .pe-scope) :where(img) { max-width: 100%; display: block; }
:where(.pe, .pe-scope) :where(a) { color: var(--pe-blue-strong); text-underline-offset: 2px; }
:where(.pe, .pe-scope) :where(a:hover) { color: var(--pe-blue-deep); }
:where(.pe, .pe-scope) :where(:focus-visible) { outline: 2px solid var(--pe-blue-strong); outline-offset: 2px; border-radius: 6px; }
:where(.pe, .pe-scope) :where(strong, b) { font-weight: 600; color: var(--pe-ink); }
:where(.pe, .pe-scope) :where(button, input, select, textarea) { font: inherit; color: inherit; }
.pe-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Icones: sprite em icones.svg, traco fino como no dioscope.com */
.pe-i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }
.pe-i--sm { width: 1em; height: 1em; }
.pe-i--lg { width: 1.6em; height: 1.6em; }

/* ---------- Tipografia ---------- */
.pe-eyebrow { display: inline-flex; align-items: center; gap: .5em; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--pe-blue-strong); }
.pe-eyebrow--muted { color: var(--pe-ink-3); }
.pe-display { font-size: clamp(40px, 5.4vw, 84px); font-weight: 400; letter-spacing: -.035em; line-height: 1.02; color: var(--pe-ink); }
.pe-h1 { font-size: clamp(32px, 3.6vw, 58px); font-weight: 400; letter-spacing: -.03em; line-height: 1.08; color: var(--pe-ink); }
.pe-h2 { font-size: clamp(26px, 2.6vw, 42px); font-weight: 400; letter-spacing: -.03em; line-height: 1.12; color: var(--pe-ink); }
.pe-h3 { font-size: 22px; font-weight: 400; letter-spacing: -.02em; line-height: 1.25; color: var(--pe-ink); }
.pe-h4 { font-size: 16px; font-weight: 600; letter-spacing: -.005em; line-height: 1.35; color: var(--pe-ink); }
.pe-accent { color: var(--pe-blue); }
.pe-lead { font-size: clamp(17px, 1.3vw, 20px); line-height: 1.6; color: var(--pe-ink-2); font-weight: 300; max-width: 38em; }
.pe-small { font-size: 13px; line-height: 1.5; color: var(--pe-ink-3); }
.pe-micro { font-size: 11.5px; line-height: 1.45; color: var(--pe-ink-3); }
.pe-num { font-weight: 300; letter-spacing: -.04em; line-height: 1; color: var(--pe-blue); font-variant-numeric: tabular-nums; }
.pe-tnum { font-variant-numeric: tabular-nums; }

/* ---------- Logotipo ---------- */
.pe-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--pe-ink) !important; flex: none; }
.pe-logo img { width: 38px; height: 38px; }
.pe-logo span { font-weight: 600; font-size: 15px; line-height: 1.02; letter-spacing: -.02em; color: var(--pe-ink); }
.pe-logo span b { display: block; font-weight: 600; }
.pe-logo--sm img { width: 30px; height: 30px; }
.pe-logo--sm span { font-size: 13px; }
[data-tema="escuro"] .pe-logo img { background: #fff; border-radius: 50%; padding: 2px; }

/* ---------- Botoes ---------- */
.pe-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  appearance: none; border: 0; cursor: pointer; text-decoration: none; overflow: hidden; isolation: isolate;
  font-family: var(--pe-font); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1;
  padding: 15px 22px; border-radius: var(--pe-r-pill); min-height: 44px; white-space: nowrap;
  background: var(--pe-btn); color: #fff !important;
  transition: color .5s var(--pe-ease-soft), background .3s, border-color .3s, box-shadow .3s;
}
/* o preenchimento sobe de baixo como no dioscope.com (.tp-btn__hover) */
.pe-btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--pe-navy); clip-path: ellipse(120% 180% at 50% 310%); transition: clip-path 1.1s var(--pe-ease); }
.pe-btn:hover::after, .pe-btn:focus-visible::after { clip-path: ellipse(120% 180% at 50% 60%); }
.pe-btn--dark { background: var(--pe-navy); }
.pe-btn--dark::after { background: var(--pe-btn); }
.pe-btn--ghost { background: transparent; color: var(--pe-ink) !important; box-shadow: inset 0 0 0 1px var(--pe-line-2); }
.pe-btn--ghost:hover, .pe-btn--ghost:focus-visible { color: #fff !important; }
.pe-btn--white { background: #fff; color: var(--pe-navy) !important; }
.pe-btn--white:hover { color: #fff !important; }
.pe-btn--link { background: none; color: var(--pe-ink) !important; padding-left: 0; padding-right: 0; min-height: 0; }
.pe-btn--link::after { display: none; }
.pe-btn--link:hover { color: var(--pe-blue-strong) !important; }
.pe-btn--sm { font-size: 11.5px; padding: 11px 16px; min-height: 36px; }
.pe-btn--lg { font-size: 13.5px; padding: 18px 28px; min-height: 52px; }
.pe-btn--block { display: flex; width: 100%; }
.pe-btn--ok { background: var(--pe-ok); }
.pe-btn[disabled], .pe-btn.is-disabled { background: var(--pe-sunk); color: var(--pe-ink-3) !important; cursor: not-allowed; }
.pe-btn[disabled]::after, .pe-btn.is-disabled::after { display: none; }
[data-tema="escuro"] .pe-btn--ghost:hover { color: var(--pe-navy) !important; }
[data-tema="escuro"] .pe-btn--ghost::after { background: #fff; }
.pe-iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--pe-line-2); background: var(--pe-glass); color: var(--pe-ink); cursor: pointer; transition: background .3s, border-color .3s; }
.pe-iconbtn:hover { background: var(--pe-glass-2); border-color: var(--pe-ink-3); }

/* ---------- Chips, etiquetas, estados ---------- */
.pe-chip { display: inline-flex; align-items: center; gap: .45em; padding: 8px 14px; border-radius: var(--pe-r-pill); border: 1px solid var(--pe-line-2); background: var(--pe-glass); color: var(--pe-ink); font-size: 13px; font-weight: 400; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background .3s, border-color .3s, color .3s; }
.pe-chip:hover { background: var(--pe-glass-2); }
.pe-chip.is-on { background: var(--pe-navy); border-color: var(--pe-navy); color: #fff; }
[data-tema="escuro"] .pe-chip.is-on { background: #fff; border-color: #fff; color: var(--pe-navy); }
.pe-tag { display: inline-flex; align-items: center; gap: .4em; padding: 4px 10px; border-radius: var(--pe-r-pill); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.4; background: var(--pe-blue-soft); color: var(--pe-blue-strong); white-space: nowrap; }
.pe-tag--navy { background: var(--pe-navy); color: #fff; }
.pe-tag--line { background: transparent; box-shadow: inset 0 0 0 1px var(--pe-line-2); color: var(--pe-ink-2); }
.pe-tag--ok { background: var(--pe-ok-bg); color: var(--pe-ok); }
.pe-tag--bad { background: var(--pe-bad-bg); color: var(--pe-bad); }
.pe-tag--flag { background: var(--pe-flag-bg); color: var(--pe-flag); }
.pe-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.pe-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--pe-blue-strong); color: #fff; font-size: 11px; font-weight: 600; line-height: 1; }

/* ---------- Superficies ---------- */
.pe-card { position: relative; background: var(--pe-card); border: 1px solid var(--pe-line); border-radius: var(--pe-r-lg); padding: 24px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.pe-card--solid { background: var(--pe-surface); }
.pe-card--flat { background: transparent; backdrop-filter: none; }
.pe-card--lift { box-shadow: var(--pe-shadow); }
.pe-card--link { text-decoration: none; color: inherit !important; transition: transform .5s var(--pe-ease), box-shadow .5s var(--pe-ease), border-color .3s; }
.pe-card--link:hover { transform: translateY(-3px); box-shadow: var(--pe-shadow-lift); border-color: var(--pe-line-2); }
.pe-card--feature { background: var(--pe-blue); border-color: transparent; color: rgba(255,255,255,.9); }
.pe-card--feature :is(h2,h3,h4,.pe-h3,.pe-h4,strong) { color: #fff; }
.pe-card--feature .pe-eyebrow { color: rgba(255,255,255,.85); }
.pe-card--navy { background: var(--pe-navy); border-color: transparent; color: #c3ccd6; }
.pe-card--navy :is(h2,h3,h4,.pe-h3,.pe-h4,strong) { color: #fff; }
.pe-card--tint { background: var(--pe-tint); }
.pe-card__num { position: absolute; top: 10px; right: 16px; font-size: 64px; font-weight: 300; letter-spacing: -.05em; line-height: 1; color: rgba(12,44,61,.07); pointer-events: none; }
.pe-card--feature .pe-card__num { color: rgba(255,255,255,.18); }
[data-tema="escuro"] .pe-card__num { color: rgba(255,255,255,.07); }
.pe-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pe-card__title { font-size: 15px; font-weight: 600; color: var(--pe-ink); letter-spacing: -.005em; }
.pe-ibox { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--pe-line-2); background: var(--pe-surface); color: var(--pe-blue-strong); flex: none; }
.pe-card--feature .pe-ibox { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff; }
.pe-ibox--soft { background: var(--pe-blue-soft); border-color: transparent; }
.pe-divider { height: 1px; background: var(--pe-line); border: 0; margin: 20px 0; }
.pe-glow { background: var(--pe-glow), var(--pe-bg); }

/* ---------- Layout do site publico ---------- */
.pe-wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding-left: var(--pe-pad-x); padding-right: var(--pe-pad-x); }
.pe-wrap--narrow { max-width: 880px; }
.pe-section { padding-top: clamp(56px, 8vw, 120px); padding-bottom: clamp(56px, 8vw, 120px); }
.pe-section--line { border-top: 1px solid var(--pe-line); }
.pe-section--white { background: var(--pe-surface); }
.pe-section--tint { background: var(--pe-glow), linear-gradient(180deg, #e9f0fb 0%, var(--pe-bg) 100%); }
.pe-stack > * + * { margin-top: var(--pe-gap, 16px); }
.pe-row { display: flex; align-items: center; gap: var(--pe-gap, 12px); flex-wrap: wrap; }
.pe-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pe-grid { display: grid; gap: var(--pe-gap, 20px); grid-template-columns: repeat(var(--pe-cols, 3), minmax(0, 1fr)); }
@media (max-width: 1023px) { .pe-grid { grid-template-columns: repeat(min(var(--pe-cols, 3), 2), minmax(0, 1fr)); } }
@media (max-width: 599px)  { .pe-grid { grid-template-columns: minmax(0, 1fr); } }

/* Cabecalho de vidro (igual ao .tp-header) */
.pe-top { position: sticky; top: 0; z-index: 50; }
.pe-top::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(var(--pe-bg-rgb), .86); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--pe-line); }
.pe-top__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--pe-top-h); }
.pe-nav { display: flex; align-items: center; gap: 30px; }
.pe-nav a { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--pe-ink-2); text-decoration: none; transition: color .3s; }
.pe-nav a:hover, .pe-nav a.is-on { color: var(--pe-ink); }
@media (max-width: 899px) { .pe-nav { display: none; } }

/* Numeros grandes em fila (como os 20.000+ da homepage) */
.pe-stats { display: grid; grid-template-columns: repeat(var(--pe-cols, 4), minmax(0, 1fr)); gap: 24px; border-top: 1px solid var(--pe-line); padding-top: 28px; }
.pe-stat .pe-num { font-size: clamp(40px, 4.6vw, 72px); }
.pe-stat p { margin-top: 10px; font-size: 13px; color: var(--pe-blue-strong); }
@media (max-width: 767px) { .pe-stats { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* Folha de respostas: o motivo da PE (assets/folha.svg) */
.pe-folha { background: url(folha.svg) center / contain no-repeat; aspect-ratio: 1; pointer-events: none; }

/* Rodape claro */
.pe-foot { background: var(--pe-surface); border-top: 1px solid var(--pe-line); padding: 56px 0 28px; font-size: 14px; color: var(--pe-ink-3); }
.pe-foot a { color: var(--pe-ink-2); text-decoration: none; }
.pe-foot a:hover { color: var(--pe-blue-strong); }
.pe-foot h4 { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--pe-ink); margin-bottom: 12px; }

/* ---------- Formularios ---------- */
.pe-field { display: grid; gap: 6px; }
.pe-label { font-size: 13px; font-weight: 500; color: var(--pe-ink); }
.pe-hint { font-size: 12.5px; color: var(--pe-ink-3); }
.pe-input, .pe-select, .pe-textarea {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--pe-line-2);
  background: var(--pe-surface); color: var(--pe-ink); font-size: 15px; font-weight: 400; line-height: 1.4;
  transition: border-color .2s, box-shadow .2s;
}
.pe-textarea { min-height: 120px; resize: vertical; }
.pe-input::placeholder, .pe-textarea::placeholder { color: var(--pe-ink-3); font-weight: 300; }
.pe-input:focus, .pe-select:focus, .pe-textarea:focus { outline: none; border-color: var(--pe-blue-strong); box-shadow: 0 0 0 4px rgba(53,125,237,.16); }
.pe-input.is-bad { border-color: var(--pe-bad); }
.pe-err { font-size: 12.5px; color: var(--pe-bad); }
.pe-search { position: relative; }
.pe-search .pe-input { padding-left: 46px; border-radius: var(--pe-r-pill); }
.pe-search > .pe-i { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: var(--pe-ink-3); }
.pe-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--pe-ink-2); }
.pe-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--pe-blue-strong); }
.pe-seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--pe-r-pill); background: var(--pe-sunk); }
.pe-seg button, .pe-seg a { border: 0; background: none; padding: 8px 16px; border-radius: var(--pe-r-pill); font-size: 13px; font-weight: 500; color: var(--pe-ink-2); cursor: pointer; text-decoration: none; white-space: nowrap; }
.pe-seg .is-on { background: var(--pe-surface); color: var(--pe-ink); box-shadow: 0 1px 3px rgba(12,44,61,.12); }
.pe-switch { position: relative; width: 44px; height: 26px; border-radius: 13px; background: var(--pe-line-2); flex: none; }
.pe-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .3s var(--pe-ease); }
.pe-switch.is-on { background: var(--pe-blue-strong); }
.pe-switch.is-on::after { transform: translateX(18px); }

/* ---------- App: moldura ---------- */
.pe-app { display: grid; grid-template-columns: var(--pe-side-w) minmax(0, 1fr); min-height: 100vh; background: var(--pe-glow), var(--pe-bg); }
.pe-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 20px 14px; border-right: 1px solid var(--pe-line); background: rgba(255,255,255,.55); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); overflow-y: auto; }
[data-tema="escuro"] .pe-side { background: rgba(255,255,255,.03); }
.pe-side__logo { padding: 4px 10px 18px; }
.pe-side__label { padding: 14px 12px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--pe-ink-3); }
.pe-side__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 400; color: var(--pe-ink-2); text-decoration: none; transition: background .25s, color .25s; }
.pe-side__item:hover { background: var(--pe-glass-2); color: var(--pe-ink); }
.pe-side__item.is-on { background: var(--pe-surface); color: var(--pe-ink); font-weight: 500; box-shadow: 0 1px 2px rgba(12,44,61,.06), inset 0 0 0 1px var(--pe-line); }
.pe-side__item.is-on .pe-i { color: var(--pe-blue-strong); }
.pe-side__item .pe-count { margin-left: auto; }
.pe-side__foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--pe-line); }
.pe-main { min-width: 0; padding: 28px clamp(20px, 3vw, 44px) 56px; }
.pe-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.pe-pagehead h1 { font-size: clamp(26px, 2.4vw, 36px); font-weight: 400; letter-spacing: -.03em; line-height: 1.1; color: var(--pe-ink); }
.pe-pagehead p { margin-top: 6px; color: var(--pe-ink-3); font-size: 14px; }
.pe-user { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--pe-ink-2); }
.pe-avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--pe-blue-soft); color: var(--pe-blue-strong); font-weight: 600; font-size: 13px; flex: none; overflow: hidden; }
.pe-avatar img { width: 100%; height: 100%; object-fit: cover; }
/* barra de baixo no telemovel (formato app, como no dioscope.com) */
.pe-tabbar { display: none; }
@media (max-width: 899px) {
  .pe-app { grid-template-columns: minmax(0, 1fr); }
  .pe-side { display: none; }
  .pe-main { padding: 18px 16px 96px; }
  .pe-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); background: rgba(var(--pe-bg-rgb), .9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid var(--pe-line); }
}
.pe-tabbar a { display: grid; justify-items: center; gap: 3px; padding: 4px 0; font-size: 10.5px; font-weight: 500; color: var(--pe-ink-3); text-decoration: none; }
.pe-tabbar a .pe-i { width: 22px; height: 22px; }
.pe-tabbar a.is-on { color: var(--pe-blue-strong); }
/* topo compacto no telemovel */
.pe-mtop { display: none; }
@media (max-width: 899px) { .pe-mtop { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; } }

/* Separadores */
.pe-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--pe-line); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.pe-tabs a, .pe-tabs button { position: relative; padding: 12px 0; border: 0; background: none; font-size: 13px; font-weight: 500; color: var(--pe-ink-3); text-decoration: none; white-space: nowrap; cursor: pointer; }
.pe-tabs .is-on { color: var(--pe-ink); }
.pe-tabs .is-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--pe-blue-strong); }

/* KPI */
.pe-kpi { display: grid; gap: 6px; }
.pe-kpi__label { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--pe-ink-3); }
.pe-kpi__value { font-size: 40px; font-weight: 300; letter-spacing: -.04em; line-height: 1; color: var(--pe-ink); font-variant-numeric: tabular-nums; }
.pe-kpi__value small { font-size: .45em; letter-spacing: 0; color: var(--pe-ink-3); margin-left: 2px; }
.pe-kpi__delta { font-size: 12.5px; color: var(--pe-ink-3); }
.pe-kpi__delta.is-up { color: var(--pe-ok); }
.pe-kpi__delta.is-down { color: var(--pe-bad); }

/* Progresso */
.pe-bar { height: 8px; border-radius: 4px; background: var(--pe-sunk); overflow: hidden; }
.pe-bar > i { display: block; height: 100%; width: var(--v, 40%); border-radius: inherit; background: var(--pe-grad); }
.pe-bar--ok > i { background: var(--pe-ok); }
.pe-bar--thin { height: 4px; }
.pe-ring { --v: 62; --size: 96px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--pe-blue) calc(var(--v) * 1%), var(--pe-sunk) 0); position: relative; flex: none; }
.pe-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--pe-surface); }
.pe-ring > span { position: relative; font-size: calc(var(--size) * .24); font-weight: 300; letter-spacing: -.03em; color: var(--pe-ink); font-variant-numeric: tabular-nums; }

/* Tabelas e listas */
.pe-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pe-table th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--pe-ink-3); padding: 10px 12px; border-bottom: 1px solid var(--pe-line); white-space: nowrap; }
.pe-table td { padding: 14px 12px; border-bottom: 1px solid var(--pe-line); color: var(--pe-ink-2); vertical-align: middle; }
.pe-table tr:last-child td { border-bottom: 0; }
.pe-table tr.is-me td { background: var(--pe-blue-soft); }
.pe-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.pe-list { list-style: none; padding: 0; margin: 0; }
.pe-list > li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--pe-line); }
.pe-list > li:last-child { border-bottom: 0; }

/* Esqueleto: texto de exemplo que nao interessa ler (e texto clinico nunca inventado) */
.pe-skel { display: block; height: .72em; border-radius: 6px; background: linear-gradient(90deg, var(--pe-sunk), rgba(12,44,61,.05), var(--pe-sunk)); margin: .45em 0; width: var(--w, 100%); }
[data-tema="escuro"] .pe-skel { background: rgba(255,255,255,.09); }
.pe-skel--lg { height: 1.1em; }
.pe-skel--inline { display: inline-block; vertical-align: middle; margin: 0; }

/* Estados vazios, avisos */
.pe-empty { display: grid; justify-items: center; gap: 12px; padding: 48px 20px; text-align: center; color: var(--pe-ink-3); }
.pe-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--pe-blue-soft); color: var(--pe-ink-2); font-size: 14px; }
.pe-note .pe-i { color: var(--pe-blue-strong); margin-top: 2px; }
.pe-note--ok { background: var(--pe-ok-bg); } .pe-note--ok .pe-i { color: var(--pe-ok); }
.pe-note--bad { background: var(--pe-bad-bg); } .pe-note--bad .pe-i { color: var(--pe-bad); }
.pe-note--flag { background: var(--pe-flag-bg); } .pe-note--flag .pe-i { color: var(--pe-flag); }

/* ---------- Estudo: perguntas (QBank, simulados, WOD) ---------- */
.pe-q { background: var(--pe-surface); border: 1px solid var(--pe-line); border-radius: var(--pe-r-lg); padding: clamp(20px, 2.4vw, 32px); }
.pe-q__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; font-size: 12.5px; color: var(--pe-ink-3); }
.pe-q__stem { font-size: 17px; line-height: 1.7; color: var(--pe-ink); font-weight: 400; margin-bottom: 22px; max-width: 46em; }
.pe-opts { display: grid; gap: 10px; }
.pe-opt { display: flex; align-items: flex-start; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--pe-line-2); background: var(--pe-surface); color: var(--pe-ink-2); font-size: 15px; line-height: 1.5; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.pe-opt:hover { border-color: var(--pe-blue-strong); box-shadow: 0 0 0 3px rgba(53,125,237,.1); }
.pe-opt__l { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--pe-line-2); font-size: 13px; font-weight: 600; color: var(--pe-ink); flex: none; }
.pe-opt__t { flex: 1; padding-top: 3px; }
.pe-opt__pct { margin-left: auto; font-size: 12.5px; color: var(--pe-ink-3); padding-top: 5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pe-opt.is-chosen { border-color: var(--pe-blue-strong); background: var(--pe-blue-soft); }
.pe-opt.is-chosen .pe-opt__l { background: var(--pe-blue-strong); border-color: var(--pe-blue-strong); color: #fff; }
.pe-opt.is-ok { border-color: var(--pe-ok-line); background: var(--pe-ok-bg); }
.pe-opt.is-ok .pe-opt__l { background: var(--pe-ok); border-color: var(--pe-ok); color: #fff; }
.pe-opt.is-bad { border-color: var(--pe-bad-line); background: var(--pe-bad-bg); }
.pe-opt.is-bad .pe-opt__l { background: var(--pe-bad); border-color: var(--pe-bad); color: #fff; }
.pe-opt.is-dim { opacity: .62; }
/* navegador de perguntas: a folha de respostas em pequeno */
.pe-qnav { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 6px; }
.pe-qnav a, .pe-qnav span { display: grid; place-items: center; height: 34px; border-radius: 10px; font-size: 12px; font-weight: 500; color: var(--pe-ink-2); background: var(--pe-surface); border: 1px solid var(--pe-line); text-decoration: none; font-variant-numeric: tabular-nums; }
.pe-qnav .is-done { background: var(--pe-blue-soft); border-color: transparent; color: var(--pe-blue-strong); }
.pe-qnav .is-ok { background: var(--pe-ok-bg); border-color: transparent; color: var(--pe-ok); }
.pe-qnav .is-bad { background: var(--pe-bad-bg); border-color: transparent; color: var(--pe-bad); }
.pe-qnav .is-flag { box-shadow: inset 0 0 0 1.5px var(--pe-flag); }
.pe-qnav .is-now { background: var(--pe-navy); border-color: var(--pe-navy); color: #fff; }
.pe-timer { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--pe-r-pill); background: var(--pe-surface); border: 1px solid var(--pe-line); font-size: 14px; font-weight: 500; color: var(--pe-ink); font-variant-numeric: tabular-nums; }
.pe-timer.is-low { color: var(--pe-bad); border-color: var(--pe-bad-line); }
.pe-explain { margin-top: 22px; padding: 20px 22px; border-radius: 16px; background: var(--pe-bg); border: 1px solid var(--pe-line); }

/* ---------- Voxi ---------- */
.pe-voxi { display: flex; flex-direction: column; background: var(--pe-surface); border: 1px solid var(--pe-line); border-radius: var(--pe-r-lg); overflow: hidden; }
.pe-voxi__head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--pe-line); }
.pe-voxi__body { display: grid; gap: 14px; padding: 18px; }
.pe-msg { max-width: 86%; padding: 12px 16px; border-radius: 18px; font-size: 14.5px; line-height: 1.6; }
.pe-msg--me { justify-self: end; background: var(--pe-blue-strong); color: #fff; border-bottom-right-radius: 6px; }
.pe-msg--voxi { justify-self: start; background: var(--pe-bg); color: var(--pe-ink-2); border-bottom-left-radius: 6px; }
.pe-voxi__foot { padding: 12px; border-top: 1px solid var(--pe-line); }
.pe-voxi__box { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 18px; border-radius: var(--pe-r-pill); border: 1px solid var(--pe-line-2); background: var(--pe-surface); box-shadow: 0 8px 24px rgba(12,44,61,.06); }
.pe-voxi__box input { flex: 1; border: 0; outline: none; background: none; font-size: 15px; min-width: 0; }
.pe-voxi__send { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--pe-blue); color: #fff; cursor: pointer; flex: none; }
.pe-voxi__legal { margin-top: 8px; text-align: center; font-size: 11px; color: var(--pe-ink-3); }

/* ---------- Janelas e avisos flutuantes ---------- */
.pe-modal { background: var(--pe-surface); border-radius: var(--pe-r-lg); box-shadow: 0 30px 80px rgba(12,44,61,.28); padding: 28px; max-width: 480px; width: 100%; }
.pe-scrim { background: rgba(8,26,41,.42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pe-toast { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: var(--pe-r-pill); background: var(--pe-navy); color: #fff; font-size: 14px; box-shadow: var(--pe-shadow-lift); }

/* ---------- Movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  .pe *, .pe *::before, .pe *::after, .pe-scope *, .pe-scope *::before, .pe-scope *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* PE: cores historicas das especialidades, independentes das cores dos estados.
   Opcao B (cores das areas, 2026-10-08): --pe-area (pontos, barras, bordas), --pe-area-ink
   (texto na cor da area: >= 4,5:1 sobre o tingido e o branco; claro no tema escuro),
   --pe-area-tint (fundo tingido sobre --pe-surface, escuro no tema escuro), --pe-area-line
   (borda a 35%) e --pe-area-well (poco das barras dentro de um cartao tingido). */
:root { --pe-area-well: rgba(255,255,255,.78); }
[data-tema="escuro"] { --pe-area-well: rgba(255,255,255,.1); }
[data-pe-area] { --pe-area: var(--pe-blue-strong); --pe-area-ink: var(--pe-blue-strong); }
[data-pe-area="pe-cirurgia"] { --pe-area: #10b981; --pe-area-ink: #047857; }
[data-pe-area="pe-ginecologia"] { --pe-area: #ec4899; --pe-area-ink: #be185d; }
[data-pe-area="pe-medicina"] { --pe-area: #f59e0b; --pe-area-ink: #a15c07; }
[data-pe-area="pe-pediatria"] { --pe-area: #3b82f6; --pe-area-ink: #1d4ed8; }
[data-pe-area="pe-psiquiatria"] { --pe-area: #8b5cf6; --pe-area-ink: #6d28d9; }
[data-pe-area="pe-saude-publica"] { --pe-area: #ef4444; --pe-area-ink: #b91c1c; }
[data-tema="escuro"] [data-pe-area="pe-cirurgia"] { --pe-area-ink: #34d399; }
[data-tema="escuro"] [data-pe-area="pe-ginecologia"] { --pe-area-ink: #f472b6; }
[data-tema="escuro"] [data-pe-area="pe-medicina"] { --pe-area-ink: #fbbf24; }
[data-tema="escuro"] [data-pe-area="pe-pediatria"] { --pe-area-ink: #60a5fa; }
[data-tema="escuro"] [data-pe-area="pe-psiquiatria"] { --pe-area-ink: #a78bfa; }
[data-tema="escuro"] [data-pe-area="pe-saude-publica"] { --pe-area-ink: #f87171; }
[data-pe-area] { --pe-area-tint: color-mix(in srgb, var(--pe-area) 10%, var(--pe-surface)); --pe-area-line: color-mix(in srgb, var(--pe-area) 35%, transparent); }
.pe-chip[data-pe-area] { border-left: 4px solid var(--pe-area); }
.pe-chip[data-pe-area].is-on { background: color-mix(in srgb, var(--pe-area) 14%, var(--pe-surface)); color: var(--pe-ink); border-color: var(--pe-area); }
