/* ============================================================
   MEMORIZAÇÃO MASSIVA — Estilos
   ============================================================ */

* { box-sizing: border-box; }
:root {
  --ink: #0F1F36; --ink-soft: #2A3850;
  --paper: #FAF7F0; --paper-soft: #F2EDE2;
  --rule: #1A3358; --accent: #6B1A1A;
  --success: #2D6A3E; --success-bg: #E8F0E9;
  --error: #A03030; --error-bg: #F4E6E6;
  --muted: #7B7363; --line: #D9CFB8;
  --gold: #C8A867; --gold-soft: #F2E8CC;
  --flame: #D86A2C;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink); background: #E8E2D0;
  margin: 0; padding: 24px 16px; min-height: 100vh;
}
.app {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 6px; min-height: 720px; max-width: 1080px;
  margin: 0 auto; overflow: hidden;
  box-shadow: 0 8px 32px rgba(15,31,54,0.08);
}
.serif { font-family: 'Source Serif 4', Georgia, serif; }

/* ===== TOPBAR ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #FFFCF3 0%, var(--paper) 100%);
}
.brand { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 4px; display: block;
  box-shadow: 0 1px 4px rgba(15,31,54,0.15);
}
.brand-text { display: flex; flex-direction: column; gap: 2px; line-height: 1; }
.brand .logo {
  font-family: 'Source Serif 4', serif;
  font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em;
}
.brand .tag {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); font-style: italic; font-family: 'Source Serif 4', serif;
}
.user-area { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.user-area .uname { color: var(--ink-soft); }
.user-area .uname b { color: var(--ink); font-weight: 600; }
.user-area a { color: var(--muted); cursor: pointer; text-decoration: none; font-size: 12px; }
.user-area a:hover { color: var(--ink); }
.user-area .sep { color: var(--line); }

.crumbs { font-size: 12px; color: var(--muted); }
.crumbs span { color: var(--ink-soft); }
.stage { padding: 32px 36px 40px; }

/* ===== BOTÕES ===== */
button.btn {
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  padding: 11px 24px; border: none; border-radius: 3px;
  cursor: pointer; transition: all .15s;
}
button.btn-primary { background: var(--rule); color: #FFFCF3; }
button.btn-primary:hover { background: var(--ink); }
button.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
button.btn-ghost { background: transparent; color: var(--muted); padding: 11px 18px; }
button.btn-ghost:hover { color: var(--ink); }
button.btn-outline { background: transparent; color: var(--rule); border: 1.5px solid var(--rule); }
button.btn-outline:hover { background: var(--rule); color: var(--paper); }
button.btn-accent { background: var(--accent); color: #FFFCF3; }
button.btn-accent:hover { background: #5B1414; }
button.btn-full { width: 100%; padding: 13px; }
.actions { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; gap: 12px; }

.back-link {
  font-size: 12px; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.back-link:hover { color: var(--ink); }

/* ===== AUTH ===== */
.auth-wrap {
  display: grid; grid-template-columns: 1fr 1fr;
  min-height: 640px;
  margin: -32px -36px -40px;
}
.auth-left {
  background: var(--ink); color: var(--paper);
  padding: 56px 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-left .logo-row {
  display: flex; align-items: center; gap: 18px; margin-bottom: 32px;
}
.auth-left .logo-img {
  width: 96px; height: 96px; border-radius: 6px; display: block;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.auth-left .logo-text {
  font-family: 'Source Serif 4', serif;
  font-size: 30px; font-weight: 700; line-height: 1.1;
  letter-spacing: -0.01em;
}
.auth-left .logo-text b { color: var(--gold); }
.auth-left .tagline {
  font-family: 'Source Serif 4', serif; font-size: 22px; line-height: 1.45;
  margin-top: 12px; opacity: 0.92; font-weight: 400;
}
.auth-left .tagline em { color: var(--gold); font-style: normal; font-weight: 600; }
.auth-left .features { margin-top: 28px; }
.auth-left .features li {
  list-style: none; padding: 8px 0; font-size: 14px; opacity: 0.85;
  display: flex; gap: 12px; align-items: baseline;
}
.auth-left .features li::before {
  content: '·'; color: var(--gold); font-size: 24px; line-height: 0;
}
.auth-left .footer-quote {
  font-size: 12px; opacity: 0.55; line-height: 1.5;
  border-top: 1px solid rgba(250,247,240,0.15); padding-top: 16px;
}

.auth-right { padding: 56px 48px; display: flex; flex-direction: column; }
.auth-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.auth-tab {
  padding: 10px 0; font-size: 14px; font-weight: 600;
  color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.auth-tab.active { color: var(--ink); border-bottom-color: var(--accent); }

.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 12px; color: var(--ink-soft);
  margin-bottom: 6px; font-weight: 500;
}
.field input {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 3px;
  background: #FFFCF3; font-family: 'Inter', sans-serif; font-size: 14px;
  color: var(--ink); outline: none; transition: border-color .15s;
}
.field input:focus { border-color: var(--rule); }
.auth-error {
  background: var(--error-bg); color: var(--error);
  padding: 10px 14px; border-radius: 3px; font-size: 13px;
  margin-bottom: 14px; border-left: 3px solid var(--error);
}
.auth-info {
  background: var(--success-bg); color: var(--success);
  padding: 10px 14px; border-radius: 3px; font-size: 13px;
  margin-bottom: 14px; border-left: 3px solid var(--success);
}
.auth-hint { font-size: 12px; color: var(--muted); margin-top: -6px; margin-bottom: 14px; }
.auth-forgot { font-size: 12px; color: var(--muted); cursor: pointer; margin-top: 8px; display: inline-block; }
.auth-forgot:hover { color: var(--ink); }

/* ===== DASHBOARD ===== */
.dash-h {
  font-family: 'Source Serif 4', serif; font-size: 32px;
  font-weight: 600; letter-spacing: -0.01em; margin: 0 0 4px;
}
.dash-sub { font-size: 14px; color: var(--muted); margin-bottom: 28px; }

.dash-row { display: grid; grid-template-columns: 320px 1fr; gap: 18px; margin-bottom: 22px; }
.dash-card {
  background: #FFFCF3; border: 1px solid var(--line); border-radius: 4px;
  padding: 22px 24px;
}
.dash-card .label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); font-weight: 600; margin-bottom: 10px;
}
.streak-card { background: linear-gradient(135deg, #FFFCF3 0%, var(--gold-soft) 100%); }
.streak-big {
  font-family: 'Source Serif 4', serif; font-size: 56px; font-weight: 700;
  line-height: 1; color: var(--ink); margin-top: 4px;
}
.streak-big .flame { color: var(--flame); margin-right: 4px; font-size: 36px; }
.streak-meta { font-size: 13px; color: var(--ink-soft); margin-top: 10px; line-height: 1.5; }
.streak-meta b { font-weight: 600; }

.curva-card { padding-bottom: 16px; }
.curva-stats {
  display: flex; gap: 22px; margin-top: 4px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line); margin-bottom: 14px;
}
.curva-stat .v {
  font-family: 'Source Serif 4', serif; font-size: 24px; font-weight: 700;
}
.curva-stat .v.ok { color: var(--success); }
.curva-stat .v.mid { color: #8A6A1F; }
.curva-stat .v.err { color: var(--error); }
.curva-stat .k {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); font-weight: 600;
}
.curva-svg { width: 100%; height: 160px; }
.curva-svg .area { fill: var(--rule); opacity: 0.08; }
.curva-svg .line { fill: none; stroke: var(--rule); stroke-width: 2; }
.curva-svg .dot { fill: var(--rule); }
.curva-svg .dot.last { fill: var(--accent); stroke: var(--paper); stroke-width: 2; r: 5; }
.curva-svg .grid { stroke: var(--line); stroke-width: 0.5; stroke-dasharray: 2 4; }
.curva-svg text { fill: var(--muted); font-size: 10px; font-family: 'Inter', sans-serif; }
.curva-empty {
  text-align: center; padding: 30px 20px; color: var(--muted);
  font-style: italic; border: 1px dashed var(--line); border-radius: 3px;
}

.revisao-wrap { margin-top: 6px; }
.revisao-card {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  background: #FFFCF3; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 4px; padding: 16px 22px; margin-bottom: 10px;
  cursor: pointer; transition: all .15s;
}
.revisao-card:hover { transform: translateY(-1px); border-color: var(--rule); border-left-color: var(--accent); }
.revisao-card .nome {
  font-family: 'Source Serif 4', serif; font-size: 17px; font-weight: 600;
  margin-bottom: 4px;
}
.revisao-card .info { font-size: 12px; color: var(--muted); }
.revisao-card .info b { color: var(--ink-soft); font-weight: 600; }
.revisao-card .arrow { color: var(--accent); font-size: 22px; }
.revisao-empty {
  background: var(--success-bg); border-left: 3px solid var(--success);
  padding: 16px 22px; border-radius: 4px; font-size: 13px; color: var(--success);
}

.section-h {
  font-family: 'Source Serif 4', serif; font-size: 19px;
  font-weight: 600; margin: 30px 0 14px;
}

/* ===== CATALOG ===== */
.cat-h {
  font-family: 'Source Serif 4', serif; font-size: 28px; font-weight: 600;
  letter-spacing: -0.01em; margin: 0 0 6px;
}
.cat-sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cad-card {
  background: #FFFCF3; border: 1px solid var(--line); border-radius: 4px;
  padding: 22px 24px; cursor: pointer; transition: all .15s;
  display: flex; flex-direction: column; gap: 10px;
}
.cad-card:hover { border-color: var(--rule); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15,31,54,0.06); }
.cad-card .pill {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent); font-weight: 600;
}
.cad-card h3 {
  font-family: 'Source Serif 4', serif; font-size: 20px; margin: 0; font-weight: 600;
}
.cad-card .meta-fonte { font-size: 12px; color: var(--muted); }
.cad-card .progress-block {
  margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line);
}
.cad-card .progress-line {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; margin-bottom: 4px;
}
.cad-card .progress-line .mode-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); font-weight: 600;
}
.cad-card .progress-line .count { color: var(--ink-soft); font-weight: 600; }
.bar {
  height: 5px; background: var(--paper-soft); border-radius: 99px;
  overflow: hidden; margin-bottom: 10px; position: relative;
}
.bar .fill { height: 100%; background: var(--success); border-radius: 99px; transition: width .4s; }

/* Barra segmentada: dominado + consolidando + critico lado a lado */
.bar.bar-segmented { display: flex; }
.bar.bar-segmented .seg { height: 100%; transition: width .4s; }
.bar.bar-segmented .seg-dominado    { background: var(--success); }
.bar.bar-segmented .seg-consolidando { background: var(--gold); }
.bar.bar-segmented .seg-critico     { background: var(--error); }

/* ===== CADERNO (visão geral antes de escolher modo) ===== */
.cad-overview-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.cad-overview-title {
  font-family: 'Source Serif 4', serif; font-size: 28px;
  font-weight: 600; letter-spacing: -0.01em; margin: 6px 0 2px;
}
.cad-overview-meta { font-size: 13px; color: var(--muted); margin-bottom: 26px; }

.mapa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 26px; }
.mapa-card {
  background: #FFFCF3; border: 1px solid var(--line); border-radius: 4px;
  padding: 22px 24px;
}
.mapa-card .mode-name {
  font-family: 'Source Serif 4', serif; font-size: 18px; font-weight: 600;
  margin-bottom: 14px;
}
.mapa-card .dominado-line {
  font-family: 'Source Serif 4', serif; font-size: 30px; font-weight: 700;
  color: var(--ink); margin-bottom: 4px;
}
.mapa-card .dominado-line .tot { color: var(--muted); font-size: 22px; font-weight: 400; }
.mapa-card .dominado-line .lbl {
  font-family: 'Inter', sans-serif; font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; margin-left: 6px;
}
.mapa-card .bar { height: 8px; margin-top: 8px; margin-bottom: 4px; }
.mapa-card .status-chips {
  display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap;
}
.chip {
  font-size: 11px; padding: 5px 10px; border-radius: 99px;
  display: inline-flex; align-items: center; gap: 6px; font-weight: 600;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.chip.dominado { background: var(--success-bg); color: var(--success); }
.chip.dominado .dot { background: var(--success); }
.chip.consolidando { background: var(--gold-soft); color: #8A6A1F; }
.chip.consolidando .dot { background: var(--gold); }
.chip.critico { background: var(--error-bg); color: var(--error); }
.chip.critico .dot { background: var(--error); }
.chip.novo { background: var(--paper-soft); color: var(--muted); }
.chip.novo .dot { background: var(--muted); }

.acao-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.acao-card {
  background: #FFFCF3; border: 1px solid var(--line); border-radius: 4px;
  padding: 22px 24px; cursor: pointer; transition: all .15s;
  display: flex; flex-direction: column; gap: 6px;
}
.acao-card:hover { border-color: var(--rule); transform: translateY(-1px); }
.acao-card .num {
  font-family: 'Source Serif 4', serif; font-size: 28px; color: var(--accent);
  font-weight: 700; line-height: 1;
}
.acao-card h4 {
  font-family: 'Source Serif 4', serif; font-size: 18px; margin: 6px 0 4px; font-weight: 600;
}
.acao-card p { font-size: 13px; color: var(--ink-soft); line-height: 1.55; margin: 0; }
.acao-card .badge {
  font-size: 11px; padding: 3px 9px; border-radius: 2px;
  background: var(--paper-soft); color: var(--ink-soft);
  display: inline-block; margin-top: 8px; font-weight: 600;
}

.critico-cta {
  background: var(--error-bg); border: 1px solid var(--error); border-radius: 4px;
  padding: 18px 22px; display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.critico-cta .text { color: var(--ink); }
.critico-cta .text b { color: var(--error); font-weight: 700; }
.critico-cta .text .sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.critico-cta button { background: var(--error); color: #FFFCF3; border: none; padding: 10px 18px; border-radius: 3px; font-weight: 600; cursor: pointer; }
.critico-cta button:hover { background: #862424; }

.pontos-criticos-h {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); font-weight: 600; margin: 26px 0 12px;
}
.ponto-critico {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px;
  background: #FFFCF3; border: 1px solid var(--line); border-radius: 3px;
  padding: 12px 18px; margin-bottom: 6px; font-size: 13px; align-items: center;
}
.ponto-critico .ico {
  width: 9px; height: 9px; border-radius: 50%; background: var(--error);
}
.ponto-critico .ico.consolidando { background: var(--gold); }
.ponto-critico .rotulo { font-weight: 600; color: var(--ink); }
.ponto-critico .stats { font-size: 11px; color: var(--muted); }

/* ===== CLOZE ===== */
.cloze-sticky {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper); padding: 10px 0 12px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.cloze-sticky .cloze-head { margin-bottom: 0; }
.cloze-progressbar {
  height: 6px; border-radius: 3px; margin-top: 10px;
  background: var(--paper-soft); border: 1px solid var(--line); overflow: hidden;
}
.cloze-progressbar .fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold), #A8874A);
  transition: width .25s ease;
}
.cloze-progressbar .fill.done { background: var(--success); }
.cloze-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.cloze-h { font-family: 'Source Serif 4', serif; font-size: 23px; margin: 0; font-weight: 600; }
.progress { font-size: 12px; color: var(--muted); }
.progress b { color: var(--ink); }
.cloze-body {
  background: #FFFCF3; border: 1px solid var(--line); border-radius: 4px;
  border-top: 3px solid var(--gold);
  padding: 32px 40px; font-family: 'Source Serif 4', serif;
  font-size: 17px; line-height: 1.7; color: var(--ink);
  text-align: justify; hyphens: auto; -webkit-hyphens: auto;
  max-width: 72ch; margin: 0 auto;
}
.cloze-body span { white-space: pre-wrap; }
.split-col .content span { white-space: pre-wrap; }
.cloze-body h4 {
  font-size: 13px; font-weight: 700; color: var(--accent); margin: 22px 0 10px;
  text-transform: uppercase; letter-spacing: 0.1em; font-family: 'Inter', sans-serif;
}
.cloze-body h4:first-child { margin-top: 0; }
input.cloze {
  font-family: 'Source Serif 4', serif; font-size: 15px; padding: 2px 8px;
  border: none; border-bottom: 1.5px solid var(--rule);
  background: rgba(26, 51, 88, 0.04);
  color: var(--ink); width: 150px; outline: none; transition: all .15s;
}
input.cloze:focus { background: rgba(26, 51, 88, 0.10); border-bottom-color: var(--accent); }
input.cloze.ok { background: var(--success-bg); border-bottom-color: var(--success); color: var(--success); font-weight: 500; }
input.cloze.err { background: var(--error-bg); border-bottom-color: var(--error); color: var(--error); font-weight: 500; }
input.cloze.overridden {
  background: var(--success-bg); border-bottom-color: var(--success); color: var(--success);
  border-bottom-style: dashed; border-bottom-width: 2px;
}

/* ===== "Discordo, acertei" — override manual do gabarito ===== */
.cloze-override {
  display: inline-block; margin: 0 0 2px 4px;
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
  color: var(--accent); background: rgba(26, 51, 88, 0.06);
  border: 1px solid rgba(26, 51, 88, 0.20);
  padding: 2px 8px; border-radius: 12px; cursor: pointer;
  vertical-align: middle; transition: all .12s; letter-spacing: 0.01em;
}
.cloze-override:hover:not(:disabled) {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.cloze-override:disabled {
  opacity: 0.55; cursor: default;
}
.cloze-badge {
  display: inline-block; margin: 0 0 2px 4px; vertical-align: middle;
  font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 600;
  color: var(--success); background: var(--success-bg);
  padding: 2px 7px; border-radius: 10px; letter-spacing: 0.02em;
  text-transform: uppercase;
}
.override-hint {
  margin: 14px 0 4px; padding: 10px 14px;
  background: rgba(26, 51, 88, 0.04); border-left: 3px solid var(--accent);
  border-radius: 3px; font-size: 12.5px; line-height: 1.55; color: var(--ink);
}
.override-hint b { color: var(--accent); }
.override-hint i { color: var(--ink); opacity: 0.75; }
.cloze-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--gold-soft); border: 1px solid var(--gold);
  color: var(--ink); font-size: 10.5px; font-weight: 700;
  font-family: 'Inter', sans-serif; line-height: 1;
  vertical-align: middle; margin-right: 4px;
}
.cloze-status-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  vertical-align: super; margin-left: 2px;
}
.cloze-status-dot.dominado { background: var(--success); }
.cloze-status-dot.consolidando { background: var(--gold); }
.cloze-status-dot.critico { background: var(--error); }

.modo-filtro-banner {
  background: var(--error-bg); color: var(--ink); padding: 12px 18px;
  border-radius: 3px; margin-bottom: 16px; font-size: 13px;
  border-left: 3px solid var(--error);
}
.modo-filtro-banner b { color: var(--error); }

/* ===== SPLIT ===== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.split-col {
  background: #FFFCF3; border: 1px solid var(--line); border-radius: 4px;
  padding: 20px 24px;
}
.split-col .label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line); font-weight: 600;
}
.split-col.gabarito .label { color: var(--accent); }
.split-col .content {
  font-family: 'Source Serif 4', serif; font-size: 15px; line-height: 1.75;
  max-height: 460px; overflow-y: auto;
}

.score-banner {
  background: var(--ink); color: var(--paper);
  padding: 22px 28px; border-radius: 4px; margin-bottom: 18px;
}
.score-banner .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; }
.score-banner .nota {
  font-family: 'Source Serif 4', serif; font-size: 50px; font-weight: 700; line-height: 1;
}
.score-banner .nota.ok { color: #9FD9A8; }
.score-banner .nota.mid { color: #E5C982; }
.score-banner .nota.err { color: #F0B4B4; }
.score-banner .detail { font-size: 13px; opacity: 0.85; line-height: 1.7; text-align: right; }
.score-banner .detail b { font-family: 'Source Serif 4', serif; font-size: 26px; font-weight: 700; color: #FFF; }
.score-banner .variacao {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(250,247,240,0.15);
  display: flex; gap: 24px; font-size: 13px; flex-wrap: wrap;
}
.score-banner .variacao .item { display: flex; align-items: center; gap: 8px; }
.score-banner .variacao .arrow {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.score-banner .variacao .arrow.up { background: rgba(159,217,168,0.25); color: #9FD9A8; }
.score-banner .variacao .arrow.down { background: rgba(240,180,180,0.25); color: #F0B4B4; }
.score-banner .variacao .arrow.eq { background: rgba(229,201,130,0.25); color: #E5C982; }

.save-status { font-size: 12px; opacity: 0.7; margin-top: 12px; }

/* ===== ATIVA ===== */
.ativa-card { background: #FFFCF3; border: 1px solid var(--line); border-radius: 4px; padding: 28px 32px; }
.ativa-card .qnum {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); font-weight: 600; margin-bottom: 10px;
}
.ativa-card h3 {
  font-family: 'Source Serif 4', serif; font-size: 20px; line-height: 1.45;
  margin: 0 0 14px; font-weight: 600;
}
.ativa-card .dica {
  font-size: 13px; color: var(--muted); font-style: italic;
  border-left: 2px solid var(--line); padding-left: 14px; margin-bottom: 18px;
}
textarea.ativa {
  width: 100%; min-height: 180px;
  font-family: 'Source Serif 4', serif; font-size: 15px; line-height: 1.75;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 3px;
  background: var(--paper); color: var(--ink); resize: vertical; outline: none;
}
textarea.ativa:focus { border-color: var(--rule); }

.grade-bar {
  display: flex; gap: 12px; justify-content: center; margin-top: 18px;
  padding: 20px; background: var(--paper-soft); border-radius: 4px; flex-wrap: wrap;
}
.grade-bar .label {
  width: 100%; text-align: center; font-size: 12px; color: var(--ink-soft);
  margin-bottom: 6px; font-weight: 500;
}
button.grade {
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  padding: 12px 24px; border: 1.5px solid var(--line); border-radius: 3px;
  background: #FFFCF3; cursor: pointer; transition: all .15s;
  display: flex; align-items: center; gap: 10px;
}
button.grade:hover { transform: translateY(-1px); }
button.grade.ok { color: var(--success); border-color: var(--success); }
button.grade.ok:hover { background: var(--success); color: #FFFCF3; }
button.grade.mid { color: #8A6A1F; border-color: var(--gold); }
button.grade.mid:hover { background: var(--gold); color: var(--ink); }
button.grade.err { color: var(--error); border-color: var(--error); }
button.grade.err:hover { background: var(--error); color: #FFFCF3; }
button.grade .ico {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
button.grade.ok .ico { background: var(--success); color: #FFFCF3; }
button.grade.mid .ico { background: var(--gold); color: var(--ink); }
button.grade.err .ico { background: var(--error); color: #FFFCF3; }

.resp-render { white-space: pre-wrap; }
.gabarito-pontos b { color: var(--ink); font-weight: 600; }
.empty {
  font-style: italic; color: var(--muted); padding: 20px;
  border: 1px dashed var(--line); border-radius: 3px;
}

/* ===== FINISH ===== */
.finish { text-align: center; padding: 50px 20px; }
.finish .big {
  font-family: 'Source Serif 4', serif; font-size: 72px; font-weight: 700;
  color: var(--accent); line-height: 1;
}
.finish h2 {
  font-family: 'Source Serif 4', serif; font-size: 26px;
  margin: 18px 0 10px; font-weight: 600;
}
.finish p { color: var(--muted); max-width: 520px; margin: 0 auto 24px; }

/* ===== APOIE ===== */
.apoie-wrap { max-width: 620px; margin: 0 auto; padding: 20px 0; }
.apoie-h {
  font-family: 'Source Serif 4', serif; font-size: 32px;
  font-weight: 600; letter-spacing: -0.01em; margin: 0 0 14px;
  text-align: center;
}
.apoie-texto {
  font-family: 'Source Serif 4', serif; font-size: 16px; line-height: 1.7;
  color: var(--ink-soft); margin-bottom: 28px;
}
.apoie-texto p { margin: 0 0 14px; }
.apoie-card {
  background: linear-gradient(135deg, #FFFCF3 0%, var(--gold-soft) 100%);
  border: 1px solid var(--gold); border-radius: 6px;
  padding: 28px 30px; text-align: center;
}
.apoie-card .label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted); font-weight: 600; margin-bottom: 10px;
}
.apoie-card .pix-chave {
  font-family: 'Monaco', 'Consolas', monospace; font-size: 20px;
  color: var(--ink); padding: 16px 22px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 3px; user-select: all;
  margin: 0 auto 16px; display: inline-block; min-width: 320px;
  word-break: break-all;
}
.apoie-card .pix-info {
  font-size: 13px; color: var(--ink-soft); margin-top: 4px;
}
.apoie-card .pix-info b { color: var(--ink); font-weight: 600; }
.apoie-card button {
  background: var(--ink); color: var(--paper); border: none;
  padding: 11px 24px; border-radius: 3px; font-weight: 600;
  font-family: 'Inter', sans-serif; cursor: pointer; font-size: 14px;
  margin-top: 6px;
}
.apoie-card button:hover { background: var(--accent); }
.apoie-card button.copied { background: var(--success); }

/* ===== ACCOUNT ===== */
.account-grid { display: grid; grid-template-columns: 280px 1fr; gap: 22px; margin-top: 8px; }
.account-card {
  background: #FFFCF3; border: 1px solid var(--line); border-radius: 4px; padding: 22px 24px;
}
.account-card .row { margin-bottom: 14px; }
.account-card .key {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); font-weight: 600; margin-bottom: 4px;
}
.account-card .val { font-size: 14px; color: var(--ink); }
.account-card .val.big { font-family: 'Source Serif 4', serif; font-size: 17px; font-weight: 600; }
.history-h {
  font-family: 'Source Serif 4', serif; font-size: 19px;
  margin: 0 0 14px; font-weight: 600;
}
.history-item {
  display: grid; grid-template-columns: 1fr 90px 110px 80px; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: 13px; align-items: center;
}
.history-item:last-child { border-bottom: none; }
.history-item .caderno { font-weight: 600; color: var(--ink); }
.history-item .modo {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); font-weight: 600;
}
.history-item .data { color: var(--muted); font-size: 12px; }
.history-item .nota {
  font-family: 'Source Serif 4', serif; font-weight: 700;
  text-align: right; font-size: 16px;
}
.history-item .nota.ok { color: var(--success); }
.history-item .nota.mid { color: #8A6A1F; }
.history-item .nota.err { color: var(--error); }

.config-warning {
  background: #FFE4B0; color: #6B4A1A; border: 1px solid #C8A867;
  padding: 14px 18px; border-radius: 4px; margin-bottom: 20px;
  font-size: 13px; line-height: 1.55;
}
.config-warning b { font-weight: 600; }
.config-warning code {
  background: rgba(0,0,0,0.08); padding: 1px 6px; border-radius: 2px;
  font-family: 'Monaco', monospace; font-size: 12px;
}
.loading-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 600px; color: var(--muted); font-size: 14px;
}

/* ============================================================
   ADIÇÕES PARA SUBSEÇÕES (v2)
   ============================================================ */

/* Card de aviso de público/fonte */
.aviso-card {
  background: linear-gradient(135deg, #FFFCF3 0%, var(--gold-soft) 100%);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  padding: 16px 22px;
  margin-bottom: 22px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  font-family: 'Source Serif 4', serif;
}

/* Section header dentro do caderno */
.section-h-h {
  font-family: 'Inter', sans-serif;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted); font-weight: 700;
  margin: 26px 0 12px;
  border-bottom: 1px solid var(--line); padding-bottom: 8px;
}

/* Lista de subseções */
.subsec-list { display: flex; flex-direction: column; gap: 10px; }
.subsec-card {
  background: #FFFCF3;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px 22px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  transition: all .15s;
}
.subsec-card:hover { border-color: var(--rule); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15,31,54,0.06); }
.subsec-card .subsec-title {
  font-family: 'Source Serif 4', serif; font-size: 17px;
  font-weight: 600; color: var(--ink);
}
.subsec-card .subsec-meta {
  font-size: 12px; color: var(--muted); margin-top: 3px;
}
.subsec-card .subsec-chips {
  display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap;
}
.chip-mini {
  font-size: 10.5px; padding: 2px 8px; border-radius: 99px;
  font-weight: 600; letter-spacing: 0.02em;
}
.chip-mini.dominado    { background: var(--success-bg); color: var(--success); }
.chip-mini.consolidando { background: var(--gold-soft); color: #8A6A1F; }
.chip-mini.critico     { background: var(--error-bg); color: var(--error); }
.chip-mini.novo        { background: var(--paper-soft); color: var(--muted); }
.subsec-card .subsec-arrow {
  color: var(--accent); font-size: 22px; font-weight: 600;
}

/* Launcher de recuperação ativa */
.ativa-launcher {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  background: #FFFCF3;
  border: 1px solid var(--line);
  border-left: 3px solid var(--rule);
  border-radius: 4px;
  padding: 18px 24px;
  cursor: pointer;
  transition: all .15s;
}
.ativa-launcher:hover { transform: translateY(-1px); border-color: var(--rule); box-shadow: 0 4px 12px rgba(15,31,54,0.06); }
.ativa-launcher .nome {
  font-family: 'Source Serif 4', serif; font-size: 17px;
  font-weight: 600; color: var(--ink); margin-bottom: 3px;
}
.ativa-launcher .info { font-size: 12.5px; color: var(--muted); }
.ativa-launcher .arrow { color: var(--rule); font-size: 22px; font-weight: 600; }

/* ============================================================
   ADIÇÕES PARA A NOVA CAPA (auth-left expandido) + APOIE justificado
   ============================================================ */

/* ===== AUTH LEFT — novo pitch ===== */
.auth-left .epigrafe {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 22px;
  line-height: 1.4;
  font-weight: 600;
  font-style: italic;
  color: var(--gold);
  margin: 22px 0 26px;
  text-align: center;
  letter-spacing: -0.005em;
}

.auth-left .pitch-dor {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14.5px;
  line-height: 1.65;
  opacity: 0.92;
  margin: 0 0 26px;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}
.auth-left .pitch-dor i { color: var(--gold); font-style: italic; }

.auth-left .pitch-block {
  margin-bottom: 22px;
}
.auth-left .pitch-block h4 {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin: 0 0 10px;
  font-weight: 700;
  border-bottom: 1px solid rgba(200,168,103,0.25);
  padding-bottom: 6px;
}
.auth-left .pitch-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.auth-left .pitch-block ul li {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 13.5px;
  line-height: 1.55;
  padding: 4px 0 4px 18px;
  position: relative;
  opacity: 0.92;
}
.auth-left .pitch-block ul li::before {
  content: '·';
  color: var(--gold);
  position: absolute;
  left: 2px;
  top: -2px;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 700;
}
.auth-left .pitch-block ul li b {
  color: var(--gold);
  font-weight: 600;
}
.auth-left .pitch-block ul li i {
  font-style: italic;
  opacity: 1;
}

.auth-left .pitch-fechamento {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15px;
  font-style: italic;
  text-align: center;
  margin: 24px 0 18px;
  padding-top: 16px;
  opacity: 0.95;
  border-top: 1px solid rgba(250,247,240,0.12);
}
.auth-left .pitch-fechamento i {
  color: var(--gold);
  font-style: italic;
  font-weight: 600;
}

/* ===== APOIE — parágrafos justificados ===== */
.apoie-texto p {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

/* ============================================================
   "O que é o CMM" — link na auth + modal
   ============================================================ */
.about-cmm-link {
  display: inline-block;
  margin: 14px 0 22px;
  font-size: 14px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  text-decoration: none;
  transition: color .15s, border-bottom-color .15s;
}
.about-cmm-link:hover { color: #FFFCF3; border-bottom-color: #FFFCF3; }

.about-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 31, 54, 0.55);
  display: flex; align-items: flex-start; justify-content: center;
  z-index: 1000;
  padding: 48px 16px;
  overflow-y: auto;
  animation: aboutFadeIn 0.18s ease-out;
}
@keyframes aboutFadeIn { from { opacity: 0 } to { opacity: 1 } }

.about-modal {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  max-width: 720px;
  width: 100%;
  padding: 48px 56px 40px;
  box-shadow: 0 12px 40px rgba(15, 31, 54, 0.18);
  font-family: 'Source Serif 4', Georgia, serif;
  color: var(--ink);
  line-height: 1.65;
}
.about-modal h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.about-modal h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--rule);
  letter-spacing: -0.005em;
}
.about-modal p {
  margin: 0 0 14px;
  font-size: 16px;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}
.about-modal blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: var(--paper-soft);
  font-size: 16px;
  color: var(--ink);
}
.about-modal .about-fechamento {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 15px;
}
.about-close {
  position: absolute; top: 10px; right: 14px;
  width: 32px; height: 32px;
  border: none; background: transparent;
  font-siz