html { font-size: 105%; }
:root {
  color-scheme: light;
  --fondo: #f7f8fa;
  --superficie: #fff;
  --texto: #202630;
  --secundario: #505b68;
  --borde: #c3cbd3;
  --resalte: #e9eef4;
  --foco: #235d8c;
  --cabecera: 3.5rem;
  --t-h1: clamp(1.75rem, 1.15rem + 2.3vw, 2.625rem);
  --t-h2: clamp(1.4rem, 1rem + 1.4vw, 2rem);
  --t-h3: 1.125rem;
  --t-base: 1rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema]) {
    color-scheme: dark;
    --fondo: #15191f;
    --superficie: #20262e;
    --texto: #ecf1f7;
    --secundario: #b6c1cd;
    --borde: #596674;
    --resalte: #303c4b;
    --foco: #a4d5ff;
  }
}

:root[data-tema="oscuro"] {
  color-scheme: dark;
  --fondo: #15191f;
  --superficie: #20262e;
  --texto: #ecf1f7;
  --secundario: #b6c1cd;
  --borde: #596674;
  --resalte: #303c4b;
  --foco: #a4d5ff;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--cabecera) + .75rem); hyphens: none; }
body { margin: 0; background: var(--fondo); color: var(--texto); font: var(--t-base)/1.55 system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--foco); outline-offset: 3px; }
button, input { font: inherit; color: inherit; }
button, .arriba {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: .35rem .7rem;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: .5rem;
  text-align: center;
  cursor: pointer;
}
button:hover, summary:hover, nav a:hover, .arriba:hover { background: var(--resalte); }
.saltar { position: fixed; top: .25rem; left: .75rem; z-index: 3; padding: .75rem; background: var(--superficie); transform: translateY(-150%); }
.saltar:focus { transform: none; }
.cabecera { position: sticky; top: 0; z-index: 2; background: var(--superficie); border-bottom: 1px solid var(--borde); }
.barra { display: flex; align-items: center; gap: .5rem; min-height: var(--cabecera); max-width: 74rem; margin-inline: auto; padding: .25rem 1rem; }
.marca { display: inline-flex; align-items: center; min-height: 44px; margin-right: auto; line-height: 1.15; }
#tema { gap: .4rem; }
.marco { display: grid; grid-template-columns: 15rem minmax(0, 1fr); align-items: start; gap: 2rem; max-width: 74rem; margin-inline: auto; padding: 1.5rem 1rem; }
nav { position: sticky; top: calc(var(--cabecera) + 1rem); max-height: calc(100dvh - var(--cabecera) - 2rem); overflow: auto; padding: .65rem; background: var(--superficie); border: 1px solid var(--borde); border-radius: .75rem; }
.indice-cabecera { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .2rem .5rem; }
.indice-cabecera p { margin: 0; color: var(--secundario); }
nav ul { margin: .25rem 0; padding: 0; list-style: none; }
nav a { display: flex; align-items: center; min-height: 44px; padding: .3rem .5rem; border-radius: .4rem; line-height: 1.25; }
nav .markdown { border-top: 1px solid var(--borde); border-radius: 0; color: var(--secundario); }
main { min-width: 0; max-width: 52rem; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 400; }
h1 { font-size: var(--t-h1); text-wrap: balance; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
.introduccion { margin: .5rem 0 1rem; color: var(--secundario); }
.busqueda { margin-bottom: 1rem; }
.busqueda label { display: block; margin-bottom: .25rem; }
input { width: 100%; min-height: 44px; padding: .5rem .75rem; border-radius: .5rem; border: 1px solid var(--borde); background: var(--superficie); }
#resultados { margin: .25rem 0 0; color: var(--secundario); }
#resultados:empty, .estado-copia:empty { display: none; }
section + section { margin-top: 1.25rem; }
.titulo-seccion { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .75rem; margin-bottom: .45rem; }
details { background: var(--superficie); border: 1px solid var(--borde); border-radius: .6rem; }
details + details { margin-top: .35rem; }
summary { display: flex; align-items: center; justify-content: space-between; gap: .65rem; min-height: 44px; padding: .5rem .75rem; border-radius: .55rem; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: 0 0 .55rem; height: .55rem; border: solid var(--secundario); border-width: 0 2px 2px 0; transform: rotate(45deg); margin-right: .25rem; }
details[open] > summary::after { transform: rotate(225deg); }
.pasos { padding: .25rem .75rem .65rem; }
.pasos ol { margin: .25rem 0 .6rem; padding-left: 1.45rem; }
.pasos li + li { margin-top: .35rem; }
.pasos p { margin: .25rem 0 .6rem; }
.copiar { font-size: 15px; color: var(--secundario); }
footer { margin-top: 1.25rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; color: var(--secundario); }
footer p { margin: 0; }
dialog { width: min(30rem, calc(100% - 2rem)); padding: .75rem; color: var(--texto); background: var(--superficie); border: 1px solid var(--borde); border-radius: .75rem; }
dialog::backdrop { background: rgb(0 0 0 / 55%); }
dialog form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .5rem; }
dialog input { grid-column: 1 / -1; }
.estado-copia { position: fixed; bottom: 1rem; right: 1rem; z-index: 2; max-width: calc(100% - 2rem); padding: .6rem .8rem; border: 1px solid var(--borde); border-radius: .5rem; background: var(--superficie); }

@media (max-width: 49rem) {
  .marco { display: block; padding-block: 1rem; }
  nav { position: static; max-height: none; margin-bottom: 1rem; }
  :root[data-interactivo] nav {
    position: fixed;
    inset: calc(var(--cabecera) + .5rem) 1rem auto;
    z-index: 2;
    max-height: calc(100dvh - var(--cabecera) - 1rem);
    box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / 25%);
  }
  :root[data-interactivo] nav:not([data-abierto]) { display: none; }
  #cerrar-indice:not([hidden]) { display: inline-flex; }
}

@media (min-width: 49.001rem) {
  #abrir-indice, #cerrar-indice { display: none; }
}
