/* PEP · Dirección editorial. Pantalla e impresión usan superficies distintas. */
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 1200; padding: 12px 20px; background: #222; color: white; }
.skip-link:focus { top: 12px; }
[hidden] { display: none !important; }

@media screen {
  :root {
    --paper: #f6f3eb;
    --ink: #252521;
    --rule: #d9d5cb;
    --muted: #68675e;
    --red: #ba2925;
    --font-primary: 'Segoe UI', Arial, sans-serif;
    --font-display: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
    --color-unilibre-charcoal: var(--ink);
    --color-text-main: #383932;
    --color-text-muted: var(--muted);
    --color-border-light: var(--rule);
    --color-border-medium: #bdb9ae;
    --color-unilibre-bg-light: #efede5;
    --booklet-max-width: 1440px;
    --booklet-min-height: 0px;
    --radius-md: 3px;
    --radius-lg: 4px;
    --shadow-md: none;
    --shadow-lg: none;
  }
  html { font-size: 16px; scroll-padding-top: 24px; }
  body.booklet-app-container { background: var(--paper); color: var(--ink); max-width: none; padding: 0 4.5vw 96px; }
  ::selection { background: #ead0bd; color: var(--ink); }
  button, a { -webkit-tap-highlight-color: transparent; }
  :focus-visible { outline: 2px solid var(--red); outline-offset: 5px; }
  .page-title:focus, .cover-title:focus { outline: none; }
  .booklet-header { background: transparent; color: var(--ink); border: 0; box-shadow: none; max-width: var(--booklet-max-width); margin: auto; }
  .header-inner { padding: 23px 0 20px; gap: 30px; }
  .header-brand { color: var(--ink); gap: 13px; }
  .header-brand:hover { color: var(--red); text-decoration: none; }
  .header-crest { width: 46px; height: 46px; filter: none; }
  .header-institution { color: var(--ink); font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; text-transform: none; letter-spacing: -.04em; }
  .header-program { color: var(--muted); font-size: .72rem; font-weight: 400; margin-top: 4px; letter-spacing: .02em; }
  .btn-toc-toggle { background: transparent; color: var(--ink); border: 1px solid var(--ink); border-radius: 2px; min-height: 44px; padding: 11px 18px; font-size: .78rem; backdrop-filter: none; }
  .btn-toc-toggle:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  #reading-progress { height: 2px; background: var(--rule); }
  #reading-progress-bar { background: var(--red); box-shadow: none; }
  .chapter-nav { width: 100%; max-width: var(--booklet-max-width); margin: 0 auto; display: flex; justify-content: space-between; border-bottom: 1px solid var(--rule); gap: 12px; }
  .chapter-nav a { position: relative; display: flex; gap: 9px; align-items: center; min-height: 54px; color: var(--muted); font-size: .75rem; white-space: nowrap; }
  .chapter-nav a > span:first-child { font-family: var(--font-mono); font-size: .65rem; opacity: .8; }
  .chapter-nav a::after { content: ''; position: absolute; bottom: -1px; height: 2px; background: var(--red); width: 100%; transform: scaleX(0); transform-origin: left; transition: transform 260ms ease; }
  .chapter-nav a:hover, .chapter-nav a[aria-current] { color: var(--red); text-decoration: none; }
  .chapter-nav a:hover::after, .chapter-nav a[aria-current]::after { transform: scaleX(1); }
  .booklet-main-container { width: 100%; max-width: var(--booklet-max-width); padding: 0; margin: 0 auto; flex: 1; }
  #booklet-deck { border: 0; border-radius: 0; box-shadow: none; background: transparent; overflow: visible; min-height: 0; outline: none; }
  .booklet-deck::before, .booklet-deck::after { display: none; }
  .booklet-page { display: none; padding: 54px 5.5vw 60px; height: auto; overflow: visible; background: transparent; transform: none; transition: none; }
  .booklet-page.active { display: block; }
  #page-1 { padding: 0; }
  .cover-edition { display: flex; justify-content: space-between; gap: 12px; padding: 23px 0; font-family: var(--font-mono); font-size: .61rem; letter-spacing: .09em; color: var(--muted); }
  .cover-edition > span:last-child { display: flex; gap: 24px; }
  .cover-hero-container { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 4.5vw; align-items: stretch; margin: 0 0 38px; min-height: 0; }
  .cover-content { display: block; padding: 24px 0 16px; min-width: 0; }
  .cover-eyebrow { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .75rem; margin: 0 0 27px; }
  .cover-eyebrow > span { width: 6px; height: 6px; background: var(--red); border-radius: 50%; }
  .cover-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(3rem, 5.4vw, 5.75rem); line-height: 1.03; letter-spacing: -.065em; margin: 0 0 26px; color: var(--ink); }
  .cover-title em { color: var(--red); font-weight: 400; }
  .cover-subtitle { color: #595a51; font-size: 1rem; line-height: 1.7; margin-bottom: 28px; max-width: 44ch; font-weight: 400; }
  .cover-actions { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; margin-top: 0; }
  .btn-cta-start { background: var(--red); color: white; border: 1px solid var(--red); border-radius: 2px; box-shadow: none; padding: 15px 21px; font-size: .8rem; font-weight: 600; min-height: 48px; gap: 30px; transition: background 180ms, transform 180ms; }
  .btn-cta-start:hover { background: #92221f; box-shadow: none; transform: translateY(-2px); }
  .btn-cta-start svg { width: 20px; height: 20px; transition: transform 200ms; }
  .btn-cta-start:hover svg { transform: translateX(4px); }
  .cover-secondary { color: var(--ink); border-bottom: 1px solid var(--rule); padding: 13px 0 7px; font-size: .78rem; }
  .cover-secondary span { display: inline-block; margin-left: 12px; }
  .cover-secondary:hover { text-decoration: none; border-color: var(--red); }
  .cover-note { margin: 22px 0 0; color: var(--muted); font-size: .7rem; }
  .cover-poster { position: relative; isolation: isolate; min-height: 430px; background: var(--red); color: var(--paper); overflow: hidden; padding: 25px 28px; display: flex; flex-direction: column; justify-content: space-between; }
  .poster-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: .55rem; letter-spacing: .05em; }
  .poster-top > span:last-child { font: 25px Georgia, serif; }
  .poster-word { font-family: Georgia, serif; font-size: clamp(7rem, 14.8vw, 14rem); font-weight: 400; line-height: 1; letter-spacing: -.085em; align-self: center; margin-top: -16px; position: relative; z-index: 1; }
  .poster-routes { position: absolute; left: 0; bottom: 8px; width: 100%; height: 76%; color: #f4c1a7; opacity: .7; pointer-events: none; }
  .route-line { stroke: currentColor; stroke-width: 1.2; }
  .poster-bottom { display: flex; justify-content: space-between; align-items: end; position: relative; z-index: 1; gap: 12px; }
  .poster-bottom > span:first-child { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.15; }
  .poster-stamp { width: 92px; height: 92px; border: 1px solid #edb4a0; border-radius: 50%; display: flex; flex-direction: column; justify-content: center; text-align: center; font-size: .42rem; letter-spacing: .05em; line-height: 1.4; transform: rotate(-12deg); }
  .poster-stamp b { font: 2rem var(--font-display); color: var(--paper); }
  .poster-campus { text-align: right; font-size: .65rem; line-height: 1.6; letter-spacing: .02em; }
  .cover-facts { display: grid; grid-template-columns: 1.1fr 1fr .85fr .8fr 1.25fr; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 24px 0; align-items: center; gap: 24px; }
  .facts-intro { font: 1.12rem/1.35 var(--font-display); margin: 0; }
  .facts-intro em { color: var(--muted); }
  .cover-facts > div { display: flex; flex-direction: column; border-left: 1px solid var(--rule); padding-left: 24px; }
  .cover-facts > div > strong { font: 2.8rem/1.05 var(--font-display); letter-spacing: -.06em; }
  .cover-facts > div > span { font-size: .68rem; color: var(--muted); margin-top: 6px; }
  .quality-link { color: var(--ink); display: flex; gap: 12px; align-items: center; font-size: .75rem; line-height: 1.55; }
  .quality-link:hover { text-decoration: none; }
  .quality-mark { font-size: 2.7rem; color: var(--red); }
  .cover-colophon { display: flex; justify-content: space-between; gap: 10px; padding: 14px 0 22px; font-size: .6rem; color: var(--muted); }

  /* Retícula editorial para capítulos y contenido académico. */
  .page-header { padding: 0 100px 30px 0; border-bottom: 1px solid var(--ink); margin: 0 0 34px; }
  .page-header::after { content: attr(data-folio); position: absolute; right: 0; bottom: 22px; font: 4.5rem/1 var(--font-display); color: #c9c4b7; letter-spacing: -.06em; }
  .page-badge-category { border: 0; background: transparent; padding: 0; color: var(--red); border-radius: 0; font-family: var(--font-mono); font-size: .65rem; font-weight: 500; letter-spacing: .08em; margin-bottom: 18px; }
  .page-title { font-family: var(--font-display); font-size: clamp(2rem, 3.5vw, 3.6rem); font-weight: 400; line-height: 1.12; letter-spacing: -.045em; max-width: 25ch; margin-bottom: 14px; text-wrap: balance; }
  .page-subtitle { font-size: .94rem; line-height: 1.7; font-weight: 400; color: var(--muted); max-width: 75ch; }
  .pep-section-block, .pep-section-block.accent-red, .pep-section-block.accent-gold { padding: 0; border: 0; box-shadow: none; background: transparent; margin: 0 0 40px; border-radius: 0; }
  .pep-section-kicker { color: var(--muted); background: transparent; border-radius: 0; padding: 0; font: .65rem var(--font-mono); letter-spacing: .08em; margin: 0 0 12px; }
  .pep-section-heading { font: 400 1.7rem/1.3 var(--font-display); margin-bottom: 23px; letter-spacing: -.025em; }
  .pep-section-subheading { font-size: 1rem; margin: 28px 0 14px; }
  .pep-prose { max-width: 78ch; }
  .pep-prose p { font-size: 1.04rem; line-height: 1.85; margin-bottom: 20px; color: var(--color-text-main); }
  .pep-list { max-width: 80ch; padding-left: 0; list-style-position: outside; margin: 16px 0 28px 20px; }
  .pep-list li { font-size: 1rem; line-height: 1.8; margin-bottom: 10px; padding-left: 6px; }
  .pep-list li::marker { color: var(--red); }
  .pep-highlight-banner { background: #ece8dc; border: 0; border-left: 2px solid var(--red); border-radius: 0; padding: 28px 30px; margin: 34px 0; }
  .pep-highlight-banner > strong { font: 400 1.3rem/1.5 var(--font-display); }
  .pep-three-questions-grid { gap: 28px; margin: 22px 0 0; }
  .pep-q-card { background: transparent; border: 0; border-top: 1px solid #bcb6a7; border-radius: 0; padding: 20px 0 0; }
  .pep-q-card h4 { font: 400 1.4rem/1.25 var(--font-display); margin-bottom: 12px; }
  .pep-q-card p { font-size: .92rem; line-height: 1.7; }
  .pep-timeline-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 28px; margin: 28px 0; }
  .pep-timeline-item { position: relative; border: 0; border-top: 1px solid var(--red); background: transparent; border-radius: 0; padding: 20px 0 0; font-weight: 400; font-size: .9rem; }
  .pep-timeline-item::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--red); position: absolute; top: -4px; left: 0; }
  .timeline-year { display: block; font: 2.3rem/1.2 var(--font-display); color: var(--red); margin-bottom: 10px; }
  .identity-card, .principle-card, .obj-card, .profile-card, .ce-card, .pep-directivo-card, .occupational-item { background: transparent; box-shadow: none; border: 0; border-top: 1px solid var(--rule); border-radius: 0; padding: 24px 0; }
  .identity-card:hover, .principle-card:hover, .obj-card:hover { transform: none; box-shadow: none; }
  .identity-card.mision, .identity-card.vision { border-top: 2px solid var(--red); }
  .identity-grid, .specific-objectives-grid, .principles-grid, .pep-directivos-grid, .competencies-matrix-grid { gap: 28px; }
  .principle-num, .obj-card-num, .ce-card-id { background: transparent; border-radius: 0; color: var(--red); font: 1.5rem var(--font-display); }
  .identity-card-title, .profile-title { font: 1.7rem var(--font-display); }
  .profile-badge-icon { flex: 0 0 44px; width: 44px; height: 44px; background: transparent; color: var(--red); border: 1px solid var(--rule); border-radius: 50%; box-shadow: none; }
  .profile-badge-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .lema-banner, .general-objective-box { border-radius: 0; box-shadow: none; }
  .lema-banner { background: var(--red); }
  @media screen and (max-width: 700px) {
    .lema-banner { flex-direction: column; align-items: stretch; padding: 22px; }
    .lema-badge-founder { align-items: flex-start; text-align: left; border-left: 0; border-top: 1px solid currentColor; padding: 14px 0 0; }
  }
  .tabs-nav { background: transparent; border-radius: 0; border-bottom: 1px solid var(--rule); padding: 0; gap: 0; }
  .tab-btn { border-radius: 0; padding: 15px 20px; border-bottom: 2px solid transparent; }
  .tab-btn.active { background: transparent; color: var(--red); border-bottom-color: var(--red); box-shadow: none; }
  .curriculum-kpi-banner { background: var(--ink); border-radius: 0; box-shadow: none; padding: 28px; gap: 24px; }
  .curriculum-kpi-num { font: 2.8rem/1.15 var(--font-display); color: var(--paper); }
  .curriculum-kpi-label { font-size: .65rem; }
  .btn-filter-comp, .btn-filter-sem { border-radius: 2px; min-height: 42px; font-weight: 500; background: transparent; }
  .btn-filter-comp[data-filter].active { background: var(--ink); border-color: var(--ink); color: white; }
  .semester-block { border-radius: 0; box-shadow: none; background: transparent; }
  .semester-header { background: #e9e5da; padding: 18px; }
  .courses-table td { padding: 14px; }
  .courses-table th { background: #efede5; padding: 14px; }
  .accordion-item { border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: transparent; }
  .accordion-trigger { padding: 20px 0; background: transparent; border-radius: 0; text-align: left; }
  .accordion-content { padding: 4px 20px 24px; }
  .accordion-trigger.open { color: var(--red); }
  .rap-badge-id { background: transparent; color: var(--red); font-family: var(--font-mono); }
  .pep-cycle-container { border-radius: 0; padding: 24px; }
  .pep-cycle-step { border-width: 1px; border-radius: 2px; }
  .quiz-container { max-width: 860px; border: 1px solid var(--rule); border-radius: 0; padding: 32px; background: #fcfaf5; box-shadow: none; }
  .quiz-header-bar { border-bottom: 1px solid var(--rule); }
  .quiz-counter { font: .72rem var(--font-mono); }
  .quiz-question-text { font: 400 1.55rem/1.45 var(--font-display); }
  .quiz-option-btn { border-radius: 2px; border-width: 1px; border-color: var(--rule); padding: 18px; background: transparent; }
  .quiz-option-btn:hover:not(:disabled) { box-shadow: none; transform: translateX(3px); }
  .quiz-option-letter { background: #eeebe2; border-radius: 50%; font-weight: 500; }
  .quiz-score-badge { border-radius: 2px; }
  .quiz-feedback-box { border-radius: 2px; }
  .certificate-card { box-shadow: none; border-radius: 0; }

  /* Navigation stays available while reading long chapters. */
  .booklet-footer { position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; max-width: none; margin: 0; padding: 12px 4.5vw max(12px, env(safe-area-inset-bottom)); border-radius: 0; border: 0; border-top: 1px solid var(--rule); background: var(--paper); box-shadow: none; gap: 14px; }
  .nav-btn { border-radius: 2px; min-height: 42px; padding: 10px 18px; font-size: .78rem; font-weight: 500; }
  .btn-prev { border: 1px solid var(--rule); background: transparent; color: var(--ink); }
  .btn-next { background: var(--ink); color: white; box-shadow: none; }
  .btn-next:hover:not(:disabled) { box-shadow: none; background: var(--red); }
  #page-indicator { font: .72rem var(--font-mono); font-weight: 400; }
  .page-indicator-sub { font-size: .65rem; color: var(--muted); max-width: 52vw; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; margin-top: 4px; }
  #toc-drawer { width: 430px; right: -450px; background: var(--paper); border-left: 1px solid var(--rule); box-shadow: none; }
  #toc-drawer.open { right: 0; }
  .toc-drawer-header { padding: 26px; background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--rule); }
  .toc-title { font: 1.5rem var(--font-display); color: var(--ink); }
  .toc-title svg { display: none; }
  .btn-close-toc { color: var(--ink); min-height: 44px; min-width: 44px; }
  .toc-nav { overflow-y: auto; flex: 1; }
  .toc-link { border-left-width: 2px; padding: 16px 26px; gap: 20px; }
  .toc-page-num { font: 1.4rem var(--font-display); background: transparent; color: var(--red); border-radius: 0; }
  .toc-meta-title { font-weight: 500; font-size: .88rem; }
  .toc-meta-subtitle { font-size: .72rem; line-height: 1.5; margin-top: 5px; }
  .toc-link:hover, .toc-item.active .toc-link { padding-left: 30px; background: #eae6da; }
  .toc-overlay { backdrop-filter: blur(2px); background: rgba(37, 37, 33, .35); }
  #uli-mascot-guide { position: relative; bottom: auto; right: auto; align-self: flex-end; margin: 8px 0 20px; max-width: min(320px, calc(100vw - 32px)); z-index: 100; }
  .mascot-img-wrap { width: auto; gap: 14px; padding: 0; border: 0; border-radius: 3px; background: transparent; align-items: center; animation: none; box-shadow: none; }
  #uli-mascot-img { flex: 0 0 auto; width: 128px; height: 168px; max-height: none; object-fit: contain; filter: none; }
  .guide-label { color: var(--ink); font-size: .82rem; white-space: nowrap; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 3px; background: var(--paper); }
  .guide-label > span { margin-left: 8px; }
  #uli-speech-bubble { border: 1px solid var(--rule); border-radius: 3px; background: var(--paper); font-size: .88rem; padding: 24px 30px 24px 22px; box-shadow: 0 12px 32px #25252114; max-width: 320px; font-weight: 400; line-height: 1.65; }
  #uli-speech-bubble::before, #uli-speech-bubble::after { display: none; }
  .guide-close { pointer-events: auto; position: absolute; top: 0; right: 0; width: 30px; height: 30px; z-index: 2; font-size: 1.3rem; color: var(--muted); }
  .guide-collapsed .mascot-speech-bubble, .guide-collapsed .guide-close { display: none; }
  body.toc-is-open { overflow: hidden; }

  @media (min-width: 1600px) {
    .cover-hero-container { gap: 80px; }
    .cover-content { padding-top: 44px; }
    .cover-poster { min-height: 500px; }
  }
  @media (max-width: 1050px) {
    .chapter-nav { overflow-x: auto; overflow-y: hidden; justify-content: flex-start; gap: 30px; scrollbar-width: none; }
    .chapter-nav::-webkit-scrollbar { display: none; }
    .cover-hero-container { gap: 28px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
    .cover-poster { min-height: 400px; padding: 22px; }
    .cover-content { padding-top: 18px; }
    .cover-title { font-size: clamp(2.75rem, 5.6vw, 4rem); }
    .cover-actions { gap: 12px; }
    .cover-facts { gap: 18px; }
    .cover-facts > div { padding-left: 18px; }
    .facts-intro { font-size: 1rem; }
    .quality-link { font-size: .65rem; }
    .quality-mark { font-size: 2.1rem; }
    .booklet-page { padding: 40px 2vw; }
  }
  @media (max-width: 700px) {
    body.booklet-app-container { padding: 0 22px 105px; }
    .header-inner { padding: 18px 0; gap: 12px; }
    .header-crest { width: 36px; height: 36px; }
    .header-institution { font-size: 1.15rem; }
    .header-program { font-size: .58rem; max-width: 190px; line-height: 1.5; }
    .btn-toc-toggle { padding: 10px; }
    .btn-toc-toggle span { display: none; }
    .chapter-nav { gap: 25px; }
    .chapter-nav a { min-height: 48px; font-size: .7rem; }
    .cover-edition { font-size: .52rem; padding: 21px 0; }
    .cover-edition > span:last-child { display: none; }
    .cover-hero-container { grid-template-columns: minmax(0, 1fr); gap: 30px; margin-bottom: 28px; }
    .cover-content { padding: 5px 0 0; }
    .cover-eyebrow { margin-bottom: 22px; font-size: .7rem; }
    .cover-title { font-size: clamp(2.5rem, 10vw, 4.2rem); margin-bottom: 23px; }
    .cover-subtitle { font-size: .95rem; }
    .desktop-break { display: none; }
    .cover-actions { gap: 14px; }
    .btn-cta-start { padding: 14px 18px; gap: 24px; }
    .cover-note { margin-top: 15px; }
    .cover-poster { min-height: 355px; max-width: none; }
    .poster-word { font-size: clamp(9rem, 37vw, 13rem); margin-top: -8px; }
    .poster-routes { height: 83%; }
    .poster-bottom > span:first-child { font-size: 1.3rem; }
    .poster-stamp { width: 78px; height: 78px; }
    .poster-stamp b { font-size: 1.7rem; }
    .cover-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px 12px; padding: 22px 0; }
    .facts-intro { grid-column: 1 / -1; font-size: 1.2rem; }
    .facts-intro br { display: none; }
    .cover-facts > div { padding-left: 12px; }
    .cover-facts > div > strong { font-size: 2.5rem; }
    .cover-facts > div > span { font-size: .6rem; }
    .quality-link { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid var(--rule); font-size: .75rem; }
    .cover-colophon { flex-direction: column; line-height: 1.6; }
    .booklet-page { padding: 33px 0 35px; }
    .page-header { padding-right: 0; padding-bottom: 24px; margin-bottom: 28px; }
    .page-header::after { display: none; }
    .page-title { font-size: 2.2rem; }
    .page-subtitle { font-size: .9rem; }
    .pep-prose p { font-size: 1rem; line-height: 1.8; }
    .pep-section-heading { font-size: 1.5rem; }
    .pep-highlight-banner { padding: 22px; }
    .pep-timeline-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pep-three-questions-grid, .identity-grid, .specific-objectives-grid, .principles-grid, .competencies-matrix-grid { grid-template-columns: minmax(0, 1fr); }
    .tabs-nav { flex-wrap: wrap; }
    .tab-btn { padding: 14px; font-size: .78rem; }
    .quiz-container { padding: 20px; }
    .quiz-question-text { font-size: 1.35rem; }
    .quiz-option-btn { padding: 14px; gap: 12px; }
    .booklet-footer { padding-left: 22px; padding-right: 22px; }
    .nav-btn { padding: 10px 12px; }
    .nav-btn span { display: none; }
    #uli-mascot-guide { position: relative; right: auto; bottom: auto; align-self: flex-end; margin: 8px 0 20px; }
    #uli-mascot-img { width: 104px; height: 136px; }
    .certificate-card { padding: 24px 16px; }
    .cert-signatures-row { flex-wrap: wrap; gap: 25px; }
  }
  @media (prefers-reduced-motion: no-preference) {
    .booklet-page.active .route-line { stroke-dasharray: 850; stroke-dashoffset: 850; animation: route-draw 1.8s .15s cubic-bezier(.22, 1, .36, 1) forwards; }
    .booklet-page.active .route-line:nth-child(2) { animation-delay: .3s; }
    .booklet-page.active .route-line:nth-child(3) { animation-delay: .45s; }
    @keyframes route-draw { to { stroke-dashoffset: 0; } }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  }
}
@media print {
  .chapter-nav, .skip-link, .guide-close { display: none !important; }
}

@media screen {
  .history-timeline { list-style: none; padding: 0; }
  .history-timeline h4 { margin: 0 0 9px; font: 600 1rem/1.35 var(--font-primary); color: var(--ink); }
  .history-timeline p { margin: 0; font-size: .9rem; line-height: 1.75; color: var(--muted); }
  .source-note { margin-top: 30px; font-size: .7rem; line-height: 1.6; color: var(--muted); }
  .source-review-note { margin: 0 0 32px; padding: 24px 0; border-block: 1px solid var(--rule); }
  .source-review-note strong { display: block; margin-bottom: 10px; color: var(--red); }
  .source-review-note p { max-width: 80ch; font-size: .9rem; line-height: 1.75; margin: 8px 0; }
}
@media screen and (max-width: 520px) { .history-timeline { grid-template-columns: 1fr; } }

.curriculum-review-details > summary { cursor: pointer; padding: 20px 0; font-weight: 600; }
.curriculum-review-details[open] > summary { margin-bottom: 20px; }

/* Verified two-column curriculum, including narrow screens. */
.verified-curriculum .semester-buttons-group { display: flex; flex-wrap: wrap; gap: 8px; }
.verified-curriculum .semester-block[hidden] { display: none !important; }
.verified-curriculum .semester-header { cursor: default; font-size: 1.05rem; }
.verified-curriculum .courses-table { min-width: 0; table-layout: fixed; }
.verified-curriculum .courses-table th:last-child,
.verified-curriculum .courses-table td:last-child { width: 80px; text-align: center; }
.verified-curriculum .courses-table td { overflow-wrap: anywhere; }
.curriculum-edition { margin-bottom: 8px; }
.curriculum-source { margin-top: 28px; font-size: .8rem; }
.verified-curriculum a { text-decoration: underline; text-underline-offset: 3px; }

/* Quality: the result has context; the process reads as a continuous route. */
.quality-score { display: grid; grid-template-columns: minmax(210px, .7fr) minmax(0, 1.5fr); gap: clamp(32px, 5vw, 80px); align-items: center; padding: 12px 0 40px; margin-bottom: 44px; border-bottom: 1px solid #d9d5cb; }
.quality-eyebrow { display: block; color: #68675e; font: 500 .65rem/1.5 'Segoe UI', Arial, sans-serif; text-transform: uppercase; letter-spacing: .13em; }
.quality-score-value { color: #ba2925; font: 400 clamp(6rem, 10vw, 9rem)/1.05 'Iowan Old Style', 'Palatino Linotype', Georgia, serif; letter-spacing: -.065em; margin: 12px 0 4px; }
.quality-score-value > span { display: inline-block; font-size: .36em; letter-spacing: -.04em; margin-left: .16em; vertical-align: baseline; }
.quality-score-stat h3 { font: 500 1rem/1.4 'Segoe UI', Arial, sans-serif; margin: 0 0 24px; color: #252521; }
.quality-score-track { height: 5px; background: #dedad0; }
.quality-score-fill { display: block; width: 88%; height: 100%; background: #ba2925; transform-origin: left; }
.quality-score-scale { display: flex; justify-content: space-between; margin-top: 8px; color: #68675e; font-size: .65rem; }
.quality-score-context { border-left: 1px solid #d9d5cb; padding-left: clamp(24px, 4vw, 64px); }
.quality-score-context p { max-width: 69ch; margin: 16px 0 20px; font-size: 1rem; line-height: 1.85; color: #383932; }
.quality-score-source { color: #68675e; font-size: .7rem; line-height: 1.6; }
.quality-cycle { margin: 44px 0; padding: 32px 0; border-block: 1px solid #d9d5cb; }
.quality-cycle-heading h4 { margin: 8px 0 30px; color: #252521; font: 400 clamp(1.6rem, 2.4vw, 2.2rem)/1.2 'Iowan Old Style', 'Palatino Linotype', Georgia, serif; letter-spacing: -.025em; }
.quality-cycle-steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; margin: 0; }
.quality-cycle-step { position: relative; padding: 0 26px 24px 0; }
.quality-cycle-step::before { content: ''; position: absolute; left: 0; right: 0; top: 18px; border-top: 1px solid #bdb9ae; }
.quality-cycle-step:not(:nth-child(4))::after { content: ''; position: absolute; right: 22px; top: 15px; width: 6px; height: 6px; border-top: 1px solid #bdb9ae; border-right: 1px solid #bdb9ae; transform: rotate(45deg); }
.quality-step-number { position: relative; display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 18px; border: 1px solid #ba2925; border-radius: 50%; background: #f6f3eb; color: #ba2925; font: 500 .7rem/1 'Segoe UI', Arial, sans-serif; }
.quality-cycle-step h5, .quality-cycle-return h5 { margin: 0 0 8px; color: #252521; font: 400 1.55rem/1.2 'Iowan Old Style', 'Palatino Linotype', Georgia, serif; }
.quality-cycle-step p, .quality-cycle-return p { margin: 0; color: #68675e; font-size: .9rem; line-height: 1.7; max-width: 26ch; }
.quality-cycle-return { grid-column: 1 / -1; position: relative; display: flex; align-items: center; gap: 18px; margin-top: 4px; padding: 24px 0 0; border-top: 1px solid #ba2925; }
.quality-cycle-return::before { content: ''; position: absolute; top: -12px; right: 0; height: 11px; border-right: 1px solid #ba2925; }
.quality-cycle-return > svg { flex: 0 0 32px; width: 32px; height: 32px; fill: none; stroke: #ba2925; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.quality-cycle-return h5 { color: #ba2925; font-size: 1.25rem; }
.quality-cycle-return p { max-width: none; }
@media screen and (max-width: 700px) {
  .quality-score { grid-template-columns: 1fr; gap: 26px; padding-bottom: 30px; margin-bottom: 32px; }
  .quality-score-stat { max-width: 360px; width: 100%; }
  .quality-score-value { font-size: 7.5rem; }
  .quality-score-context { border-left: 0; padding-left: 0; }
  .quality-cycle { padding-block: 26px; margin-block: 32px; }
  .quality-cycle-steps { grid-template-columns: 1fr; }
  .quality-cycle-step { padding: 0 0 28px 58px; min-height: 108px; }
  .quality-cycle-step::before { left: 18px; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 1px solid #bdb9ae; }
  .quality-cycle-step:not(:nth-child(4))::after { left: 15px; right: auto; top: auto; bottom: 13px; transform: rotate(135deg); }
  .quality-step-number { position: absolute; left: 0; top: 0; margin: 0; }
  .quality-cycle-step h5 { padding-top: 4px; }
  .quality-cycle-step p { max-width: none; }
  .quality-cycle-return { margin: 0 0 0 18px; padding: 22px 0 0 39px; border-top: 0; border-left: 1px solid #ba2925; align-items: flex-start; }
  .quality-cycle-return::before { right: auto; left: -4px; top: 0; width: 7px; height: 7px; border-right: 0; border-top: 1px solid #ba2925; border-left: 1px solid #ba2925; transform: rotate(45deg); }
  .quality-cycle-return > svg { display: none; }
}
