/* AcademiaJF — web pública.
   Idea visual: el cuaderno de ciencias. Papel blanco, cuadrícula azul, tinta de bolígrafo
   azul y el rojo de corregir solo para lo que está bien. La tipografía condensada continúa
   el logotipo. Lo memorable es la hoja con el ejercicio resuelto de la portada; el resto
   es sobrio a propósito. */

/* Fuentes alojadas en la propia web (sin llamadas a Google: más rápido y sin ceder datos de
   los visitantes a terceros). Licencia OFL, ver public/site/fonts/OFL-*.txt. */
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url('/site/fonts/barlow-400.woff') format('woff'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url('/site/fonts/barlow-500.woff') format('woff'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url('/site/fonts/barlow-600.woff') format('woff'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 800; font-display: swap; src: url('/site/fonts/barlow-condensed-800.woff') format('woff'); }
@font-face { font-family: 'Caveat'; font-style: normal; font-weight: 600; font-display: swap; src: url('/site/fonts/caveat-600.woff') format('woff'); }

:root {
  --paper: #ffffff;
  --paper-tint: #f3f6fb;
  --grid: #dbe4f1;
  --ink: #1f3d9c;
  --ink-strong: #152c75;
  --graphite: #1d212b;
  --muted: #566070;
  --rule: #d5dbe5;
  --red: #cf3a2c;
  --marker: #ffe36b;

  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-hand: 'Caveat', 'Segoe Print', cursive;

  --step--1: 0.9375rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem);
  --step-4: clamp(2.4rem, 1.6rem + 3.2vw, 3.75rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
  --radius: 10px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink-strong); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 3px; }

p { margin: 0 0 1em; max-width: 68ch; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: 6px;
}
.skip-link:focus { top: 1rem; color: #fff; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.narrow > * { max-width: 48rem; }

/* ---------- Tipografía ---------- */

.h1, .h2, .h3, .subject-name, .step-title, .price-num {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.005em;
  color: var(--graphite);
  margin: 0;
}

.h1 { font-size: var(--step-4); max-width: 20ch; text-wrap: balance; }
.h2 { font-size: var(--step-3); margin-bottom: 1.75rem; text-wrap: balance; }
.h3 { font-size: var(--step-2); margin-bottom: 1rem; }

.lead { font-size: var(--step-1); line-height: 1.5; color: var(--graphite); margin-top: 1.5rem; max-width: 40rem; }

/* ---------- Botones y enlaces ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.7rem 1.35rem;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: #fff;
  font: 600 var(--step-0) / 1.2 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--ink-strong); border-color: var(--ink-strong); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper-tint); color: var(--ink-strong); }
.btn-small { min-height: 2.5rem; padding: 0.45rem 1rem; font-size: var(--step--1); }

.link-strong { font-weight: 600; }
.link-quiet { color: var(--graphite); text-decoration: none; font-weight: 500; }
.link-quiet:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--rule);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(8px); }
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.brand img { height: 32px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-list > li > a,
.nav-menu > summary {
  display: block; padding: 0.5rem 0.7rem; border-radius: 6px;
  color: var(--graphite); text-decoration: none; font-weight: 500; cursor: pointer;
}
.nav-list > li > a:hover,
.nav-menu > summary:hover { color: var(--ink); background: var(--paper-tint); }
.nav-list a[aria-current='page'],
.nav-menu > summary[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); border-radius: 0; }
.nav-menu { position: relative; }
.nav-menu > summary { list-style: none; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::after {
  content: ''; display: inline-block; width: 0.4em; height: 0.4em; margin-left: 0.45em;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.2em) rotate(45deg);
}
.nav-menu[open] > summary::after { transform: translateY(0.05em) rotate(-135deg); }
.nav-menu ul {
  position: absolute; top: calc(100% + 0.35rem); left: 0; min-width: 16rem;
  list-style: none; margin: 0; padding: 0.4rem;
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: 0 14px 30px -18px rgba(21, 44, 117, 0.45);
}
.nav-menu ul a { display: block; padding: 0.55rem 0.75rem; border-radius: 6px; color: var(--graphite); text-decoration: none; }
.nav-menu ul a:hover { background: var(--paper-tint); color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.menu-toggle { display: none; }

@media (max-width: 960px) {
  .menu-toggle {
    display: inline-flex; margin-left: auto; align-items: center;
    min-height: 2.5rem; padding: 0.4rem 1rem; border-radius: 999px;
    border: 1.5px solid var(--graphite); background: var(--paper); color: var(--graphite);
    font: 600 var(--step--1) var(--font-body); cursor: pointer;
  }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 1rem;
    padding: 1rem var(--gutter) 1.5rem;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    max-height: calc(100vh - 4.25rem); overflow-y: auto;
  }
  .site-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-menu ul { position: static; box-shadow: none; border: 0; padding: 0 0 0 1rem; min-width: 0; }
  .nav-list a[aria-current='page'] { box-shadow: inset 3px 0 0 var(--ink); }
  .nav-actions { flex-direction: column; align-items: stretch; }
  .nav-actions .btn { width: 100%; }
}

/* ---------- Portada: hero con la hoja de cuaderno ---------- */

.hero { padding: clamp(2.5rem, 2rem + 4vw, 5rem) 0 clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-meta { margin-top: 1.25rem; color: var(--muted); font-size: var(--step--1); }

.sheet {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--rule), 0 24px 48px -30px rgba(21, 44, 117, 0.45);
  transform: rotate(1.2deg);
}
.sheet svg { width: 100%; }
.grid-line { stroke: var(--grid); stroke-width: 1; }
.hand .w, .plot .w { font-family: var(--font-hand); font-size: 27px; fill: var(--ink); }
.hand .result { font-size: 30px; }
.plot .small, .plot .axis-label { font-size: 21px; }
.axis { stroke: var(--graphite); stroke-width: 1.6; fill: none; opacity: 0.75; }
.curve { stroke: var(--ink); stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tangent { stroke: var(--red); stroke-width: 2.2; fill: none; stroke-linecap: round; }
.point { fill: var(--red); }
.box { fill: none; stroke: var(--ink); stroke-width: 2; }
.check { fill: none; stroke: var(--red); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }

/* Una única secuencia al cargar: el ejercicio se escribe línea a línea y se dibuja el gráfico. */
@media (prefers-reduced-motion: no-preference) {
  .sheet .w { opacity: 0; animation: write-in 0.5s ease-out forwards; }
  .sheet .d { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.9s ease-in-out forwards; }
  .sheet .point { opacity: 0; animation: write-in 0.3s ease-out forwards; }
  .sheet .w1 { animation-delay: 0.2s; }
  .sheet .w2 { animation-delay: 0.55s; }
  .sheet .d1 { animation-delay: 0.7s; }
  .sheet .axis-label { animation-delay: 1s; }
  .sheet .d2 { animation-delay: 1s; animation-duration: 1.2s; }
  .sheet .w3 { animation-delay: 1.4s; }
  .sheet .w4 { animation-delay: 1.9s; }
  .sheet .w5 { animation-delay: 2.4s; }
  .sheet .d5, .sheet .point { animation-delay: 2.7s; }
  .sheet .w7 { animation-delay: 3s; }
  .sheet .w6 { animation-delay: 3.1s; }
  .sheet .d6 { animation-delay: 3.4s; animation-duration: 0.6s; }
  .sheet .d7 { animation-delay: 3.9s; animation-duration: 0.4s; }
}
@keyframes write-in { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .sheet { transform: none; max-width: 34rem; }
}

/* ---------- Secciones ---------- */

.section { padding: var(--space) 0; }
.section-tint { background: var(--paper-tint); }
.section:not(.section-tint) + .section:not(.section-tint) { border-top: 1px solid var(--rule); }
.hero + .section { border-top: 1px solid var(--rule); }

/* Índice de cuaderno: objetivo, puntos guía y destino */
.index-list { list-style: none; margin: 0; padding: 0; max-width: 56rem; }
.index-list li { border-bottom: 1px solid var(--rule); }
.index-list li:first-child { border-top: 1px solid var(--rule); }
.index-list a {
  display: flex; align-items: baseline; gap: 0.75rem;
  padding: 1.05rem 0.25rem; color: var(--graphite); text-decoration: none;
}
.index-goal { font-size: var(--step-1); font-weight: 600; }
.index-dots {
  flex: 1; min-width: 1.5rem; align-self: flex-end; margin-bottom: 0.45em;
  border-bottom: 2px dotted var(--grid);
}
.index-detail { color: var(--muted); white-space: nowrap; }
.index-list a:hover .index-goal { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }
.index-list a:hover .index-dots { border-color: var(--ink); }
@media (max-width: 640px) {
  .index-list a { flex-wrap: wrap; gap: 0.15rem 0.75rem; }
  .index-dots { display: none; }
  .index-detail { width: 100%; white-space: normal; font-size: var(--step--1); }
}

/* Asignaturas */
.subjects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.subject { padding: 0.25rem 1.5rem 0.5rem; border-left: 1px solid var(--rule); }
.subject:first-child { border-left: 0; padding-left: 0; }
.subject-name { font-size: clamp(1.75rem, 1.4rem + 1vw, 2.15rem); margin-bottom: 0.5rem; }
.subject-name a { color: var(--graphite); text-decoration: none; }
.subject-name a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; }
.subject-levels { color: var(--muted); font-size: var(--step--1); margin-bottom: 1rem; }
.subject-topics { list-style: none; margin: 0; padding: 0; }
.subject-topics li { padding: 0.3rem 0; border-top: 1px dashed var(--grid); }
.aside-note { margin-top: 2.5rem; color: var(--muted); }
@media (max-width: 960px) {
  .subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .subject:nth-child(odd) { border-left: 0; padding-left: 0; }
}
@media (max-width: 560px) {
  .subjects { grid-template-columns: 1fr; }
  .subject { border-left: 0; padding: 0; }
}

/* Pasos (el orden importa, por eso van numerados) */
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: paso;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem;
}
.step { counter-increment: paso; }
.step::before {
  content: counter(paso);
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; margin-bottom: 1rem;
  border: 2px solid var(--ink); border-radius: 50%;
  font: 600 1.6rem/1 var(--font-hand); color: var(--ink);
}
.step-title { font-size: var(--step-2); margin-bottom: 0.6rem; }
.step p { margin: 0; color: var(--graphite); }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Dibujo Técnico en portada: texto y lámina con marco y cajetín */
.drawing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center; }
.drawing-text p { font-size: var(--step-0); }
.drawing-text .bullets { margin: 1.25rem 0 0; }
.eyebrow { font-weight: 600; color: var(--ink); text-transform: uppercase; letter-spacing: 0.06em; font-size: var(--step--1); margin-bottom: 0.5rem; }
.sheet-drawing { transform: rotate(-1deg); }
.sheet-drawing .frame { fill: none; stroke: var(--graphite); stroke-width: 1.6; }
.sheet-drawing .thin { fill: none; stroke: var(--muted); stroke-width: 1; opacity: 0.8; }
.sheet-drawing .dashed { stroke-dasharray: 6 5; }
.sheet-drawing .thick { fill: none; stroke: var(--ink); stroke-width: 2.6; }
.sheet-drawing .dt-points circle { fill: var(--graphite); }
.sheet-drawing .dt-points .hit { fill: var(--red); }
.sheet-drawing .dt-labels text { font-family: var(--font-hand); font-size: 24px; fill: var(--ink); }
.sheet-drawing .title-block rect, .sheet-drawing .title-block path { fill: none; stroke: var(--graphite); stroke-width: 1.2; }
.sheet-drawing .title-block text { font-family: var(--font-body); fill: var(--graphite); }
.sheet-drawing .tb-title { font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; }
.sheet-drawing .tb-small { font-size: 12px; }
@media (max-width: 860px) {
  .drawing { grid-template-columns: 1fr; }
  .sheet-drawing { transform: none; max-width: 34rem; }
}

/* Sobre mí */
.about { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: start; }
.about-photo img { width: 100%; border-radius: 4px; border: 1px solid var(--rule); }
.about-text p { font-size: var(--step-0); }
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 260px; }
}

/* Reseñas */
.reviews { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2rem 2.5rem; }
.review blockquote { margin: 0; }
.review blockquote p { font-size: var(--step-1); line-height: 1.45; margin-bottom: 0.75rem; }
.review blockquote p::before { content: '“'; }
.review blockquote p::after { content: '”'; }
.review-by { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: baseline; color: var(--muted); font-size: var(--step--1); margin: 0; }
.review-name { color: var(--graphite); font-weight: 600; }
.review-stars { color: var(--ink); letter-spacing: 0.08em; }

/* Precio */
.price-big { font-size: var(--step-1); margin-bottom: 0.75rem; }
.price-num { font-size: var(--step-4); color: var(--ink); margin-right: 0.15em; }
.price-teaser p { max-width: 46rem; }

/* Preguntas frecuentes */
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-child { border-top: 1px solid var(--rule); }
.faq summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 1.1rem 0; cursor: pointer; list-style: none;
  font-weight: 600; font-size: var(--step-1);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 1.6rem/1 var(--font-body); color: var(--ink); }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 0 1.25rem; color: var(--graphite); }

/* Llamada final */
.cta-band { background: var(--ink); color: #fff; padding: clamp(3rem, 2rem + 3vw, 5rem) 0; }
.cta-band .h2 { color: #fff; margin-bottom: 0.75rem; }
.cta-band p { color: #e4e9f7; margin: 0; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cta-band .btn { background: #fff; border-color: #fff; color: var(--ink-strong); }
.cta-band .btn:hover { background: var(--marker); border-color: var(--marker); color: var(--graphite); }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: #fff; }
.cta-band :focus-visible { outline-color: #fff; }

/* ---------- Páginas interiores ---------- */

.page-head { padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0 clamp(2rem, 1.5rem + 2vw, 3rem); border-bottom: 1px solid var(--rule); }
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.25rem; padding: 0; font-size: var(--step--1); color: var(--muted); }
.breadcrumb li + li::before { content: '/'; margin-right: 0.4rem; color: var(--rule); }
.breadcrumb a { color: var(--muted); }
.page-head .lead { margin-top: 1rem; }
.page-head .hero-actions { margin-top: 1.75rem; }

/* Cabecera con lámina: texto a la izquierda, dibujo a la derecha. */
.head-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center; }
.head-grid .sheet { max-width: 32rem; justify-self: end; width: 100%; }
@media (max-width: 860px) {
  .head-grid { grid-template-columns: 1fr; }
  .head-grid .sheet { justify-self: start; max-width: 26rem; }
}

/* Láminas (src/site/illustrations.js) */
.art .w { font-family: var(--font-hand); font-size: 27px; fill: var(--ink); }
.art .small { font-size: 22px; }
.art .tiny { font-size: 17px; fill: var(--muted); }
.art .big { font-size: 32px; }
.art .result { font-size: 30px; }
.art .area { fill: var(--ink); opacity: 0.12; }
.art .thin { fill: none; stroke: var(--muted); stroke-width: 1.1; opacity: 0.7; }
.art .thin-dash { fill: none; stroke: var(--muted); stroke-width: 1.1; stroke-dasharray: 5 5; opacity: 0.8; }
.art .dash-path { fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; }
.art .atom-h { fill: none; stroke: var(--ink); stroke-width: 2; }
.art .atom-o { fill: none; stroke: var(--red); stroke-width: 2.4; }
.art .tile { fill: none; stroke: var(--muted); stroke-width: 1.4; }
.art .ui-dot { fill: var(--rule); }
.art circle.point { fill: var(--red); }
@media (prefers-reduced-motion: no-preference) {
  .art .area, .art .ui-dot, .art circle.point, .art .thin-dash { opacity: 0; animation: write-in 0.4s ease-out forwards; }
  .art .area { animation-name: fill-in; }
  .art .t1 { animation-delay: 0.15s; } .art .t2 { animation-delay: 0.45s; } .art .t3 { animation-delay: 0.8s; }
  .art .t4 { animation-delay: 1.15s; } .art .t5 { animation-delay: 1.5s; } .art .t6 { animation-delay: 1.85s; }
  .art .t7 { animation-delay: 2.2s; } .art .t8 { animation-delay: 2.55s; } .art .t9 { animation-delay: 2.9s; }
  .art .t10 { animation-delay: 3.25s; } .art .t11 { animation-delay: 3.6s; } .art .t12 { animation-delay: 3.95s; }
}
@keyframes fill-in { to { opacity: 0.12; } }

.page-body { padding: var(--space) 0; }
.page-body .wrap { display: grid; gap: clamp(3rem, 2rem + 3vw, 4.5rem); }
.block { max-width: 60rem; }
.page-body .block > .h3 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); }
.page-body + .section { border-top: 1px solid var(--rule); }
.block > p { max-width: 68ch; }

.bullets { margin: 0; padding: 0; list-style: none; max-width: 46rem; }
.bullets li { position: relative; padding: 0.55rem 0 0.55rem 2rem; border-top: 1px dashed var(--grid); }
.bullets li:last-child { border-bottom: 1px dashed var(--grid); }
.bullets li::before {
  content: ''; position: absolute; left: 0.3rem; top: 1.05rem; width: 0.7rem; height: 0.38rem;
  border-left: 2.5px solid var(--red); border-bottom: 2.5px solid var(--red); transform: rotate(-45deg);
}

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li { padding: 0.35rem 0.85rem; border: 1px solid var(--grid); border-radius: 999px; background: var(--paper-tint); }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; }
.split h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); margin: 0 0 0.75rem; line-height: 1.05; }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } }

.rows { margin: 0; max-width: 60rem; }
.rows > div { display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); gap: 0.5rem 2rem; padding: 0.9rem 0; border-top: 1px solid var(--rule); }
.rows > div:last-child { border-bottom: 1px solid var(--rule); }
.rows dt { font-weight: 600; }
.rows dd { margin: 0; color: var(--graphite); }
@media (max-width: 640px) { .rows > div { grid-template-columns: 1fr; } }

.steps-inline { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }

.note { color: var(--muted); font-size: var(--step--1); margin-top: 1rem; }
.actions-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.table-scroll { overflow-x: auto; }
.prices { width: 100%; max-width: 52rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.prices th, .prices td { text-align: left; padding: 0.85rem 1rem 0.85rem 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.prices thead th { font-size: var(--step--1); color: var(--muted); font-weight: 500; }
.prices tbody th { font-weight: 600; }
.prices td { font-size: var(--step-1); font-weight: 600; white-space: nowrap; }
.per-hour { display: block; font-size: var(--step--1); color: var(--muted); font-weight: 400; }

/* Texto largo (blog y legales) */
.prose { max-width: 42rem; }
.prose h2 { font-family: var(--font-display); font-weight: 800; font-size: var(--step-3); line-height: 1.05; margin: 2.5rem 0 1rem; }
.prose h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); line-height: 1.1; margin: 2rem 0 0.75rem; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.25rem; }
.prose li { margin-bottom: 0.4rem; }
.prose blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 3px solid var(--ink); color: var(--graphite); }
.prose table { border-collapse: collapse; margin: 1.5rem 0; width: 100%; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 0.6rem 0.75rem 0.6rem 0; text-align: left; }
.prose code { background: var(--paper-tint); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.92em; }
.prose img { border-radius: 4px; margin: 1.5rem 0; }

.article-meta { color: var(--muted); font-size: var(--step--1); margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }

.post-list { list-style: none; margin: 0; padding: 0; max-width: 52rem; }
.post-list li { padding: 1.5rem 0; border-top: 1px solid var(--rule); }
.post-list li:last-child { border-bottom: 1px solid var(--rule); }
.post-list h2 { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); line-height: 1.1; margin: 0 0 0.5rem; }
.post-list h2 a { color: var(--graphite); text-decoration: none; }
.post-list h2 a:hover { color: var(--ink); text-decoration: underline; }
.post-list p { margin: 0 0 0.5rem; }
.post-cat { color: var(--muted); font-size: var(--step--1); }

/* Formulario de contacto */
.contact { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: start; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
.form { display: grid; gap: 1.25rem; max-width: 38rem; }
.field { display: grid; gap: 0.4rem; }
.field label, .field legend { font-weight: 600; }
.field .hint { color: var(--muted); font-size: var(--step--1); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.75rem 0.85rem; border: 1.5px solid #b9c3d3; border-radius: 8px;
  font: inherit; color: var(--graphite); background: var(--paper);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(31, 61, 156, 0.25); border-color: var(--ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.check-row { display: flex; gap: 0.6rem; align-items: flex-start; font-size: var(--step--1); }
.check-row input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--ink); }
.form fieldset { border: 0; margin: 0; padding: 0; }
.form legend { padding: 0; margin-bottom: 0.4rem; }
.form fieldset .check-row { font-size: var(--step-0); padding: 0.2rem 0; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0 1rem; }

/* Estrellas de valoración (de 5 a 1 en el HTML, se muestran de 1 a 5) */
.stars-input { justify-self: start; display: inline-flex; flex-direction: row-reverse; gap: 0.15rem; }
.stars-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-input label { cursor: pointer; font-size: 2rem; line-height: 1; color: var(--grid); }
.stars-input label::before { content: '★'; }
.stars-input input:checked ~ label,
.stars-input label:hover,
.stars-input label:hover ~ label { color: var(--ink); }
.stars-input input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 3px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 1rem 1.25rem; border-radius: 8px; border: 1.5px solid; }
.form-status[hidden] { display: none; }
.form-status.is-ok { border-color: #2f7d4a; background: #eef8f1; color: #1d5232; }
.form-status.is-error { border-color: var(--red); background: #fdf1ef; color: #8a2017; }
.contact-aside { padding: 1.5rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper-tint); }
.contact-aside h2 { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); margin: 0 0 1rem; }
.contact-aside ul { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: 0.6rem; }

/* ---------- Pie ---------- */

.site-footer { border-top: 1px solid var(--rule); padding: 3.5rem 0 2rem; font-size: var(--step--1); color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.footer-logo { height: 26px; width: auto; margin-bottom: 1rem; }
.footer-title { font: 600 var(--step-0) var(--font-body); color: var(--graphite); margin: 0 0 0.75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer a:hover { color: var(--ink); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.footer-legal span { margin-right: auto; }
.made-by { margin-top: 1.25rem; display: flex; justify-content: center; }
.made-by a { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.8rem; border-radius: 8px; background: #0a0f1a; color: #c9d1de; font-size: 0.8rem; text-decoration: none; }
.made-by a:hover { text-decoration: none; color: #fff; }
.made-by img { display: block; height: 19px; width: auto; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 40;
  display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%;
  background: #1f8f4e; color: #fff; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5);
}
.wa-float:hover { background: #18733e; color: #fff; }

/* Aviso de cookies */
.cookie-banner {
  position: fixed; left: 1rem; right: 5rem; bottom: 1rem; z-index: 45; max-width: 36rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem;
  padding: 1rem 1.25rem; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: 0 18px 40px -20px rgba(21, 44, 117, 0.5); font-size: var(--step--1);
}
.cookie-banner p { margin: 0; flex: 1 1 16rem; }
.cookie-actions { display: flex; gap: 0.5rem; }
@media (max-width: 520px) { .cookie-banner { right: 1rem; bottom: 5rem; } }

@media print {
  .site-header, .wa-float, .cta-band, .site-footer, .cookie-banner { display: none; }
}

.source-list { margin: 0.5rem 0 0; padding-left: 1.2rem; max-width: 46rem; }
.source-list li { margin-bottom: 0.4rem; }

/* ===== Test de ciencias (/test) ===== */
.test-page { background: var(--paper-tint); padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) var(--space); }
.test-wrap { max-width: 36rem; margin: 0 auto; }
.test-top { display: flex; justify-content: flex-end; min-height: 1.4rem; margin-bottom: 0.5rem; }
.test-step { font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; }
.test-bar { height: 6px; background: var(--grid); border-radius: 99px; overflow: hidden; margin-bottom: 1.25rem; }
.test-bar i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 99px; transition: width .35s ease; }
.test-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: clamp(1.4rem, 4vw, 2.2rem); box-shadow: 0 10px 30px rgba(21, 44, 117, .07); }
.test-h1 { font-family: var(--font-display); font-weight: 800; font-size: var(--step-3); line-height: 1.02; color: var(--ink-strong); margin: 0 0 .6rem; text-transform: none; }
.test-h2 { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); line-height: 1.1; color: var(--ink-strong); margin: 0 0 .4rem; }
.test-h1:focus, .test-h2:focus { outline: none; }
.test-sub { color: var(--muted); margin: 0 0 1.4rem; }
.test-sub-tight { margin-bottom: 0; }
.test-checks { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: .5rem; color: var(--graphite); }
.test-checks li { padding-left: 1.6rem; position: relative; }
.test-checks li::before { content: "✓"; position: absolute; left: 0; color: var(--ink); font-weight: 800; }
.test-full { width: 100%; justify-content: center; }
.test-ops { display: grid; gap: .6rem; margin-top: 1.1rem; }
.test-op { display: flex; align-items: center; gap: .75rem; width: 100%; text-align: left; padding: .9rem 1rem; border: 1.5px solid var(--rule); border-radius: var(--radius); background: var(--paper); font: inherit; color: var(--graphite); cursor: pointer; transition: border-color .15s, background .15s; }
.test-op:hover { border-color: var(--ink); }
.test-op[aria-pressed="true"] { border-color: var(--ink); background: #eef2fb; }
.test-chk { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #9aa6bb; display: grid; place-items: center; }
.test-op.uno .test-chk { border-radius: 50%; }
.test-op[aria-pressed="true"] .test-chk { background: var(--ink); border-color: var(--ink); }
.test-op[aria-pressed="true"] .test-chk::after { content: ""; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.test-op.uno[aria-pressed="true"] .test-chk::after { width: 8px; height: 8px; border: 0; background: #fff; border-radius: 50%; transform: none; }
.test-select { width: 100%; margin-top: 1.1rem; padding: .9rem 1rem; font: inherit; color: var(--graphite); border: 1.5px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.test-select:focus, .test-op:focus-visible, .test-back:focus-visible { outline: 3px solid rgba(31, 61, 156, .3); outline-offset: 2px; }
.test-hint { font-size: var(--step--1); color: var(--muted); margin: .6rem 0 0; }
.test-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1.4rem; }
.test-actions .btn[disabled] { opacity: .4; cursor: not-allowed; }
.test-back { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: .5rem .25rem; }
.test-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.1rem; padding: 0; list-style: none; }
.test-chips li { font-size: var(--step--1); padding: .2rem .7rem; border-radius: 99px; background: #eef2fb; color: var(--ink); font-weight: 600; }
.test-reco { margin: 0 0 1.4rem; padding: 0; list-style: none; display: grid; gap: .75rem; }
.test-reco li { padding: .9rem 1rem; border-radius: var(--radius); background: var(--paper-tint); border-left: 4px solid var(--marker); }
.test-reco b { display: block; margin-bottom: .15rem; color: var(--graphite); }
.test-ctas { display: grid; gap: .6rem; }
.test-wa { background: #1fa855; border-color: #1fa855; }
.test-wa:hover { background: #178a45; border-color: #178a45; }
.test-field { display: grid; gap: .35rem; margin-top: 1rem; }
.test-field label { font-weight: 600; color: var(--graphite); }
.test-field input { width: 100%; padding: .85rem 1rem; font: inherit; color: var(--graphite); border: 1.5px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.test-field input:focus { outline: 3px solid rgba(31, 61, 156, .3); outline-offset: 1px; border-color: var(--ink); }
.test-opt { font-weight: 400; color: var(--muted); }
.test-accept { display: flex; gap: .6rem; align-items: flex-start; margin-top: 1.1rem; font-size: var(--step--1); color: var(--muted); }
.test-accept input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.test-info { font-size: .8rem; color: var(--muted); background: var(--paper-tint); border-radius: 8px; padding: .6rem .8rem; margin: .8rem 0 0; }
.test-error { color: var(--red); font-size: var(--step--1); margin: .6rem 0 0; min-height: 1em; }
.test-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.test-ok { display: flex; gap: .6rem; align-items: center; background: #e7f5ec; color: #14532d; padding: .75rem .9rem; border-radius: var(--radius); margin-bottom: 1.1rem; font-weight: 600; }
.test-skip { display: block; text-align: center; margin-top: .9rem; color: var(--muted); font-size: var(--step--1); }
.test-legal { font-size: .8rem; color: var(--muted); margin-top: 1rem; text-align: center; }
.test-fade { animation: testfade .25s ease; }
@keyframes testfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .test-fade { animation: none; } .test-bar i { transition: none; } }

/* ===== Bloque de venta de los cursos de PAU (portada y páginas de la PAU) ===== */
.course-cta-wrap { margin-top: var(--space); }
.course-cta { background: var(--ink-strong); color: #fff; border-radius: 14px; padding: clamp(1.5rem, 4vw, 2.5rem); margin: var(--space) auto 0; max-width: var(--wrap); }
.page-body .course-cta, .course-cta-wrap .course-cta { margin-top: 0; }
.course-cta + * { margin-top: var(--space); }
.course-cta .eyebrow { color: var(--marker); }
.course-cta .h2 { color: #fff; margin: .3rem 0 .6rem; }
.course-cta p { color: #dfe6f7; max-width: 48rem; }
.course-facts { list-style: none; padding: 0; margin: 1.4rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .9rem; }
.course-facts li { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); border-radius: 10px; padding: .9rem 1rem; display: grid; gap: .2rem; }
.course-facts strong { font-family: var(--font-display); font-size: var(--step-3); line-height: 1; color: #fff; }
.course-facts span { font-size: var(--step--1); color: #dfe6f7; }
.course-cta .btn { background: #fff; border-color: #fff; color: var(--ink-strong); }
.course-cta .btn:hover { background: var(--marker); border-color: var(--marker); color: var(--graphite); }
.course-cta .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.course-cta .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }
.summary-block .rows dd { max-width: 48rem; }
