.app {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

.sidebar {
  width: 290px;
  flex-shrink: 0;
  background: var(--tekhelet-deep);
  color: #f2ece0;
  padding: 1.8rem 1.2rem;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  z-index: 100;
}

.main-wrapper {
  flex: 1;
  min-width: 0;
  width: calc(100% - 290px);
  margin-left: 290px;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.sidebar-toggle-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #dcd3bf;
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.76rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.sidebar-toggle-btn:hover {
  background: var(--clay);
  color: #fff;
  border-color: var(--clay-deep);
}

.app.sidebar-collapsed .main-wrapper {
  margin-left: 0 !important;
  width: 100% !important;
}

/* CABEÇALHO SUPERIOR DO LEITOR (100% FIXO NO TOPO DA TELA) */
.reader-top-header {
  position: fixed;
  top: 0;
  left: 290px;
  right: 0;
  width: calc(100% - 290px);
  height: 60px;
  z-index: 9999;
  margin: 0;
  box-sizing: border-box;
  background: rgba(244, 236, 216, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: left 0.2s ease, width 0.2s ease;
}

.app.sidebar-collapsed .reader-top-header {
  left: 0 !important;
  width: 100% !important;
}

.header-menu-toggle-btn {
  background: var(--tekhelet-deep);
  color: var(--gold);
  border: 1.5px solid var(--gold);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-menu-toggle-btn:hover {
  background: var(--gold);
  color: var(--tekhelet-deep);
}

.header-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: visible;
}

.header-course-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--clay-deep);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.header-divider {
  color: #a0927d;
  font-weight: 300;
  flex-shrink: 0;
}

/* DROPDOWN DE SUBTÓPICOS NO CABEÇALHO */
.header-unit-dropdown-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.header-section-title-btn {
  background: rgba(168, 83, 47, 0.06);
  border: 1px solid rgba(168, 83, 47, 0.2);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
  font-family: inherit;
  color: inherit;
  margin: 0;
  text-align: left;
}

.header-section-title-btn:hover {
  background: rgba(168, 83, 47, 0.14);
  border-color: var(--clay);
}

.header-section-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.header-dropdown-arrow {
  font-size: 0.85rem;
  color: var(--clay);
  transition: transform 0.2s ease;
  display: inline-block;
  font-weight: bold;
}

.header-unit-dropdown-wrap.open .header-dropdown-arrow {
  transform: rotate(180deg);
}

/* POPUP DROPDOWN DE SUBTÓPICOS */
.header-subtopics-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 250px;
  max-width: 340px;
  background: #fdf8ec;
  border: 2px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  padding: 0.5rem;
  z-index: 10000;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 70vh;
  overflow-y: auto;
  box-sizing: border-box;
}

.header-unit-dropdown-wrap.open .header-subtopics-menu {
  display: flex;
}

.header-subtopic-item {
  font-family: 'Source Serif 4', serif;
  font-size: 0.95rem;
  color: #3a3227;
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-subtopic-item:hover {
  background: var(--gold);
  color: var(--tekhelet-deep);
  font-weight: 700;
}

.header-hub-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.header-hub-btn:hover {
  background: var(--tekhelet);
  color: #fff;
  border-color: var(--tekhelet);
}

@media (max-width: 680px) {
  .header-course-name, .header-divider {
    display: none;
  }
}

.app.sidebar-collapsed .sidebar {
  display: none !important;
}

.app.sidebar-collapsed .main-wrapper {
  margin-left: 0 !important;
  width: 100% !important;
}

.app.sidebar-collapsed main {
  width: 100%;
  margin: 0;
  padding: 3rem 3rem 6rem;
  box-sizing: border-box;
}

.app.sidebar-collapsed .cover {
  width: 100%;
  padding: 4rem 1.5rem;
}

.app.sidebar-collapsed .cover h1 {
  width: 100%;
  font-size: clamp(3rem, 6.5vw, 5.2rem);
}

.app.sidebar-collapsed .cover p {
  width: 100%;
  font-size: 1.4rem;
}

/* Botão e Container dos Subtópicos na Sidebar */
.subtopics-toggle-btn {
  background: transparent;
  border: none;
  color: #b8ab8a;
  font-size: 0.72rem;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
  margin-left: auto;
  flex-shrink: 0;
}

.subtopics-toggle-btn:hover {
  color: var(--gold);
  background: rgba(255, 255, 255, 0.15);
}

.nav-subtopics {
  margin: 0.3rem 0 0.6rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  border-left: 2px solid rgba(212, 163, 89, 0.3);
  padding-left: 0.6rem;
  max-height: 600px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.25s ease, margin 0.25s ease, padding 0.25s ease;
}

.nav-subtopics.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-left-color: transparent;
  pointer-events: none;
}

.nav-subitem {
  font-family: 'Source Serif 4', serif;
  font-size: 0.9rem;
  color: #d0c4a8;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  transition: all 0.15s ease;
  line-height: 1.35;
}

.nav-subitem:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-subitem.active {
  color: var(--gold);
  font-weight: 700;
  background: rgba(212, 163, 89, 0.15);
}

/* Estilos para o Player de Vídeo do Leitor */
.video-card-block {
  background: #fdfbf7;
  border: 2px solid var(--line);
  border-left: 6px solid var(--tekhelet);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.8rem 0;
}

.video-card-header {
  margin-bottom: 0.8rem;
}

.video-card-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(44, 71, 99, 0.12);
  color: var(--tekhelet-deep);
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.4rem;
}

.video-card-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-weight: 800;
  font-size: 1.35rem;
  margin: 0;
  color: var(--ink);
}

.video-card-preview {
  position: relative;
  width: 100%;
  padding-bottom: 35%;
  min-height: 180px;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: linear-gradient(135deg, #1c2836 0%, #0d1520 100%);
  margin: 1rem 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.video-preview-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.video-play-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 1rem;
  transition: transform 0.2s ease;
}

.video-preview-link:hover .video-play-overlay {
  transform: scale(1.04);
}

.play-icon-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gold);
  color: #12100e;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  box-shadow: 0 4px 20px rgba(212, 163, 89, 0.4);
  margin-bottom: 0.6rem;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.video-preview-link:hover .play-icon-circle {
  background: #e8bd70;
  box-shadow: 0 6px 24px rgba(212, 163, 89, 0.6);
}

.play-text {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #f5eedc;
}

.play-subtext {
  font-family: 'Source Serif 4', serif;
  font-size: 0.85rem;
  color: #b8ab8a;
  margin-top: 0.3rem;
}

/* Wrapper de Imagem com Badge e Lightbox Tela Cheia */
.image-wrapper {
  position: relative;
  display: block;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
}

.image-wrapper:hover .reader-img {
  transform: scale(1.015);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.zoom-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(18, 16, 14, 0.78);
  backdrop-filter: blur(4px);
  color: var(--gold);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(212, 163, 89, 0.4);
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.image-wrapper:hover .zoom-badge {
  opacity: 1;
  background: rgba(18, 16, 14, 0.95);
}

/* Lightbox Modal Tela Cheia Total */
.image-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100000;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 0;
  margin: 0;
  cursor: zoom-out;
}

.image-lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.image-lightbox-img {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: block;
}

.brand {
  font-family: 'Frank Ruhl Libre', serif;
  font-weight: 800;
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
  line-height: 1.2;
}

.brand-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b8ab8a;
  margin-bottom: 1.4rem;
}

.progress-wrap {
  margin-bottom: 1.2rem;
}

.progress-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: #b8ab8a;
  margin-bottom: 0.4rem;
}

.progress-bar {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
}

.progress-fill {
  background: var(--gold);
  height: 100%;
  border-radius: 6px;
  transition: width 0.3s ease;
}

.nav-group-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a7d63;
  margin: 1.1rem 0 0.4rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 0.25rem;
  transition: background 0.15s ease;
  font-size: 0.98rem;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  background: var(--gold);
  color: var(--tekhelet-deep);
  font-weight: 700;
}

.nav-item:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
}

.nav-check {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  font-family: 'IBM Plex Mono', monospace;
}

.nav-item.visited .nav-check {
  background: var(--good);
  color: #fff;
}

.nav-item.active .nav-check {
  background: var(--tekhelet-deep);
  color: var(--gold);
}

.nav-label {
  line-height: 1.25;
}

.nav-unit {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  opacity: 0.75;
  display: block;
}

main {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 2.6rem 3rem 5rem;
}

@media (max-width: 860px) {
  .app {
    display: block;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    z-index: 1000;
    box-shadow: 4px 0 24px rgba(0,0,0,0.5);
  }

  .app.sidebar-collapsed .sidebar {
    display: none !important;
  }

  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  main {
    padding: 1.5rem 1rem 4rem;
    width: 100%;
    box-sizing: border-box;
  }

  .reader-top-header {
    left: 0 !important;
    width: 100% !important;
    padding: 0 0.75rem;
    height: 56px;
  }

  .header-menu-toggle-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
  }

  .header-section-title {
    font-size: 0.88rem;
    max-width: 150px;
  }

  .header-hub-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
  }

  .cover {
    padding: 2.2rem 1rem;
    min-height: auto;
  }

  .cover h1 {
    font-size: 2.2rem;
  }

  .cover p {
    font-size: 1.1rem;
  }

  .chapter-title {
    font-size: 2.1rem;
  }

  .block-title {
    font-size: 1.4rem;
  }

  .chapter-nav {
    flex-direction: column;
    gap: 0.8rem;
  }

  .chapter-nav-btn {
    width: 100%;
    justify-content: center;
  }

  .glossary-modal-window {
    width: 95%;
    padding: 1.4rem 1.2rem;
  }

  .glossary-modal-term {
    font-size: 1.6rem;
  }

  .glossary-modal-footer {
    flex-direction: column;
    gap: 0.6rem;
    align-items: stretch;
  }

  .glossary-modal-full-btn,
  .glossary-modal-action-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

.cover {
  width: 100%;
  max-width: 100%;
  min-height: calc(100vh - 120px);
  margin: 0;
  padding: 4rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

.cover-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 1.2rem;
  text-align: center;
}

.cover h1 {
  font-family: 'Frank Ruhl Libre', serif;
  font-weight: 900;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 1.1;
  margin: 0 0 1.8rem;
  text-align: center;
  width: 100%;
}

.cover p {
  font-size: 1.35rem;
  line-height: 1.7;
  color: #4a4235;
  text-align: center;
  width: 100%;
  margin: 0.8rem 0;
}

.start-btn {
  margin: 3rem auto 0 auto;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--clay);
  color: #fdf8ec;
  border: none;
  border-radius: 8px;
  padding: 1.1rem 2.8rem;
  cursor: pointer;
  font-weight: 700;
  display: inline-block;
  box-shadow: 0 6px 20px rgba(184, 80, 52, 0.35);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.start-btn:hover {
  background: var(--clay-deep);
  transform: translateY(-3px);
  box-shadow: 0 8px 26px rgba(184, 80, 52, 0.45);
}

.chapter-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* BANNER E BOTÃO DE VOLTAR NO GLOSSÁRIO */
.glossary-back-bar {
  background: var(--parchment-deep, #e2d5b8);
  border: 1.5px solid var(--line, #c9b98e);
  border-radius: 12px;
  padding: 0.9rem 1.3rem;
  margin-bottom: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  flex-wrap: wrap;
}

.glossary-back-btn {
  background: var(--tekhelet, #2c4763);
  color: #ffffff;
  border: 1.5px solid var(--gold, #b8862f);
  border-radius: 8px;
  padding: 0.6rem 1.25rem;
  font-family: 'Source Serif 4', serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.glossary-back-btn:hover {
  background: var(--tekhelet-deep, #1a2e42);
  color: var(--gold, #b8862f);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

/* BOTÃO FLUTUANTE FIXO DE VOLTAR NO GLOSSÁRIO */
.glossary-fixed-back-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99999;
  background: var(--tekhelet, #2c4763);
  color: #ffffff;
  border: 2px solid var(--gold, #b8862f);
  border-radius: 30px;
  padding: 0.8rem 1.4rem;
  font-family: 'Source Serif 4', serif;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
  line-height: 1;
}

.glossary-fixed-back-btn:hover {
  background: var(--tekhelet-deep, #1a2e42);
  color: var(--gold, #b8862f);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

/* TABELAS MARKDOWN ELEGANTES E RESPONSIVAS */
.reader-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(36, 31, 26, 0.08);
  border: 1.5px solid var(--line, #c9b98e);
  background: var(--parchment, #efe6d3);
}

.reader-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Source Serif 4', serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink, #241f1a);
  text-align: left;
}

.reader-table th {
  background: var(--tekhelet, #2c4763);
  color: #ffffff;
  font-family: 'Frank Ruhl Libre', serif;
  font-weight: 700;
  padding: 0.9rem 1.1rem;
  border-bottom: 2px solid var(--gold, #b8862f);
  font-size: 1.08rem;
  letter-spacing: 0.02em;
}

.reader-table td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(201, 185, 142, 0.5);
  vertical-align: top;
}

.reader-table tbody tr:nth-child(even) {
  background: rgba(226, 213, 184, 0.35);
}

.reader-table tbody tr:hover {
  background: rgba(184, 134, 47, 0.12);
}

.reader-table strong {
  color: var(--tekhelet-deep, #1a2e42);
}

@media (max-width: 768px) {
  .reader-table th, .reader-table td {
    padding: 0.65rem 0.8rem;
    font-size: 0.95rem;
  }
}

.chapter-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-weight: 900;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  margin: 0 0 1.6rem;
  line-height: 1.1;
}

.block {
  margin-bottom: 1.35rem;
  scroll-margin-top: 85px;
}

.block-title,
.block h2,
.block h3,
.block h4 {
  font-family: 'Frank Ruhl Libre', serif;
  font-weight: 700;
  font-size: 1.55rem;
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
  scroll-margin-top: 85px;
  color: var(--tekhelet-deep, #1a2e42);
}

.block:first-child .block-title,
.block:first-of-type .block-title,
.block:first-child h2,
.block:first-child h3 {
  margin-top: 0.5rem;
}

.block p {
  font-size: 1.22rem;
  line-height: 1.65;
  margin: 0 0 0.65rem;
  color: #2f291f;
}

.note {
  background: rgba(168, 83, 47, 0.08);
  border: 2px solid var(--clay);
  border-radius: 6px;
  padding: 1rem 1.3rem;
  font-size: 1.08rem;
  line-height: 1.58;
  color: #3a2a1e;
  margin: 0.9rem 0;
}

.note strong {
  color: var(--clay-deep);
}

.reader-list {
  margin: 0.8rem 0 1.2rem 1.8rem;
  padding: 0;
  list-style-type: disc;
}

.reader-list li {
  font-family: 'Source Serif 4', serif;
  font-size: 1.2rem;
  line-height: 1.68;
  color: #2f291f;
  margin-bottom: 0.45rem;
}

.btn-genesis-details {
  display: inline-block;
  margin-top: 1.2rem;
  padding: 0.8rem 1.4rem;
  background: var(--tekhelet);
  color: #fff !important;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  border: 2px solid var(--tekhelet-deep);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: all 0.15s ease;
}

.btn-genesis-details:hover {
  background: var(--clay);
  border-color: var(--clay-deep);
  transform: translateY(-2px);
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.acc-item {
  border: 2px solid var(--line);
  border-radius: 6px;
  margin-bottom: 0.7rem;
  overflow: hidden;
  background: #fbf6e9;
}

.acc-item > summary {
  cursor: pointer;
  padding: 0.9rem 1.2rem;
  font-weight: 700;
  font-size: 1.15rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Source Serif 4', serif;
}

.acc-item > summary::-webkit-details-marker {
  display: none;
}

.acc-item > summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--gold-deep);
  font-weight: 400;
}

.acc-item[open] > summary::after {
  content: "–";
}

.acc-body {
  padding: 0 1.2rem 1.1rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #3a3327;
}

.quiz-q {
  background: #fbf6e9;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 1.3rem 1.5rem;
  margin-bottom: 1.2rem;
}

.quiz-q-text {
  font-size: 1.22rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.quiz-opt {
  display: block;
  width: 100%;
  text-align: left;
  font-family: 'Source Serif 4', serif;
  font-size: 1.1rem;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 5px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
  transition: all 0.12s ease;
}

.quiz-opt:hover:not(:disabled) {
  border-color: var(--tekhelet);
}

.quiz-opt:focus-visible {
  outline: 3px solid var(--tekhelet);
  outline-offset: 2px;
}

.quiz-opt.correct {
  background: rgba(95, 122, 82, 0.18);
  border-color: var(--good);
  font-weight: 700;
}

.quiz-opt.incorrect {
  background: rgba(168, 67, 47, 0.15);
  border-color: var(--bad);
}

.quiz-opt:disabled {
  cursor: default;
}

.quiz-feedback {
  font-size: 1.05rem;
  line-height: 1.55;
  margin-top: 0.6rem;
  padding: 0.8rem 1rem;
  border-radius: 5px;
}

.quiz-feedback.correct {
  background: rgba(95, 122, 82, 0.12);
  color: #3f5236;
}

.quiz-feedback.incorrect {
  background: rgba(168, 67, 47, 0.1);
  color: #6b2f1f;
}

.reflect-box textarea,
.reflect-input {
  width: 100%;
  min-height: 120px;
  font-family: 'Source Serif 4', serif;
  font-size: 1.12rem;
  padding: 1rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  resize: vertical;
  background: #ffffff;
  color: var(--ink);
  box-sizing: border-box;
  margin: 0.8rem 0;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reflect-box textarea:focus,
.reflect-input:focus {
  outline: none;
  border-color: var(--tekhelet);
  box-shadow: 0 0 0 3px rgba(44, 71, 99, 0.18);
}

.reflect-save {
  margin-top: 0.7rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.92rem;
  background: var(--tekhelet);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.6rem;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
  transition: background 0.2s ease, transform 0.15s ease;
}

.reflect-save:hover {
  background: var(--tekhelet-deep);
  transform: translateY(-2px);
}

.reflect-status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  color: #7a6e58;
  margin-left: 0.8rem;
}

.embed-card-block {
  background: #fbf6e9;
  border: 2px solid var(--line);
  border-left: 6px solid var(--tekhelet);
  border-radius: 8px;
  padding: 1.5rem 1.8rem;
  margin: 1.8rem 0 2.4rem;
  box-shadow: 0 4px 12px rgba(36, 31, 26, 0.06);
}

.embed-card-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(44, 71, 99, 0.12);
  color: var(--tekhelet-deep);
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.embed-card-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-weight: 800;
  font-size: 1.45rem;
  margin: 0 0 0.4rem;
  color: var(--ink);
}

.embed-card-desc {
  font-size: 1.08rem;
  color: #4a4235;
  margin: 0 0 1.2rem;
  line-height: 1.5;
}

.embed-card-btn {
  display: inline-block;
  background: var(--tekhelet);
  color: #fff !important;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 1.6rem;
  border-radius: 6px;
  text-decoration: none;
  border: 2px solid var(--tekhelet-deep);
  box-shadow: 0 4px 10px rgba(44, 71, 99, 0.2);
  transition: all 0.15s ease;
}

.embed-card-btn:hover {
  background: var(--clay);
  border-color: var(--clay-deep);
  transform: translateY(-2px);
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(168, 83, 47, 0.3);
}

.fullpage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.fullpage-header h2 {
  font-family: 'Frank Ruhl Libre', serif;
  font-weight: 800;
  font-size: 1.8rem;
  margin: 0;
}

.open-new {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--tekhelet);
  border: 2px solid var(--tekhelet);
  border-radius: 5px;
  padding: 0.5rem 1rem;
}

.open-new:hover {
  background: var(--tekhelet);
  color: #fff;
}

.fullpage-frame {
  width: 100%;
  height: 1300px;
  border: 3px solid var(--tekhelet);
  border-radius: 10px;
  background: #fff;
}

.chapter-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 2px dashed var(--line);
  gap: 1rem;
  flex-wrap: wrap;
}

.chapter-nav-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--tekhelet-deep);
  border: 1.5px solid var(--gold);
  color: var(--gold);
  padding: 0.85rem 1.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.14);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.chapter-nav-btn:hover {
  background: var(--gold);
  color: var(--tekhelet-deep);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.chapter-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(44, 71, 99, 0.2);
  border-color: #8a7d63;
  color: #8a7d63;
  transform: none;
  box-shadow: none;
}

/* ESTILOS DO GLOSSÁRIO INTERATIVO E MODAL */
.glossary-link {
  color: var(--tekhelet-deep);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px dotted var(--gold-deep);
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  background: rgba(212, 163, 89, 0.16);
  border-radius: 4px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.glossary-link:hover {
  background: var(--gold);
  color: var(--tekhelet-deep);
  border-bottom-color: var(--tekhelet-deep);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.glossary-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(18, 16, 14, 0.65);
  backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-sizing: border-box;
}

.glossary-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.glossary-modal-window {
  background: #fdf8ec;
  border: 3px solid var(--gold);
  border-radius: 12px;
  width: 92%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  position: relative;
  transform: translateY(12px);
  transition: transform 0.2s ease;
  box-sizing: border-box;
}

.glossary-modal-overlay.active .glossary-modal-window {
  transform: translateY(0);
}

.glossary-modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem;
  transition: color 0.15s ease;
}

.glossary-modal-close-btn:hover {
  color: var(--clay);
}

.glossary-modal-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--tekhelet);
  color: #ffffff;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.glossary-modal-term {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--ink);
  margin: 0.2rem 0 1rem 0;
  line-height: 1.15;
}

.glossary-modal-body {
  font-family: 'Source Serif 4', serif;
  font-size: 1.15rem;
  line-height: 1.7;
  color: #3a3227;
  margin-bottom: 1.4rem;
  background: #f7f0df;
  padding: 1.4rem 1.5rem;
  border-radius: 8px;
  border-left: 5px solid var(--gold);
  overflow-y: auto;
  max-height: 52vh;
  box-sizing: border-box;
}

.glossary-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.glossary-modal-full-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--tekhelet-deep);
  color: var(--gold);
  border: 1.5px solid var(--gold);
  border-radius: 6px;
  padding: 0.65rem 1.2rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.glossary-modal-full-btn:hover {
  background: var(--gold);
  color: var(--tekhelet-deep);
}

.glossary-modal-action-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--clay);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0.65rem 1.4rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.glossary-modal-action-btn:hover {
  background: var(--clay-deep);
}

.crossword-wrap {
  display: flex;
  gap: 2.2rem;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-top: 1.2rem;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.crossword-grid-wrap {
  flex: 0 0 auto;
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}

.cw-grid {
  display: grid;
  gap: 2px;
  background: var(--tekhelet-deep);
  padding: 3px;
  border-radius: 6px;
  width: min(560px, 100%);
}

.cw-cell {
  position: relative;
  aspect-ratio: 1/1;
  background: #fff;
}

.cw-cell.cw-blocked {
  background: transparent;
}

.cw-cell.cw-letter input {
  width: 100%;
  height: 100%;
  border: none;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #fff;
  color: var(--ink);
  padding: 0;
}

.cw-cell.cw-letter input:focus {
  outline: 3px solid var(--tekhelet);
  outline-offset: -2px;
  background: rgba(44, 71, 99, 0.08);
}

.cw-cell.cw-letter input.cw-correct {
  background: rgba(95, 122, 82, 0.28);
  color: var(--good);
}

.cw-cell.cw-letter input.cw-incorrect {
  background: rgba(168, 67, 47, 0.22);
  color: var(--bad);
}

.cw-num {
  position: absolute;
  top: 1px;
  left: 3px;
  font-size: 0.6rem;
  font-family: 'IBM Plex Mono', monospace;
  color: #7a6e58;
  pointer-events: none;
}

.crossword-clues {
  flex: 1 1 260px;
  display: flex;
  gap: 1.8rem;
  flex-wrap: wrap;
}

.cw-clue-col h4 {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.2rem;
  margin: 0 0 0.6rem;
  color: var(--tekhelet);
}

.cw-clue-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.75;
}

.cw-len {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  color: #8a7d63;
}

.crossword-actions {
  margin-top: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.crossword-status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.98rem;
  color: #5b5142;
}
