/*
DIRECCIÓN VISUAL «AULA CÁLIDA» (propuesta D, noviembre de 2026)
VOICE: amable, claro y profesional; un producto para docentes ocupados con el calor de un cuaderno de aula.
IDEA: papel crema con puntos, tarjetas blancas con cinta adhesiva, botones «de goma», subrayado a mano.
COLOUR and TYPE: tinta azul marino, índigo (acción), teal oscuro, coral y girasol de acento. Fredoka (títulos) + Plus Jakarta Sans (texto), alojadas en /assets/fonts.
CONTRASTE: el texto blanco solo va sobre índigo, teal oscuro o tinta; coral y girasol solo de acento o con texto oscuro.
FICHAS: dentro de .sheet se restauran las fuentes neutras y el papel blanco; nada de la decoración llega a la impresión.
*/
@font-face { font-family: "Fredoka Variable"; font-style: normal; font-display: swap; font-weight: 300 700; src: url(/assets/fonts/fredoka-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans Variable"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root {
  color-scheme: light dark;
  --brand: #4f46e5; --brand-ink: #3730a3; --brand-soft: #eef0ff; --on-brand: #fff; --press: #3730a3;
  --coral: #ff7a59; --coral-ink: #b93f22; --sun: #ffc93c; --sun-soft: #fff3cf; --mint: #14b8a6; --teal: #0f766e; --teal-soft: #dcf4f0;
  --ink: #1e2a4a; --ink-strong: #1e2a4a; --muted: #586079;
  --bg: #fffaf3; --paper: #ffffff; --wash: #f6efe3; --line: #efe4d3; --field: #fffaf3; --dots: rgba(30,42,74,.07);
  --shadow: 0 1px 0 rgba(234,223,205,.9), 0 12px 30px -16px rgba(30,42,74,.22);
  --shadow-up: 0 1px 0 rgba(234,223,205,.9), 0 22px 40px -18px rgba(30,42,74,.3);
  --radius: 20px;
  --tape-1: rgba(255,201,60,.7); --tape-2: rgba(20,184,166,.45); --tape-3: rgba(255,122,89,.5); --tape-4: rgba(140,122,230,.5);
  /* --font y --font-text: interfaz. Las fichas usan --sheet-font y --sheet-text (ver .sheet) */
  --font: "Fredoka Variable", ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --font-text: "Plus Jakarta Sans Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sheet-font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --sheet-text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --brand: #a5a0ff; --brand-ink: #c4c0ff; --brand-soft: #262a5a; --on-brand: #14182b; --press: #6d66d9;
    --coral-ink: #ff9d82; --sun-soft: #3a3320; --teal: #5eead4; --teal-soft: #173a3a;
    --ink: #f3efe6; --ink-strong: #1e2a4a; --muted: #b6bacb; --bg: #14182b; --paper: #1d2238; --wash: #252b47; --line: #323a5c; --field: #161a2e; --dots: rgba(243,239,230,.06);
    --shadow: 0 1px 0 rgba(0,0,0,.25), 0 12px 30px -14px rgba(0,0,0,.5); --shadow-up: 0 1px 0 rgba(0,0,0,.25), 0 22px 40px -16px rgba(0,0,0,.6);
  }
}
:root[data-theme=dark] {
  color-scheme: dark;
  --brand: #a5a0ff; --brand-ink: #c4c0ff; --brand-soft: #262a5a; --on-brand: #14182b; --press: #6d66d9;
  --coral-ink: #ff9d82; --sun-soft: #3a3320; --teal: #5eead4; --teal-soft: #173a3a;
  --ink: #f3efe6; --ink-strong: #1e2a4a; --muted: #b6bacb; --bg: #14182b; --paper: #1d2238; --wash: #252b47; --line: #323a5c; --field: #161a2e; --dots: rgba(243,239,230,.06);
  --shadow: 0 1px 0 rgba(0,0,0,.25), 0 12px 30px -14px rgba(0,0,0,.5); --shadow-up: 0 1px 0 rgba(0,0,0,.25), 0 22px 40px -16px rgba(0,0,0,.6);
}
:root[data-theme=light] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--font-text); overflow-x: clip;
  background-image: radial-gradient(circle at 1px 1px, var(--dots) 1px, transparent 0); background-size: 22px 22px; }
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-ink); }
h1, h2, h3, h4 { font-family: var(--font); line-height: 1.12; letter-spacing: -.005em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 600; }
h3 { font-size: 1.18rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: .5rem 1rem; z-index: 50; border-radius: 8px; }
.skip:focus { left: 8px; }
.ico { width: 1.25em; height: 1.25em; flex: none; }
.wrap { width: min(100% - 2rem, 1200px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; justify-content: center; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 68ch; }
.kicker { font-family: var(--font-text); font-weight: 800; color: var(--coral-ink); font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .6rem; }
.kicker a { text-decoration: none; }

/* Barra superior */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-family: var(--font); font-size: 1.3rem; font-weight: 600; }
.logo b { font-weight: 700; color: var(--brand); }
.logo-mark { width: 38px; height: 38px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 650; padding: .5rem .85rem; border-radius: 999px; font-size: .96rem; transition: background .2s, color .2s; }
.nav a:hover { background: var(--sun-soft); color: var(--ink); }
.nav a[aria-current=page] { color: var(--brand); background: var(--brand-soft); }
.nav .lang { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--line); margin-left: .4rem; }
.nav-toggle { display: none; margin-left: auto; background: var(--paper); border: 1px solid var(--line); color: var(--ink); border-radius: 14px; width: 44px; height: 44px; align-items: center; justify-content: center; }
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--line); padding: .6rem 1rem 1rem; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: .8rem; }
  .nav .lang { margin: .4rem 0 0; justify-content: center; }
}

/* Botones y formularios */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .7rem 1.25rem; border-radius: 16px; border: 0; background: var(--brand); color: var(--on-brand); font: 600 1.05rem/1.1 var(--font); text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 var(--press); margin-bottom: 4px; }
.btn:hover { background: var(--brand); color: var(--on-brand); box-shadow: 0 6px 0 var(--press); }
.btn:active { box-shadow: 0 1px 0 var(--press); }
.btn.ghost { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 2px var(--line), 0 4px 0 var(--line); }
.btn.ghost:hover { background: var(--sun-soft); color: var(--ink); box-shadow: 0 0 0 2px var(--line), 0 6px 0 var(--line); }
.btn.lg { min-height: 54px; padding: .85rem 1.45rem; font-size: 1.1rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .9rem; }
.field > label, .field > span { font-weight: 700; font-size: .92rem; }
select, input[type=text], input[type=search], textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--field); border: 2px solid var(--line); border-radius: 14px; padding: .6rem .8rem; min-height: 46px; width: 100%; }
select:focus, input:focus, textarea:focus { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--brand) 25%, transparent); }
textarea { resize: vertical; min-height: 110px; line-height: 1.4; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; font-size: .95rem; margin: .4rem 0 .9rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.help { color: var(--muted); font-size: .85rem; margin: -.4rem 0 .9rem; }
.notice { background: var(--sun-soft); border: 1px solid color-mix(in srgb, var(--sun) 60%, var(--line)); border-radius: 14px; padding: .6rem .8rem; font-size: .92rem; color: var(--ink); }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 .8rem; }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(2.4rem, 5vw, 4.5rem) 0 clamp(1.5rem, 4vw, 3rem); }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto; height: 125%; z-index: -1; background:
  radial-gradient(38% 48% at 18% 30%, color-mix(in srgb, var(--sun) 30%, transparent), transparent 70%),
  radial-gradient(34% 44% at 82% 22%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
  radial-gradient(30% 40% at 62% 82%, color-mix(in srgb, var(--mint) 18%, transparent), transparent 70%); }
.hero-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2rem; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 3.9rem); }
.squiggle { position: relative; white-space: nowrap; color: var(--brand); }
.squiggle svg { position: absolute; left: -2%; bottom: -.28em; width: 104%; height: .4em; overflow: visible; }
@media (max-width: 420px) { .squiggle { white-space: normal; } .squiggle svg { display: none; } .squiggle { text-decoration: underline 5px var(--sun); text-underline-offset: 6px; } }
.hero-art { width: 100%; height: auto; max-height: 440px; }
.art-title { font: 600 22px var(--font); fill: #1e2a4a; }
.art-letter { font: 600 16px var(--font); fill: #1e2a4a; }
.art-small { font: 600 13px var(--font-text); fill: #586079; }
.art-card { font: 600 28px var(--font); fill: #fff; }
@media (max-width: 860px) { .hero-in { grid-template-columns: 1fr; } .hero-art { max-height: 300px; order: 2; } }

/* Bandas y secciones */
.band { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.band.alt { background: color-mix(in srgb, var(--paper) 70%, transparent); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 1rem; margin-bottom: 1.2rem; }
.section-head h2 { margin: 0; }
.section-head a { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; text-decoration: none; white-space: nowrap; padding: .35rem .8rem; border-radius: 999px; background: var(--paper); box-shadow: var(--shadow); }
.sub { margin: 2rem 0 .8rem; font-size: 1.05rem; }
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 860px) { .split, .three { grid-template-columns: 1fr; } }
.page-head { padding: 1.2rem 0 1.4rem; }
.page-head.center .btn-row { justify-content: center; }
.content-block { margin: 2.2rem 0; }
.prose-wrap { max-width: 820px; }

/* Tarjetas de herramienta */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.tool-grid.compact { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .7rem; }
.tool-card { display: flex; gap: .95rem; align-items: flex-start; padding: 1.15rem; background: var(--paper); border: 1px solid transparent; border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.tool-card:hover { transform: translateY(-2px); border-color: var(--brand-soft); color: var(--ink); }
.tool-card strong { display: block; font-family: var(--font); font-weight: 600; font-size: 1.12rem; line-height: 1.22; margin-bottom: .2rem; }
.tool-card .tool-txt span { color: var(--muted); font-size: .9rem; line-height: 1.45; display: block; }
.compact .tool-card { padding: .8rem; box-shadow: none; border-color: var(--line); }
.compact .tool-card .tool-txt span { display: none; }
.tool-ico { width: 50px; height: 50px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--brand-soft); color: var(--brand); }
.tool-ico .ico { width: 26px; height: 26px; }
.tool-ico.lg { width: 66px; height: 66px; border-radius: 20px; }
.tool-ico.lg .ico { width: 34px; height: 34px; }
.ic-wordsearch, .ic-quiz, .ic-planner, .ic-wordsearch-es, .ic-quiz-es { background: #eef0ff; color: #4338ca; }
.ic-vocabsheet, .ic-scramble, .ic-posters, .ic-rubric { background: #fff3cf; color: #8a5a00; }
.ic-flashcards, .ic-bingo, .ic-challenges, .ic-handwriting, .ic-bingo-es { background: #ffe9e1; color: #b93f22; }
.ic-crossword, .ic-gapfill, .ic-builder, .ic-operations, .ic-crossword-es { background: #dcf4f0; color: #0f766e; }
.ic-matching, .ic-grammar, .ic-frames, .ic-organizers { background: #efeaff; color: #5b47c9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .tool-ico { filter: saturate(.9) brightness(.92); } }

/* Recursos, noticias, chips */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.res-card { background: var(--paper); border: 1px solid transparent; border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.res-card h3 { font-size: 1.18rem; margin: .55rem 0 .4rem; }
.res-card h3 a { color: var(--ink); text-decoration: none; }
.res-card h3 a:hover { color: var(--brand); }
.res-card p { color: var(--muted); font-size: .94rem; margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag { display: inline-block; font: 700 .76rem/1 var(--font-text); background: var(--brand-soft); color: var(--brand-ink); padding: .38rem .65rem; border-radius: 999px; }
.tag.soft { background: var(--wash); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .5rem .9rem; min-height: 40px; border-radius: 999px; background: var(--paper); border: 2px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 650; font-size: .92rem; }
.chip:hover { border-color: var(--coral); color: var(--coral-ink); }
.chip.res { background: var(--sun-soft); }
.news { list-style: none; padding: 0; margin: 0; }
.news li { display: grid; grid-template-columns: auto 1fr; gap: .2rem .7rem; padding: .85rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.news a { font-weight: 700; color: var(--ink); text-decoration: none; }
.news a:hover { color: var(--brand); }
.news time { grid-column: 2; color: var(--muted); font-size: .85rem; }
.explore { display: grid; gap: 1rem; align-content: start; }
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.area-card { display: flex; flex-direction: column; gap: .3rem; padding: 1.25rem; background: var(--paper); border: 1px solid transparent; border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.area-card:hover { border-color: var(--brand-soft); color: var(--ink); }
.area-card strong { font-family: var(--font); font-weight: 600; font-size: 1.18rem; }
.area-card span { color: var(--muted); font-size: .92rem; }
.area-card .ico { width: 34px; height: 34px; color: var(--coral-ink); margin-bottom: .3rem; }
.about-strip { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.about-strip > div { max-width: 720px; }
.about-strip p { color: var(--muted); margin: 0; }
.cta-band { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; background: #0f766e; color: #fff; border-radius: 30px; padding: clamp(1.4rem, 3vw, 2.2rem); margin: 2rem 0; }
.cta-band::after { content: ""; position: absolute; width: 300px; height: 300px; right: -90px; top: -130px; border-radius: 50%; background: radial-gradient(circle, rgba(255,201,60,.4), transparent 65%); pointer-events: none; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { margin: 0 0 .3rem; font-size: 1.35rem; }
.cta-band p { margin: 0; opacity: .9; }
.cta-band .btn { background: #fff; color: #1e2a4a; box-shadow: 0 4px 0 #0b4f4a; }
.guide-list { list-style: none; padding: 0; display: grid; gap: .8rem; margin: 0 0 1rem; }
.guide-list a { display: flex; gap: 1rem; align-items: flex-start; padding: 1.15rem; background: var(--paper); border: 1px solid transparent; border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.guide-list a:hover { border-color: var(--brand-soft); color: var(--ink); }
.guide-list .num { width: 42px; height: 42px; border-radius: 14px; background: var(--sun); color: #1e2a4a; font: 600 1.15rem var(--font); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.guide-list strong { display: block; font-family: var(--font); font-weight: 600; font-size: 1.15rem; }
.guide-list span span { color: var(--muted); font-size: .94rem; }

/* Filtros */
.filters { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; margin-bottom: 1.3rem; padding: 1.1rem 1.2rem; background: var(--paper); border: 0; border-radius: 24px; box-shadow: var(--shadow); }
.field.inline { margin: 0; min-width: 160px; }
.field.inline.grow { flex: 1; }
.empty { padding: 1.2rem; background: var(--paper); border-radius: var(--radius); border: 1px dashed var(--line); }

/* Migas */
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .88rem; color: var(--muted); padding-top: 1.1rem; }
.crumbs a { color: var(--muted); }
.crumbs .sep { opacity: .5; }

/* Página de herramienta */
.tool-head { display: flex; gap: 1.1rem; align-items: center; padding: 1rem 0 1.4rem; }
.tool-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: .2rem; }
.tool-head .lead { margin: 0; }
@media (max-width: 600px) { .tool-head { align-items: flex-start; gap: .8rem; } .tool-ico.lg { width: 48px; height: 48px; border-radius: 14px; } .tool-ico.lg .ico { width: 26px; height: 26px; } }
.tool-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.panel { background: var(--paper); border: 0; border-radius: 22px; padding: 1.3rem; box-shadow: var(--shadow); position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
.panel-title { font-size: 1.2rem; margin-bottom: 1rem; }
.actions { display: grid; grid-template-columns: 1fr; gap: .6rem; margin: .4rem 0 .8rem; }
.preview { min-height: 420px; }
/* mesa de trabajo punteada detrás de la ficha (solo en pantalla) */
.tool-page .preview { background: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 12%, transparent) 1px, transparent 0) 0 0 / 18px 18px, var(--wash); border-radius: 22px; padding: clamp(.7rem, 2.4vw, 1.6rem); }
@media (max-width: 920px) { .tool-layout { grid-template-columns: 1fr; } .panel { position: static; max-height: none; } }

/* ===== Ficha imprimible (siempre papel blanco) ===== */
/* La ficha es siempre papel blanco con los colores originales, sea cual sea el tema de la web (claro u oscuro) */
.sheet { --brand: #2346d8; --brand-ink: #1a36b0; --brand-soft: #e8edff; --coral: #ff6b4a; --sun: #ffc83d; --mint: #19a874; --ink: #161a2e; --muted: #5a6178; --bg: #f6f7fb; --paper: #ffffff; --wash: #eef1fa; --line: #dde2ee; --radius: 16px; color-scheme: light;
  --font: var(--sheet-font); --font-text: var(--sheet-text); font-family: var(--sheet-text); line-height: 1.6; -webkit-print-color-adjust: exact; print-color-adjust: exact; --s-ink: #161a2e; --s-muted: #5a6178; --s-line: #c9cfdd; --s-wash: #f1f3f9; background: #fff; color: var(--s-ink); border-radius: 6px; padding: clamp(1rem, 3vw, 2.2rem); box-shadow: 0 24px 50px -24px rgba(30,42,74,.4); border: 0; margin-bottom: 1.2rem; overflow-x: auto; }
/* Dentro de la ficha, los títulos y tablas conservan sus valores originales (:where no suma especificidad,
   así que las clases propias de cada ficha, como .ws-title o .poster-title, siguen mandando) */
:where(.sheet) :is(h1, h2, h3, h4) { font-family: var(--sheet-font); line-height: 1.15; letter-spacing: -.01em; }
:where(.sheet) h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; }
:where(.sheet) h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 800; }
:where(.sheet) h3 { font-size: 1.15rem; font-weight: 750; }
.ws-head { margin-bottom: 1.1rem; }
.ws-title { font: 800 clamp(1.5rem, 3vw, 2rem)/1.1 var(--font); text-align: center; margin: 0 0 .3rem; color: var(--s-ink); }
.ws-sub { text-align: center; color: var(--s-muted); margin: 0 0 .7rem; font-weight: 600; }
.ws-name { display: flex; gap: 1.5rem; }
.ws-name span { flex: 1; border-bottom: 1.5px solid var(--s-line); padding-bottom: .2rem; font-weight: 700; color: var(--s-muted); }
.pic { font-size: 1.35em; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.pic.big { font-size: 2.6rem; display: block; }
.pic.empty { width: 2.6rem; height: 2.6rem; border: 1.5px dashed var(--s-line); border-radius: 8px; }
.es { display: block; color: var(--s-muted); font-size: .85rem; }
.key { padding-left: 1.3rem; columns: 2 200px; }
.key.cols { columns: 3 160px; }
.key li { margin-bottom: .35rem; break-inside: avoid; }
.len { color: var(--s-muted); font-size: .85rem; margin-left: .3rem; }
.first { font-weight: 800; font-family: var(--font); font-size: 1.1rem; margin-right: .1rem; }
.line { display: inline-block; flex: 1; min-width: 120px; border-bottom: 1.5px solid var(--s-ink); height: 1.6em; }
.gap { display: inline-block; width: calc(var(--len, 6) * .62em + 1.2em); border-bottom: 1.5px solid var(--s-ink); height: 1.1em; margin: 0 .15em; vertical-align: baseline; }
/* sopa de letras */
.ws-grid { border-collapse: collapse; margin: 0 auto 1rem; width: auto; }
.ws-grid td { width: 2.2rem; height: 2.2rem; text-align: center; font: 800 1.2rem var(--font); border: 1px solid var(--s-line); color: var(--s-ink); }
.ws-grid.size-15 td { width: 1.85rem; height: 1.85rem; font-size: 1.05rem; }
.ws-grid td.hit { background: #ffd96b; box-shadow: inset 0 0 0 2px #e0a800; }
.ws-words { list-style: none; padding: 0; margin: 0; columns: 3 150px; font-weight: 700; }
.ws-words li { margin-bottom: .4rem; break-inside: avoid; }
.ws-words li::before { content: "☐ "; color: var(--s-muted); }
/* fichas de vocabulario */
.vs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .8rem; }
.vs-card { border: 2px solid var(--s-line); border-radius: 14px; padding: .8rem .5rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .35rem; break-inside: avoid; }
.vs-card strong { font: 800 1.1rem var(--font); }
.vs-grid.draw .vs-card { justify-content: space-between; }
.draw-box { width: 100%; aspect-ratio: 1; border: 1.5px dashed var(--s-line); border-radius: 10px; }
.vs-rows { display: grid; gap: .9rem; }
.vs-row { display: flex; align-items: center; gap: 1rem; break-inside: avoid; }
.vs-row .pic.big { width: 3.2rem; text-align: center; }
.vs-lines { flex: 1; display: flex; align-items: flex-end; gap: 1rem; }
.trace { font: 800 1.8rem var(--font); color: #c5cad8; letter-spacing: .08em; -webkit-text-stroke: .5px #9aa1b5; min-width: 9ch; }
.frame { margin-top: 1.2rem; font-size: 1.1rem; font-weight: 600; }
/* flashcards */
.fc-page { display: grid; gap: 0; border: 1.5px dashed var(--s-line); }
.fc-page.per-4 { grid-template-columns: repeat(2, 1fr); }
.fc-page.per-6 { grid-template-columns: repeat(2, 1fr); }
.fc-page.per-8 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .fc-page.per-6, .fc-page.per-8 { grid-template-columns: repeat(3, 1fr); } }
.fc { border: 1.5px dashed var(--s-line); min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: 1rem; text-align: center; break-inside: avoid; }
.per-4 .fc { min-height: 260px; }
.fc-pic { font-size: 4.2rem; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.per-4 .fc-pic { font-size: 6rem; }
.fc-word { font: 800 1.7rem var(--font); }
.per-4 .fc-word { font-size: 2.3rem; }
/* crucigrama */
.cw-grid { border-collapse: collapse; margin: 0 auto 1.2rem; width: auto; }
.cw-grid td { width: 2.2rem; height: 2.2rem; padding: 0; position: relative; }
.cw-grid td.cell { border: 1.5px solid var(--s-ink); background: #fff; }
.cw-grid td.blank { border: 0; }
.cw-grid .n { position: absolute; top: 1px; left: 3px; font-size: .62rem; font-weight: 800; color: var(--s-muted); }
.cw-grid .ch { display: flex; align-items: center; justify-content: center; height: 100%; font: 800 1.15rem var(--font); }
.cw-clues { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem 2rem; }
.cw-clues h3 { font-size: 1.05rem; color: var(--s-ink); }
.cw-clues ol { list-style: none; padding: 0; margin: 0; }
.cw-clues li { margin-bottom: .45rem; display: flex; align-items: center; gap: .4rem; }
.bank { margin-top: 1rem; padding: .7rem 1rem; background: var(--s-wash); border-radius: 10px; }
/* unir */
.match { display: grid; gap: .6rem; max-width: 640px; margin: 0 auto; }
.m-row { display: grid; grid-template-columns: 1fr 5rem 1fr; align-items: center; }
.m-left, .m-right { display: flex; align-items: center; gap: .6rem; font: 700 1.15rem var(--font); }
.m-left { justify-content: flex-end; }
.m-left .pic.big { font-size: 2.4rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--s-ink); flex: none; }
.es-word { font-weight: 700; }
/* completar frases */
.bank-box { display: flex; flex-wrap: wrap; gap: .5rem; border: 2px solid var(--s-line); border-radius: 12px; padding: .7rem; margin-bottom: 1.1rem; }
.bank-box span { font: 700 1rem var(--font); padding: .2rem .6rem; background: var(--s-wash); border-radius: 8px; }
.gap-list { padding-left: 1.4rem; display: grid; gap: .9rem; font-size: 1.12rem; }
/* gramática */
.rule-box { border: 2px dashed #8f6ad8; background: #f6f1ff; border-radius: 12px; padding: .6rem 1rem; margin-bottom: 1.1rem; break-inside: avoid; page-break-inside: avoid; }
.rule-title { font: 800 .95rem var(--font); color: #6b3fc4; margin: 0 0 .25rem; text-transform: uppercase; letter-spacing: .04em; }
.rule-box ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .15rem; }
.rule-box b { color: #4d2a99; }
.choice { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: 0 .2em; }
.choice span { border: 1.5px solid var(--s-line); border-radius: 999px; padding: 0 .55rem; font-weight: 700; white-space: nowrap; }
.choice i { font-style: normal; color: var(--s-muted); }
.hint { color: var(--s-muted); font-weight: 700; }
.order-list { padding-left: 1.4rem; display: grid; gap: 1.1rem; font-size: 1.08rem; }
.order-list li { break-inside: avoid; }
.order-words { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .45rem; }
.order-words span { border: 1.5px solid var(--s-line); background: var(--s-wash); border-radius: 8px; padding: .1rem .55rem; font-weight: 700; }
.order-words .end { border-style: dashed; background: none; }
.order-line { border-bottom: 1.5px solid var(--s-ink); min-height: 1.8em; padding-bottom: .1rem; }
/* bingo */
.bingo-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.bingo-card { border: 2px solid var(--s-ink); border-radius: 14px; padding: .8rem; break-inside: avoid; page-break-inside: avoid; }
.bingo-title { display: flex; justify-content: space-between; font: 800 1rem var(--font); margin-bottom: .5rem; }
.bingo-title span { background: #ffc83d; padding: 0 .5rem; border-radius: 6px; }
.bingo { width: 100%; border-collapse: collapse; table-layout: fixed; }
.bingo td { border: 1.5px solid var(--s-line); text-align: center; height: 5.2rem; padding: .2rem; vertical-align: middle; }
.bingo.g4 td { height: 4.2rem; }
.bingo .pic { display: block; font-size: 2rem; }
.bingo.g4 .pic { font-size: 1.6rem; }
.bingo .w { display: block; font: 700 .85rem/1.15 var(--font); overflow-wrap: anywhere; }
.bingo-name { margin-top: .5rem; font-size: .85rem; color: var(--s-muted); }
/* quiz */
.quiz { padding-left: 1.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem 2rem; }
.q { break-inside: avoid; }
.q-prompt { font-weight: 700; margin-bottom: .4rem; }
.q-prompt .pic.big { font-size: 2.8rem; }
.q-opts { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.box { display: inline-flex; width: 1.6rem; height: 1.6rem; border: 1.5px solid var(--s-ink); border-radius: 50%; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; margin-right: .3rem; }
/* desordenadas */
.scr-list { padding-left: 1.5rem; display: grid; gap: 1rem; }
.scr-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-size: 1.1rem; }
.scr { display: inline-flex; gap: .25rem; }
.scr i { font: 800 1.15rem var(--font); font-style: normal; width: 1.8rem; height: 1.8rem; display: inline-flex; align-items: center; justify-content: center; background: var(--s-wash); border-radius: 6px; text-transform: lowercase; }
.arrow { color: var(--s-muted); }
/* recursos: frases */
.phrase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.phrase { border: 2px solid #2346d8; border-radius: 14px; padding: .9rem; text-align: center; break-inside: avoid; }
.phrase strong { display: block; font: 800 1.02rem/1.25 var(--font); margin: .3rem 0; }
.phrase small { color: var(--s-muted); }
.resource-sheet { margin: 1.5rem 0; }
/* cuadrícula para colorear un diagrama de barras en una ficha de recurso */
.resource-sheet .chart-grid td { border: 1.5px solid var(--s-line); height: 2.4em; width: 9%; }
.resource-sheet .chart-grid th { text-align: center; }
/* texto de lectura para los primeros cursos: letra grande y más interlineado */
.resource-sheet .lectura { font-size: 1.25em; line-height: 1.85; }
.no-print-sub { text-align: center; }

/* Artículos */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; align-items: start; padding-bottom: 2rem; }
.article-layout .side { position: sticky; top: 90px; }
.article-layout .side .tool-grid.compact { grid-template-columns: 1fr; }
.article-layout .side h2 { font-size: 1.1rem; }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } .article-layout .side { position: static; } }
.prose { max-width: 760px; padding-top: .8rem; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose li { margin-bottom: .35rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.byline { color: var(--muted); font-size: .92rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; background: var(--paper); border: 0; box-shadow: var(--shadow); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.2rem 0; }
.facts div { display: flex; flex-direction: column; }
.facts dt { font-size: .8rem; font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }
.facts abbr { text-decoration: none; border-bottom: 1px dotted var(--muted); cursor: help; }
.toc { background: var(--paper); border: 0; box-shadow: var(--shadow); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1rem 0 1.5rem; }
.toc ol { margin: .5rem 0 0; }
.series { margin-top: 3rem; padding: 1.3rem 1.4rem; border-radius: var(--radius); background: var(--sun-soft); }
.series ol { margin: .5rem 0 0; }
.series [aria-current] { font-weight: 800; }
.table-wrap { overflow-x: auto; margin: 1rem 0 1.4rem; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prose table, .content-block table { background: var(--paper); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--wash); font-family: var(--font); }
blockquote { margin: 1.2rem 0; padding: .8rem 1.2rem; border-left: 4px solid var(--sun); background: var(--paper); border-radius: 0 12px 12px 0; }
.crit-quote .crit-label { font: 600 .9rem var(--font); color: var(--brand); margin-bottom: .3rem; }
.crit-quote p:last-child { margin: 0; font-size: .9rem; }
.region { display: inline-block; font: 700 .72rem/1 var(--font); background: var(--wash); color: var(--muted); padding: .3rem .55rem; border-radius: 999px; margin-left: .3rem; vertical-align: middle; }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: .7rem; }
.steps li { counter-increment: s; display: flex; gap: .8rem; align-items: flex-start; }
.steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 12px; background: var(--sun); color: #1e2a4a; font: 600 1.05rem var(--font); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.faq details, .ce details, details.saberes { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: .2rem 1rem; margin-bottom: .6rem; }
summary { cursor: pointer; font-weight: 700; padding: .7rem 0; list-style-position: outside; }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: .6rem; }
.related { margin: 2rem 0; }
.print-row { margin: .5rem 0 1.2rem; }
.curriculum-box { margin: 2rem 0; background: var(--paper); border: 0; box-shadow: var(--shadow); border-radius: var(--radius); padding: .3rem 1.2rem; }
.curriculum-box summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.curriculum-box h3 { font-size: 1rem; margin-top: 1rem; }
.cb-body li { margin-bottom: .6rem; font-size: .95rem; }
.desc-codes { color: var(--muted); font-size: .8rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Explorador curricular */
[role=tablist] { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; position: sticky; top: 64px; z-index: 5; background: var(--bg); padding: .6rem 0; }
[role=tab] { font: 600 1.02rem var(--font); padding: .6rem 1.05rem; min-height: 44px; border-radius: 999px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
[role=tab] span { font-weight: 600; color: var(--muted); font-size: .85rem; margin-left: .2rem; }
[role=tab][aria-selected=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
[role=tab][aria-selected=true] span { color: var(--bg); opacity: .85; }
.ce { background: var(--paper); border: 0; box-shadow: var(--shadow); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin-bottom: 1rem; }
.ce h3 { font-family: var(--font-text); font-weight: 700; font-size: 1.05rem; line-height: 1.45; letter-spacing: 0; }
.ce-n { display: inline-block; background: var(--sun); color: #1e2a4a; border-radius: 8px; padding: .1rem .45rem; margin-right: .3rem; font-size: .9rem; }
.ce details { background: var(--wash); }
.crit-list { list-style: none; padding: 0; margin: .8rem 0; display: grid; gap: .7rem; }
.crit-list > li { border-left: 3px solid var(--brand); padding: .2rem 0 .2rem .9rem; }
.crit-list > li:target { background: color-mix(in srgb, var(--sun) 20%, transparent); border-radius: 0 10px 10px 0; }
.crit-list p { margin: 0 0 .2rem; }
.crit-id { color: var(--brand); margin-right: .3rem; }
.crit-links { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .4rem; font-size: .85rem; color: var(--muted); }
.crit-links .chip { min-height: 32px; padding: .3rem .7rem; font-size: .82rem; }
.saberes h4 { margin-top: 1rem; }
.saberes li { font-size: .93rem; margin-bottom: .3rem; }

/* Anuncios (solo si se activan) */
.ad { margin: 2rem 0; text-align: center; min-height: 100px; }
.ad-label { display: block; font-size: .72rem; color: var(--muted); margin-bottom: .3rem; text-transform: uppercase; letter-spacing: .04em; }

/* Consentimiento */
.consent { position: fixed; z-index: 60; left: 1rem; right: 1rem; bottom: 1rem; max-width: 640px; margin-inline: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 1rem 1.2rem; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.consent p { margin: 0 0 .8rem; font-size: .95rem; }
.consent-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }

/* Pie */
.footer { margin-top: 3rem; background: color-mix(in srgb, var(--paper) 75%, transparent); border-top: 1px solid var(--line); padding: 2.8rem 0 1.6rem; font-size: .95rem; }
.footer-in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer h2 { font-size: 1.05rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .45rem; }
.footer a { color: var(--muted); }
.footer-brand p { color: var(--muted); max-width: 42ch; margin-top: .7rem; }
.footer-base { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1rem; color: var(--muted); font-size: .85rem; }
@media (max-width: 760px) { .footer-in { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Impresión: solo la ficha */
@media print {
  @page { margin: 12mm; }
  /* Siempre colores de papel al imprimir, también si el dispositivo está en modo oscuro (misma especificidad que las reglas del modo oscuro) */
  :root, :root:not([data-theme=light]), :root[data-theme=dark] { color-scheme: light; --brand: #4f46e5; --brand-ink: #3730a3; --brand-soft: #eef0ff; --on-brand: #fff; --coral-ink: #b93f22; --sun-soft: #fff3cf; --teal: #0f766e; --teal-soft: #dcf4f0;
    --ink: #161a2e; --muted: #5a6178; --bg: #fff; --paper: #fff; --wash: #f6efe3; --line: #c9cfdd; --field: #fff; --shadow: none; --shadow-up: none; }
  body { background: #fff; background-image: none; color: #161a2e; font-size: 12pt; }
  .tool-page .preview { background: none; padding: 0; border-radius: 0; }
  .sheet { box-shadow: none !important; }
  .topbar, .footer, .crumbs, .panel, .tool-head, .tool-page .prose-wrap, .ad, .consent, .no-print, .side, .filters, .curriculum-box, .series, .toc, [role=tablist] { display: none !important; }
  .tool-page .preview { min-height: 0; }
  .tool-layout { display: block; }
  .sheet { box-shadow: none; border: 0; border-radius: 0; padding: 0; margin: 0; overflow: visible; }
  .page-break { break-before: page; }
  .fc-page { break-after: page; grid-template-columns: repeat(2, 1fr) !important; }
  .fc-page.per-4 .fc { height: 120mm; }
  .fc-page.per-6 .fc { height: 82mm; }
  .fc-page.per-8 .fc { height: 61mm; min-height: 0; }
  .bingo-wrap { grid-template-columns: 1fr; gap: 10mm; }
  .bingo-card:nth-child(2n) { break-after: page; }
  .ws-grid td { width: 1.05cm; height: 1.05cm; font-size: 15pt; }
  .ws-grid.size-15 td { width: .9cm; height: .9cm; font-size: 13pt; }
  .cw-grid td { width: .95cm; height: .95cm; }
  .article-layout { display: block; }
  .prose { max-width: none; }
  .tool-page .notice { display: none; }
  a { color: inherit; text-decoration: none; }
  body.print-only-sheet .prose > *:not(.resource-sheet) { display: none !important; }
  body.print-only-sheet .resource-sheet { margin: 0; }
}

/* ===== Portada: entradas por necesidad ===== */
.needs-band { padding-top: clamp(1.2rem, 3vw, 2rem); }
.needs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.3rem 1.2rem; padding-top: 10px; }
.needs-grid > :first-child { background: linear-gradient(165deg, var(--paper) 45%, var(--sun-soft)); }
@media (max-width: 700px) { .needs-grid { grid-template-columns: 1fr; } }
.need-card { position: relative; display: flex; flex-direction: column; gap: .4rem; padding: 1.5rem 1.35rem 1.3rem; background: var(--paper); border: 1px solid transparent; border-radius: 22px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
/* cinta adhesiva */
.need-card::before { content: ""; position: absolute; top: -10px; left: 1.6rem; width: 58px; height: 20px; transform: rotate(-4deg); border-radius: 3px; background: var(--tape-1); }
.need-card:nth-child(2)::before { background: var(--tape-2); transform: rotate(3deg); }
.need-card:nth-child(3)::before { background: var(--tape-3); }
.need-card:nth-child(4)::before { background: var(--tape-4); transform: rotate(4deg); }
.need-card:hover { border-color: var(--brand-soft); transform: translateY(-4px) rotate(-.4deg); box-shadow: var(--shadow-up); }
.need-card h3 { margin: .3rem 0 0; font-size: 1.3rem; }
.need-card h3 a { color: var(--ink); text-decoration: none; }
.need-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.need-card h3 a:hover { color: var(--brand); }
.need-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.need-ico { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 16px; background: var(--brand-soft); color: var(--brand-ink); transition: transform .25s; }
.need-card:hover .need-ico { transform: rotate(-8deg) scale(1.06); }
.needs-grid > :first-child .need-ico { background: var(--brand); color: var(--on-brand); }
.needs-grid > :nth-child(2) .need-ico { background: var(--teal-soft); color: var(--teal); }
.needs-grid > :nth-child(3) .need-ico { background: #ffe9e1; color: #b93f22; }
.needs-grid > :nth-child(4) .need-ico { background: #efeaff; color: #5b47c9; }
.need-ico .ico { width: 26px; height: 26px; }
.need-links { position: relative; z-index: 1; list-style: none; padding: 0; margin: auto 0 0; padding-top: .6rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.need-links a { display: inline-flex; align-items: center; min-height: 34px; padding: .25rem .75rem; border-radius: 999px; background: var(--paper); box-shadow: 0 0 0 2px var(--line); font-size: .86rem; font-weight: 700; text-decoration: none; color: var(--ink); }
.need-links a:hover { box-shadow: 0 0 0 2px var(--coral); color: var(--coral-ink); }
.news .small { grid-column: 2; font-size: .85rem; }
@media (prefers-reduced-motion: reduce) { .need-card, .need-card:hover { transition: none; transform: none; } }

/* ===== Carteles de aula =====
   Cada .poster-page es una hoja A4 (210 × 297). Todo lo de dentro se mide en cqw
   (1 % del ancho de la hoja), así la vista previa y la impresión son idénticas. */
.sheet:has(.posters) { background: #eef0f6; }
.posters { display: grid; gap: 1.4rem; justify-items: center; }
.poster-page { container-type: inline-size; width: min(100%, 620px); aspect-ratio: 210 / 297; background: #fff; border: 1px solid var(--s-line); box-shadow: 0 8px 24px rgba(20, 24, 43, .14); overflow: hidden; }
.poster-inner { box-sizing: border-box; height: 100%; padding: 5cqw; display: flex; flex-direction: column; gap: 2.6cqw; color: var(--s-ink); }
.poster-brand { margin: 0; text-align: right; font: 600 1.7cqw var(--font); color: #9aa1b5; }
.posters .pic { line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
/* paleta: cada tarjeta lleva c1…c6 */
.posters .c1 { --a: #2346d8; --s: #e8edff; } .posters .c2 { --a: #e2502d; --s: #ffe6df; }
.posters .c3 { --a: #0f8a5c; --s: #dcf5e9; } .posters .c4 { --a: #6b3fc4; --s: #efe6ff; }
.posters .c5 { --a: #c96a00; --s: #fff0d4; } .posters .c6 { --a: #0b7fa8; --s: #ddf2fb; }
.posters.bw .c1, .posters.bw .c2, .posters.bw .c3, .posters.bw .c4, .posters.bw .c5, .posters.bw .c6 { --a: #161a2e; --s: #fff; }
/* título en banda de color */
.poster-title { margin: 0; padding: 2.2cqw 3cqw; border-radius: 3.5cqw; background: var(--a); color: #fff; text-align: center; font: 800 6.6cqw/1.1 var(--font); }
.posters.bw .poster-title { background: #fff; color: var(--s-ink); border: .7cqw solid var(--s-ink); }
.poster-note { margin: 0; text-align: center; font-size: 2.2cqw; color: var(--s-muted); }
/* classroom language: póster por categoría (6 frases) */
.phrase-poster { flex: 1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-rows: repeat(6, 1fr); gap: 2.4cqw; }
.phrase-poster li { display: flex; align-items: center; gap: 3.5cqw; padding: 0 3.5cqw; border: .9cqw solid var(--a); border-radius: 4cqw; background: var(--s); }
.phrase-poster .pic { font-size: 10.5cqw; }
.phrase-poster strong { font: 800 5.3cqw/1.15 var(--font); }
/* tarjetas grandes (4 por hoja) */
.phrase-cards { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 3cqw; }
.phrase-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqw; padding: 3cqw; text-align: center; border: 1cqw solid var(--a); border-radius: 5cqw; background: var(--s); }
.phrase-card .pic { font-size: 21cqw; }
.phrase-card strong { font: 800 5.4cqw/1.15 var(--font); }
/* uno por página */
.single-card { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6cqw; padding: 6cqw; text-align: center; border: 1.6cqw solid var(--a); border-radius: 7cqw; background: var(--s); }
.single-card .pic { font-size: 46cqw; }
.single-card strong { font: 800 10cqw/1.12 var(--font); color: var(--s-ink); }
.single-sub { font-size: 4cqw; color: var(--s-muted); }
/* tira para la mesa */
.desk-strip { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 3cqw; align-content: stretch; }
.desk-strip section { border: .7cqw solid var(--a); border-radius: 3.5cqw; padding: 2.8cqw; background: var(--s); }
.desk-strip h3 { margin: 0 0 1.8cqw; font: 800 3.9cqw var(--font); color: var(--a); }
.desk-strip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2cqw; }
.desk-strip li { display: flex; align-items: center; gap: 1.8cqw; font: 700 3.1cqw/1.2 var(--font); }
.desk-strip .pic { font-size: 5.2cqw; }
/* roles cooperativos */
.role-cards { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 3cqw; }
.role-cards.n5 { grid-template-rows: repeat(3, 1fr); }
.role-card { display: flex; flex-direction: column; gap: 1.8cqw; padding: 3cqw; border: .9cqw solid var(--a); border-radius: 4cqw; outline: .35cqw dashed var(--s-muted); outline-offset: 1.2cqw; background: #fff; }
.role-head { display: flex; align-items: center; gap: 2.4cqw; padding: 1.6cqw 2.4cqw; border-radius: 3cqw; background: var(--s); }
.role-head .pic { font-size: 9cqw; }
.role-head strong { font: 800 5.4cqw/1.1 var(--font); color: var(--a); }
.role-job { margin: 0; font: 700 3.1cqw/1.3 var(--font); color: var(--s-muted); }
.role-card ul { margin: 0; padding-left: 4cqw; display: grid; gap: 1.2cqw; font: 700 3.3cqw/1.25 var(--font); }
.role-card.big { flex: 1; outline: 0; border-width: 1.6cqw; border-radius: 7cqw; padding: 6cqw; gap: 5cqw; justify-content: center; }
.role-card.big .role-head { flex-direction: column; padding: 5cqw; border-radius: 5cqw; }
.role-card.big .role-head .pic { font-size: 32cqw; }
.role-card.big .role-head strong { font-size: 11cqw; }
.role-card.big .role-job { font-size: 5cqw; text-align: center; }
.role-card.big ul { font-size: 5.6cqw; gap: 2.5cqw; padding-left: 8cqw; }
/* tickets de salida (4 por hoja) */
.tickets { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.ticket { display: flex; flex-direction: column; gap: 2cqw; padding: 3.2cqw; border: .35cqw dashed var(--s-muted); }
.ticket-title { margin: 0; padding: 1.4cqw; border-radius: 2.4cqw; background: var(--s); color: var(--a); text-align: center; font: 800 4.2cqw/1.1 var(--font); }
.ticket-name { margin: 0; display: flex; gap: 1.2cqw; font: 700 2.9cqw var(--font); color: var(--s-muted); }
.ticket-name span { flex: 1; border-bottom: .3cqw solid var(--s-line); }
.ticket-row { display: flex; flex-direction: column; font: 700 3cqw/1.2 var(--font); }
.write-lines { display: grid; gap: 4.5cqw; padding-top: 4cqw; }
.write-lines i { display: block; border-bottom: .3cqw solid var(--s-line); }
.ticket-lights { list-style: none; margin: 0; padding: 0; display: grid; gap: 2cqw; }
.ticket-lights li { display: flex; align-items: center; gap: 1.6cqw; font: 700 2.9cqw/1.2 var(--font); }
.ticket-lights .pic, .ticket-faces .pic { font-size: 5.5cqw; }
.tick { flex: none; width: 3.2cqw; height: 3.2cqw; border: .45cqw solid var(--s-ink); border-radius: .8cqw; }
.ticket-faces { display: flex; justify-content: space-around; }
.ticket-faces > span { display: flex; flex-direction: column; align-items: center; gap: 1.2cqw; }
/* paneles de emociones y del tiempo */
.pic-grid { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); gap: 2.6cqw; }
.pic-grid.four { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 1fr); }
.pic-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6cqw; text-align: center; border: .9cqw solid var(--a); border-radius: 4cqw; background: var(--s); }
.pic-card .pic { font-size: 14cqw; }
.pic-grid.four .pic-card .pic { font-size: 12cqw; }
.pic-card strong { font: 800 4.6cqw/1.1 var(--font); }
.pic-grid.four .pic-card strong { font-size: 3.4cqw; }
.posters .frame { margin: 0; text-align: center; font: 700 4.2cqw/1.5 var(--font); }
.posters .frame .blank { display: inline-block; min-width: 22cqw; border-bottom: .5cqw solid var(--s-ink); }
.posters .frame .blank.short { min-width: 9cqw; }
.posters .frame .blank.wide { min-width: 34cqw; }
.day-strip, .season-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6cqw; }
.day-strip span, .season-strip > span { display: inline-flex; align-items: center; gap: 1.2cqw; padding: 1.2cqw 2.6cqw; border: .55cqw solid var(--a); border-radius: 999px; background: var(--s); font: 800 3.2cqw var(--font); }
.season-strip .pic { font-size: 5cqw; }
@media print {
  .sheet:has(.posters) { background: #fff; }
  .posters { display: block; }
  .poster-page { width: 100%; border: 0; box-shadow: none; break-after: page; break-inside: avoid; }
  .poster-page:last-child { break-after: auto; }
}
/* ajustes para que todo quepa en la hoja */
.desk-strip { gap: 2.4cqw; }
.desk-strip section { padding: 2.2cqw 2.4cqw; }
.desk-strip h3 { font-size: 3.3cqw; margin-bottom: 1.4cqw; }
.desk-strip ul { gap: 1.3cqw; }
.desk-strip li { font-size: 2.6cqw; gap: 1.4cqw; }
.desk-strip .pic { font-size: 4.2cqw; }
.role-card { gap: 1.3cqw; padding: 2.4cqw; outline-offset: .9cqw; }
.role-head { padding: 1.2cqw 2cqw; gap: 2cqw; }
.role-head .pic { font-size: 7.5cqw; }
.role-head strong { font-size: 4.8cqw; }
.role-job { font-size: 2.7cqw; }
.role-card ul { font-size: 2.9cqw; gap: .9cqw; }
.role-cards.n5 { gap: 2.2cqw; }
.role-cards.n5 .role-card { padding: 1.8cqw 2.2cqw; gap: .9cqw; }
.role-cards.n5 .role-head { padding: .8cqw 1.6cqw; }
.role-cards.n5 .role-head .pic { font-size: 5.6cqw; }
.role-cards.n5 .role-head strong { font-size: 4cqw; }
.role-cards.n5 .role-job { font-size: 2.3cqw; }
.role-cards.n5 ul { font-size: 2.5cqw; gap: .5cqw; }
.ticket { gap: 1.5cqw; }
.write-lines { gap: 3.6cqw; padding-top: 3.2cqw; }
.role-cards .role-head { flex-direction: column; gap: .6cqw; text-align: center; }
.role-cards .role-head strong { font-size: 4.3cqw; }
.role-cards.n5 .role-head { flex-direction: row; justify-content: center; }
.role-cards.n5 .role-head strong { font-size: 3.6cqw; }

/* ===== Movimiento =====
   Solo transform y opacity (no afectan al rendimiento). Todo queda desactivado
   con «reducir movimiento» y nunca se imprime. */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }
@keyframes sheetIn { from { opacity: .35; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 320; } to { stroke-dashoffset: 0; } }
@keyframes pop { 0% { transform: scale(.85); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  /* aparición al hacer scroll (la clase .reveal la pone site.ts) */
  .reveal:not(.in) { opacity: 0; }
  .reveal.in { animation: rise .45s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms) backwards; }
  /* portada */
  .hero-copy > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .squiggle path { stroke-dasharray: 320; animation: draw 1.1s .5s ease-out both; }
  .hero-art { animation: fadeIn .9s ease .2s both; }
  .hero-art .float { animation: bob 6s ease-in-out infinite; }
  .hero-art .f2 { animation-duration: 5s; animation-delay: -1.5s; }
  .hero-art .f3 { animation-duration: 7s; animation-delay: -3s; }
  /* cabecera de cada herramienta */
  .tool-head .tool-ico { animation: pop .6s cubic-bezier(.2, .7, .2, 1) .1s both; }
  /* tarjetas y botones */
  .tool-card, .res-card, .area-card, .guide-list a, .need-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
  .tool-card:hover, .res-card:hover, .area-card:hover, .guide-list a:hover { transform: translateY(-3px); box-shadow: var(--shadow-up); }
  .tool-card:hover .tool-ico { transform: rotate(-6deg) scale(1.08); }
  .tool-ico { transition: transform .25s ease; }
  .btn { transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease; }
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(3px); }
  .chip, .need-links a { transition: border-color .15s ease, color .15s ease, transform .15s ease; }
  .chip:hover, .need-links a:hover { transform: translateY(-1px); }
  /* ficha recién generada */
  .sheet.flash { animation: sheetIn .35s ease both; }
}
@media print {
  .reveal, .reveal.in, .sheet.flash { opacity: 1 !important; animation: none !important; transform: none !important; }
}

/* ===== Planificador AICLE ===== */
.planner-form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem 1rem; margin: 0 0 1rem; }
.planner-form legend { font: 800 .95rem var(--font); color: var(--brand); padding: 0 .4rem; }
.planner-form input[type=text], .planner-form textarea { width: 100%; }
.crit-checks { display: grid; gap: .35rem; max-height: 260px; overflow-y: auto; padding-right: .3rem; margin-bottom: .6rem; }
.crit-checks .check.crit { font-size: .82rem; line-height: 1.35; align-items: flex-start; }
.crit-checks .check.crit b { color: var(--brand); }
.crit-area { margin: .2rem 0; font: 700 .8rem var(--font); color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.planner-checks { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; margin-bottom: 1rem; background: var(--paper); }
.planner-checks .checks-title { margin: 0 0 .4rem; font: 800 .92rem var(--font); }
.planner-checks ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .86rem; }
.planner-checks li.ok { color: #0f7a52; }
.planner-checks li.warn { color: #b05f00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .planner-checks li.ok { color: #6ee7b7; } :root:not([data-theme=light]) .planner-checks li.warn { color: #fcd34d; } }
:root[data-theme=dark] .planner-checks li.ok { color: #6ee7b7; } :root[data-theme=dark] .planner-checks li.warn { color: #fcd34d; }
/* documento del plan */
.plan { color: var(--s-ink); font-size: .95rem; line-height: 1.5; }
.plan-head { border-bottom: 3px solid #2346d8; padding-bottom: .7rem; margin-bottom: 1rem; }
.plan-kicker { margin: 0; font: 700 .8rem var(--font); color: var(--s-muted); text-transform: uppercase; letter-spacing: .03em; }
.plan h2 { margin: .3rem 0; font: 800 1.6rem/1.15 var(--font); color: #2346d8; }
.plan-challenge { margin: .2rem 0 0; font: 700 1.05rem var(--font); }
.plan section { margin-bottom: 1.1rem; break-inside: avoid; }
.plan h3 { margin: 0 0 .45rem; font: 800 1.05rem var(--font); color: #2346d8; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.plan-tag { font: 700 .72rem var(--font); color: #6b3fc4; background: #f1e8ff; padding: .1rem .5rem; border-radius: 999px; }
.plan ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .25rem; }
.plan-crits li { font-size: .88rem; }
.plan-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.plan-table th, .plan-table td { border: 1px solid var(--s-line); padding: .45rem .55rem; text-align: left; vertical-align: top; }
.plan-table th { background: #eef2ff; font-family: var(--font); }
.plan-table tbody th { width: 9.5rem; }
.plan-table.cols td { width: 33%; }
.plan-table.rubric td { width: 27%; }
.plan-table td ul { padding-left: 1rem; margin-top: .3rem; }
.plan-muted { color: var(--s-muted); font-size: .85em; }
.plan-empty { color: #b05f00; font-style: italic; }
.plan-foot { margin: 1rem 0 0; text-align: right; font-size: .75rem; color: #9aa1b5; }
@media print {
  .plan { font-size: 10.5pt; }
  .plan-links { display: none; }
  .plan section { break-inside: avoid; }
  .plan-table tr { break-inside: avoid; }
}

/* ===== Constructor de fichas ===== */
.wb-list { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem .9rem; margin: 0 0 1rem; }
.wb-list legend { font: 800 .95rem var(--font); color: var(--brand); padding: 0 .4rem; }
.wb-rows { list-style: none; margin: 0 0 .7rem; padding: 0; display: grid; gap: .5rem; }
.wb-row { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: start; padding: .5rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.wb-num { width: 26px; height: 26px; border-radius: 8px; background: var(--brand); color: #fff; font: 800 .85rem var(--font); display: inline-flex; align-items: center; justify-content: center; margin-top: .35rem; }
.wb-fields { display: grid; grid-template-columns: 1fr auto; gap: .4rem; }
.wb-fields select { min-height: 40px; }
.wb-fields .wb-structure { grid-column: 1; } .wb-fields .wb-exercise { grid-column: 2; }
.wb-moves { display: flex; gap: .25rem; }
.wb-moves button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 800; cursor: pointer; }
.wb-moves button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.wb-moves button:disabled { opacity: .35; cursor: default; }
.wb-section { margin-top: 1.4rem; break-inside: avoid; page-break-inside: avoid; }
.wb-section:first-of-type { margin-top: .4rem; }
.wb-instr { margin: 0 0 .7rem; padding-bottom: .3rem; border-bottom: 2px solid var(--s-line); font: 800 1.12rem var(--font); color: var(--s-ink); }

/* ===== Tarjetas de sentence frames (sobre las hojas A4 de los carteles) ===== */
.fr-gap { display: inline-block; width: 12cqw; border-bottom: .5cqw solid currentColor; margin: 0 .6cqw; vertical-align: baseline; }
.fr-chip { display: inline-block; align-self: flex-start; padding: .6cqw 1.8cqw; border-radius: 999px; background: var(--a); color: #fff; font: 800 2.2cqw var(--font); }
.posters.bw .fr-chip { background: #fff; color: var(--s-ink); border: .35cqw solid var(--s-ink); }
.fr-ex { display: block; margin-top: 1.2cqw; font: italic 600 2.6cqw/1.3 var(--font); color: var(--s-muted); }
.fr-cards { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 3cqw; }
.fr-cards.mini { grid-template-rows: repeat(4, 1fr); gap: 2cqw; }
.fr-card { display: flex; flex-direction: column; justify-content: center; gap: 2cqw; padding: 3.5cqw; border: 1cqw solid var(--a); border-radius: 4.5cqw; background: var(--s); }
.fr-card strong { font: 800 5.2cqw/1.25 var(--font); color: var(--s-ink); }
.fr-cards.mini .fr-card { padding: 2.2cqw; gap: 1cqw; border-width: .6cqw; border-radius: 3cqw; }
.fr-cards.mini .fr-card strong { font-size: 3.3cqw; }
.fr-cards.mini .fr-chip { font-size: 1.7cqw; }
.fr-cards.mini .fr-ex { font-size: 2cqw; margin-top: .4cqw; }
.fr-poster { flex: 1; list-style: none; margin: 0; padding: 0; display: grid; grid-auto-rows: 1fr; gap: 2cqw; }
.fr-poster li { display: flex; flex-direction: column; justify-content: center; padding: 1.6cqw 3cqw; border: .8cqw solid var(--a); border-radius: 3.5cqw; background: var(--s); }
.fr-poster strong { font: 800 4cqw/1.2 var(--font); }
.fr-poster .fr-ex { font-size: 2.4cqw; margin-top: .6cqw; }
.fr-strips { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.fr-strip { display: flex; flex-direction: column; gap: 1.6cqw; padding: 2.4cqw; border: .35cqw dashed var(--s-muted); background: #fff; }
.fr-strip-title { margin: 0; padding: 1.4cqw; border-radius: 2.4cqw; background: var(--a); color: #fff; text-align: center; font: 800 3cqw/1.15 var(--font); }
.posters.bw .fr-strip-title { background: #fff; color: var(--s-ink); border: .35cqw solid var(--s-ink); }
.fr-strip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.8cqw; }
.fr-strip li { font: 700 2.5cqw/1.3 var(--font); padding-bottom: 1.4cqw; border-bottom: .3cqw solid var(--s-line); }
.fr-strip .fr-gap { width: 7cqw; }
.fr-strip .fr-ex { font-size: 1.9cqw; margin-top: .4cqw; }
.fr-poster { display: flex; flex-direction: column; }
.fr-poster li { flex: 1 1 auto; }
.fr-strips.cols2 { grid-template-columns: repeat(2, 1fr); }
.fr-strips.cols2 .fr-strip.many li { font-size: 2.3cqw; }
.fr-strips.cols2 .fr-strip.many .fr-ex { font-size: 1.7cqw; }
.fr-cards.mini.long .fr-card { padding: 1.6cqw 2cqw; gap: .6cqw; }
.fr-cards.mini.long .fr-card strong { font-size: 2.5cqw; }
.fr-cards.mini.long .fr-ex { font-size: 1.6cqw; }
.fr-cards.mini.long .fr-chip { font-size: 1.5cqw; }
.fr-level { font-size: .55em; font-weight: 700; opacity: .85; margin-left: .4em; }

/* ===== Organizadores gráficos (hojas A4, medidas en cqw) ===== */
.ic-organizers { background: #e0f4ff; color: #0b6fa4; }
.ic-rubric { background: #ffe6df; color: #c43d1d; }
.ic-challenges { background: #fff0db; color: #b05f00; }
.organizers { --a: #2346d8; --s: #eef2ff; }
.organizers.bw { --a: #161a2e; --s: #fff; }
.go-name { margin: 0; display: flex; gap: 1.2cqw; font: 700 2.4cqw var(--font); color: var(--s-muted); }
.go-name span { flex: 1; border-bottom: .3cqw solid var(--s-line); }
.go-bank { display: flex; flex-wrap: wrap; gap: 1cqw; padding: 1.4cqw; border: .4cqw dashed var(--s-line); border-radius: 2cqw; }
.go-bank span { padding: .5cqw 1.6cqw; border-radius: 1.4cqw; background: var(--s); font: 700 2.3cqw var(--font); }
.go-body { flex: 1; position: relative; min-height: 0; display: flex; flex-direction: column; }
.go-h { margin: 0 0 1cqw; font: 800 2.9cqw/1.15 var(--font); color: var(--a); }
.go-lines { display: grid; gap: 4.2cqw; padding-top: 3cqw; }
.go-lines i { display: block; border-bottom: .3cqw solid var(--s-line); }
.go-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; padding: 1.6cqw 2.6cqw; border-radius: 3cqw; background: var(--a); color: #fff; font: 800 3cqw/1.15 var(--font); text-align: center; max-width: 30cqw; }
.organizers.bw .go-center { background: #fff; color: var(--s-ink); border: .5cqw solid var(--s-ink); }
.go-center.big { font-size: 3.6cqw; padding: 2.4cqw 3.2cqw; }
/* Venn */
.go-venn { flex: 1; position: relative; }
.go-venn svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.go-venn circle { fill: none; stroke-width: .7; }
.go-venn .v1 { stroke: #2346d8; fill: rgba(35, 70, 216, .06); } .go-venn .v2 { stroke: #e2502d; fill: rgba(226, 80, 45, .06); }
.organizers.bw .go-venn circle { stroke: #161a2e; fill: none; }
.vl { position: absolute; top: 4%; font: 800 3.2cqw var(--font); }
.vl.a { left: 16%; color: #2346d8; } .vl.b { right: 16%; color: #e2502d; } .vl.both { left: 50%; transform: translateX(-50%); top: 88%; color: var(--s-ink); }
/* tablas */
.go-table { flex: 1; width: 100%; border-collapse: collapse; table-layout: fixed; }
.go-table th { padding: 1.4cqw; background: var(--a); color: #fff; font: 800 2.9cqw var(--font); border: .3cqw solid var(--a); }
.organizers.bw .go-table th { background: #fff; color: var(--s-ink); border-color: var(--s-ink); }
.go-table td { border: .3cqw solid var(--s-line); }
/* KWL y columnas */
.go-cols { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; }
.go-col { padding: 2cqw; border: .5cqw solid var(--a); border-radius: 3cqw; }
/* secuencia */
.go-seq { flex: 1; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2.4cqw; }
.go-seq li { flex: 1; display: flex; gap: 2cqw; align-items: flex-start; padding: 1.6cqw 2.4cqw; border: .5cqw solid var(--a); border-radius: 3cqw; position: relative; }
.go-seq li > div { flex: 1; }
.go-seq li:not(:last-child)::after { content: "▼"; position: absolute; left: 50%; bottom: -2.6cqw; transform: translateX(-50%); font-size: 2.4cqw; color: var(--a); }
.go-step { flex: none; width: 5.4cqw; height: 5.4cqw; border-radius: 50%; background: var(--a); color: #fff; display: inline-flex; align-items: center; justify-content: center; font: 800 2.8cqw var(--font); }
.organizers.bw .go-step { background: #fff; color: var(--s-ink); border: .4cqw solid var(--s-ink); }
.go-seq .go-lines { gap: 3.6cqw; padding-top: 2cqw; }
/* ciclo y mapa mental */
.go-cycle, .go-mind { flex: 1; position: relative; }
.go-cycle svg, .go-mind svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.go-cycle .ring { fill: none; stroke: var(--a); stroke-width: .5; stroke-dasharray: 2 1.5; }
.go-cycle .arrow { fill: var(--a); }
.go-mind line { stroke: var(--a); stroke-width: .5; }
.go-node { position: absolute; transform: translate(-50%, -50%); width: 26cqw; padding: 1.4cqw 1.8cqw; background: #fff; border: .5cqw solid var(--a); border-radius: 3cqw; }
.go-node .go-lines { gap: 3.4cqw; padding-top: 2.2cqw; }
.go-mind .go-node { width: 22cqw; }
/* causa y efecto */
.go-cause { flex: 1; display: grid; grid-template-columns: 1fr auto 1fr; grid-auto-rows: auto; align-content: stretch; gap: 1.6cqw 2cqw; align-items: center; }
.go-cause > .go-h { text-align: center; padding: 1cqw; border-radius: 2cqw; background: var(--a); color: #fff; }
.organizers.bw .go-cause > .go-h { background: #fff; color: var(--s-ink); border: .4cqw solid var(--s-ink); }
.go-box { align-self: stretch; min-height: 11cqw; border: .5cqw solid var(--a); border-radius: 2.4cqw; }
.go-arrow { font-size: 5cqw; color: var(--a); }
/* Frayer */
.go-frayer { flex: 1; position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2cqw; }
.go-q { padding: 2cqw; border: .5cqw solid var(--a); border-radius: 3cqw; }
/* mapa de la historia */
.go-story { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: auto 1fr auto; gap: 1.8cqw; }
.go-s { padding: 1.8cqw; border: .5cqw solid var(--a); border-radius: 3cqw; }
.go-s .go-lines { gap: 3.6cqw; padding-top: 2.4cqw; }
.go-s.s4, .go-s.s5, .go-s.s6 { background: var(--s); }
.go-s.s7 { grid-column: 1 / -1; }
.go-seq.dense { gap: 1.8cqw; }
.go-seq.dense li { padding: 1cqw 2cqw; }
.go-seq.dense .go-step { width: 4.4cqw; height: 4.4cqw; font-size: 2.3cqw; }
.go-seq.dense .go-lines { padding-top: 1.2cqw; }
.go-seq.dense .go-h { font-size: 2.5cqw; margin-bottom: .4cqw; }
.go-cycle.dense .go-node { width: 19cqw; padding: 1cqw 1.4cqw; }
.go-cycle.dense .go-lines { padding-top: 1.6cqw; }
.go-cause.dense { gap: 1cqw 2cqw; }
.go-cause.dense .go-box { min-height: 6.5cqw; }

/* ===== Rúbricas ===== */
.rubrics { --a: #c43d1d; --s: #ffe6df; }
.rubrics.bw { --a: #161a2e; --s: #fff; }
.rb-sub { margin: 0; text-align: center; font: 700 2.4cqw var(--font); color: var(--s-muted); }
.rb-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 2.05cqw; line-height: 1.3; }
.rb-table th, .rb-table td { border: .3cqw solid var(--s-line); padding: 1.1cqw; vertical-align: top; text-align: left; }
.rb-table thead th { background: var(--s); font: 800 2.3cqw var(--font); color: var(--s-ink); }
.rb-table tbody th { width: 14cqw; background: #fafbfe; font: 800 2.2cqw var(--font); }
.rb-table .rb-score { width: 7cqw; }
.rb-note { margin: 0; font-size: 1.9cqw; color: var(--s-muted); font-style: italic; }
.rb-self { width: 100%; border-collapse: collapse; font: 700 3cqw/1.3 var(--font); }
.rb-self th, .rb-self td { border-bottom: .3cqw solid var(--s-line); padding: 1.8cqw 1cqw; text-align: left; }
.rb-self thead th { text-align: center; font-size: 2.6cqw; color: var(--s-muted); }
.rb-self thead th:first-child, .rb-self tbody th { width: 58%; }
.rb-self td { text-align: center; }
.rb-self .tick { display: inline-block; width: 4.5cqw; height: 4.5cqw; border: .5cqw solid var(--s-ink); border-radius: 1cqw; }
.rb-next { display: grid; gap: .6cqw; }
.rb-peers { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.rb-peer { display: flex; flex-direction: column; gap: 1cqw; padding: 2.6cqw; border: .35cqw dashed var(--s-muted); }
.rb-peer-title { margin: 0; text-align: center; padding: 1.2cqw; border-radius: 2cqw; background: var(--s); color: var(--a); font: 800 3cqw var(--font); }
.rb-star { margin: 1cqw 0 0; font: 800 2.6cqw var(--font); }
.rb-peer .go-lines { gap: 0; padding-top: 4cqw; }
.rb-from { margin: auto 0 0; display: flex; gap: 1cqw; font: 700 2.2cqw var(--font); color: var(--s-muted); }
.rb-from span { flex: 1; border-bottom: .3cqw solid var(--s-line); }
/* Hojas A4 horizontales (rúbrica del docente) */
.poster-page.landscape { aspect-ratio: 297 / 210; width: min(100%, 900px); }
.landscape .poster-title { font-size: 3.6cqw; padding: 1.2cqw 2cqw; }
.landscape .rb-sub, .landscape .go-name { font-size: 1.5cqw; }
.landscape .poster-inner { padding: 3cqw; gap: 1.4cqw; }
.landscape .rb-table { font-size: 1.32cqw; }
.landscape .rb-table th, .landscape .rb-table td { padding: .7cqw .8cqw; }
.landscape .rb-table thead th { font-size: 1.5cqw; }
.landscape .rb-table tbody th { width: 11cqw; font-size: 1.45cqw; }
.landscape .rb-table .rb-score { width: 5cqw; }
.landscape .rb-note { font-size: 1.25cqw; }
.landscape .poster-brand { font-size: 1.1cqw; }
@page landscape { size: A4 landscape; margin: 12mm; }
@media print { .poster-page.landscape { aspect-ratio: 273 / 186; } .poster-page.landscape:not(.solo) { page: landscape; } }
.landscape .rb-table { font-size: 1.26cqw; line-height: 1.25; }
.landscape .rb-table th, .landscape .rb-table td { padding: .55cqw .7cqw; }
.landscape .poster-inner { padding: 2.6cqw 3cqw; gap: 1.1cqw; }
.rb-self.many { font-size: 2.3cqw; }
.rb-self.many th, .rb-self.many td { padding: 1cqw 1cqw; }
.rb-self.many .tick { width: 3.6cqw; height: 3.6cqw; }

/* ===== Banco de retos ===== */
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.ch-card { display: flex; flex-direction: column; gap: .45rem; padding: 1.1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.ch-card[hidden] { display: none; }
.ch-card h3 { margin: .2rem 0 0; font-size: 1.15rem; }
.ch-q { margin: 0; font-weight: 700; color: var(--brand); }
.ch-desc { margin: 0; color: var(--muted); font-size: .92rem; }
.ch-meta { margin: 0; font-size: .82rem; color: var(--muted); }
.ch-card .btn { align-self: flex-start; margin-top: auto; }
.btn.small { min-height: 38px; padding: .45rem .85rem; font-size: .9rem; }

/* ===== Fichas de cálculo (herramienta operations) ===== */
.ops-grid { display: grid; gap: 1.8rem 1.2rem; margin-top: 1.2rem; align-items: start; }
.ops-grid.is-col { grid-template-columns: repeat(4, 1fr); }
.ops-grid.is-col.has-div { grid-template-columns: repeat(3, 1fr); }
.ops-grid.is-line { grid-template-columns: repeat(2, 1fr); gap: 1.2rem 2.2rem; }
@media (max-width: 600px) { .ops-grid.is-col, .ops-grid.is-col.has-div { grid-template-columns: repeat(2, 1fr); } .ops-grid.is-line { grid-template-columns: 1fr; } }
.op { font: 600 1.5rem/1.4 var(--sheet-text); font-variant-numeric: tabular-nums; color: var(--s-ink); break-inside: avoid; }
.op-col { display: inline-grid; justify-items: end; justify-self: center; min-width: calc(var(--w) * .8em + 1em); letter-spacing: .14em; }
.op-sign { font-weight: 700; margin-right: .45em; }
.op-res { border-top: 2.5px solid var(--s-ink); width: 100%; text-align: right; min-height: 1.5em; padding-top: .1em; }
/* división con la disposición española: dividendo | divisor, cociente debajo del divisor */
.op-div { display: inline-grid; grid-template-columns: auto auto; justify-self: center; letter-spacing: .14em; }
.dv-dividend { padding: 0 .45em .1em 0; }
.dv-divisor { border-left: 2.5px solid var(--s-ink); border-bottom: 2.5px solid var(--s-ink); padding: 0 .6em .1em .45em; min-width: 3.2em; }
.dv-quot { padding: .1em .45em; }
.dv-work { min-height: 4.8em; display: flex; align-items: flex-end; justify-content: flex-end; padding-right: .45em; }
.dv-rest { border-top: 1.5px solid var(--s-line); padding-top: .1em; }
.op-line { font-size: 1.3rem; display: flex; align-items: baseline; gap: .4em; }
.op-line small { font-size: .65em; color: var(--s-muted); }
@media print { .op { font-size: 15pt; } .op-line { font-size: 14pt; } .ops-grid { gap: 7mm 8mm; margin-top: 4mm; } .dv-work { min-height: 3.6em; } }

/* ===== Fichas de caligrafía (herramienta handwriting) ===== */
@font-face { font-family: "Playwrite ES"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/playwrite-es-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Andika"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/andika-latin-400-normal.woff2) format("woff2"); }
/* --u es la altura de la franja central (letras de cuerpo); la línea mide 3 franjas: subida, cuerpo y bajada */
.hw-sheet { --u: 1rem; --hw-line: #9aa3bd; --hw-base: #5a6178; --hw-band: #eef2fb; margin-top: .6rem; }
.hw-xl { --u: 1.55rem; } .hw-lg { --u: 1.15rem; } .hw-md { --u: .9rem; } .hw-sm { --u: .7rem; }
.hw-block { margin-bottom: calc(var(--u) * .9); break-inside: avoid; }
.hw-line { position: relative; height: calc(var(--u) * 3); margin-bottom: calc(var(--u) * .35); overflow: hidden; }
.hw-montessori { background:
  linear-gradient(var(--hw-line), var(--hw-line)) 0 0 / 100% 1px no-repeat,
  linear-gradient(var(--hw-band), var(--hw-band)) 0 var(--u) / 100% var(--u) no-repeat,
  linear-gradient(var(--hw-line), var(--hw-line)) 0 var(--u) / 100% 1px no-repeat,
  linear-gradient(var(--hw-base), var(--hw-base)) 0 calc(var(--u) * 2) / 100% 1.5px no-repeat,
  linear-gradient(var(--hw-line), var(--hw-line)) 0 calc(var(--u) * 3 - 1px) / 100% 1px no-repeat; }
.hw-double { background:
  linear-gradient(var(--hw-line), var(--hw-line)) 0 var(--u) / 100% 1px no-repeat,
  linear-gradient(var(--hw-base), var(--hw-base)) 0 calc(var(--u) * 2) / 100% 1.5px no-repeat; }
.hw-single { background: linear-gradient(var(--hw-base), var(--hw-base)) 0 calc(var(--u) * 2) / 100% 1.5px no-repeat; }
/* El texto se apoya en la línea base (2 franjas desde arriba) y el cuerpo de la letra ocupa la franja central.
   Valores calculados con las métricas de cada fuente (altura x / tamaño y posición de la línea base con line-height 1):
   Playwrite España: x = 0,519 em, línea base a 0,965 em → tamaño 1,927·u, top 0,14·u
   Andika: x = 0,508 em, línea base a 0,915 em → tamaño 1,969·u, top 0,198·u */
.hw-text { position: absolute; left: .4em; white-space: pre; line-height: 1; color: var(--s-ink); }
.hw-cursive .hw-text { font-family: "Playwrite ES", cursive; font-size: calc(var(--u) * 1.927); top: calc(var(--u) * .14); }
.hw-script .hw-text { font-family: "Andika", sans-serif; font-size: calc(var(--u) * 1.969); top: calc(var(--u) * .198); }
.hw-line.is-trace .hw-text { color: #aab2c6; }
@media print { .hw-line.is-trace .hw-text { color: #a3abbf; } }

/* ===== Herramientas por categorías (catálogo y portada en español) ===== */
.cat-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.6rem; }
.cat-count { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .35em; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: .8em; font-weight: 800; }
.tool-cat { margin: 0 0 2.4rem; scroll-margin-top: 90px; }
.tool-cat-head { margin-bottom: 1rem; max-width: 70ch; }
.tool-cat-head h2 { margin-bottom: .25rem; }
.tool-cat-head p { margin: 0; }
.home-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
@media (max-width: 860px) { .home-cats { grid-template-columns: 1fr; } }
.home-cat { background: var(--paper); border-radius: 22px; box-shadow: var(--shadow); padding: 1.3rem 1.3rem 1.1rem; }
.home-cat.wide { grid-column: 1 / -1; }
.home-cat-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; margin-bottom: .3rem; }
.home-cat-head h3 { margin: 0; font-size: 1.3rem; }
.home-cat-head a { font-weight: 700; text-decoration: none; white-space: nowrap; }
.home-cat > p { color: var(--muted); font-size: .95rem; margin: 0 0 .9rem; }
.tool-kicker { display: inline-flex; align-items: center; gap: .3rem; margin: 0 0 .25rem; font-weight: 800; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--coral-ink); text-decoration: none; }
