/* AMBIMAX — estilos locais.
 * Ordem da cascata: base e componentes; adaptação responsiva; visual v14.
 * As regras v14 ao final atualizam a paleta sem alterar os blocos didáticos.
 * Tamanhos de leitura são definidos por data-font, sem atributo style inline.
 */

/* Tokens de cor e valores globais */
:root {
  --ink: #18283f;
  --green: #2459dc;
  --muted: #5c6b80;
  --line: #dce4f0;
  --paper: #f4f7fc;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    15px/1.7 Arial,
    Helvetica,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
a {
  color: var(--green);
}
h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.035em;
  margin-top: 0;
}
h1 {
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 500;
}
h2 {
  font-size: 25px;
  font-weight: 550;
}
h3 {
  font-size: 18px;
}
p {
  margin: 0 0 18px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #397cfa;
  outline-offset: 4px;
}
.skip {
  position: fixed;
  top: -100px;
  z-index: 20;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 10px;
}
/* Estrutura lateral e navegação */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 246px;
  background: white;
  border-right: 1px solid var(--line);
  padding: 34px 22px;
  display: flex;
  flex-direction: column;
  z-index: 4;
}
.brand {
  background: none;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 0;
  color: var(--ink);
}
.brand > span {
  width: 44px;
  height: 44px;
  background: var(--green);
  color: white;
  border-radius: 12px;
  text-align: center;
  font:
    34px/1.1 Georgia,
    serif;
  padding-top: 1px;
}
.brand b {
  font-size: 19px;
  letter-spacing: 0.04em;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-top: 3px;
}
.nav-caption {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: #6e8068;
  margin: 46px 10px 15px;
}
.nav-item {
  background: none;
  color: #536b85;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  margin: 4px 0;
  border-radius: 8px;
  font-size: 13px;
}
.nav-item > span {
  font-size: 20px;
  line-height: 1;
  width: 21px;
  text-align: center;
}
.nav-item.active,
.nav-item:hover {
  background: #eaf1ff;
  color: #234a83;
}
.side-bottom {
  margin-top: auto;
  padding: 24px 10px 0;
}
.side-bottom strong {
  font-size: 26px;
  font-weight: 500;
  margin-right: 10px;
}
.side-bottom > span,
.side-bottom small {
  font-size: 10px;
  color: var(--muted);
}
.side-bottom small {
  display: block;
}
.side-bottom p {
  font:
    16px/1.5 Georgia,
    serif;
  color: #728464;
  margin: 25px 0 0;
}
progress {
  display: block;
  width: 100%;
  height: 5px;
  background: #dde6f4;
  border: 0;
  border-radius: 8px;
  margin: 10px 0;
  appearance: none;
  overflow: hidden;
}
progress::-webkit-progress-bar {
  background: #dde6f4;
}
progress::-webkit-progress-value {
  background: #3372ef;
}
progress::-moz-progress-bar {
  background: #3372ef;
}
.workspace {
  margin-left: 246px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  min-height: 78px;
  padding: 20px 45px;
  color: #6b7965;
  font-size: 9px;
  letter-spacing: 0.1em;
}
.topbar > span:last-child {
  letter-spacing: 0;
  white-space: nowrap;
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 12px;
}
main {
  max-width: 1390px;
  margin: auto;
  padding: 40px 45px 65px;
  outline: none;
  min-height: 75vh;
}
footer {
  border-top: 1px solid var(--line);
  padding: 20px 45px;
  font-size: 11px;
  color: var(--muted);
}
.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #365eae;
  margin-bottom: 14px;
}
/* Apresentação da tela inicial */
.hero {
  background: #edf2e5;
  border: 1px solid #dae3ce;
  padding: 42px 40px;
  border-radius: 17px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 35px;
}
.hero h1 {
  font-family: Georgia, serif;
  font-size: clamp(38px, 4.3vw, 54px);
  line-height: 1.13;
  letter-spacing: -0.045em;
  margin-bottom: 23px;
}
.hero > div > p {
  max-width: 430px;
  font-size: 14px;
  color: #5a7090;
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}
.primary {
  background: var(--green);
  color: white;
  border: 1px solid var(--green);
}
.primary:hover {
  background: #1943af;
}
.secondary {
  background: white;
  border: 1px solid #c8d6ec;
  color: var(--green);
}
.secondary:hover {
  background: #edf3ff;
}
.link {
  background: none;
  color: #2459c7;
  font-size: 13px;
  padding: 0;
  text-align: left;
  font-weight: 600;
  line-height: 1.6;
}
.link:hover {
  text-decoration: underline;
}
.next-lesson {
  border-left: 1px solid #ccd9bf;
  padding: 6px 0 4px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.next-lesson > small {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: #6b7e5d;
}
.next-lesson > span {
  font:
    66px/1.2 Georgia,
    serif;
  color: #6f8b5e;
  margin: 15px 0 10px;
}
.next-lesson h2 {
  font-size: 21px;
  max-width: 280px;
  line-height: 1.35;
  margin-bottom: 10px;
}
.next-lesson p {
  font-size: 11px !important;
  margin-bottom: 20px;
}
.next-lesson > small:last-child {
  border-top: 1px solid #d5dfca;
  padding-top: 16px;
  letter-spacing: 0;
  font-size: 11px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin: 27px 0 38px;
  padding-bottom: 26px;
}
.stats > div {
  padding-left: 23px;
  border-left: 1px solid var(--line);
}
.stats > div:first-child {
  border: 0;
  padding-left: 0;
}
.stats strong {
  display: block;
  font-size: 31px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.04em;
}
.stats strong small {
  font-size: 15px;
  color: var(--muted);
  margin-left: 4px;
}
.stats > div > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 7px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.section-head .eyebrow {
  margin-bottom: 8px;
}
.section-head h2 {
  margin: 0;
  font-size: 26px;
}
.module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.module-card {
  border: 1px solid var(--line);
  background: white;
  padding: 26px;
  border-radius: 12px;
}
.module-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 23px;
}
.module-top > span {
  width: 39px;
  height: 39px;
  border-radius: 8px;
  background: #edf3e2;
  color: #668252;
  text-align: center;
  font:
    20px/39px Georgia,
    serif;
}
.module-top small {
  font-size: 10px;
  color: var(--muted);
}
.module-card h2 {
  font-size: 21px;
  margin-bottom: 12px;
}
.module-card p {
  font-size: 13px;
  color: var(--muted);
  min-height: 44px;
}
.module-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 24px 0 14px;
}
.module-foot small,
.module-foot button {
  font-size: 11px;
}
.routine {
  border-top: 1px solid var(--line);
  margin-top: 38px;
  padding-top: 30px;
}
.three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.routine b {
  color: #70865c;
  font-size: 12px;
}
.routine h3 {
  font-size: 16px;
  margin: 12px 0 9px;
}
.routine p {
  font-size: 13px;
  color: var(--muted);
}
.editorial {
  border: 1px solid var(--line);
  background: #f2f5fb;
  border-radius: 8px;
  padding: 16px 19px;
  margin: 25px 0;
  font-size: 13px;
}
.editorial summary,
details summary {
  cursor: pointer;
}
.editorial p {
  margin-top: 14px;
}
.page-head {
  max-width: 850px;
  margin-bottom: 28px;
}
.page-head h1 {
  margin-bottom: 17px;
}
.page-head p {
  color: var(--muted);
  font-size: 15px;
}
/* Filtros, campos e seleção de conteúdo */
.filters {
  background: #eaf1fc;
  padding: 22px;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 25px 0;
}
label {
  font-size: 12px;
  color: #384c6b;
  font-weight: 600;
}
.filters label,
.three > label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
input,
select,
textarea {
  border: 1px solid #c6d2e4;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  padding: 11px 13px;
  max-width: 100%;
}
input[type="search"],
select {
  width: 100%;
  min-width: 0;
  height: 44px;
}
.muted {
  font-size: 13px;
  color: var(--muted);
}
.syllabus {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin: 24px 0;
}
.syllabus > header {
  background: #edf3ff;
  padding: 23px 26px;
  display: flex;
  gap: 20px;
  align-items: center;
}
.syllabus > header > span {
  font:
    35px Georgia,
    serif;
  color: #476ca9;
}
.syllabus h2 {
  font-size: 22px;
  margin: 0 0 7px;
}
.syllabus header p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.lesson-row {
  width: 100%;
  background: white;
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 19px 25px;
  text-align: left;
  color: var(--ink);
  border-top: 1px solid #e6edf7;
}
.lesson-row:hover {
  background: #f2f6ff;
}
.lesson-row > span:first-child {
  color: #586c8c;
  font-size: 13px;
  min-width: 25px;
}
.lesson-row > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.lesson-row strong {
  display: block;
  font-size: 14px;
  font-weight: 550;
}
.lesson-row small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.lesson-row > span:last-child {
  color: #265bc5;
}
.empty {
  padding: 30px;
  border: 1px dashed #becce5;
  background: #f0f5ff;
  border-radius: 11px;
}
.breadcrumb {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 25px;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 25px;
}
.toolbar label {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}
.toolbar select {
  width: 75px;
}
/* Leitor de aulas e índice */
.reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 28px;
}
.reader {
  min-width: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}
.objectives {
  padding: 28px 32px;
  background: #eaf3ff;
  border-bottom: 1px solid var(--line);
}
.objectives p {
  font-size: 16px;
  line-height: 1.85;
  margin: 0;
}
/* Blocos didáticos, tabelas e diagramas */
.book-body {
  padding: 10px 32px 30px;
  font-size: var(--read, 18px);
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.book-body h2 {
  font-size: 26px;
  margin: 38px 0 20px;
  scroll-margin-top: 20px;
}
.book-body h3 {
  font-size: 19px;
}
.book-body p {
  margin-bottom: 22px;
}
.book-note {
  border-left: 3px solid #269e99;
  padding: 18px 21px;
  background: #e9f8f5;
  font-size: 0.9em;
  margin: 25px 0;
}
.book-formula {
  padding: 18px;
  background: #edf4ff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: monospace;
  font-size: 0.9em;
  white-space: pre-wrap;
}
.book-table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin: 22px 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  line-height: 1.6;
}
th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  min-width: 100px;
}
th {
  background: #eaf3ff;
  font-weight: 600;
}
caption {
  padding: 15px;
  text-align: left;
  font-weight: 600;
}
.book-diagram {
  margin: 30px 0;
  padding: 22px;
  background: #f3f6fc;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.book-diagram figcaption,
figure > figcaption {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 17px;
}
.diagram-nodes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.diagram-node {
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 14px;
}
.diagram-node strong {
  display: block;
  line-height: 1.4;
  margin: 10px 0;
}
.diagram-node p {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}
.diagram-symbol svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #4973bf;
  stroke-width: 1.6;
}
.book-chart {
  margin: 25px 0;
  max-width: 100%;
}
.book-chart svg,
svg.book-plot {
  width: 100%;
  height: auto;
}
.book-lab {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eff4fc;
  margin: 25px 0;
  font-size: 14px;
}
.book-lab-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.book-lab-fields label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.book-lab-fields input {
  width: 100%;
}
#bookLabError {
  color: #8b432f;
}
.toc {
  align-self: start;
  position: sticky;
  top: 25px;
  max-height: 85vh;
  overflow: auto;
  padding: 4px;
}
.toc h2 {
  font-size: 14px;
}
.toc > button {
  display: block;
  width: 100%;
  background: none;
  text-align: left;
  padding: 9px 10px;
  border-left: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
  color: #526580;
}
.toc > button:hover {
  background: #edf4ff;
  border-color: var(--green);
}
.toc details {
  font-size: 11px;
  margin-top: 23px;
}
.toc details p {
  margin-top: 12px;
}
/* Prática de questões dentro da aula */
.practice-section {
  padding: 30px 25px;
  background: #f2f6fc;
  border-top: 1px solid var(--line);
  scroll-margin-top: 20px;
}
.question {
  background: white;
  border: 1px solid #d7e2f2;
  border-radius: 9px;
  margin: 15px 0;
  overflow: hidden;
}
.question > summary {
  padding: 18px;
  display: flex;
  gap: 13px;
  cursor: pointer;
  list-style: none;
  align-items: flex-start;
}
.question > summary::after {
  content: "+";
  margin-left: auto;
  font-size: 20px;
  color: #6c8754;
  flex: none;
}
.question[open] > summary {
  background: #eaf3ff;
  border-bottom: 1px solid var(--line);
}
.question[open] > summary::after {
  content: "−";
}
.question > summary > span:first-child {
  width: 27px;
  height: 27px;
  flex: none;
  background: #e6efda;
  border-radius: 6px;
  text-align: center;
  font-size: 12px;
  line-height: 27px;
}
.question > summary > span:nth-child(2) {
  min-width: 0;
}
.question summary small {
  font-size: 10px;
  display: block;
  color: #627c51;
  margin-bottom: 6px;
}
.question summary strong {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
  display: block;
}
.question-body {
  padding: 23px;
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.stem {
  font-weight: 550;
  white-space: pre-line;
  margin: 25px 0;
}
.hint,
.solution {
  padding: 16px 18px;
  background: #f3f7ed;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 20px 0;
  font-size: 14px;
}
.hint summary,
.solution summary {
  font-weight: 600;
  color: #446738;
}
.hint p,
.solution p {
  margin-top: 15px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
legend {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid #cfddc3;
  border-radius: 7px;
  padding: 14px;
  margin: 10px 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  cursor: pointer;
}
.option input {
  width: 18px;
  height: 18px;
  flex: none;
  margin: 4px 0 0;
  accent-color: #436a34;
}
.option:has(input:checked) {
  background: #ebf4df;
  border-color: #78985c;
}
.option:hover {
  background: #f5f9ee;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.error {
  color: #963b28;
  font-size: 13px;
}
.error:empty {
  display: none;
}
.feedback {
  border-left: 3px solid #739650;
  background: #eef5e5;
  padding: 19px;
  margin: 23px 0;
  border-radius: 7px;
}
.feedback h3,
.solution h3 {
  font-size: 18px;
  margin-top: 22px;
}
.analysis {
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.analysis li {
  border-top: 1px solid #d6e1ca;
  padding: 14px 0;
}
.analysis p {
  margin: 7px 0 0;
}
.notes-panel {
  padding: 30px 32px;
  border-top: 1px solid var(--line);
}
.notes-panel h2 {
  font-size: 24px;
}
.notes-panel label {
  display: block;
  margin-bottom: 12px;
}
.notes-panel textarea {
  width: 100%;
  font-size: 15px;
  line-height: 1.8;
  resize: vertical;
}
.notes-panel small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 10px;
}
.complete-panel {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 25px 32px;
  background: #edf4ff;
}
.complete-panel strong {
  font-size: 15px;
}
.complete-panel p {
  font-size: 12px;
  color: var(--muted);
  margin: 7px 0 0;
}
.pagination {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 24px 0;
}
.reader > .pagination {
  padding: 25px 32px;
}
.check {
  grid-column: 1/-1;
  flex-direction: row !important;
  align-items: center;
}
.check input {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}
.saved-note,
.panel {
  padding: 29px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 11px;
  margin: 24px 0;
}
.saved-note p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.panel > p {
  font-size: 14px;
  color: var(--muted);
}
.panel .three {
  margin-bottom: 18px;
}
.exam-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 25px;
}
.exam-layout > .panel {
  margin: 0;
}
.exam-stem {
  font-size: 21px;
  line-height: 1.65;
  font-weight: 500;
  white-space: pre-line;
}
.exam-map {
  padding: 20px;
  background: #edf4ff;
  border: 1px solid var(--line);
  border-radius: 10px;
  align-self: start;
}
.exam-map h2 {
  font-size: 16px;
}
.exam-map > div {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.exam-map button {
  padding: 8px 0;
  border: 1px solid #c8d9b8;
  border-radius: 5px;
  background: white;
  color: #496a39;
  font-size: 12px;
}
.exam-map button.answered {
  background: #dae9c7;
}
.exam-map button.current {
  outline: 2px solid #567b42;
}
.result-item {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  margin: 16px 0;
}
.result-item summary {
  font-size: 14px;
  font-weight: 600;
}
.result-item > p {
  margin-top: 16px;
}
.history-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 15px;
  font-size: 14px;
}
.file-button {
  cursor: pointer;
}
.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.file-button:focus-within {
  outline: 3px solid #397cfa;
  outline-offset: 4px;
}
.panel details {
  margin-top: 20px;
}
.panel li {
  font-size: 13px;
  margin: 10px 0;
}
.code-map > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.code-map .link {
  font-size: 12px;
}
.alert {
  padding: 15px;
  background: #fff3df;
  border: 1px solid #dcc699;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13px;
}
#notice {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 430px;
  background: #254f36;
  color: white;
  border-radius: 8px;
  font-size: 13px;
  z-index: 10;
}
#notice:not(:empty) {
  padding: 16px 22px;
}
@media (max-width: 1150px) {
  .sidebar {
    width: 210px;
    padding: 30px 15px;
  }
  .workspace {
    margin-left: 210px;
  }
  main {
    padding: 30px;
  }
  .topbar {
    padding: 18px 30px;
  }
  .hero {
    padding: 30px;
    gap: 25px;
  }
  .hero h1 {
    font-size: 42px;
  }
  .next-lesson {
    padding-left: 24px;
  }
  .reader-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .toc {
    position: static;
    order: -1;
    max-height: none;
    background: #f0f5e8;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
  }
  .toc > button {
    display: inline-block;
    vertical-align: top;
    width: 50%;
  }
  .module-foot {
    flex-wrap: wrap;
  }
  .module-card {
    padding: 22px;
  }
}
@media (max-width: 800px) {
  .sidebar {
    position: static;
    width: 100%;
    display: block;
    padding: 18px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand > span {
    width: 35px;
    height: 35px;
    font-size: 28px;
  }
  .brand b {
    font-size: 17px;
  }
  .nav-caption,
  .side-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 5px;
    padding-bottom: 3px;
    margin-top: 15px;
  }
  .nav-item {
    width: auto;
    white-space: nowrap;
    padding: 9px 12px;
    font-size: 12px;
  }
  .nav-item > span {
    font-size: 16px;
    width: 16px;
  }
  .workspace {
    margin: 0;
  }
  .topbar {
    min-height: 52px;
    padding: 12px 22px;
    font-size: 8px;
  }
  .topbar > span:first-child {
    max-width: 250px;
  }
  main {
    padding: 25px 22px 45px;
  }
  .hero h1 {
    font-size: 39px;
  }
  .hero {
    grid-template-columns: 1.3fr 1fr;
  }
  .next-lesson h2 {
    font-size: 18px;
  }
  .next-lesson > span {
    font-size: 55px;
  }
  .stats {
    gap: 12px;
  }
  .stats > div {
    padding-left: 15px;
  }
  .stats strong {
    font-size: 27px;
  }
  .exam-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .exam-map {
    order: -1;
  }
  .exam-map > div {
    grid-template-columns: repeat(10, 1fr);
  }
  .panel .three {
    grid-template-columns: 1fr;
  }
  .module-card h2 {
    font-size: 19px;
  }
  footer {
    padding: 20px 22px;
  }
}
@media (max-width: 540px) {
  main {
    padding: 22px 16px 40px;
  }
  .topbar {
    padding: 12px 16px;
  }
  .topbar > span:first-child {
    max-width: 190px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 27px 24px;
    gap: 26px;
  }
  .hero h1 {
    font-size: 39px;
  }
  .next-lesson {
    border-left: 0;
    border-top: 1px solid #ccdbbc;
    padding: 20px 0 0;
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 5px 15px;
  }
  .next-lesson > small:first-child {
    grid-column: 1/-1;
  }
  .next-lesson > span {
    font-size: 45px;
    grid-row: 2/4;
    margin: 3px 0;
  }
  .next-lesson h2 {
    grid-column: 2;
    margin: 7px 0 4px;
    max-width: none;
  }
  .next-lesson p {
    grid-column: 2;
    margin: 0;
  }
  .next-lesson > small:last-child {
    display: none;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-bottom: 30px;
  }
  .stats > div {
    border: 0;
    padding: 0;
  }
  .module-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .module-card {
    padding: 24px;
  }
  .module-card p {
    min-height: 0;
  }
  .module-foot {
    margin-top: 20px;
  }
  .section-head {
    align-items: flex-start;
  }
  .section-head h2 {
    font-size: 22px;
  }
  .section-head > .link {
    max-width: 95px;
    flex: none;
    font-size: 11px;
  }
  .routine > .three {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .filters {
    grid-template-columns: 1fr;
    padding: 17px;
  }
  .page-head h1 {
    font-size: 33px;
  }
  .page-head p {
    font-size: 14px;
  }
  .syllabus > header {
    padding: 20px;
    gap: 14px;
  }
  .syllabus h2 {
    font-size: 19px;
  }
  .lesson-row {
    padding: 17px;
    gap: 13px;
  }
  .lesson-row strong {
    font-size: 13px;
  }
  .toolbar {
    gap: 9px;
  }
  .toolbar button {
    font-size: 11px;
    padding: 10px 12px;
  }
  .toolbar label {
    margin: 0;
  }
  .toc > button {
    width: 100%;
  }
  .reader-layout {
    gap: 17px;
  }
  .objectives {
    padding: 24px 20px;
  }
  .objectives p {
    font-size: 15px;
  }
  .book-body {
    padding: 5px 20px 24px;
  }
  .book-body h2 {
    font-size: 24px;
  }
  .book-diagram {
    padding: 15px;
    margin: 25px 0;
  }
  .diagram-nodes {
    grid-template-columns: 1fr;
  }
  .practice-section {
    padding: 24px 13px;
  }
  .question > summary {
    padding: 15px 12px;
    gap: 10px;
  }
  .question summary strong {
    font-size: 13px;
  }
  .question-body {
    padding: 16px;
    font-size: 15px;
  }
  .option {
    padding: 12px 10px;
    font-size: 14px;
    gap: 10px;
  }
  .question-body .actions > * {
    width: 100%;
  }
  .hint,
  .solution {
    padding: 13px;
    font-size: 13px;
  }
  .feedback {
    padding: 15px;
  }
  .notes-panel {
    padding: 24px 20px;
  }
  .complete-panel {
    padding: 23px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 17px;
  }
  .reader > .pagination {
    padding: 23px 18px;
  }
  .pagination button {
    font-size: 11px;
    padding: 11px 13px;
  }
  .book-lab {
    padding: 16px;
  }
  .book-lab-fields {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .panel,
  .saved-note {
    padding: 22px 18px;
  }
  .exam-map > div {
    grid-template-columns: repeat(5, 1fr);
  }
  .exam-stem {
    font-size: 18px;
  }
  .code-map > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  #notice {
    max-width: calc(100vw - 30px);
    right: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
@media print {
  .sidebar,
  .topbar,
  .toc,
  .toolbar,
  footer,
  .notes-panel,
  .complete-panel,
  .pagination,
  .question form {
    display: none;
  }
  .workspace {
    margin: 0;
  }
  main {
    padding: 0;
  }
  .reader {
    border: 0;
  }
  .reader-layout {
    display: block;
  }
}
.study-modal {
  border: 1px solid #d8dfd2;
  border-radius: 18px;
  padding: 32px;
  width: min(760px, 94vw);
  max-height: 85vh;
  overflow: auto;
  background: #fffef9;
  color: #243b30;
  box-shadow: 0 20px 100px #0005;
}
.study-modal::backdrop {
  background: #142d26b8;
}
.study-modal h2 {
  font-size: 1.7rem;
}
.study-modal p {
  line-height: 1.7;
}
.study-modal input {
  display: block;
  width: 100%;
  margin: 10px 0 18px;
}
.study-modal button {
  margin: 12px 8px 0 0;
}
a.primary {
  display: inline-block;
  text-decoration: none;
}
.question {
  margin-bottom: 20px;
}
.question-body {
  padding: 24px;
}
.question .stem {
  font-size: 1.2rem;
  line-height: 1.7;
}
/* Navegação v14: azul, turquesa e violeta */
h1,
h2,
h3 {
  font-weight: 700;
}
.sidebar {
  background: #11233f;
  border: 0;
  color: #fff;
  width: 236px;
  padding: 32px 20px;
  overflow-y: auto;
}
.brand {
  color: #fff;
}
.brand > span {
  background: #3171f5;
}
.brand small {
  color: #96afd3;
  font-size: 8px;
}
.nav-caption {
  color: #96acce;
  font-size: 10px;
}
.nav-item {
  font-size: 15px;
  padding: 15px 16px;
  margin: 7px 0;
  border-radius: 12px;
  color: #bdcde4;
}
.nav-item:hover {
  background: #1d3557;
  color: white;
}
.nav-item.active {
  background: #2c61e3;
  color: white;
  box-shadow: 0 5px 18px #07192d55;
}
.side-bottom {
  margin-top: auto;
  padding: 30px 10px 22px;
}
.side-bottom > span {
  display: block;
  color: #9cb5d9;
  font-size: 9px;
  letter-spacing: 0.13em;
}
.side-bottom strong {
  display: block;
  font-size: 33px;
  color: #fff;
  margin: 6px 0;
}
.side-bottom small {
  color: #b5c8e4;
}
.side-bottom p {
  font:
    13px/1.65 Arial,
    sans-serif;
  color: #9bb2d1;
}
.sidebar .utility {
  border-top: 1px solid #334561;
  padding: 18px 10px 0;
  color: #adc3e3;
  text-align: left;
}
.utility {
  background: none;
  color: #526986;
  font-size: 12px;
}
.workspace {
  margin-left: 236px;
}
.topbar {
  min-height: 69px;
  background: #fff;
  padding: 15px 38px;
  font-size: 11px;
  color: #566e8d;
}
.topbar b {
  color: #bccbe2;
  padding: 0 9px;
}
.topbar .save-label {
  margin-left: auto;
  background: #eff9f6;
  color: #216c5b;
  border: 0;
  padding: 5px 10px;
  border-radius: 20px;
  letter-spacing: 0;
  font-size: 11px;
}
.topbar .utility {
  font-size: 20px;
}
.welcome-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.welcome-line .eyebrow {
  margin: 0;
}
.welcome-line > span:last-child {
  font-size: 11px;
  color: #62748d;
}
.hero {
  background: linear-gradient(120deg, #173668, #2457bd 62%, #3c69dc);
  border: 0;
  color: white;
  border-radius: 22px;
  padding: 40px;
  gap: 42px;
  box-shadow: 0 16px 40px #193f9c18;
}
.hero h1 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(35px, 4.3vw, 57px);
  font-weight: 750;
  letter-spacing: -0.05em;
}
.hero > div > p {
  color: #d5e4ff;
  font-size: 15px;
}
.hero-tag {
  display: inline-block;
  color: #bcece7;
  font-size: 10px;
  letter-spacing: 0.15em;
  font-weight: 700;
  margin-bottom: 19px;
}
.hero .primary {
  background: #fff;
  color: #204da7;
  border: 0;
  min-height: 50px;
  padding: 14px 22px;
}
.hero .primary:hover {
  background: #e9f4ff;
}
.hero-help {
  display: block;
  color: #cfdef7;
  font-size: 11px;
  margin-top: 13px;
}
.next-lesson {
  border: 1px solid #ffffff33;
  border-radius: 16px;
  background: #ffffff0c;
  padding: 26px;
  justify-content: center;
}
.next-lesson .lesson-label {
  font:
    10px Arial,
    sans-serif;
  color: #d7e5ff;
  letter-spacing: 0.14em;
  margin: 0;
}
.lesson-number {
  font-size: 60px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  margin: 12px 0;
}
.lesson-number small {
  font-size: 18px;
  font-weight: 400;
  color: #b8d0f7;
  margin-left: 5px;
}
.next-lesson h2 {
  color: white;
  font-size: 23px;
  max-width: 100%;
}
.next-lesson p {
  color: #cfdef7;
  font-size: 12px !important;
}
.mini-progress {
  display: flex;
  justify-content: space-between;
  color: #dce9ff;
  font-size: 10px;
}
.next-lesson progress::-webkit-progress-bar {
  background: #ffffff24;
}
.next-lesson progress::-webkit-progress-value {
  background: #61dacb;
}
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 22px 0 37px;
}
.quick-card {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  text-align: left;
  color: var(--ink);
  padding: 23px;
  box-shadow: 0 5px 16px #243c6910;
  transition: transform 0.15s;
}
.quick-card:hover {
  transform: translateY(-2px);
  border-color: #8bb0f8;
}
.quick-card > span:nth-child(2) {
  flex: 1;
}
.quick-card b {
  font-size: 16px;
  display: block;
}
.quick-card small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #5c708b;
  line-height: 1.5;
  margin-top: 5px;
}
.quick-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e0f6f2;
  color: #117969;
  font-size: 25px;
}
.quick-icon.purple {
  background: #eee9ff;
  color: #6e4ac6;
}
.module-card {
  border-radius: 16px;
  border-top: 3px solid #3877ef;
  box-shadow: 0 5px 18px #23385c08;
}
.module-card:nth-child(2) {
  border-top-color: #00a18a;
}
.module-card:nth-child(3) {
  border-top-color: #875cdb;
}
.module-card:nth-child(4) {
  border-top-color: #e5a022;
}
.module-top > span {
  font:
    700 17px/39px Arial,
    sans-serif;
  background: #eaf1ff;
  color: #3262b7;
}
.module-card:nth-child(2) .module-top > span {
  background: #e4f7f2;
  color: #137261;
}
.module-card:nth-child(3) .module-top > span {
  background: #eee9fb;
  color: #6b46b0;
}
.module-card:nth-child(4) .module-top > span {
  background: #fff3d8;
  color: #8a5d08;
}
.primary,
.secondary {
  border-radius: 10px;
  font-size: 14px;
  min-height: 46px;
}
.section-tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 5px;
  background: #e7edf7;
  border-radius: 12px;
  margin-bottom: 30px;
  width: fit-content;
}
.section-tabs button {
  background: none;
  border-radius: 8px;
  color: #506483;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 14px;
}
.section-tabs button[aria-current],
.section-tabs button:hover {
  background: #fff;
  color: #2455bb;
  box-shadow: 0 2px 5px #1b376b14;
}
.review-callout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 26px;
  background: #fff5df;
  border: 1px solid #f3dfb5;
  border-radius: 14px;
  margin-bottom: 30px;
  color: #77551c;
}
.review-callout p {
  margin: 4px 0 0;
  font-size: 12px;
}
.option {
  border: 1px solid #d4dfee !important;
  border-radius: 12px !important;
  padding: 16px !important;
  background: white;
  color: #273c5a;
  min-height: 54px;
  font-size: 15px !important;
  font-weight: 400 !important;
}
.option:hover {
  background: #f0f5ff;
  border-color: #91b0ee !important;
}
.option:has(input:checked) {
  background: #eaf1ff;
  border-color: #3066df !important;
  box-shadow: 0 0 0 1px #3066df;
}
.option input {
  accent-color: #2c61df;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.exam-stem,
.stem {
  line-height: 1.6 !important;
  font-size: 21px !important;
}
.panel {
  border-radius: 16px !important;
}
.feedback {
  background: #eff6ff !important;
  border-left: 3px solid #4c7ee0;
  color: #263f63;
}
.question-body [data-feedback]:empty {
  display: none;
}
.recommendations {
  padding: 28px;
  background: #eaf3ff;
  border-radius: 16px;
  margin: 28px 0;
}
.recommendations h2 {
  margin-bottom: 10px;
}
.recommendation {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  text-align: left;
  width: 100%;
  background: white;
  border: 1px solid #d6e4f5;
  border-radius: 10px;
  padding: 15px;
  margin-top: 10px;
  color: #1e477f;
}
.recommendation small {
  display: block;
  color: #627895;
  font-size: 11px;
  margin-top: 5px;
}
.recommendation > span:last-child {
  white-space: nowrap;
  font-size: 12px;
}
.exam-history {
  margin-top: 32px;
}
.history-row {
  gap: 15px;
  flex-wrap: wrap;
}
.autosave-note {
  color: #22705d;
  font-size: 12px;
  padding: 10px 14px;
  background: #eaf7f1;
  border-radius: 8px;
}
.study-modal {
  background: #fff;
  color: var(--ink);
  border: 0;
  border-radius: 20px;
  max-width: 680px;
  box-shadow: 0 25px 100px #09234b55;
  padding: 30px;
}
.study-modal::backdrop {
  background: #0d2249a6;
  backdrop-filter: blur(4px);
}
.study-modal h2 {
  font-size: 27px;
}
.answer-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 12px;
}
.answer-summary > span {
  padding: 9px 13px;
  background: #fff0ec;
  border-radius: 8px;
  color: #94422f;
}
.answer-summary > span:last-child {
  background: #e2f6ed;
  color: #21644d;
}
.modal-reason {
  font-size: 15px;
  color: #344c6d;
}
.study-detail {
  background: #f0f5fc;
  border: 1px solid #dce7f6;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 16px;
}
.study-detail summary {
  color: #315e9d;
  font-size: 13px;
  font-weight: 600;
}
.study-detail h3 {
  font-size: 16px;
  margin-top: 22px;
}
.study-detail p {
  font-size: 14px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  margin-top: 18px;
}
.modal-actions .primary {
  margin: 0;
}
.modal-actions .link {
  padding: 8px;
}
.modal-actions p {
  width: 100%;
  color: #a83438;
  margin: 0;
}
.study-modal small {
  display: block;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.book-body {
  color: #263b55;
}
.stats {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin: 20px 0;
}
.stats strong {
  color: #2455b9;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #02a8a0;
  outline-offset: 4px;
}
#notice {
  background: #18375e !important;
  color: white !important;
}
@media (max-width: 1000px) {
  .reader-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
  .hero {
    padding: 30px;
    gap: 25px;
  }
  main {
    padding: 28px;
  }
  .topbar {
    padding: 15px 28px;
  }
  .hero h1 {
    font-size: 40px;
  }
  .next-lesson {
    padding: 20px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 16px 18px;
    display: block;
    overflow: visible;
  }
  .brand {
    margin-bottom: 16px;
  }
  .brand b {
    font-size: 17px;
  }
  .brand > span {
    width: 37px;
    height: 37px;
    font-size: 29px;
  }
  .nav-caption,
  .side-bottom,
  .sidebar > .utility {
    display: none;
  }
  .primary-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .nav-item {
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 10px 4px;
    font-size: 11px;
    border-radius: 10px;
  }
  .nav-item > span {
    font-size: 20px;
  }
  .workspace {
    margin-left: 0;
  }
  .topbar {
    padding: 12px 18px;
    min-height: 49px;
    gap: 10px;
  }
  .topbar .save-label {
    font-size: 9px;
  }
  .topbar > span:first-child {
    font-size: 9px;
  }
  .topbar .utility {
    font-size: 17px;
  }
  main {
    padding: 23px 17px 40px;
  }
  .welcome-line {
    align-items: flex-start;
  }
  .welcome-line .eyebrow {
    font-size: 9px;
  }
  .welcome-line > span:last-child {
    font-size: 10px;
    white-space: nowrap;
  }
  .hero {
    display: block;
    padding: 27px;
    border-radius: 17px;
  }
  .hero h1 {
    font-size: 38px;
  }
  .hero > div > p {
    font-size: 14px;
  }
  .next-lesson {
    margin-top: 25px;
    padding: 20px;
  }
  .lesson-number {
    font-size: 39px;
    float: right;
    margin: 0;
  }
  .lesson-number small {
    font-size: 14px;
  }
  .next-lesson h2 {
    font-size: 19px;
    margin-top: 14px;
    padding-right: 35px;
  }
  .quick-actions {
    gap: 12px;
    grid-template-columns: 1fr;
    margin-bottom: 28px;
  }
  .quick-card {
    padding: 18px;
  }
  .quick-card b {
    font-size: 15px;
  }
  .module-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .module-card {
    padding: 22px;
  }
  .section-tabs {
    flex-wrap: nowrap;
    overflow: auto;
    width: 100%;
    white-space: nowrap;
    gap: 3px;
  }
  .section-tabs button {
    padding: 9px 11px;
    font-size: 11px;
    flex-shrink: 0;
  }
  .review-callout {
    padding: 20px;
    align-items: flex-start;
    flex-direction: column;
  }
  .section-head h2 {
    font-size: 23px;
  }
  .section-head > .link {
    font-size: 11px;
  }
  .page-head h1 {
    font-size: 31px;
  }
  .exam-stem,
  .stem {
    font-size: 18px !important;
  }
  .option {
    padding: 14px !important;
    font-size: 14px !important;
  }
  #trainAnswer > button,
  #examNext,
  #nextQuestion {
    position: sticky;
    bottom: 12px;
    width: 100%;
    z-index: 2;
    box-shadow: 0 4px 18px #173a8b30;
    margin-top: 15px;
  }
  .study-modal {
    width: calc(100vw - 24px);
    padding: 23px;
    max-height: 88dvh;
  }
  .study-modal h2 {
    font-size: 23px;
  }
  .modal-actions .primary {
    width: 100%;
  }
  .modal-actions .link {
    width: 100%;
    text-align: center;
  }
  .recommendations {
    padding: 21px;
  }
  .recommendation {
    font-size: 13px;
  }
  .recommendation > span:last-child {
    font-size: 10px;
  }
  footer {
    padding: 20px;
    flex-direction: column;
    font-size: 10px;
  }
  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .stats strong {
    font-size: 25px;
  }
  .stats > div {
    padding-left: 10px;
  }
  .filters {
    padding: 17px;
  }
  .book-body,
  .objectives {
    padding-left: 22px;
    padding-right: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Preferência de leitura: somente os quatro valores permitidos pelo aplicativo. */
.reader[data-font="16"] {
  --read: 16px;
}
.reader[data-font="18"] {
  --read: 18px;
}
.reader[data-font="20"] {
  --read: 20px;
}
.reader[data-font="22"] {
  --read: 22px;
}

/* v15: leitura acessível, avaliação em diálogo e guia de investimentos. */
button,
input,
select,
summary {
  min-height: 44px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #7045b5;
  outline-offset: 4px;
}
button:disabled {
  opacity: 1;
  color: #475569;
  background: #e2e8f0;
  border-color: #cbd5e1;
  cursor: not-allowed;
  transform: none;
}
.lesson-row.is-locked {
  color: #475569;
  background: #f1f5f9;
}
.lesson-row.is-locked small {
  color: #475569;
}
.test-callout {
  border: 2px solid #087f70;
  border-radius: 18px;
  padding: 24px;
  background: #f0fdfa;
}
.quiz-header,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.button-row {
  justify-content: flex-start;
}
.study-modal {
  width: min(840px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 18px;
  line-height: 1.65;
}
.lesson-quiz progress {
  width: 100%;
  accent-color: #087f70;
}
.quiz-choices {
  border: 0;
  padding: 0;
  margin: 24px 0;
  min-width: 0;
}
.quiz-choices legend {
  padding: 0;
  margin-bottom: 24px;
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.65;
}
.study-modal .quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  margin: 12px 0;
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: #172b46;
  cursor: pointer;
  font-size: 18px;
  line-height: 1.6;
}
.study-modal .quiz-option span,
.study-modal .quiz-option b {
  font-size: inherit;
}
.quiz-option:hover {
  border-color: #315cc9;
  background: #f3f6ff;
}
.quiz-option:has(input:checked) {
  border-color: #1c49b4;
  background: #edf3ff;
  box-shadow: inset 4px 0 #1c49b4;
}
.study-modal .quiz-option input {
  min-height: 24px;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 3px;
  accent-color: #1c49b4;
}
.quiz-result,
.answer-review {
  border-radius: 16px;
  padding: 22px;
  margin: 18px 0;
}
.is-pass {
  background: #edfaf4;
  border: 1px solid #22835d;
  color: #124a36;
}
.is-retry {
  background: #fff8e9;
  border: 1px solid #a66b0a;
  color: #663e05;
}
.quiz-score {
  font-size: 2rem;
  font-weight: 750;
}
.investment-toolbar {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 16px;
  align-items: end;
  margin: 24px 0;
}
.investment-toolbar label {
  display: grid;
  gap: 8px;
  font-weight: 650;
}
.investment-toolbar input,
.investment-toolbar select {
  width: 100%;
  padding: 12px;
  border: 1px solid #94a3b8;
  border-radius: 10px;
  background: #fff;
  color: #172b46;
  font: inherit;
}
.investment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 20px;
}
.investment-card {
  display: flex;
  flex-direction: column;
  border-top: 4px solid #087f70;
}
.investment-card h2 {
  font-size: 1.35rem;
}
.investment-card button {
  margin-top: auto;
}
.tax-guide {
  max-width: 100%;
  margin-top: 40px;
}
.tax-guide section {
  margin: 32px 0;
}
.tax-guide a {
  color: #1844a5;
  text-decoration: underline;
}
@media (max-width: 760px) {
  .primary-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .primary-nav .nav-item {
    font-size: 12px;
    padding: 8px 2px;
    overflow-wrap: anywhere;
  }
  .investment-toolbar {
    grid-template-columns: 1fr;
  }
  .study-modal {
    padding: 20px;
  }
  .quiz-header {
    align-items: flex-start;
  }
  .study-modal .quiz-option {
    padding: 14px;
  }
  .button-row button {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
