* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, Helvetica, sans-serif; font-size: 11pt; color: #e8eaed; background: #1a1d23; min-height: 100vh; }
header {
  background: #0d1117; color: #e8eaed;
  padding: 14px 24px; display: flex; align-items: center; gap: 16px;
  border-bottom: 1px solid #30363d;
}
header a { color: #58a6ff; font-size: 9.5pt; text-decoration: none; white-space: nowrap; }
header a:hover { color: #e8eaed; text-decoration: underline; }
header h1 { font-size: 13pt; font-weight: bold; line-height: 1.3; flex: 1; }
header .bloque-badge {
  background: #1f6feb; color: #fff; font-size: 9pt;
  padding: 3px 10px; border-radius: 12px; white-space: nowrap;
}
main { max-width: 680px; margin: 28px auto; padding: 0 16px; }
.nav-temas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.nav-temas a {
  font-size: 9pt; padding: 4px 10px; border-radius: 14px;
  background: #21262d; color: #58a6ff; text-decoration: none; border: 1px solid #30363d;
}
.nav-temas a:hover, .nav-temas a.activo { background: #1f6feb; color: #fff; border-color: #1f6feb; }
.card {
  background: #161b22; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,.4);
  overflow: hidden; border: 1px solid #30363d;
}
.card-header {
  background: #0d1117; padding: 16px 20px; border-bottom: 1px solid #30363d;
}
.card-header h2 { font-size: 12pt; color: #58a6ff; margin-bottom: 4px; line-height: 1.4; }
.card-header p { font-size: 9pt; color: #8b949e; }
ul.epigrafes { list-style: none; padding: 0; }
ul.epigrafes li { border-bottom: 1px solid #21262d; }
ul.epigrafes li:last-child { border-bottom: none; }
ul.epigrafes li a {
  display: block; padding: 10px 20px;
  font-size: 10pt; color: #c9d1d9; text-decoration: none; line-height: 1.35;
}
ul.epigrafes li a:hover { background: #21262d; color: #f85149; padding-left: 28px; transition: padding .12s; }
.footer-btns { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 9px 18px; border-radius: 6px;
  font-size: 10pt; text-decoration: none; cursor: pointer; border: none; font-family: inherit;
}
.btn-primary { background: #1f6feb; color: #fff; }
.btn-primary:hover { background: #388bfd; }
.btn-secondary { background: #21262d; color: #58a6ff; border: 1px solid #30363d; }
.btn-secondary:hover { background: #30363d; }
#no-tema { text-align: center; padding: 60px 20px; color: #8b949e; }

/* Secciones principales desplegables */
ul.epigrafes li.seccion-principal { border-bottom: 1px solid #30363d; }
ul.epigrafes li.seccion-principal details summary {
  display: block; padding: 10px 20px;
  font-size: 10pt; font-weight: bold; color: #58a6ff;
  cursor: pointer; line-height: 1.35;
  background: #0d1117; user-select: none;
}
ul.epigrafes li.seccion-principal details summary::-webkit-details-marker { display: none; }
ul.epigrafes li.seccion-principal details summary::before {
  content: '▶\00a0'; font-size: 8pt; color: #388bfd;
}
ul.epigrafes li.seccion-principal details[open] summary::before { content: '▼\00a0'; }
ul.epigrafes li.seccion-principal details summary:hover { background: #21262d; color: #f85149; }
ul.epigrafes li.seccion-principal details ul { list-style: none; padding: 0; }
ul.epigrafes li.seccion-principal details ul li { border-bottom: 1px solid #21262d; }
ul.epigrafes li.seccion-principal details ul li:last-child { border-bottom: none; }
ul.epigrafes li.seccion-principal details ul li a {
  display: block; padding: 8px 20px 8px 36px;
  font-size: 9.5pt; color: #8b949e; text-decoration: none; line-height: 1.35;
}
ul.epigrafes li.seccion-principal details ul li a:hover { background: #21262d; color: #f85149; }
