/* ==========================================================================
   TEACHERS TRAINING OPOSICIONES — styles.css
   Art direction: "El bolígrafo rojo" — papel de examen, tinta, verde pizarra
   y rojo de corrector. Tipografía editorial: Fraunces + Manrope + Caveat.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Color */
  --paper:    #F6F1E6;   /* fondo crema cálido */
  --paper-2:  #FCFAF3;   /* papel de folio, más claro */
  --ink:      #1B1612;   /* tinta casi negra, cálida */
  --ink-soft: #5C5145;   /* tinta secundaria */
  --green:    #0E3B2D;   /* verde pizarra profundo */
  --green-2:  #0A2E23;   /* verde aún más profundo */
  --cream:    #F3EDDF;   /* texto sobre verde */
  --red:      #C8371F;   /* rojo bolígrafo corrector */
  --red-dark: #A52C16;
  --yellow:   #FFD666;   /* subrayador */
  --star:     #E8A317;   /* amarillo de las estrellas (dorado: legible sobre papel) */
  --lila:     #8E5AC7;   /* rotulador lila del corrector */
  --blue-pen: #2C3A58;   /* boli azul del opositor */
  --line:     rgba(27, 22, 18, .14);
  --line-dark: rgba(243, 237, 223, .16);

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-hand: "Caveat", "Segoe Script", cursive;

  /* Misc */
  --radius: 16px;
  --header-h: 80px;
  --shadow-card: 0 24px 60px -24px rgba(27, 22, 18, .35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Grano de papel sutil sobre todo el sitio */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

img, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
button { background: none; border: none; color: inherit; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
em { font-style: italic; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 520;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

::selection { background: var(--yellow); color: var(--ink); }

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

[id] { scroll-margin-top: calc(var(--header-h) + 20px); }

.container {
  width: min(1180px, 100% - clamp(2.5rem, 8vw, 5rem));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 3000;
  background: var(--ink);
  color: var(--paper);
  padding: .7rem 1.2rem;
  border-radius: 10px;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* ---------- Texto utilitario ---------- */
.kicker {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: .6rem;
}
.kicker::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--red);
  flex: none;
}
.kicker .num {
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.hand {
  font-family: var(--font-hand);
  font-weight: 600;
}

/* Subrayador amarillo */
.hl {
  background-image: linear-gradient(100deg,
    rgba(255, 214, 102, 0) 0.8%,
    rgba(255, 214, 102, .9) 2.6%,
    rgba(255, 222, 130, .65) 97%,
    rgba(255, 214, 102, 0) 99%);
  border-radius: .25em;
  padding: .08em .12em;
  margin: -.08em -.12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Subrayado rojo a mano (squiggle) */
.hl-red {
  padding-bottom: .12em;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='110' height='9' viewBox='0 0 110 9'><path d='M2 6.5 C 14 1.5, 24 1.5, 38 5.5 S 64 9, 78 4.5 S 100 2, 108 5' fill='none' stroke='%23C8371F' stroke-width='2.6' stroke-linecap='round'/></svg>") repeat-x left bottom / 110px 9px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: .01em;
  padding: .9rem 1.7rem;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, color .2s ease,
              border-color .2s ease, box-shadow .2s ease;
}
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary {
  background: var(--red);
  color: #FFF8EC;
  box-shadow: 0 12px 26px -14px rgba(200, 55, 31, .65);
}
.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
}

.btn-ghost {
  border: 1.5px solid rgba(27, 22, 18, .35);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: rgba(27, 22, 18, .05);
  transform: translateY(-2px);
}

.btn-light {
  background: var(--paper);
  color: var(--ink);
}
.btn-light:hover {
  background: #fff;
  transform: translateY(-2px);
}

.btn-sm { padding: .6rem 1.15rem; font-size: .85rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
/* El fondo con blur vive en un pseudo-elemento: si el blur estuviera en el
   propio header, este pasaría a ser containing block de la nav móvil
   position:fixed y el overlay quedaría recortado a la altura del header. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(246, 241, 230, .95);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity .3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header.is-scrolled::before { opacity: 1; }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex: none;
}
.brand-mark svg { width: 42px; height: 42px; }

/* Logo real (assets/logo.png). El PNG lleva su tamaño en el HTML para no
   provocar saltos de maquetación; aquí solo se fija la altura de pantalla. */
.brand-logo {
  display: block;
  height: 60px;   /* el header mide 80px: deja aire arriba y abajo */
  width: auto;
  max-width: none;
}
/* Sobre el verde del pie, el logo va en blanco */
.brand-logo-light { filter: brightness(0) invert(1); }
.brand-text strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 640;
  font-size: 1.08rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.brand-text small {
  display: block;
  font-weight: 700;
  font-size: .6rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: .15rem;
}

.site-nav { display: flex; align-items: center; gap: 1.9rem; }
.site-nav ul { display: flex; gap: 1.7rem; }
.site-nav ul a {
  font-weight: 600;
  font-size: .93rem;
  position: relative;
  padding: .3rem 0;
}
.site-nav ul a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.site-nav ul a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  position: relative;
  z-index: 120;
  width: 44px;
  height: 44px;
  cursor: pointer;
}
.nav-toggle span {
  position: absolute;
  left: 10px;
  width: 24px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s ease, top .3s ease, background-color .3s ease;
}
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 25px; }
body.nav-open .nav-toggle span { background: var(--cream); }
body.nav-open .nav-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(2rem, 4.5vw, 3.2rem)) 0 clamp(2.5rem, 5vw, 3.8rem);
  overflow: clip;
  /* pauta de folio muy sutil */
  background-image:
    repeating-linear-gradient(to bottom,
      transparent 0 38px,
      rgba(14, 59, 45, .055) 38px 39px);
}
/* En escritorio el margen rojo lo dibuja la línea de progreso (.pen-progress);
   en pantallas táctiles mantenemos la línea estática del folio. */
@media (max-width: 1024px) {
  .hero::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    left: clamp(1rem, 4vw, 3.2rem);
    width: 1.5px;
    background: rgba(200, 55, 31, .3);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  margin: .9rem 0 .7rem;
}

/* Subtítulo del hero: la frase de marca, con el círculo rojo */
.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 520;
  font-size: clamp(1.35rem, 2.9vw, 2.1rem);
  line-height: 1.28;
  color: var(--ink);
  margin: 0 0 1.2rem;
}

.circled {
  position: relative;
  display: inline-block;
  font-style: italic;
  font-weight: 520;
  /* aire respecto a la línea de arriba, para que el círculo no la roce */
  margin-top: .07em;
}
.circle-svg {
  /* svg es replaced (necesita width/height explícitos) y el reset global
     le impone max-width:100% — hay que liberarlo para que sobresalga */
  position: absolute;
  top: -23%;
  left: -13%;
  width: 134%;
  max-width: none;
  height: 152%;
  overflow: visible;
  pointer-events: none;
}
.circle-svg path {
  fill: none;
  stroke: var(--red);
  stroke-width: 4.5;
  stroke-linecap: round;
  /* ojo: NO usar vector-effect:non-scaling-stroke aquí — rompe la
     normalización de pathLength y deja un trazo visible antes de animar */
  opacity: .95;
}

/* Trazos que se dibujan al aparecer */
.draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.1s cubic-bezier(.6, 0, .3, 1) .45s;
}
.is-visible .draw { stroke-dashoffset: 0; }

.lead {
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  color: var(--ink-soft);
  max-width: 54ch;
}
.lead strong { color: var(--ink); }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 2.1rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.6rem;
  margin-top: 2.2rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink-soft);
}
.hero-meta li {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.hero-meta li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

/* — Firma del preparador (bolígrafo rojo) — */
.hero-sign {
  width: fit-content;
  margin: 1rem 0 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .05rem;
}
.hero-sign-name {
  font-family: var(--font-hand);
  font-size: clamp(2.6rem, 5.5vw, 3.9rem);
  line-height: .85;
  color: var(--red);
  rotate: -3deg;
  transform-origin: left center;
}
.hero-sign-role {
  margin-left: .35rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* — Folio corregido (visual del hero) — */
.hero-visual { position: relative; }

.sheet-stack {
  position: relative;
  width: min(420px, 100%);
  margin-inline: auto;
  transform-style: preserve-3d;
  transition: transform .25s ease-out;
}

.sheet {
  background: var(--paper-2);
  border: 1px solid rgba(27, 22, 18, .09);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}

.sheet-back {
  position: absolute;
  inset: 0;
  transform: rotate(2.6deg) translate(16px, 12px);
  background: #EFE8D5;
}

.sheet-main {
  --lh: 1.7rem;
  position: relative;
  transform: rotate(-1.6deg);
  padding: 1.5rem 1.6rem 3.6rem 3.2rem;
  background-image:
    /* margen rojo del folio */
    linear-gradient(to right,
      transparent 0 2.5rem,
      rgba(200, 55, 31, .5) 2.5rem calc(2.5rem + 1.5px),
      transparent calc(2.5rem + 1.5px)),
    /* pauta */
    repeating-linear-gradient(to bottom,
      transparent 0 calc(var(--lh) - 1px),
      rgba(14, 59, 45, .14) calc(var(--lh) - 1px) var(--lh));
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--ink-soft);
  margin-bottom: .8rem;
}

.sheet-title {
  font-size: .8rem;
  font-style: italic;
  line-height: 1.4;
  margin-bottom: .8rem;
  text-wrap: pretty;
}
/* Hueco flotante: solo las primeras líneas del enunciado esquivan la nota */
.sheet-title::before {
  content: "";
  float: right;
  width: 4.4rem;
  height: 3.8rem;
}

.hand-line {
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: 1.18rem;
  line-height: var(--lh);
  color: var(--blue-pen);
  margin-bottom: .4rem;
}

.ringed {
  position: relative;
  font-style: inherit;
}
.ringed svg {
  position: absolute;
  top: -26%;
  left: -14%;
  width: 128%;
  max-width: none;
  height: 152%;
  overflow: visible;
  pointer-events: none;
}
.ringed svg path {
  fill: none;
  stroke: var(--red);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.redline {
  text-decoration: underline wavy var(--red) 1.5px;
  text-underline-offset: 4px;
}

/* Sistema de corrección de Fran: subrayado lila + marca *N numerada */
.ul-lila {
  background-image: linear-gradient(to top,
    transparent .05em,
    rgba(142, 90, 199, .42) .05em .32em,
    transparent .32em);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.astmark {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: .82em;
  color: var(--lila);
  position: relative;
  top: -.45em;
  margin-left: .12em;
  white-space: nowrap;
  display: inline-block;
}
/* Leyenda de las marcas: vive en el margen inferior del folio, bajo el texto */
.margin-note.note-legend {
  bottom: 1.4rem;
  right: 1.1rem;
  color: var(--lila);
  transform: rotate(-3deg);
  font-size: .98rem;
}

.strike {
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
}
.fix {
  color: var(--red);
  font-weight: 700;
  font-size: .92em;
  position: relative;
  top: -.4em;
}

.margin-note {
  position: absolute;
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--red);
  transform: rotate(-4deg);
  white-space: nowrap;
}
.note-1 { top: 30%; right: .9rem; }
.note-2 { top: 56%; right: 1.1rem; transform: rotate(3deg); }
.note-3 { bottom: 22%; right: .9rem; transform: rotate(-6deg); }

.stamp {
  position: absolute;
  left: 3.2rem;
  bottom: 1.1rem;
  transform: rotate(-6deg);
  border: 2.5px solid var(--red);
  border-radius: 6px;
  color: var(--red);
  padding: .3rem .85rem .4rem;
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.25;
  text-align: center;
  opacity: .88;
}
.stamp small {
  display: block;
  font-size: .55rem;
  letter-spacing: .18em;
}

.score {
  position: absolute;
  top: 2.4rem;
  right: .9rem;
  transform: rotate(4deg);
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  color: var(--red);
  border: 2.5px solid rgba(200, 55, 31, .8);
  border-radius: 50%;
  padding: .55rem .6rem .6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
}
.score small {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: .5rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Cabecera de calificación del tribunal (artefacto del hero) ---------- */
.grade-sheet {
  /* anula la pauta de folio y el margen rojo de .sheet-main: es un formulario oficial */
  background-image: none;
  background: #FCFAF5;
  padding: 1.5rem 1.6rem 1.7rem;
  font-family: var(--font-body);
  color: #26221e;
}
.gs-title {
  text-align: center;
  font-weight: 800;
  font-size: .74rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0 3.4rem;   /* deja hueco al identificador de la esquina */
  margin-bottom: 1.15rem;
}
.gs-id {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  text-align: center;
}
.gs-id small {
  display: block;
  font-size: .46rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .2rem;
}
.gs-id b {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2rem;
  border: 1.5px solid #26221e;
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.3rem;
}
.gs-parts {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.6rem;
  font-size: .72rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
}
.gs-part {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--ink-soft);
}
.gs-part.gs-on { color: #26221e; }
.gs-box {
  width: 15px;
  height: 15px;
  border: 1.5px solid #26221e;
  position: relative;
  flex: none;
}
.gs-box--x::before,
.gs-box--x::after {
  content: "";
  position: absolute;
  inset: -2px 1px;
  width: 1.8px;
  background: #26221e;
  left: 50%;
}
.gs-box--x::before { transform: rotate(45deg); }
.gs-box--x::after { transform: rotate(-45deg); }
.gs-label {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #26221e;
  margin-bottom: .8rem;
  line-height: 1.35;
}
.gs-label em { font-style: normal; font-weight: 700; color: var(--ink-soft); }
.gs-row {
  display: flex;
  gap: .5rem;
}
.gs-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  min-width: 0;
}
.gs-mark {
  width: 100%;
  aspect-ratio: 5 / 4;
  border: 1.5px solid #26221e;
  display: grid;
  place-items: center;
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.4rem;
  color: #1a3fa0;   /* boli azul */
}
.gs-cell small {
  font-size: .5rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.2;
}

/* Dos cabeceras apiladas (Parte A arriba, Parte B debajo) */
.sheet-stack--duo {
  display: flex;
  flex-direction: column;
  margin-top: 2.4rem;   /* baja un poco el conjunto respecto al titular */
}
.sheet-stack--duo .grade-sheet { width: 94%; }
.sheet-stack--duo .grade-a { transform: rotate(-2.2deg); align-self: flex-start; z-index: 1; }
.sheet-stack--duo .grade-b { transform: rotate(1.4deg); align-self: flex-end; margin-top: -.5rem; z-index: 2; }

.chip {
  position: absolute;
  z-index: 2;
  background: var(--green);
  color: var(--cream);
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .02em;
  padding: .55rem .85rem;
  border-radius: 10px;
  box-shadow: 0 14px 30px -14px rgba(10, 46, 35, .6);
}
.chip-1 {
  left: -1.4rem;
  bottom: 2.6rem;
  transform: rotate(-3deg);
}
.chip-2 {
  top: -2.6rem;
  left: .4rem;
  background: none;
  box-shadow: none;
  color: var(--ink-soft);
  font-size: 1.25rem;
  transform: rotate(-2.5deg);
  padding: 0;
}

/* ---------- Secciones (base) ---------- */
.section { padding-block: clamp(2.8rem, 5.5vw, 4.5rem); }

.section-head { max-width: 760px; }
.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  margin: .8rem 0 .9rem;
}
.section-intro {
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 56ch;
}
.section-intro a {
  color: var(--red);
  font-weight: 700;
  border-bottom: 2px solid rgba(200, 55, 31, .35);
  transition: border-color .2s;
}
.section-intro a:hover { border-color: var(--red); }

.section-dark {
  background: var(--green);
  color: var(--cream);
}
.section-dark .section-intro { color: rgba(243, 237, 223, .75); }
.section-dark .kicker { color: rgba(243, 237, 223, .8); }

.section-paper {
  background: var(--paper-2);
  border-block: 1px solid var(--line);
}

/* ---------- 01 · Método (pilares ahora usan .edit-list — ver V3) ---------- */

/* ---------- 02 · El examen ---------- */
.exam { margin-top: clamp(2.2rem, 4vw, 3.2rem); }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  width: max-content;
  max-width: 100%;
  padding: .45rem;
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  margin-bottom: 2.2rem;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .05rem;
  padding: .65rem 1.35rem .75rem;
  border-radius: 11px;
  cursor: pointer;
  color: rgba(243, 237, 223, .72);
  font-weight: 700;
  font-size: .98rem;
  transition: background-color .25s ease, color .25s ease;
}
.tab small {
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .65;
}
.tab:hover { color: var(--cream); }
.tab.is-active {
  background: var(--paper);
  color: var(--ink);
}

.tab-panel[hidden] { display: none; }

.exam-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}

.exam-card {
  background: rgba(252, 250, 244, .055);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 1.8rem;
}
.exam-tag {
  font-weight: 800;
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--yellow);
}
.exam-card h3 {
  font-size: 1.65rem;
  margin: .5rem 0 .65rem;
  color: var(--cream);
}
.exam-card > p {
  color: rgba(243, 237, 223, .78);
  font-size: .98rem;
}

.exam-facts {
  display: flex;
  gap: 2.4rem;
  margin-top: 1.3rem;
}
.exam-facts dt {
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(243, 237, 223, .55);
}
.exam-facts dd {
  margin: .15rem 0 0;
  font-family: var(--font-display);
  font-weight: 520;
  font-size: 1.3rem;
}

.bar {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: rgba(243, 237, 223, .15);
  margin-top: 1.5rem;
}
.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 4px;
  background: var(--yellow);
  transition: width 1s cubic-bezier(.5, 0, .2, 1) .35s;
}
.is-visible .bar-fill { width: var(--w); }
.bar em {
  position: absolute;
  top: 14px;
  left: 0;
  font-style: normal;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(243, 237, 223, .6);
}

.exam-note {
  margin-top: 2.6rem;
  padding: 1.05rem 1.3rem;
  border-left: 3px solid var(--yellow);
  border-radius: 0 12px 12px 0;
  background: rgba(243, 237, 223, .07);
  color: rgba(243, 237, 223, .85);
  font-size: .98rem;
  max-width: 72ch;
}
.exam-note strong { color: var(--cream); }

.final-split {
  display: flex;
  gap: 1.3rem;
}
.final-block {
  flex: 1 1 var(--w);
  background: rgba(252, 250, 244, .055);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 1.8rem;
}
.final-block strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 640;
  font-size: 2.7rem;
  color: var(--yellow);
  margin-bottom: .4rem;
}
.final-block h3 { font-size: 1.4rem; margin-bottom: .5rem; color: var(--cream); }
.final-block p { color: rgba(243, 237, 223, .78); font-size: .95rem; }
.final-block-alt { border-style: dashed; }
.final-block-alt strong { color: rgba(243, 237, 223, .65); }

.exam-source {
  margin-top: 2.2rem;
  font-size: .8rem;
  color: rgba(243, 237, 223, .5);
  max-width: 75ch;
}

/* ---------- 03 · Qué incluye ---------- */
.checklist {
  margin-top: clamp(2.2rem, 4vw, 3.2rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(2.5rem, 5vw, 4.5rem);
}
.checklist li {
  position: relative;
  padding: 1.05rem 0 1.05rem 2.7rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 1rem;
}
.checklist li strong { color: var(--ink); }
.checklist li::before {
  content: "✓";
  position: absolute;
  left: .3rem;
  top: .85rem;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1;
  color: var(--red);
  transform: rotate(-8deg);
}

.incluye-note {
  margin-top: 3rem;
  max-width: 560px;
  background: var(--paper-2);
  border: 1.5px dashed rgba(200, 55, 31, .55);
  border-radius: 14px;
  padding: 1.5rem 1.7rem;
}
.incluye-note .hand {
  font-size: 1.45rem;
  color: var(--red);
  transform: rotate(-2deg);
  display: inline-block;
  margin-bottom: .3rem;
}
.incluye-note p:last-child { color: var(--ink-soft); }
.incluye-note p:last-child strong { color: var(--ink); }

/* ---------- 04 · Un mes tipo ---------- */
.timeline {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.8rem, 3vw, 2.6rem);
}
.tl-step {
  position: relative;
  border-top: 2px solid var(--ink);
  padding-top: 1.5rem;
}
.tl-step::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
}
.tl-week {
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--red);
}
.tl-step h3 { font-size: 1.28rem; margin: .5rem 0 .55rem; }
.tl-step p { color: var(--ink-soft); font-size: .95rem; }

.tl-repeat {
  margin-top: 2.6rem;
  font-size: 1.55rem;
  color: var(--red);
  transform: rotate(-2deg);
  width: max-content;
  max-width: 100%;
}

/* ---------- 05 · Grupos (tarjetas sustituidas por .timetable — ver V3) ---------- */

/* ---------- 06 · Quién te prepara ---------- */
.prep-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.prep-photo { position: relative; }
.prep-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.prep-placeholder {
  aspect-ratio: 4 / 5;
  border: 2px dashed rgba(27, 22, 18, .3);
  border-radius: var(--radius);
  background: var(--paper-2);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1rem;
  color: rgba(27, 22, 18, .42);
  position: relative;
}
.prep-placeholder svg { width: 50%; max-width: 190px; color: rgba(27, 22, 18, .25); }
.prep-placeholder span {
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
/* celo en las esquinas, efecto álbum */
.prep-photo::before,
.prep-photo::after {
  content: "";
  position: absolute;
  width: 92px;
  height: 30px;
  background: rgba(255, 214, 102, .45);
  border: 1px solid rgba(27, 22, 18, .06);
  z-index: 2;
}
.prep-photo::before { top: -12px; left: -26px; transform: rotate(-38deg); }
.prep-photo::after { top: -12px; right: -26px; transform: rotate(38deg); }

.prep-photo figcaption {
  text-align: center;
  font-size: 1.4rem;
  color: var(--ink-soft);
  transform: rotate(-2deg);
  margin-top: 1rem;
}

.prep-text p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 1.1rem;
}
.prep-text p strong { color: var(--ink); }
.prep-text em { font-family: var(--font-display); }

.prep-points { margin-top: 1.6rem; }
.prep-points li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: .85rem;
  font-weight: 600;
  font-size: .98rem;
}
.prep-points li::before {
  content: "✓";
  position: absolute;
  left: .2rem;
  top: -.15rem;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--red);
  transform: rotate(-8deg);
}

/* ---------- 07 · FAQ ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.faq-grid .section-head {
  position: sticky;
  top: calc(var(--header-h) + 30px);
}

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.35rem .2rem;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 520;
  font-size: 1.22rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: color .2s ease;
}
.faq-q:hover { color: var(--red); }

.faq-icon {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  transition: transform .35s ease, background-color .25s, color .25s;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.8px;
  background: currentColor;
  translate: -50% -50%;
}
.faq-icon::after { rotate: 90deg; }

.faq-item.is-open .faq-q { color: var(--red); }
.faq-item.is-open .faq-icon { transform: rotate(135deg); }

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s cubic-bezier(.5, 0, .2, 1);
}
.faq-a-inner { overflow: hidden; }
.faq-a-inner p {
  padding: 0 3rem 1.5rem .2rem;
  color: var(--ink-soft);
  max-width: 62ch;
}
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }

/* ---------- Contacto ---------- */
.section-contacto {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(255, 214, 102, .08), transparent 60%),
    var(--green);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.contact-copy h1,
.contact-copy h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: .8rem 0 1rem;
}

.contact-email {
  display: inline-block;
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-weight: 520;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  color: var(--yellow);
  border-bottom: 2px solid rgba(255, 214, 102, .4);
  padding-bottom: .3rem;
  overflow-wrap: anywhere;
  transition: border-color .25s ease;
}
.contact-email:hover { border-color: var(--yellow); }

.contact-note {
  margin-top: 1.5rem;
  font-size: .88rem;
  color: rgba(243, 237, 223, .65);
  max-width: 44ch;
}

.contact-form {
  background: var(--paper);
  color: var(--ink);
  border-radius: 22px;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .55);
}

.field { margin-bottom: 1.15rem; }
.field label {
  display: block;
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .45rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--paper-2);
  border: 1.5px solid rgba(27, 22, 18, .2);
  border-radius: 10px;
  padding: .8rem 1rem;
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(27, 22, 18, .35); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 55, 31, .14);
}

.form-hint {
  margin-top: .9rem;
  text-align: center;
  font-size: .8rem;
  color: var(--ink-soft);
}
.field-hint {
  margin-top: .5rem;
  font-size: .78rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* Casillas de selección múltiple (horario) */
.field-label {
  display: block;
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .55rem;
}
.contact-form .field-label { font-size: .68rem; letter-spacing: .14em; }
.checks { display: grid; gap: .5rem; }
.contact-form .field .check {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
.contact-form .field .check input[type="checkbox"] {
  width: auto;
  height: auto;
  flex: none;
  margin: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  accent-color: var(--red);
  transform: scale(1.25);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(246, 241, 230, .82);
  padding: 4.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(246, 241, 230, .14);
}

.footer-brand .brand-text strong { color: #F6F1E6; }
.footer-brand .brand-text small { color: rgba(246, 241, 230, .5); }
.footer-brand .brand-logo { height: 84px; }
.footer-brand > p {
  margin-top: 1.2rem;
  font-size: .92rem;
  color: rgba(246, 241, 230, .6);
  max-width: 38ch;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.footer-nav h4 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(246, 241, 230, .45);
  margin-bottom: .9rem;
}
.footer-nav a {
  display: inline-block;
  padding: .22rem 0;
  font-size: .95rem;
  transition: color .2s ease;
}
.footer-nav a:hover { color: var(--yellow); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .6rem 2rem;
  padding-top: 1.6rem;
  font-size: .84rem;
  color: rgba(246, 241, 230, .5);
}
.footer-bottom .hand { font-size: 1.15rem; color: rgba(246, 241, 230, .65); }

/* ---------- Páginas legales ---------- */
.legal {
  padding: calc(var(--header-h) + 4rem) 0 5rem;
}
.legal article { max-width: 720px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 2rem; }
.legal h2 { font-size: 1.35rem; margin: 2.2rem 0 .7rem; }
.legal p, .legal li {
  color: var(--ink-soft);
  margin-bottom: .8rem;
}
.legal ul { list-style: disc; padding-left: 1.4rem; }
.legal a { color: var(--red); font-weight: 600; }
.legal .back {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-weight: 700;
  font-size: .9rem;
  color: var(--ink);
}
.legal .back:hover { color: var(--red); }

/* ---------- Animación de entrada ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease var(--d, 0s), transform .7s ease var(--d, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 2.5rem; }
  .sheet-stack { width: min(440px, 92%); }
  .chip-1 { left: -.4rem; }

  .prep-grid { grid-template-columns: 1fr; }
  .prep-photo { max-width: 380px; }

  .faq-grid { grid-template-columns: 1fr; }
  .faq-grid .section-head { position: static; }

  .contact-grid { grid-template-columns: 1fr; }

  .timeline { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  .nav-toggle { display: block; }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: var(--green);
    flex-direction: column;
    justify-content: center;
    gap: 2.4rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, visibility 0s linear .3s;
  }
  body.nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .3s ease;
  }
  .site-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  .site-nav ul a {
    color: var(--cream);
    font-family: var(--font-display);
    font-weight: 520;
    font-size: 1.7rem;
  }
  .site-nav ul a::after { display: none; }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 760px) {
  body { font-size: 1rem; }

  .brand-logo { height: 48px; }
  .footer-brand .brand-logo { height: 68px; }

  /* Los celos de la foto sobresalían del viewport y provocaban scroll lateral */
  .prep-photo::before { left: -12px; }
  .prep-photo::after { right: -12px; }

  .pillars { grid-template-columns: 1fr; }
  .exam-grid { grid-template-columns: 1fr; }
  .final-split { flex-direction: column; }
  .checklist { grid-template-columns: 1fr; }
  .groups { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr 1fr; }

  .tabs { width: 100%; }
  .tab { flex: 1 1 auto; }

  .exam-facts { gap: 1.6rem; }

  .sheet-main { padding: 1.3rem 1.2rem 4.4rem 2.7rem; }
  .margin-note { display: none; }
  .note-1 { display: block; }

  /* En móvil el identificador se queda en su esquina (arriba a la derecha), como en
     escritorio; achicamos un poco la casilla y ensanchamos el margen del título para
     que el texto no se meta debajo de ella. */
  .grade-sheet .gs-id { top: 1rem; right: .8rem; }
  .grade-sheet .gs-id b { width: 2.4rem; height: 1.7rem; font-size: 1.1rem; }
  .grade-sheet .gs-id small { font-size: .42rem; }
  .grade-sheet .gs-title { text-align: left; padding: 0 4.2rem 0 .1rem; }

  .footer-bottom { justify-content: center; text-align: center; }
}

@media (max-width: 420px) {
  .hero-cta .btn { width: 100%; }
  .chip-1 { font-size: .68rem; }
  .score { font-size: 1.7rem; padding: .45rem .5rem .5rem; }
}

/* ==========================================================================
   MULTIPÁGINA — portada, héroes interiores, reseñas, teasers y CTA final
   ========================================================================== */

/* Estado activo en la navegación */
.site-nav ul a[aria-current="page"] { color: var(--red); }
.site-nav ul a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Hero de páginas interiores ---------- */
.page-hero {
  padding: calc(var(--header-h) + clamp(2rem, 4vw, 3rem)) 0 clamp(2rem, 3.8vw, 2.8rem);
  border-bottom: 1px solid var(--line);
  background-image:
    repeating-linear-gradient(to bottom,
      transparent 0 38px,
      rgba(14, 59, 45, .05) 38px 39px);
}
.page-hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  margin: .8rem 0 .9rem;
  max-width: 24ch;
}
.page-hero .lead { max-width: 58ch; }

/* ---------- Enlace "ver más" ---------- */
.more-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 800;
  font-size: .95rem;
  color: var(--red);
  border-bottom: 2px solid rgba(200, 55, 31, .3);
  padding-bottom: .2rem;
  transition: border-color .2s ease;
}
.more-link:hover { border-color: var(--red); }
.more-link .arrow { transition: transform .25s ease; }
.more-link:hover .arrow { transform: translateX(4px); }
.section-dark .more-link { color: var(--yellow); border-color: rgba(255, 214, 102, .35); }
.section-dark .more-link:hover { border-color: var(--yellow); }

.section-foot { margin-top: clamp(1.4rem, 2.5vw, 1.9rem); }

/* ---------- Reseñas ---------- */
.reviews-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}
.reviews-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  border: 1.5px solid var(--line);
  background: var(--paper-2);
  border-radius: 999px;
  padding: .55rem 1.1rem;
  font-weight: 800;
  font-size: .9rem;
  white-space: nowrap;
}
.reviews-badge .stars { color: #DFA32F; letter-spacing: .08em; }

/* (tarjetas de reseña sustituidas por .pin-card — ver bloque V3) */

/* ---------- Chips de comunidades (página examen) ---------- */
.ccaa-strip {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem;
}
.ccaa-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1.5px solid var(--line-dark);
  border-radius: 999px;
  padding: .5rem 1.05rem;
  font-weight: 700;
  font-size: .88rem;
  color: rgba(243, 237, 223, .85);
}
.ccaa-chip.is-active {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}
.ccaa-chip.is-active::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

/* ---------- Página de contacto ---------- */
.contact-page {
  padding-top: calc(var(--header-h) + clamp(3rem, 6vw, 5rem));
}

/* ---------- CTA final de portada ---------- */
.cta-final { text-align: center; }
.cta-final h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  margin: .8rem auto 1rem;
  max-width: 20ch;
}
.cta-final .section-intro { margin-inline: auto; }
.cta-final .kicker { justify-content: center; }
.cta-final .btn { margin-top: 2rem; }
.cta-final .contact-note { margin: 1.4rem auto 0; max-width: none; }

/* ---------- Responsive de los bloques nuevos ---------- */
@media (max-width: 1024px) {
  .review-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .reasons { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .reviews-head { align-items: flex-start; flex-direction: column; }
}

/* ==========================================================================
   V3 — "La mesa del corrector": artefactos de papel en vez de tarjetas
   ========================================================================== */

/* Cinta de celo (washi) reutilizable */
.washi {
  position: absolute;
  top: -13px;
  left: 50%;
  translate: -50% 0;
  rotate: -4deg;
  width: 92px;
  height: 26px;
  background: rgba(255, 214, 102, .5);
  border: 1px solid rgba(27, 22, 18, .05);
  pointer-events: none;
}

/* ---------- Recorte de la convocatoria ---------- */
.clipping-wrap { padding: clamp(1.4rem, 2.8vw, 2rem) 0 clamp(2rem, 4vw, 2.8rem); }
.clipping {
  position: relative;
  max-width: 860px;
  background: var(--paper-2);
  border: 1px solid rgba(27, 22, 18, .12);
  box-shadow: 0 22px 48px -28px rgba(27, 22, 18, .45);
  padding: 1.5rem 1.9rem 1.6rem;
  rotate: -.6deg;
}
.clipping .washi { left: 80px; }
.clipping-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .4rem 1.5rem;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: .9rem;
}
.clipping-head em { font-style: normal; color: rgba(27, 22, 18, .42); }
.clipping-body {
  font-family: var(--font-display);
  font-weight: 420;
  font-size: 1.04rem;
  line-height: 1.8;
  color: var(--ink);
  text-align: justify;
}
.clipping-body mark {
  background: linear-gradient(100deg,
    rgba(255, 214, 102, 0) 1%,
    rgba(255, 214, 102, .95) 3.5%,
    rgba(255, 222, 130, .7) 96.5%,
    rgba(255, 214, 102, 0) 99%);
  color: inherit;
  padding: .05em .14em;
  margin: -.05em -.04em;
  border-radius: .2em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.clipping-note {
  position: absolute;
  right: 1.4rem;
  bottom: -1.6rem;
  font-size: 1.35rem;
  color: var(--red);
  rotate: -2.5deg;
}

/* Nota para repetidores bajo el recorte */
.repite-note {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4rem 1.1rem;
}
.repite-note .hand {
  font-size: 1.5rem;
  color: var(--red);
  rotate: -1.5deg;
}

/* ---------- Lista editorial numerada (sustituye a las tarjetas) ---------- */
.edit-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.edit-grid > .section-head {
  position: sticky;
  top: calc(var(--header-h) + 30px);
}
.edit-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 2vw, 1.6rem);
  padding: clamp(1.1rem, 2.2vw, 1.5rem) 0;
  border-bottom: 1px solid var(--line);
}
.edit-list li:first-child { border-top: 1px solid var(--line); }
.edit-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 420;
  font-size: clamp(2rem, 3.2vw, 2.7rem);
  line-height: .85;
  color: var(--red);
  min-width: 1.6ch;
  text-align: right;
}
.edit-list h3 { font-size: 1.28rem; margin-bottom: .45rem; }
.edit-list p { color: var(--ink-soft); font-size: 1rem; }
.edit-list p strong { color: var(--ink); }

/* ---------- Reseñas: fichas clavadas ---------- */
.pin-grid {
  margin-top: clamp(1.8rem, 3.2vw, 2.4rem);
  /* dos columnas anchas, reseñas enteras (masonry por columnas) */
  column-count: 2;
  column-gap: clamp(1.8rem, 3.5vw, 2.6rem);
}
.pin-grid .pin-card {
  break-inside: avoid;
  margin-bottom: clamp(1.8rem, 3.5vw, 2.6rem);
  translate: none;   /* sin desplazamiento: en columnas se solaparían */
}
.pin-card {
  --lh: 1.65rem;
  position: relative;
  background: var(--paper-2);
  border: 1px solid rgba(27, 22, 18, .1);
  padding: 2.1rem 1.8rem 2rem;
  box-shadow: 0 18px 38px -22px rgba(27, 22, 18, .45);
  rotate: var(--rot, 0deg);
  translate: 0 var(--y, 0px);
  transition: rotate .3s ease, box-shadow .3s ease;
  background-image: repeating-linear-gradient(to bottom,
    transparent 0 calc(var(--lh) - 1px),
    rgba(14, 59, 45, .09) calc(var(--lh) - 1px) var(--lh));
}
.pin-card:hover {
  rotate: 0deg;
  box-shadow: 0 26px 48px -24px rgba(27, 22, 18, .5);
}
/* Cabecera de la reseña: nombre → @handle → estrellas (estilo perfil) */
.pin-head {
  margin-bottom: 1.15rem;
  padding-bottom: .95rem;
  border-bottom: 1.5px solid rgba(200, 55, 31, .3);
}
.pin-name {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.15;
  color: var(--ink);
}
.pin-handle {
  margin-top: .05rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.pin-stars {
  margin-top: .55rem;
  color: var(--star);
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: .12em;
}
.pin-text {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 420;
  font-size: 1.05rem;
  line-height: var(--lh);
  color: var(--ink);
  text-wrap: pretty;
}
/* Reseña pendiente (hueco reservado, p. ej. para Eugenia) */
.pin-card--pending {
  border-style: dashed;
  border-color: rgba(27, 22, 18, .28);
  box-shadow: none;
  background: transparent;
}
.pin-stars--empty { color: rgba(27, 22, 18, .3); }
.pin-text--pending {
  font-style: italic;
  color: var(--ink-soft);
  border: 1.5px dashed rgba(27, 22, 18, .25);
  border-radius: 12px;
  padding: 1.4rem;
  min-height: 7.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.reviews-badge .stars { color: var(--red); }

/* ---------- Horario escolar ---------- */
.timetable {
  margin-top: clamp(1.6rem, 3vw, 2.2rem);
  max-width: 900px;
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  box-shadow: 7px 7px 0 rgba(27, 22, 18, .12);
}
.tt-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .3rem 1.5rem;
  padding: .85rem 1.2rem;
  border-bottom: 1.5px solid var(--ink);
  font-weight: 800;
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.tt-caption em { font-style: normal; color: var(--red); }
.timetable table { width: 100%; border-collapse: collapse; }
.timetable th,
.timetable td {
  border: 1px solid rgba(27, 22, 18, .22);
  padding: .85rem 1rem;
  text-align: left;
  vertical-align: top;
}
.timetable thead th {
  background: var(--green);
  color: var(--cream);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  border-color: var(--green-2);
}
.timetable tbody th {
  width: 86px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(27, 22, 18, .035);
}
.tt-off {
  color: rgba(27, 22, 18, .38);
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: 1.1rem;
}
.tt-slot { background: rgba(255, 214, 102, .16); }
.tt-slot b {
  display: block;
  font-family: var(--font-display);
  font-weight: 520;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}
.tt-slot > span {
  display: block;
  margin: .2rem 0 .35rem;
  font-weight: 800;
  font-size: .88rem;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.tt-slot .hand {
  font-size: 1.02rem;
  color: var(--ink-soft);
  rotate: -2deg;
  display: inline-block;
}
.tt-slot .more-link { font-size: .82rem; }
.tt-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1rem 1.2rem;
  border-top: 1.5px solid var(--ink);
}
.tt-foot p { font-size: .92rem; color: var(--ink-soft); max-width: 52ch; }
.tt-foot p strong { color: var(--ink); }

/* ---------- Pestañas tipo carpeta de expediente (página examen) ---------- */
.exam .tabs {
  border: none;
  padding: 0;
  gap: .4rem;
  margin-bottom: 0;
}
.exam .tab {
  background: rgba(252, 250, 244, .07);
  border: 1px solid var(--line-dark);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  padding: .7rem 1.35rem .85rem;
}
.exam .tab.is-active {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}
.exam .tab-panels {
  background: var(--paper);
  color: var(--ink);
  border-radius: 0 16px 16px 16px;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: 0 34px 70px -42px rgba(0, 0, 0, .55);
}
.exam .exam-card { background: var(--paper-2); border-color: var(--line); }
.exam .exam-card h3 { color: var(--ink); }
.exam .exam-card > p { color: var(--ink-soft); }
.exam .exam-tag { color: var(--red); }
.exam .exam-facts dt { color: var(--ink-soft); }
.exam .exam-facts dd { color: var(--ink); }
.exam .bar { background: rgba(27, 22, 18, .12); }
.exam .bar em { color: var(--ink-soft); }
.exam .exam-note {
  background: rgba(255, 214, 102, .18);
  border-left-color: var(--red);
  color: var(--ink-soft);
}
.exam .exam-note strong { color: var(--ink); }
.exam .final-block { background: var(--paper-2); border-color: var(--line); }
.exam .final-block h3 { color: var(--ink); }
.exam .final-block p { color: var(--ink-soft); }
.exam .final-block strong { color: var(--red); }
.exam-source-light { color: var(--ink-soft); }
.exam-source-light a { color: var(--ink); }
.exam .final-block-alt strong { color: var(--ink-soft); }

/* ---------- Cita del preparador ---------- */
.bio-grid {
  display: grid;
  grid-template-columns: .6fr 1.4fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.prep-photo.small { max-width: 300px; }
.section-dark .prep-placeholder {
  background: rgba(252, 250, 244, .06);
  border-color: rgba(243, 237, 223, .35);
  color: rgba(243, 237, 223, .55);
}
.section-dark .prep-placeholder svg { color: rgba(243, 237, 223, .3); }
.section-dark .prep-photo figcaption { color: rgba(243, 237, 223, .7); }
.bio-grid blockquote {
  font-family: var(--font-display);
  font-weight: 420;
  font-size: clamp(1.3rem, 2.3vw, 1.75rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--cream);
  text-wrap: balance;
}
.bio-grid blockquote em {
  font-style: italic;
  color: var(--yellow);
}
.signature {
  font-size: 2rem;
  color: var(--yellow);
  rotate: -2deg;
  display: inline-block;
  margin-top: 1.2rem;
}

/* ---------- Cierre tipo examen ---------- */
.exam-end-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  font-weight: 800;
  font-size: .7rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: rgba(243, 237, 223, .55);
  margin-bottom: 1.5rem;
}
.exam-end-rule::before,
.exam-end-rule::after {
  content: "";
  height: 1px;
  width: min(130px, 18vw);
  background: rgba(243, 237, 223, .25);
}
.cta-final .hand-cream {
  display: inline-block;
  margin-top: 1.3rem;
  font-size: 1.35rem;
  color: rgba(243, 237, 223, .75);
  rotate: -2deg;
}

/* ---------- Formulario tipo instancia ---------- */
.form-head {
  text-align: center;
  padding-bottom: 1.1rem;
  margin-bottom: 1.5rem;
  border-bottom: 4px double var(--ink);
}
.form-head strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 640;
  font-size: 1.2rem;
  letter-spacing: .01em;
}
.form-head small {
  font-weight: 800;
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.contact-form { rotate: .4deg; border-radius: 8px; }
.contact-form .field input,
.contact-form .field select,
.contact-form .field textarea {
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(27, 22, 18, .4);
  border-radius: 0;
  padding: .55rem .15rem;
}
.contact-form .field input:focus,
.contact-form .field select:focus,
.contact-form .field textarea:focus {
  outline: none;
  border-bottom-color: var(--red);
  box-shadow: 0 2px 0 0 var(--red);
}
.contact-form .field label { font-size: .68rem; letter-spacing: .14em; }

/* ---------- Fichas por comunidad (página examen) ---------- */
.ccaa-grid {
  margin-top: clamp(2.2rem, 4vw, 3.2rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 3vw, 2.4rem);
  align-items: start;
}
.ccaa-card {
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  box-shadow: 7px 7px 0 rgba(27, 22, 18, .1);
  padding: 2rem 1.9rem;
}
.ccaa-card.ccaa-soon { border-style: dashed; }
.ccaa-tag {
  font-weight: 800;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--red);
}
.ccaa-card h3 {
  font-size: 1.6rem;
  margin: .5rem 0 1.1rem;
}
.ccaa-card ul {
  display: grid;
  gap: .9rem;
}
.ccaa-card li {
  position: relative;
  padding-left: 2.1rem;
  color: var(--ink-soft);
  font-size: .98rem;
}
.ccaa-card li::before {
  content: "✓";
  position: absolute;
  left: .1rem;
  top: -.15rem;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--red);
  rotate: -8deg;
}
.ccaa-card li strong { color: var(--ink); }
.ccaa-card .more-link { margin-top: 1.3rem; }
.ccaa-card .btn { margin-top: 1.4rem; }
.ccaa-why { margin-top: 1.2rem; }
.ccaa-why .more-link { margin-top: 0; font-size: .92rem; }

/* Tablón de reseñas con una sola ficha (variante) */
.pin-grid.pin-solo {
  grid-template-columns: min(460px, 100%);
  justify-content: center;
}
.pin-grid.pin-solo .pin-card { rotate: -1.5deg; }

/* Nota de "otras comunidades" bajo el selector */
.ccaa-otras {
  grid-column: 1 / -1;
  box-shadow: none;
  border-width: 1px;
  border-style: dashed;
  padding: 1.4rem 1.7rem;
}
.ccaa-otras p {
  color: var(--ink-soft);
  font-size: .95rem;
  max-width: 75ch;
  margin-top: .4rem;
}
.ccaa-otras p strong { color: var(--ink); }
.ccaa-otras .more-link { font-size: .88rem; margin-left: .35rem; }

/* ---------- Responsive V3 ---------- */
@media (max-width: 1024px) {
  .edit-grid { grid-template-columns: 1fr; }
  .edit-grid > .section-head { position: static; }
  .pin-grid { grid-template-columns: 1fr 1fr; }
  .bio-grid { grid-template-columns: 1fr; }
  .bio-grid .prep-photo { margin-inline: 0; }
}
@media (max-width: 760px) {
  .pin-grid { column-count: 1; }
  .pin-card { translate: 0 0; }
  .ccaa-grid { grid-template-columns: 1fr; }
  .clipping-body { text-align: left; font-size: .98rem; }
  .clipping { padding: 1.2rem 1.3rem 1.4rem; }
  .timetable .tt-lj { display: none; }
  .timetable th, .timetable td { padding: .65rem .6rem; }
  .tt-slot b { font-size: .98rem; }
  .timetable tbody th { width: 60px; font-size: .6rem; }
  .exam .tab { padding: .6rem .85rem .7rem; font-size: .85rem; flex: 1 1 auto; }
  .edit-num { text-align: left; }
}

/* ==========================================================================
   V4 — FX: coreografía del folio, split de titulares, transiciones de página,
   línea de boli, sello APTO, botones magnéticos y deriva.
   Todo bajo html.fx (solo se activa sin prefers-reduced-motion).
   ========================================================================== */

/* ---------- Transiciones entre páginas: ELIMINADAS a propósito ----------
   Las View Transitions dejaban a veces su capa de captura sin limpiar tras
   navegar, bloqueando todos los clics de la página ("los enlaces no van").
   En una web estática la navegación ya es instantánea: fiabilidad > fundido.
   No reintroducir @view-transition sin probar clics encadenados. */

/* ---------- Titulares palabra a palabra ---------- */
.st-w { display: inline-block; }
html.fx .st .st-w {
  opacity: 0;
  transform: translateY(.7em) rotate(2deg);
}
html.fx .st.st-go .st-w {
  opacity: 1;
  transform: none;
  transition: opacity .5s ease var(--wd, 0s),
              transform .62s cubic-bezier(.2, .7, .2, 1) var(--wd, 0s);
}

/* El círculo del titular se dibuja DESPUÉS del texto: el JS añade .circle-go
   cuando las fuentes han cargado Y la última palabra terminó su transición. */
html.fx .hero-tagline .draw {
  stroke-dashoffset: 1;
  /* opacity 0 además del dashoffset: el remate redondeado del trazo
     asoma como un puntito si solo se usa el guion */
  opacity: 0;
  transition: stroke-dashoffset 1s cubic-bezier(.6, 0, .3, 1) .1s,
              opacity .05s linear .1s;
}
html.fx .hero-tagline .circled.circle-go .draw {
  stroke-dashoffset: 0;
  opacity: .95;
}

/* ---------- Coreografía del folio corregido ---------- */
html.fx .sheet-main .redline {
  text-decoration-color: transparent;
  transition: text-decoration-color .5s ease .15s;
}
html.fx .sheet-main .strike {
  text-decoration-color: transparent;
  transition: text-decoration-color .4s ease .6s;
}
html.fx .sheet-main.marked .redline,
html.fx .sheet-main.marked .strike { text-decoration-color: var(--red); }

html.fx .sheet-main .draw {
  stroke-dashoffset: 1;
  transition: stroke-dashoffset .7s cubic-bezier(.6, 0, .3, 1) var(--cd, .4s);
}
html.fx .sheet-main.marked .draw { stroke-dashoffset: 0; }

html.fx .sheet-main .ul-lila {
  background-size: 0% 100%;
  transition: background-size .55s cubic-bezier(.5, 0, .3, 1) var(--cd, 0ms);
}
html.fx .sheet-main.marked .ul-lila { background-size: 100% 100%; }

html.fx .sheet-main .fix,
html.fx .sheet-main .astmark,
html.fx .sheet-main .margin-note,
html.fx .sheet-main .score,
html.fx .sheet-main .stamp { opacity: 0; }
html.fx .sheet-main.marked .fix,
html.fx .sheet-main.marked .astmark,
html.fx .sheet-main.marked .margin-note,
html.fx .sheet-main.marked .score {
  animation: fx-pop .5s cubic-bezier(.2, .8, .3, 1.25) var(--cd, 0s) both;
}
html.fx .sheet-main.marked .stamp {
  animation: fx-slam .55s cubic-bezier(.2, .85, .3, 1) var(--cd, 2.1s) both;
}
html.fx .sheet-main.stamped { animation: fx-shake .2s linear 1; }

/* Coreografía de la cabecera: las notas del tribunal aparecen una a una */
html.fx .grade-sheet .gs-mark { opacity: 0; }
html.fx .grade-sheet.graded .gs-mark {
  animation: fx-pop .45s cubic-bezier(.2, .8, .3, 1.25) var(--gd, 0s) both;
}

@keyframes fx-pop {
  0%   { opacity: 0; scale: .3; }
  70%  { opacity: 1; scale: 1.12; }
  100% { opacity: 1; scale: 1; }
}
@keyframes fx-slam {
  0%   { opacity: 0; scale: 2.3; filter: blur(3px); }
  55%  { opacity: 1; scale: .92; filter: blur(0); }
  75%  { scale: 1.05; }
  100% { opacity: .88; scale: 1; }
}
@keyframes fx-shake {
  25% { translate: 1.6px 1px; }
  50% { translate: -1.6px -1px; }
  75% { translate: 1px -1.4px; }
}

/* ---------- Sello APTO en el cierre ---------- */
.cta-final.has-apto {
  position: relative;
  overflow: clip;
}
.apto-stamp {
  position: absolute;
  right: clamp(.5rem, 7vw, 6rem);
  top: 16%;
  rotate: 12deg;
  border: 4px solid var(--yellow);
  outline: 2px solid var(--yellow);
  outline-offset: 6px;
  border-radius: 12px;
  color: var(--yellow);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  letter-spacing: .22em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.02;
  padding: .5rem 1.2rem .5rem 1.45rem;
  opacity: .85;
  pointer-events: none;
}
html.fx .has-apto .apto-stamp { opacity: 0; }
html.fx .has-apto.aptoed .apto-stamp {
  animation: fx-slam .6s cubic-bezier(.2, .85, .3, 1) .25s both;
}
@media (max-width: 760px) {
  .apto-stamp {
    position: static;
    display: inline-block;
    margin-top: 1.8rem;
    rotate: -6deg;
    font-size: 1.3rem;
    letter-spacing: .16em;
    border-width: 3px;
  }
}

/* ---------- Línea de boli (progreso de lectura) ---------- */
.pen-progress {
  position: fixed;
  inset: 0 auto 0 clamp(1rem, 4vw, 3.2rem);
  width: 2px;
  z-index: 50;
  pointer-events: none;
  background: rgba(200, 55, 31, .1);
}
.pen-progress i {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: calc(var(--p, 0) * 100%);
  background: var(--red);
  opacity: .45;
}
.pen-progress::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(var(--p, 0) * 100%);
  translate: -50% -3px;
  width: 9px;
  height: 9px;
  background: var(--red);
  border-radius: 50% 50% 50% 0;
  rotate: 45deg;
}
@media (max-width: 1024px) {
  .pen-progress { display: none; }
}

/* ---------- Botones magnéticos ---------- */
.btn-magnet {
  transition: translate .3s cubic-bezier(.2, .7, .3, 1),
              transform .2s ease, background-color .2s ease,
              color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

/* ---------- Deriva sutil al hacer scroll ---------- */
.clipping { translate: 0 var(--drift, 0px); }
.pin-card { translate: 0 calc(var(--y, 0px) + var(--drift, 0px)); }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .draw {
    stroke-dashoffset: 0;
    transition: none;
  }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .bar-fill { transition: none; width: var(--w); }
  .sheet-stack { transition: none !important; transform: none !important; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
