/* ============================================================
   Simulex · simulados de concursos jurídicos
   ============================================================ */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url("fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2-variations");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url("fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2-variations");
  font-weight: 200 900; font-style: italic; font-display: swap;
}

/* ---------------- tokens ---------------- */
/* cores do logotipo: azul-marinho #122440, verde #1a9761 (no escuro, #34c37e) e o cinza-azulado do slogan */
:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --bg-grad: radial-gradient(1200px 500px at 85% -120px, #e2e9f3 0%, transparent 70%);
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #edf1f6;
  --line: #e2e7ee;
  --line-strong: #cdd5e0;
  --ink: #122440;
  --ink-2: #4a5567;
  --ink-3: #6b778b;
  --accent: #122440;
  --accent-hover: #1e3762;
  --accent-ink: #ffffff;
  --accent-soft: #e9eef6;
  --accent-line: #c3cfe1;
  --destaque: #1a9761;      /* verde do logotipo: detalhes da marca */
  --destaque-soft: #e2f4eb;
  --destaque-ink: #0f6b44;   /* texto verde sobre fundo claro */

  --ok: #1a9761;         /* marcas: acertos */
  --ok-ink: #0f6b44;     /* texto sobre fundo claro */
  --ok-soft: #e2f4eb;
  --ok-line: #9fd5bb;
  --bad: #ec835a;        /* marcas: erros (gráficos) */
  --bad-strong: #c2502a; /* bordas e ícones de erro */
  --bad-ink: #9a3a1b;
  --bad-soft: #fbe9e0;
  --bad-line: #efb9a1;
  --warn-soft: #fbf2de;
  --warn-line: #e8cf94;
  --warn-ink: #7a5712;

  --grid: #e8edf3;
  --axis: #d2dae5;
  --shadow-sm: 0 1px 2px rgba(18, 36, 64, .06);
  --shadow: 0 1px 2px rgba(18, 36, 64, .05), 0 8px 24px -10px rgba(18, 36, 64, .14);
  --shadow-lg: 0 24px 60px -20px rgba(18, 36, 64, .35);
  --ring: 0 0 0 3px rgba(18, 36, 64, .2);

  --radius: 16px;
  --radius-sm: 10px;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Source Serif", Georgia, "Times New Roman", serif;
  --leitura: 1; /* escala do texto de leitura (ajustável pelo usuário) */
}

/* tema escuro: só quando a pessoa escolhe no botão de tema (o claro é o padrão) */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1524;
  --bg-grad: radial-gradient(1100px 480px at 85% -140px, #182a4b 0%, transparent 70%);
  --surface: #142036;
  --surface-2: #19263f;
  --surface-3: #21304c;
  --line: #24334f;
  --line-strong: #33445f;
  --ink: #eef2f8;
  --ink-2: #c8d3e2;
  --ink-3: #8f9cb2;
  --accent: #dde5f0;
  --accent-hover: #ffffff;
  --accent-ink: #122440;
  --accent-soft: #1f2d48;
  --accent-line: #3a4c6d;
  --destaque: #34c37e;
  --destaque-soft: #12342a;
  --destaque-ink: #5fd99c;
  --ok: #2bb673;
  --ok-ink: #5fd99c;
  --ok-soft: #12342a;
  --ok-line: #23704d;
  --bad: #e0703f;
  --bad-strong: #ee8a61;
  --bad-ink: #f7a582;
  --bad-soft: #37211a;
  --bad-line: #7a3f28;
  --warn-soft: #2f2716;
  --warn-line: #6b5423;
  --warn-ink: #e8c77e;
  --grid: #1f2c45;
  --axis: #2e3d5a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 30px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .8);
  --ring: 0 0 0 3px rgba(221, 229, 240, .3);
}

/* ---------------- base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-grad), var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 15px/1.5 var(--font-ui);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
:focus-visible { outline: none; box-shadow: var(--ring); }
kbd {
  font: 600 11px/1 var(--font-ui);
  padding: 3px 6px; border-radius: 5px;
  background: var(--surface); border: 1px solid var(--line-strong); border-bottom-width: 2px;
  color: var(--ink-2);
}

/* ---------------- topbar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 10px 24px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.brand .logo { height: 28px; width: auto; flex: none; }
.brand-sub {
  font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-left: 14px; border-left: 1px solid var(--line-strong); line-height: 1.3;
}
/* logotipo: versão para fundo claro ou escuro, conforme o tema */
.logo-escuro { display: none; }
:root[data-theme="dark"] .logo-claro { display: none; }
:root[data-theme="dark"] .logo-escuro { display: inline; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 12px; margin-left: auto; }
.tabs a {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 9px; text-decoration: none;
  font-weight: 550; font-size: 14px; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.tabs a svg { font-size: 16px; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.countdown {
  font-size: 12.5px; font-weight: 550; color: var(--destaque-ink);
  background: var(--destaque-soft); padding: 6px 11px; border-radius: 99px; white-space: nowrap;
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; cursor: pointer;
  color: var(--ink-2); transition: background .15s, color .15s;
}
.icon-btn:hover { color: var(--ink); background: var(--surface-2); }
.icon-btn svg { font-size: 18px; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }

/* ---------------- buttons ---------------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 11px;
  border: 1px solid var(--line-strong); background: var(--surface);
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .08s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { font-size: 16px; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.big { height: 48px; padding: 0 26px; font-size: 15px; border-radius: 13px; min-width: 190px; }
.btn.full { width: 100%; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px -8px rgba(18, 36, 64, .55); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.primary:disabled { background: var(--surface-3); border-color: var(--line); color: var(--ink-3); box-shadow: none; cursor: not-allowed; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn.outline { background: transparent; }
.btn.outline:hover { background: var(--surface-2); }
.btn.danger { background: var(--bad-strong); border-color: var(--bad-strong); color: #fff; }
.btn.danger:disabled { opacity: .45; cursor: not-allowed; }
.btn.danger-outline { background: transparent; color: var(--bad-ink); border-color: var(--bad-line); }
.btn.danger-outline:hover { background: var(--bad-soft); }
.btn .btn-label { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; }
.btn .btn-progress {
  position: absolute; inset: 0; transform-origin: left; transform: scaleX(0);
  background: currentColor; opacity: .2; pointer-events: none;
}
.btn.counting .btn-progress { animation: fill var(--dur, 3s) linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }
.link-btn {
  background: none; border: 0; padding: 4px 2px; cursor: pointer;
  color: var(--accent); font-weight: 600; font-size: 13.5px;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.link-btn.small { font-size: 12.5px; }

/* ---------------- layouts ---------------- */
.view { max-width: 1240px; margin: 0 auto; padding: 28px 24px 64px; }
.layout-sim { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 84px; }

/* ---------------- question card ---------------- */
.q-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow); padding: 30px 34px 26px; position: relative;
  transition: box-shadow .3s, border-color .3s;
}
.q-card::before {
  content: ""; position: absolute; left: 34px; right: 34px; top: -1px; height: 3px; border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--accent), var(--destaque));
  opacity: .85;
}
.q-card.state-ok { border-color: var(--ok-line); box-shadow: var(--shadow), 0 0 0 4px var(--ok-soft); }
.q-card.state-bad { border-color: var(--bad-line); box-shadow: var(--shadow), 0 0 0 4px var(--bad-soft); }
.q-card.enter { animation: cardIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.q-card.shake { animation: shake .38s; }
@keyframes shake { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

.q-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.q-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.q-disc {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
}
.q-disc::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--destaque); transform: rotate(45deg); }
.q-topic { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.q-topic::before { content: "›"; margin-right: 8px; color: var(--ink-3); }
.q-num { text-align: right; white-space: nowrap; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.q-num b { display: block; font: 600 28px/1 var(--font-serif); color: var(--ink); letter-spacing: -.02em; }
.q-source {
  margin-top: 8px; font-size: 12.5px; color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: 4px 12px;
}
.q-source span { display: inline-flex; align-items: center; gap: 6px; }
.q-source span:not(:last-child)::after { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); opacity: .6; margin-left: 6px; }
.q-parcial {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 16px;
  padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); border: 1px solid var(--warn-line);
  color: var(--warn-ink); font-size: 13px; line-height: 1.45;
}
.q-parcial svg { font-size: 17px; margin-top: 1px; }
.q-body {
  margin: 22px 0 22px; font-family: var(--font-serif); font-size: calc(18.5px * var(--leitura)); line-height: 1.68;
  color: var(--ink); font-optical-sizing: auto; letter-spacing: -.003em;
}
.q-body p { margin: 0 0 .8em; }
.q-body p:last-child { margin-bottom: 0; }

/* alternatives */
.alts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.alt-li { position: relative; }
.alt {
  width: 100%; display: flex; align-items: flex-start; gap: 14px; text-align: left;
  padding: 13px 48px 13px 14px; border-radius: 14px; cursor: pointer;
  background: var(--surface-2); border: 1.5px solid transparent;
  transition: background .15s, border-color .15s, transform .12s, opacity .2s;
}
.alt:hover:not(:disabled) { background: var(--surface-3); }
.alt-letter {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font: 700 14px/1 var(--font-ui); color: var(--ink-2);
  background: var(--surface); border: 1.5px solid var(--line-strong);
  transition: all .15s;
}
.alt-text { font-family: var(--font-serif); font-size: calc(16.5px * var(--leitura)); line-height: 1.55; padding-top: 3px; color: var(--ink); }
.alt-tag {
  display: none; margin-left: 8px; font: 700 11px/1 var(--font-ui); letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 7px; border-radius: 6px; vertical-align: 2px; white-space: nowrap;
}
.alt.selected { background: var(--accent-soft); border-color: var(--accent); }
.alt.selected .alt-letter { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.alt.struck .alt-text { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--ink-3); }
.alt.struck .alt-letter { opacity: .5; }
.alt:disabled { cursor: default; }
.alts.answered .alt { opacity: .55; }
.alts.answered .alt.correct, .alts.answered .alt.wrong { opacity: 1; }
.alt.correct { background: var(--ok-soft); border-color: var(--ok); }
.alt.correct .alt-letter { background: var(--ok); border-color: var(--ok); color: #fff; }
.alt.correct .alt-tag { display: inline-block; background: var(--ok); color: #fff; }
.alt.wrong { background: var(--bad-soft); border-color: var(--bad-strong); }
.alt.wrong .alt-letter { background: var(--bad-strong); border-color: var(--bad-strong); color: #fff; }
.alt.wrong .alt-tag { display: inline-block; background: var(--bad-strong); color: #fff; }
.alt.correct .alt-letter, .alt.wrong .alt-letter { animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { from { transform: scale(.6); } to { transform: scale(1); } }

.strike-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent;
  color: var(--ink-3); cursor: pointer; display: grid; place-items: center; opacity: 0;
  transition: opacity .15s, background .15s, color .15s;
}
.strike-btn svg { font-size: 16px; }
.alt-li:hover .strike-btn, .strike-btn:focus-visible, .alt.struck + .strike-btn { opacity: 1; }
.strike-btn:hover { background: var(--surface); color: var(--ink); }
.alts.answered .strike-btn { display: none; }
@media (hover: none) { .strike-btn { opacity: .7; } }

/* feedback */
.q-feedback {
  display: flex; align-items: center; gap: 14px; margin-top: 20px;
  padding: 14px 16px; border-radius: 14px; animation: cardIn .3s ease;
}
.q-feedback.ok { background: var(--ok-soft); color: var(--ok-ink); border: 1px solid var(--ok-line); }
.q-feedback.bad { background: var(--bad-soft); color: var(--bad-ink); border: 1px solid var(--bad-line); }
.fb-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; }
.q-feedback.ok .fb-icon { background: var(--ok); }
.q-feedback.bad .fb-icon { background: var(--bad-strong); }
.fb-icon svg { font-size: 19px; stroke-width: 2.6; }
.fb-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.fb-text strong { font-size: 15.5px; }
.fb-text span { font-size: 13.5px; opacity: .9; }
.q-feedback .link-btn { color: inherit; white-space: nowrap; }

.q-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.q-timer { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; }
.q-timer::before { content: ""; width: 13px; height: 13px; border-radius: 50%; border: 1.6px solid currentColor; box-sizing: border-box; background: linear-gradient(currentColor, currentColor) 5px 2px / 1.6px 4.5px no-repeat; }

.kbd-hint { margin: 14px 6px 0; font-size: 12.5px; color: var(--ink-3); line-height: 2; }

/* loading & empty */
.q-loading { display: flex; flex-direction: column; gap: 14px; padding: 6px 0; }
.skel { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
.skel.w40 { width: 40%; } .skel.w60 { width: 60%; } .skel.w80 { width: 80%; } .skel.w90 { width: 90%; }
@keyframes sk { to { background-position: -200% 0; } }
.q-empty, .stats-empty { text-align: center; padding: 34px 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.q-empty p, .stats-empty p { color: var(--ink-2); max-width: 440px; margin: 0 0 8px; }
.empty-ico { width: 54px; height: 54px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.empty-ico svg { font-size: 26px; }

/* ---------------- side panels ---------------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-head h2 { font: 600 15px/1.2 var(--font-ui); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ok-ink); font-weight: 600; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.sess-empty { font-size: 13px; color: var(--ink-2); line-height: 1.55; background: var(--surface-2); padding: 12px 14px; border-radius: 12px; }
.sess-hero { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
.sess-rate { font: 650 44px/1 var(--font-ui); letter-spacing: -.03em; }
.sess-rate-lbl { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.sess-clock { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 18px; }
.sess-clock small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.meter { display: flex; gap: 2px; height: 8px; border-radius: 99px; overflow: hidden; background: var(--surface-3); }
.meter span { display: block; height: 100%; transition: flex-grow .4s ease; flex: 0 0 auto; }
.meter .m-ok { background: var(--ok); }
.meter .m-bad { background: var(--bad); }
.sess-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 16px; }
.sess-stats div { background: var(--surface-2); border-radius: 11px; padding: 9px 12px; }
.sess-stats dt { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.sess-stats dd { margin: 2px 0 0; font-size: 19px; white-space: nowrap; font-weight: 650; font-variant-numeric: tabular-nums; }
.dot-ok, .dot-bad { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.dot-ok { background: var(--ok); } .dot-bad { background: var(--bad); }

.pool { font-size: 12px; color: var(--ink-3); }
.field { margin-bottom: 18px; }
.field-row { display: flex; align-items: center; justify-content: space-between; }
.field-lbl { display: block; font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.field-row .field-lbl { margin-bottom: 6px; }
.field-help { font-size: 12.5px; color: var(--ink-3); margin: 8px 0 0; line-height: 1.45; }
.seg { display: flex; padding: 3px; background: var(--surface-3); border-radius: 11px; gap: 2px; }
.seg button {
  flex: 1; border: 0; background: transparent; padding: 7px 10px; border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 550; color: var(--ink-2); white-space: nowrap; transition: background .15s, color .15s;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.disc-list { display: flex; flex-direction: column; gap: 2px; }
.disc-opt {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; font-size: 13.5px;
  transition: background .12s;
}
.disc-opt:hover { background: var(--surface-2); }
.disc-opt input { appearance: none; -webkit-appearance: none; margin: 0; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; flex: none; cursor: pointer; transition: all .12s; }
.disc-opt input:checked { background: var(--accent); border-color: var(--accent); }
.disc-opt input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--accent-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.disc-opt .nm { flex: 1; line-height: 1.3; }
.disc-opt .ct { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.switch-row { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; cursor: pointer; padding-top: 14px; border-top: 1px solid var(--line); }
.switch-row strong { display: block; font-size: 13.5px; font-weight: 600; }
.switch-row small { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.4; margin-top: 2px; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 40px; height: 24px; border-radius: 99px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .2s; margin: 2px 0 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(16px); }

/* ---------------- stats ---------------- */
.layout-stats { display: flex; flex-direction: column; gap: 20px; }
#stats-content { display: flex; flex-direction: column; gap: 20px; }
.stats-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.stats-head h1 { font: 600 32px/1.1 var(--font-serif); letter-spacing: -.02em; }
.stats-sub { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }
.period { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.period .seg { background: var(--surface); border: 1px solid var(--line); }
.period .seg button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.custom-range { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.custom-range label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.custom-range input { height: 32px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); padding: 0 10px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px 24px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { font: 600 18px/1.2 var(--font-serif); letter-spacing: -.01em; }
.card-sub { margin: 4px 0 0; font-size: 13px; color: var(--ink-3); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

.kpis { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi .lbl { font-size: 12.5px; color: var(--ink-3); font-weight: 550; display: flex; align-items: center; gap: 7px; }
.kpi .val { font-size: 28px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.kpi .val small { font-size: 15px; font-weight: 550; color: var(--ink-3); letter-spacing: 0; }
.kpi .note { font-size: 12.5px; color: var(--ink-3); }
.kpi.hero { grid-row: span 2; justify-content: space-between; background: linear-gradient(160deg, var(--surface) 40%, var(--accent-soft)); }
.kpi.hero .val { font-size: 64px; letter-spacing: -.045em; line-height: 1; margin: 6px 0 4px; }
.kpi.hero .meter { height: 10px; margin-top: 10px; }
.kpi-mini-meter { height: 6px; border-radius: 99px; background: var(--surface-3); margin-top: 6px; overflow: hidden; }
.kpi-mini-meter i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw-ok { background: var(--ok); } .sw-bad { background: var(--bad); }

.chart { position: relative; width: 100%; min-height: 220px; }
.chart svg { display: block; width: 100%; height: auto; stroke: none; stroke-width: initial; }
.chart text { font: 11.5px var(--font-ui); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart .grid line { stroke: var(--grid); stroke-width: 1; }
.chart .axis line { stroke: var(--axis); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: default; }
.chart .band-hl { fill: var(--surface-3); opacity: 0; transition: opacity .12s; }
.chart .band-hl.on { opacity: .7; }
.chart .bar-ok { fill: var(--ok); }
.chart .bar-bad { fill: var(--bad); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--accent); opacity: .08; stroke: none; }
.chart .pt { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .pt.on { r: 6; }
.chart .xhair { stroke: var(--line-strong); stroke-width: 1; }
.chart .lbl-end { fill: var(--ink); font-weight: 650; font-size: 12px; }
.chart .lbl-end, .chart .lbl-ref { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.chart .lbl-ref { fill: var(--ink-2); font-weight: 550; }
.chart-empty { display: grid; place-items: center; min-height: 180px; color: var(--ink-3); font-size: 13.5px; }

.tooltip {
  position: fixed; z-index: 60; pointer-events: none;
  background: var(--ink); color: var(--surface); border-radius: 10px; padding: 9px 12px;
  font-size: 12.5px; line-height: 1.5; box-shadow: var(--shadow-lg); min-width: 140px;
}
.tooltip .tt-title { font-weight: 650; margin-bottom: 3px; }
.tooltip .tt-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tooltip .tt-row span:first-child { display: inline-flex; align-items: center; gap: 6px; opacity: .85; }
.tooltip .tt-row b { font-variant-numeric: tabular-nums; }

.table-toggle { margin-top: 12px; }
.table-toggle summary { cursor: pointer; font-size: 13px; color: var(--ink-2); font-weight: 550; width: max-content; }
.table-wrap { overflow-x: auto; margin-top: 10px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th { text-align: left; font-size: 12px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .num { text-align: right; }
.data-table th.num { text-align: right; }
.rate-pill { display: inline-block; min-width: 52px; text-align: center; padding: 3px 8px; border-radius: 99px; font-weight: 650; font-size: 12.5px; background: var(--surface-3); }
.rate-pill.hi { background: var(--ok-soft); color: var(--ok-ink); }
.rate-pill.lo { background: var(--bad-soft); color: var(--bad-ink); }

/* disciplinas */
.disc-stats { display: flex; flex-direction: column; }
.ds-row { border-top: 1px solid var(--line); }
.ds-row:first-child { border-top: 0; }
.ds-btn { width: 100%; background: none; border: 0; padding: 12px 4px; text-align: left; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center; border-radius: 10px; }
.ds-btn:hover { background: var(--surface-2); }
.ds-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.ds-name .chev { font-size: 14px; color: var(--ink-3); transition: transform .2s; }
.ds-row.open .chev { transform: rotate(90deg); }
.ds-nums { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.ds-nums b { color: var(--ink); font-size: 14px; }
.ds-bar { grid-column: 1 / -1; display: flex; gap: 2px; height: 10px; border-radius: 4px; overflow: hidden; background: var(--surface-3); }
.ds-bar span { height: 100%; }
.ds-bar .m-ok { background: var(--ok); } .ds-bar .m-bad { background: var(--bad); }
.ds-sub { grid-column: 1 / -1; font-size: 12px; color: var(--ink-3); }
.ds-topics { padding: 2px 4px 14px 22px; display: none; }
.ds-row.open .ds-topics { display: block; }
.tp { display: grid; grid-template-columns: 1fr 110px 64px; gap: 12px; align-items: center; padding: 6px 0; font-size: 13px; border-top: 1px dashed var(--line); }
.tp:first-child { border-top: 0; }
.tp .tp-nm { color: var(--ink-2); line-height: 1.35; }
.tp .tp-bar { display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; background: var(--surface-3); }
.tp .tp-bar .m-ok { background: var(--ok); } .tp .tp-bar .m-bad { background: var(--bad); }
.tp .tp-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.tp.none .tp-nm { color: var(--ink-3); }

/* mais erradas */
.missed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 560px; overflow: auto; }
.missed li button {
  width: 100%; text-align: left; background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; padding: 12px 14px; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, background .15s;
}
.missed li button:hover { border-color: var(--line-strong); background: var(--surface-3); }
.mi-top { display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.mi-top .mi-q { font-weight: 650; color: var(--accent); }
.mi-badge { font-weight: 650; font-size: 11.5px; padding: 3px 8px; border-radius: 99px; background: var(--bad-soft); color: var(--bad-ink); white-space: nowrap; }
.mi-badge.recovered { background: var(--ok-soft); color: var(--ok-ink); }
.mi-txt { font: 14px/1.45 var(--font-serif); color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.muted-empty { color: var(--ink-3); font-size: 13.5px; padding: 18px 0; text-align: center; }

.tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tools h2 { font: 600 16px/1.2 var(--font-serif); }
.tools-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- modals ---------------- */
.modal { border: 0; padding: 0; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
.modal.wide { width: min(780px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(9, 17, 32, .5); backdrop-filter: blur(3px); }
.modal[open] { animation: cardIn .25s ease; }
.modal-inner { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { font: 600 21px/1.2 var(--font-serif); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding-top: 6px; }
.modal p { margin: 0; color: var(--ink-2); }
.confirm-lbl { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.confirm-lbl input { height: 40px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 12px; background: var(--surface-2); font-weight: 600; letter-spacing: .08em; }
.sum-hero { display: flex; align-items: center; gap: 20px; padding: 16px 18px; background: var(--surface-2); border-radius: 14px; }
.sum-hero .big { font: 650 48px/1 var(--font-ui); letter-spacing: -.03em; }
.sum-hero .meta { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.sum-disc { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.sum-disc div { display: grid; grid-template-columns: 1fr 120px 52px; gap: 12px; align-items: center; font-size: 13px; }
.sum-disc .tp-bar { display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; background: var(--surface-3); }
.sum-disc .m-ok { background: var(--ok); } .sum-disc .m-bad { background: var(--bad); }
.sum-disc .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.review .q-body { font-size: calc(17px * var(--leitura)); margin: 14px 0 16px; }
.review .alt { cursor: default; }
.review .alt-text { font-size: calc(15.5px * var(--leitura)); }
.hist { margin-top: 16px; }
.hist h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 8px; }
.hist ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hist li { font-size: 12.5px; padding: 5px 10px; border-radius: 99px; background: var(--surface-2); display: inline-flex; gap: 6px; align-items: center; }
.hist li.ok { background: var(--ok-soft); color: var(--ok-ink); }
.hist li.bad { background: var(--bad-soft); color: var(--bad-ink); }

/* ---------------- toasts ---------------- */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 80; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 12px; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: cardIn .25s ease; max-width: calc(100vw - 32px); }


/* ---------------- estado de login ---------------- */
body.sem-login .so-logado { display: none !important; }
.show-sm { display: none !important; }

/* ---------------- popovers (fonte, usuário) ---------------- */
.menu-wrap { position: relative; }
.popover {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40;
  width: 290px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 16px; animation: cardIn .18s ease;
}
.pop-title { font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.pop-note { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; margin: 12px 0 8px; }
.pop-note kbd { font-size: 10.5px; padding: 2px 5px; }
.aa-btn span { font: 600 13px/1 var(--font-serif); letter-spacing: -.02em; }
.aa-btn b { font-size: 18px; font-weight: 600; }
.font-stepper { display: flex; align-items: center; gap: 8px; }
.font-stepper button {
  width: 52px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-2);
  font: 600 16px/1 var(--font-serif); cursor: pointer; color: var(--ink); transition: background .15s;
}
.font-stepper button.big { font-size: 22px; }
.font-stepper button sup { font: 700 11px var(--font-ui); margin-left: 1px; }
.font-stepper button:hover:not(:disabled) { background: var(--surface-3); }
.font-stepper button:disabled { opacity: .4; cursor: not-allowed; }
.font-stepper output { flex: 1; text-align: center; font-weight: 650; font-size: 20px; font-variant-numeric: tabular-nums; }
.font-dots { display: flex; gap: 4px; margin-top: 12px; }
.font-dots i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); }
.font-dots i.on { background: var(--accent); }

.user-chip {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 4px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; max-width: 240px; color: var(--ink);
}
.user-chip:hover { background: var(--surface-2); }
.user-email { font-size: 13px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev-down { font-size: 14px; color: var(--ink-3); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font: 650 13px/1 var(--font-ui); text-transform: uppercase;
}
.avatar.lg { width: 40px; height: 40px; font-size: 17px; }
.pop-user-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; min-width: 0; }
.pop-user-head div { min-width: 0; }
.pop-user-head strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.pop-user-head small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.menu-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; border: 0; background: none; cursor: pointer; font-size: 14px; text-align: left; margin-bottom: 8px; }
.menu-item:hover { background: var(--surface-2); }
.menu-item svg { font-size: 17px; color: var(--ink-2); }

/* ---------------- login e conta ---------------- */
.view-login { min-height: calc(100vh - 60px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px 48px; gap: 18px; }
.login-card {
  position: relative; width: min(430px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 24px; box-shadow: var(--shadow); padding: 38px 34px 28px; text-align: center; animation: cardIn .4s cubic-bezier(.2,.8,.2,1);
}
.login-card.largo { width: min(500px, 100%); }
.login-card::before {
  content: ""; position: absolute; left: 34px; right: 34px; top: -1px; height: 3px; border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--accent), var(--destaque));
}
.login-logo { margin: 6px 0 0; line-height: 0; }
.login-logo img { width: min(260px, 78%); height: auto; }
.login-sub { margin: 8px 0 24px; color: var(--ink-2); font-size: 14.5px; }
.login-erro { margin: 0; font-size: 13px; color: var(--bad-ink); }
.login-ok { margin: 0; font-size: 13px; color: var(--ok-ink); }
.login-foot { font-size: 13px; color: var(--destaque-ink); font-weight: 550; margin: 0; }

.auth-abas { margin-bottom: 22px; }
.auth-abas a {
  flex: 1; padding: 8px 10px; border-radius: 8px; text-decoration: none; text-align: center;
  font-size: 14px; font-weight: 600; color: var(--ink-2); transition: background .15s, color .15s;
}
.auth-abas a:hover { color: var(--ink); }
.auth-abas a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.auth-painel { text-align: left; animation: cardIn .25s ease; }
.auth-titulo { font: 600 21px/1.2 var(--font-serif); text-align: center; margin: 0 0 12px; }
.auth-texto { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.auth-texto strong { color: var(--ink); overflow-wrap: anywhere; }
.auth-dica { margin: 10px 0 0; font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.auth-painel > :is(.auth-texto, .auth-dica, .login-erro, .login-ok), .auth-enviado { text-align: center; }
.auth-painel > :is(.login-erro, .login-ok) { margin-top: 14px; }
.auth-ico { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.auth-ico svg { font-size: 26px; }
.auth-ico.alerta { background: var(--warn-soft); color: var(--warn-ink); }
.auth-ico.carregando { width: 40px; height: 40px; background: none; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.auth-acoes { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.auth-acoes:empty { display: none; }
.auth-troca { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--ink-2); }
.auth-troca a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.auth-troca .link-btn { font-size: 14px; padding: 0 2px; }

.auth-form { text-align: left; display: flex; flex-direction: column; gap: 16px; }
.campo { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.auth-form label, .campo-fixo span { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.label-row .link-btn { padding: 0; }
.auth-form :is(input[type="text"], input[type="email"], input[type="password"], input[type="date"], select) {
  width: 100%; min-width: 0; height: 50px; border-radius: 13px; border: 1.5px solid var(--line-strong); background: var(--surface-2);
  padding: 0 16px; font-size: 16px; color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s;
}
.auth-form :is(input, select):focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: var(--surface); }
.auth-form [aria-invalid="true"] { border-color: var(--bad-strong); }
.auth-form input[type="date"] { padding-right: 12px; }
.auth-form input[type="date"]::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
.auth-form .btn.big { margin-top: 2px; flex: none; order: 0; }
.campos-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.select-wrap { position: relative; }
.auth-form .select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer; }
.select-wrap svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--ink-3); pointer-events: none; }
.senha-wrap { position: relative; }
.auth-form .senha-wrap input { padding-right: 54px; }
.ver-senha {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px;
  border: 0; border-radius: 10px; background: none; color: var(--ink-3); cursor: pointer; display: grid; place-items: center;
}
.ver-senha:hover { color: var(--ink); background: var(--surface-3); }
.ver-senha svg { font-size: 19px; }
.campo-ajuda { margin: 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.campo-ajuda.centro { text-align: center; margin-top: -6px; }
.campo-fixo { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line-strong); }
.campo-fixo strong { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.prefs { border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px 12px; margin: 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prefs legend { padding: 0 6px; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.prefs legend span { font-weight: 450; color: var(--ink-3); }
.auth-form .check-row { display: flex; gap: 12px; align-items: flex-start; padding: 8px 6px; border-radius: 10px; cursor: pointer; font-weight: 450; color: var(--ink-3); }
.check-row:hover { background: var(--surface-2); }
.check-row input {
  appearance: none; -webkit-appearance: none; margin: 1px 0 0; width: 18px; height: 18px; border-radius: 5px; flex: none;
  border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: all .12s;
}
.check-row input:checked { background: var(--accent); border-color: var(--accent); }
.check-row input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--accent-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check-row span { font-size: 13px; line-height: 1.45; }
.check-row strong { display: block; color: var(--ink); font-weight: 600; font-size: 14px; }
.prefs .campo-ajuda { padding: 4px 6px 0; }

#dlg-conta .auth-form { gap: 14px; }
#dlg-conta .modal-foot { padding-top: 2px; }
.conta-senha { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 6px; }
.conta-senha h3 { font: 600 17px/1.2 var(--font-serif); }

/* ---------------- feedback + comentário ---------------- */
.fb-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.fb-next { background: var(--surface); border-color: transparent; box-shadow: var(--shadow-sm); color: var(--ink); }
.fb-next:hover { background: var(--surface-2); }
.coment {
  margin-top: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2);
  padding: 18px 20px 12px; animation: cardIn .35s ease;
}
.coment-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; margin-bottom: 14px; }
.coment-head h3 { display: flex; align-items: center; gap: 8px; font: 600 17px/1.2 var(--font-serif); }
.coment-head h3 svg { font-size: 18px; color: var(--destaque); }
.coment-src { font-size: 12px; color: var(--ink-3); }
.cm-item { background: var(--surface); border-radius: 12px; padding: 13px 16px 14px; margin-bottom: 10px; border: 1px solid var(--line); border-left: 4px solid var(--ok); }
.cm-item.cm-sua { border-left-color: var(--bad-strong); }
.cm-label { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 650; margin-bottom: 7px; color: var(--ink); }
.cm-letter {
  width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font: 700 12.5px/1 var(--font-ui); background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--ink-2);
}
.cm-letter.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.cm-letter.bad { background: var(--bad-strong); border-color: var(--bad-strong); color: #fff; }
.coment p { margin: 0; font-family: var(--font-serif); font-size: calc(16px * var(--leitura)); line-height: 1.62; color: var(--ink); }
.cm-sub { font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin: 16px 0 4px; }
.cm-row { display: flex; gap: 12px; align-items: flex-start; padding: 11px 2px; border-top: 1px solid var(--line); }
.cm-sub + .cm-row { border-top: 0; }
.cm-row .cm-letter { margin-top: 1px; }
.cm-row p { color: var(--ink-2); font-size: calc(15.5px * var(--leitura)); }
.coment-vazio { font-size: 13.5px; color: var(--ink-3); padding: 4px 0 8px; }
.review .coment { margin-top: 18px; }

.skip-btn { color: var(--ink-2); }
.skip-btn:hover { color: var(--ink); }

.legado-linha { margin: 10px 0 0; font-size: 13px; color: var(--warn-ink); background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 10px; padding: 8px 12px; }
.legado-linha .link-btn { color: inherit; }
.modal-note { font-size: 13px; }

/* ---------------- responsive ---------------- */
@media (max-width: 1060px) {
  .layout-sim { grid-template-columns: 1fr; }
  .side { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .kpi.hero { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 820px) {
  .grid-2 { grid-template-columns: 1fr; }
  .period { align-items: stretch; width: 100%; }
  .period .seg { overflow-x: auto; }
  .countdown { display: none; }
}
@media (max-width: 1060px) {
  .sair-top { display: none !important; }
}
@media (max-width: 1240px) {
  #brand-sub { display: none; }
}
/* logado, o topo também tem as abas e os botões, e o subtítulo não cabe inteiro */
body:not(.sem-login) #brand-sub { display: none; }
@media (max-width: 1140px) {
  .countdown { display: none !important; }
}
@media (max-width: 1000px) {
  .user-email, .chev-down { display: none; }
  .user-chip { padding: 0 3px; width: 36px; justify-content: center; }
}
@media (max-width: 560px) {
  .hide-sm { display: none !important; }
  .show-sm { display: flex !important; }
  .topbar-right { gap: 6px; }
}
@media (max-width: 460px) {
  .campos-2 { grid-template-columns: 1fr; }
  /* no celular, as abas descem para uma segunda linha e o logotipo aparece inteiro */
  .topbar-inner { flex-wrap: wrap; row-gap: 8px; }
  .brand { flex: none; }
  .topbar .brand .logo { height: 22px; }
  .tabs { order: 3; flex: 1 1 100%; margin-left: 0; }
  .tabs a { flex: 1; justify-content: center; }
  .topbar-right { margin-left: auto; }
  .tabs a { padding: 7px 9px; font-size: 13.5px; }
  .popover { position: fixed; top: 60px; left: 12px; right: 12px; width: auto; }
}
@media (max-width: 680px) {
  body { font-size: 14.5px; }
  .topbar-inner { padding: 8px 16px; gap: 10px; }
  .brand .logo { height: 24px; }
  .tabs a { padding: 7px 10px; }
  .tabs a svg { display: none; }
  .view { padding: 18px 16px 48px; }
  .side { grid-template-columns: 1fr; }
  .q-card { padding: 22px 18px 18px; border-radius: 18px; }
  .q-card::before { left: 18px; right: 18px; }
  .q-body { font-size: calc(17px * var(--leitura)); line-height: 1.62; }
  .alt { padding: 11px 40px 11px 11px; gap: 11px; }
  .alt-text { font-size: calc(15.5px * var(--leitura)); }
  .strike-btn { right: 4px; }
  .q-num b { font-size: 22px; }
  .q-actions { flex-wrap: wrap; }
  .btn.big { min-width: 0; flex: 1 1 100%; order: 3; }
  .q-timer { margin-left: auto; }
  .q-feedback { flex-wrap: wrap; }
  .fb-actions { flex-basis: 100%; justify-content: space-between; padding-left: 50px; }
  .coment { padding: 16px 14px 10px; }
  .cm-item { padding: 12px 13px 13px; }
  .login-card { padding: 32px 20px 24px; }
  .login-card::before { left: 20px; right: 20px; }
  .sess-stats dd { font-size: 17px; }
  .period .seg { flex-wrap: wrap; }
  .period .seg button { flex: 1 1 30%; }
  .kbd-hint { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi.hero .val { font-size: 52px; }
  .card { padding: 18px 16px; }
  .stats-head h1 { font-size: 26px; }
  .tp { grid-template-columns: 1fr 70px 56px; }
  .sum-disc div { grid-template-columns: 1fr 70px 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
