:root {
  --navy: #123047;
  --navy-2: #1d425b;
  --teal: #087f79;
  --teal-light: #d9f3ef;
  --coral: #e6634b;
  --gold: #f2b84b;
  --cream: #fffaf1;
  --blue-wash: #edf5f8;
  --ink: #18313f;
  --muted: #5c6f79;
  --line: #d9e3e7;
  --white: #fff;
  --success: #247a54;
  --danger: #b33f32;
  --shadow: 0 16px 40px rgba(18, 48, 71, .1);
  --shadow-soft: 0 8px 24px rgba(18, 48, 71, .08);
  --radius: 14px;
  --ease: cubic-bezier(.22, .8, .28, 1);
  --sidebar: 300px;
  --serif: "Inter", sans-serif;
  --sans: "Inter", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #f4f8fa;
  font: 19px/1.6 var(--sans);
}
button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, h3,
.course-title,
.module-name,
.lesson-title,
.question {
  font-family: var(--serif);
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 20; padding: 10px 16px; background: var(--navy); color: #fff; border-radius: 10px; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.menu-button { position: fixed; top: 14px; left: 14px; z-index: 20; width: 46px; height: 46px; border: 0; border-radius: 12px; color: #fff; background: var(--navy); box-shadow: var(--shadow); font-size: 1.05rem; }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 14; border: 0; background: rgba(18, 48, 71, .45); }
.layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; border-right: 1px solid var(--line); background: #fff; }
.sidebar-head { flex: 0 0 auto; padding: 24px 24px 22px; border-bottom: 1px solid var(--line); }
.course-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.course-title { color: var(--navy); font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.progress-percent { color: var(--teal); font-size: .8rem; font-weight: 800; }
.progress-track { height: 7px; margin-top: 18px; overflow: hidden; border-radius: 20px; background: #e9eef0; }
.progress-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--teal); transition: width .3s ease; }
.course-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 14px 16px; }
.nav-group { padding: 4px 0; border-bottom: 1px solid #eff3f4; }
.nav-group:last-child { border-bottom: 0; }
.module-toggle { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 12px; padding: 14px 10px; text-align: left; background: transparent; }
.module-toggle:hover:not(:disabled) { background: var(--blue-wash); }
.module-toggle:disabled { cursor: not-allowed; opacity: .55; }
.module-copy { min-width: 0; display: grid; gap: 3px; }
.module-eyebrow { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.module-name { color: var(--navy); font-size: 16px; font-weight: 700; line-height: 1.25; }
.chevron { margin-left: auto; flex: 0 0 16px; color: var(--gold); transform-box: fill-box; transform-origin: center; transition: transform .22s ease; }
.module-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.module-lock { margin-left: auto; flex: 0 0 15px; color: var(--muted); }
.module-panel {
  display: grid; gap: 4px; overflow: hidden; max-height: 0; opacity: 0; visibility: hidden;
  transition: max-height .26s ease, opacity .2s ease, visibility 0s linear .26s;
}
.module-panel.open { padding-bottom: 10px; opacity: 1; visibility: visible; transition: max-height .26s ease, opacity .2s ease, visibility 0s; }
.lesson-link { width: 100%; display: flex; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 14px; padding: 10px 12px; text-align: left; background: transparent; }
.lesson-link:hover { background: var(--blue-wash); }
.lesson-link.active { border-color: #8ed4b4; background: #edfaf2; }
.lesson-icon { width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center; border: 1.5px solid #cfdae0; border-radius: 50%; color: transparent; }
.lesson-icon svg { width: 16px; height: 16px; }
.lesson-link.done .lesson-icon { color: #fff; background: var(--teal); border-color: var(--teal); }
.lesson-link.active .lesson-icon { border-color: transparent; background: transparent; color: var(--teal); }
.lesson-link.active .lesson-icon svg { width: 20px; height: 20px; }
.lesson-copy { min-width: 0; display: grid; gap: 0; }
.lesson-name { color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.25; }
.lesson-meta { color: var(--muted); font-size: .74rem; line-height: 1.25; }
.eyebrow { color: var(--teal); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
main { min-width: 0; background: #fff; }
#screen { max-width: 880px; margin: 0 auto; padding: 36px clamp(20px, 4vw, 44px) 96px; }
.hero { display: grid; gap: 30px; }
.hero h1, .lesson-title { margin: 8px 0 12px; color: var(--navy); font-size: clamp(1.7rem, 2.6vw, 2.05rem); line-height: 1.18; letter-spacing: -.03em; }
.hero p { color: var(--muted); }
.hero-art { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream); }
.hero-art img { display: block; width: 100%; aspect-ratio: 5 / 2; object-fit: cover; }
.hero-actions, .lesson-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; justify-content: space-between;}
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border: 1px solid transparent; border-radius: 10px; font-weight: 700; text-decoration: none; transition: background .18s var(--ease), border-color .18s, transform .18s var(--ease), box-shadow .18s var(--ease); }
.button.primary { color: #fff; background: var(--teal); }
.button.secondary { color: var(--navy); background: #fff; border-color: var(--line); }
.button.coral { color: #fff; background: var(--coral); }
.button.primary:hover:not(:disabled) { background: #0a6e69; transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.button.secondary:hover:not(:disabled) { border-color: #9fb4bd; transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .55; }
.section { margin-top: 48px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 20px; }
.section-heading h2 { margin: 0; color: var(--navy); font-size: 1.45rem; }
.section-heading p { margin: 0; color: var(--muted); }
.module-grid, .card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.module-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.module-card-top { display: flex; justify-content: space-between; gap: 16px; }
.module-card h3 { margin: 8px 0 6px; color: var(--navy); font-size: 1.45rem; }
.module-card p { color: var(--muted); }
.pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--blue-wash); color: var(--navy-2); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.pill.available { background: var(--teal-light); color: #075f5b; }
.lesson-hero { display: grid; gap: 22px; margin-bottom: 28px; }
.lesson-hero.has-art { gap: 20px; }
.lesson-hero:has(+ .content-stack > .activity),
.lesson-hero:has(+ .content-stack > .quiz-card) { margin-bottom: 8px; }
.lesson-header { margin-bottom: 0; min-width: 0; }
.lesson-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.kind-chip {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
  font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.kind-chip.learn { background: var(--teal-light); color: #075f5b; }
.kind-chip.practice { background: #fff3d6; color: #8a5d0c; }
.kind-chip.reflect { background: var(--blue-wash); color: var(--navy-2); }
.kind-chip.decide { background: #fde8e4; color: #8a3a30; }
.kind-chip.assess { background: var(--navy); color: #fff; }
.lesson-time { color: var(--muted); font-size: .82rem; font-weight: 650; }
.lesson-intro { margin: 0; color: var(--muted); font-size: 1.02rem; line-height: 1.6; max-width: 40rem; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 6px; }
.content-stack { display: grid; gap: 28px; }
.lesson-figure { margin: 0; }
.lesson-figure img {
  display: block; width: 100%; height: auto; object-fit: contain;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream);
  box-shadow: var(--shadow-soft);
}
.lesson-figure figcaption { margin-top: 9px; text-align: left; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.hero-figure img { width: 100%; height: auto; object-fit: contain; background: var(--cream); }
.card, .activity, .quiz-card { padding: 0; }
.card h2, .card h3, .activity h2, .quiz-card h2 { margin-top: 0; color: var(--navy); font-size: 1.35rem; line-height: 1.3; }
.card p:last-child { margin-bottom: 0; }
.card ul, .card ol { padding-left: 22px; }
.card li { margin-bottom: 7px; }
.callout { display: grid; grid-template-columns: auto 1fr; gap: 15px; padding: 20px 22px; border: 1.5px solid var(--gold); border-radius: var(--radius); background: var(--cream); animation: rise-in .45s var(--ease) both; }
.callout p:last-child { margin-bottom: 0; }
.callout-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: rgba(242, 184, 75, .3); color: #8a5d0c; }
.callout-icon svg { width: 20px; height: 20px; }
.big-quote { margin: 0 0 28px; padding: 20px 24px; border: 1.5px solid var(--teal); border-radius: var(--radius); background: var(--teal-light); color: var(--navy); font-size: 1.12rem; font-weight: 650; line-height: 1.45; }
.big-quote:last-child { margin-bottom: 0; }
.protect-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.protect-grid:has(> :nth-child(2):last-child),
.protect-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); }
.protect-item {
  padding: 16px 18px; border-radius: var(--radius); background: var(--blue-wash);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  animation: rise-in .45s var(--ease) both;
}
.protect-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.protect-item:nth-child(2) { animation-delay: .05s; }
.protect-item:nth-child(3) { animation-delay: .1s; }
.protect-item:nth-child(4) { animation-delay: .15s; }
.protect-item:nth-child(5) { animation-delay: .2s; }
.protect-item:nth-child(6) { animation-delay: .25s; }
.protect-item p:last-child { margin-bottom: 0; }
.item-icon {
  width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 10px;
  border-radius: 9px; background: #fff; color: var(--teal); font-size: .92rem; font-weight: 800;
}
.item-icon svg { width: 19px; height: 19px; }
/* Activities need a visible workspace so a task reads differently from a
   reading page. The header stays on the page; only the task surface is framed. */
.activity-header { margin: 0 0 24px; }
.activity-header h2 { margin: 4px 0 8px; }
.activity-header p {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}
.task-count { display: flex; align-items: center; gap: 12px; margin-top: 16px; color: var(--navy); font-size: .85rem; font-weight: 700; }
.activity-header .task-count:first-child { margin-top: 0; }
.activity > .callout { margin-top: 22px; }
.task-count .count-track { flex: 1 1 auto; max-width: 240px; height: 6px; overflow: hidden; border-radius: 20px; background: #e9eef0; }
.task-count .count-track span { display: block; height: 100%; border-radius: inherit; background: var(--teal); transition: width .3s ease; }
.task-panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fdfefe; box-shadow: var(--shadow-soft); }
.task-hint { margin: 0 0 16px; color: var(--muted); font-size: .9rem; }

.confidence-scale { display: flex; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.confidence-row { display: grid; grid-template-columns: 150px 1fr 44px; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid #eef3f5; }
.confidence-row:last-of-type { border-bottom: 0; }
.confidence-row label { color: var(--navy); font-weight: 650; }
input[type="range"] { width: 100%; height: 22px; accent-color: var(--teal); }
.range-value { width: 42px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--teal-light); color: #075f5b; font-weight: 800; }

/* Shared option button used by quizzes, matching, sorting and scenarios. */
.choice, .match-choice, .myth-choice {
  width: 100%; display: flex; align-items: center; gap: 13px; min-height: 58px;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 16px;
  color: var(--ink); text-align: left; line-height: 1.45; background: #fff;
  transition: border-color .18s, background .18s, box-shadow .18s, transform .18s var(--ease);
}
.choice:hover:not(:disabled), .match-choice:hover:not(:disabled), .myth-choice:hover:not(:disabled) {
  border-color: var(--teal); box-shadow: 0 6px 16px rgba(18, 48, 71, .08); transform: translateY(-2px);
}
.choice:disabled, .match-choice:disabled, .myth-choice:disabled { cursor: default; }
.choice-marker {
  flex: 0 0 28px; width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 50%; background: var(--blue-wash); color: var(--navy-2);
  font-size: .82rem; font-weight: 800;
}
.choice-marker svg { width: 15px; height: 15px; }
.choice.selected { border-color: var(--navy); background: var(--blue-wash); }
.choice.selected .choice-marker { background: var(--navy); color: #fff; }
.choice.correct, .match-choice.correct, .myth-choice.correct { border-color: var(--success); background: #eaf6ef; animation: pop-ok .4s var(--ease); }
.choice.correct .choice-marker, .myth-choice.correct .choice-marker { background: var(--success); color: #fff; }
.choice.wrong, .match-choice.wrong, .myth-choice.wrong { border-color: var(--danger); background: #fdf1ef; animation: shake-soft .4s ease; }
.choice.wrong .choice-marker, .myth-choice.wrong .choice-marker { background: var(--danger); color: #fff; }
.question { margin: 0 0 18px; color: var(--navy); font-size: 1.2rem; font-weight: 700; line-height: 1.35; }
.choices { display: grid; gap: 10px; }
.choices.enter .choice { animation: rise-in .4s var(--ease) both; }
.choices.enter .choice:nth-child(2) { animation-delay: .05s; }
.choices.enter .choice:nth-child(3) { animation-delay: .1s; }
.choices.enter .choice:nth-child(4) { animation-delay: .15s; }
.choices.enter .choice:nth-child(5) { animation-delay: .2s; }

.match-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.match-column { display: grid; align-content: start; gap: 10px; }
.match-label { margin: 0; color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.match-choice.selected { border-color: var(--teal); background: var(--teal-light); }
.match-choice.selected .choice-marker { background: var(--teal); color: #fff; }
.match-choice.correct .choice-marker { background: var(--success); color: #fff; }
.match-choice .choice-marker { flex: 0 0 22px; width: 22px; height: 22px; border: 1.5px solid #cfdae0; background: transparent; color: transparent; }
.match-choice.selected .choice-marker, .match-choice.correct .choice-marker { border-color: transparent; }
.match-choice .choice-marker svg { width: 12px; height: 12px; }

.feedback { display: flex; gap: 11px; margin-top: 18px; padding: 14px 17px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--blue-wash); animation: feedback-in .35s var(--ease) both; }
.feedback.correct { color: #145d40; border-color: var(--success); background: #eaf6ef; }
.feedback.wrong { color: #883128; border-color: var(--danger); background: #fdf1ef; }
.feedback-icon { flex: 0 0 20px; }
.feedback-icon svg { width: 20px; height: 20px; }
.quiz-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; color: var(--muted); font-size: .84rem; font-weight: 650; }
.dots { display: flex; gap: 5px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: #dde6ea; }
.dots i.done { background: var(--teal); }
.dots i.now { background: var(--gold); }
.score-ring {
  width: 148px; height: 148px; display: grid; place-items: center; margin: 0 auto 22px;
  border-radius: 50%; color: var(--navy); font-size: 1.7rem; font-weight: 850;
  background: conic-gradient(var(--teal) calc(var(--score) * 1%), var(--teal-light) 0);
  animation: ring-in .55s var(--ease) both;
}
.score-ring span { width: 120px; height: 120px; display: grid; place-items: center; border-radius: 50%; background: #fff; }
.center { text-align: center; }
.analogy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; }
.analogy { display: flex; gap: 13px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--blue-wash); }
.analogy .item-icon { flex: 0 0 34px; margin-bottom: 0; }
.analogy b { color: var(--teal); }
.risk-scene { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream); }
.risk-scene img { width: 100%; }
.risk-marker {
  position: absolute; width: 38px; height: 38px; display: grid; place-items: center;
  border: 2px solid #fff; border-radius: 50%; color: #fff; background: var(--coral);
  box-shadow: 0 3px 10px rgba(18, 48, 71, .35); font-size: .9rem; font-weight: 800;
  transform: translate(-50%, -50%); transition: transform .15s, background .2s;
}
.risk-marker::before {
  content: ""; position: absolute; inset: -7px; border: 2px solid var(--coral);
  border-radius: 50%; opacity: .5; animation: marker-pulse 2.4s ease-out infinite;
}
.risk-marker:hover { transform: translate(-50%, -50%) scale(1.12); }
.risk-marker.found { background: var(--success); animation: pop-ok .35s var(--ease); }
.risk-marker.found::before { content: none; }
.risk-marker svg { width: 17px; height: 17px; }
@keyframes marker-pulse { 0% { transform: scale(.85); opacity: .6; } 70%, 100% { transform: scale(1.15); opacity: 0; } }
.risk-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.risk-result { display: flex; gap: 11px; padding: 13px 15px; border-left: 3px solid var(--success); border-radius: 0 8px 8px 0; background: #eaf6ef; }
.risk-result strong { color: var(--navy); }
.risk-result p { margin: 3px 0 0; color: var(--muted); font-size: .9rem; }
.risk-result .tick { flex: 0 0 19px; color: var(--success); }
.risk-result .tick svg { width: 19px; height: 19px; }

/* Items start in a tray of chips and move into the column they are sorted into. */
.sort-tray { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 22px; }
.sort-tray:empty::after { content: "Every example has been sorted."; color: var(--muted); font-size: .9rem; }
.sort-item {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px;
  border: 1.5px solid var(--line); border-radius: 999px; color: var(--ink);
  text-align: left; background: #fff; cursor: grab; touch-action: none; user-select: none;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .2s var(--ease), opacity .15s;
}
.sort-item:hover { border-color: var(--teal); box-shadow: 0 2px 8px rgba(18, 48, 71, .07); transform: translateY(-1px); }
.sort-item.selected { border-color: var(--navy); background: var(--navy); color: #fff; }
.sort-item.sorted-out { animation: sort-out .4s var(--ease) forwards; }
.sort-item.dragging { opacity: .35; cursor: grabbing; }
.sort-ghost {
  position: fixed; z-index: 40; margin: 0; pointer-events: none;
  box-shadow: var(--shadow); cursor: grabbing;
  transform: translate(-50%, -50%) rotate(-5deg) scale(1.06);
}
body.sorting-drag, body.sorting-drag * { cursor: grabbing !important; }
.sort-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sort-board.two, .sort-board.four { grid-template-columns: repeat(2, 1fr); }
.place-picks { display: grid; gap: 9px; }
.order-done { margin: 0 0 18px; padding-left: 22px; color: var(--navy); }
.compare-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 20px; }
.compare-card {
  display: grid; gap: 10px; padding: 12px; border: 1.5px solid var(--line); border-radius: 14px;
  text-align: left; background: #fff; box-shadow: 0 8px 24px rgba(18, 48, 71, .07);
  transition: border-color .18s, background .18s, transform .2s var(--ease);
}
.compare-card img { width: 100%; height: auto; border-radius: 10px; background: #0f2433; }
.compare-card:hover:not(:disabled) { border-color: var(--teal); transform: translateY(-3px); }
.compare-card.safe { border-color: var(--success); background: #eaf6ef; }
.compare-card.unsafe { border-color: var(--danger); background: #fdf1ef; }
.reply-thread { margin-bottom: 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--cream); }
.reply-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--navy); }
.reply-message { margin: 0; color: var(--ink); }
.sort-column {
  min-height: 168px; display: flex; flex-direction: column; align-items: stretch;
  justify-content: flex-start; padding: 14px; border: 1.5px dashed #b6c8d1;
  border-radius: var(--radius); text-align: left; background: #fafcfd;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
}
.sort-column h3 { margin: 0 0 4px; color: var(--navy); font-size: 1rem; line-height: 1.25; }
.sort-column .column-count { color: var(--muted); font-size: .78rem; }
.sort-column.armed { border-style: solid; border-color: var(--teal); background: #f0fbf8; }
.sort-column.armed .column-count { color: var(--teal); font-weight: 700; }
.sort-board.receiving .sort-column {
  animation: drop-invite .5s ease-in-out infinite;
}
.sort-board.receiving .sort-column:nth-child(2) { animation-delay: .07s; }
.sort-board.receiving .sort-column:nth-child(3) { animation-delay: .14s; }
.sort-board.receiving .sort-column:nth-child(4) { animation-delay: .21s; }
.sort-column.drop-over {
  animation: none;
  transform: scale(1.04);
  border-style: solid; border-color: var(--teal); background: #e7f7f3;
  box-shadow: 0 10px 24px rgba(8, 127, 121, .2);
}
.sort-column.drop-miss { animation: shake-soft .4s ease; }
.placed-list { display: grid; gap: 6px; margin-top: 12px; }
.placed-chip { display: block; padding: 8px 11px; border-radius: 7px; background: var(--teal-light); color: #075f5b; font-size: .82rem; line-height: 1.35; animation: chip-in .35s var(--ease) both; }

.myth-statement { margin: 0 0 20px; padding: 24px; border: 1.5px solid var(--gold); border-radius: var(--radius); background: var(--cream); color: var(--navy); font-size: 1.25rem; font-weight: 650; line-height: 1.45; }
.myth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.myth-choice { justify-content: center; min-height: 64px; font-size: 1.05rem; font-weight: 700; }
.myth-choice .choice-marker { flex: 0 0 26px; width: 26px; height: 26px; font-size: 1rem; }
.scenario-context { color: var(--muted); }
.example-secret { display: inline-block; padding: 3px 9px; border-radius: 6px; background: var(--blue-wash); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; }
.builder-panel { display: grid; gap: 18px; }
.strength-meter { height: 12px; overflow: hidden; border-radius: 99px; background: #e7edef; }
.strength-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--coral), var(--gold), var(--teal)); transition: width .35s var(--ease); }
.strength-label { margin: -10px 0 0; color: var(--navy); font-size: .86rem; font-weight: 750; }
.password-preview {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px;
  min-height: 52px; margin-bottom: 6px; padding: 14px 16px;
  border-radius: 12px; background: #0f2433;
}
.pw-dot {
  width: 9px; height: 14px; border-radius: 4px;
  background: var(--coral); animation: pw-pop .28s var(--ease) both;
}
.password-preview.mid .pw-dot { background: var(--gold); }
.password-preview.strong .pw-dot { background: #7ad0c6; }
.pw-dot:nth-child(2) { animation-delay: .03s; }
.pw-dot:nth-child(3) { animation-delay: .06s; }
.pw-dot:nth-child(4) { animation-delay: .09s; }
.pw-dot:nth-child(5) { animation-delay: .12s; }
.pw-dot:nth-child(6) { animation-delay: .15s; }
.pw-dot:nth-child(7) { animation-delay: .18s; }
.pw-dot:nth-child(8) { animation-delay: .21s; }
.pw-dot:nth-child(9) { animation-delay: .24s; }
.pw-dot:nth-child(10) { animation-delay: .27s; }
.builder-group { margin: 0; padding: 0; border: 0; }
.builder-group legend { margin-bottom: 8px; color: var(--navy); font-weight: 700; }
.segmented { display: flex; gap: 8px; }
.segmented.wrap { flex-wrap: wrap; }
.segmented button, .mail-actions button {
  min-height: 42px; padding: 8px 13px; border: 1.5px solid var(--line); border-radius: 8px;
  color: var(--ink); background: #fff; font-size: .84rem; font-weight: 700;
}
.segmented button:hover, .mail-actions button:hover { border-color: var(--teal); }
.segmented button.selected { border-color: var(--teal); color: #075f5b; background: var(--teal-light); }
.builder-toggles { display: grid; gap: 9px; }
.setting-toggle {
  display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: 10px; color: var(--ink); text-align: left; background: #fff;
  transition: border-color .18s, background .18s, transform .18s var(--ease);
}
.setting-toggle:hover { border-color: var(--teal); transform: translateY(-1px); }
.setting-toggle small { color: var(--muted); font-weight: 750; }
.setting-toggle.selected { border-color: var(--success); background: #eaf6ef; }
.setting-toggle.selected small { color: var(--success); }
.domino-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 22px 0; }
.domino-card {
  position: relative; min-height: 156px; display: flex; flex-direction: column; gap: 6px; justify-content: center;
  padding: 16px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff;
  transition: transform .3s ease, background .3s ease, border-color .3s ease;
}
.domino-card::after { content: "→"; position: absolute; right: -15px; z-index: 1; color: var(--muted); font-weight: 800; }
.domino-card:last-child::after { content: none; }
.domino-card.fallen { transform: translateY(8px) rotate(1deg); border-color: var(--danger); background: #fdf1ef; }
.domino-card.safe { border-color: var(--success); background: #eaf6ef; }
.domino-number { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--navy); font-size: .75rem; font-weight: 800; }
.domino-card small { color: var(--muted); line-height: 1.35; }
.domino-status { margin-top: 6px; color: var(--navy); font-size: .76rem; font-weight: 800; text-transform: uppercase; }
.simulator-shell { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-soft); }
.simulator-shell.enter { animation: rise-in .4s var(--ease) both; }
.simulator-head { display: flex; align-items: center; gap: 12px; padding: 17px 20px; color: #fff; background: var(--navy); }
.simulator-head div { display: grid; }
.simulator-head small { color: #cbd9e0; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--navy); background: var(--gold); font-weight: 850; }
.setup-step { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 20px; border-bottom: 1px solid var(--line); }
.setup-step:last-child { border-bottom: 0; }
.setup-step h3 { margin: 0 0 5px; font-size: 1rem; }
.setup-step p { margin: 0 0 13px; color: var(--muted); font-size: .9rem; }
.step-badge { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--teal); font-size: .78rem; font-weight: 800; }
.muted-step { opacity: .56; }
.choices.compact .choice { min-height: 48px; font-size: .86rem; }
.recovery-list { display: grid; gap: 10px; }
.recovery-option, .clue {
  width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: 8px; color: var(--ink); text-align: left; background: #fff;
}
.recovery-option.selected { border-color: var(--navy); background: var(--blue-wash); }
.recovery-option.correct, .clue.found { border-color: var(--success); background: #eaf6ef; }
.recovery-option.wrong, .clue.decoy { border-color: var(--danger); background: #fdf1ef; }
.recovery-option span:last-child, .clue span:last-child { display: grid; }
.recovery-option small, .clue small { margin-top: 4px; color: var(--muted); line-height: 1.4; }
.scam-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.trigger-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.trigger-list div { display: grid; gap: 3px; padding: 14px 16px; border-left: 4px solid var(--gold); border-radius: 0 8px 8px 0; background: var(--cream); }
.trigger-list span { color: var(--muted); font-size: .9rem; }
.inbox { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.mail-card { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 18px; border-bottom: 1px solid var(--line); }
.mail-card:last-child { border-bottom: 0; }
.mail-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: var(--navy); background: var(--blue-wash); font-size: .76rem; font-weight: 850; }
.mail-copy { min-width: 0; display: grid; }
.mail-from { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.mail-copy > strong { color: var(--navy); }
.mail-copy > p { margin: 4px 0 10px; color: var(--muted); font-size: .9rem; }
.mail-card .feedback { font-size: .87rem; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.review-stage { display: grid; gap: 18px; }
.review-progress { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .84rem; font-weight: 650; }
.review-card {
  overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff;
  box-shadow: 0 10px 28px rgba(18, 48, 71, .08);
}
.review-card.enter { animation: rise-in .4s var(--ease) both; }
.email-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px; color: #fff; background: var(--navy); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.email-toolbar-meta { font-weight: 650; letter-spacing: 0; text-transform: none; color: #cbd9e0; }
.email-meta { display: flex; align-items: center; gap: 12px; padding: 18px 20px 0; }
.email-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--navy); background: var(--gold); font-weight: 850; }
.email-meta strong { display: block; color: var(--navy); }
.email-meta small { color: var(--muted); }
.email-card h3 { margin: 14px 20px 0; color: var(--navy); font-size: 1.2rem; line-height: 1.35; }
.email-body { margin: 12px 20px 20px; padding: 16px 18px; border-radius: 10px; background: var(--cream); }
.email-body p { margin: 0; color: var(--ink); }
.visual-card { background: var(--cream); }
.review-visual { margin: 0; background: #0f2433; }
.review-visual img { width: 100%; height: auto; object-fit: contain; background: #0f2433; }
.phone-visual { display: grid; place-items: center; padding: 18px; background: var(--cream); }
.phone-visual img { max-width: 320px; border-radius: 18px; background: #fff; }
.review-copy { padding: 16px 20px 20px; background: #fff; }
.review-kicker { display: block; margin-bottom: 6px; color: var(--muted); font-size: .78rem; font-weight: 700; overflow-wrap: anywhere; }
.review-copy h3 { margin: 0 0 6px; color: var(--navy); font-size: 1.08rem; }
.review-copy p { margin: 0; color: var(--muted); font-size: .92rem; }
.review-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.review-stage > .question { margin-bottom: 0; }
.review-stage > .feedback { margin-top: 0; }
.review-stage > .lesson-actions { margin-top: 0; }
.phone-sim { margin: 0 auto; padding-bottom: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.phone-sim.enter { animation: rise-in .4s var(--ease) both; }
.phone-status { padding: 12px 18px; color: #fff; background: var(--navy); font-size: .78rem; font-weight: 700; }
.call-dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: #72d89f; }
.caller-line { padding: 24px; border-bottom: 1px solid var(--line); color: var(--navy); background: var(--cream); font-size: 1.05rem; font-weight: 650; }
.phone-sim > .question, .phone-sim > .choices, .phone-sim > .feedback, .phone-sim > .lesson-actions { margin-right: 24px; margin-left: 24px; }
.phone-sim > .question { margin-top: 22px; }
.branch-visual { padding: 18px 18px 0; background: var(--cream); }
.branch-visual img { max-width: 280px; margin: 0 auto; border-radius: 18px; box-shadow: 0 12px 28px rgba(18, 48, 71, .18); background: #fff; }
.detective-message { margin-bottom: 18px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 24px rgba(18, 48, 71, .07); }
.message-meta { display: grid; gap: 3px; padding-bottom: 13px; border-bottom: 1px solid var(--line); font-size: .84rem; }
.message-meta span { color: var(--muted); }
.detective-message mark { padding: 1px 4px; background: #ffe5a9; }
.clue-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.scenario-card { margin: 0 0 20px; padding: 22px; border-left: 5px solid var(--coral); border-radius: 0 var(--radius) var(--radius) 0; color: var(--navy); background: var(--cream); font-size: 1.08rem; font-weight: 650; }
.habit-list { margin: 0; padding-left: 22px; }
.habit-list li { margin-bottom: 10px; }
.plan-group { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.plan-group h3 { margin: 0 0 12px; font-size: 1.05rem; }
.plan-item { width: 100%; }
.response-row .domino-card { min-height: 172px; }
.escape-door { padding: 12px 20px; color: #fff; background: var(--navy); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.escape-map {
  display: flex; align-items: center; gap: 0; margin: 0 0 16px;
  padding: 12px 14px; overflow-x: auto; border-radius: 14px; background: var(--navy);
}
.escape-node {
  flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; color: #cbd9e0; background: #1d425b; font-size: .75rem; font-weight: 800;
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.escape-node.current {
  color: var(--navy); background: var(--gold);
  box-shadow: 0 0 0 4px rgba(242, 184, 75, .3);
  transform: scale(1.08);
}
.escape-node.open { color: #fff; background: var(--teal); }
.escape-link { flex: 1 1 10px; height: 2px; min-width: 8px; background: #2a4d63; }
.escape-link.lit { background: var(--teal); }
.score-compare { margin: 16px 0 0; color: var(--muted); }
.quiz-card.center .lesson-actions { justify-content: center; }
.lesson-footer {
  position: fixed; left: var(--sidebar); right: 0; bottom: 0; z-index: 12;
  margin: 0; padding: 10px clamp(24px, 4vw, 48px);
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: #fff;
  box-shadow: 0 -10px 28px rgba(18, 48, 71, .08);
}
.lesson-footer-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  max-width: 1024px; margin: 0 auto;
}
.lesson-footer .button { min-height: 36px; padding: 6px 14px; font-size: .9rem; }
.lesson-footer .button.primary { margin-left: auto; }
.toast { position: fixed; right: 24px; bottom: 72px; z-index: 30; padding: 13px 18px; border-radius: 12px; color: #fff; background: var(--navy); box-shadow: var(--shadow); opacity: 0; transform: translateY(12px) scale(.98); pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.mobile-only { display: none; }

#screen.screen-enter .lesson-hero { animation: screen-in .45s var(--ease) both; }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes feedback-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes chip-in {
  from { opacity: 0; transform: translateY(8px) scale(.92); }
  to { opacity: 1; transform: none; }
}
@keyframes drop-invite {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-1.8deg) translateY(-4px); }
  50% { transform: rotate(1.6deg) translateY(-1px); }
  75% { transform: rotate(-1deg) translateY(-3px); }
}
@keyframes pop-ok {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
@keyframes shake-soft {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-5px); }
  60% { transform: translateX(4px); }
}
@keyframes ring-in {
  from { opacity: 0; transform: scale(.86); }
  to { opacity: 1; transform: none; }
}
@keyframes pw-pop {
  from { transform: scale(.45); }
  to { transform: none; }
}

@media (max-width: 980px) {
  .mobile-only { display: grid; place-items: center; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 15; width: 300px; max-width: 88vw; height: auto; transform: translateX(-104%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .lesson-footer { left: 0; }
  #screen { padding-top: 76px; padding-bottom: 88px; }
  .hero-figure { order: -1; }
  .sort-board { grid-template-columns: repeat(2, 1fr); }
  .domino-row { grid-template-columns: repeat(3, 1fr); }
  .domino-card::after { content: none; }
}
@media (max-width: 620px) {
  #screen { padding: 76px 16px 120px; }
  .module-grid, .card-grid, .protect-grid, .match-grid, .analogy-grid, .risk-list, .sort-board,
  .compare-grid,
  .domino-row, .scam-grid, .trigger-list, .clue-grid { grid-template-columns: 1fr; }
  .task-panel { padding: 18px 16px; }
  .sort-column { min-height: 0; }
  .myth-actions, .review-actions { grid-template-columns: 1fr; }
  .hero { gap: 24px; }
  .confidence-row { grid-template-columns: 1fr 42px; gap: 8px; }
  .confidence-row label { grid-column: 1 / -1; }
  .segmented { display: grid; grid-template-columns: 1fr 1fr; }
  .segmented.wrap { display: grid; }
  .segmented button { width: 100%; }
  .mail-card { grid-template-columns: 1fr; }
  .lesson-footer { padding: 8px 16px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .lesson-footer-inner { align-items: stretch; flex-direction: column-reverse; }
  .lesson-footer .button { width: 100%; }
  .toast { right: 16px; bottom: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .sort-board.receiving .sort-column,
  .risk-marker::before {
    animation: none !important;
  }
}
