/* Generado por scripts/build-course.py desde las hojas de content/shell.html. Edita las hojas de origen, no este archivo. */
/* css/tokens.css */
:root {
  --sena-primary: #39a900;
  --paper: #f8fafc;
  --surface: #ffffff;
  --white: var(--surface);
  --ink: #1e293b;
  --muted: #475569;
  --green: #225746;
  --green-dark: #153e38;
  --lime: #d5edaa;
  --line: #dce3da;
  --soft: #edf3e8;
  --radius: 18px;
  --focus-ring: #155eef;

  /* Estados del semáforo: aceptable, precaución, riesgo e información. */
  --status-ok: #16a34a;
  --status-warn: #d97706;
  --status-risk: #dc2626;
  --status-info: #1d4ed8;

  /* Alturas de las barras fijas; course-app.js ajusta --topbar-h a la altura real. */
  --topbar-h: 88px;
  --lesson-tabs-h: 84px;
  --sticky-offset: calc(var(--topbar-h) + var(--lesson-tabs-h) + 8px);
  --eco-shadow: 0 14px 38px rgb(30 41 59 / 8%);

  /* Escala de ritmo vertical y espaciado modular (base 8px) */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Colores de contraste seguro WCAG AA / AAA */
  --amber-contrast-text: #7c4a00;
  --amber-contrast-border: #fed375;
  --amber-feedback-text: #8f3d00;
  --text-accent-muted: #526d48;
  --decor-muted: #6a855a;
  --text-measure-max: 100%;

  /* Tipografía de lectura fluida y justificación tipográfica */
  --line-height-reading: 1.65;
  --text-align-reading: start;
  --text-justify-reading: inter-word;
  --hyphens-reading: none;
  --overflow-wrap-reading: break-word;

  /* Elevaciones y radios armónicos de tarjetas */
  --card-shadow: 0 4px 14px rgba(34, 87, 70, 0.04);
  --card-radius: 16px;
  --card-radius-sm: 14px;

  /* Superficies diferenciadas por rol de aprendizaje */
  --surface-theory: #ffffff;
  --surface-lab: #f8faf8;
  --surface-challenge: #ffffff;
  --surface-evidence: #ffffff;
}

/* css/course-shell.css */
:root { color-scheme: light; }
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--topbar-h) + 12px); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Segoe UI', system-ui, sans-serif; font-size: 16px; line-height: 1.65; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button, summary, input, select { min-height: 44px; }
button { cursor: pointer; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: #123d2c; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
button:disabled { cursor: default; opacity: .6; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -.025em;
  text-align: left;
  hyphens: manual;
  -webkit-hyphens: manual;
}
h1 { font-size: clamp(1.95rem, 3.1vw, 3.2rem); font-weight: 650; }
h2 { font-size: clamp(1.35rem, 2vw, 1.75rem); font-weight: 650; }
h3 { font-size: 1.2rem; font-weight: 650; }
.learning-block h3, .interactive-aid-widget h3, .tool-lesson h3, .dimension-card h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.learning-block > h3:first-child,
.interactive-aid-widget > h3:first-child,
.tool-lesson > h3:first-child,
.widget-head > h3:first-child {
  margin-top: 0;
}
.learning-block h4, .worked-example h4, .scenario-box h4 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}
.learning-block > h4:first-child,
.worked-example > h4:first-child,
.scenario-box > h4:first-child {
  margin-top: 0;
}
p, li, blockquote { max-width: none; }
.hero-copy > p, .page-intro, .learning-block p, .lesson-description {
  max-width: 100%;
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
p + p { margin-top: .85rem; }
img, video { max-width: 100%; }
[hidden] { display: none !important; }
.skip-link { position: fixed; left: 1rem; top: -100px; z-index: 100; padding: .7rem 1rem; background: white; border: 2px solid var(--green); border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.course-sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; background: var(--green-dark); color: #edf4ed; padding: 30px 20px 20px; display: flex; flex-direction: column; overflow-y: auto; z-index: 40; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; gap: 12px; align-items: center; min-width: 0; color: white; text-decoration: none; font-size: 1.35rem; font-weight: 650; letter-spacing: -.04em; }
.brand:hover { color: white; }
.brand small { display: block; font-size: .8rem; font-weight: 400; letter-spacing: .015em; color: #c0d3c7; margin-top: 1px; }
.brand-mark { display: grid; place-content: center; position: relative; flex: 0 0 43px; height: 45px; background: var(--lime); color: var(--green-dark); border-radius: 12px 12px 12px 3px; font: 700 28px Georgia, serif; }
.brand-mark span { position: absolute; right: 5px; top: 3px; }
.sidebar-close { display: none; flex: 0 0 44px; width: 44px; min-height: 44px; border: 1px solid #5c7a6d; border-radius: 10px; background: #234e44; color: white; font-size: 1.5rem; line-height: 1; }
.sidebar-caption { margin: 35px 10px 18px; font-size: .8rem; letter-spacing: .13em; color: #b6cabe; font-weight: 650; }
#course-nav { flex: 1; }
#course-nav .sidebar-search { padding: 0 6px 15px; }
#course-nav .sidebar-search input { width: 100%; background: #234e44; color: white; border: 1px solid #517365; border-radius: 9px; padding: 8px 11px; font-size: .8rem; }
#course-nav .sidebar-search input::placeholder { color: #d0ded3; }
#course-nav ul { list-style: none; padding: 0; margin: 0; }
#course-nav li { margin: 4px 0; }
#course-nav a { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 11px; border: 1px solid transparent; border-radius: 10px; text-decoration: none; color: #e0e9e0; font-size: .86rem; line-height: 1.35; transition: background .15s, border-color .15s, color .15s; }
#course-nav a:hover { background: #285349; color: #fff; }
#course-nav a:focus-visible { outline-color: #fff; outline-offset: 2px; }
#course-nav a.active, #course-nav a[aria-current="page"] { border-color: #e1efc9; background: var(--lime); color: #163d30; }
#course-nav .nav-number { flex: 0 0 25px; font-size: .8rem; font-weight: 700; opacity: .82; font-variant-numeric: tabular-nums; }
#course-nav .module-title { min-width: 0; font-weight: 600; }
#course-nav .nav-meta { display: block; margin-top: 5px; font-size: .8rem; font-weight: 400; color: #c1d4c4; }
#course-nav a.active .nav-meta { color: #345c3d; }
#course-nav .nav-group-label:not(:first-child) { border-top: 1px solid #45695b; margin-top: 16px; padding-top: 15px; }
.sidebar-foot { display: flex; gap: 10px; align-items: flex-start; border-top: 1px solid #45695b; margin-top: 28px; padding: 20px 8px 0; font-size: .8rem; color: #e0e9df; }
.sidebar-foot small { display: block; color: #bdcfbf; margin-top: 4px; font-size: .8rem; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); margin-top: 7px; flex-shrink: 0; }
.course-workspace { margin-left: 260px; min-width: 0; }
.menu-scrim { display: none; }
.course-topbar { position: sticky; top: 0; z-index: 30; min-height: 76px; background: #fafbf8f5; backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding: 15px 38px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.topbar-location { display: flex; flex: 1 1 200px; flex-wrap: wrap; align-items: center; gap: 12px; font-size: .83rem; min-width: 0; }
.breadcrumb-root, .breadcrumb-slash { color: var(--muted); }
#current-location { font-weight: 600; }
.resource-link { display: inline-flex; gap: 8px; min-height: 44px; align-items: center; text-decoration: none; padding: 8px 13px; border: 1px solid var(--line); background: white; border-radius: 8px; font-size: .8rem; font-weight: 600; flex-shrink: 0; }
.resources-menu { position: relative; flex: 0 0 auto; }
.resources-menu > summary { justify-content: center; list-style: none; cursor: pointer; user-select: none; }
.resources-menu > summary::-webkit-details-marker { display: none; }
.resources-menu[open] > summary { border-color: #9aaf9c; background: #f2f7ef; }
.resources-caret { margin-left: 2px; color: var(--muted); transition: transform .15s ease; }
.resources-menu[open] .resources-caret { transform: rotate(180deg); }
.resources-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; display: grid; gap: 4px; width: min(270px, calc(100vw - 32px)); padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 14px 32px rgb(21 62 56 / 16%); }
.resource-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 9px 11px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: .82rem; font-weight: 550; text-align: left; text-decoration: none; cursor: pointer; }
.resource-item:hover { background: var(--soft); color: var(--green-dark); }
.resource-item:focus-visible { outline-offset: 1px; }
.menu-toggle { display: none; border: 1px solid var(--line); background: white; border-radius: 8px; padding: 6px 10px; color: var(--green); }
#contenido { padding: 38px clamp(20px, 3.2vw, 52px) 20px; max-width:100%; margin: 0 auto; }
#contenido:focus { outline: none; }
.module-page { min-width: 0; }
body:not(.navigation-ready) .module-page { display: block; padding-bottom: 4rem; }
[data-tabs]:not(.tabs-ready) [data-tablist] { display: none; }
.nav-empty { color: #d0ded3; padding: 12px; font-size: .8rem; }
.page-kicker { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 23px; }
.eyebrow { font-size: .8rem; letter-spacing: .15em; color: var(--green); font-weight: 750; }
.quiet-badge { display: inline-block; font-size: .8rem; padding: 4px 9px; border: 1px solid #d9e2d1; border-radius: 30px; background: #eef3e8; color: #365a3c; white-space: normal; }
.page-intro { margin: 18px 0 26px; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 46px; border: 1px solid transparent; border-radius: 9px; padding: 11px 17px; text-decoration: none; font-size: .84rem; font-weight: 600; line-height: 1.4; transition: background .15s, box-shadow .15s; }
.button-primary { color: white; background: var(--green); }
.button-primary:hover { color: white; background: #173f33; box-shadow: 0 3px 10px #153e3815; }
.button-text { color: var(--green); background: transparent; }
.button-text:hover { background: #e7eee0; }
.button-outline { color: var(--green); background: white; border-color: #aebfac; }
.button-danger { background: white; color: #91403d; border-color: #c79990; }
.home-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 36px; align-items: center; margin-bottom: 52px; }
.hero-copy h1 { line-height: 1.13; letter-spacing: -.045em; }
.hero-copy h1 em { font-family: Georgia, serif; font-weight: 400; color: #42694b; }
.hero-copy > p { color: var(--muted); margin-top: 22px; font-size: .94rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 26px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 32px; color: var(--muted); font-size: .8rem; }
.hero-facts strong { display: block; color: var(--ink); font-size: 1.5rem; font-weight: 650; line-height: 1.4; }
.hero-visual { background: #e6eddf; border-radius: 24px; padding: 30px; position: relative; border: 1px solid #d5dfcb; }
.home-demo { min-width: 0; margin: 0 0 52px; padding: clamp(20px, 3vw, 30px); border: 1px solid #d5dfcb; border-left: 5px solid var(--green); border-radius: 18px; background: #f6f9f2; }
.home-demo h2 { margin: 8px 0 10px; }
.home-demo-actions { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 10px; margin: 18px 0; }
.home-demo-actions > details { inline-size: 100%; min-inline-size: 0; }
.home-demo-prompt > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: #46614c; font-size: .86rem; }
.home-demo-sample { inline-size: 100%; border-collapse: collapse; font-size: .88rem; }
.home-demo-sample caption { padding-bottom: 8px; text-align: start; font-weight: 650; }
.home-demo-sample th, .home-demo-sample td { padding: 8px 12px; border-bottom: 1px solid #dbe5d5; text-align: start; vertical-align: top; }
.home-demo-question { margin: 16px 0 8px; font-weight: 600; }
.visual-note { background: #fff; border: 1px solid #d4ded0; border-radius: 12px; padding: 20px; transform: rotate(-2deg); box-shadow: 0 9px 20px #344e2410; }
.tiny-label { display: block; color: #64745e; font-size: .8rem; font-weight: 750; letter-spacing: .12em; margin-bottom: 9px; }
.visual-note strong { font-size: .92rem; font-weight: 600; }
.document-lines { display: grid; gap: 7px; padding-top: 14px; }
.document-lines i { height: 5px; border-radius: 4px; width: 90%; background: #e7ebe3; }
.document-lines i:nth-child(2) { width: 74%; }.document-lines i:nth-child(3) { width: 48%; }
.note-stamp { display: inline-block; margin-top: 16px; font-size: .8rem; border: 1px solid #dce7d0; color: #577048; padding: 2px 6px; border-radius: 4px; }
.visual-connector { text-align: center; color: var(--decor-muted); font-size: 1.4rem; line-height: 1.4; }
.visual-process { display: flex; align-items: center; gap: 13px; background: #d5e5c6; border-radius: 12px; padding: 15px 18px; }
.process-icon { font-size: 1.7rem; color: #40623d; }.visual-process strong { font-size: .87rem; }.visual-process div > span { display: block; font-size: .8rem; color: #496744; }
.visual-result { display: flex; align-items: center; gap: 12px; background: #1e5142; color: #fff; padding: 15px 17px; border-radius: 12px; }
.visual-result > span { display: grid; place-items: center; border: 1px solid #75a379; border-radius: 50%; width: 27px; height: 27px; flex-shrink: 0; }
.visual-result strong { font-size: .8rem; }.visual-result small { display: block; color: #c7dec6; margin-top: 3px; font-size: .8rem; }
.section-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 22px; }.section-title h2 { margin-top: 6px; }.section-title > p { color: var(--muted); font-size: .84rem; flex-basis: 420px; }
.route-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.route-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 24px; color: var(--ink); text-decoration: none; background: white; border: 1px solid var(--line); border-radius: 15px; transition: border-color .15s, transform .15s; }
.route-card:hover { border-color: #91aa7d; transform: translateY(-3px); color: var(--ink); }
.route-card-featured { background: #eef5e8; border-color: #b5cda2; }.route-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }.route-number { font-size: .88rem; font-weight: 650; color: var(--text-accent-muted); }.duration { font-size: .8rem; color: var(--muted); }.route-card h3 { font-size: 1.1rem; }.route-card p { font-size: .8rem; color: var(--muted); }.route-card-bottom { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: .8rem; color: #4e634c; display: flex; justify-content: space-between; gap: 8px; }.route-card-bottom b { font-size: 1rem; }
.home-bottom { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 22px; margin-top: 35px; }.method-card, .portfolio-preview { padding: 27px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }.home-bottom h2 { font-size: 1.3rem; margin: 10px 0 18px; }.method-steps { list-style: none; padding: 0; display: grid; gap: 16px; }.method-steps li { display: flex; gap: 15px; font-size: .8rem; color: var(--muted); }.method-steps b { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: var(--soft); color: var(--green); font-size: .8rem; }.method-steps strong { display: block; color: var(--ink); }.portfolio-preview p { color: var(--muted); font-size: .87rem; }.portfolio-preview .evidence-count { color: var(--green); margin: 20px 0; font-weight: 600; }.portfolio-preview small { display: block; margin-top: 20px; color: var(--muted); font-size: .8rem; }
.course-context { margin-top: 28px; border-top: 1px solid var(--line); padding: 12px 0; }.course-context summary { cursor: pointer; color: var(--muted); font-size: .82rem; padding: 12px 0; }.course-context > div { padding: 15px 0; color: var(--muted); font-size: .84rem; }
.notice {
  background: #edf2e8;
  border: 1px solid #d4dfcc;
  border-left: 4px solid var(--green);
  border-radius: var(--card-radius-sm, 14px);
  padding: 17px 21px;
  font-size: .82rem;
  color: #3c573b;
  margin: 18px 0;
  box-shadow: var(--card-shadow, 0 4px 14px rgba(34, 87, 70, 0.04));
  line-height: var(--line-height-reading, 1.65);
  text-align: start;
  hyphens: var(--hyphens-reading, none);
  -webkit-hyphens: var(--hyphens-reading, none);
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.status-line { padding: 10px 0; font-size: .8rem; color: var(--muted); }
.course-footer { max-width: 1640px; margin: 35px auto 0; padding: 22px 38px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: #6b7868; font-size: .8rem; }
.toast { position: fixed; bottom: 22px; right: 22px; max-width: min(430px, calc(100% - 44px)); z-index: 100; color: white; background: var(--green-dark); border-radius: 10px; padding: 14px 20px; box-shadow: 0 8px 24px #0002; }

/* Banner de Ruta Curricular Interactiva */
.home-roadmap-banner {
  margin: 1.5rem 0 2rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(21, 62, 56, 0.05);
}
.roadmap-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.roadmap-kicker {
  display: block;
  font-size: .8rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  color: var(--green);
  text-transform: uppercase;
}
.roadmap-title {
  margin-top: 4px;
  font-size: 1.1rem;
  color: var(--ink);
  font-weight: 650;
}
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 12px;
}
.roadmap-card {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.roadmap-card:hover {
  transform: translateY(-2px);
  border-color: var(--green);
  box-shadow: 0 4px 12px rgba(34, 87, 70, 0.08);
}
.roadmap-card .card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.badge-station {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green-dark);
}
.badge-time {
  font-size: .8rem;
  color: var(--muted);
  background: var(--soft);
  padding: 2px 7px;
  border-radius: 4px;
}
.card-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 10px;
  flex: 1;
}
.card-evidence {
  font-size: .8rem;
  font-weight: 600;
  color: #1e7049;
  display: flex;
  align-items: center;
  gap: 5px;
}
.card-evidence .check-icon {
  font-size: 0.82rem;
}

/* Resumen Estructurado del Módulo 00 */
.prep-flow-summary {
  margin: 1.8rem 0;
  padding: clamp(18px, 2.5vw, 26px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(21, 62, 56, 0.04);
}
.prep-flow-header {
  margin-bottom: 1.4rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.prep-flow-kicker {
  display: block;
  font-size: .8rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  color: var(--green);
  text-transform: uppercase;
}
.prep-flow-header h2 {
  margin-top: 5px;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  color: var(--ink);
}
.prep-ethics-card {
  padding: 16px 20px;
  background: #f4f8f1;
  border-left: 4px solid var(--green);
  border-radius: 10px;
  margin-bottom: 1.4rem;
}
.prep-card-subtitle {
  display: block;
  font-size: .8rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  color: var(--green-dark);
  margin-bottom: 10px;
}
.prep-ethics-bullets {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 7px;
  font-size: 0.88rem;
  color: #33483c;
  line-height: 1.55;
}
.prep-golden-rule {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #dce4d5;
  font-size: 0.88rem;
  color: #8c5b00;
}
.prep-steps-card {
  padding: 18px 20px;
  background: #fcfdfa;
  border: 1px solid #dce4d5;
  border-radius: 12px;
  margin-bottom: 1.4rem;
}
.prep-steps-list {
  margin: 10px 0 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}
.prep-steps-list li {
  font-size: 0.89rem;
  color: var(--ink);
  line-height: 1.55;
}
.prep-result-card {
  padding: 14px 18px;
  background: #eef6ec;
  border: 1px solid #bad9a8;
  border-radius: 10px;
}
.prep-result-label {
  display: block;
  font-size: .8rem;
  font-weight: 750;
  color: var(--green);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.prep-result-card p {
  font-size: 0.92rem;
  color: #1e3f28;
  font-weight: 550;
  margin: 0;
}

/* Ecosistema de Aprendizaje y Dimensiones Humanas */
.ai-learning-ecosystem {
  margin: 2.5rem 0;
  padding: clamp(20px, 3vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 6px 24px rgba(21, 62, 56, 0.05);
}
.ecosystem-heading h2 {
  margin-top: 6px;
  font-size: clamp(1.4rem, 2.3vw, 1.95rem);
}
.ecosystem-lead {
  font-size: 0.98rem;
  color: var(--muted);
  max-width: 100%;
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
  margin-top: 10px;
}
.dimensions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 18px;
  margin: 1.5rem 0 2.2rem;
}
.dimension-card {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
}
.dimension-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: .8rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  background: var(--soft);
  color: var(--green);
  border-radius: 4px;
  margin-bottom: 10px;
}
.dimension-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--ink);
}
.dimension-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
  margin-bottom: 12px;
}
.dimension-card ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.84rem;
  color: #33483c;
  line-height: 1.55;
  display: grid;
  gap: 6px;
}
.ecosystem-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 20px;
  margin: 2rem 0;
}
.scope-column {
  padding: 22px;
  border-radius: 14px;
  border: 1px solid;
}
.scope-advances {
  background: #f3f8f1;
  border-color: #bad9a8;
}
.scope-prohibitions {
  background: #fdf5f5;
  border-color: #f1b8b8;
}
.scope-column h3 {
  font-size: 1.18rem;
  margin-bottom: 12px;
}
.scope-advances h3 { color: #1e5a2f; }
.scope-prohibitions h3 { color: #9c2727; }
.scope-column ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 9px;
  font-size: 0.87rem;
  line-height: 1.6;
}
.future-outlook-card {
  padding: 24px clamp(18px, 2.5vw, 30px);
  background: var(--green-dark);
  color: var(--surface);
  border-radius: 16px;
  margin-top: 2rem;
}
.future-outlook-card h3 {
  color: var(--lime);
  font-size: 1.35rem;
  margin-bottom: 12px;
}
.future-outlook-card p {
  color: #e4eee3;
  font-size: 0.94rem;
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.future-outlook-card ul {
  margin: 14px 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: #edf4ec;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Widgets Interactivos */
.interactive-aid-widget {
  margin: 2rem 0;
  padding: clamp(18px, 2.5vw, 26px);
  background: var(--surface-lab);
  border: 1.5px solid #c7d8c4;
  border-top: 4px solid var(--green);
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(21, 62, 56, 0.05);
}
.widget-head h3 {
  margin-top: 4px;
  font-size: 1.22rem;
  color: var(--ink);
}
.widget-head p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 4px;
}
.scenario-box {
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 14px;
}
.scenario-tag {
  display: inline-block;
  font-size: .8rem;
  font-weight: 750;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.scenario-box h4 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.scenario-box p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.safety-choices-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}
.btn-safety {
  min-height: 44px;
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 650;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.safety-dot { display: inline-block; flex: 0 0 auto; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: currentColor; }
.safety-score { color: var(--muted); font-size: .85rem; font-weight: 600; }
.safety-nav-actions { display: flex; gap: 8px; }
.btn-safety-green { background: #e8f5e9; color: #1b5e20; border-color: #a5d6a7; }
.btn-safety-green:hover { background: #c8e6c9; }
.btn-safety-yellow { background: #fffde7; color: var(--amber-contrast-text); border-color: var(--amber-contrast-border); }
.btn-safety-yellow:hover { background: #fff8e1; }
.btn-safety-red { background: #ffebee; color: #b71c1c; border-color: #ffcdd2; }
.btn-safety-red:hover { background: #ffcdd2; }
.safety-feedback-box {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.6;
  margin-top: 14px;
}
.safety-feedback-box.is-correct {
  background: #e8f5e9;
  color: #1e4620;
  border-left: 4px solid #2e7d32;
}
.safety-feedback-box.is-incorrect {
  background: #fff3e0;
  color: #794300;
  border-left: 4px solid #ef6c00;
}
.widget-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* Auditoría de afirmaciones */
.audit-table-list {
  display: grid;
  gap: 14px;
  margin: 1.4rem 0;
}
.audit-row-card {
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.audit-statement-text {
  font-size: 0.92rem;
  color: var(--ink);
  font-weight: 550;
  line-height: 1.55;
  margin-bottom: 12px;
}
.audit-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.audit-feedback-el {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1.55;
}
.audit-row-card[data-audited-state="correct"] .audit-feedback-el {
  background: #eaf5e6;
  color: #1b5e20;
}
.audit-row-card[data-audited-state="review"] .audit-feedback-el {
  background: #fff3e0;
  color: var(--amber-feedback-text);
}

/* Comparador de Prompts CRTT */
.compare-mode-toggle {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}
.compare-mode-btn {
  min-height: 44px;
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 650;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 9px;
  cursor: pointer;
}
.compare-mode-btn.is-active {
  background: var(--green);
  color: var(--surface);
  border-color: var(--green);
}
.compare-display-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin-top: 14px;
}
.compare-pane {
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.compare-pane-label {
  display: block;
  font-size: .8rem;
  font-weight: 750;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.compare-pane p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink);
}
.prompt-analysis-box {
  grid-column: 1 / -1;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.6;
}
.prompt-analysis-box.is-good {
  background: #eaf5e6;
  color: #1e5a2f;
  border-left: 4px solid #2e7d32;
}
.prompt-analysis-box.is-risky {
  background: #fdf2f2;
  color: #9c2727;
  border-left: 4px solid #d32f2f;
}

@media print {
  .notice,
  .dimension-card,
  .scenario-box,
  .future-outlook-card,
  .ai-learning-ecosystem,
  .interactive-aid-widget,
  .compare-pane,
  .audit-row-card {
    box-shadow: none !important;
    break-inside: avoid;
  }
}

/* devbrain-prose-contract:start */
/* Contrato 7.4: cada región ocupa su espacio y conserva sus controles. */
:where(p, dd, blockquote) {
    --text-align-reading: start;
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    text-align: var(--text-align-reading);
    text-align-last: start;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    -webkit-hyphens: none;
}
:where(dd, blockquote) { margin-inline: 0; }
/* devbrain-prose-contract:end */

/* css/case-practices.css */
.case-practice { margin: 24px 0; border: 1px solid #cad9cf; border-radius: 20px; background: #f1f5ef; overflow: hidden; }
.case-header, .case-practice [data-case-stage], .case-footer { padding: clamp(18px, 3vw, 32px); }
.case-header { background: #e6eee2; border-bottom: 1px solid #cad9cf; }
.case-header h3 { font-size: clamp(1.3rem, 2.2vw, 1.85rem); color: var(--green); margin: 9px 0; }
.case-header p { max-width:100%; text-align:var(--text-align-reading, start); }
.case-summary { font-weight: 650; color: #245642; }
.case-stage-nav { display: none; gap: 8px; padding: 16px; border-bottom: 1px solid #cad9cf; background: #f8faf6; }
.case-ready .case-stage-nav { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); }
.case-stage-nav button { padding: 12px; min-height: 48px; min-width: 0; overflow-wrap: anywhere; border: 1px solid #bdcdbf; border-radius: 10px; background: #f0f4ec; color: #28533d; cursor: pointer; font: inherit; font-size: .85rem; text-align: left; }
.case-stage-nav button span { display: block; font-weight: 750; }
.case-stage-nav [aria-current="step"] { background: #245642; border-color: #245642; color: white; }
.case-practice button:focus-visible, .case-practice input:focus-visible, .case-practice select:focus-visible, .case-practice summary:focus-visible { outline: 3px solid var(--focus-ring, #946a24); outline-offset: 3px; }
.case-practice [data-case-stage] > h4 { font-size: 1.2rem; margin: 0 0 20px; }
.case-practice [hidden] { display: none !important; }
.case-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 14px; margin: 20px 0; }
.case-source-record { padding: 18px; border-radius: 12px; background: #fcfdfb; border: 1px solid #d1dccd; min-width: 0; }
.case-source-record h4 { font-size: .9rem; color: #27553f; overflow-wrap: break-word; margin: 0 0 12px; }
.case-source-record dl { display: grid; gap: 12px; margin: 0; }
.case-source-record dt { color: #536454; font-size: .8rem; }
.case-source-record dd { margin: 3px 0 0; overflow-wrap: break-word; font-size: .9rem; }
.case-source-record code { white-space: pre-wrap; font-family: inherit; }
.case-source-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.case-source-links a { overflow-wrap: anywhere; }
.case-question { margin: 0 0 20px; padding: clamp(16px, 2vw, 24px); border: 1px solid #d0dccd; border-radius: 12px; background: #fcfdfb; }
.case-question fieldset { border: 0; padding: 0; min-width: 0; }
.case-question legend { font-weight: 700; line-height: 1.5; padding: 0; margin-bottom: 15px; }
.case-inputs { display: grid; gap: 10px; }
.case-inputs > label { display: grid; gap: 8px; }
.case-inputs > .check-option { display: flex; align-items: flex-start; min-height: 44px; }
.case-inputs input[type="text"] { width: min(100%, 280px); padding: 12px; border: 1px solid #9eaf9d; border-radius: 8px; font: inherit; background: #fff; color: #20332e; }
.case-inputs select { width: 100%; max-width: 100%; min-height: 48px; padding: 10px; border: 1px solid #9eaf9d; border-radius: 8px; font: inherit; color: #20332e; background: #fff; }
 [data-case-instruction-preview] { border-left: 3px solid #63876a; padding: 14px; background: var(--soft); }
.case-question[data-state="correct"] { border-left: 5px solid #367249; }
.case-question[data-state="review"] { border-left: 5px solid #9b6c2d; }
.case-question [data-case-feedback] { margin: 16px 0 0; line-height: 1.6; }
.case-question [data-case-hint-text] { background: #f4eddf; padding: 12px; border-radius: 8px; }
.case-tools { margin-bottom: 24px; }
.case-tools > summary, .case-solution > summary { cursor: pointer; padding: 14px 0; min-height: 44px; font-weight: 650; color: #28533d; }
.case-tools .tool-lab, .case-tools .ratio-lab { margin: 15px 0; }
.case-footer { border-top: 1px solid #cad9cf; display: block; }
.case-practice:not(.case-ready) .case-footer button,
.case-practice:not(.case-ready) .case-question .check-actions { display: none; }
.case-ready .case-footer { display: block; }
.case-footer p { margin: 12px 0 0; font-size: .85rem; }
@media(max-width: 700px) { .case-ready .case-stage-nav { grid-template-columns: repeat(2,minmax(0,1fr)); } .case-question .check-actions { align-items: stretch; flex-direction: column; } }
@media print { .case-practice [data-case-stage], .case-practice [hidden] { display: block !important; } .case-stage-nav, .case-footer, .case-question button { display: none !important; } .case-practice { overflow: visible; background: white; } .case-source-record,.case-question { break-inside: avoid; } }
@media print { .case-practice details::details-content { content-visibility: visible !important; } .case-practice details:not([open]) > :not(summary) { display: block !important; } }

/* devbrain-prose-contract:start */
/* Contrato 7.4: cada región ocupa su espacio y conserva sus controles. */
:where(p, dd, blockquote) {
    --text-align-reading: start;
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    text-align: var(--text-align-reading);
    text-align-last: start;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    -webkit-hyphens: none;
}
:where(dd, blockquote) { margin-inline: 0; }
/* devbrain-prose-contract:end */

/* css/course-learning.css */
.lesson-header { margin-bottom: 26px; }
.lesson-header h1 { font-size: clamp(1.85rem, 2.8vw, 2.8rem); }
.lesson-description { color: var(--muted); margin-top: 16px; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 17px; color: #596f52; font-size: .8rem; }
.lesson-meta strong { color: #31513b; font-weight: 600; }
.lesson-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; border-bottom: 1px solid var(--line); padding: 5px 0 12px; }
.lesson-tabs button { flex: 1 1 140px; display: flex; justify-content: center; align-items: center; gap: 10px; padding: 12px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); font-size: .87rem; }
.lesson-tabs button b { font-size: .8rem; border: 1px solid #c8d4c0; border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; flex-shrink: 0; }
.lesson-tabs button[aria-selected="true"] { color: #244e38; background: #e5eddc; border-color: #cfddc3; font-weight: 650; }
.lesson-tabs button[aria-selected="true"] b { background: var(--green); color: white; border-color: var(--green); }
.lesson-panel { min-width: 0; }
.panel-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.panel-heading > p { color: var(--muted); font-size: .8rem; }
.prerequisite { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; padding: 18px 22px; border: 1px solid var(--line); background: white; border-radius: 12px; margin-bottom: 22px; font-size: .81rem; }
.prerequisite > div { flex: 1 1 260px; }.prerequisite strong { display: block; margin-bottom: 3px; }.prerequisite p { color: var(--muted); }.prerequisite a { font-size: .8rem; font-weight: 650; }
.module-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 25px; align-items: center; background: #e9efdf; border: 1px solid #d4e0c8; border-radius: 15px; padding: 26px; margin-bottom: 24px; }
.module-hero img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 11px; border: 1px solid #d5dfcf; }.module-hero h3 { font-size: 1.4rem; margin: 9px 0 13px; }.module-hero p { color: #465c3e; font-size: .94rem; }.phase-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; color: #5c7846; }
.learning-block {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--card-radius, 16px);
  padding: 27px;
  margin-bottom: 22px;
  box-shadow: var(--card-shadow, 0 4px 14px rgba(34, 87, 70, 0.04));
}
.learning-block h3 { margin-bottom: 17px; font-size: 1.25rem; }
.learning-block h4 { margin: 4px 0 10px; }
.learning-block p {
  color: #4e6052;
  font-size: .92rem;
  max-width: 100%;
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.knowledge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 23px; margin-top: 25px; }
.knowledge-grid > div { min-width: 0; border-top: 2px solid #aac28f; padding-top: 18px; }
.worked-example {
  padding: 26px;
  margin: 0 0 24px;
  border-radius: var(--card-radius, 16px);
  background: #fff;
  border: 1px solid #b9cdb1;
  box-shadow: var(--card-shadow, 0 4px 14px rgba(34, 87, 70, 0.04));
}
.worked-example h4 { font-size: 1.14rem; color: var(--green); margin-bottom: 18px; }
.worked-example p {
  font-size: .94rem;
  color: #405442;
  max-width: 100%;
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.worked-example blockquote {
  margin: 18px 0;
  border-left: 3px solid #829d60;
  background: #f2f6ec;
  padding: 17px;
  color: #324731;
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.worked-example p + p { border-top: 1px solid #e0e8d8; padding-top: 16px; margin-top: 16px; }
.lesson-diagram { margin: 0 0 22px; padding: 12px; border: 1px solid var(--line); background: white; border-radius: 14px; }.lesson-diagram img { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; }.lesson-diagram figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 4px 2px; color: var(--muted); font-size: .8rem; }.text-button { min-height: 42px; padding: 8px 12px; color: var(--green); background: #f0f5e9; border: 1px solid #d3dfca; border-radius: 7px; cursor: pointer; font-weight: 650; }
.transfer-tip {
  padding: 18px 22px;
  background: #edf2e7;
  border-left: 4px solid var(--green);
  border-radius: 0 10px 10px 0;
  margin: 18px 0;
  font-size: .85rem;
  line-height: var(--line-height-reading, 1.65);
  text-align: var(--text-align-reading, justify);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens: var(--hyphens-reading, none);
  -webkit-hyphens: var(--hyphens-reading, none);
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.transfer-tip strong { display: block; color: var(--green); margin-bottom: 5px; }
.challenge-card {
  background: white;
  border: 1px solid var(--line);
  border-left: 4px solid #5d7950;
  border-radius: 15px;
  margin: 0 0 16px;
  overflow: clip;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.challenge-card:hover {
  border-left-color: var(--green);
  box-shadow: 0 4px 16px rgba(34, 87, 70, 0.08);
}
.challenge-card > details > summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 22px 25px; cursor: pointer; list-style: none; }
.challenge-summary-copy { display: grid; flex: 1 1 440px; min-width: 0; gap: 9px; }
.challenge-summary-meta { display: flex; flex-wrap: wrap; gap: 6px; color: #5d7950; font-size: .8rem; font-weight: 600; }
.challenge-summary-meta span { padding: 4px 8px; border: 1px solid #e0e8d9; border-radius: 999px; background: #f7f9f4; }
.challenge-summary-count { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #d6e1cc; border-radius: 999px; color: #31583b; background: #f2f6ed; font-size: .8rem; font-weight: 700; }
.challenge-card > details > summary::-webkit-details-marker { display: none; }
.challenge-card > details > summary::after { content: '+'; color: var(--green); font-size: 1.3rem; flex-shrink: 0; }
.challenge-card > details[open] > summary { border-bottom: 1px solid var(--line); background: #f0f5e9; }
.challenge-card > details[open] > summary::after { content: '−'; }
.challenge-card h3 { font-size: 1.1rem; line-height: 1.4; }
.challenge-body { padding: 24px 26px; }
.challenge-body > p { font-size: .91rem; margin-bottom: 17px; color: #4a5c4e; }
.challenge-body > ol { list-style: none; counter-reset: challenge-step; padding: 0; margin: 24px 0; display: grid; gap: 18px; }
.challenge-body > ol > li { position: relative; counter-increment: challenge-step; padding-left: 39px; font-size: .87rem; color: #4e5f51; }
.challenge-body > ol > li::before { content: counter(challenge-step, decimal-leading-zero); position: absolute; top: 2px; left: 0; font-size: .8rem; color: var(--text-accent-muted); font-weight: 700; }
.challenge-body > ol > li strong { color: #264b32; }
.challenge-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 19px; }.challenge-meta span { font-size: .8rem; padding: 4px 8px; background: #f0f3eb; border-radius: 5px; color: #587148; }
.challenge-materials { display: grid; gap: 14px; margin: 0 0 22px; padding: 18px; border: 1px solid #d8e4ce; border-radius: 13px; background: #f5f8f1; }
.challenge-materials-heading .eyebrow { display: block; margin-bottom: 6px; color: #617b52; font-size: .8rem; letter-spacing: .1em; }
.challenge-materials-heading h4 { margin-bottom: 5px; color: #264b32; font-size: .96rem; }
.challenge-materials-heading p {
  max-width: 100%;
  color: #536454;
  font-size: .8rem;
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.challenge-package { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; padding: 14px; border: 1px solid #cadbbd; border-radius: 10px; background: white; }
.challenge-package > div { flex: 1 1 260px; min-width: 0; }
.challenge-package strong { display: block; margin-bottom: 4px; color: #264b32; font-size: .83rem; }
.challenge-package p { color: #536454; font-size: .8rem; }
.challenge-package-download { flex: 0 1 auto; }
.challenge-material-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.challenge-material-item { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 13px; min-width: 0; padding: 15px; border: 1px solid #e0e7dc; border-radius: 10px; background: white; }
.challenge-material-item > div { display: grid; gap: 7px; min-width: 0; }
.challenge-material-kind { color: var(--text-accent-muted); font-size: .8rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.challenge-material-item code { max-width: 100%; padding: 3px 6px; border-radius: 5px; overflow-wrap: anywhere; color: #3e5846; background: #f0f4ec; font-size: .8rem; }
.challenge-material-item strong { overflow-wrap: anywhere; color: #263c30; font-size: .82rem; }
.challenge-material-item p { overflow-wrap: break-word; color: #58675c; font-size: .8rem; }
.challenge-download { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 8px 12px; border: 1px solid #286449; border-radius: 7px; color: white; background: #286449; font-size: .8rem; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; text-align: center; }
.challenge-download:hover { background: #1d523d; }
.challenge-download:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.challenge-body .worked-example { background: #f7faf2; box-shadow: none; margin-top: 22px; padding: 20px; }.challenge-body .worked-example p { font-size: .87rem; }
.legal-note {
  border-left: 4px solid #bd9a4b;
  background: #fbf7e9;
  padding: 14px 16px;
  border-radius: 0 8px 8px 0;
  font-size: .83rem !important;
  line-height: var(--line-height-reading, 1.65);
  text-align: var(--text-align-reading, justify);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens: var(--hyphens-reading, none);
  -webkit-hyphens: var(--hyphens-reading, none);
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.concept-grid > div { background: white; border: 1px solid #dce5d6; border-top: 3px solid #719052; border-radius: 11px; padding: 17px; }.concept-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; margin: 20px 0; }.concept-flow strong, .concept-flow span { padding: 13px 15px; background: #f0f5e9; border: 1px solid #dce5d6; border-radius: 9px; font-size: .82rem; }.concept-flow strong { background: var(--green); border-color: var(--green); color: white; }
.flow-visual { display: grid; grid-template-columns: repeat(9, minmax(0, auto)); gap: 9px; align-items: center; margin: 22px 0; padding: 18px; border: 1px solid #dce5d6; border-radius: 13px; background: #f6f8f3; }.flow-visual > div { min-width: 0; display: grid; gap: 7px; padding: 13px; border: 1px solid #cfddc6; border-radius: 9px; background: white; }.flow-visual b { color: var(--green); font-size: .8rem; }.flow-visual span { color: var(--muted); font-size: .8rem; }.flow-visual i { color: var(--decor-muted); font-style: normal; text-align: center; }
.course-dialog { width: min(900px, calc(100vw - 32px)); max-width: 900px; max-height: min(90vh, 960px); padding: 0; border: 1px solid #d7e0d3; border-radius: 16px; color: var(--ink); background: white; box-shadow: 0 20px 70px #11221b3d; }.course-dialog::backdrop { background: #13231caa; backdrop-filter: blur(3px); }.dialog-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 19px; border-bottom: 1px solid var(--line); background: #fbfcfa; }.dialog-bar h2 { font-size: 1.1rem; }.icon-button { min-width: 42px; min-height: 42px; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--green); font-size: 1.5rem; cursor: pointer; }.dialog-content { padding: 20px; overflow: auto; }.dialog-content > img { display: block; width: 100%; height: auto; }.glossary-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 12px; }.glossary-list article { padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf6; }.glossary-list h3 { margin-bottom: 7px; color: var(--green); font-size: .95rem; }.glossary-list p, .source-links { font-size: .84rem; color: var(--muted); }.source-links { border-top: 1px solid var(--line); padding-top: 15px; margin-top: 18px; }
.tool-route {
  padding: 18px;
  border-left: 4px solid var(--green);
  background: #eff4e8;
  border-radius: 0 8px 8px 0;
  font-size: .87rem;
  margin: 18px 0;
  line-height: var(--line-height-reading, 1.65);
  text-align: var(--text-align-reading, justify);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens: var(--hyphens-reading, none);
  -webkit-hyphens: var(--hyphens-reading, none);
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
code { background: #edf1e8; color: #24513d; font-size: .82em; padding: 2px 5px; border-radius: 4px; overflow-wrap: anywhere; white-space: pre-wrap; }
.challenge-steps { background: white; border: 1px solid var(--line); border-radius: 12px; margin: 20px 0; padding: 4px 20px; }.challenge-steps summary { padding: 15px 0; cursor: pointer; color: var(--green); font-size: .86rem; }.steps-content { padding: 10px 0 20px; font-size: .9rem; }.steps-content ul { padding-left: 20px; }.steps-content li + li { margin-top: 12px; }
.phase-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); padding-top: 23px; margin-top: 28px; }.phase-footer small { color: var(--muted); font-size: .8rem; }
.evidence-intro { color: var(--muted); font-size: .9rem; margin-bottom: 20px; }
.portfolio-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 25px 0; }.portfolio-links a { display: inline-flex; align-items: center; min-height: 44px; background: white; border: 1px solid var(--line); border-radius: 7px; font-size: .8rem; padding: 8px 13px; text-decoration: none; }.privacy-actions { padding: 22px 0; font-size: .8rem; color: var(--muted); }.privacy-actions button { margin-top: 14px; }
/* Apariencia del componente oficial de evidencias integrada al curso. */
[data-theme='light'] .dbe-estacion, [data-theme='light'] .dbe-dossier { --dbe-acento: #225746; --dbe-acento-texto: #fff; --dbe-borde: #dce3da; --dbe-fondo-suave: #f0f4ea; --dbe-texto: #20332e; --dbe-texto-suave: #596960; margin-top: 0; }
.dbe-estacion p, .dbe-estacion li, .dbe-dossier p, .dbe-dossier li { max-width: none; }.dbe-estacion input, .dbe-estacion textarea, .dbe-dossier input { max-width: 100%; }
.table-scroll { overflow-x: auto; max-width: 100%; border-radius: 8px; }.table-scroll table { width: 100%; border-collapse: collapse; }.table-scroll th, .table-scroll td { padding: 12px 15px; border: 1px solid var(--line); text-align: left; font-size: .81rem; }
.schedule-metrics { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-around; gap: 18px; padding: 25px; border: 1px solid var(--line); border-radius: 15px; background: white; margin: 25px 0; }.schedule-metrics strong { font-size: 1.8rem; color: var(--green); font-weight: 650; }.schedule-metrics div > span { display: block; font-size: .8rem; color: var(--muted); }.schedule-metrics > span { color: var(--text-accent-muted); font-size: 1.4rem; }
.schedule-download { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin: 20px 0 26px; padding: 23px 26px; border: 1px solid #dce6d4; border-radius: 14px; background: linear-gradient(115deg, #f2f7ed, #fff 72%); }.schedule-download .eyebrow { display: block; margin-bottom: 7px; color: #617b52; font-size: .8rem; letter-spacing: .11em; }.schedule-download strong { display: block; color: var(--ink); font-size: 1rem; }.schedule-download p { margin: 5px 0 0; color: var(--muted); font-size: .8rem; }.schedule-download .button { flex: 0 0 auto; }
.schedule-days { display: grid; gap: 17px; margin-top: 25px; }.day-card { background: white; border: 1px solid var(--line); border-radius: 14px; }.day-card summary { display: flex; align-items: center; gap: 18px; padding: 24px; cursor: pointer; list-style: none; }.day-card summary::after { content: '+'; margin-left: auto; color: var(--green); }.day-card[open] summary::after { content: '−'; }.day-number { background: var(--soft); color: var(--green); padding: 7px 12px; border-radius: 8px; font-size: .85rem; }.day-card summary strong { font-size: .94rem; }.day-card summary small { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; }.day-hours { margin-left: auto; color: #5d7950; font-size: .8rem; }.day-body { padding: 0 25px 25px; }.day-timeline { list-style: none; padding: 5px 0 0; margin: 0; }.day-timeline li { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(0, 2fr); gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }.day-timeline time { color: #65765d; font-size: .8rem; font-variant-numeric: tabular-nums; }.day-timeline strong, .day-timeline a { font-size: .87rem; font-weight: 600; }.day-timeline span { display: block; font-size: .8rem; color: var(--muted); margin-top: 4px; }.autonomous { background: #f0f4e9; padding: 17px 20px; border-radius: 10px; margin-top: 20px; font-size: .83rem; }.autonomous p { font-size: .8rem; margin-top: 5px; color: var(--muted); }.day-total { color: #4c6b3f; font-size: .8rem; margin-top: 15px; }.schedule-assumption { margin-top: 25px; font-size: .8rem; color: var(--muted); }

.learning-timing { padding: 14px 17px; border-left: 3px solid #78945a; background: #f0f5e9; border-radius: 0 9px 9px 0; color: #405442; font-size: .84rem; margin: 18px 0 22px; }

/* Banco de trabajo para simuladores y laboratorios */
.interactive-aid-widget, .tool-lab {
  background: var(--surface-lab);
  border: 1.5px solid #c7d8c4;
  border-top: 4px solid var(--green);
  box-shadow: 0 4px 18px rgba(21, 62, 56, 0.05);
}

/* ==========================================================================
   Componentes de Diagramas Web Nativos (HTML5 Semántico y Accesible)
   ========================================================================== */

.native-diagram {
  margin: 1.8rem 0 2.2rem;
  padding: clamp(1.2rem, 2.5vw, 1.6rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius, 18px);
  box-shadow: 0 4px 18px rgba(21, 62, 56, 0.05);
}

.native-diagram__header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.native-diagram__kicker {
  display: block;
  font-size: .8rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  color: var(--green);
  text-transform: uppercase;
}

.native-diagram__title {
  margin-top: 4px;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 650;
  color: var(--ink);
  line-height: 1.3;
}

.native-diagram__desc {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 100%;
  line-height: var(--line-height-reading, 1.65);
  text-align: var(--text-align-reading, justify);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens: var(--hyphens-reading, none);
  -webkit-hyphens: var(--hyphens-reading, none);
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}

/* Grilla secuencial conectada */
.native-diagram__flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 12px;
  align-items: stretch;
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
}

.native-diagram__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1rem 1.25rem;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.native-diagram__card:hover {
  transform: translateY(-2px);
  border-color: var(--green);
  box-shadow: 0 4px 14px rgba(34, 87, 70, 0.08);
}

.native-diagram__card:focus-within {
  border-color: var(--green);
  box-shadow: 0 4px 14px rgba(34, 87, 70, 0.08);
}

/* Variantes por rol de decisión */
.native-diagram__card--rule {
  border-top: 4px solid #1e7049;
  background: #f4fbf6;
}

.native-diagram__card--ai {
  border-top: 4px solid #1d68bd;
  background: #f2f7fd;
}

.native-diagram__card--human {
  border-top: 4px solid #b57a1e;
  background: #fffdf5;
}

.native-diagram__card--danger {
  border-top: 4px solid #c62828;
  background: #fdf5f5;
}

.native-diagram__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0.65rem;
}

.native-diagram__step-num {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: var(--surface);
  font-size: .8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.native-diagram__card--rule .native-diagram__step-num {
  background: #1e7049;
}

.native-diagram__card--ai .native-diagram__step-num {
  background: #1d68bd;
}

.native-diagram__card--human .native-diagram__step-num {
  background: #b57a1e;
}

.native-diagram__card--danger .native-diagram__step-num {
  background: #c62828;
}

.native-diagram__card h4 {
  margin: 0 0 6px;
  font-size: 0.96rem;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.35;
}

.native-diagram__card p {
  margin: 0;
  font-size: 0.84rem;
  color: #3b5042;
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}

.native-diagram__card p + p {
  margin-top: 0.5rem;
}

.native-diagram__example {
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px dashed #d5dfcf;
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.45;
}

.native-diagram__example strong {
  color: var(--green-dark);
}

.correspondence-cycle > strong {
  max-width: 100%;
  overflow-wrap: break-word;
}

/* Adaptabilidad móvil: reflow vertical limpio a 1 columna */
@media (max-width: 640px) {
  .native-diagram {
    padding: 1rem;
    margin: 1.4rem 0 1.8rem;
  }
  .native-diagram__flow {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .native-diagram__card {
    padding: 0.9rem 1rem;
  }
}

@media print {
  .learning-block,
  .worked-example,
  .challenge-card,
  .transfer-tip,
  .native-diagram,
  .native-diagram__card {
    box-shadow: none !important;
    break-inside: avoid;
  }
}

/* Módulo 01: cinco cargas de trabajo; las tarjetas se apilan antes de comprimir el texto. */
.workload-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; margin: 16px 0; }
.workload-card { box-sizing: border-box; min-inline-size: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.workload-card h4 { margin: 0 0 8px; }
.workload-card p { margin: 6px 0; }
.workload-practice { font-size: .9rem; color: var(--muted); }
.workload-try { margin-top: 10px; }
.workload-try .prompt-template, .workload-try .prompt-bubble { margin: 8px 0; }
.m01-checks { padding-inline-start: 1.2rem; }
/* devbrain-prose-contract:start */
/* Contrato 7.4: cada región ocupa su espacio y conserva sus controles. */
:where(p, dd, blockquote) {
    --text-align-reading: start;
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    text-align: var(--text-align-reading);
    text-align-last: start;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    -webkit-hyphens: none;
}
:where(dd, blockquote) { margin-inline: 0; }
/* devbrain-prose-contract:end */

/* css/styles.css */
.eco-page { --eco-accent: var(--sena-primary); --eco-ink: var(--ink); --eco-muted: var(--muted); }
.eco-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr); gap: 28px; align-items: center; margin: 12px 0 30px; }
.eco-hero h1 { max-width: 14ch; }
.eco-hero-image { min-width: 0; margin: 0; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--eco-shadow); }
.eco-hero-image img { display: block; width: 100%; max-height: 300px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 13px; }
.eco-hero-image figcaption { padding: 8px 4px 2px; color: var(--muted); font-size: .8rem; }
.eco-hero .page-intro {
  max-width: 100%;
  margin: 16px 0 20px;
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.eco-overline, .eco-case-label { color: var(--green); font-size: .8rem; font-weight: 750; letter-spacing: .12em; }
.eco-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0 0 22px; }
.eco-progress li { min-width: 0; }
.eco-progress a { display: flex; align-items: center; gap: 9px; min-height: 48px; min-width: 0; padding: 8px 12px; color: var(--green-dark); text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-weight: 650; }
.eco-progress a:hover { border-color: var(--green); background: var(--soft); }
.eco-progress a > span:first-child { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; color: #fff; background: var(--green-dark); border-radius: 50%; }
.eco-progress-label { min-width: 0; line-height: 1.25; }
.eco-curricular-note { color: #334155; background: #f1f5f9; border-color: #cbd5e1; }
.eco-materials-warning { margin: 14px 0; color: #283c31; background: #edf6e7; border-color: #b8d4a8; }
.eco-local-program-note { margin: 14px 0; color: #334155; background: #f5f7f5; border-color: #cbd5e1; }
.eco-phase { margin: 38px 0; scroll-margin-top: 100px; }
.eco-phase-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.eco-phase-heading h2 { margin-top: 5px; }
.eco-phase-number { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; color: var(--green-dark); background: #e6f4dd; border: 1px solid #bad9a8; border-radius: 15px; font-weight: 750; }
.eco-phase-intro { margin: -5px 0 18px; color: var(--eco-muted); }
.eco-case-card, .eco-card, .eco-prediction-card, .eco-lot-panel, .eco-bin-panel, .eco-results, .eco-explanation, .eco-portfolio-summary, .eco-comparison { min-width: 0; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 20px rgb(30 41 59 / 4%); }
.eco-case-card { border-left: 5px solid var(--sena-primary); }
.eco-case-card p {
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: auto;
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.eco-case-card p + p { margin-top: 12px; }
.eco-diagnosis h3 { margin-bottom: 8px; }
.eco-diagnosis > p:not(.eco-feedback) { color: var(--eco-muted); }
.eco-choice-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.eco-choice, .eco-waste-item { min-height: 44px; padding: 9px 14px; color: var(--green-dark); background: #fff; border: 1px solid #8b9a8f; border-radius: 10px; font-weight: 650; cursor: pointer; }
.eco-choice:hover, .eco-waste-item:hover { background: var(--soft); border-color: var(--green); }
.eco-choice[aria-pressed="true"], .eco-waste-item.is-selected { color: #fff; background: var(--green-dark); border-color: var(--green-dark); }
.eco-module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.eco-color-card { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 6px 20px rgb(30 41 59 / 4%); }
.eco-color-card h3 { margin: 0 0 8px; }
.eco-color-card p { margin: 0; color: #334155; font-size: .92rem; line-height: 1.6; text-align:var(--text-align-reading, start); text-justify: auto; hyphens: none; -webkit-hyphens: none; overflow-wrap: break-word; }
.eco-module-white .eco-swatch { background: #fff; border-color: #64748b; }
.eco-module { min-width: 0; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 6px 20px rgb(30 41 59 / 4%); }
.eco-module summary { display: flex; align-items: center; gap: 12px; min-height: 50px; color: var(--ink); cursor: pointer; list-style: none; }
.eco-module summary::-webkit-details-marker { display: none; }
.eco-module summary strong, .eco-module summary small { display: block; }
.eco-module summary strong { font-size: 1.08rem; }
.eco-module summary small { margin-top: 2px; color: var(--muted); }
.eco-module > p {
  margin-top: 14px;
  color: #334155;
  font-size: .92rem;
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.eco-swatch { display: block; flex: 0 0 34px; width: 34px; height: 34px; border: 2px solid #64748b; border-radius: 10px; }
.eco-module-black .eco-swatch { background: var(--ink); border-color: var(--ink); }
.eco-module-green .eco-swatch { background: #2f7a1e; border-color: #2f7a1e; }
.eco-source-note { margin-top: 15px; color: var(--muted); font-size: .8rem; line-height: 1.55; text-align: start; text-justify: auto; hyphens: none; -webkit-hyphens: none; overflow-wrap: break-word; }
.eco-source-note a { color: var(--green-dark); font-weight: 650; }
.eco-infographic { max-width: 100%; margin: 18px 0; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.eco-infographic svg { display: block; width: 100%; height: auto; }
.eco-infographic figcaption { margin-top: 10px; color: #334155; font-size: .9rem; line-height: 1.55; text-align:var(--text-align-reading, start); text-justify: auto; hyphens: none; -webkit-hyphens: none; overflow-wrap: break-word; }
.eco-review-graphic { max-width: 620px; }
.eco-phase-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.eco-phase-nav .button { min-height: 44px; }
.eco-prediction-card label, .eco-explanation label { display: block; color: var(--ink); }
.eco-prediction-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-top: 12px; }
.eco-prediction-controls input { width: 120px; min-height: 46px; padding: 8px 11px; color: var(--ink); background: #fff; border: 1px solid #64748b; border-radius: 9px; }
.eco-simulator-work { margin-top: 18px; }
.eco-simulator-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 20px 0 10px; }
.eco-simulator-heading h3, .eco-simulator-heading h4 { margin-top: 4px; }
.eco-lot-count { padding: 5px 10px; color: var(--green-dark); background: var(--soft); border-radius: 30px; font-size: .82rem; font-weight: 650; }
.eco-classifier-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(250px, .85fr); gap: 16px; align-items: start; }
.eco-lot-panel h4, .eco-bin-panel h4 { margin-bottom: 12px; }
.eco-waste-list { display: grid; gap: 8px; margin: 0; padding-left: 27px; }
.eco-waste-list li { min-width: 0; padding-left: 3px; }
.eco-waste-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 10px; width: 100%; min-height: 72px; padding: 7px 10px; text-align: start; font-weight: 550; }
.eco-waste-item img { display: block; width: 64px; height: 52px; object-fit: contain; padding: 3px; background: #f3f6f2; border: 1px solid #d7e1d9; border-radius: 9px; }
.eco-waste-name { min-width: 0; line-height: 1.35; }
.eco-waste-item:disabled { color: var(--muted); background: #f1f5f9; cursor: default; opacity: 1; }
.eco-waste-status { display: block; min-height: 1.4em; color: #334155; font-size: .8rem; }
.eco-bin-list { display: grid; gap: 10px; }
.eco-bin { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; gap: 1px 12px; min-height: 65px; padding: 9px 12px; color: var(--ink); background: #fff; border: 1px solid #64748b; border-radius: 12px; text-align: left; cursor: pointer; }
.eco-bin:hover:not(:disabled) { outline: 2px solid var(--green-dark); outline-offset: 1px; }
.eco-bin:disabled { cursor: default; opacity: .62; }
.eco-bin-icon { grid-row: 1 / span 2; align-self: center; width: 28px; height: 37px; border: 2px solid var(--muted); border-radius: 5px 5px 9px 9px; background: #fff; }
.eco-bin-black .eco-bin-icon { background: var(--ink); border-color: var(--ink); }
.eco-bin-green .eco-bin-icon { background: #2f7a1e; border-color: #2f7a1e; }
.eco-bin strong { align-self: end; }
.eco-bin small { color: #334155; }
.eco-feedback { min-height: 1.5em; margin: 10px 0 0; color: var(--green-dark); font-weight: 600; }
.eco-results { margin-top: 18px; border-top: 4px solid var(--sena-primary); }
.eco-results h4 { margin: 5px 0 12px; }
.eco-results > p {
  margin: 7px 0;
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: auto;
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.eco-errors { margin-top: 12px; }
.eco-errors ul { margin: 7px 0 0; padding-left: 22px; }
.eco-errors li + li { margin-top: 5px; }
.eco-comparison { margin: 18px 0; border-top: 4px solid #12622e; }
.eco-comparison > figcaption { font-size: 1.15rem; font-weight: 750; }
.eco-comparison > p { margin: 8px 0 18px; }
.eco-chart-plot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 16px 0 22px; }
.eco-chart-series { min-width: 0; }
.eco-chart-series > strong { display: block; margin-bottom: 11px; color: var(--green-dark); }
.eco-chart-row { display: grid; grid-template-columns: 66px minmax(0, 1fr); align-items: center; gap: 9px; margin: 8px 0; font-size: .84rem; }
.eco-chart-track { height: 28px; overflow: hidden; background: #eef2ef; border-radius: 6px; }
.eco-chart-bar { display: flex; align-items: center; justify-content: flex-end; width: 0; min-width: 28px; height: 100%; padding: 0 7px; color: #17211d; font-weight: 750; border-radius: 6px; transition: width .25s ease; }
.eco-chart-white { background: #e7ece8; border: 1px solid #69796e; }
.eco-chart-black { color: #fff; background: #25312b; }
.eco-chart-green { color: #fff; background: #287a39; }
.eco-chart-table-wrap { max-width: 100%; overflow-x: auto; }
.eco-chart-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.eco-chart-table caption { padding: 8px 0; color: #334155; text-align: start; }
.eco-chart-table th, .eco-chart-table td { padding: 9px; border: 1px solid #cbd5e1; text-align: start; overflow-wrap: break-word; }
.eco-chart-table td { text-align: center; font-variant-numeric: tabular-nums; }
.eco-ai-gate-message { margin-top: 22px; }
.eco-success-message { color: var(--green-dark); font-weight: 650; }
.eco-explanation { margin-top: 16px; }
.eco-explanation textarea { display: block; width: 100%; min-height: 110px; margin-top: 9px; padding: 11px 13px; color: var(--ink); background: #fff; border: 1px solid #64748b; border-radius: 10px; resize: vertical; }
.eco-simulator-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; }
.eco-storage-status { color: var(--muted); font-size: .8rem; }
.eco-download-note { flex: 1 1 100%; margin: 0; color: var(--muted); font-size: .82rem; }
.eco-portfolio-summary { margin: 18px 0; border-top: 4px solid var(--sena-primary); }
.eco-portfolio-summary h2 { margin: 5px 0 10px; font-size: 1.25rem; }
.eco-portfolio-summary p {
  margin: 6px 0;
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.eco-portfolio-summary ul { padding-left: 22px; }
.eco-instructor-checklist { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.eco-instructor-checklist summary { min-height: 44px; color: var(--green-dark); font-weight: 700; cursor: pointer; }
.eco-instructor-checklist > p { color: var(--muted); font-size: .82rem; }
.eco-checklist-table { max-width: 100%; overflow-x: auto; }
.eco-checklist-table table { width: 100%; min-width: 620px; margin-top: 9px; border-collapse: collapse; font-size: .8rem; }
.eco-checklist-table th, .eco-checklist-table td { padding: 9px; border: 1px solid #cbd5e1; text-align: left; vertical-align: top; }
.eco-checklist-table th[scope="row"] { font-weight: 550; }
.eco-checklist-table td:nth-child(2), .eco-checklist-table td:nth-child(3) { width: 90px; text-align: center; font-size: 1rem; }
.eco-route-callout { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin-top: 26px; padding: 23px; background: #f0f7ec; border: 1px solid #bed8ae; border-radius: 17px; }
.eco-route-callout h2 { margin: 5px 0; font-size: 1.25rem; }
.eco-route-callout p {
  max-width: 100%;
  color: #334155;
  font-size: .88rem;
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.eco-page :focus-visible, .eco-progress a:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.eco-page a:focus-visible, .eco-page button:focus-visible, .eco-page input:focus-visible, .eco-page textarea:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.eco-page :is(p, li, figcaption, label, summary, th, td) { max-inline-size:100%; min-width: 0; white-space: normal; word-break: normal; text-align:var(--text-align-reading, start); text-justify: auto; hyphens: none; -webkit-hyphens: none; overflow-wrap: break-word; }
.eco-page button:disabled { opacity: .7; }

@media (max-width: 1100px) {
  .eco-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 850px) {
  .eco-hero { grid-template-columns: 1fr; }
  .eco-hero-image img { max-height: 360px; }
  .eco-module-grid { grid-template-columns: 1fr; }
  .eco-classifier-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .eco-progress { gap: 7px; }
  .eco-progress a { padding: 7px; font-size: .8rem; }
  .eco-case-card, .eco-card, .eco-prediction-card, .eco-lot-panel, .eco-bin-panel, .eco-results, .eco-explanation, .eco-portfolio-summary, .eco-comparison { padding: 16px; }
  .eco-choice-row { display: grid; grid-template-columns: 1fr; }
  .eco-simulator-actions { align-items: flex-start; }
  .eco-chart-plot { grid-template-columns: 1fr; gap: 12px; }
  .eco-phase-nav { align-items: stretch; }
  .eco-phase-nav .button { flex: 1 1 100%; justify-content: center; }
}

@media (max-width: 360px) {
  .eco-progress { grid-template-columns: 1fr; }
}

@media print {
  .eco-portfolio-summary { display: block !important; color: #111827; background: #fff; border: 1px solid #94a3b8; box-shadow: none !important; break-inside: auto; }
  .eco-case-card,
  .eco-card,
  .eco-prediction-card,
  .eco-lot-panel,
  .eco-bin-panel,
  .eco-results,
  .eco-explanation,
  .eco-route-callout {
    box-shadow: none !important;
    break-inside: avoid;
  }
  .eco-instructor-checklist[open] > .eco-checklist-table { overflow: visible; }
  .eco-checklist-table table { min-width: 0; font-size: 9pt; }
}

/* devbrain-prose-contract:start */
/* Contrato 7.4: cada región ocupa su espacio y conserva sus controles. */
:where(p, dd, blockquote) {
    --text-align-reading: start;
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    text-align: var(--text-align-reading);
    text-align-last: start;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    -webkit-hyphens: none;
}
:where(dd, blockquote) { margin-inline: 0; }
/* devbrain-prose-contract:end */

/* css/tool-lab.css */
.preparation-page { container-type: inline-size; container-name: preparation; }
.preparation-banner { display: flex; justify-content: space-between; gap: 25px; padding: 23px 27px; background: #e7eedc; border: 1px solid #d1dec3; border-radius: 14px; margin: 25px 0; }
.preparation-banner > div { min-width: 0; flex: 1; }.preparation-banner strong { font-size: .94rem; }.preparation-banner p { font-size: .84rem; color: #546c49; margin-top: 7px; }
.case-symbol { text-align: right; color: #557342; font-size: 2rem; line-height: 1.1; font-weight: 550; flex-shrink: 0; }.case-symbol small { font-size: .8rem; letter-spacing: .1em; }
.tool-workspace { display: grid; grid-template-columns: 225px minmax(0, 1fr); gap: 24px; align-items: start; }
.tool-selector { display: grid; gap: 8px; position: sticky; top: 100px; }
.tool-selector button { display: flex; gap: 12px; align-items: center; text-align: left; padding: 14px 12px; min-width: 0; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); }
.tool-selector button[aria-selected="true"] { background: #e9f1df; border-color: #afc598; box-shadow: inset 3px 0 #4d793b; }
.tool-selector strong { display: block; font-size: .8rem; font-weight: 650; line-height: 1.4; }.tool-selector small { display: block; font-size: .8rem; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.tool-monogram { display: grid; place-items: center; flex: 0 0 30px; height: 34px; background: #f0f4ea; border: 1px solid #d8e3ce; color: #5b7944; border-radius: 7px; font-size: 1.05rem; }
.tool-panels { min-width: 0; }.tool-lesson { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.tool-lesson h2 { margin: 13px 0 19px; font-size: clamp(1.35rem, 2vw, 1.8rem); }.tool-lesson > p { color: #55644f; font-size: .88rem; }.tool-instructions { margin: 26px 0; }.tool-instructions h3 { font-size: 1rem; }.tool-instructions ol { padding-left: 23px; display: grid; gap: 13px; margin-top: 18px; }.tool-instructions li { padding-left: 5px; font-size: .85rem; color: #4b5e4d; }.tool-instructions li::marker { color: var(--text-accent-muted); font-weight: 650; }
.demo-window { border: 1px solid #cdd7c6; border-radius: 12px; background: #f5f7f1; overflow: clip; margin: 25px 0; }.demo-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; background: #edf1e7; padding: 11px 15px; border-bottom: 1px solid #d6dfce; font-size: .8rem; color: #5c7051; }.demo-toolbar > span:first-child { color: var(--decor-muted); font-size: .8rem; letter-spacing: 2px; }
.folder-demo { padding: 18px; display: grid; gap: 14px; }.folder-demo > div { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; border: 1px solid #dce4d5; border-radius: 8px; padding: 14px; background: white; }.folder-demo strong { font-size: .8rem; overflow-wrap: anywhere; }.folder-demo small { display: block; font-size: .8rem; color: var(--muted); margin-top: 4px; }.folder-demo > div > span:nth-child(2) { min-width: 0; flex: 1 1 220px; }.file-icon { width: 30px; height: 35px; display: grid; place-items: center; background: #dbead0; color: #376335; border-radius: 4px 10px 4px 4px; font-size: .8rem; }.file-icon.copy { background: #e9eddf; }
.chat-demo { display: grid; gap: 17px; padding: 20px; }.source-snippet { border-left: 3px solid #9cb57e; padding: 8px 14px; }.source-snippet p { font-size: .81rem; color: #536449; }.prompt-bubble { background: #e0edce; border: 1px solid #c7dbb0; border-radius: 14px 14px 3px 14px; padding: 19px; margin-left: 22px; }.prompt-bubble p { font-size: .82rem; color: #334c2d; }.copy-button { margin-top: 12px; color: #2f5638; background: #f8fbf3; border: 1px solid #a9c18d; border-radius: 6px; font-size: .8rem; padding: 6px 12px; min-height: 42px; }.answer-bubble { background: white; border: 1px solid var(--line); border-radius: 14px 14px 14px 3px; padding: 19px; margin-right: 12px; }.answer-grid { margin: 10px 0 0; display: grid; gap: 10px; }.answer-grid > div { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: 12px; border-top: 1px solid var(--line); padding-top: 10px; font-size: .8rem; }.answer-grid dt { color: #617653; }.answer-grid dd { color: #2f4c33; margin: 0; }
.formula-bar { display: flex; gap: 15px; align-items: center; padding: 12px 17px; border-bottom: 1px solid var(--line); color: var(--green); font-size: .82rem; }.formula-bar b { border-right: 1px solid var(--line); padding-right: 17px; }.formula-bar code { background: white; padding: 4px 10px; }.demo-sheet { min-width: 430px; }.demo-sheet thead th { background: #e7eddf; text-align: center; font-size: .8rem; }.demo-sheet th { color: #697c60; font-weight: 500; background: #eaf0e3; }.demo-sheet td { background: white; font-variant-numeric: tabular-nums; }.demo-sheet .selected-cell { color: #225c2f; font-weight: 700; background: #e7f1dd; outline: 2px solid #729c51; outline-offset: -2px; }.calculation-proof { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; padding: 23px 16px; align-items: baseline; color: var(--green); font-size: .9rem; }.calculation-proof strong:last-child { font-size: 1.5rem; }
.paper-demo { background: white; margin: 20px; padding: 26px; box-shadow: 0 3px 12px #334c1e0c; border: 1px solid #e4e9dd; }.draft-tag { display: inline-block; color: #7b672a; border: 1px solid #d5c98f; padding: 3px 7px; font-size: .8rem; letter-spacing: .1em; margin-bottom: 12px; }.paper-demo h3 { font-family: Georgia, serif; font-size: 1.5rem; font-weight: 400; }.paper-source { color: var(--text-accent-muted); font-size: .8rem; margin-top: 14px; }.document-example { display: grid; gap: 8px; margin-top: 22px; }.document-example > div { display: flex; flex-wrap: wrap; gap: 10px 20px; border-bottom: 1px solid #e4eadd; padding: 7px 0; font-size: .8rem; }.document-example dt { flex-basis: 85px; color: var(--text-accent-muted); }.document-example dd { flex: 1 1 120px; margin: 0; }.review-comment { padding: 14px 16px; border-left: 3px solid #c4b55c; background: #fbf8e8; margin-top: 22px; font-size: .8rem; color: #6a643e; }.review-comment p { margin-top: 4px; }
.slide-demo { padding: 32px; background: #173f35; color: #eef4e9; }.slide-demo .tiny-label { color: #bad28e; }.slide-demo h3 { font-size: 1.55rem; color: white; margin: 18px 0; font-family: Georgia, serif; font-weight: 400; }.slide-metric { display: flex; flex-wrap: wrap; gap: 12px 27px; align-items: center; margin: 25px 0; }.slide-metric strong { color: #d3e9a6; font-size: 3.8rem; font-weight: 500; line-height: 1; }.slide-metric > span { font-size: .81rem; color: #d0dfc6; }.slide-rule { height: 3px; background: #5e8154; border-radius: 3px; margin: 25px 0; }.slide-demo p { font-size: .8rem; color: #c7d5bb; }
.solution-reveal { border: 1px solid var(--line); border-radius: 9px; margin: 18px 0; padding: 0 17px; }.solution-reveal summary { color: var(--green); cursor: pointer; font-weight: 600; font-size: .82rem; padding: 12px 0; }.solution-reveal p { font-size: .82rem; color: #55664e; padding: 8px 0 18px; }.check-note { background: #f1f5eb; padding: 17px 20px; border-radius: 10px; margin: 22px 0; font-size: .82rem !important; }.check-note strong { color: var(--green); }

.topbar-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px; }
.glossary-launch { cursor: pointer; }
.tool-lab, .ratio-lab { display: grid; gap: 18px; margin: 24px 0; padding: 22px; border: 1.5px solid #c7d8c4; border-top: 4px solid var(--green); border-radius: 15px; background: var(--surface-lab); box-shadow: 0 4px 18px rgba(21, 62, 56, 0.05); }
.tool-lab-heading h3, .ratio-lab h3 { margin: 6px 0; font-size: 1.12rem; }.tool-lab-heading p, .ratio-lab > div > p { color: var(--muted); font-size: .84rem; }
.tool-lab-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.tool-lab-fields label { display: grid; gap: 6px; min-width: 0; color: #405442; font-size: .8rem; font-weight: 650; }
.tool-lab-fields input, .tool-lab-fields textarea { width: 100%; min-width: 0; padding: 9px 12px; border: 1px solid #cbd8c6; border-radius: 8px; background: #fff; font: inherit; }
.tool-source { grid-column: 1 / -1; }.tool-source textarea { resize: vertical; }
.prompt-output { padding: 16px; border: 1px solid #d6e0d0; border-radius: 10px; background: #f5f8f1; }.prompt-output p { margin-top: 7px; color: #324a37; font-size: .87rem; white-space: pre-line; overflow-wrap: break-word; }
.ratio-result { display: block; color: var(--green); font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Micro-simuladores de productividad administrativa */
.sim-dual-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.sim-dual-actions .button {
  min-height: 40px;
}

.badge-publico { background: #e8f5e9; color: #1b5e20; border: 1px solid #c8e6c9; padding: 2px 8px; border-radius: 4px; font-size: .8rem; font-weight: 600; }
.badge-privado { background: #fff8e1; color: var(--amber-contrast-text); border: 1px solid #ffe082; padding: 2px 8px; border-radius: 4px; font-size: .8rem; font-weight: 600; }
.badge-sensible { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; padding: 2px 8px; border-radius: 4px; font-size: .8rem; font-weight: 600; }

.badge-warning { background: #fff3e0; color: var(--amber-feedback-text); border: 1px solid #ffe0b2; padding: 2px 6px; border-radius: 4px; font-size: .8rem; font-weight: 700; }
.badge-info { background: #e3f2fd; color: #0d47a1; border: 1px solid #bbdefb; padding: 2px 6px; border-radius: 4px; font-size: .8rem; font-weight: 700; }

.eval-status {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.5rem;
}
.eval-status.is-complete { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.eval-status.is-progress { background: #f5f5f5; color: var(--muted); border: 1px solid var(--line); }

.cleaner-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
}
.cleaner-table th, .cleaner-table td {
  padding: 8px 12px;
  border: 1px solid var(--line);
  font-size: 0.82rem;
  text-align: left;
}
.cleaner-table th {
  background: var(--paper);
  color: var(--green-dark);
  font-weight: 600;
}

/* devbrain-prose-contract:start */
/* Contrato 7.4: cada región ocupa su espacio y conserva sus controles. */
:where(p, dd, blockquote) {
    --text-align-reading: start;
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    text-align: var(--text-align-reading);
    text-align-last: start;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    -webkit-hyphens: none;
}
:where(dd, blockquote) { margin-inline: 0; }
/* devbrain-prose-contract:end */

/* css/learning-support.css */
/* Apoyos de aprendizaje: objetivos, etapas y decisiones con explicación. */
.learning-start, .practice-route { margin: 24px 0; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); border-radius: 18px; background: #fff; min-width: 0; }
.learning-start { container-type: inline-size; border-top: 4px solid var(--green); }
.learning-start h2 { margin: 8px 0 12px; font-size: clamp(1.2rem, 2vw, 1.5rem); }
.learning-start [data-learning-goal] { width: 100%; color: var(--ink); font-size: 1rem; line-height: 1.7; }
.learning-product { margin: 15px 0 20px; color: #405747; font-size: .91rem; line-height: 1.6; }
.method-route { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; list-style: none; padding: 0; counter-reset: method; }
.method-route > li { min-width: 0; padding: 16px; background: #f3f7ef; border: 1px solid #dbe5d5; border-radius: 12px; counter-increment: method; }
.method-route strong { display: flex; align-items: center; gap: 9px; font-size: .95rem; color: var(--green); }
.method-route strong::before { content: counter(method); display: grid; place-items: center; flex: 0 0 27px; height: 27px; border-radius: 50%; color: #fff; background: var(--green); font-size: .8rem; }
.method-route span { display: block; margin-top: 9px; font-size: .88rem; line-height: 1.65; color: #415548; }
.term-guide { margin-top: 20px; border-top: 1px solid var(--line); }
.term-guide summary, .check-explanation summary { min-height: 44px; padding: 13px 0; cursor: pointer; color: var(--green); font-size: .9rem; font-weight: 650; }
.learning-terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 15px; margin: 6px 0; }
.learning-terms > div { min-width: 0; padding: 14px; background: #f7f9f5; border-radius: 9px; }
.learning-terms dt { font-size: .91rem; font-weight: 700; color: #294a37; }
.learning-terms dd { margin: 6px 0 0; font-size: .88rem; color: #435848; line-height: 1.65; }
.knowledge-review { margin: 30px 0; container-type: inline-size; min-width: 0; }
.knowledge-review .panel-heading { display: block; margin-bottom: 20px; }
.knowledge-review .panel-heading h3 { margin: 8px 0; font-size: 1.35rem; }
.knowledge-review .panel-heading p { width: 100%; font-size: .92rem; line-height: 1.7; }
.knowledge-checks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.knowledge-check { min-width: 0; padding: clamp(17px, 3vw, 24px); border: 1px solid #cddacb; border-radius: 16px; background: #fff; }
.check-scenario { margin: 0 0 18px; padding: 13px; border-radius: 9px; background: #f3f6f0; color: #3b5144; font-size: .9rem; line-height: 1.7; }
.knowledge-check fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.knowledge-check legend { width: 100%; padding: 0 0 16px; font-size: 1rem; font-weight: 700; line-height: 1.55; color: #203c2d; }
.check-option { display: flex; align-items: flex-start; gap: 11px; min-width: 0; min-height: 44px; padding: 13px; margin: 0 0 10px; border: 1px solid #d4dfcf; border-radius: 10px; cursor: pointer; background: #fff; }
.check-option input { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 4px; accent-color: var(--green); }
.check-option span { min-width: 0; font-size: .92rem; color: #324a39; line-height: 1.65; overflow-wrap: anywhere; }
.check-option:has(input:checked) { background: #edf5e7; border-color: #608149; box-shadow: inset 3px 0 #608149; }
.knowledge-check[data-state="review"] .check-option:has(input:checked) { background: #fff4df; border-color: #a47829; box-shadow: inset 3px 0 #a47829; }
.check-option:focus-within { outline: 3px solid #5e845c; outline-offset: 3px; }
.check-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.check-actions button { min-height: 44px; max-width: 100%; padding: 10px 14px; font-size: .87rem; line-height: 1.4; white-space: normal; }
.check-actions .button-primary { color: #fff; background: var(--green); border: 1px solid var(--green); border-radius: 9px; }
.check-actions .button-primary:hover { background: #173f35; }
.check-feedback { margin: 18px 0 6px; padding: 14px; border-radius: 9px; color: #435446; background: #f1f4ed; font-size: .91rem; line-height: 1.7; overflow-wrap: anywhere; }
.knowledge-check[data-state="correct"] .check-feedback { background: #e8f3e1; color: #254a2e; border-left: 4px solid #4f7f3b; }
.knowledge-check[data-state="review"] .check-feedback, .knowledge-check[data-state="empty"] .check-feedback { background: #fff4df; color: #60481e; border-left: 4px solid #a47829; }
.check-explanation p { margin: 0 0 5px; color: #3e5344; font-size: .9rem; line-height: 1.7; }
.practice-route { background: #f3f7ef; container-type: inline-size; }
.practice-route h3 { margin: 8px 0; font-size: 1.25rem; }
.practice-route > p { font-size: .92rem; line-height: 1.7; margin-bottom: 18px; }
.practice-route ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 14px; list-style: none; padding: 0; counter-reset: milestone; }
.practice-route li { min-width: 0; padding: 18px; background: #fff; border: 1px solid #d7e2d0; border-radius: 12px; counter-increment: milestone; }
.practice-route li > strong { display: block; color: #294a37; font-size: .94rem; line-height: 1.55; }
.practice-route li > strong::before { content: counter(milestone) ". "; }
.practice-route li p { margin-top: 10px; font-size: .89rem; line-height: 1.65; color: #405344; }
.practice-route .milestone-ready { padding-top: 12px; border-top: 1px solid #e1e8dc; }
.example-reason { padding: 12px 15px; background: #f0f5e9; border-left: 3px solid #7a985e; border-radius: 0 8px 8px 0; }
.worked-step-label { display: block; margin: 12px 0 7px; color: #386438; font-size: .8rem; font-weight: 750; letter-spacing: .04em; text-align: left; }
.example-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; margin: 14px 0; }
.example-facts article { min-width: 0; padding: 15px; border: 1px solid #d6e0d0; border-radius: 10px; background: #fff; }
.example-facts h5 { margin: 0 0 8px; color: #2a4c35; font-size: .94rem; }
.guided-chart { margin: 20px 0; padding: 20px; border: 1px solid #d6e0d0; border-radius: 12px; background: #fff; }
.guided-chart figcaption { font-size: 1rem; font-weight: 700; color: #294a37; line-height: 1.5; }
.chart-row { margin-top: 18px; min-width: 0; }
.chart-row > div:first-child { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px 15px; font-size: .91rem; color: #324b39; }
.chart-track { height: 13px; background: #ecf2e6; border-radius: 7px; margin-top: 8px; overflow: hidden; }
.chart-fill { height: 100%; background: #477647; border-radius: 7px; }
.guided-chart > p { margin-top: 16px; font-size: .88rem; line-height: 1.65; }
@container (min-width: 34rem) { .method-route { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 65rem) { .method-route { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container (min-width: 48rem) { .knowledge-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 34rem) { .practice-route ol:has(> li:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 72rem) { .practice-route ol:has(> li:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 520px) { .check-actions { flex-direction: column; } .check-actions button { width: 100%; justify-content: center; } .guided-chart { padding: 15px; } }

/* Puente didáctico entre reto y entregable */
.challenge-deliverable-bridge {
  margin: 20px 0;
  padding: 16px 20px;
  background: #eef6eb;
  border: 1.5px solid #b8d7b0;
  border-left: 5px solid #2e7d32;
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #274731;
  font-size: .92rem;
  line-height: 1.65;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.06);
}
.challenge-deliverable-bridge strong {
  color: #1e3b27;
}
.challenge-deliverable-bridge code {
  background: #e2efdc;
  color: #1d4027;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
}
.challenge-deliverable-bridge a,
.challenge-deliverable-bridge button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--green);
  color: var(--surface);
  border: 1px solid var(--green);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.challenge-deliverable-bridge a:hover,
.challenge-deliverable-bridge button:hover {
  background: var(--green-dark);
  color: var(--surface);
}

/* Resaltado accesible de campo en Documenta */
@keyframes dbeHighlightPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(21, 94, 239, 0.45);
    border-color: var(--focus-ring);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(21, 94, 239, 0.15);
    border-color: var(--focus-ring);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(21, 94, 239, 0);
    border-color: var(--focus-ring);
  }
}

.dbe-field--highlighted {
  outline: 3px solid var(--focus-ring) !important;
  outline-offset: 3px !important;
  border-color: var(--focus-ring) !important;
  animation: dbeHighlightPulse 1.8s ease-in-out 3;
}

/* Ruta guiada de tres pasos en Documenta */
.evidence-guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
  margin: 20px 0;
}
.guide-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: #f9fbf8;
  border: 1px solid #dbe5d8;
  border-radius: 12px;
}
.guide-step-num {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: #3d784a;
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
}
.guide-step-body {
  min-width: 0;
}
.guide-step-body strong {
  display: block;
  font-size: .93rem;
  color: #203c2d;
  margin-bottom: 4px;
}
.guide-step-body p {
  margin: 0;
  font-size: .86rem;
  line-height: 1.55;
  color: #455a4c;
}

/* Ayuda de lectura, separada de las respuestas del aprendiz. */
.evidence-writing-guide {
  margin: 16px 0 24px;
  padding: 12px 16px;
  background: #f4f8f2;
  border: 1px dashed #b8ceb2;
  border-radius: 10px;
}
.evidence-writing-guide > summary {
  padding: 8px 0;
  font-weight: 650;
  cursor: pointer;
}
.evidence-writing-guide p,
.evidence-writing-guide li {
  font-size: .95rem;
  color: #31513a;
  line-height: 1.6;
}

/* Guía de portafolio listo y entrega */
.portfolio-ready-guide {
  margin: 24px 0 28px;
  padding: clamp(18px, 3vw, 26px);
  background: #f4f8f1;
  border: 1px solid #cfe0cb;
  border-radius: 16px;
}
.portfolio-ready-heading .eyebrow {
  display: block;
  color: #3d784a;
  font-size: .8rem;
  font-weight: 750;
  letter-spacing: .05em;
  margin-bottom: 4px;
}
.portfolio-ready-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  color: #1e3b27;
}
.portfolio-ready-heading p {
  margin: 0 0 18px;
  color: #405747;
  font-size: .92rem;
  line-height: 1.6;
}
.portfolio-ready-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 14px;
}
.ready-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: #fff;
  border: 1px solid #d8e4d4;
  border-radius: 12px;
}
.ready-step-num {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  height: 30px;
  border-radius: 50%;
  background: #255236;
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
}
.ready-step-body {
  min-width: 0;
}
.ready-step-body strong {
  display: block;
  font-size: .95rem;
  color: #1f3d2a;
  margin-bottom: 4px;
}
.ready-step-body p {
  margin: 0;
  font-size: .87rem;
  line-height: 1.55;
  color: #425849;
}

/* devbrain-prose-contract:start */
/* Contrato 7.4: cada región ocupa su espacio y conserva sus controles. */
:where(p, dd, blockquote) {
    --text-align-reading: start;
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    text-align: var(--text-align-reading);
    text-align-last: start;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    -webkit-hyphens: none;
}
:where(dd, blockquote) { margin-inline: 0; }
/* devbrain-prose-contract:end */

/* css/productivity.css */
.productivity-lesson {
  margin: 22px 0;
  padding: clamp(17px, 2.5vw, 26px);
  border: 1px solid #c6d9bb;
  border-radius: 16px;
  background: #f8faf5;
  min-width: 0;
}
.productivity-lesson > .eyebrow { color: #355d36; }
.productivity-lesson h2, .productivity-lesson h3 { margin: 7px 0 14px; font-size: clamp(1.2rem, 2vw, 1.55rem); }
.productivity-lesson h4 { margin: 0 0 10px; font-size: 1rem; }
.productivity-lesson p {
  max-width: 100%;
  color: #354e3c;
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.productivity-lesson p + p { margin-top: 12px; }
.productivity-illustrated { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); gap: 24px; align-items: start; margin: 18px 0; }
.productivity-illustrated > *, .productivity-pair > *, .productivity-track > * { min-width: 0; }
[data-productivity-visual] { min-width: 0; margin: 0; }
[data-productivity-visual] img { display: block; width: 100%; height: auto; max-width: 420px; margin: 0 auto; border: 1px solid #c8d8bd; border-radius: 15px; }
[data-productivity-visual] figcaption {
  margin-top: 11px;
  font-size: .85rem;
  line-height: var(--line-height-reading, 1.65);
  color: #435a42;
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.productivity-overview { max-width: 420px; margin: 22px auto; }
.productivity-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 16px;
  margin: 18px 0;
}
.productivity-pair > div {
  border: 1px solid #dce5d6;
  border-left: 4px solid var(--green);
  border-radius: var(--card-radius-sm, 14px);
  padding: 16px 18px;
  background: #fff;
  box-shadow: var(--card-shadow, 0 4px 14px rgba(34, 87, 70, 0.04));
}
.productivity-pair p {
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.productivity-table { width: 100%; min-width: 28rem; border-collapse: collapse; font-size: .87rem; }
.productivity-table th, .productivity-table td { padding: 12px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid #c9d7bf; }
.productivity-table th { color: #244d35; background: #eaf2e2; }
.productivity-table td { color: #354e3c; }
.productivity-lesson .table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; margin-bottom: 14px; }
.productivity-lesson .table-scroll:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.productivity-prompt {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid #dce5d6;
  border-left: 4px solid var(--green);
  border-radius: var(--card-radius-sm, 14px);
  background: #fff;
  color: #244735;
  box-shadow: var(--card-shadow, 0 4px 14px rgba(34, 87, 70, 0.04));
}
.productivity-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; padding: 0; margin: 19px 0; list-style: none; }
.productivity-track li { padding: 16px; border: 1px solid #ccdac1; border-radius: 12px; background: #fff; }
.productivity-track strong { display: block; margin: 9px 0 6px; }
.productivity-node { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; }
.productivity-recall {
  margin-top: 18px;
  border: 1px solid #dce5d6;
  border-left: 4px solid var(--green);
  border-radius: var(--card-radius-sm, 14px);
  background: #fff;
  box-shadow: var(--card-shadow, 0 4px 14px rgba(34, 87, 70, 0.04));
}
.productivity-recall summary { min-height: 44px; padding: 14px 16px; cursor: pointer; color: #254d33; font-weight: 650; }
.productivity-recall > p {
  padding: 0 16px 16px;
  margin: 0;
  line-height: var(--line-height-reading, 1.65);
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.productivity-criterion { margin-top: 17px; padding-top: 14px; border-top: 1px solid #c9d7bf; font-weight: 600; }
@media (max-width: 760px) {
  .productivity-illustrated, .productivity-track { grid-template-columns: minmax(0, 1fr); }
  .productivity-pair { grid-template-columns: minmax(0, 1fr); }
  .productivity-illustrated figure { max-width: 420px; margin-inline: auto; }
  .productivity-table th, .productivity-table td { padding: 10px 8px; }
}
@media print {
  .productivity-lesson { background: #fff; break-inside: auto; box-shadow: none !important; }
  .productivity-lesson details > * { display: block; }
  .productivity-pair > div,
  .productivity-prompt,
  .productivity-recall,
  .productivity-track li {
    box-shadow: none !important;
    break-inside: avoid;
  }
}

/* devbrain-prose-contract:start */
/* Contrato 7.4: cada región ocupa su espacio y conserva sus controles. */
:where(p, dd, blockquote) {
    --text-align-reading: start;
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    text-align: var(--text-align-reading);
    text-align-last: start;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    -webkit-hyphens: none;
}
:where(dd, blockquote) { margin-inline: 0; }
/* devbrain-prose-contract:end */

/* css/course-responsive.css */
@container preparation (max-width: 60rem) {
  .tool-workspace { grid-template-columns: minmax(0, 1fr); }
  .tool-selector { position: static; grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); }
}
@media (min-width: 1550px) { .route-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 901px) and (max-width: 1399px) {
  .course-topbar { flex-wrap: wrap; }
  .topbar-location { flex: 1 1 240px; }
  .course-progress-container { order: 3; flex: 1 1 100%; margin-left: 0; }
}
@media (max-width: 1199px) { .course-sidebar { width: 235px; padding: 25px 15px 18px; } .course-workspace { margin-left: 235px; } .course-topbar { padding: 15px 25px; } .tool-workspace { grid-template-columns: 1fr; } .tool-selector { position: static; grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); } .tool-selector button { padding: 12px; } }
@media (max-width: 850px) {
  .course-workspace { margin-left: 0; }
  .course-sidebar { position: fixed; inset: 0 auto 0 0; width: min(360px, 88vw); height: 100dvh; max-height: 100dvh; padding: 22px 18px; transform: translateX(-105%); visibility: hidden; pointer-events: none; transition: transform .22s ease, visibility 0s linear .22s; }
  body:not(.navigation-ready) .course-sidebar { position: static; width: auto; height: auto; max-height: none; transform: none; visibility: visible; pointer-events: auto; transition: none; }
  body.navigation-ready.menu-open .course-sidebar { transform: translateX(0); visibility: visible; pointer-events: auto; transition: transform .22s ease, visibility 0s; }
  .sidebar-head { gap: 12px; }
  body.navigation-ready .sidebar-close { display: inline-grid; place-items: center; }
  .sidebar-close:hover { background: #315b4f; }
  body.navigation-ready.menu-open { overflow: hidden; }
  body.navigation-ready .menu-scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 39; width: 100vw; height: 100dvh; border: 0; border-radius: 0; background: #12271eb0; }
  body.navigation-ready .menu-toggle { display: inline-flex; gap: 7px; align-items: center; }
  #course-nav ul { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; }
  #course-nav a { min-height: 52px; }
  #course-nav .nav-group-label:not(:first-child) { padding-top: 12px; margin-top: 12px; }
  .sidebar-caption { margin-top: 24px; }.course-topbar { padding: 12px 20px; }.topbar-location { gap: 8px; }.breadcrumb-root, .breadcrumb-slash { display: none; }
  #contenido { padding-top: 27px; }.home-hero { gap: 27px; }.hero-visual { padding: 22px; }.course-footer { padding: 20px; }.day-card summary { flex-wrap: wrap; gap: 12px; }.day-hours { margin-left: 0; }
}
@media (max-width: 520px) {
  .media-caption { align-items: stretch; flex-direction: column; }.media-caption .text-button { width: 100%; }
  .evidence-form-grid { grid-template-columns: minmax(0, 1fr); }.schedule-download { align-items: stretch; flex-direction: column; gap: 15px; padding: 18px; }.schedule-download .button { justify-content: center; }
  .evidence-form-card { padding: 16px; }
  .dbe-dossier input, .dbe-dossier textarea, .dbe-estacion input, .dbe-estacion textarea { min-width: 0; max-width: 100%; }
  /* La disposición de la barra superior en pantallas angostas está en ux-refinements.css. */
  body { font-size: 15px; }.resource-link { padding: 7px 10px; font-size: .8rem; }.resources-panel { top: calc(100% + 6px); }.topbar-location strong { font-size: .8rem; }.menu-toggle { font-size: .8rem; }
  #contenido { padding: 24px 17px 15px; }.page-kicker { margin-bottom: 19px; }.page-intro { font-size: .88rem; }.home-hero { margin-bottom: 34px; }.hero-copy h1 { font-size: 2.14rem; }.hero-actions { display: grid; grid-template-columns: 1fr; }.hero-facts { gap: 25px; }.hero-visual { padding: 20px; }.section-title > p { flex-basis: 100%; }.route-card { padding: 21px; }.home-bottom { gap: 17px; }.method-card, .portfolio-preview { padding: 22px; }
  .module-hero { grid-template-columns: 1fr; }.flow-visual { grid-template-columns: minmax(0, 1fr); }.flow-visual i { transform: rotate(90deg); }.challenge-card > details > summary { flex-wrap: wrap; }.challenge-summary-copy { flex-basis: 100%; }.course-dialog { max-height: 86dvh; }.dialog-content { padding: 14px; }
  .lesson-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }.lesson-tabs button { font-size: .8rem; justify-content: flex-start; gap: 8px; padding: 10px; }.lesson-meta { gap: 9px 15px; }.module-hero, .learning-block, .worked-example { padding: 20px; }.prerequisite { padding: 17px; }.challenge-card > details > summary { padding: 17px 18px; }.challenge-summary-count { margin-right: 0; }.challenge-body { padding: 18px; }.challenge-materials { padding: 14px; }.challenge-package { align-items: stretch; flex-direction: column; }.challenge-package-download, .challenge-file-download { width: 100%; }.challenge-material-item { padding: 13px; }.challenge-card h3 { font-size: 1rem; }.challenge-body .worked-example { padding: 15px; }.phase-footer { align-items: stretch; }.phase-footer .button { width: 100%; }
  .preparation-banner { padding: 19px; }.case-symbol { display: none; }.tool-workspace { gap: 17px; }.tool-selector { grid-template-columns: 1fr; gap: 6px; }.tool-selector button { padding: 10px 13px; }.tool-selector strong { font-size: .8rem; }.tool-selector small { font-size: .8rem; }.tool-lesson { padding: 20px 17px; }.chat-demo { padding: 13px; }.prompt-bubble { margin-left: 0; padding: 15px; }.answer-bubble { margin-right: 0; padding: 15px; }.answer-grid > div { grid-template-columns: 1fr; gap: 3px; }.paper-demo { margin: 12px; padding: 18px; }.slide-demo { padding: 23px; }.folder-demo { padding: 12px; }.folder-demo > div { padding: 12px; }.folder-demo > div > span:nth-child(2) { flex-basis: 150px; }
  .schedule-metrics { gap: 13px; padding: 18px; }.schedule-metrics strong { font-size: 1.35rem; }.schedule-metrics > span { font-size: 1rem; }.schedule-metrics div > span { font-size: .8rem; }.day-card summary { padding: 18px; }.day-card summary > span:nth-child(2) { flex: 1 1 180px; }.day-card summary::after { align-self: center; }.day-hours { margin-left: 50px; }.day-body { padding: 0 18px 20px; }.day-timeline li { grid-template-columns: 1fr; gap: 5px; }.day-timeline time { font-size: .8rem; }.autonomous { padding: 15px; }
  .dbe-estacion, .dbe-dossier { padding: 16px !important; }.dbe-estacion__titulo { font-size: 1.15rem; }.dbe-acciones { flex-wrap: wrap; }.dbe-acciones > button { max-width: 100%; }
  .sim-dual-actions { width: 100%; } .sim-dual-actions .button { width: 100%; justify-content: center; }
}
@media (max-width: 850px) { .module-hero { grid-template-columns: 1fr; }.flow-visual { grid-template-columns: minmax(0, 1fr); }.flow-visual i { transform: rotate(90deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print {
  .dossier-header { display: flex !important; }
  body { background: white; color: black; }.course-sidebar, .course-topbar, .course-footer, .lesson-tabs, .tool-selector, .phase-footer, .privacy-actions, .hero-actions, .toast, video, .skip-link { display: none !important; }.course-workspace { margin: 0; }#contenido { padding: 0; max-width: none; }
  .module-page, [data-panel] { display: block !important; break-before: page; }.home-page { break-before: auto; }.challenge-card, .worked-example { break-inside: avoid; }.module-page details > * { display: block !important; }.tool-workspace { display: block; }.tool-lesson { margin-bottom: 20px; }.hero-visual { display: none; }
  body:has(.dbe-dossier) .module-page:not(.portfolio-page) { display: none !important; }.portfolio-page > :not([data-db-evidence-dossier]):not(.eco-portfolio-summary) { display: none !important; }.portfolio-page { break-before: auto; }
  body[data-print-view="calendario"] .module-page:not(#calendario) { display: none !important; }
  body[data-print-view="manual-situaciones"] .module-page:not(#portafolio), body[data-print-view="manual-situaciones"] #portafolio > :not(#manual-situaciones-oficina) { display: none !important; }
  body[data-print-view="manual-situaciones"] #manual-situaciones-oficina { display: block !important; margin: 0; border: 0; padding: 0; }
  body[data-print-view="manual-situaciones"] #manual-situaciones-oficina .manual-toolbar-actions { display: none !important; }
  .situation-detail-panel[hidden] { display: block !important; }.situation-filters, .situation-list { display: none !important; }
  .situation-detail-panel, .learning-ai-card { break-inside: avoid; }
  body[data-print-view="calendario"] #calendario { display: block !important; break-before: auto !important; margin: 0 !important; }
  body[data-print-view="calendario"] #calendario .schedule-download { display: none !important; }
  body[data-print-view="calendario"] #calendario .day-card,
  body[data-print-view="calendario"] #calendario .day-timeline li { break-inside: avoid; }
  body[data-print-case] #course-pages > .module-page { display: none !important; }
  body[data-print-case] #course-pages > .module-page.case-print-page { display: block !important; break-before: auto; }
  body[data-print-case] .case-print-page > :not(.lesson-workspace),
  body[data-print-case] .case-print-page .lesson-workspace > :not([data-panel="observa"]),
  body[data-print-case] .case-print-page [data-panel="observa"] > :not(.case-print-target) { display: none !important; }
  body[data-print-case] .case-print-page [data-panel="observa"],
  body[data-print-case] .case-print-target [data-case-stage] { display: block !important; break-before: auto; }
}

[data-db-evidence-dossier] { box-sizing: border-box; max-width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
[data-db-evidence-dossier]:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.dbe-estacion .dbe-chequeo__item { align-items: center; min-height: 42px; }
.dbe-estacion .dbe-chequeo__item input[type="checkbox"] { appearance: none; box-sizing: border-box; display: inline-grid; place-content: center; flex: 0 0 42px; width: 42px; min-width: 42px; height: 42px; min-height: 42px; margin: 0; padding: 0; border: 2px solid #587464; border-radius: 5px; background: #fff; cursor: pointer; }
.dbe-estacion .dbe-chequeo__item input[type="checkbox"]::before { width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2px 2px; content: ""; transform: rotate(-45deg) scale(0); transform-origin: center; }
.dbe-estacion .dbe-chequeo__item input[type="checkbox"]:checked { border-color: #245c45; background: #245c45; }
.dbe-estacion .dbe-chequeo__item input[type="checkbox"]:checked::before { transform: rotate(-45deg) scale(1); }
.dbe-estacion .dbe-chequeo__item input[type="checkbox"]:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.dbe-estacion .dbe-chequeo__item label { min-height: 42px; cursor: pointer; }
@media (forced-colors: active) { .dbe-estacion .dbe-chequeo__item input[type="checkbox"] { appearance: auto; forced-color-adjust: auto; } }

/* Los simuladores se ajustan al panel; solo las tablas desplazan horizontalmente. */
.tool-lab, .ratio-lab { min-width: 0; max-width: 100%; grid-template-columns: minmax(0, 1fr); }
.tool-lab > *, .ratio-lab > *, .tool-lab-fields > *, .tool-form-grid > *, .tool-lab .form-group { min-width: 0; max-width: 100%; }
.tool-lab-heading, .tool-header, .tool-body, .tool-footer { overflow-wrap: break-word; }
.tool-lab-fields .check-option { flex: 1 1 12rem; max-width: 100%; white-space: normal; }
.tool-lab-fields .check-option > :not(input) { min-width: 0; overflow-wrap: break-word; }
.tool-lab .table-scroll { min-width: 0; width: 100%; max-width: 100%; overflow-x: auto; }
.tool-lab .table-scroll:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.cleaner-table { min-width: 46rem; }
.tool-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.tool-lab .form-group { display: grid; gap: .4rem; }
.tool-lab .tool-input { box-sizing: border-box; display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.tool-dual-actions, .tool-actions-row, .tool-badge-row { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.tool-dual-actions > button { flex: 1 1 13rem; }
.tool-lab button, #safety-scope-simulator button { min-width: 44px; min-height: 44px; max-width: 100%; white-space: normal; overflow-wrap: break-word; }
#safety-scope-simulator .widget-nav-footer { flex-wrap: wrap; min-width: 0; }
#safety-scope-simulator .widget-nav-footer > div { min-width: 0; max-width: 100%; flex-wrap: wrap; }

/* devbrain-prose-contract:start */
/* Contrato 7.4: cada región ocupa su espacio y conserva sus controles. */
:where(p, dd, blockquote) {
    --text-align-reading: start;
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    text-align: var(--text-align-reading);
    text-align-last: start;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    -webkit-hyphens: none;
}
:where(dd, blockquote) { margin-inline: 0; }
/* devbrain-prose-contract:end */

/* css/preparation.css */
/* Lectura y secuencia del primer módulo, ajustadas al ancho de su contenido. */
.preparation-page h1 { font-size: clamp(1.85rem, 3.2cqi, 2.65rem); line-height: 1.2; }
.preparation-page .page-intro { font-size: 1rem; margin: 14px 0 20px; }
.preparation-start { margin: 20px 0; padding: clamp(18px, 2.4cqi, 26px); }
.preparation-start h2 { margin: 0 0 8px; font-size: 1.3rem; }
.preparation-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 18px 0; }
.preparation-facts > div { min-width: 0; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.preparation-facts dt { color: var(--green); font-size: .9rem; font-weight: 700; }
.preparation-facts dd { margin: 5px 0 0; color: var(--muted); font-size: .94rem; line-height: 1.6; }
.preparation-entry-note { color: var(--muted); font-size: .92rem; }
.preparation-start .term-guide { margin-top: 14px; }
.preparation-start .term-guide summary { padding: 11px 0 0; }
.preparation-page .practice-data-note { padding: 14px 18px; font-size: .9rem; }
.preparation-workspace-intro { margin: 26px 0 18px; }
.preparation-workspace-intro h2 { margin-bottom: 9px; font-size: 1.35rem; }
.preparation-workspace-intro p { color: var(--muted); font-size: .94rem; }
.preparation-page .tool-workspace { grid-template-columns: minmax(0, 1fr); gap: 18px; scroll-margin-top: var(--sticky-offset); }
.preparation-page .tool-selector { grid-template-columns: minmax(0, 1fr); position: static; gap: 8px; }
.preparation-page .tool-selector button { gap: 10px; padding: 12px; }
.preparation-page .tool-selector button > span:last-child { min-width: 0; }
.preparation-page .tool-selector strong { font-size: .9rem; line-height: 1.4; }
.preparation-page .tool-selector small { font-size: .8rem; line-height: 1.5; }
.preparation-page .tool-monogram { flex-basis: 30px; height: 30px; border-radius: 50%; font-size: .9rem; font-weight: 700; }
.preparation-page .tool-selector button[aria-selected="true"] .tool-monogram { color: var(--white); background: var(--green); border-color: var(--green); }
.preparation-page .tool-lesson { padding: clamp(18px, 2.5cqi, 28px); }
.preparation-page .tool-lesson h2 { margin: 10px 0 14px; font-size: clamp(1.3rem, 2.5cqi, 1.7rem); }
.preparation-page .tool-lesson > p { font-size: .96rem; color: var(--muted); }
.preparation-page .tool-instructions { margin: 22px 0; }
.preparation-page .tool-instructions h3 { font-size: 1.05rem; }
.preparation-page .tool-instructions ol { gap: 11px; margin-top: 13px; }
.preparation-page .tool-instructions li { font-size: .94rem; line-height: 1.65; }
.preparation-page .tool-instructions li strong { color: var(--ink); }
.preparation-page .prompt-bubble { margin: 18px 0; padding: clamp(16px, 2cqi, 22px); border-radius: 12px; background: var(--soft); }
.preparation-page .prompt-bubble p { color: var(--ink); font-size: .94rem; line-height: 1.65; }
.preparation-page .prompt-text { margin-top: 12px; }
.preparation-page .prompt-text p + p { margin-top: 12px; }
.preparation-page .copy-button { font-size: .84rem; min-height: 44px; }
.preparation-page .answer-bubble { margin: 18px 0; border-radius: 12px; }
.preparation-page .answer-grid > div { grid-template-columns: minmax(0, 1fr); gap: 4px; font-size: .92rem; }
.preparation-page .answer-grid dt { font-weight: 650; }
.preparation-page .demo-toolbar { gap: 12px; align-items: center; flex-wrap: wrap; font-size: .8rem; }
.preparation-page .folder-demo { padding: 14px; }
.preparation-page .folder-demo strong { font-size: .9rem; }
.preparation-page .folder-demo small { font-size: .8rem; }
.preparation-page .check-note { font-size: .92rem !important; margin: 20px 0; padding: 14px 18px; }
.preparation-page .solution-reveal summary { min-height: 44px; font-size: .92rem; line-height: 1.5; }
.preparation-page .solution-reveal p { padding: 0; margin: 0 0 14px; font-size: .92rem; line-height: 1.65; }
.preparation-page .solution-reveal .prompt-text p + p { margin-top: 12px; }
.preparation-page .paper-demo { margin: 14px; padding: clamp(18px, 2cqi, 24px); }
.preparation-page .paper-demo h3 { margin-bottom: 14px; }
.preparation-page .paper-demo p { font-size: .94rem; }
.preparation-page .paper-demo p + p { margin-top: 12px; }
.preparation-page .review-comment { margin-top: 16px; font-size: .9rem; }
.preparation-page .review-comment p { margin: 5px 0 0; }
.preparation-page .slide-demo { padding: clamp(18px, 3cqi, 28px); }
.preparation-page .slide-demo p, .preparation-page .slide-metric > span { font-size: .9rem; }
.preparation-page .slide-metric { gap: 12px 22px; }
.preparation-page .slide-demo h3 { font-size: 1.5rem; }
.preparation-page .optional-slide { margin: 24px 0; }
.preparation-page .course-context > .practice-route { margin: 0 0 18px; }

@container preparation (min-width: 38rem) {
  .preparation-page .tool-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preparation-page .tool-selector button:last-child { grid-column: 1 / -1; }
  .preparation-page .answer-grid > div { grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 16px; }
}
@container preparation (min-width: 52rem) {
  .preparation-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container preparation (min-width: 56rem) {
  .preparation-page .tool-selector { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .preparation-page .tool-selector button:last-child { grid-column: auto; }
}
@container preparation (min-width: 66rem) {
  .preparation-page .tool-workspace { grid-template-columns: 250px minmax(0, 1fr); gap: 22px; }
  .preparation-page .tool-selector { grid-template-columns: minmax(0, 1fr); position: sticky; top: 100px; }
}
@media print {
  .preparation-page .tool-workspace { display: block; }
  .preparation-page .tool-selector { display: none !important; }
}

/* devbrain-prose-contract:start */
/* Contrato 7.4: cada región ocupa su espacio y conserva sus controles. */
:where(p, dd, blockquote) {
    --text-align-reading: start;
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    text-align: var(--text-align-reading);
    text-align-last: start;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    -webkit-hyphens: none;
}
:where(dd, blockquote) { margin-inline: 0; }
/* devbrain-prose-contract:end */

/* css/course-progress.css */
/* Estilos para la barra de progreso general y métricas de productividad en cabecera */

.course-progress-container {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  position: relative;
}

.progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.progress-bar-wrap progress {
  width: 110px;
  height: 8px;
  appearance: none;
  border: none;
  border-radius: 999px;
  background-color: var(--line);
  overflow: hidden;
}

.progress-bar-wrap progress::-webkit-progress-bar {
  background-color: var(--line);
  border-radius: 999px;
}

.progress-bar-wrap progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--green), var(--sena-primary));
  border-radius: 999px;
}

.progress-bar-wrap progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--green), var(--sena-primary));
  border-radius: 999px;
}

.progress-percent-label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--green-dark);
  min-width: 2.2rem;
}

.progress-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: .8rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background-color: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #c8e6c9;
  white-space: nowrap;
}

.checklist-toggle-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.checklist-toggle-btn:hover,
.checklist-toggle-btn:focus-visible {
  border-color: var(--green);
  background-color: var(--paper);
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

.progress-checklist-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  max-height: 420px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  padding: 0.75rem 1rem;
  z-index: 100;
}

.checklist-dropdown-heading {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 0.5rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.progress-checklist-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.checklist-section-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-top: 0.4rem;
  text-transform: uppercase;
}

.checklist-item {
  font-size: .8rem;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.checklist-item.is-done {
  color: #1b5e20;
  font-weight: 600;
}

.checklist-item.is-pending {
  color: var(--muted);
}

/* Diálogo de Plantillas de Oficina */
.templates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .templates-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.template-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.template-card h3 {
  font-size: 0.95rem;
  color: var(--green-dark);
  margin: 0 0 0.4rem 0;
}

.template-card p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
}

.template-code-preview {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem;
  font-family: Consolas, monospace;
  font-size: .8rem;
  color: var(--ink);
  white-space: pre-wrap;
  max-height: 140px;
  overflow-y: auto;
  margin-bottom: 0.75rem;
}

.template-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
}

@media (max-width: 768px) {
  .progress-time-badge {
    display: none;
  }
  .progress-bar-wrap progress {
    width: 70px;
  }
}

/* devbrain-prose-contract:start */
/* Contrato 7.4: cada región ocupa su espacio y conserva sus controles. */
:where(p, dd, blockquote) {
    --text-align-reading: start;
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    text-align: var(--text-align-reading);
    text-align-last: start;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    -webkit-hyphens: none;
}
:where(dd, blockquote) { margin-inline: 0; }
/* devbrain-prose-contract:end */

/* css/analysis-lab.css */
.analysis-page { --lab-blue: #245e6c; --lab-warm: #b45425; }
.analysis-page > section { margin-block: 64px; scroll-margin-top: 100px; }
.analysis-page h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); line-height: 1.25; margin-block: 12px 20px; }
.analysis-page h3 { line-height: 1.35; }
.analysis-page p, .analysis-page li { line-height: var(--line-height-reading, 1.65); }
.analysis-page p {
  max-width: 100%;
  text-align:var(--text-align-reading, start);
  text-justify: var(--text-justify-reading, inter-word);
  hyphens:none;
  -webkit-hyphens:none;
  overflow-wrap: var(--overflow-wrap-reading, break-word);
}
.lab-hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: center; margin-block: 28px 40px; }
.lab-hero h1 { font-size: clamp(2.4rem, 4.4vw, 4.5rem); line-height: 1.12; letter-spacing: -.035em; margin-block: 0 24px; }
.lab-hero h1 em { color: var(--lab-blue); font-style: normal; }
.lab-hero-diagram { background: #e7eff0; padding: 30px; border: 1px solid #c8dadf; border-radius: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lab-hero-diagram > span { font-size: .83rem; font-weight: 750; background: #fff; border-radius: 10px; padding: 10px; }
.lab-hero-diagram > strong { grid-column: 1/-1; font-size: 1rem; line-height: 1.6; color: #244c55; }
.lab-sparkline { grid-column: 1/-1; display: flex; align-items: end; gap: 8px; height: 100px; margin-block: 10px; border-bottom: 1px solid #71939b; }
.lab-sparkline i { background: #417b88; flex: 1; height: 30%; border-radius: 5px 5px 0 0; }
.lab-sparkline i:nth-child(2n) { height: 55%; }.lab-sparkline i:nth-child(3n) { height: 80%; }.lab-sparkline i:last-child { height: 100%; background: #b46e43; }
.lab-actions, .lab-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.lab-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-block: 24px; }
.lab-card { min-width: 0; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.lab-card h3, .lab-card h2 { margin-top: 10px; }.lab-card p:last-child { margin-bottom: 0; }
.lab-route-grid h2 { font-size: 1.35rem; }
.lab-callout { padding: 20px 24px; background: #eaf1f2; color: #263f45; border-left: 4px solid #417b88; border-radius: 0 12px 12px 0; margin-block: 24px; overflow-wrap: anywhere; }
.lab-muted { color: var(--muted); font-size: .92rem; }
.lab-board { inline-size: 100%; max-inline-size: 100%; min-inline-size: 0; box-sizing: border-box; margin: 20px 0; padding: 12px; background: #fff; border: 1px solid #c8dadf; border-radius: 14px; }
.lab-board a { display: block; border-radius: 8px; }
.lab-board img { display: block; inline-size: 100%; block-size: auto; border-radius: 8px; }
.lab-board figcaption { margin-top: 10px; font-size: .9rem; color: var(--muted); }
.lab-index { display: flex; flex-wrap: wrap; gap: 10px; padding-block: 24px; border-block: 1px solid var(--line); margin-block: 32px; }
.lab-index a { display: block; padding: 10px 15px; border: 1px solid #c7d7d8; border-radius: 100px; font-size: .9rem; color: #245361; text-decoration: none; background: #fff; font-weight: 650; }
.lab-index a:hover { background: #e7eff0; }
.lab-steps { padding-left: 28px; }.lab-steps > li { margin-block: 20px; padding-left: 10px; }
.lab-prompt { white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; background: var(--green-dark); color: #f3f7f4; padding: 24px; border-radius: 12px; border: 0; max-width: 100%; line-height: 1.65; font-size: .95rem; margin-inline: 0; }
.lab-prompt code { white-space: inherit; font-size: inherit; color: inherit; background: transparent; }
.lab-table-wrap { overflow: auto; max-width: 100%; border: 1px solid #d4dfe1; border-radius: 10px; margin-block: 20px; }
.analysis-page table { width: 100%; border-collapse: collapse; font-size: .92rem; text-align: left; }
.analysis-page th { background: #e8eff1; color: #234751; }.analysis-page th, .analysis-page td { padding: 13px 16px; border-bottom: 1px solid #d7e1e3; vertical-align: top; min-width: 110px; }
.analysis-page tr:last-child td { border-bottom: 0; }.analysis-page caption { font-size: .85rem; text-align:var(--text-align-reading, start); padding: 12px 16px; color: var(--muted); }
.analysis-page table p { margin-top: 0; }.analysis-page a { overflow-wrap: break-word; }
.lab-explorer { border: 1px solid #b9d0d5; background: #fff; padding: clamp(18px, 3vw, 36px); border-radius: 22px; }
.lab-controls { display: flex; flex-wrap: wrap; gap: 18px; align-items: end; background: #f1f5f5; padding: 20px; border-radius: 12px; margin-block: 24px; }
.lab-controls label { display: flex; flex-direction: column; gap: 7px; font-size: .88rem; font-weight: 700; }
.lab-controls label[hidden] { display: none; }.lab-controls .lab-check { flex-direction: row; align-items: center; padding-block: 10px; }
.lab-controls select { background: #fff; border: 1px solid #91aeb4; border-radius: 8px; padding: 10px 32px 10px 10px; color: var(--ink); font: inherit; max-width: 100%; }
.lab-controls input { width: 18px; height: 18px; accent-color: #245e6c; }
#lab-chart { display: block; width: 100%; height: auto; min-height: 220px; color: #304851; }
.lab-axis-tick { font-size: 13px; fill: #344c53; }.lab-axis-title { font-size: 15px; fill: #244c55; font-weight: 700; }
.lab-legend { display: flex; flex-wrap: wrap; gap: 18px; }.lab-legend span { border-bottom: 4px solid; padding: 4px 0; font-size: .9rem; }
.lab-data-details > summary { font-weight: 750; cursor: pointer; padding: 18px 0; }
.lab-pagination button { border: 1px solid #91aeb4; padding: 10px 15px; background: #fff; border-radius: 8px; color: #245361; font: inherit; cursor: pointer; }.lab-pagination button:disabled { opacity: .45; cursor: default; }
.lab-pagination p { font-size: .85rem; }.lab-download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 16px; margin-block: 24px; }
.lab-download-grid a { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: #245361; }.lab-download-grid span { font-size: .88rem; color: var(--muted); }
.lab-resource-list li { margin-block: 10px; }.analysis-page :focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
.analysis-page code { overflow-wrap: anywhere; }.analysis-page details:not(.lab-data-details) { margin-block: 20px; }.analysis-page details > summary { cursor: pointer; font-weight: 700; }
@media (max-width: 850px) { .lab-hero { grid-template-columns: 1fr; gap: 22px; }.lab-hero-diagram { display: none; }.lab-grid { grid-template-columns: 1fr; }.lab-card { padding: 20px; }.analysis-page > section { margin-block: 42px; } }
@media (max-width: 520px) { .lab-controls { display: grid; grid-template-columns: 1fr; }.lab-controls select { width: 100%; }.lab-explorer { padding: 15px; }.lab-prompt { padding: 18px; font-size: .88rem; }.lab-steps { padding-left: 20px; }.lab-steps > li { padding-left: 2px; }.lab-index { gap: 8px; }.lab-index a { padding: 8px 12px; } }
@media print {
  .lab-controls, .lab-pagination, .lab-actions, .lab-index { display: none; }
  .analysis-page > section, .lab-grid { break-inside: auto; }
  .lab-hero { grid-template-columns: 1fr; }
  .lab-hero-diagram { display: none; }
  .lab-prompt { background: #f4f4f4; color: #111; border: 1px solid #bbb; }
  .lab-card, .lab-callout { box-shadow: none !important; break-inside: avoid; }
}

/* devbrain-prose-contract:start */
/* Contrato 7.4: cada región ocupa su espacio y conserva sus controles. */
:where(p, dd, blockquote) {
    --text-align-reading: start;
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    text-align: var(--text-align-reading);
    text-align-last: start;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    -webkit-hyphens: none;
}
:where(dd, blockquote) { margin-inline: 0; }
/* devbrain-prose-contract:end */

/* css/analysis-results.css */
.lab-result { margin-block: 32px; padding: 20px; border: 1px solid var(--line); border-top: 4px solid var(--lab-blue); border-radius: 16px; background: var(--paper); scroll-margin-top: 100px; }
.lab-result-steps { padding-left: 24px; }.lab-result-steps li { margin-block: 9px; padding-left: 4px; }
.lab-result-guide { margin-block: 20px !important; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.lab-result-guide summary { padding: 8px 0; color: var(--green-dark); }.lab-result-guide[open] summary { margin-bottom: 8px; }
.lab-result-guide p { margin-bottom: 4px; font-size: .93rem; }
.lab-result *, .lab-result *::before { box-sizing: border-box; min-width: 0; }
.lab-result h3 { font-size: 1.4rem; }.lab-result h4 { font-size: 1.15rem; margin-block: 24px 16px; }
.lab-result .lab-controls { padding: 16px; background: var(--surface); align-items: end; }
.lab-result .lab-controls > label { flex: 1 1 160px; }
.lab-result .lab-controls select, .lab-result .lab-controls input { width: 100%; max-width: 100%; min-height: 44px; height: auto; padding: 10px 12px; border: 1px solid #91aeb4; border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.lab-result .button { min-height: 44px; white-space: normal; }
.lab-result [hidden] { display: none; }
.lab-result [data-result-output] { overflow-wrap: anywhere; }
.result-metrics { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 20px 0; }
.result-metrics > div { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.result-metrics dt { color: var(--muted); font-size: .85rem; line-height: 1.5; }
.result-metrics dd { margin: 8px 0 0; color: var(--green-dark); font-size: 1.25rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.result-chart { margin: 24px 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.result-chart figcaption { font-weight: 750; }.result-chart > p { font-size: .83rem; }
.result-bars { list-style: none; margin: 16px 0 0; padding: 0; }
.result-bars > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; align-items: center; padding-block: 7px; font-size: .85rem; }
.result-bars strong { grid-column: 2; grid-row: 1; font-variant-numeric: tabular-nums; text-align: right; }
.result-bar-label { overflow-wrap: anywhere; }.result-bar-track { grid-column: 1/-1; grid-row: 2; position: relative; display: block; height: 15px; background: var(--paper); border-radius: 3px; }
.result-bar-track::before { content: ''; position: absolute; left: var(--result-zero); height: 100%; border-left: 1px solid var(--muted); }
.result-bar-track i { position: absolute; top: 0; display: block; height: 100%; background: var(--lab-blue); border-radius: 3px; }
.result-donut { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: center; margin: 24px 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.result-donut figcaption { font-weight: 750; }
.result-donut svg { inline-size: min(180px, 100%); block-size: auto; }
.result-donut circle { stroke: #156b8a; }.result-donut ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; }
.result-donut li { display: flex; gap: 10px; align-items: baseline; font-variant-numeric: tabular-nums; }
.result-donut li::before { content: ''; flex: none; inline-size: 12px; block-size: 12px; border-radius: 3px; background: #156b8a; }
.result-donut [data-part="1"] { stroke: #c07a1a; }.result-donut li[data-part="1"]::before { background: #c07a1a; }
.result-donut [data-part="2"] { stroke: #75439a; }.result-donut li[data-part="2"]::before { background: #75439a; }
.result-donut [data-part="3"] { stroke: #3b7d4f; }.result-donut li[data-part="3"]::before { background: #3b7d4f; }
.result-donut [data-part="4"] { stroke: #5b6770; }.result-donut li[data-part="4"]::before { background: #5b6770; }
@media (min-width: 640px) { .result-donut { grid-template-columns: 180px minmax(0, 1fr); }.result-donut figcaption { grid-column: 1/-1; } }
.result-data summary { padding-block: 14px; }.result-data .lab-table-wrap { max-height: 420px; }
.result-claim { margin: 24px 0; padding: 20px; border-left: 4px solid var(--lab-blue); background: var(--surface); line-height: 1.75; }
.result-error { padding: 20px; border: 1px solid #a13c29; border-left-width: 4px; border-radius: 10px; color: #812c1e; background: #fff5f2; }
.result-skeleton { padding: 20px; border-radius: 12px; background: var(--surface); animation: result-pulse 1.8s ease-in-out infinite; }
@keyframes result-pulse { 50% { opacity: .6; } }
@media (min-width: 640px) {
  .lab-result { padding: 24px; }.result-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .result-bars > li { grid-template-columns: minmax(110px, 1.2fr) minmax(0, 3fr) minmax(55px, auto); gap: 16px; }
  .result-bar-track { grid-column: 2; grid-row: 1; }.result-bars strong { grid-column: 3; }
}
@media (max-width: 520px) { .lab-result { padding: 16px; }.lab-result .lab-controls > label { flex-basis: auto; }.lab-result .lab-actions > .button { width: 100%; }.result-chart { padding: 12px; } }
@media (prefers-reduced-motion: reduce) { .result-skeleton { animation: none; } }
@media print { .lab-result .lab-actions, .lab-result [data-result-status] { display: none; }.result-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }.lab-result { break-inside: auto; background: #fff; }.result-metrics > div { break-inside: avoid; } }

/* devbrain-prose-contract:start */
/* Contrato 7.4: cada región ocupa su espacio y conserva sus controles. */
:where(p, dd, blockquote) {
    --text-align-reading: start;
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    text-align: var(--text-align-reading);
    text-align-last: start;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    -webkit-hyphens: none;
}
:where(dd, blockquote) { margin-inline: 0; }
/* devbrain-prose-contract:end */

/* css/guided-experience.css */
/* Un recorrido breve y una práctica por etapas, sobre los componentes del aula. */
.lesson-panel { min-width: 0; container-type: inline-size; container-name: lesson-panel; }
.module-brief { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; background: var(--surface); border: 1px solid #d7e1dc; border-radius: 18px; padding: clamp(20px, 3vw, 36px); box-shadow: 0 5px 20px #234b3f05; }
.module-brief > * { min-width: 0; }
.brief-lead { min-width: 0; container-type: inline-size; }
.brief-lead > h2 { margin: 8px 0 14px; max-width: 32ch; font-size: clamp(1.45rem, 2.3vw, 2rem); }
.brief-lead > p { width: 100%; max-width:100%; color: #455b53; text-align:var(--text-align-reading, start); }
.module-brief > .button { margin-top: 22px; }
.module-concept-map { display: grid; width: 100%; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; padding: 0; margin: 28px 0; }
.module-concept-map li { display: flex; gap: 12px; position: relative; align-items: flex-start; }
.module-concept-map li > span { display: grid; place-items: center; flex: 0 0 30px; height: 30px; background: #e6eee9; color: var(--green); border: 1px solid #cdded4; border-radius: 50%; font-size: .8rem; font-weight: 700; }
.module-concept-map li:not(:last-child)::after { content: '→'; color: var(--decor-muted); position: absolute; right: -14px; top: 2px; }
.module-concept-map strong { display: block; font-size: .95rem; color: #234b3f; }
.module-concept-map p { width: 100%; margin-top: 4px; font-size: .86rem; color: #52655d; line-height: 1.55; text-align:var(--text-align-reading, start); }
.brief-product { display: flex; gap: 12px; padding: 17px 20px; border: 1px solid #d6e5da; border-radius: 10px; background: #f0f5ed; }
.brief-product > span { color: var(--green); font-size: 1.4rem; }
.brief-product strong { color: var(--green); font-size: .8rem; }
.brief-product p { font-size: .95rem; line-height: 1.55; margin-top: 4px; }
.brief-review { padding-left: 15px; margin-top: 22px; border-left: 3px solid #88a29b; }
.brief-review strong { font-size: .8rem; color: #49645b; }
.brief-review p { font-size: .9rem; margin-top: 4px; max-width:100%; }
.reference-library { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; margin: 20px 0 28px; }
.reference-library > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; cursor: pointer; list-style: none; color: #2b5144; }
.reference-library > summary::-webkit-details-marker { display: none; }
.reference-library > summary strong { display: block; font-size: .95rem; }
.reference-library > summary small { display: block; font-size: .8rem; font-weight: 400; color: #53685e; margin-top: 4px; }
.reference-library > summary > span:last-child { font-size: 1.5rem; }
.reference-library[open] > summary { border-bottom: 1px solid var(--line); }
.reference-library[open] > summary > span:last-child { transform: rotate(45deg); }
.reference-content { padding: clamp(12px, 2vw, 24px); }
.reference-content .learning-start { box-shadow: none; }
.module-explanation { display: flex; flex-direction: column; gap: 28px; inline-size: 100%; min-inline-size: 0; margin: 24px 0; }
.module-explanation > * { inline-size: 100%; min-width: 0; margin-block: 0; }
.module-explanation > .module-reading { inline-size: 100%; min-width: 0; }
.module-reading > * + * { margin-block-start: 24px; }
.module-explanation > .productivity-lesson { inline-size: 100%; min-width: 0; }
.module-explanation p { inline-size: 100%; min-width: 0; text-align:var(--text-align-reading, start); white-space: normal; word-break: normal; }
#metodo-comun { scroll-margin-top: var(--sticky-offset); }
#metodo-comun ol { display: grid; gap: 14px; padding-inline-start: 24px; }
#metodo-comun li { min-width: 0; line-height: 1.7; }
.challenge-map { background: #eaf1ec; border: 1px solid #d4e0d8; border-radius: 16px; padding: 22px; margin: 22px 0 28px; }
.challenge-shared-materials { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: clamp(18px, 3vw, 32px); padding: clamp(18px, 3vw, 30px); margin: 20px 0 28px; border: 1px solid #cddfd2; border-radius: 16px; background: linear-gradient(115deg, #edf5ed, #f8faf5 70%); }
.challenge-shared-materials > * { min-width: 0; }
.challenge-shared-materials h2 { margin: 8px 0; font-size: clamp(1.25rem, 2.1vw, 1.75rem); }
.challenge-shared-materials p { width: 100%; color: #455b53; }
.challenge-shared-materials .button { margin-top: 14px; }
.challenge-shared-materials details { padding: 0; border: 0; background: transparent; }
.challenge-shared-materials details > summary { min-height: 44px; color: #2e5948; font-weight: 650; cursor: pointer; }
.challenge-shared-materials details > ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 0 0 20px; margin: 0; }
.challenge-shared-materials details li { min-width: 0; padding: 11px 12px; border: 1px solid #d4e1d8; border-radius: 9px; background: #fff; }
.challenge-shared-materials details li strong, .challenge-shared-materials details li code, .challenge-shared-materials details li span { display: block; }
.challenge-shared-materials details li code { margin: 4px 0; font-size: .8rem; }
.challenge-shared-materials details li span { color: #53665a; font-size: .8rem; }
.challenge-map-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; font-size: .8rem; color: #456052; }
.challenge-map-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.challenge-map-card { display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 16px; border: 1px solid #d2ded6; border-radius: 10px; color: var(--ink); background: var(--surface); }
.challenge-map-card:hover { border-color: #7d9e89; box-shadow: 0 3px 9px #234b3f0c; }
.challenge-map-card > span:nth-child(2) { flex: 1; min-width: 0; }
.challenge-map-card strong { display: block; font-size: .9rem; line-height: 1.4; }
.challenge-map-card small { display: block; margin-top: 6px; font-size: .8rem; font-weight: 400; color: #52655a; line-height: 1.55; }
.challenge-map-number { font-size: .8rem; color: #5f7969; font-weight: 700; padding-top: 2px; }
.challenge-map > p { font-size: .8rem; color: #4d6658; margin-top: 14px; }
.challenge-card { scroll-margin-top: var(--sticky-offset); border-radius: 16px; }
/* La prueba individual sigue a los retos con su propio encargo. */
.individual-test { margin: 24px 0; padding: clamp(18px, 2.5vw, 26px); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 16px; background: var(--surface); scroll-margin-top: var(--sticky-offset); }
.individual-test h3 { margin: 6px 0 10px; }
.individual-test-steps { display: grid; gap: 6px; padding-inline-start: 22px; }
.individual-test-note { color: var(--muted); font-size: .9rem; }
.challenge-card > details > summary { padding: 22px 24px; }
.challenge-card > details[open] > summary { background: #f3f6f0; border-bottom: 1px solid #d8e2d7; }
.challenge-body { padding: clamp(16px, 2.5vw, 28px); }
.challenge-result { padding-bottom: 20px; }
.challenge-result .eyebrow { font-size: .8rem; }
.challenge-result > p { font-size: 1.05rem; font-weight: 600; line-height: 1.5; color: #244b3a; margin-top: 8px; max-width:100%; }
[data-challenge-guide] { scroll-margin-top: var(--sticky-offset); }
.challenge-stage-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 5px; gap: 4px; background: #eef2ed; border: 1px solid #d7e0d5; border-radius: 12px; margin-bottom: 8px; }
.challenge-stage-nav button { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; padding: 12px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #506351; font-size: .83rem; font-weight: 600; }
.challenge-stage-nav button > span { display: inline-grid; place-items: center; flex: 0 0 22px; height: 22px; border-radius: 50%; border: 1px solid #c3d1c0; font-size: .8rem; }
.challenge-stage-nav button[aria-current="step"] { color: #fff; background: var(--green); box-shadow: 0 2px 4px #1b453b1a; }
.challenge-stage-nav button[aria-current="step"] > span { border-color: #9ab8a6; }
.challenge-stage-status { font-size: .8rem; color: #586c5e; min-height: 25px; margin: 8px 0 24px; }
.challenge-stage { min-width: 0; }
.challenge-stage > h4 { font-size: 1.1rem; padding-bottom: 14px; margin: 0 0 20px; border-bottom: 1px solid #e0e6dc; }
.challenge-stage > h4 span { color: var(--text-accent-muted); font-weight: 500; }
.challenge-stage > p { line-height: 1.75; max-width:100%; }
.challenge-stage > * + * { margin-top: 18px; }
.challenge-stage > ol { padding-left: 24px; display: grid; gap: 16px; }
.challenge-stage > ol li { padding-left: 6px; max-width:100%; }
.challenge-stage > ol li::marker { color: var(--green); font-weight: 700; }
.challenge-stage .challenge-materials { margin: 0; border-top: 0; padding-top: 0; }
.challenge-stage .challenge-materials-heading > p { font-size: .9rem; }
.challenge-stage .challenge-package { background: #edf4ea; border: 1px solid #cadbc4; border-radius: 10px; }
.challenge-stage .challenge-material-item { background: #fafbf8; border-radius: 10px; }
.challenge-stage .challenge-material-list { margin-top: 16px; }
.challenge-stage .challenge-material-kind { color: #44643e; }
.challenge-stage .prompt-bubble { padding: 22px; border-left: 3px solid #678d7b; border-radius: 0 10px 10px 0; background: #f0f5f3; font-size: .95rem; line-height: 1.8; }
@media (min-width: 1100px) {
  .challenge-stage[data-challenge-stage="2"] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, .9fr); align-items: start; column-gap: clamp(22px, 3vw, 40px); }
  .challenge-stage[data-challenge-stage="2"] > h4 { grid-column: 1 / -1; }
  .challenge-stage[data-challenge-stage="2"] > .stage-main { grid-column: 1; }
  .challenge-stage[data-challenge-stage="2"] > .stage-support { grid-column: 2; }
  .challenge-stage[data-challenge-stage="2"] > .stage-support > details:first-child { margin-top: 0; }
}
.output-preview { margin: 24px 0 8px; border: 1px solid #cddcd3; border-radius: 12px; overflow: hidden; }
.output-preview table { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0; font-size: .87rem; }
.output-preview caption { background: #e9f0eb; color: #2c5140; text-align: left; padding: 14px 18px; font-size: .8rem; font-weight: 650; caption-side: top; }
.output-preview th { width: 130px; text-align: left; color: #41604c; font-weight: 600; background: #f5f8f2; }
.output-preview th, .output-preview td { padding: 14px 18px; vertical-align: top; border: 0; border-top: 1px solid #dee7de; overflow-wrap: anywhere; }
.output-preview td { background: #fff; line-height: 1.65; }
.challenge-stage-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid #dce4d7; }
.challenge-stage-actions > span { font-size: .8rem; color: #586c5e; text-align: center; }
.challenge-stage-actions .button-secondary { background: var(--surface); border: 1px solid #bdcdbb; color: #365b40; }
.challenge-stage-actions .button { font-size: .84rem; padding: 10px 15px; }
.challenge-stage-actions button:disabled { opacity: .45; }
.stage-save-tip { padding: 18px 20px; border: 1px solid #d5e2ce; background: #f2f6ed; border-radius: 10px; }
.stage-office-step, .stage-crtt-tip { margin-top: 16px; padding: 16px 20px; border: 1px solid #d5dfdf; border-left: 3px solid #4f7f80; background: #f3f7f7; border-radius: 0 10px 10px 0; }
.stage-crtt-tip { margin: 0 0 16px; }
.stage-documents { margin-top: 24px; padding: 18px; border: 1px solid #d5dfdf; border-radius: 10px; background: #f3f7f7; }
.stage-documents strong { font-size: .85rem; color: #365a5b; }
.stage-documents p { font-size: .82rem; color: #52696a; margin-top: 4px; }
.stage-documents a { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; padding: 9px 0; font-size: .85rem; border-bottom: 1px solid #d9e4e2; text-decoration: none; }
.stage-documents a:last-child { border-bottom: 0; }
.lesson-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  background: var(--paper);
  z-index: 15;
  inline-size: 100%;
  box-sizing: border-box;
}
.lesson-tabs button {
  inline-size: 100%;
  justify-content: center;
}
.lesson-panel > .panel-heading p { max-width:100%; }
.optional-lab-entry { padding: 18px 24px; font-size: .9rem; }
.lesson-visual { margin: 24px 0; border: 1px solid #d8e2dc; border-radius: 12px; overflow: hidden; background: #f9fbf7; }
.lesson-visual > figcaption { font-size: .8rem; font-weight: 650; color: #325847; padding: 13px 18px; border-bottom: 1px solid #d8e2dc; background: #edf3ec; }
.lesson-visual > p { padding: 0 18px 16px; margin-top: 14px; color: #526458; font-size: .8rem; }
.choice-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-options > div { padding: 18px; border-top: 3px solid #829f72; }
.choice-options > div:nth-child(2) { background: #f0f5f8; border-color: #6c8eac; }
.choice-options > div:nth-child(3) { background: #f8f4eb; border-color: #b19765; }
.visual-tag { display: block; color: #50674b; font-size: .8rem; text-transform: uppercase; font-weight: 700; letter-spacing: .05em; margin-bottom: 8px; }
.choice-options strong { display: block; font-size: .9rem; line-height: 1.5; }
.choice-options p { font-size: .8rem; line-height: 1.6; color: #4f6357; margin-top: 8px; }
.prompt-before, .prompt-after { margin: 16px 18px; }
.prompt-before { border-left: 3px solid #b5a78a; padding-left: 14px; color: #665c4b; }
.prompt-before > span { font-size: .8rem; }
.prompt-before p, .prompt-after p { font-size: .85rem; line-height: 1.65; }
.prompt-parts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px; }
.prompt-parts > span { flex: 1; padding: 7px; border: 1px solid #cbdcc9; background: #e9f2e4; border-radius: 5px; text-align: center; font-size: .8rem; font-weight: 600; }
.prompt-after { padding: 15px; border: 1px solid #d6e4d2; background: #f1f6ec; border-radius: 8px; }
.prompt-after strong { font-size: .8rem; color: #32593c; }
.prompt-after p { margin-top: 6px; }
.trace-visual dl { padding: 0 18px; margin: 0; }
.trace-visual dl > div { display: flex; align-items: baseline; gap: 20px; padding: 13px 0; border-bottom: 1px solid #e1e8df; }
.trace-visual dt { flex: 0 0 64px; font-size: .8rem; color: #49654d; font-weight: 600; }
.trace-visual dd { margin: 0; font-size: .85rem; line-height: 1.7; }
.trace-visual code { background: #e9eee5; border-radius: 4px; padding: 3px 6px; font-size: .8rem; }
.rate-equation { display: flex; align-items: center; justify-content: space-evenly; gap: 12px; padding: 22px 18px; }
.rate-equation > span { text-align: center; }
.rate-equation strong { display: block; font-size: 1.6rem; font-weight: 650; color: #335947; }
.rate-equation small { display: block; font-size: .8rem; color: #5d7062; }
.rate-equation b { font-size: .9rem; color: #57705d; font-weight: 500; }
.rate-answer { background: #e5efdf; border-radius: 8px; padding: 7px 14px; }
.rate-track { margin: 0 18px; height: 14px; border: 1px solid #c6d8c8; border-radius: 4px; background: repeating-linear-gradient(to right, #e5eee3 0%, #e5eee3 9.8%, #fafbf7 9.8%, #fafbf7 10%); overflow: hidden; }
.rate-track > span { display: block; width: 5%; height: 100%; background: #406d50; }
.pilot-visual ol { padding: 18px; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; }
.pilot-visual li { padding-left: 12px; border-left: 3px solid #b0c5ab; }
.pilot-visual li > span { display: block; font-size: .8rem; font-weight: 650; color: #56734e; margin-bottom: 6px; }
.pilot-visual strong { font-size: .85rem; line-height: 1.5; display: block; }
.pilot-visual li p { font-size: .8rem; margin-top: 6px; color: #53674f; }
.individual-files, .file-help-inline { border: 1px solid #d9e3d4; border-radius: 9px; background: #fafbf7; margin-top: 16px; }
.individual-files > summary, .file-help-inline > summary { padding: 13px 16px; color: #3f6246; font-size: .83rem; font-weight: 600; cursor: pointer; }
.individual-files .challenge-material-list { padding: 0 12px 12px; }
.file-help-inline > ol { padding: 0 28px 10px 38px; font-size: .85rem; color: #4d6351; }
.file-help-inline li { padding: 6px 0; }
@container lesson-panel (min-width: 58rem) {
  .module-brief { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: clamp(24px, 4cqi, 64px); }
  .module-brief > .brief-lead { grid-column: 1; grid-row: 1; }
  .module-brief > .module-concept-map { grid-column: 2; grid-row: 1; align-self: center; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; }
  .module-brief > .module-concept-map li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
  .module-brief > .module-concept-map li:not(:last-child)::after { content: '↓'; top: 32px; right: auto; left: 9px; }
  .module-brief > :is(.lesson-visual, .brief-product, .brief-review, .button) { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .lesson-tabs { position: sticky; top: var(--topbar-h); padding-top: 10px; }
}
@media (max-width: 680px) {
  .choice-options, .pilot-visual ol { grid-template-columns: 1fr; }
  .choice-options > div { padding: 15px 18px; }
  .rate-equation { gap: 7px; padding: 18px 12px; flex-wrap: wrap; }
  .rate-equation strong { font-size: 1.3rem; }
  .rate-equation small { font-size: .8rem; }
  .rate-answer { padding: 6px 10px; }
  .module-concept-map { grid-template-columns: 1fr; gap: 16px; margin: 22px 0; }
  .module-concept-map li:not(:last-child)::after { content: ''; }
  .challenge-shared-materials { grid-template-columns: minmax(0, 1fr); }
  .challenge-shared-materials details > ul { grid-template-columns: minmax(0, 1fr); }
  .challenge-map-grid { grid-template-columns: 1fr; }
  .challenge-map { padding: 16px; }
  .challenge-map-card { padding: 14px; }
  .challenge-card > details > summary { padding: 18px 16px; }
  .challenge-stage-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .challenge-stage-nav button { justify-content: flex-start; padding: 10px; }
  .challenge-stage-actions { flex-wrap: wrap; gap: 10px; }
  .challenge-stage-actions > span { flex-basis: 100%; order: 3; }
  .challenge-stage-actions .button { flex: 1; font-size: .8rem; padding: 10px 8px; }
  .output-preview th { width: 88px; }
  .output-preview th, .output-preview td { padding: 12px; font-size: .8rem; }
  .reference-library > summary { padding: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .reference-library > summary > span:last-child { transition: none; }
}
@media print {
  .challenge-stage[hidden] { display: block !important; }
  .challenge-stage-nav, .challenge-stage-actions, .challenge-map { display: none !important; }
  .module-brief, .output-preview { break-inside: avoid; box-shadow: none; }
}
/* ==========================================================================
   Situaciones de oficina, aprendizaje con IA y manual del portafolio
   ========================================================================== */
.office-situations-selector, .learning-ai-section, .office-manual-section {
  margin: 36px 0;
  padding: clamp(20px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}
.office-situations-selector { container-type: inline-size; container-name: situations; }
.office-situations-selector .section-title, .learning-ai-section .section-title { margin-bottom: 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.situation-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.situation-filter-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--green); font-size: .875rem; font-weight: 600; cursor: pointer; }
.situation-filter-btn:hover { border-color: #8aa898; }
.situation-filter-btn[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--surface); }
.filter-count { display: inline-grid; place-items: center; min-width: 24px; padding: 0 6px; border-radius: 999px; background: var(--soft); color: var(--green); font-size: .8rem; }
.situation-filter-btn[aria-pressed="true"] .filter-count { background: var(--surface); }

.office-selector-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.situation-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.situation-list > li { min-width: 0; }
.situation-picker-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; align-items: start; width: 100%; height: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-align: start; cursor: pointer; }
.situation-picker-card:hover { border-color: #8aa898; }
.situation-picker-card[aria-pressed="true"] { border-color: var(--green); background: var(--soft); box-shadow: inset 4px 0 0 var(--green); }
.situation-picker-card:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.picker-card-icon { grid-row: span 3; display: inline-grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; background: #e6efe9; color: var(--green); }
.picker-card-icon svg { width: 20px; height: 20px; }
.picker-card-category { color: var(--text-accent-muted); font-size: .8rem; font-weight: 700; }
.picker-card-title { font-size: .95rem; font-weight: 650; line-height: 1.35; }
.picker-card-action { color: var(--green); font-size: .8rem; font-weight: 600; }

.situation-detail-panel { min-width: 0; padding: clamp(18px, 2.5vw, 26px); border: 1px solid var(--line); border-radius: 14px; background: #fbfcfa; }
.office-selector:not(.is-enhanced) .situation-detail-panel + .situation-detail-panel { margin-top: 16px; }
.detail-panel-header { display: grid; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.detail-category-badge { color: var(--text-accent-muted); font-size: .8rem; font-weight: 700; letter-spacing: .04em; }
.situation-detail-panel :is(h3, h4)[id^="detail-title"], .manual-item-card > header :is(h3, h4) { margin: 0; color: var(--green-dark); font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.3; }
.detail-lead { margin: 0; color: var(--ink); }
.detail-product { margin: 0; color: var(--muted); font-size: .9rem; }
.detail-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 16px 0; }
.detail-facts > div { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-top: 3px solid var(--fact-accent, var(--green)); border-radius: 10px; background: var(--surface); }
.detail-facts .fact-care { --fact-accent: #c48a1c; }
.detail-facts .fact-accuracy { --fact-accent: var(--sena-primary); }
.detail-facts dt { margin-bottom: 4px; color: var(--green); font-size: .8rem; font-weight: 700; }
.detail-facts dd { margin: 0; font-size: .9rem; line-height: 1.55; }
.detail-sample { margin: 0 0 16px; padding: 12px 14px; border-left: 3px solid var(--green); border-radius: 8px; background: var(--soft); }
.detail-sample h4 { margin: 0 0 4px; color: var(--green); font-size: .8rem; }
.detail-sample p { margin: 0; font-size: .9rem; }
.detail-prompt-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.detail-prompt-head h4 { margin: 0; font-size: 1rem; }
.situation-prompt { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: .85rem; line-height: 1.6; }
.detail-practice { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: .9rem; }
.detail-practice > span { color: var(--muted); }
.detail-practice a { color: var(--green); font-weight: 650; }

@container situations (min-width: 58rem) {
  .office-selector-layout { grid-template-columns: minmax(15rem, .8fr) minmax(0, 1.6fr); }
  .situation-list { grid-template-columns: minmax(0, 1fr); }
  .selector-detail-col { position: sticky; top: calc(var(--topbar-h) + 12px); }
}

.learning-ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 16px; }
.learning-ai-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfa; }
.learning-ai-card > h3 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 1.05rem; }
.learning-ai-card > p { margin: 0; }
.learning-ai-care { color: var(--muted); font-size: .9rem; }
.learning-ai-example > summary { display: flex; align-items: center; min-height: 44px; color: var(--green); font-weight: 600; cursor: pointer; }
.learning-ai-example > p { margin: 8px 0 0; font-size: .9rem; }
.learning-ai-answer { margin-top: 10px; padding: 12px 14px; border-radius: 8px; background: var(--soft); font-size: .9rem; }
.learning-ai-answer > strong { display: block; color: var(--green); font-size: .8rem; }
.learning-ai-answer p { margin: 6px 0 0; }
.learning-ai-card .detail-practice { margin-top: auto; }

.manual-section-head { margin-bottom: 16px; }
.manual-section-head h2 { margin: 6px 0 8px; }
.manual-section-head p { margin: 0; }
.manual-toolbar-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.manual-group + .manual-group { margin-top: 32px; }
.manual-group > h3 { margin: 0 0 14px; font-size: 1.15rem; }
.manual-items-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 16px; align-items: start; }

/* ==========================================================================
   Paneles Didácticos: Brújula, Prompts 2 Clics, Estándar de Oro y Transferencia
   ========================================================================== */
.decision-compass-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 12px;
  margin: 18px 0;
  padding: 18px;
  background: #edf5f0;
  border: 1px solid #cadfd2;
  border-radius: 14px;
}

.decision-compass-step {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid #d4e4da;
  border-radius: 10px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.decision-compass-step .step-number {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 4px;
}

.decision-compass-step strong {
  color: #1a3c30;
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.decision-compass-step p {
  margin: 0;
  color: #4a6356;
}

.prompt-2clicks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  margin: 20px 0;
}

.prompt-2clicks-card {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid #d2e4d8;
  background: #fafcfb;
}

.prompt-2clicks-card.card-secure {
  border-left: 4px solid var(--green);
}

.prompt-2clicks-card.card-production {
  border-left: 4px solid var(--sena-primary);
}

.prompt-2clicks-card .card-step-badge {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #2e5948;
  margin-bottom: 6px;
}

.prompt-2clicks-card h4 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: #1b3a2f;
}

.prompt-2clicks-card p {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: #4c6659;
  line-height: 1.55;
}

.prompt-2clicks-card .button {
  margin-top: auto;
}

.gold-vs-antipattern-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  margin: 20px 0;
}

.gold-vs-antipattern-panel .gold-card {
  padding: 18px 20px;
  background: #f2f8f4;
  border: 1px solid #cde5d5;
  border-left: 4px solid var(--green);
  border-radius: 12px;
}

.gold-vs-antipattern-panel .antipattern-card {
  padding: 18px 20px;
  background: #fdf5f2;
  border: 1px solid #f2d5cc;
  border-left: 4px solid #b84c31;
  border-radius: 12px;
}

.gold-vs-antipattern-panel h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.gold-vs-antipattern-panel .gold-card h4 {
  color: #1a4533;
}

.gold-vs-antipattern-panel .antipattern-card h4 {
  color: #8c321b;
}

.gold-vs-antipattern-panel p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.gold-vs-antipattern-panel .gold-card p {
  color: #2b5442;
}

.gold-vs-antipattern-panel .antipattern-card p {
  color: #633327;
}

.office-transfer-panel {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  background: #f5f9f6;
  border: 1px solid #d4e4da;
  border-radius: 12px;
  margin: 20px 0;
}

.office-transfer-panel .transfer-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.office-transfer-panel .transfer-body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #385648;
}

.office-transfer-panel .transfer-body strong {
  display: block;
  font-size: 0.98rem;
  color: #1d4534;
  margin-bottom: 4px;
}

/* ==========================================================================
   Retos Guiados: Flujo Paso a Paso Limpio (Prueba, Construye, Revisa, Guarda)
   ========================================================================== */
.guided-try {
  background: #fbfdfa;
  border: 1px solid #dbe6d7;
  border-radius: 14px;
  padding: clamp(16px, 2.5vw, 24px);
  margin: 16px 0;
  box-shadow: 0 2px 8px rgba(34, 87, 70, 0.03);
}

.guided-try p {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 14px;
}

.guided-observe {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guided-observe li {
  padding: 12px 16px;
  background: #f4f8f2;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  color: #1e3b28;
  font-size: 0.92rem;
  line-height: 1.55;
  font-weight: 500;
}

.ai-task-guided {
  background: #ffffff;
  border: 1.5px solid #d4e2d0;
  border-radius: 16px;
  padding: clamp(18px, 3vw, 26px);
  margin: 18px 0;
  box-shadow: 0 4px 14px rgba(34, 87, 70, 0.04);
}

.ai-task-guided > h3 {
  margin: 6px 0 12px;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: #1b4535;
}

.guided-questions {
  list-style: none;
  padding: 0;
  counter-reset: guided-q;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.guided-questions > li {
  counter-increment: guided-q;
  padding: 12px 16px;
  background: #f8faf6;
  border: 1px solid #dfe7dc;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #203c2a;
}

.guided-questions > li strong {
  color: var(--green);
  margin-right: 6px;
}

details.guided-hints,
details.guided-hint {
  margin: 14px 0;
  padding: 12px 16px;
  background: #fbfdfa;
  border: 1px dashed #cadbc5;
  border-radius: 10px;
}

details.guided-hints summary,
details.guided-hint summary {
  color: var(--green);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px 0;
}

.guided-hints ol,
.guided-hint ol {
  margin: 10px 0 4px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #405745;
}

.guided-checks {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.guided-checks > li {
  padding: 14px 18px;
  background: #ffffff;
  border: 1.5px solid #dbe6d7;
  border-left: 5px solid #3c8d50;
  border-radius: 10px;
  font-size: 0.93rem;
  line-height: 1.6;
  color: #1f3a28;
}

.guided-checks > li strong {
  display: block;
  margin-bottom: 6px;
  color: #1a3c26;
}

details.guided-why {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2ebd8;
}

details.guided-why summary {
  color: #48724d;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

details.guided-why p {
  margin: 6px 0 0;
  font-size: 0.87rem;
  line-height: 1.55;
  color: #465c49;
}

details.guided-fixes-panel {
  margin: 18px 0;
  padding: 14px 18px;
  background: #fdfcf7;
  border: 1.5px solid #ecdcb9;
  border-radius: 12px;
}

details.guided-fixes-panel summary {
  color: #7a5009;
  font-weight: 650;
  font-size: 0.92rem;
  cursor: pointer;
}

.guided-fixes {
  list-style: none;
  padding: 0;
  margin: 14px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guided-fixes li {
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #ebdcb8;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #3b321c;
}

.guided-fixes li strong {
  color: #6d4200;
}

.guided-fixes li span {
  flex: 1 1 200px;
}

.guided-page {
  background: #f7fbf8;
  border: 1.5px solid #cfe0cb;
  border-radius: 14px;
  padding: clamp(16px, 2.5vw, 24px);
  margin: 16px 0;
}

.guided-page > p {
  font-size: 0.94rem;
  line-height: 1.65;
  color: #213d2b;
  margin-bottom: 14px;
}

.prompt-technical-detail {
  margin: 14px 0;
  padding: 10px 14px;
  background: #f8faf8;
  border: 1px solid #dce5d8;
  border-radius: 10px;
}

.prompt-technical-detail summary {
  font-size: 0.85rem;
  color: #55725c;
  cursor: pointer;
}

/* ==========================================================================
   Herramienta en Gemini Canvas (Evaluador y Constructor de Prompts)
   ========================================================================== */
.canvas-builder-card {
  margin: 28px 0;
  padding: clamp(20px, 3vw, 32px);
  background: #ffffff;
  border: 2px solid #b8d7b0;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(34, 87, 70, 0.06);
}

.canvas-builder-header h4 {
  margin: 6px 0 10px;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  color: var(--green);
}

.canvas-builder-header p {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 18px;
}

.canvas-tool-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
  margin: 20px 0;
}

.canvas-feature {
  padding: 16px;
  background: #f7faf5;
  border: 1px solid #dce6d8;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.canvas-feature strong {
  color: #1e3b28;
  font-size: 0.95rem;
}

.canvas-feature p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #405745;
}

.canvas-action-box {
  margin: 22px 0;
  padding: 20px;
  background: #eef6eb;
  border: 1px solid #c0dcb8;
  border-radius: 14px;
}

.canvas-action-box p {
  margin: 0 0 12px;
  color: #1f3d29;
  font-size: 0.95rem;
  line-height: 1.55;
}

details.canvas-prompt-preview {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed #cadbc5;
}

details.canvas-prompt-preview summary {
  color: var(--green);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.canvas-usage-steps {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #dce6d8;
}

.canvas-usage-steps h5 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: #21432f;
}

.canvas-usage-steps ol {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #384e3d;
}

.canvas-bridge-tip {
  margin: 18px 0;
  padding: 16px 18px;
  background: #f4faf2;
  border: 1px solid #c2dec0;
  border-left: 4px solid var(--green);
  border-radius: 12px;
}

.canvas-bridge-tip p {
  margin: 0 0 10px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #1e3d29;
}

.canvas-bridge-tip .prompt-template {
  margin: 8px 0 0;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #d4e5d2;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #264330;
  white-space: pre-wrap;
}

/* devbrain-prose-contract:start */
/* Contrato 7.4: cada región ocupa su espacio y conserva sus controles. */
:where(p, dd, blockquote) {
    --text-align-reading: start;
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    text-align: var(--text-align-reading);
    text-align-last: start;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    -webkit-hyphens: none;
}
:where(dd, blockquote) { margin-inline: 0; }
/* devbrain-prose-contract:end */

/* css/ai-workflow.css */
/* Aprender con un encargo y recibir un archivo: ninguna respuesta se vuelve a digitar. */
.ai-task-card { margin: 16px 0; padding: 24px; border: 1px solid #cfded5; border-radius: 14px; background: #f5f8f2; }
.ai-task-card h3 { font-size: 1.17rem; margin: 7px 0 12px; color: #234f3e; }
.ai-task-output { font-size: .95rem; max-width: 100%; }
.ai-task-output strong { color: #315e41; }
.ai-task-action { max-width: 100%; font-size: .85rem; color: #4d6255; margin-top: 10px; }
.ai-task-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ai-task-actions .button { min-height: 46px; font-size: .88rem; padding: 11px 16px; }
.ai-task-actions .button-secondary { background: #fff; border: 1px solid #aac3b0; color: #244f3b; }
.ai-task-downloads { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 14px; }
.ai-task-downloads a { display: inline-flex; align-items: center; min-height: 44px; font-size: .83rem; font-weight: 600; }
.ai-task-reference, .ai-task-variants { border-top: 1px solid #d4e1d4; margin-top: 10px; }
.ai-task-reference > summary, .ai-task-variants > summary { padding: 12px 0; cursor: pointer; font-size: .8rem; color: #46614c; }
.ai-task-reference > p { font-size: .8rem; margin: 12px 0; overflow-wrap: break-word; }
.ai-task-reference > pre.prompt-text { padding: 18px; border: 1px solid #d7e2d5; border-radius: 8px; background: #fff; white-space: pre-wrap; overflow-wrap: anywhere; font: .78rem/1.7 'Segoe UI', system-ui, sans-serif; }
.ai-task-reference > h4 { margin: 16px 0 10px; }
.ai-task-reference > a { display: inline-flex; align-items: center; min-height: 44px; font-size: .8rem; }
.ai-task-variants > div { display: grid; gap: 6px; }
.ai-task-variants a { min-height: 44px; padding: 10px 0; font-size: .82rem; }
.ai-task-technique { margin: 12px 0 0; padding: 12px 16px; border-left: 4px solid #39a900; border-radius: 6px; background: #eef6e6; font-size: .9rem; }
.coach-steps { display: grid; gap: 18px; margin: 18px 0 0; padding-left: 22px; }
.coach-steps > li { padding-left: 4px; }
.coach-steps > li > span { display: block; margin: 4px 0 10px; color: #415a4b; font-size: .9rem; }
.coach-text, .prompt-technical-detail { margin-top: 10px; }
.coach-text > summary, .prompt-technical-detail > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: #46614c; font-size: .82rem; }
.crtt-annotated { display: grid; gap: 10px; margin: 0; }
.crtt-annotated > div { display: grid; grid-template-columns: minmax(6.5rem, max-content) minmax(0, 1fr); gap: 4px 14px; padding: 12px 14px; border: 1px solid #d7e2d5; border-radius: 8px; background: #fff; }
.crtt-annotated dt { font-weight: 700; color: #234f3e; }
.crtt-annotated dd { margin: 0; }
.crtt-annotated dd small { display: block; margin-top: 4px; color: #55705e; font-size: .82rem; }
.crtt-checklist { display: grid; gap: 6px; margin: 0; padding-left: 20px; font-size: .9rem; }
/* La plantilla y la instrucción de referencia son texto natural: se ajustan al ancho en lugar de desplazarse como código. */
.prompt-template, .prompt-reference pre.prompt-text { padding: 16px 18px; border: 1px solid #d7e2d5; border-radius: 8px; background: #fff; white-space: pre-wrap; overflow-wrap: break-word; font: .85rem/1.7 'Segoe UI', system-ui, sans-serif; }
@media (max-width: 560px) { .crtt-annotated > div { grid-template-columns: minmax(0, 1fr); } }
.ai-source-reference { margin: 18px 0; border: 1px solid #d9e1d6; border-radius: 10px; background: #fcfdf9; }
.ai-source-reference > summary { padding: 14px 18px; cursor: pointer; color: #47654c; font-size: .84rem; font-weight: 600; }
.ai-source-reference > :not(summary) { margin: 18px; }
.ai-source-reference .challenge-materials { padding-top: 0; }
.challenge-stage .ai-task-card > .eyebrow,
.challenge-stage .ai-task-card > h3,
.challenge-stage .ai-task-card > .ai-task-output { display: none; }
.challenge-stage .ai-task-card > .ai-task-action { margin-top: 0; }
.ai-kit-primary { margin: 4px 0 14px; }
.challenge-stage > [data-ai-review-checks] { padding: 0; list-style: none; display: grid; gap: 12px; }
.challenge-stage > [data-ai-review-checks] > li { padding: 14px 18px 14px 45px; border: 1px solid #d5e3d1; border-radius: 10px; background: #f1f6ee; position: relative; font-size: .9rem; }
.challenge-stage > [data-ai-review-checks] > li::before { content: '✓'; position: absolute; left: 18px; color: #3d6c44; font-weight: 700; }
.challenge-stage > .prompt-text { font-size: .85rem; padding: 15px; background: #f0f4f6; border: 1px solid #d3e0e5; border-radius: 8px; }
.ai-delivery { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 22px; }
.delivery-heading, .ai-delivery > .ai-task-card { grid-column: 1 / -1; }
.delivery-heading h2 { margin: 8px 0 12px; max-width: 36ch; font-size: clamp(1.5rem, 2.2vw, 2rem); }
.delivery-heading > p { color: #4f6359; font-size: .93rem; max-width:100%; }
.ai-delivery > .ai-task-card { margin: 0; }
.delivery-receive, .delivery-review { padding: 24px; border: 1px solid #d4e0db; border-radius: 14px; min-width: 0; background: #fff; }
.delivery-step { font-size: .8rem; letter-spacing: .06em; font-weight: 700; color: #577766; }
.delivery-receive h3, .delivery-review h3 { margin: 7px 0 12px; font-size: 1.2rem; }
.delivery-receive > p, .delivery-review > p { font-size: .85rem; line-height: 1.7; max-width:100%; color: #4f6559; }
.delivery-file-label { display: block; margin: 20px 0 7px; color: #315744; font-size: .82rem; font-weight: 650; }
.delivery-receive input[type=file] { width: 100%; padding: 8px; border: 1px dashed #9fb9aa; border-radius: 9px; background: #f3f8f3; color: #405e4c; font-size: .82rem; min-height: 54px; }
.delivery-receive input[type=file]::file-selector-button { border: 0; border-radius: 6px; background: #245844; color: #fff; padding: 10px 12px; margin-right: 10px; font: inherit; cursor: pointer; }
.delivery-receive .delivery-local { margin-top: 9px; font-size: .8rem; color: #607269; }
.delivery-status { margin: 14px 0; padding: 12px; border-left: 3px solid #93ac99; background: #f5f8f3; font-size: .8rem; }
.delivery-status { overflow-wrap: anywhere; }
.delivery-status[data-state="error"] { border-color: #ad3838; background: #fff0ed; color: #792828; }
.delivery-status[data-state="success"] { border-color: #3c7a4c; background: #f0f8ed; color: #294c33; }
.delivery-status[data-state="loading"] { border-color: #5e798e; background: #f1f5fa; color: #344f67; }
.delivery-status[data-state="loading"]::before { content: ''; display: block; width: 40%; height: 6px; margin-bottom: 10px; border-radius: 4px; background: #c2d2df; animation: delivery-pulse 1.2s ease-in-out infinite alternate; }
@keyframes delivery-pulse { to { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .delivery-status[data-state="loading"]::before { animation: none; } }
.delivery-receive [hidden] { display: none !important; }
.result-preview { display: grid; gap: 8px; }
.result-topic { border: 1px solid #d8e3d9; border-radius: 8px; background: #fafbf8; }
.result-topic > summary { cursor: pointer; min-height: 44px; padding: 12px 14px; font-size: .84rem; color: #31533e; font-weight: 600; }
.result-topic > p { margin: 0; padding: 0 16px 16px; white-space: pre-wrap; overflow-wrap: break-word; font-size: .85rem; line-height: 1.75; }
.delivery-receive > .button, .delivery-review > .button { margin-top: 18px; width: 100%; font-size: .85rem; }
.delivery-criteria { border: 1px solid #d6e1d1; border-radius: 9px; background: #f6f9f3; margin-top: 18px; }
.delivery-criteria summary { padding: 13px 16px; cursor: pointer; color: #486447; font-size: .82rem; font-weight: 600; }
.delivery-criteria ul { padding: 0 24px 12px 36px; font-size: .82rem; line-height: 1.7; }
.delivery-criteria li + li { margin-top: 10px; }
.delivery-review > p { margin-top: 12px; font-size: .8rem; }
.delivery-downloads { display: grid; gap: 10px; margin-top: 20px; }
.delivery-downloads > .button { font-size: .82rem; border: 1px solid #bdd0c1; color: #315840; background: #f8faf5; }
.delivery-receive .button:disabled, .delivery-review .button:disabled { opacity: .5; }
.lesson-header .lesson-description { max-width:100%; }
[data-db-evidence-dossier] .evidence-form-card { display: none; }
.evidence-actions-bar { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.evidence-actions-bar button { min-height: 44px; padding: 12px 16px; background: #245844; color: #fff; border: 0; border-radius: 8px; cursor: pointer; }
.delivery-paste { margin: 18px 0; border: 1px solid #cbd8cf; border-radius: 8px; padding: 16px; }
.delivery-paste summary { cursor: pointer; min-height: 44px; font-weight: 600; }
.delivery-paste textarea { display: block; width: 100%; max-width: 100%; box-sizing: border-box; margin: 12px 0; padding: 12px; font: inherit; border: 1px solid #829b88; border-radius: 6px; }
.study-mode-switch { position: relative; flex: 0 0 auto; }
.checklist-toggle-btn { white-space: nowrap; flex-shrink: 0; }
.study-mode-switch > summary { cursor: pointer; list-style: none; min-height: 44px; padding: 12px; box-sizing: border-box; border: 1px solid #d3dfd0; border-radius: 8px; background: white; color: #245844; font-size: .8rem; }
.study-mode-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 100; width: min(370px, calc(100vw - 32px)); box-sizing: border-box; padding: 18px; background: #f0f5ec; border: 1px solid #b9ccb7; border-radius: 12px; box-shadow: 0 8px 24px #163a2424; }
.study-mode-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.study-mode-actions button { min-height: 44px; border: 1px solid #789780; background: white; color: #245844; padding: 9px 15px; border-radius: 8px; cursor: pointer; font: inherit; font-size: .85rem; }
.study-mode-actions button[aria-pressed="true"] { color: #fff; background: #245844; }
.study-mode-switch p { margin: 10px 0 0; max-width:100%; color: #395842; font-size: .84rem; }
.transfer-check { margin: 24px 0; padding: 24px; border: 1px solid #c8d8be; border-radius: 12px; background: #f3f7ee; }
.transfer-check summary { min-height: 44px; padding: 12px 0; cursor: pointer; }
body[data-learning-mode="autonomo"] #course-nav [data-module-link^="m0"] .nav-meta,
body[data-learning-mode="autonomo"] #course-nav [data-module-link="preparacion"] .nav-meta { display: none; }
@media (max-width: 600px) { .study-mode-panel { position: fixed; top: calc(var(--topbar-h) + 8px); right: 16px; } .study-mode-actions strong { flex-basis: 100%; } .study-mode-actions button { flex: 1; } }
@media (max-width: 800px) {
  .ai-delivery { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .ai-task-card, .delivery-receive, .delivery-review { padding: 18px; }
  .ai-task-actions { flex-direction: column; }
  .ai-task-actions .button { width: 100%; }
}
@media print {
  .study-mode-switch, .delivery-paste { display: none !important; }
  .ai-task-actions, .delivery-file-label, [data-result-file], [data-result-folder-control], [data-result-folder-help], [data-result-retry], [data-result-save], [data-result-review], .delivery-downloads { display: none !important; }
  .ai-delivery { display: block; }
  .delivery-receive, .delivery-review { break-inside: auto; margin: 12px 0; }
  .result-topic { break-inside: avoid; }
}

[data-mode-only][hidden] { display: none !important; }
.ide-option summary { min-height: 44px; padding: 10px; cursor: pointer; }
.delivery-repair { margin: 16px 0; }
.delivery-repair summary { min-height: 44px; padding: 10px 0; cursor: pointer; }

/* Fuentes en texto: se leen y se copian en la página, sin descargar archivos. */
.inline-sources { display: grid; gap: 14px; }
.inline-source { min-inline-size: 0; }
.inline-source h5 { margin: 0 0 8px; font-size: 1rem; }
.inline-source .prompt-template { margin: 0 0 10px; }
/* devbrain-prose-contract:start */
/* Contrato 7.4: cada región ocupa su espacio y conserva sus controles. */
:where(p, dd, blockquote) {
    --text-align-reading: start;
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    text-align: var(--text-align-reading);
    text-align-last: start;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    -webkit-hyphens: none;
}
:where(dd, blockquote) { margin-inline: 0; }
/* devbrain-prose-contract:end */

/* css/eco-training.css */
/* EcoBogotá: el recurso de capacitación y el trabajo con IA organizan el recorrido. */
.eco-training { --eco-shadow: 0 12px 35px rgb(21 62 56 / 8%); }
.eco-training-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .8fr); align-items: center; gap: 36px; padding: 32px 0 40px; }
.eco-training-hero h1 { max-inline-size: 23ch; font-size: clamp(2rem, 3.3vw, 3.6rem); line-height: 1.1; letter-spacing: -.035em; }
.eco-training-hero .page-intro { margin: 22px 0; }
.eco-delivery-preview { padding: 26px; background: #eff6f2; border: 1px solid #bbd2c6; border-radius: 24px; box-shadow: var(--eco-shadow); }
.eco-delivery-preview ol { display: grid; gap: 20px; margin: 22px 0; padding-inline-start: 24px; }
.eco-delivery-preview li { padding-inline-start: 8px; }
.eco-delivery-preview strong, .eco-delivery-preview li span { display: block; }
.eco-delivery-preview li span { margin-top: 4px; color: #465e55; font-size: .9rem; }
.eco-delivery-preview > p { padding-top: 16px; border-top: 1px solid #bbd2c6; }
.eco-training .eco-progress { padding: 12px; background: #f2f6f4; border-radius: 16px; }
.eco-training .eco-progress a { height: 100%; }
.eco-training .eco-phase { margin: 42px 0; }
.eco-training .eco-phase-heading { padding-top: 12px; }
.eco-training .eco-phase-heading > div, .eco-training .eco-color-card > div { flex: 1 1 0%; }
.eco-training :is(p, li, figcaption, label, summary, th, td, blockquote) {  }
.eco-brief-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.eco-reference { margin-block: 20px; padding: 20px; border: 1px solid #cbd9d1; border-radius: 14px; background: #fbfdfb; }
.eco-reference summary, .eco-prompt-details summary { min-height: 44px; align-content: center; color: #174b3b; font-weight: 650; cursor: pointer; }
.eco-reference[open] > summary { margin-bottom: 18px; }
.eco-route-picker { min-inline-size: 0; margin: 24px 0 0; padding: 0; border: 0; }
.eco-route-picker legend { margin-bottom: 14px; font-weight: 700; }
.eco-route-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.eco-route-option { display: flex; gap: 12px; align-items: start; padding: 20px; border: 2px solid #c7d5cd; border-radius: 16px; background: #fff; cursor: pointer; }
.eco-route-option input { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 3px; accent-color: #174b3b; }
.eco-route-option strong, .eco-route-option span span { display: block; }
.eco-route-option span span { margin-top: 8px; color: #465e55; font-size: .9rem; line-height: 1.55; }
.eco-route-option:has(input:checked) { background: #edf7ef; border-color: #226548; box-shadow: 0 0 0 1px #226548; }
.eco-route-option:focus-within { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
.eco-route-option input:focus-visible { outline: none; box-shadow: none; }
.eco-route-panels { margin-top: 20px; }
.eco-route-panel { margin: 0; border: 1px solid #b5cdbf; border-radius: 18px; background: #fff; box-shadow: var(--eco-shadow); }
/* Sin :has, las tres rutas siguen disponibles como secciones consecutivas. */
@supports selector(:has(*)) {
  #eco-fase-2:has(#eco-route-video:checked) .eco-route-panel:not([data-eco-route="video"]),
  #eco-fase-2:has(#eco-route-canva:checked) .eco-route-panel:not([data-eco-route="canva"]),
  #eco-fase-2:has(#eco-route-simulacion:checked) .eco-route-panel:not([data-eco-route="simulacion"]) { display: none; }
}
.eco-route-heading { padding: 24px; background: #edf4ef; border-radius: 17px 17px 0 0; border-bottom: 1px solid #c7d5cd; }
.eco-route-heading h3 { margin: 8px 0; font-size: 1.6rem; }
.eco-route-work { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(240px, .8fr); gap: 28px; padding: 24px; }
.eco-route-work h4 { margin: 0 0 12px; font-size: 1.08rem; }
.eco-route-work .lab-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 18px; }
.eco-route-check { padding: 20px; background: #f5f7f5; border-radius: 12px; }
.eco-prompt-details { margin: 0 24px 24px; padding-top: 16px; border-top: 1px solid #c7d5cd; }
.eco-training pre { max-inline-size: 100%; overflow-x: auto; white-space: pre; word-break: normal; overflow-wrap: normal; padding: 18px; background: #f3f6f4; border: 1px solid #cbd9d1; border-radius: 10px; font-size: .85rem; }
.eco-workflow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding-inline-start: 24px; }
.eco-workflow li { padding-inline-start: 8px; }
.eco-workflow h3 { font-size: 1.12rem; margin-bottom: 10px; }
.eco-revision-example { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; padding: 26px; margin-block: 26px; background: #eef5f0; border: 1px solid #c0d5c8; border-radius: 18px; }
.eco-revision-example blockquote { margin: 0 0 16px; padding: 0 0 0 18px; border-inline-start: 3px solid #468363; color: #244b39; }
.eco-residue-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.eco-residue-card { margin: 0; padding: 16px; background: #fff; border: 1px solid #d0ddd4; border-radius: 12px; }
.eco-residue-card img { display: block; width: 100%; max-width: 160px; height: 120px; object-fit: contain; margin: 0 auto 12px; }
.eco-residue-card figcaption { font-size: .9rem; }
.eco-review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.eco-training :is(p, li, figcaption, label, summary, th, td, blockquote) { inline-size: 100%; max-inline-size: none; min-inline-size: 0; white-space: normal; word-break: normal; text-align:var(--text-align-reading, start); hyphens: none; overflow-wrap: break-word; }
.eco-training :is(article, aside, section, div, fieldset) { min-inline-size: 0; }
.eco-training .button { white-space: normal; min-height: 44px; height: auto; text-align: start; }
@media (max-width: 1100px) {
  .eco-training .eco-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eco-training-hero, .eco-route-work { grid-template-columns: 1fr; }
  .eco-route-options, .eco-workflow, .eco-review-grid { grid-template-columns: 1fr; }
  .eco-delivery-preview ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .eco-brief-grid, .eco-revision-example, .eco-residue-grid, .eco-delivery-preview ol { grid-template-columns: 1fr; }
  .eco-training-hero { gap: 24px; padding-block: 20px; }
  .eco-delivery-preview, .eco-route-heading, .eco-route-work, .eco-revision-example { padding: 18px; }
  .eco-prompt-details { margin-inline: 18px; }
  .eco-training .eco-progress { padding: 8px; }
  .eco-training .lab-actions .button { width: 100%; justify-content: center; }
  .eco-reference { padding: 16px; }
}
@media print {
  .eco-training .eco-route-panel { display: block !important; box-shadow: none; break-inside: auto; }
  .eco-route-picker, .eco-training button { display: none; }
}

/* devbrain-prose-contract:start */
/* Contrato 7.4: cada región ocupa su espacio y conserva sus controles. */
:where(p, dd, blockquote) {
    --text-align-reading: start;
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    text-align: var(--text-align-reading);
    text-align-last: start;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    -webkit-hyphens: none;
}
:where(dd, blockquote) { margin-inline: 0; }
/* devbrain-prose-contract:end */

/* css/ux-refinements.css */
/* Ajustes de experiencia: barra superior compacta, navegación agrupada y recorrido por pasos.
   Se carga al final del paquete del curso para resolver por orden de cascada, sin !important. */

/* Barra superior: en pantallas angostas ocupa dos filas en lugar de cuatro. */
.mode-caption { color: var(--muted); font-weight: 500; }

@media (max-width: 850px) {
  .course-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "location mode resources" "progress progress progress";
    align-items: center;
    gap: 6px 8px;
    min-height: 0;
    padding: 8px 14px;
  }
  .topbar-location { grid-area: location; flex-wrap: nowrap; min-width: 0; }
  .study-mode-switch { grid-area: mode; }
  .resources-menu { grid-area: resources; margin-left: 0; }
  .course-progress-container { grid-area: progress; flex-wrap: nowrap; gap: 8px; margin-left: 0; justify-content: flex-start; }
  .progress-bar-wrap { flex: 1 1 auto; min-width: 0; }
  .progress-bar-wrap progress { width: 100%; }
  .mode-caption { display: none; }
}

@media (max-width: 520px) {
  .course-topbar {
    position: sticky;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "location location location" "progress mode resources";
  }
  .resource-link .resource-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .resources-caret { display: none; }
  .study-mode-switch > summary { padding: 10px; }
}

/* Navegación lateral: separa la ruta obligatoria de los complementos. */
.nav-group-label {
  margin: 18px 0 6px;
  padding: 0 12px;
  color: #c9dccd;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nav-group-label:first-child { margin-top: 4px; }

/* Ubicación detallada en la barra superior: módulo › paso › reto. */
.breadcrumb-step { color: var(--muted); font-weight: 500; }
.breadcrumb-step::before { content: "›"; margin: 0 6px; color: var(--decor-muted); }

/* Pie de cada paso: regresar y continuar. */
.phase-footer .phase-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--green);
  font-weight: 600;
  cursor: pointer;
}
.phase-footer .phase-back:hover,
.phase-footer .phase-back:focus-visible { border-color: var(--green); }

#course-nav.is-filtering .nav-group-label { display: none; }

/* «Guarda tu evidencia»: tres pasos visibles y alternativas agrupadas. */
.delivery-steps {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
  padding-left: 1.4rem;
}
.delivery-steps li { padding-left: 4px; }
.delivery-steps li::marker { color: var(--green); font-weight: 700; }
.delivery-help {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--surface-lab);
}
.delivery-help > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--green);
  font-weight: 650;
  cursor: pointer;
}
.delivery-help[open] > summary { margin-bottom: 8px; }

/* Portafolio: cada acceso muestra el estado de su evidencia. */
.portfolio-links a { flex-direction: column; align-items: flex-start; gap: 2px; }
.portfolio-links a small { color: var(--text-accent-muted); font-size: .8rem; font-weight: 500; }

/* El menú lateral se oculta sin deslizarse al cargar la página. */
@media (max-width: 850px) {
  body.navigation-ready:not(.menu-animated) .course-sidebar { transition: none; }
}

/* ==========================================================================
   Infografía nativa Módulo 01: Semáforo de Datos, Stepper y Roadmap
   ========================================================================== */

/* Encabezados de sección infográfica */
.section-infographic-header {
  margin: 2.25rem 0 1.25rem;
  inline-size: 100%;
}
.section-infographic-header .eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.section-infographic-header h3 {
  margin: 0 0 0.45rem;
  font-size: 1.25rem;
  color: var(--green-dark);
}
.section-infographic-header p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: var(--line-height-reading, 1.6);
  inline-size: 100%;
  overflow-wrap: break-word;
}

/* Tríptico del Semáforo de Protección de Datos (Ley 1581) */
.data-safety-triptych-section {
  margin: 1.75rem 0 2rem;
  inline-size: 100%;
}
.data-safety-triptych {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 1.15rem;
  margin-top: 1rem;
}
.data-safety-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(21, 62, 56, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-inline-size: 0;
}
.data-safety-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(21, 62, 56, 0.08);
}
.data-safety-card--green {
  border: 1px solid var(--status-ok);
}
.data-safety-card--amber {
  border: 1px solid var(--status-warn);
}
.data-safety-card--red {
  border: 1px solid var(--status-risk);
}

.data-safety-card__badge {
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  text-align: center;
  margin-bottom: 0.85rem;
}
.data-safety-card--green .data-safety-card__badge {
  background: #f0fdf4;
  border: 1px solid var(--status-ok);
  color: #15803d;
}
.data-safety-card--amber .data-safety-card__badge {
  background: #fffbeb;
  border: 1px solid var(--status-warn);
  color: #b45309;
}
.data-safety-card--red .data-safety-card__badge {
  background: #fef2f2;
  border: 1px solid var(--status-risk);
  color: #b91c1c;
}
.data-safety-card__badge strong {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 750;
}

.data-safety-card__title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.35;
}
.data-safety-card__includes {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 1rem;
  flex-grow: 1;
}
.data-safety-card__rule {
  font-size: 0.8rem;
  line-height: 1.5;
  border-radius: 8px;
  padding: 0.65rem;
  border: 1px dashed;
  margin-bottom: 0.75rem;
}
.data-safety-card--green .data-safety-card__rule {
  background: #fcfdfa;
  border-color: var(--status-ok);
  color: #166534;
}
.data-safety-card--amber .data-safety-card__rule {
  background: #fffdf7;
  border-color: var(--status-warn);
  color: #92400e;
}
.data-safety-card--red .data-safety-card__rule {
  background: #fff8f8;
  border-color: var(--status-risk);
  color: #991b1b;
}

.data-safety-card__action {
  font-size: 0.8rem;
  font-weight: 700;
  display: block;
}
.data-safety-card--green .data-safety-card__action {
  color: #15803d;
}
.data-safety-card--amber .data-safety-card__action {
  color: #b45309;
}
.data-safety-card--red .data-safety-card__action {
  color: #b91c1c;
}

/* Stepper de Delimitación de Tarea */
.task-delimitation-section {
  margin: 2rem 0;
  inline-size: 100%;
}
/* La instrucción del paso 3 ocupa el ancho de la sección sin la sangría del chat. */
.task-delimitation-section .prompt-bubble {
  margin-inline: 0;
}
.task-stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 0.85rem;
  margin: 1.15rem 0 1.5rem;
}
.task-step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: 0 2px 8px rgba(21, 62, 56, 0.04);
  transition: border-color 0.15s ease, transform 0.15s ease;
  min-inline-size: 0;
}
.task-step:hover {
  border-color: var(--green);
  transform: translateY(-2px);
}
.task-step__num {
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  color: var(--green);
  text-transform: uppercase;
}
.task-step__title {
  margin: 0;
  font-size: 0.94rem;
  color: var(--ink);
  line-height: 1.35;
}
.task-step__desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Acordeones discretos de teoría secundaria */
details.secondary-theory {
  margin: 1.25rem 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  inline-size: 100%;
  overflow: clip;
}
details.secondary-theory > summary {
  padding: 0.85rem 1.1rem;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--green-dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.15s ease;
}
details.secondary-theory > summary::-webkit-details-marker {
  display: none;
}
details.secondary-theory > summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--green);
  line-height: 1;
}
details.secondary-theory[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #f4f8f1;
}
details.secondary-theory[open] > summary::after {
  content: "−";
}
.secondary-theory-content {
  padding: 1.1rem;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: var(--line-height-reading, 1.6);
  inline-size: 100%;
}
.secondary-theory-content p {
  margin: 0 0 0.65rem;
}
.secondary-theory-content p:last-child {
  margin-bottom: 0;
}

/* Roadmap de Conexión Práctica hacia los Retos */
.module-roadmap-connection {
  margin: 2.25rem 0 1.5rem;
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(21, 62, 56, 0.04);
  inline-size: 100%;
}
.roadmap-connection-header .eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.roadmap-connection-header h3 {
  margin: 0 0 0.35rem;
  font-size: 1.18rem;
  color: var(--green-dark);
}
.roadmap-connection-header p {
  margin: 0 0 1.1rem;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: var(--line-height-reading, 1.6);
}
.roadmap-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 0.85rem;
}
.roadmap-step-card {
  background: var(--paper, #f7f9f4);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-inline-size: 0;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.roadmap-step-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
}
.roadmap-step-tag {
  font-size: 0.8rem;
  font-weight: 750;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.roadmap-step-card h4 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.35;
}
.roadmap-step-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ==========================================================================
   Estilos movidos desde atributos style (M01 y M02): diagramas nativos y simuladores
   ========================================================================== */
.triage-concept-block { margin: 2rem 0; padding: 1.5rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--eco-shadow); }
.native-diagram__top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.25rem; border-bottom: 2px solid var(--line); padding-bottom: 1rem; }
.native-diagram__kicker--tight { display: inline-block; margin-bottom: 0.35rem; font-size: 0.8rem; letter-spacing: 0.04em; }
.native-diagram__heading { margin: 0; font-size: 1.25rem; color: var(--green-dark); }
.native-diagram__lead { margin: 0.35rem 0 0 0; font-size: 0.88rem; color: var(--muted); }
.native-diagram__pill { font-size: 0.8rem; background: var(--lime); color: var(--green-dark); font-weight: 700; }
.triage-card--green { background: var(--surface); border: 1px solid var(--status-ok); border-radius: 12px; padding: 1.1rem; display: flex; flex-direction: column; }
.triage-card__tag--green { background: #f0fdf4; border: 1px solid var(--status-ok); border-radius: 6px; padding: 0.35rem 0.5rem; text-align: center; margin-bottom: 0.75rem; }
.triage-card__tag-label--green { color: #15803d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.comparative-card__title { margin: 0 0 0.5rem 0; font-size: 0.98rem; color: var(--ink); }
.triage-card__chip--green { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 0.4rem 0.6rem; font-size: 0.8rem; font-weight: 700; color: var(--green); text-align: center; margin-bottom: 0.85rem; }
.comparative-card__list { margin: 0 0 1rem 0; padding-left: 1.1rem; font-size: 0.82rem; color: var(--muted); flex-grow: 1; display: grid; gap: 0.45rem; }
.triage-card__outcome--green { background: #fcfdfa; border: 1px dashed var(--status-ok); border-radius: 8px; padding: 0.55rem; text-align: center; font-size: 0.8rem; color: #15803d; font-weight: 600; }
.triage-card--blue { background: var(--surface); border: 1px solid var(--status-info); border-radius: 12px; padding: 1.1rem; display: flex; flex-direction: column; }
.triage-card__tag--blue { background: #eff6ff; border: 1px solid var(--status-info); border-radius: 6px; padding: 0.35rem 0.5rem; text-align: center; margin-bottom: 0.75rem; }
.triage-card__tag-label--blue { color: var(--status-info); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.triage-card__chip--blue { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 0.4rem 0.6rem; font-size: 0.8rem; font-weight: 700; color: var(--status-info); text-align: center; margin-bottom: 0.85rem; }
.triage-card__outcome--blue { background: #fcfdfa; border: 1px dashed var(--status-info); border-radius: 8px; padding: 0.55rem; text-align: center; font-size: 0.8rem; color: var(--status-info); font-weight: 600; }
.triage-card--amber { background: var(--surface); border: 1px solid var(--status-warn); border-radius: 12px; padding: 1.1rem; display: flex; flex-direction: column; }
.triage-card__tag--amber { background: #fffbeb; border: 1px solid var(--status-warn); border-radius: 6px; padding: 0.35rem 0.5rem; text-align: center; margin-bottom: 0.75rem; }
.triage-card__tag-label--amber { color: #b45309; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.triage-card__chip--amber { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 0.4rem 0.6rem; font-size: 0.8rem; font-weight: 700; color: #b45309; text-align: center; margin-bottom: 0.85rem; }
.triage-card__outcome--amber { background: #fcfdfa; border: 1px dashed var(--status-warn); border-radius: 8px; padding: 0.55rem; text-align: center; font-size: 0.8rem; color: #b45309; font-weight: 600; }
.triage-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; }
.triage-panel__label { display: block; font-size: 0.85rem; color: var(--green-dark); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.75rem; }
.triage-panel__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 0.75rem; align-items: stretch; }
.metric-box { background: #f6f9f3; border: 1px solid var(--line); border-radius: 8px; padding: 0.75rem; }
.metric-box__label { font-size: 0.8rem; font-weight: 700; color: var(--green); display: block; }
.metric-box__value { display: block; font-size: 0.86rem; color: var(--ink); margin: 0.2rem 0; }
.metric-box__note { font-size: 0.8rem; color: var(--muted); }
.comparative-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1rem; margin: 1rem 0; }
.comparative-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; }
.badge-station--spaced { display: inline-block; margin-bottom: 0.5rem; }
.field-span { grid-column: 1 / -1; }
.anon-case { margin: 0.5rem 0; padding: 1rem; background: var(--paper); border-left: 4px solid var(--green); border-radius: 4px; font-size: 0.92rem; font-weight: 500; }
.sim-choice-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.sim-feedback--spaced { margin-top: 0.75rem; }
.sim-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-top: 1rem; }
.sim-score { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.sim-nav { display: flex; gap: 0.5rem; }
.draft-box { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; margin-bottom: 1rem; }
.draft-box__text { margin: 0.5rem 0 0 0; font-size: 0.88rem; color: var(--ink); }
.check-list { display: grid; gap: 0.75rem; }
.check-option--row { display: flex; gap: 0.5rem; align-items: flex-start; cursor: pointer; }
.check-option__input { width: auto; margin-top: 3px; }
.native-diagram--ventanilla .native-diagram__flow { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.native-diagram--ventanilla .native-diagram__card p { font-size: 0.88rem; }
.tool-lab .check-option--row input[type="checkbox"] { flex: none; }
.lesson-list { margin: 0.6rem 0 1rem 1.25rem; font-size: 0.9rem; line-height: 1.6; color: var(--ink); }
.rule-options { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.check-option--inline { display: flex; gap: 0.4rem; align-items: center; cursor: pointer; }
.check-option__input--plain { width: auto; }
.sim-footer--tight { display: flex; justify-content: space-between; align-items: center; margin-top: 0.75rem; }
.sim-count { font-size: 0.82rem; font-weight: 600; color: var(--green-dark); }
/* Pasos de lección (módulos 01, 02 y 03): tres tarjetas en una fila o en una columna, sin una tarjeta suelta. */
.lesson-step, .m01-step { container-type: inline-size; }
.lesson-step .task-stepper:has(> :nth-child(3):last-child),
.lesson-step .data-safety-triptych,
.m01-step .data-safety-triptych { grid-template-columns: minmax(0, 1fr); }
@container (min-width: 34rem) {
  .lesson-step .task-stepper:has(> :nth-child(3):last-child),
  .lesson-step .data-safety-triptych,
  .m01-step .data-safety-triptych { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
