/* FlowLex — identidade KnowFlow (grafite + verde neon, corvo Muni).
   Carregado por último: ajusta style.css/journey.css e define os componentes novos. */

:root {
  --accent: #7ed321;
  --accent-dark: #5fa817;
  --accent-glow: #7ed32155;
  --card: #1b1f1c;
  --card-2: #232824;
  --card-line: #3a443d;
  --text-strong: #f2f5f0;
  --review: #e5534b;
}

/* ---------- Cabeçalho ---------- */
header {
  background: #050605f2;
  border-bottom: 1px solid #1f2621;
  gap: 28px;
}
.brand {
  gap: 14px;
  letter-spacing: 0;
}
.brand-logo {
  height: 42px;
  width: auto;
  display: block;
}
.brand-product {
  font: 700 21px/1 var(--font-display);
  color: var(--text-strong);
  border-left: 1px solid #2c342f;
  padding-left: 14px;
}
.brand-product small {
  font: 11px var(--font-text);
  letter-spacing: 1px;
  color: var(--accent);
  margin-top: 5px;
}
nav a.active {
  color: var(--accent);
}
h1,
h2,
.journey-top h1,
.selection-title h1 {
  font-family: var(--font-display);
  letter-spacing: 0.2px;
}

/* ---------- Botões ---------- */
.primary {
  background: linear-gradient(#8ee032, var(--accent));
  border-color: var(--accent-dark);
  color: #0b0f08;
  box-shadow:
    0 3px 0 #2d4a12,
    0 0 18px var(--accent-glow);
}
.primary:hover {
  background: #93e63a;
}
.secondary {
  background: #121513;
  border-color: #2f3a32;
  color: var(--accent);
}

/* ---------- Muni ---------- */
.muni {
  width: 58px;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px #000a);
}
.muni-hero {
  width: 118px;
  display: block;
  margin: 0 auto 6px;
  filter: drop-shadow(0 8px 18px #000c);
}
.muni-line {
  display: flex;
  gap: 16px;
  align-items: center;
}
.muni-line h2 {
  margin: 6px 0 4px;
}

/* ---------- Seleção de leis ---------- */
.subject-tabs .active {
  background: var(--accent);
  color: #0b0f08;
}
.law-tile {
  background: linear-gradient(160deg, var(--card-2), var(--card));
  border: 1px solid var(--card-line);
  color: var(--text-strong);
  box-shadow: 0 10px 26px #000a;
}
.law-tile:hover {
  outline-color: var(--accent);
  border-color: var(--accent-dark);
}
.law-code {
  border-color: var(--accent-dark);
  color: var(--accent);
}
.law-tile > span:not(.law-code) {
  color: #aab5ad;
}
.law-progress {
  background: #2c342f;
  border-radius: 3px;
}
.law-progress i {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  border-radius: 3px;
}
.tile-stats {
  min-height: 18px;
  font-size: 12px;
}
.tile-review,
.stat-review {
  color: #ff8a82;
}
.review-call {
  display: inline-block;
  margin-top: 10px;
  color: #ff8a82;
  border: 1px solid #6b2c28;
  background: #2a1110;
  padding: 7px 14px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
}

/* ---------- Mapa ---------- */
.journey-game {
  background:
    radial-gradient(ellipse at 30% 0%, #1b2a1466, transparent 60%),
    radial-gradient(ellipse at 80% 100%, #0f1a0b55, transparent 60%), #070807;
}
.journey-stats {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-left: auto;
  font-size: 13px;
}
.stat-points b {
  color: var(--accent);
  font: 700 18px var(--font-display);
}
.stat-review {
  text-decoration: none;
}
.stat-review b {
  font: 700 18px var(--font-display);
}
.journey-score {
  margin-left: 18px;
}
.journey-score strong {
  color: var(--text-strong);
}
.legal-canvas:before {
  background: linear-gradient(
    90deg,
    #0f130f,
    var(--accent) 18%,
    #9cf04a 60%,
    var(--accent) 85%,
    #0f130f
  );
  box-shadow:
    0 0 14px var(--accent-glow),
    0 0 2px var(--accent);
}
.section-plaque {
  background: #141814;
  color: #93a198;
  border: 1px dashed #2c352f;
}
.legal-card {
  background: linear-gradient(160deg, var(--card-2), var(--card));
  color: #d9dfd8;
  border: 1px solid var(--card-line);
  border-top: 2px solid var(--accent-dark);
  box-shadow: 0 6px 18px #000b;
}
.legal-card strong {
  color: var(--text-strong);
  font-family: var(--font-display);
}
.legal-card:hover {
  outline-color: var(--accent);
}
.legal-card.to-review {
  border-top-color: var(--review);
}
.legal-marker {
  background: #0d110d;
  border-color: var(--accent-dark);
  color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}
.article-slot:after,
.legal-branches:before {
  background: var(--accent-dark);
}
.curve path {
  stroke: #4f7d2a;
  stroke-width: 1.2;
}
.sealed {
  position: relative;
  border: 2px dashed var(--accent);
  background: #0c100b;
  width: 56px;
  height: 56px;
  box-shadow: 0 0 24px var(--accent-glow);
}
.sealed > span {
  font: 700 28px var(--font-display);
  color: var(--accent);
}
.sealed .muni,
.pending-branch .muni {
  position: absolute;
  width: 54px;
  left: -58px;
  bottom: -8px;
}
.pending-branch {
  background: transparent;
  color: var(--accent);
}
.pending-branch > span {
  border: 2px dashed var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
}
.review-badge,
.doubt-badge {
  position: absolute;
  right: -10px;
  top: -11px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: normal 700 13px/1 var(--font-text);
  color: #fff;
  background: var(--review);
  border: 2px solid #070807;
  box-shadow: 0 0 10px #e5534b88;
}
.doubt-badge {
  background: #b78a1f;
  box-shadow: none;
}
.stack-tab {
  background: #141814;
  color: var(--accent);
  border-color: #2f3a32;
}

/* ---------- Painel de desafio ---------- */
.literal-dock {
  background: linear-gradient(160deg, #1d221e, #141714);
  color: #e3e8e1;
  border: 1px solid var(--card-line);
  border-top: 2px solid var(--accent);
  box-shadow:
    0 -4px 30px #000c,
    0 0 0 1px #0006;
  max-height: none;
}
.quiz-tag {
  background: var(--accent);
  color: #0b0f08;
}
.literal-heading {
  flex-wrap: wrap;
  color: #9eaba2;
}
.step-count {
  margin-left: auto;
  color: #7c8a80;
}
.literal-prompt {
  font-size: 16px;
  color: var(--text-strong);
}
.stage-track {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #b6c2b9;
}
.stage-track i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid #56635a;
  display: inline-block;
}
.stage-track i.used {
  background: #56635a;
}
.stage-track i.now {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.stage-track b {
  font-weight: 600;
  margin-left: 4px;
  letter-spacing: 0.3px;
}
.typed-answer input {
  width: 100%;
  font: 600 20px var(--font-display);
  letter-spacing: 1px;
  padding: 12px 16px;
  background: #0b0e0b;
  color: var(--text-strong);
  border: 1px solid #3b473f;
  border-radius: 8px;
  text-align: center;
}
.typed-answer input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
}
.muni-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 12px;
  padding: 8px 12px;
  background: #0f150c;
  border: 1px solid #2f4a1c;
  border-radius: 8px;
  font-size: 14px;
}
.muni-hint .muni {
  width: 42px;
}
.muni-hint code {
  font:
    700 16px/1 Consolas,
    monospace;
  color: var(--accent);
  letter-spacing: 1px;
  margin-left: 6px;
  white-space: nowrap;
}
.muni-hint.is-right {
  border-color: #3f6b21;
}
.muni-hint.is-review {
  background: #1d0f0e;
  border-color: #6b2c28;
}
.literal-options label,
.option-button {
  background: #0f1310;
  border: 1px solid #3a463e;
  color: var(--text-strong);
  font: 15px var(--font-text);
  border-radius: 8px;
  padding: 11px 14px;
  text-align: center;
  justify-content: center;
}
.literal-options label:hover,
.option-button:hover {
  border-color: var(--accent);
}
.literal-options label:has(input:checked) {
  background: #1c2a13;
  border-color: var(--accent);
}
.literal-options input {
  accent-color: var(--accent);
}
.flash-right {
  background: #1f4d12 !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 16px var(--accent-glow);
}
.flash-wrong {
  background: #4d1714 !important;
  border-color: var(--review) !important;
}
.flash-right:disabled,
.flash-wrong:disabled {
  opacity: 1;
}
.literal-actions {
  flex-wrap: wrap;
}
.literal-actions label {
  color: #aeb9b1;
}
.literal-actions .primary {
  margin-left: auto;
  background: linear-gradient(#8ee032, var(--accent));
}
.text-button {
  color: #b9c5bc;
  border-bottom-color: #56635a;
}
.text-button:hover {
  color: var(--accent);
}
.literal-error {
  color: #ffb0a9;
  font-size: 13px;
}
.literal-origin {
  color: #768479;
}
.revealed-feedback.is-right {
  border-top-color: var(--accent);
}
.revealed-feedback.is-review {
  border-top-color: var(--review);
}
.revealed-feedback.is-review .quiz-tag {
  background: var(--review);
  color: #fff;
}
.revealed-text {
  font: 15px/1.6 var(--font-text);
  background: #0c0f0c;
  border-left: 3px solid var(--accent-dark);
  padding: 10px 14px;
  border-radius: 4px;
  max-height: 130px;
  overflow: auto;
}
.is-review .revealed-text {
  border-left-color: var(--review);
}
.muted-line {
  color: #a4b0a7;
  margin: 0;
  font-size: 13px;
}
.device-text {
  background: #0f130f;
  color: #e6ebe4;
  border: 1px solid #2c352f;
}
.historical-note {
  background: #1a2016;
}

/* ---------- Revisões ---------- */
.journey-review-call {
  display: flex;
  gap: 18px;
  align-items: center;
  background: linear-gradient(160deg, #1d221e, #121512);
  border: 1px solid var(--card-line);
  border-left: 3px solid var(--review);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 30px;
}
.journey-review-call[hidden] {
  display: none;
}
.journey-review-call h2 {
  margin: 4px 0;
}
.journey-review-call .primary {
  margin-left: auto;
  white-space: nowrap;
}
.review-dock {
  margin: 0 0 30px;
  width: 100%;
}
.option-button {
  cursor: pointer;
}

/* ---------- Animações (respeitam redução de movimento) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .shake {
    animation: shake 0.35s ease-in-out;
  }
  @keyframes shake {
    25% {
      transform: translateX(-6px);
    }
    75% {
      transform: translateX(6px);
    }
  }
  .sealed {
    animation: pulse 1.8s ease-in-out infinite;
  }
  @keyframes pulse {
    50% {
      box-shadow: 0 0 36px #7ed32188;
    }
  }
  .revealed-feedback .muni {
    animation: hop 0.5s ease-out;
  }
  @keyframes hop {
    40% {
      transform: translateY(-10px) rotate(-4deg);
    }
  }
}

@media (max-width: 850px) {
  .brand-logo {
    height: 34px;
  }
  .journey-stats {
    order: 3;
    width: 100%;
    margin-left: 0;
  }
  .journey-review-call {
    flex-wrap: wrap;
  }
}
@media (max-width: 520px) {
  .brand-product small {
    display: none;
  }
  .sealed .muni,
  .pending-branch .muni {
    display: none;
  }
  .muni-line .muni {
    width: 44px;
  }
}

/* ---------- Continuar de onde parou ---------- */
.resume-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(760px, 100%);
  margin: 0 auto 28px;
  padding: 14px 20px;
  text-align: left;
  background: linear-gradient(160deg, #1d2a15, #121712);
  border: 1px solid var(--accent-dark);
  border-radius: 12px;
  color: var(--text-strong);
  box-shadow: 0 0 22px var(--accent-glow);
}
.resume-card > span {
  display: grid;
  gap: 3px;
  flex: 1;
}
.resume-card strong {
  font: 700 19px var(--font-display);
}
.resume-card small {
  color: #aebbb2;
}
.resume-card > b {
  font-size: 26px;
  color: var(--accent);
}
.resume-card:hover {
  border-color: var(--accent);
}
.scope-pill {
  margin-top: 4px;
  background: #0f140d;
  border: 1px dashed var(--accent-dark);
  color: #cfe9b5;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12px;
  max-width: 520px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scope-pill:hover {
  border-style: solid;
  color: var(--accent);
}
.nest-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: #ffb3ad;
}

/* ---------- Mapa da lei ---------- */
.outline-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}
.outline-head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.outline-head h1 {
  margin: 6px 0;
}
.outline-tree,
.outline-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.outline-tree ul {
  margin-left: 22px;
  border-left: 1px solid #2c352f;
  padding-left: 10px;
}
.outline-tree summary {
  list-style: none;
  cursor: pointer;
}
.outline-tree summary::-webkit-details-marker {
  display: none;
}
.outline-tree summary {
  display: flex;
  align-items: center;
}
.outline-tree summary:before {
  content: '▸';
  color: var(--accent);
  width: 16px;
  flex-shrink: 0;
}
.outline-tree details[open] > summary:before {
  content: '▾';
}
.outline-tree summary .outline-row {
  flex: 1;
  min-width: 0;
}
.outline-tree li > .outline-row {
  margin-left: 16px;
}
.outline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 90px auto;
  grid-template-areas: 'label meta bar action';
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  margin: 2px 0;
}
.outline-row:hover {
  background: #141a14;
}
.outline-check {
  grid-area: label;
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  min-width: 0;
}
.outline-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.outline-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.outline-label b {
  color: var(--text-strong);
}
.level-1 .outline-label b,
.level-2 .outline-label b,
.level-3 .outline-label b {
  color: var(--accent);
}
.outline-meta {
  grid-area: meta;
  font-size: 12px;
  color: #8e9c92;
  white-space: nowrap;
}
.outline-bar {
  grid-area: bar;
  height: 4px;
  background: #2c342f;
  border-radius: 3px;
}
.outline-bar i {
  display: block;
  height: 4px;
  background: var(--accent);
  border-radius: 3px;
}
.outline-row .text-button {
  grid-area: action;
  font-size: 12px;
  white-space: nowrap;
}
.range-box {
  margin: 22px 0 0;
  border: 1px solid #2c352f;
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.range-box legend {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 1px;
  padding: 0 6px;
}
.range-box input {
  width: 80px;
  background: #0b0e0b;
  border: 1px solid #3b473f;
  color: var(--text-strong);
  border-radius: 6px;
  padding: 6px 8px;
  text-align: center;
}
.outline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
  position: sticky;
  bottom: 0;
  padding: 12px 0;
  background: linear-gradient(transparent, #070807 30%);
}

/* ---------- Ninho do Muni ---------- */
.ninho {
  margin-bottom: 40px;
}
.ninho-head {
  display: flex;
  gap: 18px;
  align-items: center;
  background: linear-gradient(160deg, #1d221e, #121512);
  border: 1px solid var(--card-line);
  border-left: 3px solid var(--review);
  border-radius: 12px;
  padding: 18px 22px;
}
.ninho-head h1 {
  margin: 4px 0;
  font-size: 26px;
}
.ninho-head .primary {
  margin-left: auto;
  white-space: nowrap;
}
.reason-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.reason-chip {
  background: #151a15;
  border: 1px solid #2f3a32;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 12px;
  color: #b9c5bc;
}
.reason-chip b {
  color: var(--accent);
  margin-left: 4px;
}
.blind-spots {
  margin-top: 26px;
}
.blind-spots h2 {
  margin-bottom: 2px;
}
.blind-spots ul,
.card-list ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.blind-spots li,
.card-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #1f2621;
}
.card-list {
  margin-top: 22px;
}
.card-list summary {
  cursor: pointer;
  color: var(--accent);
}
.card-list li > span:first-child {
  flex: 1;
  min-width: 220px;
}
.card-list .is-suspended {
  opacity: 0.55;
}
.flight {
  margin: 18px 0 0;
  width: 100%;
}
.flash-front {
  white-space: pre-line;
}
.contrast-ask {
  color: #ffb3ad;
  margin: 10px 0 0;
}
.flash-answer {
  font-size: 18px;
  margin: 12px 0 8px;
}
.flash-answer b {
  color: var(--accent);
}
.flash-back .revealed-text {
  white-space: pre-line;
}
.grade-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.grade {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #3a463e;
  background: #0f1310;
  color: var(--text-strong);
}
.grade small {
  color: #8e9c92;
}
.grade-0 {
  border-color: #6b2c28;
}
.grade-0 b {
  color: #ff8a82;
}
.grade-3 b {
  color: var(--accent);
}
.grade:hover,
.grade.suggested {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.grade-0.suggested {
  border-color: var(--review);
  box-shadow: 0 0 0 2px #e5534b44;
}

@media (max-width: 700px) {
  .outline-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'label label' 'meta action';
  }
  .outline-bar {
    display: none;
  }
  .ninho-head {
    flex-wrap: wrap;
  }
  .grade-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .outline-head {
    flex-direction: column;
  }
}

/* ---------- Chip do cabeçalho ---------- */
.game-chip {
  display: flex;
  gap: 8px;
  align-items: center;
  text-decoration: none;
  color: #c8d3cb;
  border: 1px solid #2c352f;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  margin-left: auto;
}
.game-chip:hover {
  border-color: var(--accent);
}
.game-chip + .profile {
  margin-left: 0;
}
.flame {
  filter: grayscale(1);
  opacity: 0.7;
}
.flame.lit {
  filter: none;
  opacity: 1;
}
.flame b {
  color: var(--text-strong);
}
.chip-level {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Conquistas ---------- */
.game-page section {
  margin-bottom: 30px;
}
.game-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  background: linear-gradient(160deg, #1d2a15, #111511);
  border: 1px solid var(--card-line);
  border-radius: 14px;
  padding: 22px 26px;
}
.game-hero .muni-hero {
  margin: 0;
  width: 110px;
}
.level-box h1 {
  margin: 4px 0;
  font-size: 34px;
}
.level-bar,
.goal-bar {
  display: block;
  height: 8px;
  background: #2c342f;
  border-radius: 6px;
  margin: 8px 0;
  overflow: hidden;
}
.level-bar i,
.goal-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  box-shadow: 0 0 10px var(--accent-glow);
}
.streak-box {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 190px;
  padding: 14px 18px;
  border: 1px solid #2c352f;
  border-radius: 12px;
  background: #0d100d;
  text-align: center;
}
.streak-box .big-flame {
  font-size: 34px;
  filter: grayscale(1);
  opacity: 0.6;
}
.streak-box.lit .big-flame {
  filter: none;
  opacity: 1;
}
.streak-box strong {
  font: 700 38px/1 var(--font-display);
  color: var(--text-strong);
}
.streak-box small {
  color: #8e9c92;
}
.goals ul,
.boss-list,
.badge-list,
.boss-results {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}
.goals li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 4px 8px;
  padding: 10px 0;
  border-bottom: 1px solid #1f2621;
}
.goals li .goal-bar {
  grid-column: 2;
}
.goals li.done {
  color: #cfe9b5;
}
.goals .active {
  background: var(--accent);
  color: #0b0f08;
}
.boss-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #2c352f;
  border-radius: 10px;
  margin-bottom: 8px;
}
.boss-dock {
  width: 100%;
  margin: 12px 0;
}
.boss-item {
  padding: 10px 0;
  border-bottom: 1px dashed #2c352f;
}
.boss-results li {
  padding: 6px 0;
}
.boss-results .ok {
  color: #cfe9b5;
}
.boss-results .miss {
  color: #ffb3ad;
}
.badge-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.badge-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #5a4a14;
  background: linear-gradient(160deg, #2a2410, #151409);
  border-radius: 12px;
}
.badge-card small {
  display: block;
  color: #b7ab7c;
}
.medal {
  font-size: 22px;
}
.board tr.me td {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Mapa de calor no Mapa da lei ---------- */
.outline-row.heat-andamento {
  box-shadow: inset 3px 0 0 #3f6b21;
}
.outline-row.heat-revisar {
  box-shadow: inset 3px 0 0 var(--review);
  background: #1d0f0e55;
}
.outline-row.heat-revelado {
  box-shadow: inset 3px 0 0 var(--accent);
  background: #13200d66;
}
.outline-row.heat-dominado {
  box-shadow: inset 3px 0 0 #d4a72c;
  background: #2a241055;
}
.outline-buttons {
  grid-area: action;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.boss-link {
  color: #f0c94d;
}
.heat-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: #8e9c92;
}
.heat-legend span:before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: -1px;
  background: #2c342f;
}
.heat-legend .heat-andamento:before {
  background: #3f6b21;
}
.heat-legend .heat-revisar:before {
  background: var(--review);
}
.heat-legend .heat-revelado:before {
  background: var(--accent);
}
.heat-legend .heat-dominado:before {
  background: #d4a72c;
}
.export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

@media (max-width: 760px) {
  .game-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .game-chip .chip-level {
    display: none;
  }
}

/* Cabeçalho em telas médias: esconde rótulos secundários para caber numa linha. */
@media (max-width: 1280px) {
  .profile label,
  .brand-product small {
    display: none;
  }
  header {
    gap: 18px;
  }
  nav {
    gap: 16px;
  }
}

/* ---------- Trilha por carreira ---------- */
.career-tab {
  border-style: dashed;
}
.career-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 22px;
}
.career-chips .active {
  background: var(--accent);
  color: #0b0f08;
}
.career-chips b {
  margin-left: 4px;
  opacity: 0.7;
}
.career-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.career-head h2,
.career-subtitle {
  margin: 6px 0 2px;
}
.career-subtitle {
  margin-top: 34px;
}
.import-button {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
}
.career-empty {
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
}
.edital-deck {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.edital-card {
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--card-line);
  background: linear-gradient(160deg, var(--card-2), var(--card));
  color: var(--text-strong);
}
.edital-card:hover {
  border-color: var(--accent);
}
.edital-card .law-code {
  justify-self: start;
}
.edital-card strong {
  font: 700 17px var(--font-display);
}
.edital-card small,
.edital-card > span:not(.law-code):not(.edital-meter) {
  color: #aab5ad;
}
.edital-meter {
  display: block;
  height: 5px;
  background: #2c342f;
  border-radius: 3px;
  overflow: hidden;
}
.edital-meter i {
  display: block;
  height: 100%;
  background: var(--accent);
}
.incidence {
  align-self: flex-end;
  font-size: 11px;
  color: #0b0f08;
  background: var(--accent);
  border-radius: 10px;
  padding: 2px 8px;
  font-weight: 700;
}
.edital-group h3 {
  color: var(--accent);
  margin: 18px 0 6px;
}
.edital-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.edital-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  padding: 9px 4px;
  border-bottom: 1px solid #1f2621;
}
.item-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}
.item-note {
  margin: 6px 0 0;
  color: #f0c94d;
  font-size: 13px;
}
.status-local b,
.status-internacional b,
.status-infralegal b,
.status-generico b {
  color: #aab5ad;
  font-weight: 500;
}
.status-fora b {
  color: #ffcf8a;
}
.danger {
  color: #ff8a82;
}

/* ---------- Flashcards por matéria ---------- */
.flash-page .page-head .muni {
  width: 72px;
}
.materia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.materia-tile {
  display: grid;
  gap: 2px;
  justify-items: start;
  text-align: left;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--card-line);
  background: linear-gradient(160deg, var(--card-2), var(--card));
  color: var(--text-strong);
}
.materia-tile:hover,
.materia-tile.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.materia-tile .materia-name {
  font-weight: 600;
  color: #cfe9b5;
}
.materia-tile strong {
  font: 700 30px/1.1 var(--font-display);
  margin-top: 6px;
}
.materia-tile small {
  color: #8e9c92;
  margin-top: 6px;
}
.materia-due {
  font-size: 12px;
  color: #8e9c92;
}
.materia-tile.has-due .materia-due {
  color: #ffb3ad;
  font-weight: 600;
}
.deck {
  margin-top: 28px;
}
.deck-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.deck-head h2 {
  margin: 0;
}
.deck-modes,
.law-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.deck-modes .active,
.law-filter .active {
  background: var(--accent);
  color: #0b0f08;
}
.law-filter {
  margin: 10px 0 16px;
}
.deck-progress {
  height: 4px;
  background: #2c342f;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 14px;
}
.deck-progress i {
  display: block;
  height: 100%;
  background: var(--accent);
}
.flip-card {
  perspective: 1400px;
  cursor: pointer;
  outline: none;
  max-width: 760px;
  margin: 0 auto;
}
.flip-inner {
  position: relative;
  display: grid;
  min-height: 300px;
  transition: transform 0.5s ease;
  transform-style: preserve-3d;
}
.flip-card.flipped .flip-inner {
  transform: rotateY(180deg);
}
.flip-face {
  grid-area: 1 / 1;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  padding: 22px 26px;
  border: 1px solid var(--card-line);
  background: linear-gradient(160deg, #1d221e, #141714);
  box-shadow: 0 10px 30px #000b;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.flip-front {
  border-top: 3px solid var(--accent);
}
.flip-back {
  transform: rotateY(180deg);
  border-top: 3px solid #d4a72c;
  background: linear-gradient(160deg, #22200f, #141410);
}
.flip-card:focus-visible .flip-face {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.flip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: #8e9c92;
}
.flip-meta span:last-child {
  margin-left: auto;
}
.flip-text {
  font: 18px/1.6 var(--font-text);
  color: var(--text-strong);
  white-space: pre-line;
  margin: 0;
}
.flip-text.small {
  font-size: 15px;
  color: #d9dfd8;
  max-height: 180px;
  overflow: auto;
}
.flip-hint {
  margin-top: auto;
  color: #6f7d73;
}
.deck-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 16px auto 0;
  max-width: 760px;
}
.deck-actions .grade {
  flex: 1;
  min-width: 130px;
}
.deck-done {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  padding: 24px;
  flex-wrap: wrap;
}
.subject-tabs small {
  opacity: 0.6;
  margin-left: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .flip-inner {
    transition: none;
  }
}

/* =====================================================================
   Layout compacto (v2): cabeçalho numa linha, Trilha sem rolagem,
   listas de leis enxutas, Meu edital, calibração e Juntos.
   ===================================================================== */

/* ---------- Cabeçalho e submenu ---------- */
header {
  padding: 8px 22px;
  gap: 20px;
  flex-wrap: nowrap;
}
.brand-logo {
  height: 32px;
}
.brand-product {
  font-size: 19px;
}
.brand-product small {
  display: none;
}
header nav {
  gap: 16px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
nav a.nav-icon {
  font-size: 17px;
  line-height: 1;
}
header select {
  max-width: 130px;
  padding: 6px 8px;
}
.subnav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #232a25;
}
.subnav a {
  color: #a9b6ad;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 18px;
  border: 1px solid transparent;
}
.subnav a:hover {
  border-color: #2f3a32;
}
.subnav a.active {
  color: #0b0f08;
  background: var(--accent);
  font-weight: 600;
}
main > .subnav {
  max-width: 1180px;
  margin: 18px auto 0;
  padding: 0 24px 10px;
}

/* ---------- Trilha: tudo cabe na tela, pergunta sempre visível ---------- */
.journey-game {
  height: calc(100dvh - var(--header-h, 56px));
  min-height: 440px;
}
.journey-top {
  gap: 14px;
  padding: 8px 18px;
  flex-wrap: nowrap;
}
.journey-title {
  min-width: 0;
  flex: 0 1 auto;
}
.journey-title .eyebrow {
  font-size: 9px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.journey-top h1 {
  font-size: 17px;
  margin: 1px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 34vw;
}
.journey-top .scope-pill {
  margin: 0;
  flex: 0 1 auto;
  min-width: 90px;
  max-width: 260px;
}
.journey-stats {
  gap: 12px;
  flex-shrink: 0;
}
.journey-stats .journey-score {
  margin: 0;
  font-size: 13px;
  color: #8fa094;
}
.journey-stats .journey-score b {
  font: 700 18px var(--font-display);
  color: var(--accent);
}
.map-buttons {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.legal-viewport {
  min-height: 130px;
}
.journey-game .literal-dock {
  margin: 6px auto;
  max-height: 52dvh;
  overflow: auto;
  flex-shrink: 0;
}
@media (max-height: 860px) {
  .journey-bottom {
    display: none;
  }
  .journey-game .section-plaque {
    display: none;
  }
}
@media (max-width: 1100px) {
  .map-buttons #j-left,
  .map-buttons #j-right {
    display: none;
  }
}
@media (max-width: 850px) {
  header {
    flex-wrap: wrap;
    gap: 10px;
  }
  header nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }
  .journey-top {
    flex-wrap: wrap;
  }
  .journey-top h1 {
    max-width: 70vw;
  }
  .map-buttons {
    display: none;
  }
}
@media (max-width: 850px) {
  .journey-game {
    height: calc(100dvh - var(--header-h, 56px));
    min-height: 460px;
  }
  .journey-game .legal-viewport {
    height: auto;
    flex: 1;
    min-height: 110px;
  }
  .journey-game .literal-dock {
    max-height: 62dvh;
  }
  .journey-top {
    padding: 6px 12px;
    gap: 8px;
  }
  .journey-stats .journey-score {
    width: auto;
    display: inline;
  }
}
@media (max-width: 520px) {
  header {
    padding: 6px 12px;
  }
  .brand-product {
    display: none;
  }
  .journey-title {
    flex: 1 1 60%;
  }
  .journey-top .scope-pill {
    max-width: 100%;
  }
  .journey-stats {
    margin-left: 0;
  }
}

/* ---------- Grau de certeza ---------- */
.certainty {
  display: inline-flex;
  border: 1px solid #3a443d;
  border-radius: 18px;
  padding: 0;
  margin: 0;
  overflow: hidden;
}
.certainty label {
  cursor: pointer;
  font-size: 12px;
}
.certainty input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.certainty span {
  display: block;
  padding: 5px 11px;
  color: #b8c4bb;
  border-right: 1px solid #3a443d;
}
.certainty label:last-child span {
  border-right: 0;
}
.certainty input:checked + span {
  background: #2a3a1f;
  color: #eaffd6;
  font-weight: 600;
}
.certainty input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* ---------- Bônus de conexão ---------- */
.connection-box {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px dashed #4c6b33;
  border-radius: 8px;
  background: #121a0e;
}
.connection-box > p {
  margin: 8px 0;
}
.connection-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.connection-result p {
  margin: 8px 0 0;
}

/* ---------- Escolha de legislação ---------- */
.journey-selection {
  padding-top: 18px;
}
.selection-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  text-align: left;
}
.selection-head .muni {
  width: 52px;
}
.selection-head h1 {
  margin: 0;
  font-size: 26px;
}
.selection-head .review-call {
  margin: 0 0 0 auto;
}
.journey-selection .resume-card {
  margin: 0 0 14px;
}
.subject-tabs {
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.subject-tabs .tab-gap {
  width: 1px;
  height: 24px;
  background: #2f3a32;
  margin: 0 6px;
}
.materia-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  padding: 8px 10px;
  background: #0f120f;
  border: 1px solid #1f2621;
  border-radius: 8px;
}
.materia-chips .active {
  background: #25361a;
  border-color: var(--accent);
  color: #eaffd6;
}
.law-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.law-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto 110px 92px;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid #262e28;
  background: linear-gradient(160deg, #191d1a, #131614);
  color: var(--text-strong);
  cursor: pointer;
}
.law-row:hover:not(:disabled) {
  border-color: var(--accent-dark);
  background: #1a2117;
}
.law-row:disabled {
  opacity: 0.5;
  cursor: default;
}
.law-row .law-code {
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.law-name {
  min-width: 0;
}
.law-name strong {
  display: block;
  font: 600 15px var(--font-display);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.law-name small {
  color: #95a39a;
  font-size: 12px;
}
.law-row .incidence {
  align-self: center;
  white-space: nowrap;
}
.law-extra {
  display: flex;
  gap: 6px;
}
.incidence.hot {
  background: #ff8a3d;
}
.law-meter {
  position: relative;
  height: 16px;
  background: #242b26;
  border-radius: 8px;
  overflow: hidden;
}
.law-meter i {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent);
  opacity: 0.8;
}
.law-meter em {
  position: relative;
  display: block;
  text-align: center;
  font: normal 600 11px/16px var(--font-text);
  color: #eef5ea;
  text-shadow: 0 1px 2px #000;
}
.law-go {
  color: var(--accent);
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .law-row {
    grid-template-columns: 86px minmax(0, 1fr) 64px;
  }
  .law-extra,
  .law-go {
    display: none;
  }
}

/* ---------- Meu edital ---------- */
.plan-hero {
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid #2d3a2a;
  border-radius: 12px;
  background: linear-gradient(140deg, #18210f, #111411);
  margin-bottom: 12px;
}
.plan-info h2 {
  margin: 4px 0;
}
.plan-info p {
  margin: 4px 0;
}
.plan-info strong {
  color: var(--accent);
  font: 700 22px var(--font-display);
}
.plan-ring {
  --p: 0;
  flex-shrink: 0;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background:
    radial-gradient(closest-side, #111411 78%, transparent 79%),
    conic-gradient(var(--accent) calc(var(--p) * 1%), #2a322c 0);
}
.plan-ring b {
  font: 700 24px var(--font-display);
  color: var(--text-strong);
}
.plan-ring small {
  font-size: 10px;
  color: #93a198;
  max-width: 80px;
}
.plan-group h3 {
  margin: 18px 0 8px;
  font: 600 16px var(--font-display);
}
.plan-group h3 small {
  color: #8fa094;
  font-weight: 400;
  margin-left: 8px;
}
.edital-card.is-mine {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px var(--accent-dark),
    0 0 18px var(--accent-glow);
}
.edital-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0 12px;
}
.target-form {
  display: grid;
  gap: 12px;
}
@media (max-width: 620px) {
  .plan-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Calibração ---------- */
.calibration-row {
  display: flex;
  gap: 20px;
  align-items: center;
}
.calibration a {
  color: #ff8a82;
}

/* ---------- Juntos: duelo, aula e desafio ---------- */
.together-page .panel {
  margin-bottom: 16px;
}
.players {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.player-pick {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.versus {
  font: 700 26px var(--font-display);
  color: var(--accent);
  padding-bottom: 6px;
}
.game-setup {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 14px;
}
.game-setup .field select {
  max-width: 420px;
}
.game-setup .check {
  font-size: 13px;
  color: #b5c1b8;
  padding-bottom: 10px;
}
.match-pass {
  text-align: center;
}
.match-results {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  display: grid;
  gap: 6px;
}
.match-results li {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  background: #151a16;
}
.match-results li.is-right {
  border-left: 3px solid var(--accent);
}
.match-results li.is-review {
  border-left: 3px solid var(--review);
}
.score-line {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
}
.score-line b {
  color: var(--accent);
}
.podium {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
}
.podium li {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  padding: 8px 12px;
  background: #151a16;
  border-radius: 6px;
}
.podium li:first-child {
  border: 1px solid var(--accent);
}
.challenge-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}
.challenge-banner {
  padding: 10px 14px;
  border: 1px dashed var(--accent-dark);
  border-radius: 8px;
  background: #121a0e;
}
@media (max-width: 760px) {
  .challenge-grid {
    grid-template-columns: 1fr;
  }
  .match-results li {
    grid-template-columns: 1fr;
  }
}

/* Modo aula: letras grandes para o projetor. */
.class-stage {
  background: #0a0c0a;
  border: 1px solid #2c352f;
  border-radius: 12px;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.class-stage:fullscreen {
  border-radius: 0;
  justify-content: center;
  padding: 4vh 6vw;
}
.class-top {
  display: flex;
  gap: 14px;
  align-items: center;
  color: #93a198;
}
.class-top button {
  margin-left: auto;
}
.class-prompt {
  font: clamp(22px, 2.6vw, 40px) / 1.45 var(--font-text);
  color: #f2f5f0;
  margin: 0;
}
.class-tip {
  color: #93a198;
  font-size: 20px;
  margin: 0;
}
.class-options {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.class-options li {
  font-size: clamp(18px, 2vw, 30px);
  padding: 12px 18px;
  border: 1px solid #3a443d;
  border-radius: 10px;
  background: #151a16;
}
.class-options li b {
  color: var(--accent);
  margin-right: 10px;
}
.class-options li.is-answer {
  border-color: var(--accent);
  background: #213415;
  box-shadow: 0 0 22px var(--accent-glow);
}
.class-answer {
  font-size: clamp(20px, 2.2vw, 32px);
  margin: 0;
}
.class-answer b {
  color: var(--accent);
}
.class-teams {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.team {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid #2c352f;
  border-radius: 10px;
  background: #121512;
}
.team strong {
  font: 700 28px var(--font-display);
  color: var(--accent);
  min-width: 34px;
  text-align: center;
}
.class-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}
@media (max-width: 700px) {
  .class-options {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   Missões de doutrina: sumário por carreira e jogador da missão
   ===================================================================== */
.doctrine-careers {
  margin: 12px 0 8px;
}
.focus-toggle {
  display: block;
  font-size: 13px;
  color: #b5c1b8;
  margin-bottom: 10px;
}
.doctrine-part h2 {
  margin: 22px 0 10px;
  font: 600 18px var(--font-display);
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.module-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #2a332c;
  background: linear-gradient(160deg, #1a1f1b, #131614);
  color: var(--text-strong);
  cursor: pointer;
}
.module-card:hover,
.module-card.open {
  border-color: var(--accent);
}
.module-card.planned {
  opacity: 0.72;
}
.module-code {
  font: 700 11px var(--font-text);
  letter-spacing: 1px;
  color: var(--accent);
}
.module-card strong {
  font: 600 15px/1.25 var(--font-display);
}
.module-card small {
  color: #8d9b92;
  font-size: 11px;
}
.weight {
  font-size: 12px;
  color: #93a198;
}
.weight-2,
.weight-3 {
  color: #ffb45e;
}
.weight-3 {
  font-weight: 700;
}
.module-status {
  font-size: 12px;
  color: #cfe9b5;
}
.stars {
  color: #ffc53d;
  letter-spacing: 1px;
}
.stars i {
  color: #3a433c;
  font-style: normal;
}
.module-detail {
  margin: 12px 0 4px;
  padding: 14px 16px;
  border: 1px solid #2d3a2a;
  border-radius: 10px;
  background: #111611;
}
.module-detail h3 {
  margin: 0 0 10px;
}
.mission-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.mission-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: #171c18;
  border: 1px solid #242c26;
}
.mission-row.done {
  border-color: #3c5a26;
}
.mission-row p {
  margin: 2px 0;
  font-size: 13px;
}
.mission-n {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25361a;
  color: var(--accent);
  font-weight: 700;
}
.mission-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  .mission-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }
}

/* Jogador */
.mission-player {
  max-width: 900px;
}
.mission-top {
  display: flex;
  gap: 14px;
  align-items: center;
}
.mission-top h1 {
  margin: 2px 0;
  font-size: 22px;
}
.mission-hud {
  margin-left: auto;
  display: flex;
  gap: 12px;
  align-items: center;
  white-space: nowrap;
}
.mission-hud b {
  color: var(--accent);
  font: 700 20px var(--font-display);
}
.combo {
  color: #ffb45e;
  font-weight: 700;
}
.mission-steps {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 14px 0;
  gap: 6px;
  flex-wrap: wrap;
}
.mission-steps li {
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 12px;
  background: #171c18;
  color: #7f8f85;
  border: 1px solid #262e28;
}
.mission-steps li.done {
  color: #cfe9b5;
  border-color: #3c5a26;
}
.mission-steps li.now {
  background: var(--accent);
  color: #0b0f08;
  font-weight: 700;
}
.mission-card {
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid #2a332c;
  border-top: 2px solid var(--accent);
  background: linear-gradient(160deg, #1d221e, #141714);
}
.q-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.stage-intro {
  background: #121a0e;
  border: 1px dashed #4c6b33;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
}
.study-text {
  font: 16px/1.65 var(--font-text);
  color: #e6ebe4;
}
.memorize {
  background: #2a2412;
  border-left: 3px solid #ffc53d;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
}
.q-prompt {
  font: 17px/1.55 var(--font-text);
  color: #f2f5f0;
}
.answer-options {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}
.answer-options.ce {
  grid-template-columns: 1fr 1fr;
}
.answer-option {
  text-align: left;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid #3a443d;
  background: #151a16;
  color: #e6ebe4;
  font-size: 15px;
  cursor: pointer;
}
.answer-options.ce .answer-option {
  text-align: center;
  font-weight: 700;
}
.answer-option:hover:not(:disabled) {
  border-color: var(--accent);
}
.answer-option b {
  color: var(--accent);
  margin-right: 6px;
}
.typed-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.typed-row .typed-answer {
  flex: 1;
  min-width: 200px;
}
.typed-row input {
  width: 100%;
}
.order-list {
  padding-left: 22px;
  display: grid;
  gap: 6px;
}
.order-list li {
  background: #151a16;
  border: 1px solid #3a443d;
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.order-list li span {
  flex: 1;
}
.match-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.match-grid label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 10px;
  align-items: center;
}
.q-feedback {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #151a16;
  border-left: 4px solid var(--review);
}
.q-feedback.is-right {
  border-left-color: var(--accent);
}
.q-feedback p {
  margin: 6px 0;
}
.challenge-bar {
  display: flex;
  gap: 3px;
  margin-left: auto;
}
.challenge-bar i {
  width: 16px;
  height: 6px;
  border-radius: 3px;
  background: #2a322c;
}
.challenge-bar i.ok {
  background: var(--accent);
}
.challenge-bar i.bad {
  background: var(--review);
}
.challenge-bar i.now {
  background: #ffc53d;
}
.juris-list {
  padding-left: 18px;
}
.juris-list li {
  margin-bottom: 10px;
}
.juris-list small {
  color: #8d9b92;
}
.mission-result {
  text-align: center;
}
.result-stars {
  font-size: 48px;
}
.mission-result .toolbar {
  justify-content: center;
}
/* ---------- Responder por toque ---------- */
.answer-options.tap {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.answer-options.tap .answer-option {
  min-height: 62px;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 600;
  border-radius: 12px;
  background: linear-gradient(#f0e2b8, #dcc78d);
  color: #2b2210;
  border: 1px solid #b89a4a;
  box-shadow: 0 3px 0 #9a7f3a;
  transition:
    transform 0.08s,
    box-shadow 0.08s;
}
.answer-options.tap .answer-option:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #fff0b8;
  box-shadow: 0 4px 0 #9a7f3a;
}
.answer-options.tap .answer-option:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #9a7f3a;
}
.answer-options.tap .answer-option.flash-right {
  background: linear-gradient(#b9e57d, #7ed321);
  border-color: #4d8a10;
}
.answer-options.tap .answer-option.flash-wrong {
  background: linear-gradient(#f3a29b, #e5534b);
  border-color: #9c2a24;
  color: #fff;
}
.answer-options.tap .answer-option[hidden] {
  display: none;
}
.tap-help {
  color: #a9b6ad;
  font-size: 13px;
  margin: 4px 0 8px;
}
.order-slots {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: grid;
  gap: 6px;
  counter-reset: slot;
}
.order-slots .slot {
  counter-increment: slot;
  min-height: 42px;
  padding: 8px 12px 8px 44px;
  position: relative;
  border: 2px dashed #4a5a44;
  border-radius: 10px;
  color: #eaffd6;
}
.order-slots .slot::before {
  content: counter(slot);
  position: absolute;
  left: 10px;
  top: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25361a;
  color: var(--accent);
  font-weight: 700;
}
.order-slots .slot.filled {
  border-style: solid;
  border-color: var(--accent);
  background: #17220f;
  cursor: pointer;
}
.pair-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}
.pair-col {
  display: grid;
  gap: 8px;
  align-content: start;
}
.answer-option.pair {
  position: relative;
  text-align: left;
  padding-right: 40px;
}
.answer-option.pair.selected {
  outline: 3px solid #ffc53d;
}
.answer-option.pair .pair-badge {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #fff;
}
.answer-option.pair.paired {
  box-shadow: inset 0 0 0 3px #7ed321;
}
.answer-option.pair[data-color='0'] .pair-badge {
  background: #2f7bd8;
}
.answer-option.pair[data-color='1'] .pair-badge {
  background: #d8632f;
}
.answer-option.pair[data-color='2'] .pair-badge {
  background: #8a3fd0;
}
.answer-option.pair[data-color='3'] .pair-badge {
  background: #1f9d6a;
}
.answer-option.pair[data-color='4'] .pair-badge {
  background: #c23b6a;
}
@media (max-width: 620px) {
  .answer-options.tap,
  .pair-board {
    grid-template-columns: 1fr;
  }
}

/* ---------- Modos ---------- */
.mode-btn {
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #6b5220;
  color: #ffe9a8;
  background: linear-gradient(#6b5220, #3f2f12);
  cursor: pointer;
}
.mode-btn.mode-hard {
  background: linear-gradient(#9a3a2e, #5d1f18);
  border-color: #c4483a;
  color: #ffe0da;
}
.mode-btn.mode-visual {
  background: linear-gradient(#41607a, #253a4c);
  border-color: #5f8fb0;
  color: #dbeeff;
}
.mode-btn:hover {
  filter: brightness(1.15);
}
.mode-btn .stars {
  margin-left: 4px;
  font-size: 11px;
}
.mission-actions {
  max-width: 420px;
  justify-content: flex-end;
}
.hearts {
  color: #ff5a6a;
  font-size: 18px;
  letter-spacing: 2px;
}
.hearts i {
  color: #3a2a2c;
  font-style: normal;
}
.quiz-tag.hot {
  background: #e5534b;
  color: #fff;
}
.hard-card {
  border-top-color: #e5534b;
}
.timer-bar {
  height: 8px;
  border-radius: 4px;
  background: #2a1a18;
  overflow: hidden;
  margin: 8px 0;
}
.timer-bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: #ffc53d;
  transition: width 0.1s linear;
}
.timer-bar.urgent i {
  background: #e5534b;
}
/* Faixa colorida por parte do sumário, como as eras do Cronix. */
.doctrine-part {
  border-left: 5px solid var(--part, #7ed321);
  padding-left: 14px;
}
.doctrine-part[data-part='p1'] {
  --part: #e0b23a;
}
.doctrine-part[data-part='p2'] {
  --part: #4f9b6a;
}
.doctrine-part[data-part='p3'] {
  --part: #c98a3f;
}
.doctrine-part[data-part='p4'] {
  --part: #b8483a;
}
.doctrine-part[data-part='p5'] {
  --part: #5b86b8;
}
.doctrine-part[data-part='p6'] {
  --part: #9a6bc4;
}
.doctrine-part h2 {
  color: var(--part);
}

/* ---------- Modo Visual: linha do tempo ---------- */
.visual-stage {
  background: radial-gradient(ellipse at 50% 0%, #3a2c12, transparent 70%), #120e07;
  border: 1px solid #4a3a1a;
  border-radius: 14px;
  padding: 14px 16px 16px;
  font-family: Georgia, 'Times New Roman', serif;
}
.world-line {
  border-top: 1px dashed #6b5a34;
  padding-top: 6px;
  margin-bottom: 10px;
}
.world-line > span {
  font-style: italic;
  font-size: 11px;
  color: #8a7745;
}
.world-line > div {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 0;
}
.world-card {
  flex: 0 0 auto;
  max-width: 190px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #b3a98f;
  color: #3a3222;
  box-shadow: 0 2px 6px #0008;
}
.world-card small {
  display: block;
  font-style: italic;
  font-size: 10px;
  color: #6f6549;
}
.world-card b {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.world-card.law {
  background: #a89a72;
}
.boss-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #5d1f18;
  background: linear-gradient(140deg, #2a1310, #171010);
}
.boss-row.done {
  border-color: #3c5a26;
  background: linear-gradient(140deg, #16210f, #111411);
}
.boss-row p {
  margin: 2px 0;
  font-size: 13px;
}
.boss-crown {
  font-size: 30px;
  text-align: center;
}
@media (max-width: 760px) {
  .boss-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }
}
.timeline {
  position: relative;
  display: flex;
  gap: 26px;
  align-items: flex-end;
  overflow-x: auto;
  min-height: 190px;
  padding: 10px 24px 40px;
}
.tl-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, #3a2c12, #d9a72b 12%, #d9a72b);
  box-shadow: 0 0 12px #d9a72b66;
}
.tl-node {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 92px;
}
.tl-badge {
  position: relative;
  z-index: 1;
  padding: 3px 12px;
  border-radius: 8px;
  border: 1px solid #d9a72b;
  background: #4a3712;
  color: #f7dc8a;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: -14px;
  transform: translateY(14px);
}
.tl-node.now .tl-badge {
  background: #d9a72b;
  color: #2b2210;
  animation: pulse-node 1.4s ease-in-out infinite;
}
.tl-node.ok .tl-badge {
  background: #2f5a1a;
  color: #eaffd6;
}
.tl-node.bad .tl-badge {
  background: #7a2a24;
  color: #ffdcd6;
}
.tl-node.locked .tl-badge {
  opacity: 0.55;
}
.node-card {
  position: relative;
  width: 168px;
  margin-bottom: 26px;
  padding: 9px 11px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f4e6bd, #dcc78d);
  color: #2b2210;
  box-shadow: 0 4px 14px #0009;
}
.node-card::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -24px;
  width: 2px;
  height: 24px;
  background: #d9a72b;
}
.node-card b {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.node-card small {
  font-style: italic;
  font-size: 11px;
  line-height: 1.3;
}
.node-card.bad {
  background: linear-gradient(135deg, #f1cfc8, #d6a49b);
}
.node-card .redo {
  position: absolute;
  right: -6px;
  top: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e5534b;
  color: #fff;
  font-style: normal;
  font-size: 13px;
}
@keyframes pulse-node {
  50% {
    box-shadow: 0 0 16px #ffd76a;
  }
}
.visual-dock {
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(#f2e6c4, #e2d1a0);
  border: 2px solid #b89a4a;
  color: #2b2210;
  font-family: var(--font-text);
}
.visual-dock .q-prompt {
  color: #2b2210;
  font-family: Georgia, serif;
}
.visual-dock .quiz-tag {
  background: #4a3712;
  color: #f7dc8a;
}
.visual-dock .q-feedback {
  background: #fbf3d9;
  color: #2b2210;
}
.visual-dock .tap-help,
.visual-dock .muted-line {
  color: #6f5a24;
}
.visual-dock .order-slots .slot {
  color: #2b2210;
  border-color: #b89a4a;
}
.visual-dock .order-slots .slot.filled {
  background: #fbf3d9;
}
@media (prefers-reduced-motion: reduce) {
  .tl-node.now .tl-badge {
    animation: none;
  }
}
.class-explain {
  font-size: clamp(16px, 1.6vw, 22px);
  color: #cfd8cc;
  margin: 0;
}
@media (max-width: 620px) {
  .answer-options.ce {
    grid-template-columns: 1fr;
  }
  .match-grid label {
    grid-template-columns: 1fr;
  }
  .mission-top {
    flex-wrap: wrap;
  }
}
.flame.risk {
  filter: none;
  opacity: 1;
  animation: flame-risk 1.6s ease-in-out infinite;
}
@keyframes flame-risk {
  50% {
    transform: scale(1.12);
  }
}
@media (prefers-reduced-motion: reduce) {
  .flame.risk {
    animation: none;
  }
}
.streak-panel {
  margin: 18px 0;
}
.streak-alert {
  padding: 8px 12px;
  border: 1px solid #b8862b;
  border-radius: 8px;
  color: #f0c25a;
}
.cal-head,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  max-width: 420px;
}
.cal-head span {
  text-align: center;
  color: #8e9c92;
  font-size: 12px;
}
.cal-day {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid #2c352f;
  border-radius: 8px;
  background: #0d100d;
  color: #8e9c92;
  font-style: normal;
  font-size: 13px;
}
.cal-day.done {
  background: var(--accent-dark);
  border-color: var(--accent);
  color: #fff;
}
.cal-day.saved {
  border-color: #5aa0d8;
  color: #9ccaf0;
}
.cal-day.today {
  border-color: var(--accent);
  color: var(--text-strong);
}
.cal-day.fix {
  border-color: #c0504d;
  color: #f08c88;
  cursor: pointer;
}
.cal-pad {
  display: block;
}
.milestones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}
.milestones li {
  display: grid;
  justify-items: center;
  min-width: 64px;
  padding: 8px 10px;
  border: 1px solid #2c352f;
  border-radius: 10px;
  opacity: 0.6;
}
.milestones li.got {
  opacity: 1;
  border-color: var(--accent);
}
.milestones small {
  color: #8e9c92;
}
.desafios {
  margin: 18px 0;
}
.quest-list {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}
.quest {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid #2c352f;
  border-radius: 12px;
  background: #0d100d;
}
.quest.done {
  border-color: var(--accent);
}
.quest-icon {
  font-size: 26px;
}
.quest-body {
  flex: 1;
  display: grid;
  gap: 4px;
}
.quest-reward,
.quest-got {
  color: #8e9c92;
  font-size: 13px;
  white-space: nowrap;
}
.quest-got {
  color: var(--accent);
}
.league-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid #2c352f;
  border-radius: 12px;
  background: #0d100d;
}
.league-card > div {
  flex: 1;
}
.league-icon {
  font-size: 44px;
}
.ficha-list {
  display: grid;
  gap: 6px;
  padding: 0;
  list-style: none;
}
.ficha-body {
  line-height: 1.6;
  max-width: 72ch;
}
.ficha-body h2,
.ficha-body h3,
.ficha-body h4 {
  margin-top: 1.4em;
}
.ficha-body ul {
  padding-left: 1.2em;
}

/* Modo Visual adaptativo: ocupa a tela e escala cartões, fontes e botões com a largura. */
.mission-player.mode-visual {
  max-width: min(1560px, 100%);
}
.mode-visual .visual-stage {
  padding: clamp(14px, 1.6vw, 30px);
  border-radius: clamp(14px, 1.2vw, 22px);
}
.mode-visual .world-line > span {
  font-size: clamp(11px, 0.9vw, 14px);
}
.mode-visual .world-line > div {
  gap: clamp(8px, 0.8vw, 14px);
  padding: 8px 0;
}
.mode-visual .world-card {
  max-width: clamp(190px, 16vw, 300px);
  padding: clamp(6px, 0.6vw, 12px) clamp(10px, 1vw, 18px);
}
.mode-visual .world-card b {
  font-size: clamp(12px, 1vw, 17px);
}
.mode-visual .world-card small {
  font-size: clamp(10px, 0.8vw, 13px);
}
.mode-visual .timeline {
  gap: clamp(26px, 2.6vw, 52px);
  min-height: clamp(190px, 30vh, 380px);
  padding: 10px clamp(24px, 3vw, 60px) clamp(40px, 4vw, 56px);
}
.mode-visual .tl-track {
  height: clamp(5px, 0.5vw, 8px);
  bottom: clamp(22px, 2.2vw, 34px);
}
.mode-visual .tl-node {
  flex: 1 0 auto;
  min-width: clamp(92px, 8vw, 150px);
}
.mode-visual .tl-badge {
  font-size: clamp(15px, 1.2vw, 21px);
  padding: 3px clamp(12px, 1vw, 18px);
}
.mode-visual .node-card {
  width: clamp(168px, 15vw, 280px);
  padding: clamp(9px, 0.8vw, 16px) clamp(11px, 1vw, 18px);
}
.mode-visual .node-card b {
  font-size: clamp(13px, 1.05vw, 18px);
}
.mode-visual .node-card small {
  font-size: clamp(11px, 0.9vw, 15px);
}
.mode-visual .visual-dock {
  padding: clamp(14px, 1.6vw, 28px) clamp(16px, 2vw, 34px);
}
.mode-visual .visual-dock .q-prompt {
  font-size: clamp(17px, 1.5vw, 27px);
}
.mode-visual .visual-dock .answer-option {
  font-size: clamp(15px, 1.2vw, 21px);
}
.mode-visual .visual-dock .answer-options.tap .answer-option {
  min-height: clamp(62px, 7vh, 96px);
}
.mode-visual .visual-dock .answer-options {
  gap: clamp(10px, 1vw, 18px);
}
@media (max-width: 620px) {
  .mode-visual .tl-node {
    flex: 0 0 auto;
  }
}

/* ---------- Caminho da doutrina (estilo Duolingo) ---------- */
.path-part {
  margin: 22px auto;
  max-width: 760px;
}
.section-banner {
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--part, #7ed957) 40%, #0d100d),
    #0d100d
  );
  border: 1px solid color-mix(in srgb, var(--part, #7ed957) 60%, transparent);
}
.section-banner h2 {
  margin: 2px 0 0;
  color: #fff;
}
.path-unit {
  margin: 18px 0 8px;
}
.unit-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--part, #7ed957) 70%, #0d100d);
  color: #0d100d;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--part, #7ed957) 45%, #000);
}
.unit-banner > div {
  flex: 1;
}
.unit-banner small {
  font-weight: 700;
  letter-spacing: 0.4px;
}
.unit-banner h3 {
  margin: 2px 0 0;
  font-size: clamp(16px, 1.6vw, 21px);
}
.unit-banner .stars i {
  color: #0d100d55;
}
.path-unit.planned .unit-banner {
  background: #1e241f;
  color: #8e9c92;
  box-shadow: 0 4px 0 #111;
}
.unit-guide {
  padding: 8px 12px;
  border-radius: 12px;
  border: 2px solid #0d100d44;
  background: #ffffff33;
  color: #0d100d;
  font-weight: 700;
  cursor: pointer;
}
.path-steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 50px 0 12px;
}
.path-step {
  position: relative;
  transform: translateX(var(--x));
}
.path-node {
  width: 72px;
  height: 66px;
  border-radius: 50%;
  border: 0;
  font-size: 28px;
  cursor: pointer;
  background: #2b332d;
  color: #8e9c92;
  box-shadow: 0 7px 0 #151a16;
  transition:
    transform 0.08s,
    box-shadow 0.08s;
}
.path-node:active {
  transform: translateY(5px);
  box-shadow: 0 2px 0 #151a16;
}
.path-node.done,
.path-node.current {
  background: var(--part, #7ed957);
  color: #0d100d;
  box-shadow: 0 7px 0 color-mix(in srgb, var(--part, #7ed957) 50%, #000);
}
.path-node.skipped {
  background: color-mix(in srgb, var(--part, #7ed957) 45%, #2b332d);
  color: #0d100d;
}
.path-node.current {
  outline: 6px solid color-mix(in srgb, var(--part, #7ed957) 35%, transparent);
  outline-offset: 4px;
}
.path-node.chest {
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
  font-size: 44px;
}
.path-node.chest.todo {
  filter: grayscale(1);
  opacity: 0.6;
}
.path-node.boss {
  width: 84px;
  height: 76px;
  font-size: 34px;
}
.path-node.boss.todo {
  background: #3a1512;
  color: #ffb4a8;
  box-shadow: 0 7px 0 #1d0a08;
}
.path-start {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 10px;
  background: #0d100d;
  border: 2px solid var(--part, #7ed957);
  color: var(--part, #7ed957);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.6px;
  white-space: nowrap;
  animation: path-bounce 1.4s ease-in-out infinite;
}
@keyframes path-bounce {
  50% {
    transform: translate(-50%, -5px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .path-start {
    animation: none;
  }
}
.path-skip {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
}
.path-pop-actions {
  display: grid;
  gap: 8px;
}
.guide-list {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}
.guide-list li {
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: #0d100d;
  border-radius: 6px;
}
@media (max-width: 520px) {
  .path-step {
    transform: translateX(calc(var(--x) * 0.6));
  }
}
.achv-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  padding: 0;
  list-style: none;
}
.achv {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid #2c352f;
  border-radius: 12px;
  background: #0d100d;
}
.achv.got {
  border-color: var(--accent);
}
.achv-icon {
  display: grid;
  justify-items: center;
  min-width: 58px;
  font-size: 30px;
}
.achv-icon small {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
}
.achv-body {
  flex: 1;
  display: grid;
  gap: 4px;
}
.achv-body small {
  color: #8e9c92;
}

/* Cabeçalho até 1400 px: o menu desce para a segunda linha para evitar vazamento. */
@media (max-width: 1400px) {
  header {
    flex-wrap: wrap;
    gap: 10px;
  }
  header nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }
  header .profile {
    margin-left: auto;
  }
}

/* Juntos no celular: os seletores de missão e de lei não passam da largura da tela. */
.game-setup .field {
  min-width: 0;
  max-width: 100%;
}
.game-setup .field select {
  width: 100%;
  max-width: min(420px, 100%);
  text-overflow: ellipsis;
}

.ficha-chapter {
  margin: 8px 0;
  border: 1px solid #2c352f;
  border-radius: 10px;
  background: #0d100d;
}
.ficha-chapter > summary {
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}
.ficha-chapter > summary::before {
  content: '▸ ';
  color: var(--accent);
}
.ficha-chapter[open] > summary::before {
  content: '▾ ';
}
.ficha-chapter .ficha-list {
  padding: 0 14px 12px 22px;
}

/* ---------- Painel 4 Lentes ---------- */
.lens-panel {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--card-line);
  border-radius: 10px;
  background: var(--card);
}
.lens-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.lens-combo {
  font-size: 13px;
  color: #aab3ac;
}
.lens-combo.is-on {
  color: var(--accent);
  font-weight: 700;
}
.lens-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 6px;
}
.lens-tab {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--card-line);
  background: var(--card-2);
  color: var(--text-strong);
  font-weight: 600;
  cursor: pointer;
}
.lens-tab small {
  opacity: 0.7;
  margin-left: 4px;
}
.lens-tab.seen {
  border-color: var(--accent-dark);
}
.lens-tab.active {
  background: var(--accent-dark);
  border-color: var(--accent);
  color: #0b0d0b;
}
.lens-tab.empty {
  opacity: 0.6;
}
.lens-body:not(:empty) {
  margin-top: 10px;
}
.lens-item {
  padding: 10px 12px;
  border-radius: 8px;
  background: #151a16;
  margin-bottom: 8px;
}
.lens-item h4 {
  margin: 0 0 6px;
  font-size: 15px;
}
.lens-item p {
  margin: 6px 0;
  line-height: 1.5;
}
.lens-law b {
  color: var(--accent);
}
.lens-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}
.lens-badge.ok {
  background: #1f3a12;
  color: var(--accent);
}
.lens-badge.check {
  background: #3a2f12;
  color: #f0c24b;
}
.lens-badge.none {
  background: #2a2a2a;
  color: #aaa;
}
.lens-missing {
  color: #c9b27a;
}
.lens-statement {
  font-weight: 500;
}
.lens-options {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.lens-options .answer-option {
  text-align: left;
}

/* ==========================================================================
   Responsivo e tela cheia
   O conteúdo usa toda a largura disponível (computador, tablet e celular).
   Limites só para leitura confortável de texto corrido; no celular o menu
   vira uma barra fixa embaixo, ao alcance do polegar.
   ========================================================================== */
/* Contagem de revisões: "(105)" no menu do topo; selo vermelho na barra do celular */
#review-count:not(:empty)::before {
  content: '(';
}
#review-count:not(:empty)::after {
  content: ')';
}
:root {
  --gutter: clamp(12px, 2.4vw, 44px);
  --bottom-nav: 0px;
}

/* Páginas e subnavegação ocupam a largura toda */
.page,
main > .subnav,
.outline-page,
.journey-selection {
  max-width: none;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Cartões de estudo crescem com a tela */
.dock {
  max-width: min(1400px, 100%);
}
.mission-player {
  max-width: min(1400px, 100%);
}
.path-part {
  max-width: min(1100px, 100%);
}
.flip-card,
.deck-actions {
  max-width: min(1100px, 100%);
}
.journey-game .literal-dock {
  width: min(1400px, calc(100% - 2 * var(--gutter)));
  max-height: 68dvh;
  min-height: 0;
}

/* Barra lateral proporcional */
.doctrine-subjects {
  display: flex;
  flex-wrap: nowrap;
  box-sizing: border-box;
  max-width: 100%;
  gap: 10px;
  overflow-x: auto;
  padding: 16px var(--gutter);
  border-bottom: 1px solid #2c332e;
}
.doctrine-subjects .subject {
  flex: 1 0 165px;
  min-width: 165px;
  margin: 0;
  text-align: left;
  white-space: normal;
}
.doctrine-subjects .subject.selected { outline: 2px solid var(--accent, #9bea26); outline-offset: 2px; }
.doctrine-subjects .subject small { display: block; margin-top: 8px; }
.layout {
  grid-template-columns: clamp(200px, 17vw, 300px) minmax(0, 1fr);
}

/* Texto corrido continua legível mesmo em telas muito largas */
.mission-card > p,
.stage-intro,
.lens-item p,
.ficha-body p {
  max-width: 110ch;
}

/* Telas grandes: letra e toques maiores, para a tela não parecer vazia */
@media (min-width: 1440px) {
  .q-prompt,
  .literal-dock .challenge-text {
    font-size: 21px;
  }
  .answer-option {
    font-size: 17px;
    padding: 14px 18px;
  }
  .mission-card h2 {
    font-size: 28px;
  }
  .lens-item p {
    font-size: 16px;
  }
}
@media (min-width: 1920px) {
  .q-prompt {
    font-size: 23px;
  }
  .answer-option {
    font-size: 18px;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }
}
@media (max-width: 850px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .layout > aside {
    border-right: 0;
    border-bottom: 1px solid #2c332e;
    padding: 12px var(--gutter);
  }
}

/* Celular: menu fixo embaixo */
@media (max-width: 700px) {
  :root {
    --bottom-nav: calc(58px + env(safe-area-inset-bottom, 0px));
  }
  body {
    padding-bottom: var(--bottom-nav);
  }
  header nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    order: 0;
    width: auto;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 0;
    height: var(--bottom-nav);
    padding: 0 4px env(safe-area-inset-bottom, 0px);
    overflow: visible;
    background: #070907f5;
    border-top: 1px solid #2c342f;
    backdrop-filter: blur(8px);
  }
  header nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
    padding: 4px 2px;
    margin: 0;
    font-size: 12px;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
    border-radius: 0;
  }
  header nav a.active {
    box-shadow: inset 0 3px 0 var(--accent);
  }
  /* Ícone + rótulo curto: o texto original some (continua para leitores de tela via aria-label) */
  header nav a {
    position: relative;
    flex-direction: column;
    gap: 2px;
    font-size: 0;
  }
  header nav a::before {
    font-size: 19px;
    line-height: 1;
  }
  header nav a::after {
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
  }
  header nav a[data-group='map']::before {
    content: '🛤️';
  }
  header nav a[data-group='map']::after {
    content: 'Trilha';
  }
  header nav a[data-group='units']::before {
    content: '🎯';
  }
  header nav a[data-group='units']::after {
    content: 'Missões';
  }
  header nav a[data-group='simulados']::before {
    content: '📝';
  }
  header nav a[data-group='simulados']::after {
    content: 'Simulados';
  }
  header nav a[data-group='editor'] {
    display: none;
  }
  header nav a[data-group='library']::before {
    content: '📚';
  }
  header nav a[data-group='library']::after {
    content: 'Acervo';
  }
  header nav a[data-group='revisar']::before {
    content: '🪺';
  }
  header nav a[data-group='revisar']::after {
    content: 'Revisar';
  }
  header nav a[data-group='juntos']::before {
    content: '👥';
  }
  header nav a[data-group='juntos']::after {
    content: 'Juntos';
  }
  header nav a[data-group='oral']::before {
    content: '🎙️';
  }
  header nav a[data-group='oral']::after {
    content: 'Oral';
  }
  header nav a[data-group='progresso']::before {
    content: '🏆';
  }
  header nav a[data-group='progresso']::after {
    content: 'Progresso';
  }
  header nav a[data-group='admin']::before {
    content: '⚙️';
  }
  header nav a[data-group='admin']::after {
    content: 'Admin';
  }
  header nav a[data-group='editor']::before {
    content: '⚙️';
  }
  header nav a[data-group='editor']::after {
    content: 'Editor';
  }
  header nav #review-count {
    position: absolute;
    top: 4px;
    left: 52%;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 99px;
    background: var(--review);
    color: #fff;
  }
  header nav #review-count:empty {
    display: none;
  }
  header nav #review-count:not(:empty)::before,
  header nav #review-count:not(:empty)::after {
    content: none;
  }
  header nav #review-count {
    white-space: nowrap;
  }
  header nav a.nav-icon {
    font-size: 0;
  }
  .journey-game {
    height: calc(100dvh - var(--header-h, 56px) - var(--bottom-nav));
  }
  .lens-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mission-card,
  .lens-panel {
    padding-left: 12px;
    padding-right: 12px;
  }
  .toolbar > * {
    flex: 1 1 auto;
  }
}

/* ==========================================================================
   Progressão: nada recomeça do zero
   ========================================================================== */
.bar {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: #2a322c;
  overflow: hidden;
}
.bar.big {
  height: 10px;
}
.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  border-radius: inherit;
}
.mission-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 14px;
  font-size: 13px;
  color: #9fb0a4;
}
.mission-progress .bar {
  flex: 1;
}
.mission-progress span {
  white-space: nowrap;
}
.progress-strip {
  margin: 14px 0 18px;
  display: grid;
  gap: 12px;
}
.progress-summary {
  display: grid;
  gap: 6px;
  max-width: 640px;
}
.progress-summary small {
  color: #9fb0a4;
}
.continue-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.continue-card {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--accent-dark);
  background: linear-gradient(135deg, #1b2a14, #121712);
  color: var(--text-strong);
  cursor: pointer;
  min-height: 44px;
}
.continue-card:hover {
  border-color: var(--accent);
}
.continue-card .eyebrow {
  color: var(--accent);
}
.continue-card small {
  color: #aab8ad;
}
.continue-card.next {
  border-color: #3a443d;
  background: var(--card);
}
.continue-card.law {
  border-color: #4a5a8a;
  background: linear-gradient(135deg, #182033, #121712);
}
.continue-card.law .eyebrow {
  color: #9db4ff;
}
.unit-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.unit-bar {
  flex: 1;
  max-width: 260px;
  height: 6px;
  border-radius: 99px;
  background: #00000055;
  overflow: hidden;
}
.unit-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
}
.unit-bar-label {
  font-size: 12px;
  opacity: 0.85;
}
/* Nó em andamento: anel com a porcentagem respondida */
.path-node.in-progress {
  outline: 4px solid transparent;
  background:
    radial-gradient(circle at center, #2b332d 58%, transparent 60%),
    conic-gradient(var(--accent) calc(var(--pct, 0) * 1%), #1a201b 0);
  color: var(--accent);
}
.path-start.going {
  animation: none;
  border-color: #f0c24b;
  color: #f0c24b;
  font-size: 11px;
}
.pop-progress {
  color: var(--accent);
  font-weight: 600;
}
.unlock-note {
  color: var(--accent);
  font-weight: 600;
}
.mission-row.going {
  border-left: 3px solid #f0c24b;
}
.study-errors {
  margin: 8px 0;
}

/* Caderno de erros */
.error-book {
  display: grid;
  gap: 12px;
}
.error-item,
.flash-review {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid #3a443d;
  border-left: 4px solid var(--review);
}
.error-item.solid {
  border-left-color: var(--accent);
  opacity: 0.8;
}
.error-item header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.your-answer {
  color: #ff9f96;
}
.right-answer {
  color: var(--accent);
}
.why {
  color: #cfd8d1;
  line-height: 1.55;
  white-space: pre-line;
}
.flash-review {
  border-left-color: #f0c24b;
  max-width: 900px;
}

/* Mapa mental */
.mind-map {
  display: grid;
  gap: 14px;
  justify-items: center;
  margin: 16px 0;
}
.mm-root {
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--accent-dark);
  color: #0b0d0b;
  font: 700 18px var(--font-display);
  text-align: center;
  max-width: min(640px, 100%);
}
.mm-branches {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  position: relative;
}
.mm-branch details {
  height: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid #3a443d;
  border-top: 4px solid var(--accent-dark);
}
.mm-branch.has-error details {
  border-top-color: var(--review);
}
.mm-branch summary {
  cursor: pointer;
  list-style: none;
}
.mm-leaves {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}
.mm-leaves li {
  line-height: 1.45;
}
.mm-miss,
.mm-err {
  color: #ff9f96;
}

/* Mapa de domínio */
.domain-map {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}
.domain-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
}
.domain-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.domain-part h3 {
  margin: 0 0 8px;
}
.domain-module {
  display: grid;
  grid-template-columns: minmax(180px, 320px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #1f2621;
}
.domain-name {
  font-size: 14px;
}
.domain-squares {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sq {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid #3a443d;
  background: #1f2521;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}
i.sq {
  width: 14px;
  height: 14px;
  cursor: default;
}
.sq.andamento {
  background: #6b5716;
  border-color: #f0c24b;
}
.sq.concluida {
  background: var(--accent-dark);
  border-color: var(--accent);
}
.sq.dominada {
  background: linear-gradient(135deg, #f7d774, #c99a1c);
  border-color: #ffe08a;
}
.sq b {
  color: #fff;
  text-shadow: 0 0 3px #000;
}
@media (max-width: 700px) {
  .domain-module {
    grid-template-columns: minmax(0, 1fr);
  }
  .mission-progress {
    flex-wrap: wrap;
  }
  .mission-progress span {
    white-space: normal;
  }
  .sq {
    width: 36px;
    height: 36px;
  }
}

/* ==========================================================================
   Texto de estudo: justificado, em parágrafos curtos, com negrito e marca-texto
   ========================================================================== */
.rich,
.study-text,
.ficha-body,
.lens-item .rich,
.why {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
.rich p,
.study-text p,
.ficha-body p,
.why p {
  margin: 0 0 0.85em;
  text-align: justify;
  hyphens: auto;
}
.rich p:last-child,
.study-text p:last-child {
  margin-bottom: 0;
}
.rich ul,
.rich ol,
.study-text ul {
  margin: 0.4em 0 0.9em;
  padding-left: 1.3em;
  display: grid;
  gap: 0.45em;
  text-align: justify;
}
.rich li::marker {
  color: var(--accent);
}
.rich h2,
.rich h3,
.rich h4 {
  margin: 1em 0 0.4em;
  font-size: 1.05em;
  color: var(--accent);
  text-align: left;
}
.rich b,
.study-text b,
.ficha-body b {
  color: var(--text-strong);
  font-weight: 700;
}
/* Referências e números: negrito em destaque */
.hl-ref {
  color: #cdeea6;
  font-weight: 700;
  white-space: nowrap;
}
/* Marca-texto: frases e conceitos que mais caem em prova */
mark.hl {
  background: linear-gradient(transparent 12%, #f0c24b55 12%, #f0c24b55 92%, transparent 92%);
  color: inherit;
  padding: 0 0.15em;
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
mark.hl-strong {
  background: linear-gradient(transparent 8%, #f0c24b80 8%, #f0c24b80 94%, transparent 94%);
  font-weight: 600;
}
.hl-key {
  border-bottom: 2px solid #7ed32166;
  font-weight: 600;
}
.memorize {
  text-align: justify;
  line-height: 1.6;
}
.rich .table-wrap {
  margin: 0.6em 0 1em;
  overflow-x: auto;
  text-align: left;
}
.rich .history-table th,
.rich .history-table td {
  text-align: left;
  hyphens: manual;
  vertical-align: top;
}
.rich code {
  background: #0d100d;
  padding: 1px 5px;
  border-radius: 4px;
}
/* Legenda do marca-texto (uma linha no topo da lente) */
.hl-legend {
  font-size: 12px;
  color: #93a398;
  margin: 0 0 8px;
}
.hl-legend mark.hl {
  padding: 0 0.4em;
}
@media (max-width: 700px) {
  .rich,
  .study-text,
  .why {
    hyphens: auto;
    line-height: 1.65;
  }
  .hl-ref {
    white-space: normal;
  }
}
.hl-term {
  color: var(--accent);
}

/* ==========================================================================
   Lente da lei seca: artigo por artigo, incisos e parágrafos organizados
   ========================================================================== */
.lens-lawbox h4 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  font-size: 16px;
  margin-bottom: 10px;
}
.lens-lawbox h4 small {
  font-size: 12px;
  font-weight: 400;
}
.law-article {
  padding: 12px 14px;
  margin: 0 0 10px;
  border-radius: 10px;
  background: #0f1310;
  border: 1px solid #2c342f;
  border-left: 4px solid var(--accent);
  min-width: 0;
}
.law-article h5 {
  margin: 0 0 6px;
  font: 700 17px var(--font-display);
  color: var(--accent);
  letter-spacing: 0.3px;
}
.law-caput {
  margin: 0 0 8px;
  text-align: justify;
  hyphens: auto;
  line-height: 1.7;
}
.law-rows {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.law-row {
  display: grid;
  grid-template-columns: minmax(34px, max-content) minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 6px 8px;
  border-radius: 8px;
  background: #151a16;
}
.law-row.ali {
  margin-left: 26px;
  background: #121712;
}
.law-badge {
  display: inline-block;
  min-width: 34px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #1f3a12;
  color: #cdeea6;
  font: 700 13px var(--font-display);
  text-align: center;
  white-space: nowrap;
}
.law-row.par .law-badge {
  background: #3a2f12;
  color: #f0d488;
}
.law-text {
  text-align: justify;
  hyphens: auto;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.law-note {
  display: inline-block;
  margin-left: 4px;
  color: #7d8c82;
  font-size: 11.5px;
  line-height: 1.3;
}
mark.hl-q {
  background: #f0c24b66;
  color: #fff;
  padding: 0 0.12em;
  border-radius: 3px;
}
@media (max-width: 700px) {
  .law-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .law-row.ali {
    margin-left: 12px;
  }
  .law-badge {
    justify-self: start;
  }
}

/* Painel de lentes dentro do cartão claro da Trilha: mantém o tema escuro e legível */
.lens-panel {
  color: #e6ebe4;
  text-align: left;
}
.literal-dock .lens-panel {
  margin-top: 14px;
  background: #171c18;
  border-color: #33403a;
}
.literal-dock .lens-panel h4,
.literal-dock .lens-panel strong {
  color: var(--text-strong);
}
.literal-dock .lens-panel .muted,
.literal-dock .lens-panel small {
  color: #9fb0a4;
}
.literal-dock .lens-panel .text-button {
  color: var(--accent);
}
.literal-dock .lens-item {
  background: #0f1310;
}
.literal-dock .q-feedback {
  color: #e6ebe4;
}

/* ==========================================================================
   Treinador de simulados
   ========================================================================== */
.sim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: 14px;
  margin-top: 14px;
}
.sim-career-drawer {
  margin: 14px 0;
  border: 1px solid #3a443d;
  border-radius: 8px;
  background: var(--card);
}
.sim-career-drawer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 650;
}
.sim-career-drawer > summary b {
  color: var(--muted, #aab8ad);
  font-size: 13px;
  font-weight: 500;
}
.sim-career-drawer > .sim-grid {
  padding: 0 14px 14px;
  margin-top: 0;
}
.sim-career-groups { padding: 0 12px 12px; }
.sim-career-subdrawer { margin: 8px 0; background: #111713; }
.sim-career-subdrawer > summary { padding: 11px 13px; font-weight: 600; }
.sim-career-subdrawer > .sim-grid { padding: 0 10px 10px; }
.sim-note-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 18px 0 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid #35413b;
}
.sim-note-filters label { display: grid; gap: 5px; }
.sim-note-library { display: grid; gap: 12px; }
.sim-note-review {
  padding: 16px;
  border: 1px solid #35413b;
  border-radius: 8px;
  background: var(--card);
}
.sim-note-review > header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.sim-note-review > header small, .sim-note-review > header span { color: var(--muted, #aab8ad); }
.sim-note-question { margin: 14px 0; color: var(--muted, #aab8ad); }
.sim-note-content { line-height: 1.6; overflow-wrap: anywhere; }
.sim-note-content:empty { display: none; }
.sim-card {
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid #3a443d;
  display: grid;
  gap: 10px;
  align-content: start;
}
.sim-card.going {
  border-color: #f0c24b;
}
.sim-card h3 {
  margin: 0 0 2px;
  font-size: 18px;
}
.sim-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sim-chips .chip {
  padding: 2px 10px;
  border-radius: 99px;
  background: #0f1310;
  border: 1px solid #2f3a33;
  font-size: 12px;
}
.sim-open {
  display: grid;
  gap: 6px;
  color: #f0d488;
}
.sim-notebook-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
  color: #aab8ad;
  font-size: 13px;
}
.sim-notebook-strip span {
  padding: 5px 10px;
  border: 1px solid #2f3a33;
  border-radius: 999px;
  background: #0f1310;
}
.sim-notebook-strip b {
  color: var(--text-strong);
}
.sim-clock {
  display: grid;
  gap: 2px;
  min-width: 142px;
  padding: 6px 10px;
  border: 1px solid #3a443d;
  border-radius: 10px;
  background: #0f1310;
  color: #cfe9b5;
  text-align: right;
}
.sim-clock b {
  font: 800 20px/1 var(--font-display);
  color: var(--accent);
}
.sim-clock small {
  color: #91a096;
  font-size: 11px;
}
.sim-clock.is-ending,
.sim-clock b.is-ending {
  color: #ff9f96;
}
.sim-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.sim-mode {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  padding: 26px 18px;
  border-radius: 16px;
  border: 2px solid #3a443d;
  background: var(--card);
  color: var(--text-strong);
  cursor: pointer;
  min-height: 44px;
}
.sim-mode:hover {
  border-color: var(--accent);
}
.sim-mode-icon {
  font-size: 40px;
}
.sim-mode small {
  color: #aab8ad;
  line-height: 1.5;
}
.q-head .ia-botao {
  margin-left: auto;
}
.ia-fab {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 9000;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--panel, #172019);
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.ia-fab[hidden] {
  display: none;
}
.ia-menu.flutuante {
  position: fixed;
  right: 14px;
  bottom: 66px;
  z-index: 9002;
  margin: 0;
  width: min(420px, calc(100vw - 28px));
}
.ia-menu {
  display: grid;
  gap: 10px;
  max-width: 420px;
  margin: 8px 0 12px auto;
  padding: 14px 16px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--panel, #172019);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.ia-menu label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}
.ia-menu label.off {
  opacity: 0.55;
}
.ia-menu small {
  color: var(--muted);
  line-height: 1.45;
}
.ia-servicos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
/* Com a janela da IA na metade direita da tela, o FlowLex fica só na esquerda. */
html.ia-docked body {
  width: 50vw;
  max-width: 50vw;
  overflow-x: hidden;
}
.sim-statement {
  font-size: 17px;
  line-height: 1.7;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  width: 100%;
  max-width: none;
  margin: 10px 0 14px;
}
.sim-statement p {
  margin: 0 0 0.8em;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.sim-alt span,
.sim-alt-list li {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.sim-alts {
  display: grid;
  gap: 10px;
}
.sim-alt {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  text-align: left;
  line-height: 1.55;
  padding: 13px 16px;
}
.sim-alt b {
  color: var(--accent);
}
.sim-alt.selected {
  border-color: var(--accent);
  background: #1d2e14;
  box-shadow: inset 0 0 0 1px var(--accent);
}
.doubt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 6px;
}
.doubt-btn {
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 99px;
  border: 2px solid #3a443d;
  background: #0f1310;
  color: var(--text-strong);
  cursor: pointer;
  font-weight: 600;
}
.doubt-btn.on {
  border-color: #f0c24b;
  background: #3a2f12;
  color: #ffe08a;
}
.sim-actions {
  margin-top: 16px;
  position: sticky;
  bottom: calc(var(--bottom-nav, 0px) + 6px);
  padding: 10px;
  border-radius: 12px;
  background: #0d100df0;
  backdrop-filter: blur(6px);
  z-index: 5;
}
.sim-question {
  padding-bottom: 104px;
}
.sim-learning-tools {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) repeat(2, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #2f3a33;
}
.sim-focus,
.sim-note-box {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid #2f3a33;
  border-radius: 12px;
  background: #101411;
}
.sim-focus h3,
.sim-note-box {
  font-size: 14px;
  color: var(--text-strong);
}
.sim-focus h3 {
  margin: 0;
}
.sim-focus-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.sim-focus-buttons button {
  min-height: 44px;
  padding: 9px 15px;
  white-space: nowrap;
}
.sim-note-box textarea {
  width: 100%;
  resize: vertical;
  min-height: 118px;
  padding: 10px;
  border: 1px solid #3a443d;
  border-radius: 8px;
  background: #0b0e0b;
  color: var(--text-strong);
  font: 14px/1.45 var(--font-text);
}

.note-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line, #35413b);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}

.note-toolbar button {
  min-width: 34px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.note-toolbar button:hover { border-color: var(--line, #35413b); }

.note-editor {
  min-height: 150px;
  padding: 12px;
  border: 1px solid var(--line, #35413b);
  border-radius: 0 0 6px 6px;
  outline: none;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.note-editor:focus { border-color: var(--accent, #7ba58b); }
.note-editor:empty::before { content: attr(data-placeholder); color: var(--muted, #87938b); }
.note-editor ul, .note-editor ol { padding-left: 24px; }
.note-editor h2, .note-editor h3 { margin: 10px 0 4px; font-size: 1.05rem; }

.sim-public-comments {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line, #35413b);
}

.sim-public-comments h3 { margin: 0; font-size: 1rem; }
.sim-public-comments h3 span { color: var(--muted, #87938b); font-weight: 400; }
.sim-comment-list { display: grid; gap: 10px; }
.sim-comment { padding: 12px; border-left: 2px solid var(--accent, #7ba58b); background: rgba(255,255,255,.025); }
.sim-comment time { margin-left: 10px; color: var(--muted, #87938b); font-size: .78rem; }
.sim-comment p { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sim-comment-form { display: grid; gap: 8px; }
.sim-comment-form textarea { width: 100%; min-height: 78px; }
.text-button.danger {
  color: #ff9f96;
  border-bottom-color: #8a3731;
}
.corr-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.corr-tabs button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #3a443d;
  border-radius: 8px;
  background: #0d100d;
  color: #cfd8d1;
  cursor: pointer;
}
.corr-tabs button.on {
  border-color: var(--accent);
  background: #1d2e14;
  color: var(--accent);
  font-weight: 700;
}
.corr-panel {
  display: none;
}
.corr-panel.on {
  display: block;
}
.finish-btn {
  margin-left: auto;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 10px;
  border: 2px solid #f0c24b;
  background: transparent;
  color: #ffe08a;
  font-weight: 700;
  cursor: pointer;
}
.sim-fund p,
.sim-alts-analysis p {
  margin: 6px 0;
  line-height: 1.6;
  text-align: justify;
  hyphens: auto;
}
.sim-alts-analysis {
  margin: 8px 0;
}
.sim-alts-analysis summary {
  cursor: pointer;
  color: var(--accent);
}
.sim-pitfall {
  margin: 8px 0;
}
.sim-squares {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 6px;
  margin: 10px 0;
}
.sim-sq {
  position: relative;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid #3a443d;
  background: #1f2521;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
i.sim-sq {
  display: inline-block;
  min-height: 0;
  width: 14px;
  height: 14px;
  cursor: default;
  vertical-align: middle;
  margin-right: 4px;
}
.sim-sq.done {
  background: #2c4a1d;
  border-color: var(--accent-dark);
}
.sim-sq.right {
  background: var(--accent-dark);
}
.sim-sq.wrong {
  background: #6b2c28;
  border-color: var(--review);
}
.sim-sq.blank {
  background: #3a3a2a;
  border-color: #8a8a5a;
}
.sim-sq.now {
  outline: 2px solid #fff;
}
.sim-sq i {
  position: absolute;
  top: 1px;
  right: 4px;
  font-style: normal;
  color: #ffe08a;
  font-size: 12px;
}
.sim-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: #9fb0a4;
}
.sim-score {
  display: grid;
  gap: 14px;
  margin: 10px 0;
}
.sim-big {
  display: grid;
  gap: 4px;
  padding: 18px 22px;
  border-radius: 16px;
  background: var(--card);
  border: 2px solid #3a443d;
  justify-items: start;
}
.sim-big b {
  font: 800 52px/1 var(--font-display);
}
.sim-big.good {
  border-color: var(--accent);
}
.sim-big.good b {
  color: var(--accent);
}
.sim-big.mid {
  border-color: #f0c24b;
}
.sim-big.mid b {
  color: #f0c24b;
}
.sim-big.low {
  border-color: var(--review);
}
.sim-big.low b {
  color: #ff9f96;
}
.sim-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.sim-stat {
  display: grid;
  padding: 12px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid #3a443d;
  text-align: center;
}
.sim-stat b {
  font: 800 28px var(--font-display);
}
.sim-stat.ok b {
  color: var(--accent);
}
.sim-stat.bad b {
  color: #ff9f96;
}
.sim-stat span {
  font-size: 12px;
  color: #9fb0a4;
}
.sim-rewards {
  padding: 10px 14px;
  border-radius: 10px;
  background: #1d2e14;
  line-height: 1.6;
}
.sim-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.sim-disc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.sim-disc li {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) minmax(80px, 2fr) auto auto;
  gap: 10px;
  align-items: center;
}
.sim-queue,
.sim-themes {
  display: grid;
  gap: 6px;
  padding-left: 1.2em;
}
.sim-item {
  margin: 8px 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid #3a443d;
  border-left: 4px solid #3a443d;
}
.sim-item.A {
  border-left-color: var(--accent);
}
.sim-item.E {
  border-left-color: var(--review);
}
.sim-item summary {
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
}
.sim-alt-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
}
.sim-alt-list li {
  padding: 8px 10px;
  border-radius: 8px;
  background: #0f1310;
  line-height: 1.55;
}
.sim-alt-list li.gab {
  border: 1px solid var(--accent);
}
.sim-alt-list li.mine:not(.gab) {
  border: 1px solid var(--review);
}
.sim-import {
  display: grid;
  gap: 12px;
  max-width: 560px;
  margin: 14px 0;
}
.sim-import label {
  display: grid;
  gap: 4px;
}
@media (max-width: 700px) {
  .sim-disc li {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .sim-disc li .bar {
    grid-column: 1 / -1;
  }
  .sim-big b {
    font-size: 42px;
  }
  .sim-actions {
    gap: 6px;
    padding: 6px;
    flex-wrap: nowrap;
  }
  .sim-actions .secondary {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 6px;
    font-size: 14px;
  }
  .sim-actions .primary {
    flex: 2 1 0;
    min-width: 0;
    padding: 10px 8px;
    font-size: 14px;
  }
  .sim-actions .finish-btn {
    flex: 1 1 0;
    min-width: 0;
    margin-left: 0;
    padding: 10px 6px;
    font-size: 13px;
  }
  .sim-statement {
    font-size: 16px;
  }
  .sim-learning-tools {
    grid-template-columns: minmax(0, 1fr);
  }
  .mission-hud .sim-clock {
    flex: 1 1 100%;
    text-align: left;
  }
}

/* Banco de provas (professor) */
.banco-dirs {
  list-style: none;
  padding: 0;
  margin: 6px 0;
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: #9fb0a4;
  overflow-wrap: anywhere;
}
.banco-table td {
  vertical-align: top;
}
.banco-table tr.old {
  opacity: 0.6;
}
.banco-pdfs {
  max-height: 260px;
  overflow: auto;
  font-size: 13px;
  padding-left: 1.2em;
}

.banco-table {
  min-width: 880px;
}
.banco-table td:nth-child(1) {
  min-width: 300px;
}
.banco-table td:nth-child(4) {
  min-width: 190px;
  max-width: 260px;
}
.banco-table td small {
  line-height: 1.4;
}

@media (max-width: 1250px) {
  .banco-table {
    min-width: 0;
  }
  .banco-table th:nth-child(4),
  .banco-table td:nth-child(4) {
    display: none;
  }
  .banco-table td:nth-child(1) {
    min-width: 220px;
  }
}

.banco-table td {
  overflow-wrap: anywhere;
}
.banco-table td:nth-child(1) {
  max-width: 420px;
}

.upd-badge {
  margin: 8px 0;
  padding: 8px 12px;
  border-left: 4px solid #d98a00;
  background: rgba(217, 138, 0, 0.12);
  border-radius: 8px;
}
.upd-badge.is-checked {
  border-left-color: #2e9e5b;
  background: rgba(46, 158, 91, 0.12);
}
.flash-toolbar { display:flex; flex-wrap:wrap; gap:12px; align-items:end; margin:20px 0; }
.flash-layout { display:grid; grid-template-columns:minmax(220px, 30%) minmax(0, 1fr); gap:24px; margin-top:24px; }
.flash-tree { align-self:start; max-height:70vh; overflow:auto; }
.flash-tree button { display:block; width:100%; text-align:left; margin:8px 0; white-space:normal; overflow-wrap:anywhere; }
.flash-tree small,.flash-row small { display:block; margin-top:6px; }
.flash-tree .flash-folder-row { display:flex; align-items:center; gap:5px; }
.flash-tree .flash-toggle { flex:0 0 28px; width:28px; padding:8px 3px; text-align:center; }
.flash-tree .flash-folder-name { flex:1; min-width:0; }
.flash-tree .flash-folder-name[aria-current="true"] { border-color:var(--accent,#8be21b); background:rgba(139,226,27,.08); }
.flash-children { margin-left:14px; padding-left:8px; border-left:1px solid rgba(139,226,27,.2); }
.flash-leaf { flex:0 0 28px; text-align:center; color:var(--muted); }
.flash-row { display:flex; flex-wrap:wrap; gap:12px; align-items:center; padding:18px 0; border-top:1px solid var(--line, #384338); }
.flash-row > div { flex:1; min-width:150px; overflow-wrap:anywhere; }
.flash-literal { white-space:pre-wrap; overflow-wrap:anywhere; display:block; }
.flash-law-items { max-height:45vh; overflow:auto; margin:20px 0; }
.flash-law-item { display:flex; gap:12px; padding:16px 0; border-top:1px solid var(--line, #384338); }
.flash-law-item > input { flex:0 0 auto; width:20px; height:20px; }
.flash-suggestion-notice { position:fixed; bottom:20px; left:20px; right:20px; z-index:100; background:var(--panel, #172117); color:var(--text, #eee); padding:16px; border:1px solid var(--line, #647c35); border-radius:12px; display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.flash-suggestion-notice span { flex:1; }
@media(max-width:760px) { .flash-layout { grid-template-columns:1fr; } .flash-tree { max-height:260px; } .flash-toolbar > .field { width:100%; } }

/* ===== Régua do editor (Bloco de notas e comentários) ===== */
.rico-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; margin-bottom: 6px; border: 1px solid var(--line, #35413b); border-radius: 10px; background: var(--card-2, rgba(255, 255, 255, 0.03)); }
.rico-grupo { display: flex; align-items: center; gap: 2px; padding-right: 10px; border-right: 1px solid var(--line, #35413b); }
.rico-grupo:last-of-type { border-right: 0; }
.rico-btn, .rico-icone, .rico-caixa, .rico-tag { cursor: pointer; border: 1px solid transparent; border-radius: 6px; background: transparent; color: inherit; font: inherit; line-height: 1; }
.rico-btn { min-width: 32px; padding: 7px 8px; list-style: none; text-align: center; }
.rico-btn:hover, .rico-icone:hover, .rico-caixa:hover, .rico-tag:hover { border-color: var(--accent, #7ed321); background: color-mix(in srgb, var(--accent, #7ed321) 14%, transparent); }
.rico-select { padding: 6px 8px; border-radius: 6px; max-width: 120px; }
.rico-menu { position: relative; }
.rico-menu summary::-webkit-details-marker { display: none; }
.rico-paleta { position: absolute; z-index: 20; top: 34px; left: 0; display: flex; gap: 6px; padding: 8px; border-radius: 8px; border: 1px solid var(--accent, #7ed321); background: var(--panel, #172019); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.rico-cor { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.4); cursor: pointer; padding: 0; }
.rico-linha { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.rico-rotulo { font-size: 12px; opacity: 0.75; min-width: 52px; }
.rico-icone { padding: 5px 7px; font-size: 18px; }
.rico-caixa { padding: 6px 10px; font-size: 13px; border-color: var(--line, #35413b); }
.rico-tag { padding: 5px 10px; font-size: 13px; border-color: var(--line, #35413b); border-radius: 999px; }
.rico-tag[aria-pressed='true'] { border-color: var(--accent, #7ed321); background: color-mix(in srgb, var(--accent, #7ed321) 24%, transparent); font-weight: 700; }
.rico-comentario { min-height: 90px; }

/* Texto formatado: vale para o editor, para as notas e para os comentários publicados */
.note-editor blockquote, .rico-texto blockquote { margin: 8px 0; padding: 8px 12px; border-left: 4px solid var(--accent, #7ed321); border-radius: 4px; background: color-mix(in srgb, var(--accent, #7ed321) 12%, transparent); }
.note-editor hr, .rico-texto hr { border: 0; border-top: 2px solid var(--line, #35413b); margin: 10px 0; }
.note-editor .nt-p, .rico-texto .nt-p { font-size: 0.85em; }
.note-editor .nt-g, .rico-texto .nt-g { font-size: 1.3em; }
.note-editor .nt-gg, .rico-texto .nt-gg { font-size: 1.7em; }
.rico-texto { line-height: 1.6; overflow-wrap: anywhere; }
.rico-texto h2, .rico-texto h3 { margin: 8px 0 4px; font-size: 1.1rem; }
.rico-texto ul, .rico-texto ol { padding-left: 24px; }
.sim-comment .rico-texto { margin: 6px 0 0; }

/* Texto sobre marca-texto fica escuro em qualquer tema (a cor escolhida pelo aluno, quando existe, prevalece) */
.note-editor span[style*="background-color"], .rico-texto span[style*="background-color"] { color: #111; }

/* Tesoura: risca a alternativa que você descartou (como no QConcursos) */
.sim-alt-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; align-items: start; }
.tesoura { box-sizing: border-box; min-width: 0; padding: 0; width: 36px; height: 36px; margin-top: 9px; border-radius: 50%; border: 1px solid var(--line, #35413b); background: var(--card-2, rgba(255, 255, 255, 0.05)); color: #3aa9c9; font-size: 17px; line-height: 1; cursor: pointer; }
.tesoura:hover { border-color: #3aa9c9; }
.tesoura.on { background: #3aa9c9; border-color: #3aa9c9; color: #fff; }
.sim-alt-row.riscada .sim-alt { border-style: dashed; }
.sim-alt-row.riscada .sim-alt span { text-decoration: line-through; font-style: italic; opacity: 0.55; }
.sim-alt-row.riscada .sim-alt b { opacity: 0.55; }
.sim-alt-row .tesoura { width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; }

/* Régua recolhível, campo redimensionável e modo ampliado */
.rico-barra { display: block; }
.rico-topo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rico-abrir { cursor: pointer; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--accent, #7ed321); background: color-mix(in srgb, var(--accent, #7ed321) 12%, transparent); color: inherit; font: inherit; font-weight: 700; }
.rico-abrir[aria-expanded='true'] .rico-seta { display: inline-block; transform: rotate(180deg); }
.rico-rapidos { display: inline-flex; gap: 2px; }
.rico-barra.aberta .rico-rapidos { display: none; }
.rico-ampliar { margin-left: auto; cursor: pointer; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line, #35413b); background: transparent; color: inherit; font: inherit; }
.rico-ampliar:hover { border-color: var(--accent, #7ed321); }
.rico-corpo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line, #35413b); }
.rico-corpo[hidden] { display: none; }
.note-editor { resize: vertical; overflow: auto; min-height: 180px; max-height: none; }
.rico-ampliado { position: fixed; inset: 3vh 3vw; z-index: 9100; display: flex; flex-direction: column; gap: 10px; padding: 18px; overflow: auto; background: var(--panel, #172019); border: 1px solid var(--accent, #7ed321); border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.62); }
.rico-ampliado .note-editor { flex: 1 1 auto; min-height: 45vh; resize: none; font-size: 1.05em; }
.rico-ampliado .rico-barra { position: sticky; top: 0; z-index: 2; background: var(--panel, #172019); }
.rico-flutuante-atalho { position: fixed; right: 16px; bottom: 20px; z-index: 9090; padding: 10px 14px; border: 1px solid var(--accent, #7ed321); border-radius: 999px; background: var(--panel, #172019); color: var(--text, #eee); box-shadow: 0 6px 22px #0008; cursor: pointer; font: inherit; }
.rico-flutuante-atalho[hidden] { display: none; }
.rico-barra.rico-flutuante { position: fixed; top: 72px; right: 16px; z-index: 9091; box-sizing: border-box; width: min(390px, calc(100vw - 32px)); max-height: calc(100dvh - 152px); overflow-y: auto; background: var(--panel, #172019); box-shadow: 0 12px 32px #0009; }
.rico-barra.rico-flutuante .rico-paleta { position: fixed; right: 28px; left: auto; top: auto; }
@media (max-width: 600px) { .rico-barra.rico-flutuante { top: 56px; max-height: calc(100dvh - 128px); } }
