/* Capa local del curso. Cargar después de las hojas de la propuesta.
   Conserva la paleta, los medios y los controladores originales.
   Las redes, el globo y el interior de las categorías tienen sus propias capas. */
.jci-prototype {
  --jce-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "DM Sans", sans-serif;
  --body-font: var(--jce-font);
  --display-font: var(--jce-font);
  --jce-surface: #f5f7fa;
  --jce-line: #d9e1eb;
  --jce-radius: 18px;
  font-family: var(--jce-font);
  color: #132951;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.page.course-detail.jci-prototype {
  max-width: 1440px;
  margin-inline: auto;
  padding: 16px clamp(16px, 3.2vw, 44px) 36px;
}
.jci-prototype .course-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0 0 8px;
  color: #365174;
  font-size: 14px;
  text-decoration: none;
}
.jci-prototype .course-back:hover { color: #1749bd; text-decoration: underline; }

/* Portada: una sola superficie aqua y una escala tipográfica coherente. */
.jci-prototype.climate-with-map .jc-header {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 20px 30px;
  margin: 0 0 16px;
  padding: clamp(20px, 2.5vw, 32px);
  border-radius: var(--jce-radius);
  background: #a7dfe0;
  align-items: center;
}
.jci-prototype.climate-with-map .jc-header > div { min-width: 0; }
.jci-prototype.climate-with-map .jc-header h1 {
  font: 600 clamp(30px, 3.3vw, 44px)/1.1 'Fraunces', Georgia, serif;
  letter-spacing: -.025em;
  text-wrap: balance;
  max-width: none;
  margin: 0 0 16px;
}
.jci-prototype .jci-cover-name { display: block; }
.jci-prototype .jci-cover-subtitle { display: block; margin-top: 12px; font: 500 clamp(17px, 1.5vw, 21px)/1.35 var(--jce-font); letter-spacing: 0; text-wrap: pretty; }
.jci-prototype .jci-cover-subtitle::first-letter { text-transform: uppercase; }
.jci-prototype .jci-cover-separator { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: pre; }
.jci-prototype.climate-with-map .jc-header .eyebrow {
  color: #19345c;
  font-size: 12px;
  letter-spacing: .055em;
  font-weight: 650;
  margin: 0 0 10px;
}
.jci-prototype.climate-with-map .jc-header .jc-deck {
  max-width: 62ch;
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 12px;
}
.jci-prototype.climate-with-map .jc-header .jc-author {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
.jci-prototype.climate-with-map .jc-header > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  margin: 0;
  border-radius: 12px;
}
.jci-prototype.climate-with-map .jc-course-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 20px;
  padding-top: 16px;
  margin: 0;
  border-top-color: #19345c26;
}
.jci-prototype.climate-with-map .jc-course-facts > div {
  padding: 0;
  border: 0;
  min-width: 0;
}
.jci-prototype.climate-with-map .jc-course-facts dt {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
}
.jci-prototype.climate-with-map .jc-course-facts dd {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 650;
  overflow-wrap: anywhere;
}

/* La información ampliada conserva su control nativo y ocupa espacio real. */
.jci-prototype.climate-with-map .jc-course-info {
  margin: 0 0 18px;
  padding: 0;
  border-top: 0;
  border-bottom: 1px solid var(--jce-line);
}
.jci-prototype.climate-with-map .jc-course-info > summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  list-style: none;
  padding: 10px 0;
  color: #1749bd;
  font: 600 15px/1.4 var(--jce-font);
  cursor: pointer;
}
.jci-prototype .jc-course-info > summary::-webkit-details-marker { display: none; }
.jci-prototype .jc-course-info[open] { padding-bottom: 18px; }
.jci-prototype .jc-course-info .jc-map-goal { max-width: 80ch; margin: 8px 0 18px; }
.jci-prototype .jc-info-grid { gap: 24px; padding: 0; }
.jci-prototype .jc-info-grid h2 { font: 650 21px/1.3 var(--jce-font); margin: 0 0 10px; }
.jci-prototype .jc-info-grid :is(p, li) { font-size: 16px; line-height: 1.55; }
.jci-prototype .jc-info-grid ul { margin: 0; padding-left: 21px; }
.jci-prototype .jc-info-grid li { margin-bottom: 8px; }

/* Las cuatro lecciones permanecen visibles. Se evita el índice superpuesto. */
.jci-prototype.climate-with-map .jc-workspace {
  display: block;
  margin: 22px 0 30px;
  background: transparent;
}
.jci-prototype.climate-with-map .jc-syllabus {
  position: static;
  width: 100%;
  min-height: 0;
  margin: 0 0 20px;
  z-index: auto;
}
.jci-prototype.climate-with-map .jc-lessons-panel,
.jci-prototype.climate-with-map .jc-lessons-panel.is-open {
  position: static;
  width: 100%;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.jci-prototype.climate-with-map .jc-lessons-toggle { display: none; }
.jci-prototype.climate-with-map .jc-syllabus .jc-desktop-lessons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
}
.jci-prototype.climate-with-map .jc-syllabus .jc-desktop-lessons button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 60px;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f2f5f9;
  color: #19345c;
}
.jci-prototype.climate-with-map .jc-syllabus .jc-desktop-lessons button:hover { background: #e6edf6; }
.jci-prototype.climate-with-map .jc-syllabus .jc-desktop-lessons button[aria-pressed=true] {
  background: #19345c;
  color: #fff;
  border-color: #19345c;
}
.jci-prototype.climate-with-map .jc-syllabus .jc-desktop-lessons strong {
  display: block;
  min-width: 0;
  font: 600 14px/1.35 var(--jce-font);
  overflow-wrap: anywhere;
}
.jci-prototype.climate-with-map .jc-syllabus .jc-number { font-size: 13px; font-variant-numeric: tabular-nums; }

/* Video: proporción original; los capítulos se despliegan sin tapar el medio. */
.jci-prototype.climate-with-map .jc-media-pair .jc-lesson-heading .eyebrow {
  font: 600 12px/1.4 var(--jce-font);
  letter-spacing: .055em;
  margin-bottom: 7px;
  color: #455570;
}
.jci-prototype.climate-with-map .jc-media-pair .jc-lesson-heading h2 {
  font: 650 clamp(24px, 2.1vw, 30px)/1.2 var(--jce-font);
  letter-spacing: -.025em;
  margin: 0;
  text-wrap: balance;
}
.jci-prototype.climate-with-map .jc-player-side .jc-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
}
.jci-prototype.climate-with-map .jc-video .jc-play,
.jci-prototype.climate-with-map .jc-video:has(.jc-cover) .jc-play {
  min-height: 44px;
  padding: 10px 18px;
  font: 600 15px/1.35 var(--jce-font);
  border-radius: 24px;
  box-shadow: 0 2px 10px #1329511a;
}
.jci-prototype.climate-with-map .jc-player-menu { font-family: var(--jce-font); }
.jci-prototype.climate-with-map .jc-player-menu > summary {
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: #f0f3f8;
  color: #19345c;
  font: 600 14px/1.35 var(--jce-font);
  white-space: normal;
}
.jci-prototype.climate-with-map .jc-player-menu > summary > svg { display: block; flex: none; }
.jci-prototype.climate-with-map .jc-player-menu .jc-menu-chevron { display: none; }
.jci-prototype.climate-with-map .jc-player-menu[open] > summary { background: #e5edf8; }
.jci-prototype.climate-with-map .jc-player-menu[open] {
  grid-column: 1 / -1;
  grid-row: auto;
  width: 100%;
  margin-top: 10px;
}
.jci-prototype.climate-with-map .jc-player-menu > .jc-player-controls {
  position: static;
  width: 100%;
  max-width: 100%;
  margin: 6px 0 0;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: #f5f7fa;
  box-shadow: none;
}
.jci-prototype.climate-with-map .jc-player-menu .jc-player-controls > h3 {
  font: 650 14px/1.4 var(--jce-font);
  padding-top: 6px;
}
.jci-prototype.climate-with-map .jc-player-menu .jc-speed { font-size: 14px; }
.jci-prototype.climate-with-map .jc-player-menu .jc-speed select { min-height: 44px; height: auto; font-size: 16px; border-radius: 8px; }
.jci-prototype.climate-with-map .jc-player-menu .jc-chapters { max-height: min(280px, 48svh); gap: 4px; }
.jci-prototype.climate-with-map .jc-player-menu .jc-chapters button {
  min-height: 44px;
  padding: 10px;
  font: 500 14px/1.45 var(--jce-font);
  border-radius: 8px;
}

/* Bitácora: campo claro, referencias opcionales y una única acción de salida. */
.jci-prototype .jci-notes { margin: 28px 0; padding: 24px 0 0; border-top: 1px solid var(--jce-line); }
.jci-prototype .jci-reflection-heading { align-items: baseline; gap: 10px 20px; margin-bottom: 8px; }
.jci-prototype .jci-reflection-heading .eyebrow { font-size: 12px; letter-spacing: .055em; margin-bottom: 7px; color: #455570; }
.jci-prototype .jci-reflection-heading h2 { font: 650 clamp(24px, 2.2vw, 30px)/1.2 var(--jce-font); letter-spacing: -.025em; }
.jci-prototype .jci-reflection-heading > p { font-size: 14px; line-height: 1.45; }
.jci-prototype .jci-notes-intro { max-width: 72ch; font-size: 16px; line-height: 1.5; margin: 0 0 14px; }
.jci-prototype .jci-notes .jci-notebook { padding: 18px; border-radius: var(--jce-radius); background: #f2f5fa; }
.jci-prototype .jci-notes .jci-notebook > label { font: 600 15px/1.4 var(--jce-font); }
.jci-prototype .jci-notes .jci-notebook textarea {
  min-height: 128px;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid #cad5e4;
  border-radius: 12px;
  font: 400 16px/1.5 var(--jce-font);
}
.jci-prototype .jci-notes .jci-notebook textarea::placeholder { color: #5a6b83; opacity: 1; }
.jci-prototype .jci-notes .jci-note-referencebar { gap: 8px; margin-top: 10px; }
.jci-prototype .jci-note-referencebar > span { font-size: 14px; }
.jci-prototype .jci-notes .jci-note-referencebar button {
  min-height: 44px;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: #e5ebf5;
  font: 600 14px/1.4 var(--jce-font);
}
.jci-prototype .jci-note-references { gap: 8px; }
.jci-prototype .jci-note-references li { max-width: 100%; font-size: 14px; border: 0; border-radius: 10px; }
.jci-prototype .jci-note-references li > span { min-width: 0; overflow-wrap: anywhere; }
.jci-prototype .jci-notes .jci-note-references button { min-width: 44px; min-height: 44px; flex: 0 0 44px; }
.jci-prototype .jci-note-status { font-size: 14px; }
.jci-prototype .jci-notes .jci-note-foot { align-items: center; padding-top: 12px; margin-top: 12px; border-color: var(--jce-line); }
.jci-prototype .jci-note-foot > small { max-width: 80ch; font-size: 14px; line-height: 1.45; }
.jci-prototype .jci-note-foot button {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 22px;
  color: #fff;
  background: #19345c;
  font: 600 14px/1.4 var(--jce-font);
  text-decoration: none;
}
.jci-prototype .jci-note-foot button:disabled { opacity: 1; background: #e0e6ee; color: #69778d; }

/* El cierre público usa su tipografía y estilos originales. */
.jci-prototype .course-completion-grid {
  --body-font: "DM Sans", Arial, sans-serif;
  --display-font: "Fraunces", Georgia, serif;
  font: 400 16px/1.65 var(--body-font);
}

/* Instructor: anchura de lectura y datos secundarios sin una nueva colección de cajas. */
.jci-prototype.climate-with-map .author-profile {
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 20px;
  margin-top: 28px;
  padding: 24px 0;
  border-top: 1px solid var(--jce-line);
  border-bottom: 0;
}
.jci-prototype.climate-with-map .author-profile .author-monogram { width: 60px; height: 60px; color: #19345c; background: #e5eef9; font: 600 19px/1 var(--jce-font); }
.jci-prototype.climate-with-map .author-profile .eyebrow { color: #455570; font: 600 12px/1.4 var(--jce-font); letter-spacing: .055em; margin: 0 0 8px; }
.jci-prototype.climate-with-map .author-profile h2 { font: 650 clamp(22px, 2.2vw, 27px)/1.2 var(--jce-font); margin: 0 0 12px; letter-spacing: -.02em; }
.jci-prototype.climate-with-map .author-profile p:not(.eyebrow) { max-width: 78ch; font: 400 16px/1.6 var(--jce-font); margin: 0; }
.jci-prototype.climate-with-map .author-credentials { gap: 12px 24px; margin: 18px 0 0; }
.jci-prototype.climate-with-map .author-credentials li { padding-left: 12px; font: 400 14px/1.5 var(--jce-font); border-left-color: #b5d2d9; }
.jci-prototype .jci-proposal-note { margin-top: 4px; padding-top: 12px; font-size: 13px; line-height: 1.5; border-color: var(--jce-line); }

/* Reflujo: ningún control depende de hover ni requiere texto de menos de 14px. */
@media (min-width: 901px) {
  .jci-prototype.climate-with-map .jc-header {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px 28px;
    align-items: start;
    padding: 16px 24px;
  }
  .jci-prototype.climate-with-map .jc-header > div { grid-column: 1; grid-row: 1; }
  .jci-prototype.climate-with-map .jc-header > img { grid-column: 2; grid-row: 1 / span 2; max-width: 510px; justify-self: end; align-self: start; }
  .jci-prototype.climate-with-map .jc-course-facts {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 18px;
    padding-top: 10px;
  }
}
@media (min-width: 901px) and (max-width: 1269px) {
  .jci-prototype.climate-with-map .jc-header { grid-template-rows: auto auto; }
  .jci-prototype.climate-with-map .jc-header > img { grid-row: 1; align-self: center; }
  .jci-prototype.climate-with-map .jc-course-facts {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .jci-prototype.climate-with-map .jc-header { gap: 18px; }
  .jci-prototype.climate-with-map .jc-course-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
  .jci-prototype.climate-with-map .jc-syllabus .jc-desktop-lessons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jci-prototype.climate-with-map .jc-syllabus .jc-desktop-lessons button { min-height: 58px; }
}
@media (max-width: 700px) {
  .page.course-detail.jci-prototype { padding-inline: 16px; }
  .jci-prototype.climate-with-map .jc-header { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px; border-radius: 16px; }
  .jci-prototype.climate-with-map .jc-header > div { display: block; }
  .jci-prototype.climate-with-map .jc-header .eyebrow { margin: 0 0 8px; }
  .jci-prototype.climate-with-map .jc-header h1 { font-size: clamp(28px, 7.2vw, 36px); line-height: 1.1; margin: 0 0 12px; }
  .jci-prototype.climate-with-map .jc-header .jci-cover-subtitle { margin-top: 8px; font-size: 17px; }
  .jci-prototype.climate-with-map .jc-header .jc-deck { margin: 0 0 10px; font-size: 15px; }
  .jci-prototype.climate-with-map .jc-header > img { grid-column: 1; grid-row: auto; aspect-ratio: 3 / 2; max-width: 440px; justify-self: center; margin: 0; border-radius: 9px; }
  .jci-prototype.climate-with-map .jc-header .jc-author { margin: 0; line-height: 1.4; }
  .jci-prototype.climate-with-map .jc-course-facts { grid-column: 1; grid-row: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; padding-top: 14px; border-top: 1px solid #19345c26; }
  .jci-prototype.climate-with-map .jc-course-facts > div:nth-child(n) { display: block; padding: 0; border: 0; }
  .jci-prototype.climate-with-map .jc-course-facts dt { margin: 0 0 3px; }
  .jci-prototype.climate-with-map .jc-course-facts dd { margin: 0; font-size: 14px; }
  .jci-prototype .jc-info-grid { grid-template-columns: 1fr; gap: 20px; }
  .jci-prototype.climate-with-map .jc-workspace { margin-top: 20px; }
  .jci-prototype.climate-with-map .jc-syllabus { margin-bottom: 16px; }
  .jci-prototype.climate-with-map .jc-syllabus .jc-desktop-lessons button { gap: 7px; padding: 10px; }
  .jci-prototype.climate-with-map .jc-media-pair .jc-lesson-heading { column-gap: 10px; }
  .jci-prototype.climate-with-map .jc-media-pair .jc-lesson-heading h2 { font-size: 25px; }
  .jci-prototype.climate-with-map .jc-player-menu > summary { padding: 10px; }
  .jci-prototype .jci-reflection-heading { display: block; }
  .jci-prototype .jci-reflection-heading > p { margin: 8px 0 0; }
  .jci-prototype .jci-notes .jci-notebook { padding: 14px; }
  .jci-prototype .jci-note-referencebar > span { flex: 1 0 100%; }
  .jci-prototype .jci-notes .jci-note-referencebar button { flex: 1 1 auto; }
  .jci-prototype .jci-note-foot > small { flex-basis: 100%; }
  .jci-prototype .jci-note-foot button { width: 100%; justify-content: center; }
  .jci-prototype.climate-with-map .author-profile { grid-template-columns: 46px minmax(0, 1fr); gap: 12px; }
  .jci-prototype.climate-with-map .author-profile .author-monogram { width: 46px; height: 46px; font-size: 16px; }
  .jci-prototype.climate-with-map .author-credentials { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .page.course-detail.jci-prototype { padding-inline: 12px; }
  .jci-prototype.climate-with-map .jc-header { padding: 16px; }
  .jci-prototype.climate-with-map .jc-syllabus .jc-desktop-lessons button { flex-direction: column; align-items: flex-start; gap: 4px; }
  .jci-prototype.climate-with-map .jc-media-pair .jc-lesson-heading h2 { font-size: 23px; }
  .jci-prototype.climate-with-map .author-profile { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .jci-prototype :is(.jc-desktop-lessons button, .jc-play) { transition: none; }
}
