/* Píldora V2 · primera maqueta del nuevo BLOG */
:root {
  --v2-bg: #f4f6f8;
  --v2-surface: #ffffff;
  --v2-surface-soft: #f9fafb;
  --v2-ink: #18212b;
  --v2-muted: #66727f;
  --v2-line: #dde3e8;
  --v2-accent: var(--v2-blue);
  --v2-accent-strong: var(--v2-blue);
  --v2-accent-soft: #e9eef2;
  --v2-blue-soft: #edf4ff;
  --v2-blue: #275f9d;
  --v2-teacher-soft: #f2eef9;
  --v2-teacher: #65508b;
  --v2-success-soft: #e9f6ee;
  --v2-success: #267448;
  --v2-danger-soft: #faeceb;
  --v2-danger: #9a403a;
  --v2-shadow: 0 18px 45px rgba(24, 33, 43, .08);
  --v2-radius-xl: 28px;
  --v2-radius-lg: 20px;
  --v2-radius-md: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.pildora-v2-page {
  margin: 0;
  min-height: 100vh;
  background: var(--v2-bg);
  color: var(--v2-ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}
body.pildora-v2-page a { color: inherit; }
body.pildora-v2-page button, body.pildora-v2-page input { font: inherit; }

.v2-sitebar {
  position: sticky;
  top: 0;
  z-index: 3000;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--v2-line);
}
.v2-sitebar-inner {
  max-width: 1440px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.v2-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  margin-right: auto;
}
.v2-brand img { width: 40px; height: 40px; object-fit: contain; }
.v2-brand-copy { display: grid; line-height: 1.05; }
.v2-brand-copy strong { font-size: 1.03rem; }
.v2-brand-copy small { color: var(--v2-muted); margin-top: 5px; font-size: .72rem; letter-spacing: .02em; }
.v2-nav { display: flex; align-items: center; gap: 5px; }
.v2-nav > a, .v2-nav #v2-user-slot > a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border-radius: 999px;
  text-decoration: none;
  color: #46515c;
  font-size: .92rem;
  font-weight: 650;
}
.v2-nav > a:hover, .v2-nav #v2-user-slot > a:hover { background: var(--v2-surface-soft); color: var(--v2-ink); }
.v2-user-link { background:#e9eef2; border:1px solid #d6dde3; color:#46515c !important; }
.v2-menu-toggle { display:none; border:1px solid var(--v2-line); background:white; border-radius:12px; padding:8px 12px; font-weight:700; }

.v2-page-shell { max-width: 1440px; margin: 0 auto; padding: 32px 28px 64px; }
.v2-loading { max-width: 800px; margin: 12vh auto; text-align:center; color:var(--v2-muted); font-weight:700; }
.v2-app { display: grid; gap: 24px; }
.v2-breadcrumbs { display:flex; flex-wrap:wrap; align-items:center; gap:8px; color:var(--v2-muted); font-size:.9rem; }
.v2-breadcrumbs a { text-decoration:none; }
.v2-breadcrumbs a:hover { color:var(--v2-accent-strong); text-decoration:underline; }

.v2-hero {
  display:grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  padding: 38px;
  background: var(--v2-surface);
  border:1px solid var(--v2-line);
  border-radius: var(--v2-radius-xl);
  box-shadow: var(--v2-shadow);
}
.v2-eyebrow-row { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.v2-level-chip, .v2-subject-chip, .v2-pilot-chip {
  display:inline-flex; align-items:center; min-height:30px; padding:0 11px; border-radius:999px; font-size:.78rem; font-weight:800;
}
.v2-level-chip { background:#e9eef2; color:#52606c; }
.v2-subject-chip { background:var(--v2-blue-soft); color:var(--v2-blue); }
.v2-pilot-chip { background:#eef0f2; color:#59636d; }
.v2-hero h1 { margin:0; max-width:900px; font-size:clamp(2.2rem, 4vw, 4.4rem); line-height:1.02; letter-spacing:-.045em; color:var(--v2-ink); }
.v2-lead { max-width:880px; margin:20px 0 0; color:#4d5965; font-size:clamp(1.02rem, 1.4vw, 1.22rem); line-height:1.65; }
.v2-audience-switch { margin-top:28px; display:inline-flex; padding:4px; gap:4px; background:#edf0f2; border-radius:999px; }
.v2-audience-switch button { border:0; background:transparent; color:#65717c; cursor:pointer; padding:10px 18px; border-radius:999px; font-weight:800; }
.v2-audience-switch button.is-active { background:white; color:var(--v2-ink); box-shadow:0 2px 8px rgba(24,33,43,.08); }
.v2-audience-switch button[data-audiencia="profesor"].is-active { color:var(--v2-teacher); }
.v2-audience-help { margin:9px 0 0; color:var(--v2-muted); font-size:.86rem; }

.v2-status-card { align-self:stretch; display:flex; gap:16px; padding:22px; border:1px solid #d8e1e8; border-radius:var(--v2-radius-lg); background:linear-gradient(145deg,#f8fafc,#edf3f7); color:var(--v2-ink); box-shadow:0 12px 28px rgba(24,33,43,.07); }
.v2-status-icon { flex:0 0 42px; width:42px; height:42px; border-radius:50%; display:grid; place-items:center; background:#e2eaf0; border:1px solid #d4dee6; color:var(--v2-blue); font-size:1.5rem; }
.v2-status-card .v2-kicker { color:#5f6d79; }
.v2-status-card strong { display:block; margin-top:4px; color:var(--v2-blue); font-size:1.28rem; }
.v2-status-card p { margin:7px 0 0; color:#566471; font-size:.9rem; }

.v2-kicker { display:block; text-transform:uppercase; letter-spacing:.11em; font-size:.7rem; font-weight:850; color:var(--v2-muted); }
.v2-prereq-panel { display:none; }
.v2-prereq-panel.is-visible { display:block; padding:18px 22px; border:1px solid var(--v2-line); border-radius:var(--v2-radius-lg); background:var(--v2-surface); }
.v2-prereq-title { display:flex; align-items:center; gap:10px; margin-bottom:8px; font-weight:850; }
.v2-prereq-panel p { margin:0; color:var(--v2-muted); }
.v2-prereq-list { display:flex; flex-wrap:wrap; gap:10px; margin:12px 0 0; padding:0; list-style:none; }
.v2-prereq-list a { text-decoration:none; }
.v2-prereq-item { display:flex; gap:8px; align-items:center; padding:9px 12px; border-radius:12px; background:#f7f8f9; border:1px solid var(--v2-line); }
.v2-priority { padding:3px 7px; border-radius:999px; font-size:.68rem; font-weight:850; }
.v2-priority.rojo { background:#fee9e7; color:#9f332b; }
.v2-priority.naranja { background:#fff0df; color:#9f5724; }
.v2-priority.amarillo { background:#fff7d7; color:#7e6415; }
.v2-priority.verde { background:#e8f6ed; color:#2a7148; }

.v2-featured-section {
  display:grid;
  grid-template-columns:minmax(230px,.72fr) minmax(0,1.6fr);
  gap:28px;
  align-items:start;
  padding:30px;
  background:linear-gradient(145deg,#f8fafc,#edf3f7);
  color:var(--v2-ink);
  border:1px solid #d8e1e8;
  border-radius:var(--v2-radius-xl);
  box-shadow:0 12px 28px rgba(24,33,43,.07);
}
.v2-featured-copy { padding:6px 0; }
.v2-featured-copy .v2-kicker { color:#667684; }
.v2-featured-copy h2 { margin:5px 0 12px; font-size:clamp(1.6rem,2.2vw,2.35rem); line-height:1.08; letter-spacing:-.025em; }
.v2-featured-copy p { margin:0; color:#52606c; line-height:1.65; }
.v2-featured-stage { min-width:0; }
.v2-featured-stage .visor-bloque > h2, .v2-featured-stage .contenido > div:first-child { display:none; }
.v2-featured-stage .contenido { color:var(--v2-ink) !important; }
.v2-featured-stage .video-fuentes { margin:0 !important; }
.v2-featured-stage .video-fuentes-frame,
.v2-resource-stage .video-fuentes-frame,
.v2-teacher-render-host .video-fuentes-frame {
  background:#f4f7f9 !important;
  border:1px solid #d8e1e8 !important;
  box-shadow:0 10px 24px rgba(24,33,43,.06) !important;
}
.v2-featured-stage .video-fuentes-frame,
.v2-featured-stage iframe {
  width:100% !important;
  max-width:100% !important;
  border-radius:18px !important;
}
.v2-featured-stage iframe,
.v2-resource-stage .video-embed,
.v2-resource-stage iframe,
.v2-teacher-render-host .video-embed,
.v2-teacher-render-host iframe:not(.pdf-embed-frame) {
  background:#f4f7f9;
}

.v2-section, .v2-stage-section {
  padding:30px;
  background:var(--v2-surface);
  border:1px solid var(--v2-line);
  border-radius:var(--v2-radius-xl);
}
.v2-teacher-section { border-color:#dcd3ea; background:linear-gradient(180deg,#fff 0,#fbf9fe 100%); }
.v2-section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:30px; margin-bottom:22px; }
.v2-section-heading h2, .v2-stage-header h2 { margin:4px 0 0; font-size:clamp(1.55rem,2.2vw,2.2rem); line-height:1.1; letter-spacing:-.025em; }
.v2-section-heading > p { max-width:560px; margin:0; text-align:right; color:var(--v2-muted); font-size:.92rem; }

.v2-resource-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.v2-resource-card {
  display:flex; flex-direction:column; min-height:185px; padding:20px; border:1px solid var(--v2-line); border-radius:var(--v2-radius-lg); background:var(--v2-surface-soft); cursor:pointer; text-align:left; color:var(--v2-ink); transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.v2-resource-card:hover { transform:translateY(-3px); border-color:#c8d0d7; box-shadow:0 12px 28px rgba(24,33,43,.08); background:white; }
.v2-resource-card.is-featured { grid-column:span 2; background:linear-gradient(145deg,#f7f9fb,#fff); border-color:#cbd3da; }
.v2-resource-card.is-teacher { background:#f8f5fc; border-color:#ded5eb; }
.v2-resource-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; background:white; border:1px solid var(--v2-line); font-weight:900; color:var(--v2-accent-strong); }
.v2-resource-card.is-teacher .v2-resource-icon { color:var(--v2-teacher); }
.v2-resource-card h3 { margin:18px 0 7px; font-size:1.04rem; line-height:1.25; }
.v2-resource-card p { margin:0; color:var(--v2-muted); font-size:.85rem; line-height:1.45; }
.v2-resource-card .v2-card-action { margin-top:auto; padding-top:16px; color:var(--v2-accent-strong); font-size:.82rem; font-weight:850; }
.v2-resource-card.is-teacher .v2-card-action { color:var(--v2-teacher); }

.v2-stage-section { box-shadow:var(--v2-shadow); border-color:#cbd3da; }
.v2-stage-header { display:flex; align-items:center; justify-content:space-between; gap:20px; padding-bottom:18px; border-bottom:1px solid var(--v2-line); }
.v2-stage-close { border:1px solid var(--v2-line); background:white; border-radius:999px; padding:8px 14px; cursor:pointer; font-weight:750; color:#52606c; }
.v2-resource-stage { max-width:1100px; margin:0 auto; padding-top:24px; }
.v2-resource-stage .visor-bloque > h2 { display:none; }
.v2-resource-stage .contenido { color:var(--v2-ink) !important; font-size:1rem; line-height:1.7; }
.v2-resource-stage .contenido p { text-align:left; }
.v2-resource-stage .contenido strong { color:var(--v2-accent-strong); }
.v2-resource-stage .video-embed { width:100%; max-width:900px; aspect-ratio:16/9; display:block; margin:18px auto; border:0; border-radius:18px; box-shadow:0 14px 36px rgba(24,33,43,.13); }
.v2-resource-stage .pdf-toolbar-simple { display:flex; justify-content:flex-end; margin:16px 0 10px; }
.v2-resource-stage .pdf-open-button { display:inline-flex; align-items:center; justify-content:center; padding:10px 15px; border:1px solid #cfc5df; background:#f6f2fb; color:var(--v2-teacher); border-radius:999px; font-weight:800; text-decoration:none; }
.v2-resource-stage .pdf-embed-wrapper { width:100%; border:1px solid var(--v2-line); border-radius:18px; overflow:hidden; background:#eee; }
.v2-resource-stage .pdf-embed-frame { display:block; width:100%; height:min(78vh,900px); border:0; background:white; }
.v2-resource-stage .actividad-img { width:100%; max-width:780px; display:block; margin:18px auto; border-radius:18px; }
.v2-resource-stage .video-fuentes-frame, .v2-resource-stage iframe { max-width:100%; }
.v2-resource-stage .test, .v2-resource-stage .presueltas { color:var(--v2-ink); }
.v2-resource-stage .test label, .v2-resource-stage .presueltas { color:var(--v2-ink) !important; }

.v2-collection-layout { display:grid; grid-template-columns:minmax(0,2fr) minmax(240px,1fr); gap:30px; }
.v2-collection-layout h3 { margin:0 0 14px; font-size:1rem; }
.v2-badge-grid { display:grid; grid-template-columns:repeat(7,minmax(70px,1fr)); gap:12px; }
.v2-badge-item { position:relative; min-width:0; }
.v2-badge-item img { width:100%; aspect-ratio:1/1; object-fit:contain; border-radius:0; border:0; display:block; background:transparent; }
.v2-badge-item.is-locked img { filter:grayscale(1); opacity:.25; }
.v2-owned-mark { position:absolute; top:7px; right:7px; width:25px; height:25px; display:grid; place-items:center; border-radius:50%; background:#eaf7ef; color:#247347; font-size:.78rem; font-weight:950; box-shadow:0 2px 8px rgba(0,0,0,.15); }
.v2-badge-item button { appearance:none; border:0; background:none; padding:0; width:100%; cursor:pointer; }
.v2-badge-name { display:block; margin-top:7px; color:#596571; font-size:.69rem; line-height:1.25; text-align:center; }
.v2-card-slot { max-width:270px; }
.v2-card-visual { position:relative; overflow:hidden; border-radius:17px; border:1px solid #cbd3da; background:#100c03; box-shadow:0 12px 28px rgba(24,33,43,.13); }
.v2-card-visual img { display:block; width:100%; height:auto; }
.v2-card-visual.is-locked img { filter:grayscale(1); opacity:.28; }
.v2-card-visual--placeholder { background:#f5f7f9; }
.v2-card-placeholder-mark { display:grid; place-items:center; width:100%; aspect-ratio:3/4; border:2px dashed #cbd3da; border-radius:16px 16px 0 0; background:#f5f7f9; color:#6e7c89; font-size:4.5rem; font-weight:900; line-height:1; }
.v2-card-visual--placeholder .v2-card-level-overlay { display:block; padding:8px 12px 10px; background:#f5f7f9; color:#596571; font-size:.72rem; line-height:1.25; }
.v2-card-title { margin:9px 0 0; font-size:.82rem; color:#596571; }
.v2-card-description { margin:4px 0 0; font-size:.78rem; color:var(--v2-muted); }

.v2-level-nav { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.v2-level-link { display:flex; flex-direction:column; gap:5px; padding:18px 20px; border-radius:var(--v2-radius-lg); background:var(--v2-surface); border:1px solid var(--v2-line); text-decoration:none; }
.v2-level-link:last-child { text-align:right; align-items:flex-end; }
.v2-level-link span { color:var(--v2-muted); font-size:.76rem; text-transform:uppercase; letter-spacing:.08em; font-weight:800; }
.v2-level-link strong { font-size:1rem; }
.v2-level-link:hover:not(.is-disabled) { border-color:#cbd3da; box-shadow:0 8px 20px rgba(24,33,43,.06); }
.v2-level-link.is-disabled { opacity:.42; pointer-events:none; }

.v2-footer { max-width:1440px; margin:0 auto; padding:0 28px 34px; display:flex; justify-content:space-between; gap:20px; color:#7a858f; font-size:.78rem; }
.v2-empty { padding:16px; border:1px dashed var(--v2-line); border-radius:14px; color:var(--v2-muted); }
.v2-error { max-width:900px; margin:10vh auto; padding:24px; border:1px solid #e7c7c4; border-radius:18px; background:#fff8f7; color:#813d38; }

.v2-modal { position:fixed; inset:0; z-index:5000; display:grid; place-items:center; padding:20px; background:rgba(10,15,20,.72); }
.v2-modal[hidden] { display:none; }
.v2-modal-card { width:min(720px,96vw); max-height:88vh; overflow:auto; background:white; border-radius:22px; padding:24px; box-shadow:0 30px 80px rgba(0,0,0,.3); }
.v2-modal-image-wrap { position:relative; width:max-content; max-width:100%; margin:0 auto 18px; overflow:hidden; border-radius:16px; }
.v2-modal-card img { display:block; max-width:100%; max-height:55vh; margin:0; border-radius:16px; }
.v2-modal-card h3 { margin:0 0 8px; }
.v2-modal-card p { margin:0; color:var(--v2-muted); }
.v2-modal-close { float:right; border:1px solid var(--v2-line); background:white; border-radius:999px; padding:7px 11px; cursor:pointer; }

@media (max-width: 1100px) {
  .v2-hero { grid-template-columns:1fr; }
  .v2-featured-section { grid-template-columns:1fr; }
  .v2-status-card { max-width:none; }
  .v2-resource-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .v2-badge-grid { grid-template-columns:repeat(4,minmax(80px,1fr)); }
}
@media (max-width: 780px) {
  .v2-sitebar-inner { padding:0 16px; min-height:64px; flex-wrap:wrap; }
  .v2-brand-copy small { display:none; }
  .v2-menu-toggle { display:block; }
  .v2-nav { display:none; flex:1 0 100%; padding:0 0 12px; flex-wrap:wrap; }
  .v2-nav.is-open { display:flex; }
  .v2-page-shell { padding:20px 14px 44px; }
  .v2-hero { padding:24px; border-radius:22px; }
  .v2-hero h1 { font-size:clamp(2rem,11vw,3.2rem); }
  .v2-section, .v2-stage-section { padding:20px; border-radius:22px; }
  .v2-section-heading { align-items:flex-start; flex-direction:column; gap:10px; }
  .v2-section-heading > p { text-align:left; }
  .v2-resource-grid { grid-template-columns:1fr; }
  .v2-resource-card.is-featured { grid-column:auto; }
  .v2-collection-layout { grid-template-columns:1fr; }
  .v2-badge-grid { grid-template-columns:repeat(3,minmax(75px,1fr)); }
  .v2-card-slot { max-width:240px; }
  .v2-level-nav { grid-template-columns:1fr; }
  .v2-level-link:last-child { text-align:left; align-items:flex-start; }
  .v2-footer { padding:0 14px 24px; flex-direction:column; gap:4px; }
}
@media (max-width: 460px) {
  .v2-badge-grid { grid-template-columns:repeat(2,minmax(85px,1fr)); }
  .v2-audience-switch { width:100%; }
  .v2-audience-switch button { flex:1; }
}

/* v1.1 · Vista de profesor: didáctica primero y contenido del alumno opcional */
.v2-student-toggle-row {
  display:flex;
  justify-content:flex-start;
  margin-top:22px;
  padding-top:20px;
  border-top:1px solid #ded5eb;
}
.v2-student-toggle {
  border:1px solid #cfc5df;
  background:#fff;
  color:var(--v2-teacher);
  border-radius:999px;
  padding:10px 17px;
  cursor:pointer;
  font:inherit;
  font-weight:850;
  transition:background .16s ease,border-color .16s ease,transform .16s ease;
}
.v2-student-toggle:hover {
  background:#f6f2fb;
  border-color:#b9a9d1;
  transform:translateY(-1px);
}


/* v1.2 · Profesor y alumno son bloques independientes */
#teacher-section[hidden],
#student-content-panel[hidden],
#resource-stage-section[hidden] {
  display:none !important;
}

.v2-teacher-open-stage {
  margin-top:8px;
}

.v2-teacher-open-resource {
  margin-top:18px;
  padding:24px;
  border:1px solid #ded5eb;
  border-radius:22px;
  background:#fff;
}

.v2-teacher-open-resource:first-child {
  margin-top:0;
}

.v2-teacher-render-host .visor-bloque > h2 {
  margin:0 0 18px;
  font-size:1.35rem;
  line-height:1.2;
}

.v2-teacher-render-host .contenido {
  color:var(--v2-ink) !important;
  font-size:1rem;
  line-height:1.65;
}

.v2-teacher-render-host .contenido p {
  color:var(--v2-muted) !important;
}

.v2-teacher-render-host .video-embed,
.v2-teacher-render-host iframe:not(.pdf-embed-frame) {
  width:100%;
  max-width:960px;
  aspect-ratio:16/9;
  display:block;
  margin:18px auto;
  border:0;
  border-radius:18px;
}

.v2-teacher-render-host .pdf-toolbar-simple {
  display:flex;
  justify-content:flex-end;
  margin:20px 0 10px;
}

.v2-teacher-render-host .pdf-open-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 15px;
  border:1px solid #cfc5df;
  background:#f6f2fb;
  color:var(--v2-teacher);
  border-radius:999px;
  font-weight:800;
  text-decoration:none;
}

.v2-teacher-render-host .pdf-embed-wrapper {
  width:100%;
  border:1px solid var(--v2-line);
  border-radius:18px;
  overflow:hidden;
  background:#eee;
}

.v2-teacher-render-host .pdf-embed-frame {
  display:block;
  width:100%;
  height:min(78vh,900px);
  border:0;
  background:white;
}

.v2-student-content-panel {
  display:flex;
  flex-direction:column;
  gap:24px;
}

.v2-student-content-panel.is-optional-student-view {
  padding-top:4px;
}

@media (max-width: 780px) {
  .v2-teacher-open-resource {
    padding:16px;
    border-radius:18px;
  }
  .v2-teacher-render-host .pdf-embed-frame {
    height:70vh;
  }
}

/* V2 · icono global de Test por tipo de recurso */
.v2-resource-card.resource-type-test .v2-resource-icon {
  color: transparent !important;
  font-size: 0 !important;
  background-color: #ffffff;
  background-image: url('../assets/images/tests/test-icono-transparente.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 31px 31px;
}

@media (max-width: 680px) {
  .v2-resource-card.resource-type-test .v2-resource-icon {
    background-size: 29px 29px;
  }
}




/* V2 · teoría docente navegable integrada dentro de la propia píldora */
.v2-docente-inline {
  margin-top:24px;
  padding-top:24px;
  border-top:1px solid var(--v2-line);
}
.v2-docente-inline-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:22px;
  margin-bottom:18px;
}
.v2-docente-inline-head h3 {
  margin:4px 0 0;
  font-size:clamp(1.65rem,2.7vw,2.45rem);
  line-height:1.08;
  letter-spacing:-.03em;
}
.v2-docente-inline-subtitle { margin:8px 0 0; color:var(--v2-teacher); font-weight:800; }
.v2-docente-inline-description { max-width:850px; margin:6px 0 0; color:var(--v2-muted); }
.v2-docente-print {
  flex:0 0 auto;
  min-height:42px;
  padding:0 15px;
  border:1px solid #cfc5df;
  border-radius:999px;
  background:#f5f1fa;
  color:var(--v2-teacher);
  font:inherit;
  font-weight:850;
  cursor:pointer;
}
.v2-docente-inline-layout {
  display:grid;
  grid-template-columns:minmax(210px,260px) minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.v2-docente-sidebar {
  position:sticky;
  top:90px;
  padding:14px;
  border:1px solid var(--v2-line);
  border-radius:16px;
  background:#fff;
}
.v2-docente-sidebar-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.v2-docente-index-toggle { display:none; border:1px solid var(--v2-line); border-radius:9px; background:#fff; padding:6px 9px; font:inherit; font-weight:800; cursor:pointer; }
.v2-docente-index { display:grid; gap:5px; margin-top:8px; }
.v2-docente-index a {
  display:grid;
  grid-template-columns:27px minmax(0,1fr);
  gap:8px;
  padding:9px;
  border-radius:11px;
  color:#45515c;
  text-decoration:none;
}
.v2-docente-index a:hover { background:#f3f5f7; color:var(--v2-ink); }
.v2-docente-index a.is-active {
  background:#f0f2f5;
  color:var(--v2-ink);
}
.v2-docente-index a.is-active .v2-docente-index-number {
  background:#e1e7ec;
  color:var(--v2-teacher);
}
.v2-docente-index-number {
  display:grid;
  place-items:center;
  width:25px;
  height:25px;
  border-radius:7px;
  background:#eef2f5;
  color:#64717c;
  font-size:.72rem;
  font-weight:900;
}
.v2-docente-index a strong { display:block; font-size:.88rem; line-height:1.25; }
.v2-docente-index a small { display:block; margin-top:3px; color:var(--v2-muted); font-size:.73rem; line-height:1.3; }
.v2-docente-content { display:grid; gap:16px; min-width:0; }
.v2-docente-section {
  display:none;
  scroll-margin-top:95px;
  padding:25px;
  border:1px solid var(--v2-line);
  border-radius:19px;
  background:#fff;
}
.v2-docente-section.is-active { display:block; }
.v2-docente-section-head { margin-bottom:20px; padding-bottom:15px; border-bottom:1px solid var(--v2-line); }
.v2-docente-section-head > span { color:var(--v2-teacher); font-size:.75rem; font-weight:900; letter-spacing:.07em; text-transform:uppercase; }
.v2-docente-section-head h4 { margin:4px 0 0; font-size:clamp(1.35rem,2vw,1.9rem); line-height:1.1; }
.v2-docente-section-head p { margin:7px 0 0; color:var(--v2-muted); }
.v2-docente-block + .v2-docente-block { margin-top:18px; }
.v2-docente-block-text,
.v2-docente-block-subtitulo,
.v2-docente-block-cierre { color:#303b45; line-height:1.75; }
.v2-docente-block-text p,
.v2-docente-block-subtitulo p,
.v2-docente-block-cierre p { margin:0 0 13px; }
.v2-docente-block-text p:last-child,
.v2-docente-block-subtitulo p:last-child,
.v2-docente-block-cierre p:last-child { margin-bottom:0; }
.v2-docente-block-subtitulo h4,
.v2-docente-list h4,
.v2-docente-cards h4 { margin:0 0 10px; font-size:1.12rem; }
.v2-docente-callout {
  padding:18px 20px;
  border:1px solid #d8d0e7;
  border-left:5px solid var(--v2-teacher);
  border-radius:14px;
  background:#f7f4fb;
}
.v2-docente-callout-label { display:block; margin-bottom:5px; color:var(--v2-teacher); font-size:.75rem; font-weight:900; letter-spacing:.05em; text-transform:uppercase; }
.v2-docente-callout p { margin:0; color:#39434d; line-height:1.68; }
.v2-docente-list { padding:18px 20px; border:1px solid #e0e5e9; border-radius:14px; background:#f7f9fa; }
.v2-docente-list ul { margin:0; padding-left:1.2rem; }
.v2-docente-list li { margin:.4rem 0; color:#39434d; line-height:1.55; }
.v2-docente-card-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.v2-docente-theory-card { padding:17px; border:1px solid var(--v2-line); border-radius:14px; background:#fbfcfd; }
.v2-docente-theory-card h5 { margin:0 0 7px; font-size:1rem; }
.v2-docente-theory-card p { margin:0; color:#45515c; line-height:1.62; }
.v2-docente-theory-ref { display:block; margin-top:9px; color:var(--v2-muted); font-size:.76rem; font-weight:750; }
.v2-docente-block-cierre { padding:18px 20px; border-radius:14px; background:#edf3f7; }

@media (max-width:900px) {
  .v2-docente-inline-head { align-items:flex-start; flex-direction:column; }
  .v2-docente-inline-layout { grid-template-columns:1fr; }
  .v2-docente-sidebar { position:static; }
  .v2-docente-index-toggle { display:inline-flex; }
  .v2-docente-index { display:none; margin-top:10px; }
  .v2-docente-sidebar.is-open .v2-docente-index { display:grid; }
}
@media (max-width:680px) {
  .v2-docente-section { padding:20px 16px; }
  .v2-docente-card-grid { grid-template-columns:1fr; }
  .v2-docente-print { width:100%; }
}
@media print {
  body.v2-print-docente .v2-sitebar,
  body.v2-print-docente .v2-footer,
  body.v2-print-docente .v2-hero,
  body.v2-print-docente #prereq-panel,
  body.v2-print-docente #student-content-panel,
  body.v2-print-docente .v2-collection-section,
  body.v2-print-docente .v2-level-nav,
  body.v2-print-docente .v2-student-toggle-row,
  body.v2-print-docente .v2-docente-sidebar,
  body.v2-print-docente .v2-docente-print,
  body.v2-print-docente .menu-video-fuentes-host { display:none !important; }
  body.v2-print-docente { background:#fff !important; }
  body.v2-print-docente .v2-shell { max-width:none; padding:0; }
  body.v2-print-docente #teacher-section { display:block !important; border:0; box-shadow:none; padding:0; }
  body.v2-print-docente .v2-teacher-render-host > .visor-bloque > h2,
  body.v2-print-docente .v2-teacher-render-host > .visor-bloque > .contenido > div:first-child { display:none !important; }
  body.v2-print-docente .v2-docente-inline { margin:0; padding:0; border:0; }
  body.v2-print-docente .v2-docente-inline-layout { display:block; }
  body.v2-print-docente .v2-docente-section { display:block !important; border:0; padding:0; margin:0 0 22px; break-inside:avoid-page; }
  body.v2-print-docente .v2-docente-callout,
  body.v2-print-docente .v2-docente-list,
  body.v2-print-docente .v2-docente-theory-card,
  body.v2-print-docente .v2-docente-block-cierre { break-inside:avoid; }
}

/* v1.3 · Vídeo docente como sección navegable de la propia guía */
.v2-docente-index a.is-video {
  border-top:1px solid #e3e7ea;
  margin-top:5px;
  padding-top:12px;
}

.v2-docente-video-section .v2-teacher-render-host .visor-bloque > h2 {
  display:none;
}

.v2-docente-video-section .v2-teacher-render-host .contenido {
  margin-top:0;
  color:var(--v2-ink) !important;
}

.v2-docente-video-section .v2-teacher-render-host .contenido > div:first-child:empty {
  display:none;
}

.v2-docente-video-content .video-embed,
.v2-docente-video-content iframe:not(.pdf-embed-frame),
.v2-docente-video-content video {
  width:100%;
  max-width:100%;
}

/* El material del alumnado sigue siendo otro bloque de la misma píldora,
   plegado por defecto en vista profesor y fuera del índice docente. */
body.v2-view-profesor #student-content-panel {
  margin-top:22px;
}

/* v1.4 · Navegación tipo eXeLearning: una sola sección docente visible cada vez. */

/* v1.5 · Navegación tipo eXeLearning también para el contenido del alumnado. */
.v2-alumno-inline {
  padding:26px;
  border:1px solid var(--v2-line);
  border-radius:24px;
  background:#fff;
  box-shadow:var(--v2-shadow);
}
.v2-alumno-inline-head {
  margin-bottom:18px;
}
.v2-alumno-inline-head h2 {
  margin:4px 0 0;
  font-size:clamp(1.55rem,2.4vw,2.2rem);
  line-height:1.08;
  letter-spacing:-.025em;
}
.v2-alumno-inline-head p {
  max-width:820px;
  margin:8px 0 0;
  color:var(--v2-muted);
  line-height:1.6;
}
.v2-alumno-inline-layout {
  display:grid;
  grid-template-columns:minmax(210px,260px) minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.v2-alumno-sidebar {
  position:sticky;
  top:90px;
  padding:14px;
  border:1px solid var(--v2-line);
  border-radius:16px;
  background:#fff;
}
.v2-alumno-sidebar-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.v2-alumno-index-toggle {
  display:none;
  border:1px solid var(--v2-line);
  border-radius:9px;
  background:#fff;
  padding:6px 9px;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
.v2-alumno-index {
  display:grid;
  gap:5px;
  margin-top:8px;
}
.v2-alumno-index a {
  display:grid;
  grid-template-columns:27px minmax(0,1fr);
  gap:8px;
  padding:9px;
  border-radius:11px;
  color:#45515c;
  text-decoration:none;
}
.v2-alumno-index a:hover {
  background:#f3f6f9;
  color:var(--v2-ink);
}
.v2-alumno-index a.is-active {
  background:#edf3f8;
  color:var(--v2-ink);
}
.v2-alumno-index a.is-active .v2-alumno-index-number {
  background:#dbe7f1;
  color:var(--v2-accent-strong);
}
.v2-alumno-index-number {
  display:grid;
  place-items:center;
  width:25px;
  height:25px;
  border-radius:7px;
  background:#eef2f5;
  color:#64717c;
  font-size:.72rem;
  font-weight:900;
}
.v2-alumno-index a strong {
  display:block;
  font-size:.88rem;
  line-height:1.25;
}
.v2-alumno-index a small {
  display:block;
  margin-top:3px;
  color:var(--v2-muted);
  font-size:.73rem;
  line-height:1.3;
}
.v2-alumno-content {
  display:grid;
  min-width:0;
}
.v2-alumno-section {
  display:none;
  scroll-margin-top:95px;
  padding:25px;
  border:1px solid var(--v2-line);
  border-radius:19px;
  background:#fff;
}
.v2-alumno-section.is-active {
  display:block;
}
.v2-alumno-section-head {
  margin-bottom:18px;
  padding-bottom:14px;
  border-bottom:1px solid var(--v2-line);
}
.v2-alumno-section-head > span {
  color:var(--v2-accent-strong);
  font-size:.75rem;
  font-weight:900;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.v2-alumno-section-head h3 {
  margin:4px 0 0;
  font-size:clamp(1.3rem,2vw,1.85rem);
  line-height:1.1;
}
.v2-alumno-resource-host > .visor-bloque > h2 {
  display:none;
}
.v2-alumno-resource-host .contenido {
  margin-top:0;
  color:var(--v2-ink) !important;
}
.v2-alumno-resource-host .video-embed,
.v2-alumno-resource-host iframe:not(.pdf-embed-frame),
.v2-alumno-resource-host video {
  width:100%;
  max-width:100%;
}

@media (max-width:900px) {
  .v2-alumno-inline-layout { grid-template-columns:1fr; }
  .v2-alumno-sidebar { position:static; }
  .v2-alumno-index-toggle { display:inline-flex; }
  .v2-alumno-index { display:none; margin-top:10px; }
  .v2-alumno-sidebar.is-open .v2-alumno-index { display:grid; }
}
@media (max-width:680px) {
  .v2-alumno-inline { padding:20px 14px; }
  .v2-alumno-section { padding:20px 14px; }
}

/* v1.6 · Índices eXeLearning con scroll propio en escritorio.
   Evita que una sección larga obligue a recorrer todo su contenido
   para poder alcanzar las entradas inferiores del índice. */
@media (min-width: 821px) {
  .v2-docente-sidebar,
  .v2-alumno-sidebar {
    max-height:calc(100vh - 110px);
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }

  .v2-docente-index,
  .v2-alumno-index {
    min-height:0;
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
    padding-right:4px;
  }
}

@media (max-width: 820px) {
  .v2-docente-sidebar,
  .v2-alumno-sidebar {
    max-height:none;
    overflow:visible;
  }

  .v2-docente-index,
  .v2-alumno-index {
    overflow:visible;
    padding-right:0;
  }
}

/* v1.7 · Glosario dentro de la navegación eXeLearning del alumnado.
   La lógica funcional sigue siendo la ya existente en menu.js + glosario_menu.js;
   aquí solo se adapta su presentación al lenguaje visual V2 de la píldora. */
.v2-alumno-section.resource-type-glosario .v2-alumno-section-head p {
  margin:8px 0 0;
  color:var(--v2-muted);
}
.v2-alumno-glossary-host > .visor-bloque {
  padding:0;
  border:0;
  background:transparent;
}
.v2-alumno-glossary-host > .visor-bloque > h2 {
  display:none;
}
.v2-alumno-glossary-host #mensaje-glosario {
  margin:0 0 14px !important;
  padding:12px 14px;
  border:1px solid var(--v2-line);
  border-radius:12px;
  background:#f7fafc;
  color:var(--v2-accent-strong) !important;
  font-weight:800 !important;
}
.v2-alumno-glossary-host #mensaje-glosario:empty {
  display:none;
}
.v2-alumno-glossary-host #lista-glosario {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:0 0 20px;
}
.v2-alumno-glossary-host .boton-glosario-item {
  appearance:none;
  border:1px solid var(--v2-line);
  border-radius:999px;
  background:#fff;
  color:var(--v2-ink);
  padding:10px 14px;
  font:inherit;
  font-size:.88rem;
  font-weight:800;
  line-height:1.2;
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease, transform .15s ease;
}
.v2-alumno-glossary-host .boton-glosario-item:hover,
.v2-alumno-glossary-host .boton-glosario-item:focus-visible {
  border-color:var(--v2-accent);
  background:#f7fafc;
  outline:none;
  transform:translateY(-1px);
}
.v2-alumno-glossary-host #definicion-glosario:empty {
  display:none;
}
.v2-alumno-glossary-host .definition {
  margin-top:4px;
  padding:20px;
  border:1px solid var(--v2-line);
  border-radius:16px;
  background:#fff;
  color:var(--v2-ink);
}
.v2-alumno-glossary-host .definition h3 {
  margin:0 0 14px;
  font-size:1.3rem;
}
.v2-alumno-glossary-host .definition p {
  color:var(--v2-ink) !important;
  line-height:1.65;
}
.v2-alumno-glossary-host .definition a {
  color:var(--v2-blue);
  font-weight:800;
}
.v2-alumno-glossary-host .definition a:hover {
  color:#1f538e;
  text-decoration:underline;
}
.v2-alumno-glossary-host .definition a:focus-visible {
  color:#1f538e;
  outline:2px solid rgba(39,95,157,.24);
  outline-offset:2px;
}
.v2-alumno-glossary-host .boton-audio {
  appearance:none;
  margin-top:8px;
  border:1px solid var(--v2-line);
  border-radius:12px;
  background:#f7fafc;
  color:var(--v2-ink);
  padding:11px 14px;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
@media (max-width:680px) {
  .v2-alumno-glossary-host #lista-glosario {
    display:grid;
    grid-template-columns:1fr;
  }
  .v2-alumno-glossary-host .boton-glosario-item {
    width:100%;
    text-align:left;
  }
  .v2-alumno-glossary-host .definition {
    padding:16px;
  }
}


/* Progreso dinámico de la píldora del alumnado.
   Se calcula desde las insignias específicas asociadas al conocimiento;
   las insignias globales no intervienen. */
.v2-alumno-progress {
  margin-bottom:13px;
  padding:12px;
  border:1px solid #dce4ea;
  border-radius:12px;
  background:#f6f8fa;
}
.v2-alumno-progress-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.v2-alumno-progress-head span {
  color:#53616d;
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.v2-alumno-progress-head strong {
  color:var(--v2-ink);
  font-size:.9rem;
}
.v2-alumno-progress-bar {
  height:7px;
  margin-top:9px;
  overflow:hidden;
  border-radius:999px;
  background:#e3e9ee;
}
.v2-alumno-progress-bar > span {
  display:block;
  width:0;
  height:100%;
  border-radius:inherit;
  background:#557fa4;
  transition:width .22s ease;
}
.v2-alumno-progress small {
  display:block;
  margin-top:7px;
  color:var(--v2-muted);
  font-size:.7rem;
  line-height:1.3;
}
.v2-alumno-progress.is-complete {
  border-color:#cfe6d7;
  background:#f2f8f4;
}
.v2-alumno-progress.is-complete .v2-alumno-progress-bar > span {
  background:#4b8b62;
}

/* =========================================================
   V2 · TEST Y PREGUNTAS RESUELTAS
   Ajuste visual exclusivo dentro de píldoras V2.
   Base: pildora-v2.css original del servidor subida por el usuario.
   No modifica la apariencia de páginas legacy.
   ========================================================= */

/* ---------- TEST ---------- */
.v2-alumno-section.resource-type-test form[id^="quiz-form"] {
  color: var(--v2-ink);
}

.v2-alumno-section.resource-type-test form[id^="quiz-form"] > div {
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--v2-line);
}

.v2-alumno-section.resource-type-test form[id^="quiz-form"] > div:first-child {
  padding-top: 0;
}

.v2-alumno-section.resource-type-test form[id^="quiz-form"] > div:last-of-type {
  margin-bottom: 18px;
}

/* test.js genera el enunciado con color inline legacy. */
.v2-alumno-section.resource-type-test form[id^="quiz-form"] span[style] {
  color: var(--v2-ink) !important;
}

.v2-alumno-section.resource-type-test form[id^="quiz-form"] .opcion-label {
  color: var(--v2-ink) !important;
  font-weight: 500;
  line-height: 1.55;
}

.v2-alumno-section.resource-type-test form[id^="quiz-form"] input[type="radio"] {
  accent-color: var(--v2-blue);
  transform: translateY(1px);
}

.v2-alumno-section.resource-type-test .boton-audio,
.v2-alumno-section.resource-type-test .boton-test {
  appearance: none;
  border: 1px solid #cfd8e0 !important;
  border-radius: 12px !important;
  background: #f4f7f9 !important;
  color: var(--v2-blue) !important;
  box-shadow: none !important;
  font: inherit;
  font-weight: 800 !important;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.v2-alumno-section.resource-type-test .boton-audio:hover,
.v2-alumno-section.resource-type-test .boton-test:hover {
  background: #edf3f7 !important;
  border-color: #bfcbd5 !important;
  color: #1f538e !important;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(24,33,43,.07) !important;
}

.v2-alumno-section.resource-type-test input.boton-test[type="submit"] {
  min-width: 120px;
  padding: .68rem 1.15rem !important;
  background: var(--v2-blue) !important;
  border-color: var(--v2-blue) !important;
  color: #fff !important;
}

.v2-alumno-section.resource-type-test input.boton-test[type="submit"]:hover {
  background: #1f538e !important;
  border-color: #1f538e !important;
  color: #fff !important;
}

.v2-alumno-section.resource-type-test .resultado-test {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #d7e1e8;
  border-radius: 14px;
  background: #f5f8fa;
  color: var(--v2-ink);
  font-weight: 800;
}

.v2-alumno-section.resource-type-test .boton-reiniciar-test {
  margin-top: 10px;
}

/* ---------- PREGUNTAS RESUELTAS ---------- */
.v2-alumno-section.resource-type-preguntas_resueltas .presueltas,
.v2-alumno-section.resource-type-preguntas_resueltas .v2-preguntas-resueltas {
  color: var(--v2-ink) !important;
}

.v2-alumno-section.resource-type-preguntas_resueltas .titulo-portada {
  color: var(--v2-ink) !important;
}

.v2-alumno-section.resource-type-preguntas_resueltas .spoiler {
  color: var(--v2-ink) !important;
  background: #f5f8fa !important;
  border: 1px solid #d7e1e8 !important;
  box-shadow: none !important;
}

.v2-alumno-section.resource-type-preguntas_resueltas .spoiler:hover {
  color: var(--v2-ink) !important;
  background: #f0f5f8 !important;
  border-color: #c8d5de !important;
  box-shadow: 0 7px 18px rgba(24,33,43,.06) !important;
}

.v2-alumno-section.resource-type-preguntas_resueltas .spoiler.pregunta-sin-toggle-global:hover {
  transform: none !important;
  box-shadow: none !important;
}

.v2-alumno-section.resource-type-preguntas_resueltas .spoiler-content {
  margin-left: 0 !important;
  margin-top: 8px;
  padding: 16px 18px !important;
  background: #fff !important;
  color: var(--v2-ink) !important;
  border: 1px solid #d7e1e8 !important;
  border-left: 4px solid var(--v2-blue) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

.v2-alumno-section.resource-type-preguntas_resueltas .spoiler-content strong {
  color: var(--v2-blue) !important;
}

.v2-alumno-section.resource-type-preguntas_resueltas .spoiler-content em {
  color: var(--v2-muted) !important;
}

.v2-alumno-section.resource-type-preguntas_resueltas .audio-button,
.v2-alumno-section.resource-type-preguntas_resueltas .solution-button {
  appearance: none;
  border: 1px solid #cfd8e0 !important;
  border-radius: 12px !important;
  background: #f4f7f9 !important;
  color: var(--v2-blue) !important;
  box-shadow: none !important;
  font: inherit;
  font-weight: 800 !important;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.v2-alumno-section.resource-type-preguntas_resueltas .audio-button:hover,
.v2-alumno-section.resource-type-preguntas_resueltas .solution-button:hover {
  background: #edf3f7 !important;
  border-color: #bfcbd5 !important;
  color: #1f538e !important;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(24,33,43,.07) !important;
}

.v2-alumno-section.resource-type-preguntas_resueltas .respuesta-actions {
  border-top-color: var(--v2-line) !important;
}

/* El verde de pregunta consultada se mantiene por ser estado semántico. */
.v2-alumno-section.resource-type-preguntas_resueltas .consultada-mark {
  color: var(--v2-success) !important;
}

@media (max-width: 680px) {
  .v2-alumno-section.resource-type-test .boton-audio,
  .v2-alumno-section.resource-type-test .boton-test,
  .v2-alumno-section.resource-type-preguntas_resueltas .audio-button,
  .v2-alumno-section.resource-type-preguntas_resueltas .solution-button {
    width: 100%;
    justify-content: center;
  }
}


/* =========================================================
   V2 · BOTONES DE FUENTES DE VÍDEO
   Sustituye únicamente la estética legacy marrón/dorada
   inyectada por js/video-fuentes.js dentro de las píldoras V2.
   No modifica funcionalidad, URLs ni selección de fuente.
   ========================================================= */

body.pildora-v2-page .video-fuentes-tab {
  appearance: none;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #cfd8e0;
  border-radius: 999px;
  background: #f8fafc;
  color: #44525f;
  box-shadow: none;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    background-color .15s ease,
    color .15s ease,
    border-color .15s ease,
    transform .15s ease,
    box-shadow .15s ease;
}

body.pildora-v2-page .video-fuentes-tab:hover:not(:disabled) {
  background: #edf3f7;
  color: #1f538e;
  border-color: #b9c8d4;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(24, 33, 43, .07);
}

body.pildora-v2-page .video-fuentes-tab.is-active {
  background: #e4eef6;
  color: #234f79;
  border-color: #9eb6c8;
  box-shadow: 0 0 0 3px rgba(39, 95, 157, .10);
}

body.pildora-v2-page .video-fuentes-tab.is-active:hover:not(:disabled) {
  background: #dceaf4;
  color: #1f538e;
  border-color: #8faabd;
}

body.pildora-v2-page .video-fuentes-tab:focus-visible {
  outline: 3px solid rgba(39, 95, 157, .24);
  outline-offset: 2px;
}

body.pildora-v2-page .video-fuentes-tab:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* BLOG Mathematica · Contar y cantidad · teoría alumnado · edición compacta */
.v2-alumno-resource-host .mdc-theory{color:var(--v2-ink);font-size:1rem;line-height:1.72}
.v2-alumno-resource-host .mdc-theory p{margin:0 0 1rem;text-align:left}
.v2-alumno-resource-host .mdc-theory .mdc-lead{font-size:1.08rem;line-height:1.68}
.v2-alumno-resource-host .mdc-theory strong{color:var(--v2-accent-strong)}
.v2-alumno-resource-host .mdc-key{max-width:780px;margin:1.15rem auto 0;padding:14px 16px;border:1px solid #d9e2e8;border-left:4px solid var(--v2-accent);border-radius:12px;background:#f7f9fb;line-height:1.6}
.v2-alumno-resource-host .mdc-figure-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;max-width:820px;margin:1.25rem auto}
.v2-alumno-resource-host .mdc-figure{max-width:540px;margin:1.25rem auto;padding:10px;border:1px solid #e0e5e9;border-radius:15px;background:#fafbfc}
.v2-alumno-resource-host .mdc-figure-grid .mdc-figure{width:100%;max-width:390px;margin:0 auto}
.v2-alumno-resource-host .mdc-figure img{display:block;width:auto;max-width:100%;height:auto;max-height:330px;margin:0 auto;border-radius:10px;background:#fff;object-fit:contain}
.v2-alumno-resource-host .mdc-figure--small img{max-height:260px}
.v2-alumno-resource-host .mdc-figure--medium{max-width:500px}
.v2-alumno-resource-host .mdc-figure--medium img{max-height:350px}
.v2-alumno-resource-host .mdc-figure figcaption{margin-top:9px;color:var(--v2-muted);font-size:.86rem;line-height:1.45;text-align:left}
.v2-alumno-resource-host .mdc-concept-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:820px;margin:1rem auto 1.2rem}
.v2-alumno-resource-host .mdc-concept{padding:15px;border:1px solid #dde4e9;border-radius:14px;background:#f8fafb}
.v2-alumno-resource-host .mdc-concept h4{margin:0 0 7px;color:var(--v2-accent-strong);font-size:1rem}
.v2-alumno-resource-host .mdc-concept p{margin:0;font-size:.93rem;line-height:1.55}
@media(max-width:760px){
  .v2-alumno-resource-host .mdc-figure-grid,.v2-alumno-resource-host .mdc-concept-grid{grid-template-columns:1fr}
  .v2-alumno-resource-host .mdc-figure-grid .mdc-figure{max-width:480px}
  .v2-alumno-resource-host .mdc-figure img{max-height:300px}
}


/* MDC theory subheads v2 */
.v2-alumno-resource-host .mdc-theory h3{margin:1.55rem 0 .7rem;color:var(--v2-accent-strong);font-size:1.12rem;line-height:1.35}

/* =========================================================
   V2 · PROGRESO EXPLÍCITO DE LECTURA DE TEORÍA
   Añadido sobre el CSS consolidado actual. No modifica las
   reglas de imágenes existentes ni el resto de recursos.
   ========================================================= */
.v2-theory-read-control {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  max-width:820px;
  margin:1.65rem auto .35rem;
  padding:16px 18px;
  border:1px solid #d7e1e8;
  border-radius:15px;
  background:#f6f8fa;
}
.v2-theory-read-control > div { min-width:0; }
.v2-theory-read-control strong {
  display:block;
  margin:0 0 4px;
  color:var(--v2-ink);
  font-size:.95rem;
}
.v2-theory-read-control p {
  margin:0 !important;
  color:var(--v2-muted) !important;
  font-size:.86rem;
  line-height:1.45;
}
.v2-theory-read-control button,
.v2-theory-read-login {
  flex:0 0 auto;
  appearance:none;
  min-height:40px;
  padding:9px 14px;
  border:1px solid #b9c8d4;
  border-radius:999px;
  background:#edf3f7;
  color:#234f79;
  font:inherit;
  font-size:.86rem;
  font-weight:850;
  text-decoration:none;
  cursor:pointer;
  transition:background-color .15s ease,border-color .15s ease,transform .15s ease,box-shadow .15s ease;
}
.v2-theory-read-control button:hover:not(:disabled),
.v2-theory-read-login:hover {
  background:#e4eef6;
  border-color:#9eb6c8;
  transform:translateY(-1px);
  box-shadow:0 7px 18px rgba(24,33,43,.07);
}
.v2-theory-read-control.is-read {
  border-color:#cfe6d7;
  background:#f2f8f4;
}
.v2-theory-read-control.is-read button {
  border-color:#b9d9c5;
  background:#e6f3ea;
  color:#2f7048;
  cursor:default;
}
.v2-alumno-index a.is-complete .v2-alumno-index-number {
  border-color:#b9d9c5;
  background:#e6f3ea;
  color:#2f7048;
}
.v2-alumno-index a.is-complete small::after {
  content:" · Leído";
  color:#2f7048;
  font-weight:800;
}
@media (max-width:680px) {
  .v2-theory-read-control {
    align-items:stretch;
    flex-direction:column;
  }
  .v2-theory-read-control button,
  .v2-theory-read-login {
    width:100%;
    text-align:center;
  }
}


/* =========================================================
   V2 · COMPLETAR FRASES
   Adaptación visual del motor legacy al lenguaje V2.
   Solo se aplica dentro de pildora-v2-page.
   ========================================================= */

body.pildora-v2-page .completarc-motor {
  --completarc-bg: var(--v2-surface);
  --completarc-panel: #f8fafc;
  --completarc-panel-2: #edf3f7;
  --completarc-text: var(--v2-ink);
  --completarc-muted: var(--v2-muted);

  /* El motor conserva los nombres históricos de estas variables,
     pero en V2 dejan de representar tonos dorados. */
  --completarc-gold: var(--v2-blue);
  --completarc-gold-2: #557fa4;
  --completarc-gold-3: #dbe7f1;
  --completarc-border: #d7e1e8;

  --completarc-ok: var(--v2-success);
  --completarc-ok-bg: var(--v2-success-soft);
  --completarc-wrong: var(--v2-danger);
  --completarc-wrong-bg: var(--v2-danger-soft);
  --completarc-info: #234f79;
  --completarc-info-bg: var(--v2-blue-soft);
  --completarc-shadow: 0 10px 24px rgba(24, 33, 43, .07);

  color: var(--v2-ink);
}

/* Superficies principales */
body.pildora-v2-page .completarc-header,
body.pildora-v2-page .completarc-top-panel,
body.pildora-v2-page .completarc-text-panel,
body.pildora-v2-page .completarc-bank-panel,
body.pildora-v2-page .completarc-summary {
  border-color: #d7e1e8;
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fa 100%);
  box-shadow: var(--completarc-shadow);
}

body.pildora-v2-page .completarc-title,
body.pildora-v2-page .completarc-stat-value,
body.pildora-v2-page .completarc-summary-title,
body.pildora-v2-page .completarc-summary-grid strong {
  color: var(--v2-blue);
}

body.pildora-v2-page .completarc-instruction,
body.pildora-v2-page .completarc-stat-label,
body.pildora-v2-page .completarc-sentence-prefix,
body.pildora-v2-page .completarc-sentence-suffix,
body.pildora-v2-page .completarc-bank-empty,
body.pildora-v2-page .completarc-summary-grid span,
body.pildora-v2-page .completarc-empty {
  color: var(--v2-muted);
}

/* Estadísticas y tarjetas */
body.pildora-v2-page .completarc-stat,
body.pildora-v2-page .completarc-sentence,
body.pildora-v2-page .completarc-summary-grid > div,
body.pildora-v2-page .completarc-empty {
  border-color: #dbe3e9;
  background: #ffffff;
}

body.pildora-v2-page .completarc-panel-title {
  background: var(--v2-blue-soft);
  color: var(--v2-blue);
}

/* Botones */
body.pildora-v2-page .completarc-action-button {
  border-color: #bfcbd5;
  background: #f4f7f9;
  color: var(--v2-blue);
  box-shadow: none;
}

body.pildora-v2-page .completarc-action-button:hover:not(:disabled) {
  border-color: #aebfcb;
  background: #edf3f7;
  color: #1f538e;
  box-shadow: 0 7px 18px rgba(24, 33, 43, .07);
}

body.pildora-v2-page .completarc-action-button--primary {
  border-color: var(--v2-blue);
  background: var(--v2-blue);
  color: #ffffff;
}

body.pildora-v2-page .completarc-action-button--primary:hover:not(:disabled) {
  border-color: #1f538e;
  background: #1f538e;
  color: #ffffff;
}

/* Mensajes */
body.pildora-v2-page .completarc-status--info {
  border-color: #c8d9e7;
  background: var(--v2-blue-soft);
  color: #234f79;
}

body.pildora-v2-page .completarc-status--success,
body.pildora-v2-page .completarc-status--ok {
  border-color: #cfe6d7;
  background: var(--v2-success-soft);
  color: var(--v2-success);
}

body.pildora-v2-page .completarc-status--error,
body.pildora-v2-page .completarc-status--wrong {
  border-color: #ebcecb;
  background: var(--v2-danger-soft);
  color: var(--v2-danger);
}

/* Huecos de respuesta */
body.pildora-v2-page .completarc-blank {
  border-color: #aebfcb;
  background: #ffffff;
}

body.pildora-v2-page .completarc-blank:hover,
body.pildora-v2-page .completarc-blank:focus {
  border-color: var(--v2-blue);
  background: #f7fafc;
  box-shadow: 0 0 0 4px rgba(39, 95, 157, .10);
}

body.pildora-v2-page .completarc-blank.is-filled {
  background: #f8fafc;
}

body.pildora-v2-page .completarc-blank.is-selected,
body.pildora-v2-page .completarc-blank.is-drag-over {
  border-color: #557fa4;
  background: #e8f1f8;
  box-shadow: 0 0 0 4px rgba(39, 95, 157, .12);
}

body.pildora-v2-page .completarc-blank-placeholder,
body.pildora-v2-page .completarc-blank-static {
  background: #9eb6c8;
}

/* Correcto / incorrecto siguen usando semántica verde/roja */
body.pildora-v2-page .completarc-blank.is-correct {
  border-color: var(--v2-success);
  background: var(--v2-success-soft);
}

body.pildora-v2-page .completarc-blank.is-wrong {
  border-color: var(--v2-danger);
  background: var(--v2-danger-soft);
}

/* Fichas/palabras */
body.pildora-v2-page .completarc-piece {
  border-color: #b8c8d4;
  background: linear-gradient(180deg, #ffffff 0%, #eaf1f6 100%);
  color: #234f79;
}

body.pildora-v2-page .completarc-piece:hover,
body.pildora-v2-page .completarc-piece:focus {
  box-shadow: 0 7px 18px rgba(24, 33, 43, .09);
}

body.pildora-v2-page .completarc-piece.is-selected {
  border-color: var(--v2-blue);
  background: #dceaf4;
  color: #1f538e;
  box-shadow: 0 0 0 4px rgba(39, 95, 157, .12);
}

/* Banco de palabras */
body.pildora-v2-page .completarc-bank {
  border-color: #b8c8d4;
  background: #f8fafc;
}

body.pildora-v2-page .completarc-bank.is-drag-over {
  border-color: #557fa4;
  background: #e8f1f8;
  box-shadow: 0 0 0 4px rgba(39, 95, 157, .10);
}

/* El ghost mantiene sombra neutra, nunca dorada */
body.pildora-v2-page .is-pointer-ghost {
  box-shadow: 0 10px 28px rgba(24, 33, 43, .20);
}


/* =========================================================
   V2 · RANKING DE JUEGOS
   Adaptación visual del ranking legacy al lenguaje V2.
   Solo se aplica dentro de pildora-v2-page.
   ========================================================= */

body.pildora-v2-page .ranking-juegos-box {
  border-color: #d7e1e8;
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fa 100%);
  color: var(--v2-ink);
  box-shadow: 0 10px 24px rgba(24, 33, 43, .07);
}

body.pildora-v2-page .ranking-juegos-title {
  color: var(--v2-blue);
}

body.pildora-v2-page .ranking-juegos-fila {
  border-color: #d7e1e8;
  background: linear-gradient(180deg, #ffffff 0%, #eef3f7 100%);
  box-shadow: 0 6px 16px rgba(24, 33, 43, .06);
}

body.pildora-v2-page .ranking-juegos-fila--destacada {
  border-color: #9eb6c8;
  box-shadow:
    0 0 0 2px rgba(39, 95, 157, .10),
    0 6px 16px rgba(24, 33, 43, .06);
}

body.pildora-v2-page .ranking-juegos-fila--actual {
  border-color: #8faabd;
  background: linear-gradient(180deg, #f7fbff 0%, #e4eef6 100%);
}

body.pildora-v2-page .ranking-juegos-col--pos,
body.pildora-v2-page .ranking-juegos-col--name {
  color: var(--v2-ink);
}

body.pildora-v2-page .ranking-juegos-col--mark {
  color: var(--v2-blue);
}

body.pildora-v2-page .ranking-juegos-separador {
  background: rgba(39, 95, 157, .16);
}

body.pildora-v2-page .ranking-juegos-meta,
body.pildora-v2-page .ranking-juegos-empty {
  color: #465664;
}

body.pildora-v2-page .ranking-juegos-meta strong {
  color: var(--v2-blue);
}

body.pildora-v2-page .ranking-juegos-notice--success {
  border-color: #cfe6d7;
  background: var(--v2-success-soft);
  color: var(--v2-success);
}

body.pildora-v2-page .ranking-juegos-notice--warning {
  border-color: #c8d9e7;
  background: var(--v2-blue-soft);
  color: #234f79;
}

/* =========================================================
   V2 · RELACIONADOR CON FLECHAS
   Neutraliza la estética legacy marrón/dorada del motor
   y la adapta al sistema visual V2 dentro de las píldoras.
   No modifica lógica, configuración, ranking ni progreso.
   ========================================================= */

.v2-alumno-section.resource-type-juego .relacionador-motor {
  --rel-bg: #ffffff !important;
  --rel-panel: #ffffff !important;
  --rel-panel-2: #f5f8fa !important;
  --rel-text: var(--v2-ink) !important;
  --rel-muted: var(--v2-muted) !important;
  --rel-gold: var(--v2-blue) !important;
  --rel-gold-2: #3d74b0 !important;
  --rel-gold-3: #d9e7f7 !important;
  --rel-border: var(--v2-line) !important;
  --rel-ok: var(--v2-success) !important;
  --rel-ok-bg: var(--v2-success-soft) !important;
  --rel-wrong: var(--v2-danger) !important;
  --rel-wrong-bg: var(--v2-danger-soft) !important;
  --rel-info: var(--v2-blue) !important;
  --rel-info-bg: var(--v2-blue-soft) !important;
  --rel-shadow: none !important;
}

.v2-alumno-section.resource-type-juego .relacionador-header,
.v2-alumno-section.resource-type-juego .relacionador-top-panel,
.v2-alumno-section.resource-type-juego .relacionador-board,
.v2-alumno-section.resource-type-juego .relacionador-summary {
  border: 1px solid var(--v2-line) !important;
  background: var(--v2-surface) !important;
  box-shadow: none !important;
}

.v2-alumno-section.resource-type-juego .relacionador-header,
.v2-alumno-section.resource-type-juego .relacionador-top-panel,
.v2-alumno-section.resource-type-juego .relacionador-board {
  border-radius: var(--v2-radius-lg) !important;
}

.v2-alumno-section.resource-type-juego .relacionador-summary {
  border-radius: 18px !important;
}

.v2-alumno-section.resource-type-juego .relacionador-title,
.v2-alumno-section.resource-type-juego .relacionador-summary-title,
.v2-alumno-section.resource-type-juego .relacionador-column-title {
  color: var(--v2-blue) !important;
}

.v2-alumno-section.resource-type-juego .relacionador-column-title {
  background: var(--v2-blue-soft) !important;
}

.v2-alumno-section.resource-type-juego .relacionador-instruction,
.v2-alumno-section.resource-type-juego .relacionador-stat-label,
.v2-alumno-section.resource-type-juego .relacionador-summary-grid span,
.v2-alumno-section.resource-type-juego .relacionador-card-description,
.v2-alumno-section.resource-type-juego .relacionador-empty,
.v2-alumno-section.resource-type-juego .relacionador-loading {
  color: var(--v2-muted) !important;
}

.v2-alumno-section.resource-type-juego .relacionador-stat,
.v2-alumno-section.resource-type-juego .relacionador-summary-grid > div,
.v2-alumno-section.resource-type-juego .relacionador-card,
.v2-alumno-section.resource-type-juego .relacionador-empty,
.v2-alumno-section.resource-type-juego .relacionador-loading,
.v2-alumno-section.resource-type-juego .relacionador-error {
  border-color: var(--v2-line) !important;
  background: var(--v2-surface) !important;
  box-shadow: none !important;
}

.v2-alumno-section.resource-type-juego .relacionador-stat-value,
.v2-alumno-section.resource-type-juego .relacionador-summary-grid strong,
.v2-alumno-section.resource-type-juego .relacionador-card-connection-label {
  color: var(--v2-blue) !important;
}

.v2-alumno-section.resource-type-juego .relacionador-action-button {
  appearance: none;
  border: 1px solid #cfd8e0 !important;
  border-radius: 12px !important;
  background: #f4f7f9 !important;
  color: var(--v2-blue) !important;
  box-shadow: none !important;
  font: inherit;
  font-weight: 800 !important;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.v2-alumno-section.resource-type-juego .relacionador-action-button:hover:not(:disabled) {
  background: #edf3f7 !important;
  border-color: #bfcbd5 !important;
  color: #1f538e !important;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(24,33,43,.07) !important;
}

.v2-alumno-section.resource-type-juego .relacionador-action-button--primary {
  background: var(--v2-blue) !important;
  border-color: var(--v2-blue) !important;
  color: #fff !important;
}

.v2-alumno-section.resource-type-juego .relacionador-action-button--primary:hover:not(:disabled) {
  background: #1f538e !important;
  border-color: #1f538e !important;
}

.v2-alumno-section.resource-type-juego .relacionador-action-button:disabled {
  opacity: .52 !important;
  background: #f4f7f9 !important;
  color: #93a1af !important;
  border-color: #d8e0e6 !important;
}

.v2-alumno-section.resource-type-juego .relacionador-status--info {
  background: var(--v2-blue-soft) !important;
  color: var(--v2-blue) !important;
  border: 1px solid #d6e3f3 !important;
}

.v2-alumno-section.resource-type-juego .relacionador-status--success,
.v2-alumno-section.resource-type-juego .relacionador-status--ok {
  background: var(--v2-success-soft) !important;
  color: var(--v2-success) !important;
  border: 1px solid #cfe6d7 !important;
}

.v2-alumno-section.resource-type-juego .relacionador-status--error,
.v2-alumno-section.resource-type-juego .relacionador-status--wrong,
.v2-alumno-section.resource-type-juego .relacionador-error {
  background: var(--v2-danger-soft) !important;
  color: var(--v2-danger) !important;
  border: 1px solid #ecd3d0 !important;
}

.v2-alumno-section.resource-type-juego .relacionador-card {
  color: var(--v2-ink) !important;
}

.v2-alumno-section.resource-type-juego .relacionador-card:hover:not(.is-disabled) {
  border-color: #c5d3df !important;
  background: #f8fbfd !important;
  box-shadow: 0 7px 18px rgba(24,33,43,.06) !important;
}

.v2-alumno-section.resource-type-juego .relacionador-card.is-selected,
.v2-alumno-section.resource-type-juego .relacionador-card.is-drag-over {
  border-color: var(--v2-blue) !important;
  background: var(--v2-blue-soft) !important;
  box-shadow: 0 0 0 4px rgba(39,95,157,.12) !important;
}

.v2-alumno-section.resource-type-juego .relacionador-card.is-connected {
  border-color: #cfd8e0 !important;
  background: #f7fafc !important;
}

.v2-alumno-section.resource-type-juego .relacionador-card.is-correct {
  border-color: #b8dcc6 !important;
  background: var(--v2-success-soft) !important;
}

.v2-alumno-section.resource-type-juego .relacionador-card.is-wrong {
  border-color: #e4bfbb !important;
  background: var(--v2-danger-soft) !important;
}

.v2-alumno-section.resource-type-juego .relacionador-card-label,
.v2-alumno-section.resource-type-juego .relacionador-card-html {
  color: var(--v2-ink) !important;
}

.v2-alumno-section.resource-type-juego .relacionador-port {
  border-color: var(--v2-blue) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(255,255,255,.92), 0 4px 10px rgba(39,95,157,.15) !important;
}

.v2-alumno-section.resource-type-juego .relacionador-port::after,
.v2-alumno-section.resource-type-juego .relacionador-arrowhead-path {
  background: var(--v2-blue) !important;
  fill: var(--v2-blue) !important;
}

.v2-alumno-section.resource-type-juego .relacionador-arrow {
  stroke: var(--v2-blue) !important;
  filter: drop-shadow(0 2px 4px rgba(39,95,157,.15)) !important;
}

.v2-alumno-section.resource-type-juego .relacionador-arrow--active {
  stroke: #3d74b0 !important;
}

.v2-alumno-section.resource-type-juego .relacionador-arrow.is-correct,
.v2-alumno-section.resource-type-juego .relacionador-arrowhead-path--ok {
  stroke: var(--v2-success) !important;
  fill: var(--v2-success) !important;
}

.v2-alumno-section.resource-type-juego .relacionador-arrow.is-wrong,
.v2-alumno-section.resource-type-juego .relacionador-arrowhead-path--wrong {
  stroke: var(--v2-danger) !important;
  fill: var(--v2-danger) !important;
}


/* =========================================================
   V2 · CARTA PENDIENTE / NO CONSEGUIDA
   Placeholder claro mientras no exista imagen de carta.
   ========================================================= */

.v2-card-visual--placeholder {
  min-height: 0;
  background: #f5f7f9 !important;
  border-color: #cbd3da !important;
  box-shadow: 0 10px 24px rgba(24,33,43,.08) !important;
}

.v2-card-visual--placeholder .v2-card-placeholder-mark {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  aspect-ratio: 3 / 4;
  border: 2px dashed #cbd3da !important;
  border-radius: 16px 16px 0 0;
  background: #f5f7f9 !important;
  color: #6e7c89 !important;
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1;
}

.v2-card-visual--placeholder .v2-card-level-overlay {
  position: static !important;
  display: block !important;
  padding: 8px 12px 10px !important;
  background: #f5f7f9 !important;
  color: #596571 !important;
  font-size: .72rem !important;
  line-height: 1.25 !important;
  border-top: 1px solid #dce3e8;
}

.v2-card-visual--placeholder.is-locked {
  opacity: 1;
}

/* =========================================================
   V2 · IMAGEN EN GUÍA DOCENTE · MAT-K-000008
   Maquetación reutilizable para figuras dentro de la teoría docente.
   ========================================================= */
.v2-docente-figure {
  max-width:900px;
  margin:22px auto;
  padding:10px;
  border:1px solid #dfe5ea;
  border-radius:16px;
  background:#fafbfc;
}
.v2-docente-figure img {
  display:block;
  width:100%;
  height:auto;
  border-radius:11px;
  object-fit:contain;
}
.v2-docente-figure figcaption {
  margin:10px 4px 2px;
  color:var(--v2-muted);
  font-size:.86rem;
  line-height:1.5;
  text-align:left;
}
@media (max-width:680px) {
  .v2-docente-figure {
    margin:18px auto;
    padding:7px;
  }
}

/* =========================================================
   V2 · IMPRESIÓN ALUMNADO · MAQUETACIÓN EDITORIAL v3
   - Parejas/grupos de imágenes: dos columnas reales.
   - Figura aislada: columna lateral con texto fluyendo a su lado.
   - La vista normal y la impresión docente no cambian.
   ========================================================= */
@media print {
  /* Cierre limpio al terminar cada artículo de teoría. */
  .v2-alumno-resource-host .mdc-theory::after {
    content: "";
    display: block;
    clear: both;
  }

  /* Parejas/grupos ya definidos en el contenido: dos columnas editoriales. */
  .v2-alumno-resource-host .mdc-figure-grid {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 6mm !important;
    width: 100% !important;
    max-width: 164mm !important;
    margin: 3mm auto 4mm !important;
    break-inside: avoid-page !important;
    page-break-inside: avoid !important;
  }

  .v2-alumno-resource-host .mdc-figure-grid .mdc-figure {
    float: none !important;
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: 79mm !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .v2-alumno-resource-host .mdc-figure-grid .mdc-figure img {
    display: block !important;
    width: 100% !important;
    max-width: 79mm !important;
    height: auto !important;
    max-height: 55mm !important;
    margin: 0 auto !important;
    border-radius: 0 !important;
    object-fit: contain !important;
  }

  .v2-alumno-resource-host .mdc-figure-grid .mdc-figure figcaption {
    width: auto !important;
    max-width: 79mm !important;
    margin: 1.2mm auto 0 !important;
    font-size: 7.8pt !important;
    line-height: 1.22 !important;
    text-align: center !important;
  }

  /* Figura aislada: ilustración lateral. El contenido posterior fluye a su lado. */
  .v2-alumno-resource-host .mdc-theory > .mdc-figure {
    float: right !important;
    width: 62mm !important;
    max-width: 62mm !important;
    margin: 1.5mm 0 3mm 6mm !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    break-inside: avoid-page !important;
    page-break-inside: avoid !important;
  }

  /* Alterna el lado cuando un mismo artículo contiene varias figuras sueltas. */
  .v2-alumno-resource-host .mdc-theory > .mdc-figure:nth-of-type(even) {
    float: left !important;
    margin: 1.5mm 6mm 3mm 0 !important;
  }

  .v2-alumno-resource-host .mdc-theory > .mdc-figure img {
    display: block !important;
    width: 100% !important;
    max-width: 62mm !important;
    height: auto !important;
    max-height: 58mm !important;
    margin: 0 auto !important;
    border-radius: 0 !important;
    object-fit: contain !important;
  }

  .v2-alumno-resource-host .mdc-theory > .mdc-figure--small {
    width: 56mm !important;
    max-width: 56mm !important;
  }

  .v2-alumno-resource-host .mdc-theory > .mdc-figure--small img {
    max-width: 56mm !important;
    max-height: 50mm !important;
  }

  .v2-alumno-resource-host .mdc-theory > .mdc-figure--medium {
    width: 68mm !important;
    max-width: 68mm !important;
  }

  .v2-alumno-resource-host .mdc-theory > .mdc-figure--medium img {
    max-width: 68mm !important;
    max-height: 62mm !important;
  }

  .v2-alumno-resource-host .mdc-theory > .mdc-figure figcaption {
    width: auto !important;
    max-width: 100% !important;
    margin: 1.2mm 0 0 !important;
    font-size: 7.8pt !important;
    line-height: 1.22 !important;
    text-align: center !important;
  }

  /* Evita huecos artificiales alrededor de los bloques que acompañan a una figura. */
  .v2-alumno-resource-host .mdc-theory > p,
  .v2-alumno-resource-host .mdc-theory > h3,
  .v2-alumno-resource-host .mdc-theory > .mdc-key {
    orphans: 3;
    widows: 3;
  }

  .v2-alumno-resource-host .mdc-theory > h3 {
    break-after: avoid-page;
    page-break-after: avoid;
  }
}
