﻿:root {
  --ink: #14202e;
  --muted: #5d6a78;
  --line: #d9e1e7;
  --bg: #f6f8f7;
  --panel: #ffffff;
  --blue: #1769aa;
  --teal: #117b72;
  --red: #ba3f3f;
  --gold: #b37b22;
  --green: #2d7d46;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

.app-header {
  min-height: 280px;
  padding: 36px clamp(18px, 4vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: end;
  color: white;
  background:
    linear-gradient(120deg, rgba(10, 32, 54, .88), rgba(12, 84, 103, .70)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 380'%3E%3Crect width='1200' height='380' fill='%23161f2e'/%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.35' stroke-width='5'%3E%3Cpath d='M0 205h120l35-95 58 190 44-117h110l32-55 36 55h102l44-124 56 210 42-125h120l26 39h155l52-79 38 79h129'/%3E%3Cpath d='M0 265h160l20-35 26 35h170l25-42 35 42h280l30-48 35 48h420' opacity='.45'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.22'%3E%3Ccircle cx='138' cy='110' r='8'/%3E%3Ccircle cx='258' cy='300' r='7'/%3E%3Ccircle cx='594' cy='60' r='9'/%3E%3Ccircle cx='880' cy='250' r='8'/%3E%3C/g%3E%3C/svg%3E") center/cover;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  font-weight: 800;
  color: var(--teal);
}

.app-header .eyebrow { color: #9ce5dc; }

h1, h2, h3 { line-height: 1.1; margin: 0; letter-spacing: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 5.4rem); max-width: 900px; }
h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); }
h3 { font-size: 1.05rem; margin-bottom: 10px; }
p { line-height: 1.6; color: var(--muted); }

.lede {
  max-width: 760px;
  color: #e9f7f5;
  font-size: 1.15rem;
}

.version-line {
  display: inline-block;
  margin: 10px 0 0;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 6px;
  color: #e9f7f5;
  background: rgba(255,255,255,.14);
  font-size: .9rem;
  font-weight: 900;
}

.progress-card {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 8px;
  padding: 18px;
  backdrop-filter: blur(8px);
}

.progress-label { display: block; font-size: .85rem; color: #d8f5f0; }
.progress-card strong { display: block; font-size: 2.3rem; margin: 5px 0 12px; }
.meter { height: 10px; background: rgba(255,255,255,.25); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: #8ce0a7; transition: width .25s ease; }
.mini-reset {
  width: 100%;
  margin-top: 12px;
  min-height: 36px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 6px;
  background: rgba(255,255,255,.16);
  color: white;
  font-weight: 800;
  cursor: pointer;
}
.mini-reset:hover { background: rgba(255,255,255,.25); }

.layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 24px;
  padding: 24px clamp(14px, 3vw, 40px);
}

.sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.nav-link {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 13px 12px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.nav-link:hover, .nav-link.active { background: #e8f3f2; color: #075a55; }

.content { min-width: 0; }
.panel {
  display: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(20px, 4vw, 42px);
  min-height: 620px;
}
.panel.active { display: block; }
.section-head { margin-bottom: 24px; }

.objective-grid, .cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.learner-panel {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: end;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  padding: 18px;
  background: #f8fbfd;
  margin-bottom: 22px;
}

.learner-fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 10px;
  align-items: end;
}

.learner-fields label {
  display: grid;
  gap: 6px;
  font-weight: 800;
  color: var(--ink);
}

.learner-fields span {
  font-size: .82rem;
}

.learner-fields input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
}

.learner-status {
  grid-column: 1 / -1;
  margin: 0;
  font-weight: 800;
  color: var(--teal);
}

.objective-grid div, .cards section, .callout, .knowledge-check {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfc;
}

.callout {
  margin: 22px 0;
  border-left: 5px solid var(--teal);
  color: var(--muted);
  line-height: 1.55;
}

.course-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
}

.course-map button {
  border-top: 4px solid var(--blue);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  padding: 12px;
  background: #edf4fa;
  min-height: 120px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.course-map button:hover,
.course-map button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  background: #e2f1f0;
}
.course-map span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-weight: 800;
  margin-bottom: 10px;
}
.course-map b, .course-map small, .course-map em { display: block; }
.course-map small { color: var(--muted); line-height: 1.35; margin-top: 6px; }
.course-map em {
  width: fit-content;
  margin-top: 14px;
  border-radius: 999px;
  padding: 6px 10px;
  color: white;
  background: var(--teal);
  font-style: normal;
  font-size: .78rem;
  font-weight: 900;
}

.learner-tip {
  margin-top: 12px;
}

.update-note {
  border-left-color: var(--blue);
  background: #f3f8fb;
}

.update-showcase {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.showcase-head {
  grid-column: 1 / -1;
  border: 1px solid #cbdfe3;
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  padding: 18px;
  background: #f3f8fb;
}

.showcase-head p:last-child {
  margin-bottom: 0;
}

.update-showcase button {
  min-height: 178px;
  border: 0;
  border-radius: 8px;
  padding: 18px;
  color: white;
  text-align: left;
  cursor: pointer;
  background: var(--blue);
  box-shadow: 0 14px 30px rgba(20, 32, 46, .12);
}

.update-showcase button:nth-of-type(2) { background: var(--teal); }
.update-showcase button:nth-of-type(3) { background: var(--gold); }
.update-showcase button:nth-of-type(4) { background: #49586a; }

.update-showcase button:hover,
.update-showcase button:focus-visible {
  outline: 3px solid #9ce5dc;
  outline-offset: 3px;
  filter: brightness(.97);
}

.update-showcase span {
  display: inline-block;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--ink);
  background: rgba(255,255,255,.9);
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.update-showcase strong {
  display: block;
  margin-bottom: 9px;
  font-size: 1.18rem;
  line-height: 1.16;
}

.update-showcase small {
  display: block;
  color: rgba(255,255,255,.9);
  line-height: 1.35;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.choice-card {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  text-align: left;
  background: #fbfcfc;
  cursor: pointer;
}

.choice-card:hover { border-color: var(--teal); background: #f2f8f7; }
.choice-card strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: 1.05rem; }
.choice-card span { display: block; color: var(--muted); line-height: 1.4; }

.summary-grid, .infographic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.summary-grid section, .infographic-grid section, .source-list section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfc;
}

.infographic-grid section {
  border-top: 6px solid var(--blue);
  min-height: 170px;
}

.infographic-grid span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  margin-bottom: 12px;
  color: white;
  background: var(--blue);
  font-weight: 900;
}

.visual-infographics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.visual-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fbfcfc;
  box-shadow: 0 16px 34px rgba(20, 32, 46, .08);
}

.visual-card:before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--green));
}

.visual-wide {
  grid-column: 1 / -1;
}

.visual-hero {
  grid-column: 1 / -1;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(239, 248, 246, .94)),
    radial-gradient(circle at 78% 18%, rgba(23, 105, 170, .16), transparent 34%),
    radial-gradient(circle at 16% 78%, rgba(179, 123, 34, .16), transparent 32%);
}

.visual-kicker {
  width: fit-content;
  margin: 0 0 10px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #0d5c57;
  background: #dff0ee;
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.prevention-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: 16px;
  margin-top: 20px;
  padding: 24px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 9%, rgba(23, 105, 170, .18) 9% 91%, transparent 91%),
    linear-gradient(180deg, transparent 0 48%, rgba(17, 123, 114, .20) 48% 52%, transparent 52%),
    #f8fbfb;
}

.map-core {
  grid-column: 2 / 5;
  grid-row: 2;
  display: grid;
  place-items: center;
  min-height: 210px;
  border-radius: 50%;
  padding: 28px;
  color: white;
  text-align: center;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.22), transparent 28%),
    linear-gradient(135deg, var(--blue), var(--teal) 62%, var(--green));
  box-shadow: 0 22px 46px rgba(20, 32, 46, .20);
}

.map-core small,
.map-core strong,
.map-core em {
  display: block;
}

.map-core small {
  color: rgba(255,255,255,.76);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.map-core strong {
  max-width: 440px;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 1.02;
}

.map-core em {
  color: rgba(255,255,255,.88);
  font-style: normal;
  font-weight: 800;
}

.map-node {
  display: grid;
  align-content: center;
  min-height: 132px;
  border-radius: 8px;
  padding: 16px;
  color: white;
  background: var(--blue);
  box-shadow: 0 14px 28px rgba(20, 32, 46, .14);
}

.map-node span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,.78);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.map-node b {
  line-height: 1.18;
  font-size: 1.03rem;
}

.map-start { grid-column: 1; grid-row: 2; background: #49586a; }
.map-screen { grid-column: 2; grid-row: 1; background: var(--blue); }
.map-sport { grid-column: 4; grid-row: 1; background: var(--gold); }
.map-icd { grid-column: 5; grid-row: 2; background: var(--green); }
.map-follow { grid-column: 3; grid-row: 3; background: var(--teal); }

.story-arc {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.story-arc div {
  position: relative;
  min-height: 190px;
  border-radius: 8px;
  padding: 18px;
  color: white;
  background: var(--blue);
}

.story-arc div:nth-child(2) { background: var(--teal); }
.story-arc div:nth-child(3) { background: var(--gold); }
.story-arc div:nth-child(4) { background: var(--green); }

.story-arc div:after {
  content: "";
  position: absolute;
  top: 50%;
  right: -12px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 12px solid currentColor;
  color: inherit;
  opacity: .35;
  transform: translateY(-50%);
}

.story-arc div:last-child:after { display: none; }

.story-arc span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  margin-bottom: 10px;
  color: var(--ink);
  background: rgba(255,255,255,.92);
  font-size: 1rem;
  font-weight: 900;
}

.story-arc b {
  display: block;
  line-height: 1.25;
  font-size: 1.08rem;
}

.story-arc small {
  display: block;
  margin-top: 10px;
  color: rgba(255,255,255,.9);
  line-height: 1.38;
}

.comparison-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 20px;
}

.comparison-column {
  min-height: 260px;
  border-radius: 8px;
  padding: 18px;
  background: #f5f8fa;
  border: 1px solid var(--line);
}

.old-signal {
  border-top: 7px solid var(--gold);
}

.new-signal {
  border-top: 7px solid var(--teal);
}

.comparison-column strong {
  display: block;
  margin-bottom: 18px;
}

.comparison-column b {
  display: block;
  margin: 14px 0 6px;
  font-size: 1.1rem;
}

.comparison-column p {
  margin: 0;
}

.comparison-arrow {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: white;
  background: var(--blue);
  font-weight: 900;
  text-transform: uppercase;
  font-size: .78rem;
}

.signal-meter {
  position: relative;
  height: 104px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, #e4eaee 0, #e4eaee 1px, transparent 1px, transparent 20%);
  overflow: hidden;
}

.signal-meter span {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--gold), #d39a35);
}

.signal-meter.high span { height: 86%; }
.signal-meter.lower span { height: 38%; background: linear-gradient(180deg, var(--teal), var(--green)); }

.decision-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas:
    "a center center b"
    "c center center d";
  gap: 14px;
  margin-top: 18px;
}

.decision-center {
  grid-area: center;
  display: grid;
  place-items: center;
  min-height: 260px;
  border-radius: 8px;
  padding: 24px;
  color: white;
  text-align: center;
  background: radial-gradient(circle at top left, #2f8f85, var(--blue));
}

.decision-center span {
  display: block;
  margin-bottom: 10px;
  color: rgba(255,255,255,.78);
  font-size: .8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.decision-center strong {
  display: block;
  max-width: 460px;
  font-size: clamp(1.35rem, 3vw, 2.4rem);
  line-height: 1.12;
}

.decision-node {
  min-height: 126px;
  border-radius: 8px;
  padding: 16px;
  color: white;
  background: var(--teal);
}

.node-a { grid-area: a; background: var(--blue); }
.node-b { grid-area: b; background: var(--teal); }
.node-c { grid-area: c; background: var(--gold); }
.node-d { grid-area: d; background: #49586a; }

.decision-node b,
.decision-node small {
  display: block;
}

.decision-node b {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.decision-node small {
  color: rgba(255,255,255,.9);
  line-height: 1.35;
}

.flashcard {
  display: grid;
  align-content: center;
  min-height: 280px;
  border-radius: 8px;
  padding: clamp(24px, 6vw, 54px);
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  cursor: pointer;
}

.flashcard span {
  margin-bottom: 16px;
  color: rgba(255,255,255,.82);
  font-size: .8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.flashcard strong {
  display: block;
  max-width: 850px;
  font-size: clamp(1.45rem, 3vw, 2.5rem);
  line-height: 1.2;
}

.source-list {
  display: grid;
  gap: 12px;
}

.source-list span {
  display: block;
  margin-bottom: 8px;
  color: var(--teal);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.feedback-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfc;
}

.feedback-panel label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.feedback-panel span { color: var(--ink); font-size: .86rem; }

.feedback-panel input,
.feedback-panel select,
.feedback-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
}

.feedback-wide,
.feedback-actions,
.feedback-panel .learner-status {
  grid-column: 1 / -1;
}

.feedback-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.primary, .secondary {
  border: 0;
  border-radius: 6px;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}
.primary { background: var(--blue); color: white; }
.secondary { background: #e7edf1; color: var(--ink); }
.primary:hover { background: #0f568c; }
.secondary:hover { background: #d8e1e7; }

.split, .two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr);
  gap: 24px;
  align-items: start;
}

.check-list {
  padding: 0;
  margin: 18px 0;
  list-style: none;
}
.check-list li {
  position: relative;
  padding-left: 28px;
  margin: 12px 0;
  color: var(--muted);
  line-height: 1.5;
}
.check-list li:before {
  content: "";
  position: absolute;
  left: 0;
  top: .38em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: inset 0 0 0 4px white;
  border: 1px solid var(--teal);
}

.infographic {
  border-radius: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  background: #f2f8f7;
}
.rings {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
}
.rings strong {
  display: grid;
  place-items: center;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  text-align: center;
  padding: 14px;
}
.rings span {
  position: absolute;
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: white;
  border: 2px solid #79bbb4;
  font-weight: 800;
  color: #0d615b;
}
.rings span:nth-child(1) { top: 6px; left: calc(50% - 59px); }
.rings span:nth-child(2) { top: 118px; right: 4px; }
.rings span:nth-child(3) { bottom: 8px; left: calc(50% - 59px); }
.rings span:nth-child(4) { top: 118px; left: 4px; }

.knowledge-check { margin-top: 24px; }
.knowledge-check button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  cursor: pointer;
}
.knowledge-check button.correct { border-color: var(--green); background: #eef8f0; }
.knowledge-check button.wrong { border-color: var(--red); background: #fff0f0; }
.feedback { font-weight: 800; }

.chain, .flow, .return-play {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
}
.chain div, .flow div, .return-play div {
  min-height: 150px;
  border-radius: 8px;
  padding: 16px;
  color: white;
  background: var(--blue);
}
.chain div:nth-child(2), .flow div:nth-child(2), .return-play div:nth-child(2) { background: var(--teal); }
.chain div:nth-child(3), .flow div:nth-child(3), .return-play div:nth-child(3) { background: var(--gold); }
.chain div:nth-child(4), .flow div:nth-child(4), .return-play div:nth-child(4) { background: var(--red); }
.chain div:nth-child(5), .flow div:nth-child(5), .return-play div:nth-child(5) { background: #49586a; }
.chain b, .flow strong, .return-play strong { display: block; margin-bottom: 10px; }
.chain span, .flow span, .return-play span { font-size: .92rem; line-height: 1.4; color: rgba(255,255,255,.92); }

.matrix {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 24px;
}
.matrix div { padding: 14px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); color: var(--muted); }
.matrix div:nth-child(3n) { border-right: 0; }
.matrix .matrix-head { background: #e8f3f2; color: #0d615b; font-weight: 900; }

.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards section { min-height: 150px; }

.risk-scale {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
  color: white;
  font-weight: 900;
}
.risk-scale div {
  min-width: 0;
  min-height: 120px;
  border-radius: 8px;
  padding: 16px;
  background: var(--green);
  overflow-wrap: anywhere;
}
.risk-scale div:nth-child(2) { background: var(--teal); }
.risk-scale div:nth-child(3) { background: var(--gold); }
.risk-scale div:nth-child(4) { background: var(--red); }
.risk-scale span {
  display: block;
  margin-bottom: 8px;
  font-size: .82rem;
  line-height: 1.3;
  color: rgba(255,255,255,.88);
}
.risk-scale b {
  display: block;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.2;
}

#module-4 .two-col {
  grid-template-columns: 1fr;
}

#module-4 .risk-scale {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  margin-top: 0;
}

#module-4 .risk-scale div {
  min-height: 0;
  height: auto;
  overflow: visible;
}

.exam-form { display: grid; gap: 18px; margin-top: 20px; }
.question {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfc;
}
.question legend { font-weight: 900; margin-bottom: 10px; }
.question label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  color: var(--muted);
  line-height: 1.45;
}
.question.correct { border-color: var(--green); }
.question.incorrect { border-color: var(--red); }
.rationale {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 6px;
  background: #eef4f8;
  color: var(--ink);
}
.exam-actions { display: flex; gap: 10px; margin: 20px 0; }
.result {
  display: none;
  padding: 18px;
  border-radius: 8px;
  background: #e8f3f2;
  border: 1px solid #a7d2cc;
  font-weight: 900;
}

.credential {
  display: none;
  margin-top: 20px;
  border: 2px solid var(--blue);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  background: #fff;
}

.credential strong {
  display: block;
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin: 10px 0;
  color: var(--blue);
}

.credential-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
}

.credential-grid span {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.credential-grid b {
  color: var(--muted);
  font-size: .8rem;
  text-transform: uppercase;
}

.credential-grid em {
  font-style: normal;
  font-weight: 900;
}

.records {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.records-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.records-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

th, td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  background: #e8f3f2;
  color: #0d615b;
}

footer {
  padding: 24px clamp(18px, 4vw, 56px) 40px;
  color: var(--muted);
  font-size: .9rem;
}

@media (max-width: 980px) {
  .app-header, .layout, .split, .two-col { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: repeat(2, 1fr); }
  .objective-grid, .course-map, .chain, .flow, .return-play, .risk-scale, .learner-panel, .learner-fields, .choice-grid, .summary-grid, .infographic-grid, .feedback-panel, .visual-infographics, .update-showcase { grid-template-columns: 1fr 1fr; }
  .story-arc, .comparison-visual, .decision-board, .prevention-map {
    grid-template-columns: 1fr;
  }
  .prevention-map {
    grid-template-rows: none;
  }
  .map-core,
  .map-start,
  .map-screen,
  .map-sport,
  .map-icd,
  .map-follow {
    grid-column: auto;
    grid-row: auto;
  }
  .map-core {
    border-radius: 8px;
  }
  .comparison-visual {
    align-items: stretch;
  }
  .comparison-arrow {
    width: 100%;
    height: 42px;
  }
  .decision-board {
    grid-template-areas:
      "center"
      "a"
      "b"
      "c"
      "d";
  }
  .story-arc div:after { display: none; }
}

@media (max-width: 640px) {
  .app-header { min-height: 360px; align-items: end; }
  .sidebar, .objective-grid, .course-map, .chain, .flow, .return-play, .cards, .risk-scale, .matrix, .learner-panel, .learner-fields, .credential-grid, .choice-grid, .summary-grid, .infographic-grid, .feedback-panel, .visual-infographics, .update-showcase {
    grid-template-columns: 1fr;
  }
  .matrix div { border-right: 0; }
  .panel { min-height: auto; }
  .rings { min-height: 420px; }
  .rings span:nth-child(1) { top: 0; left: calc(50% - 59px); }
  .rings span:nth-child(2) { top: 102px; right: calc(50% - 59px); transform: translateX(88px); }
  .rings span:nth-child(3) { bottom: 0; left: calc(50% - 59px); }
  .rings span:nth-child(4) { top: 102px; left: calc(50% - 59px); transform: translateX(-88px); }
}

@media print {
  body { background: white; }
  .app-header, .layout > .sidebar, .panel:not(#exam), .exam-form, .exam-actions, #examResult, .records, footer, #printInfographics {
    display: none !important;
  }
  .layout { display: block; padding: 0; }
  .content, .panel, #exam, .credential {
    display: block !important;
    border: 0;
    min-height: 0;
    padding: 0;
  }
  .section-head { display: none; }
  .credential {
    margin: 1in auto;
    padding: .75in;
    width: 100%;
    border: 3px solid #1769aa;
  }
  body.print-infographics .panel:not(#infographics),
  body.print-infographics #exam,
  body.print-infographics .credential {
    display: none !important;
  }
  body.print-infographics #infographics {
    display: block !important;
  }
  body.print-infographics #infographics .section-head,
  body.print-infographics #infographics .primary {
    display: none;
  }
  body.print-infographics .infographic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  body.print-infographics .infographic-grid section {
    page-break-inside: avoid;
  }
  body.print-infographics .visual-infographics,
  body.print-infographics .story-arc,
  body.print-infographics .comparison-visual,
  body.print-infographics .decision-board {
    grid-template-columns: 1fr;
  }
  body.print-infographics .visual-card {
    page-break-inside: avoid;
  }
}

/* Preserve infographic colors when printing from Chrome/Safari/Edge. The print dialog may still need "Background graphics" enabled. */
* {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
@media print {
  body,
  .visual-map,
  .visual-map div,
  .visual-card,
  .visual-card:before,
  .prevention-map,
  .map-core,
  .map-node,
  .story-arc div,
  .comparison-column,
  .comparison-arrow,
  .signal-meter span,
  .decision-center,
  .decision-node,
  .infographic-grid section,
  .risk-scale div,
  .chain div,
  .flow div,
  .return-play div,
  .course-map span,
  .course-map em,
  .choice-card,
  .summary-grid section,
  .source-list section {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
