:root {
  color-scheme: light;
  --fondo: #f3f0e7;
  --papel: #fffdf7;
  --tinta: #243127;
  --suave: #657067;
  --verde: #2f6649;
  --verde-claro: #dcebdd;
  --linea: #c8d6c7;
  --oro: #b37a32;
  --sombra: 0 18px 50px rgba(41, 54, 43, .09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 5%, rgba(179, 122, 50, .12), transparent 25rem),
    linear-gradient(180deg, #eef3e9 0, var(--fondo) 25rem);
  color: var(--tinta);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.encabezado,
main,
footer {
  width: min(920px, calc(100% - 32px));
  margin-inline: auto;
}

.encabezado {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  padding: 56px 0 32px;
}

.marca {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50% 50% 46% 54% / 60% 45% 55% 40%;
  background: var(--verde);
  color: white;
  box-shadow: 0 12px 30px rgba(47, 102, 73, .23);
  font-family: Georgia, serif;
  font-size: 38px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.035em;
}

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 500;
}

.etiqueta {
  margin-bottom: 6px;
  color: var(--verde);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.introduccion {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--suave);
  font-size: 1.03rem;
  line-height: 1.6;
}

.menu-boton {
  position: fixed;
  z-index: 10;
  top: 8px;
  left: 8px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 10px 9px;
  border: 1px solid rgba(47, 102, 73, .22);
  border-radius: 10px;
  background: var(--papel);
  box-shadow: 0 5px 16px rgba(41, 54, 43, .08);
  cursor: pointer;
}

.menu-boton span {
  display: block;
  width: 100%;
  height: 2px;
  margin: auto;
  border-radius: 999px;
  background: var(--verde);
}

.menu-boton:hover,
.menu-boton:focus-visible {
  border-color: var(--verde);
  background: var(--verde-claro);
  outline: none;
}

.regla {
  display: grid;
  gap: 5px;
  margin: 0 0 24px;
  padding: 20px 24px;
  border: 1px solid #dfc8a8;
  border-left: 5px solid var(--oro);
  border-radius: 12px;
  background: rgba(255, 250, 239, .88);
  color: #554530;
  line-height: 1.55;
}

.invitacion {
  margin: 0;
  color: var(--suave);
  text-align: center;
}

.velo {
  position: fixed;
  z-index: 20;
  inset: 0;
  border: 0;
  background: rgba(23, 32, 25, .42);
  backdrop-filter: blur(3px);
}

.velo[hidden] {
  display: none;
}

.menu-lateral {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(370px, 90vw);
  overflow-y: auto;
  border-right: 1px solid rgba(47, 102, 73, .18);
  background: var(--papel);
  box-shadow: 24px 0 60px rgba(23, 32, 25, .18);
  transform: translateX(-105%);
  transition: transform .22s ease;
}

body.menu-abierto {
  overflow: hidden;
}

body.menu-abierto .menu-lateral {
  transform: translateX(0);
}

.menu-cabecera {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border-bottom: 1px solid #e4e9df;
  background: rgba(255, 253, 247, .96);
  backdrop-filter: blur(10px);
}

.menu-cabecera h2 {
  font-size: 1.15rem;
}

.menu-cabecera .etiqueta {
  margin-bottom: 2px;
  font-size: .58rem;
}

.cerrar-menu {
  display: grid;
  width: 31px;
  height: 31px;
  padding: 0;
  place-items: center;
  border: 1px solid #ccd6c9;
  border-radius: 50%;
  background: white;
  color: var(--verde);
  cursor: pointer;
  font: 300 1.35rem/1 Georgia, serif;
}

.cerrar-menu:hover,
.cerrar-menu:focus-visible {
  border-color: var(--verde);
  background: var(--verde-claro);
  outline: none;
}

.panel {
  background: var(--papel);
}

.barra {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #e4e9df;
}

.barra h2 {
  font-size: 1.05rem;
}

.barra .etiqueta {
  margin-bottom: 2px;
  font-size: .56rem;
}

.busqueda input {
  width: 145px;
  padding: 7px 9px;
  border: 1px solid #ccd6c9;
  border-radius: 999px;
  outline: none;
  background: white;
  color: var(--tinta);
  font-size: .78rem;
}

.busqueda input:focus {
  border-color: var(--verde);
  box-shadow: 0 0 0 3px rgba(47, 102, 73, .13);
}

.arbol {
  padding: 7px 9px 14px;
}

.estado {
  padding: 16px 12px;
  color: var(--suave);
  font-size: .8rem;
}

.estado[hidden] {
  display: none;
}

.nodo {
  position: relative;
  margin: 2px 0 2px 5px;
  padding-left: 10px;
  border-left: 1px solid var(--linea);
}

.nodo::before {
  position: absolute;
  top: 14px;
  left: -1px;
  width: 10px;
  border-top: 1px solid var(--linea);
  content: "";
}

.nodo > summary {
  width: fit-content;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--verde);
  cursor: pointer;
  font-size: .84rem;
  font-weight: 750;
  list-style: none;
}

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

.nodo > summary::before {
  display: inline-block;
  width: 1.3em;
  color: var(--oro);
  content: "▸";
  transition: transform .16s ease;
}

.nodo[open] > summary::before {
  transform: rotate(90deg);
}

.nodo > summary:hover {
  background: var(--verde-claro);
}

.contenido {
  max-width: 720px;
  padding: 0 6px 5px 20px;
  color: #465248;
  font-size: .76rem;
  line-height: 1.35;
}

.contenido p,
.contenido ul {
  margin: 3px 0;
}

.contenido li {
  margin: 2px 0;
}

.contenido strong {
  color: var(--tinta);
}

.contenido a {
  color: var(--verde);
  font-weight: 750;
  text-underline-offset: 3px;
}

.contenido a:hover {
  color: #214a35;
}

.sin-resultados {
  padding: 14px 6px;
  color: var(--suave);
  font-size: .78rem;
}

footer {
  padding: 24px 0 42px;
  color: var(--suave);
  text-align: center;
  font-size: .88rem;
}

code {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(47, 102, 73, .09);
}

.solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 620px) {
  .encabezado {
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    padding-top: 52px;
  }

  .marca {
    width: 50px;
    height: 50px;
    font-size: 27px;
  }

  h1 {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .introduccion {
    grid-column: 1 / -1;
  }

  .barra {
    align-items: center;
    flex-direction: row;
  }

  .busqueda input {
    width: 132px;
  }

  .arbol {
    padding-inline: 8px;
  }

  .nodo {
    margin-left: 4px;
    padding-left: 9px;
  }

  .contenido {
    padding-left: 19px;
  }
}
