/* Playbook Ilhas · estilo. Identidad: Space Grotesk + Inter, #7A3CFF sobre #F8FAFF. */
:root {
  --primary: #7A3CFF;
  --primary-dark: #622ECC;
  --primary-soft: #F1EBFF;
  --primary-line: #D9CCFF;
  --dark: #0E0E0F;
  --text: #3C3C44;
  --muted: #6B6B75;
  --light: #F8FAFF;
  --gray: #E8ECF2;
  --white: #FFFFFF;
  --grad: linear-gradient(to right, #55E8FF 0%, #7A3CFF 50%, #A14BFF 100%);
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 14px;
  --nav-w: 272px;
  --medida: 740px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--light); color: var(--text);
  font-family: var(--body); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--display); color: var(--dark); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); letter-spacing: -0.02em; margin: 0.25rem 0 1rem; }
h2 { font-size: 1.35rem; margin: 0 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; }
p { margin: 0 0 1rem; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; background: var(--primary-soft); color: var(--primary-dark); padding: 0.1em 0.4em; border-radius: 6px; }
strong { color: var(--dark); font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--gray); margin: 2rem 0; }
blockquote { margin: 0 0 1rem; padding: 0.25rem 0 0.25rem 1rem; border-left: 3px solid var(--primary-line); color: var(--muted); }
svg { width: 1.1em; height: 1.1em; flex: none; }
.salto { position: absolute; left: -999px; }
.salto:focus { left: 1rem; top: 1rem; background: var(--white); padding: 0.5rem 1rem; z-index: 50; }
@media (min-width: 1024px) { .solo-movil { display: none !important; } }
#abrir-menu span { display: inline-flex; }
#abrir-menu .ico-x { display: none; }
body.menu-abierto #abrir-menu .ico-menu { display: none; }
body.menu-abierto #abrir-menu .ico-x { display: inline-flex; }

/* barra superior */
.barra {
  position: sticky; top: 0; z-index: 30; height: 60px;
  display: flex; align-items: center; gap: 1rem; padding: 0 1.25rem;
  background: rgba(248, 250, 255, 0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray);
}
.marca { display: flex; align-items: center; gap: 0.75rem; color: var(--dark); }
.marca:hover { text-decoration: none; }
.marca img { display: block; height: 28px; width: auto; }
.marca-sep { width: 1px; height: 22px; background: var(--gray); }
.marca-txt { font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.buscar-btn {
  margin-left: auto; display: flex; align-items: center; gap: 0.5rem;
  background: var(--white); border: 1px solid var(--gray); border-radius: 999px; padding: 0.45rem 0.6rem 0.45rem 0.9rem;
  color: var(--muted); font: inherit; font-size: 0.92rem; cursor: pointer; min-width: 220px;
}
.buscar-btn:hover { border-color: var(--primary-line); color: var(--text); }
.buscar-btn span { flex: 1; text-align: left; }
kbd { font-family: var(--body); font-size: 0.72rem; color: var(--muted); background: var(--light); border: 1px solid var(--gray); border-radius: 6px; padding: 0.1rem 0.4rem; }
.btn-icono { background: none; border: 0; padding: 0.4rem; color: var(--text); cursor: pointer; border-radius: 8px; display: inline-flex; }
.btn-icono:hover { background: var(--gray); }
.btn-icono svg { width: 22px; height: 22px; }

/* marco: índice + contenido */
.marco { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: calc(100vh - 60px); }
@media (min-width: 1024px) {
  html.nav-cerrada .marco { grid-template-columns: minmax(0, 1fr); }
  html.nav-cerrada .nav, html.nav-cerrada .nav-fondo { display: none; }
  html.nav-cerrada .contenido { margin: 0 auto; }
  html.nav-cerrada .mini { left: calc(50% + var(--medida) / 2 + 4rem); }
  #abrir-menu { color: var(--muted); }
  #abrir-menu:hover { color: var(--dark); }
}
.nav {
  position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto;
  padding: 1.5rem 1rem 2rem 1.25rem; border-right: 1px solid var(--gray); font-size: 0.9rem;
  scrollbar-width: thin;
}
.nav ul { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.nav li a { display: flex; gap: 0.5rem; align-items: baseline; padding: 0.4rem 0.6rem; border-radius: 8px; color: var(--text); }
.nav li a:hover { background: var(--white); text-decoration: none; color: var(--dark); }
.nav li.activo > a { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.nav-tit { font-family: var(--display); font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dark); font-weight: 600; margin: 1.5rem 0 0.5rem 0.6rem; padding-bottom: 0.35rem; border-bottom: 1px solid var(--gray); }
.nav-tit:first-of-type { margin-top: 0; }
.nav-num { font-family: var(--display); font-weight: 600; color: var(--primary); min-width: 1.5em; font-variant-numeric: tabular-nums; }
.nav-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-parte { margin-bottom: 0.15rem; }
.nav-parte summary { display: flex; gap: 0.5rem; align-items: center; padding: 0.5rem 0.6rem; border-radius: 8px; cursor: pointer; list-style: none; color: var(--dark); font-weight: 600; background: var(--white); border: 1px solid var(--gray); }
.nav-parte summary::-webkit-details-marker { display: none; }
.nav-parte summary:hover { border-color: var(--primary-line); }
.nav-parte[open] summary { color: var(--primary-dark); border-color: var(--primary-line); background: var(--primary-soft); }
.nav-parte-tit { flex: 1; line-height: 1.25; }
.nav-rango { font-size: 0.74rem; color: var(--muted); font-weight: 500; }
.nav-flecha { width: 0.5em; height: 0.5em; border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg); margin: 0 0.2em 0 0.2em; transition: transform 0.15s; flex: none; }
.nav-parte[open] .nav-flecha { transform: rotate(45deg); margin-top: -0.25em; }
.nav-parte ul { margin: 0.3rem 0 0.6rem 0.6rem; border-left: 2px solid var(--primary-line); padding-left: 0.3rem; }
.nav-parte li a { padding: 0.35rem 0.5rem; font-size: 0.88rem; }
.nav-pie { font-size: 0.74rem; color: var(--muted); margin: 1.5rem 0 0 0.6rem; }
.nav-cab { display: flex; align-items: center; gap: 0.75rem; font-weight: 600; margin-bottom: 0.5rem; }
.nav-cab span { flex: 1; font-family: var(--display); }
.nav-cab img { height: 24px; width: auto; }
.nav-fondo { display: none; }

.contenido { padding: 2.5rem 3rem 5rem; max-width: calc(var(--medida) + 6rem); width: 100%; }
.kicker { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); margin: 0 0 0.5rem; }
.migas { display: flex; gap: 0.5rem; font-size: 0.85rem; color: var(--muted); margin-bottom: 1.25rem; flex-wrap: wrap; }
.migas a { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--text); margin-bottom: 1.5rem; }
.lead-sm { color: var(--muted); max-width: 60ch; margin-bottom: 1.5rem; }
section { margin: 0 0 2rem; }
.texto h2 { margin-top: 0.5rem; }
.texto ul, .texto ol { padding-left: 1.4rem; margin: 0 0 1rem; }
.texto li { margin-bottom: 0.4rem; }

/* tablas */
.tabla { overflow-x: auto; margin: 0 0 1.25rem; border: 1px solid var(--gray); border-radius: 12px; background: var(--white); }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th, td { padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--gray); text-align: left; vertical-align: top; }
th { font-weight: 600; color: var(--dark); background: var(--light); font-size: 0.82rem; letter-spacing: 0.02em; }
tr:last-child td { border-bottom: 0; }
.al-right { text-align: right; font-variant-numeric: tabular-nums; }
.al-center { text-align: center; }

/* chips y referencias */
.chip { display: inline-flex; align-items: center; justify-content: center; min-width: 2em; height: 2em; padding: 0 0.6em; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-family: var(--display); font-weight: 600; font-size: 0.85rem; }
.chip:hover { background: var(--primary); color: var(--white); text-decoration: none; }
.chip-txt { font-family: var(--body); font-weight: 500; }
.ref { font-weight: 600; }
.cita { display: inline-block; vertical-align: super; font-size: 0.68em; line-height: 1; padding: 0.15em 0.45em; margin-left: 0.15em; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; cursor: help; }
.cita:hover { background: var(--primary); color: var(--white); text-decoration: none; }
.cita-pop { position: absolute; z-index: 40; max-width: 360px; background: var(--dark); color: #EDEDF2; padding: 0.8rem 1rem; border-radius: 12px; font-size: 0.85rem; line-height: 1.5; box-shadow: 0 12px 30px rgba(14, 14, 15, 0.25); }
.cita-pop a { color: #C9B3FF; word-break: break-all; }
.cita-pop .cita-pop-n { color: #A98BFF; font-weight: 600; margin-right: 0.4rem; }

/* jugada */
.jugada-titulo { max-width: 16ch; }
.pregunta { background: var(--primary); color: var(--white); border-radius: var(--r); padding: 1.25rem 1.5rem; margin: 0 0 2rem; box-shadow: 0 14px 30px rgba(122, 60, 255, 0.22); }
.pregunta-tag { display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; margin-bottom: 0.35rem; }
.pregunta p { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.35rem; line-height: 1.3; }
.pregunta a { color: var(--white); text-decoration: underline; }
.dos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1rem; }
.tarjeta { background: var(--white); border: 1px solid var(--gray); border-radius: var(--r); padding: 1.25rem 1.4rem; }
.tarjeta h2 { font-size: 1.05rem; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.tarjeta h2 svg { color: var(--primary); }
.tarjeta p:last-child { margin-bottom: 0; }
.tarjeta-numeros { font-size: 0.97rem; }
.pasos { list-style: none; padding: 0; margin: 0; counter-reset: paso; }
.pasos:not(:last-child) { margin-bottom: 1rem; }
.pasos li { position: relative; padding-left: 2.4rem; margin-bottom: 0.75rem; counter-increment: paso; }
.pasos li:last-child { margin-bottom: 0; }
.pasos li::before { content: counter(paso); position: absolute; left: 0; top: 0.05rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--primary); color: var(--white); font-family: var(--display); font-weight: 600; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; }
.lista-num { padding-left: 1.4rem; }
.lista-num li, .texto ul li { margin-bottom: 0.4rem; }
.decide-intro { color: var(--muted); margin-bottom: 0.75rem; }
.rama-ve { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.rama-ve span:first-child { color: var(--muted); font-size: 0.9rem; margin-right: 0.2rem; }
.ramas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem; }
.rama { background: var(--white); border: 1px solid var(--gray); border-radius: var(--r); padding: 1rem 1.2rem; }
.rama p { margin: 0; }
.rama-si { font-family: var(--display); font-weight: 600; color: var(--dark); font-size: 1.02rem; margin-bottom: 0.35rem !important; }
.rama-que { font-size: 0.95rem; }
.rama .ref { display: inline-flex; align-items: center; justify-content: center; min-width: 1.8em; height: 1.8em; padding: 0 0.5em; border-radius: 999px; background: var(--primary-soft); font-family: var(--display); font-size: 0.85rem; margin: 0 0.1em; }
.rama .ref:hover { background: var(--primary); color: var(--white); text-decoration: none; }
.espiga { background: var(--dark); color: #D9D9E0; border-radius: var(--r); padding: 1.5rem 1.75rem; }
.espiga h2 { color: var(--white); display: flex; align-items: center; gap: 0.6rem; font-size: 1.15rem; }
.espiga h2 .punto { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); display: inline-block; }
.espiga h2:not(:first-child) { margin-top: 1.5rem; }
.espiga strong { color: var(--white); }
.espiga a { color: #C9B3FF; }
.espiga .cita { background: rgba(255, 255, 255, 0.12); color: #C9B3FF; }
.espiga ul, .espiga ol { padding-left: 1.3rem; }
.espiga li { margin-bottom: 0.45rem; }
.espiga p:last-child, .espiga ul:last-child { margin-bottom: 0; }
.espiga .tabla { background: transparent; border-color: rgba(255, 255, 255, 0.14); }
.espiga th { background: rgba(255, 255, 255, 0.06); color: #EDEDF2; border-color: rgba(255, 255, 255, 0.14); }
.espiga td { border-color: rgba(255, 255, 255, 0.1); }
.espiga code { background: rgba(255, 255, 255, 0.1); color: #EDEDF2; }
.papa { border-left: 3px solid var(--primary); padding: 0.25rem 0 0.25rem 1.25rem; }
.papa h2 { font-size: 1.15rem; color: var(--primary-dark); }
.papa p:last-child, .papa ul:last-child, .papa ol:last-child { margin-bottom: 0; }
.papa ul, .papa ol { padding-left: 1.3rem; }
.con-ia { background: var(--white); border: 1px solid var(--primary-line); border-radius: var(--r); padding: 1.4rem 1.5rem; }
.con-ia-cab { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.con-ia-cab h2 { display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.con-ia-cab h2 svg { color: var(--primary); }
.zona { font-size: 0.78rem; color: var(--primary-dark); background: var(--primary-soft); border-radius: 999px; padding: 0.25rem 0.7rem; font-weight: 500; }
.pestanas { margin-top: 1rem; border-top: 1px solid var(--gray); padding-top: 1rem; }
.pestanas-cab { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pestanas-cab button { font: inherit; font-size: 0.9rem; font-weight: 500; background: var(--light); border: 1px solid var(--gray); color: var(--text); border-radius: 999px; padding: 0.4rem 0.95rem; cursor: pointer; }
.pestanas-cab button[aria-selected="true"] { background: var(--dark); color: var(--white); border-color: var(--dark); }
.pestana p { font-size: 0.97rem; }
.pestana .nota { font-size: 0.85rem; color: var(--muted); margin: 0.75rem 0 0; }
.comando, .prompt { position: relative; background: var(--dark); color: #EDEDF2; border-radius: 12px; padding: 1rem 1.2rem; }
.comando { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.comando code, .prompt pre { background: none; color: inherit; font-size: 1rem; padding: 0; margin: 0; }
.prompt pre { white-space: pre-wrap; font-size: 0.88rem; line-height: 1.55; padding-right: 6rem; }
.copiar { display: inline-flex; align-items: center; gap: 0.35rem; font: inherit; font-size: 0.82rem; font-weight: 500; background: rgba(255, 255, 255, 0.1); color: var(--white); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; padding: 0.35rem 0.8rem; cursor: pointer; white-space: nowrap; }
.copiar:hover { background: var(--primary); border-color: var(--primary); }
.prompt .copiar { position: absolute; top: 0.8rem; right: 0.8rem; }
.rubrica { list-style: none; padding: 0; margin: 0; }
.rubrica li { margin-bottom: 0.5rem; }
.rubrica label { display: flex; gap: 0.7rem; align-items: flex-start; cursor: pointer; font-size: 0.97rem; }
.rubrica input { margin-top: 0.3rem; accent-color: var(--primary); width: 18px; height: 18px; flex: none; }
.rubrica input:checked + span { color: var(--muted); text-decoration: line-through; }
.ojo { background: var(--primary-soft); border-radius: var(--r); padding: 1.2rem 1.5rem; }
.ojo h2 { display: flex; align-items: center; gap: 0.5rem; font-size: 1.05rem; color: var(--primary-dark); margin-bottom: 0.4rem; }
.ojo p:last-child { margin-bottom: 0; }
details.saben, details.de-donde { border-top: 1px solid var(--gray); padding: 1rem 0; margin: 0 0 1rem; }
details summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.75rem; }
details summary::-webkit-details-marker { display: none; }
details.saben summary h2 { font-size: 1.1rem; margin: 0; }
details.saben summary h2::before, details.de-donde summary::before { content: ""; width: 0.5em; height: 0.5em; border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg); margin-right: 0.6rem; display: inline-block; transition: transform 0.15s; vertical-align: 0.15em; }
details.saben[open] summary h2::before, details.de-donde[open] summary::before { transform: rotate(45deg); }
.saben-n { font-size: 0.82rem; color: var(--muted); }
details.saben > *:not(summary) { margin-top: 0.75rem; }
details.saben ul { padding-left: 1.3rem; font-size: 0.97rem; }
details.saben li { margin-bottom: 0.6rem; }
details.de-donde summary { font-weight: 500; font-size: 0.9rem; color: var(--muted); }
details.de-donde p { font-size: 0.86rem; color: var(--muted); margin: 0.6rem 0 0; }
.ensena h2, .red h2 { font-size: 1.05rem; color: var(--muted); font-family: var(--body); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.78rem; }
.lecciones-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem; }
.leccion-chip { display: flex; flex-direction: column; gap: 0.15rem; background: var(--white); border: 1px solid var(--gray); border-radius: 12px; padding: 0.8rem 1rem; color: var(--text); font-size: 0.9rem; }
.leccion-chip:hover { border-color: var(--primary-line); text-decoration: none; }
.leccion-curso { font-size: 0.74rem; color: var(--primary); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.leccion-tit { font-weight: 500; color: var(--dark); }
.leccion-mats { font-size: 0.8rem; color: var(--muted); }
.red-lista { display: flex; flex-direction: column; gap: 0.5rem; }
.red-item { display: flex; align-items: center; gap: 0.75rem; background: var(--white); border: 1px solid var(--gray); border-radius: 12px; padding: 0.7rem 1rem; color: var(--dark); }
.red-item:hover { border-color: var(--primary-line); text-decoration: none; }
.red-item span:nth-child(2) { flex: 1; }
.red-item svg { color: var(--primary); }
.paginacion { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--gray); }
.paginacion a { display: flex; align-items: center; gap: 0.6rem; color: var(--dark); font-family: var(--display); font-weight: 600; font-size: 0.98rem; line-height: 1.25; }
.paginacion a:hover { color: var(--primary-dark); text-decoration: none; }
.paginacion a small { display: block; font-family: var(--body); font-weight: 500; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.2rem; }
.paginacion svg { width: 22px; height: 22px; color: var(--primary); }
.pag-sig { justify-content: flex-end; text-align: right; }

/* portada */
.pag-portada .contenido { max-width: 1040px; }
.hero { padding: 1.5rem 0 1rem; }
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 3.9rem); max-width: 14ch; margin-bottom: 1rem; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { max-width: 56ch; }
.hero-buscar { display: flex; align-items: center; gap: 0.75rem; width: 100%; max-width: 560px; background: var(--white); border: 1px solid var(--gray); border-radius: 999px; padding: 0.85rem 1rem 0.85rem 1.2rem; font: inherit; color: var(--muted); cursor: pointer; box-shadow: 0 10px 30px rgba(14, 14, 15, 0.06); }
.hero-buscar:hover { border-color: var(--primary-line); }
.hero-buscar span { flex: 1; text-align: left; }
.hero-buscar svg { color: var(--primary); width: 20px; height: 20px; }
.situaciones { margin-top: 2rem; }
.situ-lista { list-style: none; padding: 0; margin: 0; background: var(--white); border: 1px solid var(--gray); border-radius: var(--r); overflow: hidden; }
.situ-lista li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 1.25rem; border-bottom: 1px solid var(--gray); }
.situ-lista li:last-child { border-bottom: 0; }
.situ-lista li:hover { background: var(--light); }
.situ-txt { color: var(--dark); font-weight: 500; flex: 1; }
.situ-chips { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.partes { margin-top: 3rem; }
.partes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.parte { background: var(--white); border: 1px solid var(--gray); border-radius: var(--r); padding: 0.2rem 1.25rem; }
.parte summary { display: grid; grid-template-columns: auto 1fr; column-gap: 0.75rem; align-items: baseline; padding: 0.9rem 0; cursor: pointer; }
.parte-num { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); grid-column: 1 / -1; }
.parte-tit { font-family: var(--display); font-weight: 600; font-size: 1.08rem; color: var(--dark); grid-column: 1 / -1; }
.parte-n { font-size: 0.8rem; color: var(--muted); grid-column: 1 / -1; }
.parte ul { list-style: none; padding: 0 0 0.75rem; margin: 0; border-top: 1px solid var(--gray); }
.parte li a { display: flex; gap: 0.6rem; padding: 0.45rem 0; color: var(--text); font-size: 0.93rem; border-bottom: 1px dashed var(--gray); }
.parte li:last-child a { border-bottom: 0; }
.parte li a:hover { color: var(--primary-dark); text-decoration: none; }
.atajos { margin-top: 3rem; }
.atajos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.75rem; }
.atajo { position: relative; display: flex; flex-direction: column; gap: 0.25rem; background: var(--white); border: 1px solid var(--gray); border-radius: var(--r); padding: 1.1rem 3rem 1.1rem 1.25rem; color: var(--text); }
.atajo:hover { border-color: var(--primary-line); text-decoration: none; }
.atajo-tit { font-family: var(--display); font-weight: 600; color: var(--dark); font-size: 1.02rem; }
.atajo-des { font-size: 0.88rem; color: var(--muted); }
.atajo svg { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: var(--primary); width: 20px; height: 20px; }

/* fuentes, videos, lecciones */
.fuentes { list-style: none; padding: 0; margin: 0; }
.fuentes li { display: flex; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--gray); font-size: 0.95rem; scroll-margin-top: 80px; }
.fuentes li:target { background: var(--primary-soft); margin: 0 -1rem; padding: 0.9rem 1rem; border-radius: 10px; }
.fuente-n { font-family: var(--display); font-weight: 600; color: var(--primary); min-width: 2em; }
.fuente-txt a { word-break: break-all; }
.fuente-usos { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.5rem; }
.fuente-usos span:first-child { font-size: 0.78rem; color: var(--muted); margin-right: 0.25rem; }
.videos { display: grid; gap: 0.6rem; }
.video { display: grid; grid-template-columns: auto 1fr; column-gap: 0.9rem; background: var(--white); border: 1px solid var(--gray); border-radius: 12px; padding: 0.9rem 1.1rem; color: var(--text); }
.video:hover { border-color: var(--primary-line); text-decoration: none; }
.video-n { font-family: var(--display); font-weight: 600; color: var(--primary); grid-row: span 2; }
.video-tit { font-weight: 500; color: var(--dark); }
.video-canal { font-size: 0.84rem; color: var(--muted); }
.curso { margin-bottom: 2.5rem; scroll-margin-top: 80px; }
.lecciones { list-style: none; padding: 0; margin: 0; background: var(--white); border: 1px solid var(--gray); border-radius: var(--r); overflow: hidden; }
.lecciones li { display: flex; gap: 1rem; padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--gray); scroll-margin-top: 80px; }
.lecciones li:last-child { border-bottom: 0; }
.lecciones li:target { background: var(--primary-soft); }
.lec-cod { font-family: var(--display); font-weight: 600; color: var(--primary); min-width: 2.5em; }
.lec-cuerpo { display: flex; flex-direction: column; gap: 0.35rem; }
.lec-tit { font-weight: 500; color: var(--dark); }
.lec-jug { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); }
.lec-mats { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.mat { font-size: 0.76rem; color: var(--muted); background: var(--light); border: 1px solid var(--gray); border-radius: 6px; padding: 0.1rem 0.5rem; }

/* buscador */
.buscador { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 10vh 1rem 1rem; }
.buscador[hidden] { display: none; }
.buscador-fondo { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(14, 14, 15, 0.45); backdrop-filter: blur(2px); }
.buscador-caja { position: relative; width: 100%; max-width: 620px; background: var(--white); border-radius: 18px; box-shadow: 0 30px 80px rgba(14, 14, 15, 0.3); overflow: hidden; }
.buscador-input { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 1rem; border-bottom: 1px solid var(--gray); }
.buscador-input svg { color: var(--primary); width: 20px; height: 20px; }
.buscador-input input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 1.05rem; color: var(--dark); background: none; }
.buscador-lista { list-style: none; margin: 0; padding: 0.5rem; max-height: 60vh; overflow-y: auto; }
.buscador-lista li a { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.6rem 0.8rem; border-radius: 10px; color: var(--dark); }
.buscador-lista li a:hover, .buscador-lista li.sel a { background: var(--primary-soft); text-decoration: none; }
.buscador-lista .b-t { font-weight: 500; }
.buscador-lista .b-s { font-size: 0.83rem; color: var(--muted); }
.buscador-vacio { padding: 1.5rem 1rem; color: var(--muted); text-align: center; }
mark { background: var(--primary-soft); color: var(--primary-dark); border-radius: 3px; }

/* visual de La Espiga (jugada 10) */
.espiga-visual { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr); gap: 1.75rem; margin: 0.25rem 0 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.ev-frase { font-family: var(--display); font-weight: 600; color: var(--white); font-size: 1.15rem; line-height: 1.3; margin-bottom: 0.25rem; }
.ev-quien { font-size: 0.85rem; color: #9A9AA6; margin-bottom: 1rem; }
.ev-stats { display: flex; gap: 1.5rem; }
.ev-stat small { display: block; font-size: 0.8rem; color: #9A9AA6; }
.ev-stat b { font-family: var(--display); font-size: 1.75rem; font-weight: 600; color: var(--white); line-height: 1.1; white-space: nowrap; }
.ev-stat b.baja { color: #C9B3FF; }
.ev-col h4 { color: #EDEDF2; font-size: 0.9rem; margin-bottom: 0.6rem; font-family: var(--body); font-weight: 600; }
.ev-col h4 span { color: #9A9AA6; font-weight: 400; }
.ev-barra { margin-bottom: 0.6rem; }
.ev-barra > div:first-child { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.86rem; color: #EDEDF2; margin-bottom: 0.25rem; }
.ev-barra b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-pista { height: 7px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; overflow: hidden; }
.ev-pista i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.ev-pista i.gris { background: #B8B8C4; }
.ev-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

/* jugada: kicker, los números, mini índice, ramas que responden */
.kicker-parte { color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.numeros { display: flex; gap: 0.75rem; align-items: flex-start; background: var(--white); border: 1px solid var(--gray); border-radius: 12px; padding: 0.9rem 1.1rem; margin: 0 0 1.25rem; font-size: 0.97rem; }
.numeros > svg { color: var(--primary); width: 20px; height: 20px; margin-top: 0.2rem; }
.numeros strong { color: var(--dark); margin-right: 0.35rem; }
.numeros strong::after { content: ":"; }
.numeros p { margin: 0; display: inline; }
.numeros p + p { display: block; margin-top: 0.4rem; }
.numeros ul, .numeros ol { margin: 0.25rem 0 0; padding-left: 1.2rem; }
.como { background: var(--white); border: 1px solid var(--gray); border-radius: var(--r); padding: 1.25rem 1.4rem; }
.contenido section > h2, .con-ia-cab h2, .espiga h2, .ojo h2, .como h2, .decide h2, .papa h2 { font-size: 1.2rem; }
.ensena h2, .red h2 { font-family: var(--display); font-size: 1rem; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 600; }
details.revisas { margin-top: 1rem; border-top: 1px solid var(--gray); padding-top: 0.9rem; }
details.revisas summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.75rem; }
details.revisas summary::-webkit-details-marker { display: none; }
details.revisas summary h3 { margin: 0; font-size: 1rem; }
details.revisas summary h3::before { content: ""; width: 0.5em; height: 0.5em; border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg); margin-right: 0.6rem; display: inline-block; transition: transform 0.15s; vertical-align: 0.15em; }
details.revisas[open] summary h3::before { transform: rotate(45deg); }
details.revisas .rubrica { margin-top: 0.75rem; }
.con-ia .comando { margin: 0.5rem 0 0.9rem; }
.con-ia .nota { font-size: 0.88rem; color: var(--muted); margin: 0.6rem 0 0; }
.sin-comando { font-size: 0.95rem; margin: 0.9rem 0 0; padding: 0.8rem 1rem; border: 1px dashed var(--primary-line); border-radius: 10px; }
.sin-comando strong { color: var(--primary-dark); }
.comandos { list-style: none; padding: 0; margin: 0; }
.comandos li { padding: 0.9rem 0; border-bottom: 1px solid var(--gray); }
.comandos li:last-child { border-bottom: 0; }
.cmd-jug { display: flex; gap: 0.6rem; align-items: baseline; color: var(--dark); font-weight: 500; margin-bottom: 0.5rem; }
.comando-sm { padding: 0.6rem 0.9rem; }
.comando-sm code { font-size: 0.95rem; }
.cmd-entrada { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 0.4rem; }
.como p:last-child, .como ol:last-child { margin-bottom: 0; }
.mini { display: none; }
@media (min-width: 1340px) {
  .mini { display: flex; flex-direction: column; gap: 0.1rem; position: fixed; left: calc(var(--nav-w) + var(--medida) + 7rem); top: 112px; width: 170px; font-size: 0.84rem; }
  .mini p { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; margin: 0 0 0.4rem; }
  .mini a { color: var(--muted); padding: 0.25rem 0 0.25rem 0.75rem; border-left: 2px solid var(--gray); }
  .mini a:hover { color: var(--primary-dark); border-color: var(--primary); text-decoration: none; }
}
.decide-ayuda { font-size: 0.85rem; color: var(--muted); margin: -0.4rem 0 0.75rem; }
.rama[data-rama] { cursor: pointer; position: relative; transition: border-color 0.15s, box-shadow 0.15s, opacity 0.15s; }
.rama[data-rama]:hover { border-color: var(--primary-line); }
.rama[data-rama]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.rama-marca { display: none; position: absolute; top: -0.7rem; right: 0.8rem; align-items: center; gap: 0.25rem; font-size: 0.72rem; font-weight: 600; color: var(--white); background: var(--primary); border-radius: 999px; padding: 0.15rem 0.55rem; }
.rama-marca svg { width: 12px; height: 12px; }
.rama.elegida { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.rama.elegida .rama-marca { display: inline-flex; }
.rama.apagada { opacity: 0.5; }
.guardia { display: flex; gap: 0.6rem; align-items: flex-start; background: var(--primary-soft); border-radius: 10px; padding: 0.7rem 0.9rem; font-size: 0.9rem !important; color: var(--primary-dark); }
.guardia svg { flex: none; width: 18px; height: 18px; margin-top: 0.15rem; }
.ensena-lista { font-size: 0.95rem; }
.ensena-lista a { font-weight: 500; }

/* portada: familias y tu ruta */
.familias { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.familia { background: var(--white); border: 1px solid var(--gray); border-radius: var(--r); padding: 1rem 1.25rem; }
.familia h3 { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); margin: 0 0 0.35rem; font-family: var(--body); font-weight: 600; }
.familia .situ-lista { border: 0; border-radius: 0; background: none; }
.familia .situ-lista li { padding: 0.55rem 0; flex-direction: column; align-items: flex-start; gap: 0.3rem; }
.familia .situ-lista li:hover { background: none; }
.familia .situ-txt { font-size: 0.95rem; }
.familia .situ-chips { justify-content: flex-start; }
.situ-mas summary { font-size: 0.82rem; color: var(--primary-dark); cursor: pointer; padding: 0.5rem 0 0.2rem; list-style: none; font-weight: 500; }
.situ-mas summary::-webkit-details-marker { display: none; }
.situ-mas[open] summary { display: none; }
.situ-mas .situ-lista { border-top: 1px solid var(--gray); }
.ruta { background: var(--dark); color: #D9D9E0; border-radius: var(--r); padding: 1.25rem 1.5rem; margin: 1.5rem 0 0; }
.ruta h2 { color: var(--white); margin: 0; }
.ruta .lead-sm { color: #9A9AA6; margin-bottom: 0.5rem; }
.ruta-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.25rem; }
.ruta-borrar { font: inherit; font-size: 0.8rem; background: none; color: #9A9AA6; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; padding: 0.25rem 0.7rem; cursor: pointer; }
.ruta-borrar:hover { color: var(--white); border-color: var(--white); }
.ruta-lista { list-style: none; margin: 0; padding: 0; }
.ruta-lista li { display: grid; gap: 0.2rem; padding: 0.7rem 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.ruta-jug { color: var(--white); font-weight: 500; display: flex; gap: 0.5rem; }
.ruta-rama { font-size: 0.9rem; color: #C9B3FF; }
.ruta-sig { font-size: 0.85rem; color: #9A9AA6; display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.ruta .chip { background: rgba(255, 255, 255, 0.12); color: var(--white); }

/* biblioteca de prompts */
.lec { background: var(--white); border: 1px solid var(--gray); border-radius: 12px; margin-bottom: 0.6rem; scroll-margin-top: 80px; }
.lec summary { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.85rem 1.1rem; cursor: pointer; list-style: none; }
.lec summary::-webkit-details-marker { display: none; }
.lec summary .lec-tit { flex: 1; }
.lec-n { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.lec[open] { border-color: var(--primary-line); }
.lec[open] summary { border-bottom: 1px solid var(--gray); }
.lec:target { box-shadow: 0 0 0 3px var(--primary-soft); }
.lec-intro { padding: 0.9rem 1.1rem 0; font-size: 0.93rem; color: var(--muted); }
.lec-intro p:last-child { margin-bottom: 0; }
.prompt-item { padding: 1rem 1.1rem 1.1rem; border-top: 1px dashed var(--gray); }
.prompt-item:first-of-type { border-top: 0; }
.prompt-item h3 { margin: 0 0 0.35rem; font-size: 1.02rem; }
.prompt-para { font-size: 0.93rem; margin-bottom: 0.3rem; }
.prompt-donde { display: inline-block; font-size: 0.78rem; color: var(--primary-dark); background: var(--primary-soft); border-radius: 999px; padding: 0.15rem 0.6rem; margin-bottom: 0.7rem; }
.prompt-notas { font-size: 0.9rem; color: var(--muted); margin-top: 0.6rem; }
.prompt-notas p:last-child { margin: 0; }
.prompt-origen { font-size: 0.8rem; color: var(--muted); margin: 0.5rem 0 0; }
.lec-prompts { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; font-weight: 500; }
.lec-prompts svg { width: 14px; height: 14px; }

/* pregúntale al Playbook */
.ia-card { margin: 0.5rem 0.5rem 0; background: var(--dark); color: #D9D9E0; border-radius: 12px; padding: 0.9rem 1rem; font-size: 0.92rem; }
.ia-card[hidden] { display: none; }
.ia-cab { display: flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #A98BFF; font-weight: 600; margin-bottom: 0.4rem; }
.ia-cab svg { width: 14px; height: 14px; }
.ia-situ { color: var(--white); font-weight: 500; margin: 0 0 0.3rem; }
.ia-txt { margin: 0 0 0.6rem; }
.ia-jug { display: flex; flex-direction: column; gap: 0.35rem; }
.ia-jug a { display: flex; gap: 0.5rem; align-items: baseline; color: var(--white); font-size: 0.9rem; }
.ia-jug a .nav-num { color: #C9B3FF; }
.ia-jug a em { color: #B8B8C4; font-style: normal; }
.ia-pensando { color: #9A9AA6; margin: 0; }
.buscador-pie { font-size: 0.75rem; color: var(--muted); margin: 0; padding: 0.5rem 1rem 0.8rem; border-top: 1px solid var(--gray); }

/* celular y tablet */
@media (max-width: 1023px) {
  .familias { grid-template-columns: 1fr; }
  .solo-movil { display: inline-flex; }
  .marco { grid-template-columns: 1fr; }
  .barra { height: 56px; padding: 0 0.75rem 0 0.5rem; z-index: 80; }
  .btn-icono { padding: 0.6rem; }
  .nav { position: fixed; top: 56px; left: 0; bottom: 0; z-index: 70; height: calc(100vh - 56px); height: calc(100dvh - 56px); width: min(86vw, 340px); background: var(--white); transform: translate3d(-100%, 0, 0); transition: transform 0.22s ease; box-shadow: none; padding: 0.75rem 1rem 2rem; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  body.menu-abierto .nav { transform: none; box-shadow: 0 0 60px rgba(14, 14, 15, 0.3); }
  .nav-cab { display: none; }
  .nav-fondo { display: block; position: fixed; top: 56px; left: 0; right: 0; bottom: 0; background: rgba(14, 14, 15, 0.4); z-index: 65; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
  body.menu-abierto .nav-fondo { opacity: 1; pointer-events: auto; }
  body.menu-abierto { overflow: hidden; }
  .contenido { padding: 1.5rem 1.1rem 4rem; max-width: none; }
  .buscar-btn { min-width: 0; padding: 0.45rem 0.6rem; }
  .buscar-btn span, .buscar-btn kbd { display: none; }
  .marca-sep, .marca-txt { display: none; }
  .dos, .partes-grid, .ev-cols, .espiga-visual { grid-template-columns: 1fr; }
  .situ-lista li { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .situ-chips { justify-content: flex-start; }
  .jugada-titulo { max-width: none; }
  .paginacion { grid-template-columns: 1fr; }
  .pag-sig { justify-content: flex-start; text-align: left; flex-direction: row-reverse; }
  .hero-buscar kbd { display: none; }
  .prompt pre { padding-right: 0; padding-bottom: 2.5rem; }
}
@media print {
  .barra, .nav, .buscador, .paginacion, .hero-buscar, .copiar { display: none !important; }
  .marco { display: block; }
  .contenido { max-width: none; padding: 0; }
  body { background: #fff; font-size: 12pt; }
  .pregunta { box-shadow: none; }
  details { display: block; }
  details > summary { list-style: none; }
  details:not([open]) > *:not(summary) { display: block; }
}
