:root {
  --ink: #15201f;
  --muted: #5c6967;
  --paper: #f7f5ef;
  --white: #ffffff;
  --teal: #0b6b69;
  --teal-dark: #064b4a;
  --teal-pale: #dfecea;
  --red: #c94d3f;
  --gold: #d7a83f;
  --line: #cfd7d4;
  --focus: #ffcc4d;
  --shadow: 0 18px 50px rgba(12, 32, 30, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", Arial, sans-serif;
  letter-spacing: 0;
}
button, input { font: inherit; }
button { letter-spacing: 0; }
button:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  color: var(--white);
  background: rgba(13, 24, 23, .92);
  backdrop-filter: blur(14px);
}
.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--white);
  border-radius: 50%;
  font: 700 20px/1 "Source Serif 4", Georgia, serif;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; }
.brand small { margin-top: 2px; color: #c9d2d0; font-size: 11px; }
.progress-wrap { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.progress-track { width: 120px; height: 4px; overflow: hidden; background: #52605e; }
.progress-track span { display: block; width: 16.67%; height: 100%; background: var(--gold); transition: width .45s ease; }

.course-menu {
  position: fixed;
  z-index: 60;
  inset: 0 auto 0 0;
  width: min(390px, 88vw);
  padding: 32px;
  color: var(--white);
  background: var(--teal-dark);
  transform: translateX(-102%);
  transition: transform .28s ease;
  box-shadow: 20px 0 60px rgba(0,0,0,.25);
}
.course-menu.open { transform: translateX(0); }
.menu-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.menu-heading p { margin: 0; font-size: 13px; color: #c2d9d6; }
.course-menu nav { display: grid; }
.course-menu nav button {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.16);
  color: var(--white);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.course-menu nav button:hover { color: #ffd86b; }
.course-menu nav button span { color: #8bb6b2; font-size: 12px; }
.menu-scrim { position: fixed; z-index: 55; inset: 0; background: rgba(0,0,0,.45); }

.lesson { display: none; min-height: 100svh; padding-top: 72px; }
.lesson.active { display: block; animation: lesson-in .45s ease both; }
@keyframes lesson-in { from { opacity: 0; } to { opacity: 1; } }
.reveal { animation: rise-in .6s ease both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.hero { position: relative; min-height: 100svh; overflow: hidden; color: var(--white); }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,25,24,.94) 0%, rgba(7,25,24,.74) 38%, rgba(7,25,24,.08) 72%); }
.hero-copy {
  position: relative;
  z-index: 2;
  width: min(650px, 90vw);
  padding: clamp(100px, 18vh, 180px) 0 80px clamp(28px, 8vw, 128px);
}
.eyebrow { margin: 0 0 18px; color: var(--teal); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .13em; }
.eyebrow.light { color: #9fd8d4; }
h1, h2, h3 { font-family: "Source Serif 4", Georgia, serif; letter-spacing: 0; }
h1 { margin: 0; font-size: clamp(54px, 8vw, 108px); line-height: .92; }
h2 { margin: 0; font-size: clamp(42px, 6vw, 76px); line-height: 1; }
h3 { font-size: 27px; }
.lead { max-width: 610px; margin: 28px 0; font-size: clamp(19px, 2.2vw, 27px); line-height: 1.45; color: #e6edeb; }
.lead.dark { color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 26px; margin: 0 0 34px; }
.meta div { padding-right: 26px; border-right: 1px solid rgba(255,255,255,.25); }
.meta div:last-child { border: 0; }
.meta dt { color: #aab8b6; font-size: 11px; text-transform: uppercase; }
.meta dd { margin: 4px 0 0; font-weight: 600; }
.scroll-cue { position: absolute; z-index: 2; right: 30px; bottom: 26px; font-size: 11px; text-transform: uppercase; color: rgba(255,255,255,.7); }

.primary, .secondary {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.primary { color: var(--white); background: var(--teal); }
.primary:hover:not(:disabled) { background: var(--teal-dark); transform: translateY(-2px); }
.primary:disabled { cursor: not-allowed; opacity: .42; }
.secondary { color: var(--teal-dark); background: transparent; border: 1px solid var(--teal); }
.secondary:hover { background: var(--teal-pale); }

.content-lesson { padding-bottom: 0; }
.chapter-intro, .hplj-intro {
  display: grid;
  grid-template-columns: minmax(80px, 160px) 1fr;
  gap: 30px;
  width: min(1120px, 88vw);
  margin: 0 auto;
  padding: 95px 0 70px;
}
.chapter-number { margin: 0; color: var(--red); font: 700 64px/1 "Source Serif 4", Georgia, serif; }
.principle-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  color: var(--white);
  background: var(--teal-dark);
}
.principle { min-height: 275px; padding: 42px clamp(24px, 3vw, 48px); border-right: 1px solid rgba(255,255,255,.18); }
.principle:last-child { border: 0; }
.principle-no { color: #83b8b4; font-size: 12px; }
.principle h3 { margin: 40px 0 12px; }
.principle p { color: #c9d9d7; line-height: 1.55; }
.contrast-grid { display: grid; grid-template-columns: 1fr 1fr; width: min(1050px, 88vw); margin: 80px auto; }
.contrast { padding: 50px; }
.contrast.bad { background: #efe6e1; }
.contrast.good { color: var(--white); background: var(--teal); }
.label { margin: 0 0 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.contrast blockquote { margin: 0 0 24px; font: 600 26px/1.35 "Source Serif 4", Georgia, serif; }
.contrast > p:last-child { line-height: 1.55; }
.lesson-footer { display: flex; justify-content: space-between; gap: 18px; width: min(1120px, 88vw); margin: 0 auto; padding: 36px 0 60px; }

.scenario-lesson { color: var(--white); background: #102b29; }
.scenario-stage { display: grid; grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr); min-height: calc(100svh - 190px); }
.scenario-copy { display: flex; flex-direction: column; justify-content: center; padding: 70px clamp(38px, 7vw, 110px); background: var(--teal-dark); }
.scenario-copy h2 { max-width: 620px; }
.scenario-context { max-width: 600px; margin: 26px 0 42px; color: #c8d9d7; font-size: 18px; line-height: 1.6; }
.dialogue { display: grid; grid-template-columns: 50px 1fr; gap: 16px; align-items: start; }
.avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--teal-dark); background: #9fd8d4; font-weight: 700; }
.dialogue blockquote { margin: 0; font: 600 22px/1.45 "Source Serif 4", Georgia, serif; }
.decision-panel { display: flex; flex-direction: column; justify-content: center; padding: 70px clamp(36px, 7vw, 100px); }
.choices { display: grid; gap: 12px; }
.choices button, .option-list button {
  width: 100%;
  min-height: 62px;
  padding: 16px 18px;
  border: 1px solid #66817e;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
  line-height: 1.45;
  transition: border .18s ease, background .18s ease;
}
.choices button:hover { border-color: #b6d7d4; background: rgba(255,255,255,.06); }
.choices button.selected { border-color: var(--gold); background: rgba(215,168,63,.12); }
.feedback { min-height: 96px; margin-top: 20px; padding: 18px 0; color: #d7e7e4; line-height: 1.55; }
.feedback strong { color: #ffd86b; }
.dark-footer { background: #102b29; }
.light-button { color: var(--white); border-color: #92b3b0; }
.light-button:hover { color: var(--ink); }

.builder { width: min(820px, 88vw); min-height: 470px; margin: 0 auto 70px; padding: 44px; background: var(--white); box-shadow: var(--shadow); }
.builder-progress { height: 5px; margin-bottom: 38px; background: #e0e6e4; }
.builder-progress span { display: block; width: 25%; height: 100%; background: var(--red); transition: width .3s ease; }
.builder-step { display: none; }
.builder-step.active { display: block; animation: rise-in .35s ease; }
.builder-step h3 { margin: 0 0 24px; }
.option-list { display: grid; gap: 12px; }
.option-list button { color: var(--ink); border-color: var(--line); }
.option-list button:hover { border-color: var(--teal); background: #f2f8f7; }
.option-list button.wrong { border-color: var(--red); background: #fff0ec; }
.option-list button.correct { border-color: var(--teal); background: var(--teal-pale); }
.inline-feedback { min-height: 26px; margin: 20px 0 0; color: var(--muted); }
.builder-result { padding: 34px 0; }
.builder-result h3 { margin: 0 0 15px; }
.builder-result p:not(.eyebrow) { max-width: 660px; margin-bottom: 24px; line-height: 1.6; color: var(--muted); }

.quiz-lesson { background: #e8eeec; }
.quiz-shell { display: grid; grid-template-columns: .72fr 1.28fr; gap: 70px; width: min(1120px, 90vw); margin: 0 auto; padding: 90px 0 60px; }
.quiz-head { position: sticky; top: 120px; align-self: start; }
.quiz-head p:last-child { color: var(--muted); }
fieldset { margin: 0 0 34px; padding: 0; border: 0; }
legend { margin-bottom: 15px; font: 600 21px/1.4 "Source Serif 4", Georgia, serif; }
fieldset label { display: grid; grid-template-columns: 22px 1fr; gap: 10px; margin: 8px 0; padding: 14px; background: rgba(255,255,255,.72); cursor: pointer; line-height: 1.4; }
fieldset label:has(input:checked) { outline: 2px solid var(--teal); background: var(--white); }
input[type="radio"] { accent-color: var(--teal); }
.quiz-result { min-height: 84px; margin-top: 18px; padding: 16px 0; line-height: 1.5; }
.quiz-result.success { color: var(--teal-dark); }
.quiz-result.retry { color: #8a3329; }

.hplj-lesson { padding-bottom: 0; }
.hero-context { max-width: 540px; margin: 0 0 28px; color: #d0dfdd; font-size: 15px; line-height: 1.6; }
.hplj-context { width: min(1050px, 88vw); margin: 0 auto 36px; }
.hplj-context h3 { margin: 0 0 14px; }
.hplj-context p { color: var(--muted); line-height: 1.65; }
.hplj-core-elements { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; width: min(1200px, 94vw); margin: 0 auto 55px; padding: 0; list-style: none; }
.hplj-core-elements li { min-width: 0; padding: 24px 18px; border: 1px solid var(--line); background: var(--white); }
.hplj-core-elements span { color: var(--teal-dark); font-size: 12px; font-weight: 700; line-height: 1.5; }
.hplj-core-elements h3 { margin: 16px 0 12px; font-size: 23px; }
.hplj-core-elements p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.hplj-core-elements .is-demo { border: 2px solid var(--teal); background: var(--teal-pale); }
.hplj-source { width: min(1050px, 88vw); margin: -30px auto 50px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.hplj-source a { color: var(--teal-dark); text-underline-offset: 3px; }
.journey { display: grid; grid-template-columns: repeat(6, 1fr); width: min(1200px, 94vw); margin: 0 auto 70px; }
.journey-step { position: relative; padding: 32px 18px; border-top: 2px solid var(--line); }
.journey-step::before { content: ""; position: absolute; top: -7px; left: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.journey-step.current { color: var(--white); background: var(--teal); border-color: var(--gold); }
.journey-step.current::before { background: var(--gold); }
.journey-step span { font-size: 11px; }
.journey-step p { margin: 28px 0 0; font-weight: 700; }
.journey-step small { display: block; margin-top: 8px; color: inherit; opacity: .72; font-weight: 400; line-height: 1.4; }
.three-levels { display: grid; grid-template-columns: repeat(3, 1fr); width: min(1050px, 90vw); margin: 0 auto 80px; border-block: 1px solid var(--line); }
.three-levels div { display: grid; gap: 8px; padding: 32px; border-right: 1px solid var(--line); }
.three-levels div:last-child { border: 0; }
.three-levels strong { color: var(--red); }
.three-levels span { line-height: 1.5; }
.assignment { width: min(940px, 90vw); margin: 0 auto; padding: 55px; color: var(--white); background: var(--teal-dark); }
.assignment h3 { margin: 0 0 14px; font-size: 36px; }
.assignment p:not(.eyebrow), .assignment li { color: #d0dfdd; line-height: 1.55; }
.assignment-check { display: flex; align-items: center; gap: 12px; min-height: 48px; margin-top: 26px; padding: 0; border: 0; color: var(--white); background: transparent; cursor: pointer; }
.check-box { display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid #98c4c0; }
.assignment-check[aria-pressed="true"] .check-box::after { content: "✓"; color: #ffd86b; font-weight: 700; }
.completion { width: min(760px, 88vw); margin: 90px auto 50px; text-align: center; }
.completion h3 { margin: 0 0 12px; font-size: 42px; }
.completion p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.completion .primary { margin-top: 14px; }
.prototype-note { display: block; margin-top: 28px; color: #7a8583; line-height: 1.5; }

@media (max-width: 850px) {
  .topbar { padding: 0 16px; }
  .progress-track { width: 72px; }
  .hero-overlay { background: linear-gradient(90deg, rgba(7,25,24,.92), rgba(7,25,24,.58)); }
  .hero-copy { padding-left: 28px; }
  .principle-band { grid-template-columns: 1fr 1fr; }
  .principle:nth-child(2) { border-right: 0; }
  .principle:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.18); }
  .scenario-stage, .quiz-shell { grid-template-columns: 1fr; }
  .scenario-copy { padding-top: 90px; }
  .quiz-head { position: static; }
  .journey { grid-template-columns: 1fr 1fr; }
  .hplj-core-elements { grid-template-columns: 1fr 1fr; }
  .three-levels { grid-template-columns: 1fr; }
  .three-levels div { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .brand small, .progress-track { display: none; }
  .topbar { grid-template-columns: auto 1fr auto; }
  .hero { min-height: 100svh; }
  .hero img { object-position: 66% center; }
  .hero-overlay { background: linear-gradient(0deg, rgba(7,25,24,.96) 0%, rgba(7,25,24,.58) 70%, rgba(7,25,24,.28) 100%); }
  .hero-copy { display: flex; flex-direction: column; justify-content: flex-end; width: 100%; min-height: calc(100svh - 72px); padding: 70px 22px 50px; }
  .meta { gap: 13px; }
  .meta div { padding-right: 13px; }
  .scroll-cue { display: none; }
  .chapter-intro, .hplj-intro { grid-template-columns: 1fr; padding: 65px 0 45px; }
  .chapter-number { font-size: 42px; }
  .principle-band { grid-template-columns: 1fr; }
  .principle { min-height: 210px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .principle h3 { margin-top: 22px; }
  .contrast-grid { grid-template-columns: 1fr; }
  .contrast { padding: 34px 26px; }
  .scenario-stage { display: block; }
  .scenario-copy, .decision-panel { padding: 50px 24px; }
  .builder { width: 100%; margin-bottom: 30px; padding: 32px 22px; box-shadow: none; }
  .quiz-shell { width: 88vw; padding-top: 65px; gap: 35px; }
  .journey { grid-template-columns: 1fr; width: 88vw; }
  .hplj-core-elements { grid-template-columns: 1fr; width: 88vw; }
  .journey-step { padding: 22px; }
  .three-levels { width: 88vw; }
  .assignment { width: 100%; padding: 45px 24px; }
  .lesson-footer { flex-direction: column-reverse; }
  .lesson-footer button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Return to the existing ACREDOS case section from every chapter. */
.acredos-return { display:inline-flex; align-items:center; min-height:24px; color:#c9e4df; font-size:11px; font-weight:600; line-height:1.3; text-decoration:underline; text-underline-offset:3px; }
.acredos-return:hover { color:#fff; }
.acredos-return:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
@media(max-width:560px) { .topbar { gap:10px; padding:0 12px; } .brand { gap:8px; min-width:0; } .brand-mark { display:none; } .acredos-return { max-width:200px; } }

/* Keep the title inside narrow screens and introductory text legible over the image. */
.hero .eyebrow { color:#9fd8d4; }
@media(max-width:560px) { .hero h1 { font-size:clamp(32px,10vw,54px); } }
