@font-face { font-family: Montserrat; src: url("assets/fonts/Montserrat-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Montserrat; src: url("assets/fonts/Montserrat-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: Montserrat; src: url("assets/fonts/Montserrat-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --ink: #17364b;
  --muted: #4d6574;
  --paper: #ffffff;
  --canvas: #eef6f7;
  --line: #d3e2e5;
  --blue: #287f9f;
  --cyan: #4db9c7;
  --red: #c82f4d;
  --eu-blue: #003399;
  --green: #16866a;
  --purple: #6653a9;
  --shadow: 0 18px 46px rgba(23, 54, 75, 0.12);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 0 0, #fff 0, transparent 28rem), var(--canvas); font-family: Montserrat, "Segoe UI", Arial, sans-serif; font-size: 18px; line-height: 1.65; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: .18em; }
p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }
h1, h2 { line-height: 1.18; margin: 0 0 1rem; font-weight: 700; overflow-wrap: break-word; }
h1 { font-size: clamp(2rem, 3.8vw, 3rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.25rem, 2vw, 1.65rem); letter-spacing: -.02em; }
strong, b { font-weight: 700; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 100; top: .5rem; left: .5rem; transform: translateY(-160%); padding: .65rem 1rem; border-radius: 10px; color: white; background: var(--ink); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.course-header { position: sticky; z-index: 20; top: 0; background: rgba(255,255,255,.96); box-shadow: 0 4px 20px rgba(23,54,75,.06); backdrop-filter: blur(14px); }
.brand-row, .course-bar { width: min(1180px, 100% - 48px); margin-inline: auto; }
.brand-row { display: flex; min-height: 74px; align-items: center; justify-content: space-between; gap: 2rem; padding-block: .5rem; }
.vita-brand { display: flex; align-items: center; gap: .75rem; max-width: 520px; }
.vita-mark { flex: 0 0 54px; width: 54px; height: 54px; object-fit: contain; }
.vita-title-local { color: var(--blue); font-size: clamp(.8rem, 1.45vw, 1.08rem); line-height: 1.25; }
.eu-brand { flex-shrink: 0; }
.eu-brand img { width: min(315px, 34vw); }
.course-bar { position: relative; min-height: 76px; border-top: 1px solid rgba(40,127,159,.16); }
.chapter-nav { display: flex; width: calc(100% - 76px); min-height: 66px; align-items: center; justify-content: space-between; gap: .3rem; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #b9d1d7 transparent; }
.chapter-nav button { flex: 0 0 auto; min-height: 34px; padding: .3rem .65rem; border: 0; border-radius: 10px; color: #607684; background: transparent; font-size: .87rem; font-weight: 700; white-space: nowrap; transition: color .16s ease, background .16s ease; }
.chapter-nav button:hover { color: var(--ink); background: #edf3f4; }
.chapter-nav button[aria-current="page"] { color: white; background: var(--ink); box-shadow: 0 3px 9px rgba(23,54,75,.16); }
.chapter-nav button:focus-visible { outline-offset: -3px; }
.progress-shell { position: absolute; right: 0; bottom: 5px; left: 0; }
.progress-meta { position: absolute; right: 0; bottom: 21px; width: 68px; color: var(--muted); font-size: .8rem; line-height: 1; text-align: right; font-weight: 700; }
.progress-track { height: 5px; overflow: hidden; border-radius: 99px; background: #dbe8ea; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan), var(--red)); transition: width .28s ease; }

.lesson-stage { max-width: 1280px; min-height: 72vh; margin: 0 auto; padding: clamp(2.2rem, 5vw, 4rem) 2rem 7rem; }
.lesson-stage:focus { outline: none; }
.lesson-page { animation: enter .35s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }
.eyebrow, .section-kicker, .question-kicker { margin-bottom: .7rem; color: var(--blue); font-size: .9rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.theme-red .eyebrow, .theme-takeaway .eyebrow { color: var(--red); }
.theme-green .eyebrow { color: var(--green); }
.theme-purple .eyebrow, .theme-quiz .eyebrow { color: var(--purple); }
.section-heading { max-width: 980px; margin-bottom: 2rem; }
.section-heading > p:last-child { max-width: 72ch; }
.subtitle { margin-bottom: 1.6rem; color: var(--red); font-size: clamp(1.2rem, 2.3vw, 1.6rem); font-weight: 700; line-height: 1.45; }
.reading-copy { max-width: 68ch; font-size: 1.05rem; }
.hero-grid, .reading-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero-grid { align-items: stretch; }
.hero-grid h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.hero-media { display: flex; flex-direction: column; }
.hero-media img { flex: 1 1 0; min-height: 0; height: 0; max-height: none; }
.hero-media figcaption { flex: 0 0 auto; }
.contributors-inline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: 1.5rem 0 0; }
.contributors-inline > div { padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.8); }
.contributors-inline dt, .credits-list dt { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.contributors-inline dd, .credits-list dd { margin: .2rem 0 0; font-weight: 700; }
.contributor-name, .contributor-org { display: block; }
.contributor-name { margin-bottom: .2rem; }
.contributor-org { color: var(--muted); font-size: .86rem; font-weight: 400; line-height: 1.45; }
.media-card { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.media-card img { width: 100%; max-height: 520px; object-fit: cover; }
.media-card.contained img { object-fit: contain; padding: 1rem; background: white; }
.media-card figcaption { padding: .8rem 1rem 1rem; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.workflow-figure { max-width: 960px; margin: 1.8rem auto; }
.workflow-figure img { max-height: 360px; }
.content-card, .question-card, .fact-card { min-width: 0; padding: clamp(1.4rem, 3vw, 2.2rem); border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.content-card > p, .objective-card > p { max-width: 78ch; }
.objective-card { margin-top: 2.2rem; border-left: 7px solid var(--cyan); }
.objective-card h2 { margin-top: 1.5rem; }
.spaced-card { margin-top: 2rem; }
.question-card { border-left: 7px solid var(--red); }
.question-card h2 { max-width: 65ch; }
.question-kicker { color: var(--red); }
.fact-card { color: white; background: var(--ink); border-color: var(--ink); }
.fact-card .question-kicker { color: var(--cyan); }
.fact-card h2 { font-size: clamp(1.5rem, 2.5vw, 2.2rem); }
.fact-card p { max-width: 70ch; }
.three-cards, .application-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; align-items: stretch; }
.three-cards article, .application-grid article { min-width: 0; padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.three-cards span { display: inline-grid; width: 2.3rem; height: 2.3rem; place-items: center; border-radius: 50%; color: white; background: var(--blue); font-weight: 700; }
.three-cards h2 { margin: 1rem 0 .7rem; }
.application-grid article { display: flex; flex-direction: column; }
.application-grid b { color: var(--purple); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.application-grid h2 { margin: .7rem 0; }
.prompt-grid, .paired-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; align-items: stretch; }
.prompt-example { margin: 1rem 0; padding: 1.2rem 1.4rem; border-left: 5px solid var(--cyan); border-radius: 0 14px 14px 0; color: var(--ink); background: #eef6f7; font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; line-height: 1.5; }
.checkpoint { padding: .9rem 1rem; border-radius: 12px; color: #126c56; background: #eff8f3; }
.step-list { display: grid; gap: 1rem; padding: 0; margin: 1.5rem 0 0; list-style: none; counter-reset: stage; }
.step-list li { display: grid; grid-template-columns: 2.7rem minmax(0, 1fr); align-items: start; gap: 1rem; padding: 1.3rem 1.5rem; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); counter-increment: stage; }
.step-list li::before { display: grid; width: 2.7rem; height: 2.7rem; place-items: center; content: counter(stage); border-radius: 50%; color: white; background: var(--green); font-weight: 700; }
.step-list h2 { margin-bottom: .5rem; }
.step-list p { max-width: 76ch; }
.check-list, .source-list { margin-top: 0; padding-left: 1.4rem; }
.check-list li, .source-list li { margin-bottom: .55rem; }
.check-list li::marker { color: var(--green); }
.roomy-list { margin-bottom: 0; max-width: 78ch; }
.roomy-list li { padding-left: .3rem; margin-bottom: 1.2rem; }
.roomy-list li:last-child { margin-bottom: 0; }
.source-note { margin-top: 1.5rem; color: var(--muted); font-size: .86rem; }
.source-links a { margin-top: auto; font-weight: 700; }

.term-note { margin-top: 1.5rem; border: 1px solid var(--line); border-radius: 14px; background: white; }
.term-note-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; border: 0; border-radius: 14px; color: var(--ink); background: transparent; text-align: left; font-weight: 700; }
.term-note-toggle::after { content: "↓"; flex: 0 0 auto; color: var(--blue); font-size: 1.1rem; transition: transform .38s cubic-bezier(.22,1,.36,1), color .3s ease; }
.term-note.is-open .term-note-toggle::after { color: var(--red); transform: rotate(180deg); }
.term-note-body { display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition: grid-template-rows .42s cubic-bezier(.22,1,.36,1), opacity .3s ease, visibility .42s; }
.term-note.is-open .term-note-body { grid-template-rows: 1fr; opacity: 1; visibility: visible; }
.term-note-body > div { min-height: 0; overflow: hidden; transform: translateY(-.4rem); transition: transform .42s cubic-bezier(.22,1,.36,1); }
.term-note.is-open .term-note-body > div { transform: translateY(0); }
.term-note-body p { margin: 0; padding: 0 1.15rem 1rem; }
.faq-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.faq-grid .term-note { margin-top: 0; align-self: start; }
.faq-grid .term-note-toggle { min-height: 96px; }

.primary-action, .secondary-action { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: .65rem; padding: .8rem 1.25rem; border: 0; border-radius: 14px; font-size: .95rem; font-weight: 700; transition: transform .16s ease, box-shadow .16s ease; }
.primary-action { color: white; background: var(--red); box-shadow: 0 9px 20px rgba(200,47,77,.22); }
.secondary-action { color: var(--ink); background: white; border: 1px solid var(--line); }
.primary-action:hover, .secondary-action:hover { transform: translateY(-2px); }
.home-start-action, .lesson-controls { position: fixed; z-index: 19; right: 0; bottom: 0; left: 0; display: flex; min-height: 76px; align-items: center; gap: 1rem; padding: .7rem max(20px, calc((100vw - 1180px) / 2)); border-top: 1px solid var(--line); background: rgba(238,246,247,.96); box-shadow: 0 -8px 24px rgba(23,54,75,.07); backdrop-filter: blur(14px); }
.home-start-action { justify-content: center; }
.lesson-controls { justify-content: space-between; padding-bottom: max(.7rem, env(safe-area-inset-bottom)); }
.dot-nav { display: flex; justify-content: center; align-items: center; gap: .45rem; }
.dot-nav button { width: 12px; height: 12px; padding: 0; border: 0; border-radius: 50%; background: #adc4ca; transition: width .18s ease, background .18s ease; }
.dot-nav button[aria-current="page"] { width: 30px; border-radius: 99px; background: var(--red); }
.lesson-controls #next-button.is-unavailable { visibility: hidden; }

.quiz-form { display: grid; gap: 1.2rem; max-width: 940px; margin-inline: auto; }
.quiz-card { min-width: 0; margin: 0; padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.quiz-card legend { padding: 0 .5rem; font-size: 1.1rem; font-weight: 700; line-height: 1.5; }
.quiz-card legend span { display: inline-grid; width: 2rem; height: 2rem; margin-right: .6rem; place-items: center; border-radius: 50%; color: white; background: var(--purple); font-size: .85rem; }
.quiz-card > label { display: flex; align-items: baseline; gap: .7rem; padding: .7rem .8rem; margin: .35rem 0; border-radius: 10px; cursor: pointer; }
.quiz-card > label:hover { background: #eef4f5; }
.quiz-card > label:focus-within { outline: 3px solid var(--cyan); outline-offset: 1px; }
.quiz-card input { flex: 0 0 auto; margin: 0; accent-color: var(--red); }
.quiz-card.is-correct { border-color: var(--green); background: #f1fbf7; }
.quiz-card.is-wrong { border-color: var(--red); background: #fff5f6; }
.answer-feedback { display: none; margin: .75rem 0 0; font-weight: 700; }
.quiz-card.is-correct .answer-feedback, .quiz-card.is-wrong .answer-feedback { display: block; }
.quiz-card.is-correct .answer-feedback { color: #0d7157; }
.quiz-card.is-wrong .answer-feedback { color: #a51f3a; }
.quiz-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.quiz-result { padding: 1.5rem; color: white; background: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.quiz-result strong { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.quiz-result p { margin: .4rem 0 0; }

.credits-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1.2rem; align-items: stretch; }
.credits-list { margin: 0; }
.credits-list > div { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.project-id { overflow-wrap: anywhere; font-size: .9rem; }
.attachments-title { margin: 1.5rem 0 1rem; }
.attachment-list { display: grid; gap: .8rem; }
.download-link { display: flex; align-items: center; gap: .9rem; padding: 1rem; border-radius: 15px; color: white; text-decoration: none; background: var(--red); box-shadow: 0 10px 24px rgba(200,47,77,.22); transition: transform .16s ease; }
.download-link:hover { transform: translateY(-2px); }
.download-link.practice { background: var(--blue); box-shadow: 0 10px 24px rgba(40,127,159,.22); }
.download-link > span:first-child { font-size: 1.5rem; }
.download-link > span:last-child { min-width: 0; }
.download-link strong, .download-link small { display: block; }
.download-link small { margin-top: .25rem; font-size: .8rem; overflow-wrap: anywhere; }
.practice-download { max-width: 680px; margin-top: 2rem; }
.legal-card { display: flex; flex-direction: column; gap: 1rem; }
.copyright-line { margin: 0; }
.license-row { display: grid; grid-template-columns: 145px minmax(0, 1fr); align-items: center; gap: 1.4rem; padding: 1.2rem; border-radius: 16px; background: #eef5f6; }
.license-row img { width: 145px; }
.license-row p, .disclaimer-block p { margin: 0; }
.disclaimer-block { margin-top: auto; padding: 1.2rem; border: 1px solid var(--line); border-radius: 16px; }
.disclaimer-block img { width: min(300px, 100%); margin-bottom: 1.2rem; }

@media (max-width: 900px) {
  .hero-grid, .reading-layout, .credits-grid, .prompt-grid, .paired-cards, .three-cards, .application-grid, .faq-grid { grid-template-columns: 1fr; }
  .hero-media img { height: auto; flex: none; }
  .hero-media { max-width: 680px; width: 100%; justify-self: center; }
  .faq-grid .term-note-toggle { min-height: 0; }
  .license-row { grid-template-columns: 145px minmax(0, 1fr); }
  .chapter-nav { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .brand-row, .course-bar { width: calc(100% - 24px); }
  .brand-row { min-height: 62px; gap: .65rem; }
  .vita-brand { gap: .4rem; }
  .vita-mark { flex-basis: 44px; width: 44px; height: 44px; }
  .vita-title-local { font-size: .7rem; }
  .eu-brand img { width: min(190px, 33vw); }
  .chapter-nav { gap: .25rem; }
  .chapter-nav button { padding-inline: .55rem; }
  .lesson-stage { padding: 2rem 1rem 7rem; }
  .contributors-inline { grid-template-columns: 1fr; }
  .hero-grid { gap: 1.5rem; }
  .step-list li { grid-template-columns: 2.3rem minmax(0, 1fr); gap: .7rem; padding: 1.1rem; }
  .step-list li::before { width: 2.3rem; height: 2.3rem; }
  .home-start-action, .lesson-controls { gap: .5rem; padding-inline: 12px; }
  .lesson-controls .primary-action, .lesson-controls .secondary-action { padding: .7rem .8rem; font-size: .85rem; }
  .dot-nav { gap: .3rem; }
  .dot-nav button { width: 9px; height: 9px; }
  .dot-nav button[aria-current="page"] { width: 20px; }
  .license-row { grid-template-columns: 1fr; }
  .quiz-card { padding: 1rem; }
  .quiz-card > label { padding-inline: .4rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .course-header, .lesson-controls, .home-start-action, .skip-link, .quiz-actions { display: none !important; }
  body { background: white; }
  .lesson-stage { max-width: none; padding: 0; }
  .lesson-page[hidden] { display: block !important; }
  .lesson-page { break-after: page; animation: none; }
  .content-card, .media-card, .quiz-card, .fact-card { box-shadow: none; }
  .term-note-body { grid-template-rows: 1fr; opacity: 1; visibility: visible; }
  .term-note-body > div { transform: none; }
}
