/* Security Awareness Training. One stylesheet, no build step.
 *
 * Palette: PC Mechanix navy for the frame, caution amber for anything suspicious
 * (red flags, wrong turns), green for things you've done. Rounded system type for
 * headings so it reads friendly to non-technical staff.
 */
:root {
  --navy: #1d4d84;
  --navy-deep: #123661;
  --ink: #17243a;
  --muted: #5c6a7f;
  --line: #dde4ee;
  --page: #f2f5f9;
  --card: #ffffff;
  --sky: #e8f0fa;
  --caution: #f2a900;
  --caution-tint: #fff2c4;
  --caution-ink: #6f4d00;
  --safe: #1d8456;
  --safe-tint: #e3f4eb;
  --danger: #c0392b;
  --danger-tint: #fdeceb;
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sign: "Segoe Script", "Snell Roundhand", "Apple Chancery", "Brush Script MT", cursive;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 16px/1.6 var(--font);
  display: flex; flex-direction: column; min-height: 100vh;
}
a { color: var(--navy); text-underline-offset: .15em; }
a:hover { color: var(--navy-deep); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; font-weight: 700; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
code { font: .86em/1.4 var(--font-mono); background: #edf1f6; padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }
kbd { font: .82em var(--font-mono); border: 1px solid #c9d1dc; border-bottom-width: 2px; border-radius: 5px; padding: .05em .4em; background: #fff; white-space: nowrap; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.strong { font-weight: 600; }
.danger { color: var(--danger); }
.center { text-align: center; }
.inline { display: inline; }
.top-gap { margin-top: 1.25rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: .15rem 0; }
.icon { width: 24px; height: 24px; display: block; }
:focus-visible { outline: 3px solid #8fb3e3; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Frame ---------- */
.topbar { background: var(--navy); color: #fff; }
.topbar-inner { max-width: 1160px; margin: 0 auto; padding: .7rem 16px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { width: 30px; height: 30px; color: #fff; flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-family: var(--font-display); font-size: 1.02rem; }
.brand small { font-size: .75rem; opacity: .8; }
.topbar-org { font-size: .9rem; opacity: .92; }
.topnav { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; font-size: .92rem; }
.topnav a, .linklike { color: #fff; text-decoration: none; opacity: .88; }
.topnav a:hover, .linklike:hover { opacity: 1; text-decoration: underline; color: #fff; }
.linklike { background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.page { width: 100%; max-width: 820px; margin: 0 auto; padding: 1.75rem 16px 3rem; flex: 1; }
.page-admin, .page-learner { max-width: 1160px; }
.footer { border-top: 1px solid var(--line); padding: 1.1rem 16px; display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); background: #fff; }
.footer a { color: var(--muted); }

/* ---------- Shared pieces ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; margin-bottom: 1.1rem; }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 620px; margin-left: auto; margin-right: auto; }
.card.empty { text-align: center; color: var(--muted); padding: 2.2rem 1.5rem; }
.card h2:only-child { margin: 0; }
.notice { background: var(--caution-tint); border-color: #f0d98c; }
.eyebrow { font-size: .85rem; font-weight: 600; color: var(--navy); margin-bottom: .3rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.page-head h1 { margin-bottom: .2rem; }
.page-head .muted { margin: 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.section-title { margin: 1.8rem 0 .8rem; }
.crumbs { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; margin-bottom: 1rem; color: var(--muted); }
.crumbs a { text-decoration: none; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.grid-2 > .card { margin-bottom: 0; }
.callout { border-radius: var(--radius-sm); padding: .8rem 1rem; }
.callout-warn { background: var(--caution-tint); color: var(--caution-ink); }
.callout-error { background: var(--danger-tint); color: #7a1a12; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; background: var(--navy); color: #fff; border: 1px solid var(--navy); border-radius: 10px; padding: .6rem 1.1rem; font: 600 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, transform .1s; }
.btn:hover { background: var(--navy-deep); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-lg { padding: .78rem 1.35rem; font-size: 1rem; }
.btn-xl { padding: .95rem 1.7rem; font-size: 1.08rem; border-radius: 12px; }
.btn-sm { padding: .3rem .6rem; font-size: .82rem; }
.btn-ghost { background: #fff; color: var(--navy); border-color: #c6d4e6; }
.btn-ghost:hover { background: var(--sky); color: var(--navy-deep); }
.btn-danger { color: var(--danger); border-color: #efc2bd; }
.btn-danger:hover { background: var(--danger-tint); color: var(--danger); }
.btn.is-copied { background: var(--safe); color: #fff; border-color: var(--safe); }

.stack { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.stack > .field, .stack > .grid-2, .stack > .grid-3 { width: 100%; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.field .hint, .hint { font-size: .8rem; color: var(--muted); margin: .3rem 0 0; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input:not([type]), textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1px solid #c6cfdb; border-radius: var(--radius-sm); padding: .55rem .7rem;
}
textarea { resize: vertical; }
input[type=file] { font: inherit; font-size: .9rem; max-width: 100%; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: .3rem; }
.summary-btn { cursor: pointer; font-weight: 600; color: var(--navy); }
details.card > summary { list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }

.flash { border-radius: var(--radius-sm); padding: .7rem 1rem; margin-bottom: .9rem; border: 1px solid; font-size: .95rem; }
.flash-success { background: var(--safe-tint); border-color: #b5dfc8; color: #14532d; }
.flash-error { background: var(--danger-tint); border-color: #f3c1bb; color: #7a1a12; }
.flash-info { background: var(--sky); border-color: #c5d6ec; color: var(--navy-deep); }

progress { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border: 0; border-radius: 99px; background: #e1e7ef; overflow: hidden; }
progress::-webkit-progress-bar { background: #e1e7ef; border-radius: 99px; }
progress::-webkit-progress-value { background: var(--safe); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--safe); border-radius: 99px; }
.meter { display: flex; align-items: center; gap: .6rem; min-width: 140px; }
.meter span { font-size: .85rem; font-variant-numeric: tabular-nums; width: 3em; }

.facts { margin: 1rem 0; display: grid; gap: .5rem; }
.facts div { display: grid; grid-template-columns: 9.5rem 1fr; gap: .6rem; }
.facts dt { color: var(--muted); font-size: .88rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
.hash { font-size: .72rem; }

/* ---------- Learner: start page ---------- */
.welcome { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 3rem; align-items: center; padding: 1.5rem 0 2.5rem; }
.welcome-org { color: var(--muted); font-size: .95rem; margin-bottom: .6rem; }
.welcome h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); line-height: 1.08; letter-spacing: -.03em; margin-bottom: .45em; max-width: 15ch; }
.welcome-lead { font-size: 1.12rem; color: #33425a; max-width: 52ch; }
.welcome-cta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.6rem; }
.cta-note { color: var(--muted); font-size: .9rem; max-width: 28ch; line-height: 1.4; }

/* The hero illustration: a suspicious email with its red flags tagged. */
.welcome-art { display: flex; justify-content: center; }
.art-mail { position: relative; width: min(100%, 380px); background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: 0 24px 48px -24px rgba(18, 54, 97, .35); padding: 0 1.3rem 1.3rem; transform: rotate(1.5deg); font-size: .92rem; }
.art-head { display: flex; gap: .35rem; padding: .85rem 0; border-bottom: 1px solid var(--line); margin-bottom: .9rem; }
.art-dot { width: 9px; height: 9px; border-radius: 50%; background: #d5dce6; }
.art-line { margin: 0 0 .35rem; overflow-wrap: anywhere; }
.art-k { color: var(--muted); display: inline-block; width: 4.2rem; }
.art-body { margin: .9rem 0; color: #33425a; }
.art-btn-row { margin: 0; }
.art-btn { display: inline-block; background: #0f6cbd; color: #fff; font-weight: 600; padding: .45rem .9rem; border-radius: 5px; }
.art-mail mark, .spot.is-found { background: var(--caution-tint); color: inherit; box-shadow: inset 0 -2px 0 var(--caution); border-radius: 3px; padding: 0 .1em; }
.art-tag { position: absolute; background: var(--caution); color: #2b1d00; font: 700 .75rem/1 var(--font-display); padding: .45rem .65rem; border-radius: 99px; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .35); white-space: nowrap; }
.art-tag-1 { top: .55rem; right: 1.2rem; transform: rotate(3deg); }
.art-tag-2 { bottom: 1.5rem; right: -1rem; transform: rotate(-4deg); }

/* The route: lessons as stops on a line, then the quiz and the certificate. */
.route-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem 1.8rem; }
.route-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.route-head h2 { margin: 0; }
.route-head p { margin: 0; color: var(--muted); font-size: .92rem; }
.route { list-style: none; margin: 0; padding: 0; }
.stop { position: relative; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: .9rem; }
.stop::before { content: ""; position: absolute; left: calc(1.125rem - 1px); top: 2.25rem; bottom: -.25rem; width: 2px; background: var(--line); }
.stop:last-child::before { display: none; }
.stop.is-done::before { background: #9fd3b8; }
.stop-mark { position: relative; z-index: 1; width: 2.25rem; height: 2.25rem; margin-top: .55rem; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); color: var(--muted); font: 700 .9rem var(--font-display); }
.stop-mark svg { width: 16px; height: 16px; }
.stop-mark .icon { width: 18px; height: 18px; }
.stop.is-done .stop-mark { background: var(--safe); border-color: var(--safe); color: #fff; }
.stop.is-next .stop-mark, .stop.is-current .stop-mark { border-color: var(--navy); color: var(--navy); }
.stop.is-current .stop-mark { background: var(--navy); color: #fff; }
.stop-body { display: flex; align-items: center; gap: 1rem; padding: .65rem .8rem; margin: .1rem 0 .35rem; border-radius: var(--radius); color: inherit; text-decoration: none; }
a.stop-body:hover { background: var(--sky); color: inherit; }
.stop-icon { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 12px; display: grid; place-items: center; background: var(--sky); color: var(--navy); }
.stop-icon-plain { display: none; }
.stop-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stop-title { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.stop-summary { color: var(--muted); font-size: .9rem; line-height: 1.45; margin-top: .1rem; }
.stop-min { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.stop.is-next .stop-body { background: var(--sky); }
.stop.is-done .stop-title { color: #31415a; }

/* ---------- Learner: lesson ---------- */
.lesson-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.lesson-rail { position: sticky; top: 1rem; }
.rail-toggle > summary { list-style: none; cursor: pointer; padding: .2rem 0 .8rem; }
.rail-toggle > summary::-webkit-details-marker { display: none; }
.rail-summary-title { display: block; font: 700 .95rem var(--font-display); margin-bottom: .4rem; }
.rail-home { display: inline-block; font-size: .88rem; margin: 0 0 .7rem; text-decoration: none; }
.route-rail .stop { grid-template-columns: 1.6rem minmax(0, 1fr); gap: .55rem; }
.route-rail .stop::before { left: calc(.8rem - 1px); top: 1.6rem; }
.route-rail .stop-mark { width: 1.6rem; height: 1.6rem; margin-top: .35rem; font-size: .75rem; border-width: 1.5px; }
.route-rail .stop-mark svg { width: 12px; height: 12px; }
.route-rail .stop-mark .icon { width: 13px; height: 13px; }
.route-rail .stop-body { padding: .35rem .5rem; margin: 0 0 .15rem; font-size: .88rem; border-radius: var(--radius-sm); }
.route-rail .stop-title { font: 600 .88rem/1.3 var(--font); }
.route-rail .stop.is-next .stop-body { background: transparent; }
.route-rail .stop.is-current .stop-body { background: #fff; box-shadow: 0 0 0 1px var(--line); }
.route-rail .stop.is-current .stop-title { color: var(--navy-deep); font-weight: 700; }

.lesson { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2.2rem 2.6rem 2rem; min-width: 0; }
.lesson-head { display: flex; gap: 1.1rem; align-items: center; margin-bottom: 1.6rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.lesson-icon { flex: none; width: 4rem; height: 4rem; border-radius: 18px; display: grid; place-items: center; background: var(--navy); color: #fff; }
.lesson-icon .icon { width: 30px; height: 30px; }
.lesson-meta { color: var(--muted); font-size: .9rem; margin: 0 0 .15rem; }
.lesson-head h1 { font-size: clamp(1.6rem, 3vw, 2.15rem); margin: 0; letter-spacing: -.025em; }

.prose { font-size: 1.04rem; max-width: 68ch; }
.prose h3 { font-size: 1.22rem; margin: 2.2em 0 .6em; color: var(--navy-deep); }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: .5em; }
.prose .lead { font-size: 1.16rem; line-height: 1.55; color: #2b3a52; }
.prose .note { border-left: 3px solid var(--navy); padding: .2rem 0 .2rem 1rem; color: #33425a; font-size: .98rem; }
.prose ul.dos, .prose ul.donts { list-style: none; padding-left: 0; }
.prose ul.dos li, .prose ul.donts li { position: relative; padding-left: 1.9rem; }
.prose ul.dos li::before, .prose ul.donts li::before { position: absolute; left: 0; top: .15em; width: 1.25rem; height: 1.25rem; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; }
.prose ul.dos li::before { content: "✓"; background: var(--safe-tint); color: var(--safe); }
.prose ul.donts li::before { content: "✕"; background: var(--danger-tint); color: var(--danger); }
.prose .flags-list { counter-reset: flag; list-style: none; padding-left: 0; }
.prose .flags-list li { counter-increment: flag; position: relative; padding-left: 2.4rem; margin-bottom: .9em; }
.prose .flags-list li::before { content: counter(flag); position: absolute; left: 0; top: .05em; width: 1.6rem; height: 1.6rem; border-radius: 8px; background: var(--caution); color: #2b1d00; font: 800 .85rem/1.6rem var(--font-display); text-align: center; }
.prose ol.steps { counter-reset: step; list-style: none; padding-left: 0; }
.prose ol.steps li { counter-increment: step; position: relative; padding-left: 2.4rem; margin-bottom: .8em; }
.prose ol.steps li::before { content: counter(step); position: absolute; left: 0; top: .05em; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--navy); color: #fff; font: 700 .85rem/1.6rem var(--font-display); text-align: center; }
.remember { background: var(--safe-tint); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-top: 2.2rem; font-size: 1.02rem; }
.remember strong:first-child { display: block; font-family: var(--font-display); color: var(--safe); margin-bottom: .2rem; }
.report-box { border: 2px solid var(--navy); border-radius: var(--radius); padding: 1rem 1.2rem; font-weight: 600; background: var(--sky); }

/* Scenarios: think first, then reveal. */
.scenario { background: var(--sky); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin: 1.6rem 0; }
.scenario-label { font: 700 1.02rem var(--font-display); color: var(--navy-deep); margin-bottom: .5rem; }
.scenario p:last-child { margin-bottom: 0; }
.answer { margin-top: .6rem; }
.answer > summary { list-style: none; display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; background: #fff; border: 1px solid #c6d4e6; color: var(--navy); font-weight: 600; font-size: .94rem; padding: .5rem .9rem; border-radius: 10px; }
.answer > summary::-webkit-details-marker { display: none; }
.answer > summary:hover { background: #f7faff; }
.answer[open] > summary { display: none; }
.answer[open] { background: #fff; border-radius: var(--radius-sm); padding: .9rem 1rem; border-left: 4px solid var(--safe); }

/* Example emails, played as "find the red flags". */
.mail { margin: 1.6rem 0 2.2rem; }
.mail figcaption { font: 700 1.02rem var(--font-display); margin-bottom: .55rem; }
.mail-window { border: 1px solid #cfd7e2; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: 0 10px 30px -18px rgba(18, 54, 97, .4); }
.mail-head { margin: 0; padding: .75rem 1.1rem; background: #f5f7fa; border-bottom: 1px solid var(--line); font-size: .92rem; }
.mail-head div { display: grid; grid-template-columns: 4.5rem 1fr; gap: .5rem; padding: .12rem 0; }
.mail-head dt { color: var(--muted); }
.mail-head dd { margin: 0; overflow-wrap: anywhere; }
.mail-body { padding: 1rem 1.1rem .3rem; font-size: .97rem; }
.fake-btn { display: inline-block; background: #0f6cbd; color: #fff; padding: .5rem 1rem; border-radius: 4px; font-weight: 600; font-size: .9rem; }
.hover-url { display: block; margin-top: .5rem; font-size: .82rem; color: var(--muted); }
.spot-block { display: block; }
.spot.attachment { display: inline-block; padding: .25rem .55rem; border: 1px solid var(--line); border-radius: 6px; font-size: .9rem; }
.reveal { margin-top: .7rem; border-radius: var(--radius); background: #fffaf0; border: 1px solid #f0d98c; padding: .2rem 1.1rem; }
.reveal summary { cursor: pointer; font-weight: 700; color: var(--caution-ink); padding: .55rem 0; }
.reveal ol { margin: .2rem 0 .9rem; padding-left: 1.4rem; font-size: .96rem; }
.reveal li { margin-bottom: .45em; }
.reveal li::marker { color: var(--caution-ink); font-weight: 800; }
/* Without JavaScript, opening the list highlights every red flag. */
.mail:not(.is-game):has(details[open]) .spot { background: var(--caution-tint); box-shadow: inset 0 -2px 0 var(--caution); }

.game-bar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; background: #fffaf0; border: 1px solid #f0d98c; border-radius: var(--radius); padding: .6rem .7rem .6rem 1rem; margin-bottom: .6rem; }
.game-status { font-weight: 600; color: var(--caution-ink); display: flex; align-items: center; gap: .6rem; }
.game-pips { display: inline-flex; gap: .25rem; }
.game-pips i { width: .7rem; height: .7rem; border-radius: 50%; background: #f0e2b4; }
.game-pips i.on { background: var(--caution); }
.game-hint { font-size: .88rem; color: var(--muted); min-height: 1.3em; }
.game-reveal { background: none; border: 0; color: var(--caution-ink); text-decoration: underline; font: inherit; font-size: .88rem; cursor: pointer; padding: .2rem .3rem; }
.mail.is-game .mail-window { cursor: pointer; }
.mail.is-game .spot { border-radius: 3px; transition: background .2s, box-shadow .2s; }
.mail.is-game .spot.is-found { cursor: default; }
.mail.is-game .spot.is-found::after { content: attr(data-flag); display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; margin-left: .3rem; border-radius: 50%; background: var(--caution); color: #2b1d00; font: 800 .7rem/1 var(--font-display); vertical-align: .1em; }
.mail.is-game .spot.is-miss { animation: nudge .35s; }
.mail.is-game .reveal summary { display: none; }
.mail.is-game .reveal { display: none; }
.mail.is-game.has-found .reveal { display: block; padding-top: .7rem; }
.mail.is-game .reveal li { display: none; }
.mail.is-game .reveal li.is-found { display: list-item; }
.mail.is-complete .game-bar { background: var(--safe-tint); border-color: #b5dfc8; }
.mail.is-complete .game-status { color: var(--safe); }
.mail.is-complete .game-pips i.on { background: var(--safe); }
@keyframes nudge { 0%, 100% { transform: none; } 30% { transform: translateX(-3px); } 70% { transform: translateX(3px); } }

.lesson-foot { margin-top: 2.6rem; }
.lesson-next { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: var(--page); border-radius: var(--radius); padding: 1rem 1rem 1rem 1.3rem; }
.lesson-next-label { margin: 0; font-size: .85rem; color: var(--muted); }
.lesson-next-title { margin: 0; font: 700 1.05rem var(--font-display); }
.lesson-back { display: inline-block; margin-top: 1rem; font-size: .92rem; }

/* ---------- Learner: quiz and the steps after ---------- */
.stage { max-width: 640px; margin: 1.5rem auto 2rem; text-align: center; }
.stage h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); letter-spacing: -.03em; }
.stage-lead { font-size: 1.1rem; color: #33425a; }
.stage-note { color: var(--muted); font-size: .92rem; margin-top: 1rem; }
.stage-alt { display: inline-block; margin-top: 1rem; font-size: .95rem; }
.stage-icon { display: inline-grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 22px; background: var(--navy); color: #fff; margin-bottom: 1.1rem; }
.stage-icon .icon { width: 34px; height: 34px; }

.quiz { max-width: 720px; margin: 0 auto; }
.quiz-head { margin-bottom: 1.2rem; }
.quiz-title { font-size: 1.5rem; margin-bottom: .2rem; }
.quiz-step { color: var(--muted); margin: 0; }
.quiz-dots { list-style: none; padding: 0; margin: .9rem 0 0; display: flex; gap: .3rem; }
.quiz-dots li { flex: 1; }
.quiz-dots button { display: block; width: 100%; height: 6px; border: 0; border-radius: 99px; background: #dbe2ec; cursor: pointer; padding: 0; }
.quiz-dots button.is-answered { background: #8fb3e3; }
.quiz-dots button.is-current { background: var(--navy); }
.question { border: 0; margin: 0 0 1.2rem; padding: 0; min-width: 0; }
.question legend { padding: 0; margin-bottom: 1.1rem; width: 100%; }
.qnum { display: block; color: var(--muted); font-size: .88rem; margin-bottom: .35rem; }
.qtext { display: block; font: 700 1.3rem/1.35 var(--font-display); letter-spacing: -.01em; }
.options { display: grid; gap: .55rem; }
.option { display: flex; gap: .85rem; align-items: center; padding: .85rem 1rem; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color .12s, background .12s; }
.option:hover { border-color: #9dbbe2; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option-key { flex: none; width: 2rem; height: 2rem; border-radius: 9px; display: grid; place-items: center; background: var(--page); color: var(--muted); font: 700 .9rem var(--font-display); }
.option-text { font-size: 1.02rem; line-height: 1.4; }
.option:has(input:checked) { border-color: var(--navy); background: #f4f8fd; }
.option:has(input:checked) .option-key { background: var(--navy); color: #fff; }
.option:has(input:focus-visible) { outline: 3px solid #8fb3e3; outline-offset: 2px; }
.js .quiz.is-stepped .question { display: none; }
.js .quiz.is-stepped .question.is-current { display: block; }
.js .quiz.is-stepped .question .qnum { display: none; }
.quiz-bar { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--page); border-top: 1px solid var(--line); margin: 1.5rem -16px 0; padding: .8rem 16px; }
.quiz-count { color: var(--muted); font-size: .9rem; }
.quiz-bar [data-quiz-prev][hidden] + .quiz-count { margin-right: auto; }

.result { margin-top: 1rem; }
.score-ring { width: 150px; height: 150px; margin: 0 auto .8rem; display: block; }
.ring-track { fill: none; stroke: #e1e7ef; stroke-width: 10; }
.ring-fill { fill: none; stroke-width: 10; stroke-linecap: round; }
.result-pass .ring-fill { stroke: var(--safe); }
.result-fail .ring-fill { stroke: var(--caution); }
.ring-pct { font: 800 30px var(--font-display); fill: var(--ink); text-anchor: middle; dominant-baseline: middle; }
.ring-sub { font: 500 11px var(--font); fill: var(--muted); text-anchor: middle; }
.brush-up { margin-top: 1.8rem; }
.brush-up p { color: var(--muted); font-size: .92rem; margin-bottom: .5rem; }
.brush-up ul { list-style: none; padding: 0; margin: 0; display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.brush-up a { display: inline-flex; align-items: center; gap: .45rem; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: .4rem .85rem .4rem .6rem; text-decoration: none; font-weight: 600; font-size: .92rem; }
.brush-up a .icon { width: 18px; height: 18px; }
.review-list { max-width: 720px; margin: 2.5rem auto 0; }
.review { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: .8rem; }
.review-q { font: 700 1.04rem/1.4 var(--font-display); margin-bottom: .7rem; }
.review-row { display: grid; grid-template-columns: 5.5rem 1fr; gap: .5rem; margin-bottom: .35rem; font-size: .96rem; }
.review-row span { font-size: .82rem; font-weight: 600; padding-top: .1rem; }
.review-wrong span { color: var(--danger); }
.review-wrong { color: #5a2a24; }
.review-right span { color: var(--safe); }
.review-right { color: #14532d; font-weight: 600; }
.review-why { color: var(--muted); font-size: .93rem; margin: .6rem 0 0; }

.sign { max-width: 640px; margin: 1rem auto; }
.sign h1 { font-size: clamp(1.9rem, 4vw, 2.4rem); letter-spacing: -.03em; }
.sign-sheet { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.8rem; box-shadow: 0 18px 40px -28px rgba(18, 54, 97, .45); display: flex; flex-direction: column; gap: 1.6rem; align-items: flex-start; }
.sign-statement { display: flex; gap: .9rem; align-items: flex-start; font-size: 1.04rem; line-height: 1.55; cursor: pointer; }
.sign-statement input { flex: none; width: 1.3rem; height: 1.3rem; margin-top: .2rem; accent-color: var(--navy); }
.sign-line { width: 100%; }
.sign-line label { display: block; font-size: .88rem; color: var(--muted); margin-bottom: .2rem; }
.sign-line input { border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; padding: .3rem .1rem; font: 2rem/1.3 var(--font-sign); background: transparent; }
.sign-line input:focus-visible { outline: none; border-bottom-color: var(--navy); background: #f7faff; }
.sign-preview { display: none; }
.sign-date { margin: .4rem 0 0; color: var(--muted); font-size: .88rem; }

.done h1 { margin-top: .5rem; }
.cert-preview { background: #fff; border: 6px double var(--navy); border-radius: 6px; padding: 1.7rem 1.5rem 1.3rem; margin: 1.8rem auto; max-width: 480px; box-shadow: 0 22px 44px -26px rgba(18, 54, 97, .5); transform: rotate(-1deg); }
.cert-preview p { margin: 0; }
.cert-issuer { font: 700 .85rem var(--font-display); color: var(--navy); letter-spacing: .12em; }
.cert-kind { font: 700 1.25rem var(--font-display); color: var(--navy); margin-top: .5rem !important; }
.cert-name { font: 700 1.7rem var(--font-display); margin: .9rem 0 .2rem !important; padding-bottom: .3rem; border-bottom: 1px solid var(--line); }
.cert-course { font-weight: 600; color: var(--navy-deep); margin-top: .5rem !important; }
.cert-meta { color: var(--muted); font-size: .88rem; }
.cert-id { font: .78rem var(--font-mono); color: var(--muted); margin-top: .8rem !important; }

/* ---------- Public ---------- */
.verify-form { display: flex; gap: .6rem; margin-bottom: 1rem; }
.verify-form input { text-transform: uppercase; letter-spacing: .04em; }
.verify-result { border-radius: var(--radius); padding: 1rem 1.2rem; margin-top: .5rem; }
.verify-result.ok { background: var(--safe-tint); border: 1px solid #b5dfc8; }
.verify-result.bad { background: var(--danger-tint); border: 1px solid #f3c1bb; }
.verify-title { font-weight: 700; font-size: 1.05rem; }
.verify-result .facts { margin-bottom: 0; }

/* ---------- Admin ---------- */
.login { margin-top: 2rem; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.6fr); gap: .8rem; margin-bottom: 1.1rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; display: flex; flex-direction: column; gap: .1rem; }
.stat-n { font: 750 1.6rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.stat-l { font-size: .85rem; color: var(--muted); }
.stat-good .stat-n { color: var(--safe); }
.stat-wide progress { margin-top: .5rem; }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.filter { text-decoration: none; padding: .35rem .8rem; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: .88rem; color: var(--ink); }
.filter span { color: var(--muted); margin-left: .2rem; }
.filter.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter.is-active span { color: #d5e2f2; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 600; padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: #fafbfd; white-space: nowrap; }
.table td { padding: .7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table.compact td, .table.compact th { padding: .45rem .7rem; }
.card > .table.compact { margin: 0 -.2rem; width: calc(100% + .4rem); }
.actions-col { text-align: right; white-space: nowrap; }
.actions-col .btn, .actions-col form { margin-left: .25rem; }
.pill { display: inline-block; font-size: .75rem; font-weight: 600; padding: .12rem .55rem; border-radius: 99px; background: #edf1f6; color: var(--muted); white-space: nowrap; vertical-align: middle; }
.pill-passed { background: var(--safe-tint); color: var(--safe); }
.pill-in_progress { background: var(--caution-tint); color: var(--caution-ink); }
.pill-not_started { background: #edf1f6; color: var(--muted); }
h1 .pill { font-size: .8rem; }

/* ---------- Phones and narrow screens ---------- */
@media (max-width: 960px) {
  .lesson-layout { grid-template-columns: 1fr; gap: 0; }
  .lesson-rail { position: sticky; top: 0; z-index: 3; margin: -1.75rem -16px 1rem; background: var(--page); border-bottom: 1px solid var(--line); padding: .6rem 16px 0; }
  .rail-toggle > summary { padding-bottom: .6rem; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; }
  .rail-toggle > summary::after { content: "Map"; font-size: .85rem; color: var(--navy); font-weight: 600; }
  .rail-toggle[open] > summary::after { content: "Close"; }
  .rail-summary-title { margin: 0; }
  .rail-toggle[open] { padding-bottom: .6rem; max-height: 75vh; overflow-y: auto; }
}
@media (max-width: 760px) {
  h1 { font-size: 1.55rem; }
  .card { padding: 1.1rem 1rem; }
  .grid-2, .grid-3, .facts-grid { grid-template-columns: 1fr; }
  .welcome { grid-template-columns: 1fr; gap: 1.5rem; padding-top: .5rem; }
  .welcome-art { display: none; }
  .welcome-cta .btn { width: 100%; }
  .cta-note { max-width: none; }
  .route-wrap { padding: 1.1rem .9rem; border-radius: var(--radius); }
  .stop-body { align-items: flex-start; gap: .7rem; padding: .55rem .5rem; }
  .stop-icon { display: none; }
  .stop-min { display: none; }
  .lesson { padding: 1.3rem 1.1rem 1.2rem; border-radius: var(--radius); margin: 0 -6px; }
  .lesson-head { gap: .85rem; }
  .lesson-icon { width: 3.1rem; height: 3.1rem; border-radius: 14px; }
  .lesson-icon .icon { width: 24px; height: 24px; }
  .prose { font-size: 1rem; }
  .lesson-next { padding: 1rem; }
  .lesson-next .btn { width: 100%; }
  .mail-head div { grid-template-columns: 3.6rem 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-wide { grid-column: 1 / -1; }
  .topnav { gap: .8rem; font-size: .85rem; }
  .facts div { grid-template-columns: 1fr; gap: 0; }
  .verify-form { flex-direction: column; }
  .qtext { font-size: 1.16rem; }
  .quiz-bar { padding: .6rem 16px; gap: .6rem; }
  .quiz-bar .btn-lg { padding: .7rem 1rem; }
  .quiz-count { font-size: .82rem; }
  .stage .btn-xl, .sign .btn-xl { width: 100%; }
  .sign-sheet { padding: 1.2rem; }
  .sign-line input { font-size: 1.6rem; }
  .review-row { grid-template-columns: 1fr; gap: 0; }

  /* Admin tables become stacked cards */
  .card.flush .table thead { display: none; }
  .card.flush .table, .card.flush .table tbody, .card.flush .table tr, .card.flush .table td { display: block; width: 100%; }
  .card.flush .table tr { padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
  .card.flush .table tr:last-child { border-bottom: 0; }
  .card.flush .table td { border: 0; padding: .15rem 0; text-align: left; display: flex; gap: .6rem; }
  .card.flush .table td[data-label]::before { content: attr(data-label); flex: 0 0 7.5rem; color: var(--muted); font-size: .8rem; padding-top: .1rem; }
  .card.flush .table td:first-child::before { display: none; }
  .card.flush .table td:first-child { display: block; margin-bottom: .2rem; }
  .card.flush .table td:empty { display: none; }
  .card.flush .table .actions-col { justify-content: flex-start; flex-wrap: wrap; padding-top: .5rem; }
  .card.flush .table .actions-col > :first-child { margin-left: 0; }
  .meter { min-width: 0; flex: 1; }
}
@media print {
  .topbar, .footer, .lesson-foot, .lesson-rail, .btn { display: none; }
  body { background: #fff; }
}

/* ---------- Lesson steps and checks ---------- */
.js .prose .step.is-hidden { display: none; }
.prose .step + .step > h3:first-child { margin-top: 2.2em; }
.step-more { display: flex; align-items: center; gap: 1rem; margin: 2rem 0 .5rem; padding-top: 1.4rem; border-top: 1px dashed var(--line); }
.step-count { color: var(--muted); font-size: .9rem; }
.js .lesson-finish.is-locked { display: none; }
.knowledge-check { margin-top: 2.6rem; padding: 1.5rem 1.5rem .6rem; background: var(--page); border-radius: var(--radius-lg); }
.knowledge-check h2 { font-size: 1.35rem; margin-bottom: .25rem; }
.check-intro { color: var(--muted); margin-bottom: 1.3rem; }
.check-q { border: 0; margin: 0 0 1.6rem; padding: 0; min-width: 0; }
.check-q legend { padding: 0; margin-bottom: .8rem; width: 100%; }
.check-q .qtext { font-size: 1.1rem; }
.check-q .option { background: #fff; }
.check-q .option.is-right { border-color: var(--safe); background: var(--safe-tint); }
.check-q .option.is-right .option-key { background: var(--safe); color: #fff; }
.check-q .option.is-wrong { border-color: var(--danger); background: var(--danger-tint); }
.check-q .option.is-wrong .option-key { background: var(--danger); color: #fff; }
.check-q.is-solved .option:not(.is-right) { opacity: .55; cursor: default; }
.check-q.is-solved .option:not(.is-right):hover { border-color: var(--line); }
.check-feedback { margin: .7rem 0 0; padding: .7rem .9rem; border-radius: var(--radius-sm); font-size: .96rem; background: #fff; border-left: 4px solid var(--navy); }
.check-feedback.is-right { border-left-color: var(--safe); }
.check-feedback.is-right strong { color: var(--safe); }
.check-feedback.is-wrong { border-left-color: var(--danger); }
.check-feedback.is-wrong strong { color: var(--danger); }
.lesson-finish .lesson-next { margin-top: 1.6rem; }
.lesson-back { margin-top: 1.2rem; }
@media (max-width: 760px) {
  .knowledge-check { padding: 1.1rem .9rem .3rem; margin-left: -.4rem; margin-right: -.4rem; }
  .step-more { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ---------- Lesson deck ---------- */
.deck-progress { list-style: none; display: flex; gap: .3rem; margin: -.4rem 0 1.6rem; padding: 0; }
.deck-progress li { flex: 1; height: 6px; border-radius: 99px; background: #e1e7ef; }
.deck-progress li.is-past { background: #8fc7a9; }
.deck-progress li.is-current { background: var(--navy); }
.deck-stage { min-height: 22rem; }
.slide + .slide { margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.deck.is-deck .slide { display: none; margin: 0; padding: 0; border: 0; }
.deck.is-deck .slide.is-current { display: block; animation: slide-in .28s ease-out; }
@keyframes slide-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.slide-label { font-weight: 600; color: var(--navy); font-size: .9rem; margin-bottom: .3rem; }
.slide-title { font-size: clamp(1.4rem, 2.6vw, 1.85rem); letter-spacing: -.025em; margin-bottom: .4rem; outline: none; }
.slide-intro { color: var(--muted); font-size: 1.04rem; margin-bottom: 1.3rem; }
.slide-body { font-size: 1.12rem; }
.slide-body p { margin-bottom: .8em; }
.slide-prompt { font-size: 1.08rem; background: var(--sky); border-radius: var(--radius); padding: 1rem 1.2rem; margin: .4rem 0 1.1rem; }
.slide-prompt:empty { display: none; }
.slide-choice .slide-title { font-size: clamp(1.2rem, 2.2vw, 1.45rem); line-height: 1.35; }
.slide .mail { margin: 0; }

.deck-nav { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 2rem -2.6rem -2rem; padding: .9rem 2.6rem; background: #fff; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.deck-count { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.deck-nav [data-deck-prev][hidden] + .deck-count { margin-right: auto; }
.deck-nav [hidden] { display: none; }

/* Phish or fine? */
.verdicts { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.verdict { border: 1.5px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; background: #fff; transition: border-color .2s; }
.inbox-row { display: flex; gap: .8rem; align-items: center; }
.inbox-avatar { flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; background: #e3e9f2; color: #44546c; font: 700 1rem var(--font-display); }
.inbox-text { display: flex; flex-direction: column; min-width: 0; }
.inbox-from { font-size: .86rem; color: var(--muted); overflow-wrap: anywhere; }
.inbox-subject { font-weight: 600; overflow-wrap: anywhere; }
.verdict-actions { display: flex; gap: .5rem; margin-top: .75rem; padding-left: 3.2rem; }
.verdict-btn { font: 600 .92rem var(--font); padding: .5rem 1rem; border-radius: 99px; border: 1.5px solid #c6d4e6; background: #fff; color: var(--ink); cursor: pointer; }
.verdict-btn:hover { background: var(--sky); }
.verdict-btn-1 { border-color: #eecf7a; }
.verdict-btn-1:hover { background: var(--caution-tint); }
.verdict.is-answered .verdict-btn { cursor: default; opacity: .45; }
.verdict.is-answered .verdict-btn.is-picked { opacity: 1; }
.verdict.is-right { border-color: var(--safe); }
.verdict.is-right .is-picked { background: var(--safe); border-color: var(--safe); color: #fff; }
.verdict.is-wrong { border-color: var(--danger); }
.verdict.is-wrong .is-picked { background: var(--danger); border-color: var(--danger); color: #fff; }
.verdict-feedback { margin: .6rem 0 0 3.2rem; font-size: .95rem; }
.verdict.is-right .verdict-feedback strong { color: var(--safe); }
.verdict.is-wrong .verdict-feedback strong { color: var(--danger); }

/* Flip cards */
.flips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.flip { position: relative; display: grid; min-height: 9.5rem; padding: 0; border: 0; background: none; cursor: pointer; perspective: 900px; text-align: left; font: inherit; color: inherit; }
.flip-face { grid-area: 1 / 1; display: flex; flex-direction: column; justify-content: center; gap: .35rem; padding: 1.1rem 1.2rem; border-radius: var(--radius); backface-visibility: hidden; transition: transform .45s ease; }
.flip-front { background: var(--navy); color: #fff; }
.flip-back { background: var(--caution-tint); color: #3a2a00; transform: rotateY(180deg); border: 1.5px solid #f0d98c; }
.flip.is-flipped .flip-front { transform: rotateY(-180deg); }
.flip.is-flipped .flip-back { transform: rotateY(0); }
.flip-n { width: 1.7rem; height: 1.7rem; border-radius: 8px; background: var(--caution); color: #2b1d00; display: grid; place-items: center; font: 800 .85rem var(--font-display); }
.flip-title { font: 700 1.08rem/1.3 var(--font-display); }
.flip-hint { font-size: .82rem; opacity: .75; }
.flip-text { font-size: .95rem; line-height: 1.45; }
.flip-back .flip-title { font-size: .92rem; color: var(--caution-ink); }
.flip.was-flipped:not(.is-flipped) .flip-front { background: #2c5f99; }

/* Choice feedback */
.choice-feedback { margin: .8rem 0 0; padding: .75rem 1rem; border-radius: var(--radius-sm); background: var(--page); border-left: 4px solid var(--navy); font-size: .98rem; }
.choice-feedback.is-right { border-left-color: var(--safe); background: var(--safe-tint); }
.choice-feedback.is-right strong { color: var(--safe); }
.choice-feedback.is-wrong { border-left-color: var(--danger); background: var(--danger-tint); }
[data-choice] .option.is-right { border-color: var(--safe); background: var(--safe-tint); }
[data-choice] .option.is-right .option-key { background: var(--safe); color: #fff; }
[data-choice] .option.is-wrong { border-color: var(--danger); background: var(--danger-tint); }
[data-choice] .option.is-wrong .option-key { background: var(--danger); color: #fff; }
[data-choice].is-solved .option:not(.is-right) { opacity: .5; cursor: default; }

@media (max-width: 760px) {
  .flips { grid-template-columns: 1fr; }
  .flip { min-height: 7.5rem; }
  .verdict-actions { padding-left: 0; }
  .verdict-actions .verdict-btn { flex: 1; }
  .verdict-feedback { margin-left: 0; }
  .deck-nav { margin: 1.5rem -1.1rem -1.2rem; padding: .7rem 1.1rem; }
  .deck-stage { min-height: 0; }
}

/* Learn cards */
.slide-body .lead { font-size: 1.18rem; }
.slide-body .note { font-size: 1rem; }
.prose ul.points { list-style: none; padding: 0; display: grid; gap: .6rem; }
.prose ul.points li { margin: 0; padding: .75rem 1rem; background: var(--page); border-radius: var(--radius-sm); font-size: 1.02rem; line-height: 1.5; }
.prose .remember strong:first-child { display: block; margin-bottom: .25rem; }
.url-demo { display: flex; flex-direction: column; gap: .35rem; background: #f5f7fa; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem; }
.url-demo code { background: none; padding: 0; font-size: 1rem; }
.url-demo mark { background: var(--caution-tint); box-shadow: inset 0 -2px 0 var(--caution); color: inherit; padding: 0 .1em; }
.url-demo span { font-size: .9rem; color: var(--muted); }
.verdict .inbox-subject code { font-size: .95rem; }

/* Text-message example */
.sms-window { background: #f3f5f8; padding: 1.1rem 1rem 1.3rem; }
.sms-from { text-align: center; font-weight: 600; font-size: .92rem; margin: 0 0 .9rem; }
.sms-bubble { max-width: 85%; background: #e4e8ee; border-radius: 18px 18px 18px 4px; padding: .7rem 1rem; }
.sms-bubble p { margin: 0; }

/* ---------- Lesson parts: Learn, Examples, Challenges ---------- */
.deck-progress { display: flex; gap: .9rem; margin: -.4rem 0 1.8rem; }
.deck-part { flex: var(--n, 1); display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.deck-part-name { font-size: .8rem; font-weight: 600; color: var(--muted); }
.deck-part.is-current .deck-part-name { color: var(--navy); }
.deck-segs { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.deck-segs .seg { flex: 1; height: 6px; border-radius: 99px; background: #e1e7ef; }
.deck-segs .seg.is-past { background: #8fc7a9; }
.deck-segs .seg.is-current { background: var(--navy); }

/* SLAM */
.prose .slam { display: grid; gap: .7rem; margin: 1.2rem 0; }
.slam-item { display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; align-items: start; background: var(--page); border-radius: var(--radius); padding: 1rem 1.1rem; }
.slam-letter { width: 3rem; height: 3rem; border-radius: 12px; background: var(--navy); color: #fff; display: grid; place-items: center; font: 800 1.5rem var(--font-display); }
.prose .slam-item h3 { margin: 0 0 .2rem; font-size: 1.08rem; color: var(--ink); }
.prose .slam-item p { margin: 0; font-size: .98rem; line-height: 1.5; }
.prose .slam-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.slam-mini .slam-item { grid-template-columns: 2.4rem 1fr; padding: .8rem .9rem; }
.slam-mini .slam-letter { width: 2.4rem; height: 2.4rem; font-size: 1.2rem; border-radius: 10px; }

.prose .two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.panel { background: var(--page); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.prose .panel h3 { margin: 0 0 .5rem; font-size: 1.12rem; }
.prose .panel p { font-size: .98rem; line-height: 1.55; }
.prose .panel-fix { background: #fff; border-left: 4px solid var(--safe); border-radius: var(--radius-sm); padding: .7rem .9rem; margin: 0; }

/* Expert walkthrough */
.walk { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.walk-steps { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .6rem; }
.walk-step { display: grid; grid-template-columns: 2.2rem 1fr; gap: .8rem; padding: .85rem .95rem; border-radius: var(--radius); background: var(--page); }
.walk-letter { width: 2.2rem; height: 2.2rem; border-radius: 9px; background: var(--caution); color: #2b1d00; display: grid; place-items: center; font: 800 1.05rem var(--font-display); }
.walk-title { margin: 0 0 .15rem; font: 700 1rem var(--font-display); }
.walk-text { margin: 0; font-size: .95rem; line-height: 1.5; }
.walk.is-stepped .walk-step { display: none; }
.walk.is-stepped .walk-step.is-shown { display: grid; }
.walk.is-stepped .walk-step.is-shown:not(.is-active) { opacity: .7; }
.walk-step.is-active { background: var(--caution-tint); box-shadow: inset 0 0 0 1.5px #f0d98c; }
.walk-conclusion { margin: 0; padding: .85rem 1rem; border-radius: var(--radius); background: var(--safe-tint); font-size: .98rem; }
.walk.is-stepped .walk-conclusion { display: none; }
.walk.is-stepped .walk-conclusion.is-shown { display: block; }
.walk:not(.is-stepped) .spot { background: var(--caution-tint); box-shadow: inset 0 -2px 0 var(--caution); }
.walk .spot.is-found::after { content: attr(data-flag); display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; margin-left: .3rem; border-radius: 50%; background: var(--caution); color: #2b1d00; font: 800 .7rem/1 var(--font-display); vertical-align: .1em; }
.walk .spot.is-active { outline: 2px solid var(--caution); outline-offset: 2px; border-radius: 3px; }
.walk .mail-window { position: sticky; top: 1rem; }

/* Real vs fake */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.compare-label { display: inline-block; font: 700 .9rem var(--font-display); padding: .25rem .75rem; border-radius: 99px; margin-bottom: .5rem; }
.compare-real .compare-label { background: var(--safe-tint); color: var(--safe); }
.compare-fake .compare-label { background: var(--danger-tint); color: var(--danger); }
.compare-real .mail-window { border-color: #a8d8bf; }
.compare-fake .mail-window { border-color: #f0bcb5; }
.mail-compact .mail-head, .mail-compact .mail-body { font-size: .86rem; }
.mail-compact .mail-head div { grid-template-columns: 3.6rem 1fr; }
.mail mark { background: #fde3df; box-shadow: inset 0 -2px 0 var(--danger); color: inherit; padding: 0 .1em; border-radius: 2px; }
.mail mark.good { background: var(--safe-tint); box-shadow: inset 0 -2px 0 var(--safe); }
.compare-points { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .5rem; }
.compare-points li { background: var(--page); border-radius: var(--radius-sm); padding: .7rem .9rem; font-size: .97rem; }

/* Incident timeline */
.timeline { list-style: none; margin: .4rem 0 1.2rem; padding: 0; }
.timeline li { position: relative; padding: 0 0 1.1rem 1.8rem; }
.timeline li::before { content: ""; position: absolute; left: .35rem; top: .45rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--danger); }
.timeline li::after { content: ""; position: absolute; left: calc(.7rem - 1px); top: 1.3rem; bottom: .1rem; width: 2px; background: #f0c4bf; }
.timeline li:first-child::before { background: var(--caution); }
.timeline li:last-child::after { display: none; }
.timeline-when { margin: 0; font: 700 .9rem var(--font-display); color: var(--danger); }
.timeline li:first-child .timeline-when { color: var(--caution-ink); }
.timeline-what { margin: .1rem 0 0; font-size: 1rem; line-height: 1.5; }
.timeline-lesson { margin: 0; padding: .9rem 1.1rem; border-radius: var(--radius); background: var(--safe-tint); font-size: 1rem; }
.share-file { font-weight: 600; background: #f5f7fa; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .8rem; display: inline-block; }

@media (max-width: 960px) {
  .walk { grid-template-columns: 1fr; }
  .walk .mail-window { position: static; }
}
@media (max-width: 760px) {
  .compare, .prose .two-col, .prose .slam-mini { grid-template-columns: 1fr; }
  .deck-progress { gap: .5rem; }
  .deck-part-name { font-size: .72rem; }
  .slam-item { grid-template-columns: 2.4rem 1fr; gap: .8rem; padding: .85rem .9rem; }
  .slam-letter { width: 2.4rem; height: 2.4rem; font-size: 1.2rem; }
}

/* First-version example emails: numbered markers appear when "Show the red flags" is open. */
.flag { display: none; background: var(--caution); color: #2b1d00; border-radius: 50%; width: 1.35rem; height: 1.35rem; font: 800 .72rem/1.35rem var(--font-display); text-align: center; vertical-align: middle; margin-left: .25rem; }
.mail:has(details[open]) .flag { display: inline-block; }
.mail:not([data-spot-game]) .hover-url { display: block; background: #fffbe8; border: 1px dashed #e5d48a; padding: .4rem .6rem; border-radius: 6px; margin-top: 0; }

/* Challenge views: text messages, a browser window, a shared folder */
.sms-bubble + .sms-bubble { margin-top: .5rem; }
.browser-window { background: #fff; }
.browser-bar { display: flex; align-items: center; gap: .7rem; margin: 0; padding: .55rem .8rem; background: #eef1f5; border-bottom: 1px solid var(--line); font-size: .88rem; }
.browser-dots { display: inline-flex; gap: .3rem; flex: none; }
.browser-dots i { width: 9px; height: 9px; border-radius: 50%; background: #cfd6e0; }
.browser-url { flex: 1; min-width: 0; background: #fff; border-radius: 6px; padding: .25rem .6rem; font-family: var(--font-mono); font-size: .82rem; overflow-wrap: anywhere; }
.browser-page { padding: 1.1rem 1.2rem .5rem; font-size: .96rem; }
.scam-page { background: #fff4f2; }
.scam-title { font: 800 1.15rem var(--font-display); color: #b42318; }
.scam-call { font-weight: 700; font-size: 1.05rem; }
.scam-timer { font-weight: 700; color: #b42318; }
.wifi-title { font: 700 1.1rem var(--font-display); }
.wifi-field { display: flex; gap: .6rem; align-items: center; font-size: .9rem; color: var(--muted); }
.wifi-input { flex: 1; max-width: 18rem; background: #f5f7fa; border: 1px solid var(--line); border-radius: 6px; padding: .3rem .6rem; color: var(--ink); }
.explorer-files { list-style: none; margin: 0; padding: .6rem .8rem; font-size: .94rem; }
.explorer-files li { display: flex; gap: .6rem; padding: .45rem .4rem; border-bottom: 1px solid #eef1f5; }
.explorer-files li:last-child { border-bottom: 0; }
.explorer-toast { margin: 0 .8rem .9rem; padding: .6rem .8rem; background: #1f2937; color: #fff; border-radius: 8px; font-size: .88rem; }
.explorer-toast .spot.is-found { color: var(--ink); }

/* Course map: one continuous line through the circles, circles centred on the first line of each title.
   The line runs from inside one circle to inside the next; the circles (white, above the line) hide the overlap. */
.stop::before { top: 1.6rem; bottom: -1.6rem; }
.route-rail .stop { grid-template-columns: 1.6rem minmax(0, 1fr); gap: .6rem; }
.route-rail .stop::before { left: calc(.8rem - 1px); top: .9rem; bottom: -.9rem; }
.route-rail .stop-mark { margin-top: .32rem; }
.route-rail .stop-body { padding: .45rem .6rem; margin: 0 0 .1rem; min-height: 0; }
.route-rail .stop-title { line-height: 1.35; }
.route-rail .stop.is-current .stop-body { box-shadow: none; background: var(--sky); }
.route-rail .stop.is-current .stop-title { color: var(--navy-deep); }
.route-rail .stop:not(.is-done):not(.is-current) .stop-title { color: #3d4b61; font-weight: 500; }
.stop.is-current::before, .stop:not(.is-done)::before { background: var(--line); }
.stop.is-done::before { background: #9fd3b8; }
.rail-summary-title { margin-bottom: .55rem; }
.rail-home { margin-bottom: .9rem; }

/* Course map rows: one line each, even rhythm */
.route-rail .stop-body { padding: .4rem .6rem; }
.route-rail .stop-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-rail .stop-mark { margin-top: .28rem; }
.route-rail .stop { margin-bottom: .2rem; }
.route-rail .stop::before { top: .9rem; bottom: -1.1rem; }

/* ---------- Public homepage ---------- */
.page-public { max-width: 1160px; }
.landing-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 3rem; align-items: start; padding: 1.5rem 0 2.5rem; }
.landing-kicker { color: var(--navy); font-weight: 600; font-size: .95rem; margin-bottom: .6rem; }
.landing-hero h1 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.08; letter-spacing: -.03em; margin-bottom: .45em; max-width: 16ch; }
.landing-lead { font-size: 1.14rem; color: #33425a; max-width: 54ch; }
.landing-facts { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; max-width: 40rem; }
.landing-facts li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; display: flex; flex-direction: column; gap: .1rem; }
.landing-facts strong { font-family: var(--font-display); font-size: 1.02rem; }
.landing-facts span { color: var(--muted); font-size: .88rem; }
.landing-start { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; box-shadow: 0 22px 44px -30px rgba(18, 54, 97, .45); scroll-margin-top: 1rem; }
.landing-start h2 { font-size: 1.3rem; }
.landing-form { display: flex; flex-direction: column; gap: .55rem; margin: 1rem 0 .8rem; }
.landing-form label { font-weight: 600; font-size: .9rem; }
.landing-form .btn { margin-top: .3rem; }
.landing-sent { background: var(--safe-tint); border-radius: var(--radius); padding: 1rem 1.1rem; }
.landing-sent-title { font: 700 1.08rem var(--font-display); color: var(--safe); margin-bottom: .3rem; }
.landing-section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem 1.8rem; margin-bottom: 1.2rem; }
.landing-section h2 { margin-bottom: 1rem; }
.landing-lessons { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.6rem; }
.landing-lessons li { display: flex; gap: .9rem; align-items: flex-start; }
.landing-lesson-icon { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 12px; display: grid; place-items: center; background: var(--sky); color: var(--navy); }
.landing-lesson-title { margin: 0; font: 700 1.02rem var(--font-display); }
.landing-lesson-text { margin: .1rem 0 0; color: var(--muted); font-size: .93rem; line-height: 1.45; }
.landing-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.landing-steps li { counter-increment: step; position: relative; padding-top: 2.6rem; font-size: .96rem; line-height: 1.5; }
.landing-steps li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 2rem; height: 2rem; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font: 700 .95rem var(--font-display); }
.landing-steps strong { display: block; font-family: var(--font-display); margin-bottom: .2rem; }
.landing-orgs { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.landing-orgs p { margin: 0; max-width: 62ch; color: #33425a; }
@media (max-width: 960px) {
  .landing-hero { grid-template-columns: 1fr; gap: 1.5rem; }
  .landing-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .landing-facts, .landing-lessons, .landing-steps { grid-template-columns: 1fr; }
  .landing-hero .btn-xl, .landing-form .btn { width: 100%; }
  .landing-section, .landing-start { padding: 1.2rem 1rem; border-radius: var(--radius); }
}

/* Homepage hero: the sign-in box matches the left column's height, top and bottom aligned */
.landing-hero { align-items: stretch; }
.landing-hero-text { display: flex; flex-direction: column; }
.landing-hero-text .landing-facts { margin-top: auto; padding-top: 1.6rem; }
.landing-start { display: flex; flex-direction: column; justify-content: center; }
.landing-start > :last-child { margin-bottom: 0; }
@media (max-width: 960px) {
  .landing-hero-text .landing-facts { margin-top: 0; }
}

/* ---------- Admin: guidance ---------- */
.optional { font-weight: 400; color: var(--muted); font-size: .82rem; margin-left: .3rem; }
.inline-fields { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .5rem 0 0 1.6rem; font-size: .92rem; }
.inline-fields input { width: 4.5rem; padding: .35rem .5rem; }
.guide h2 { margin-bottom: .8rem; }
.guide-steps { margin: 0 0 1.2rem; padding-left: 1.3rem; display: grid; gap: .45rem; }
.setup-steps { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .2rem; }
.setup-step { display: grid; grid-template-columns: 2rem 1fr; gap: .8rem; padding: .7rem .6rem; border-radius: var(--radius-sm); }
.setup-mark { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); color: var(--muted); font: 700 .9rem var(--font-display); background: #fff; }
.setup-step.is-done .setup-mark { background: var(--safe); border-color: var(--safe); color: #fff; }
.setup-step.is-done .setup-title { color: var(--muted); }
.setup-step.is-next { background: var(--sky); }
.setup-step.is-next .setup-mark { border-color: var(--navy); color: var(--navy); }
.setup-title { margin: .2rem 0 .1rem; font-weight: 700; }
.setup-text { margin: 0; font-size: .92rem; color: var(--muted); }
.setup-step .btn, .setup-step form { margin-top: .6rem; }
.preview-banner { background: var(--caution-tint); border: 1px solid #f0d98c; border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1.2rem; font-size: .95rem; }
.preview-banner a { margin-left: .4rem; font-weight: 600; }
.preview-lesson { max-width: 860px; }
.preview-text { white-space: pre-wrap; font: .95rem/1.6 var(--font); background: var(--page); border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin: 1rem 0 0; }

/* Admin: training content */
.content-list { list-style: none; margin: 0; padding: 0; }
.content-list li + li { border-top: 1px solid var(--line); }
.content-list a { display: grid; grid-template-columns: 1.6rem 2.6rem 1fr auto; gap: 1rem; align-items: center; padding: 1rem 1.3rem; text-decoration: none; color: inherit; }
.content-list a:hover { background: var(--sky); }
.content-num { font: 700 1rem var(--font-display); color: var(--muted); text-align: center; }
.content-text { display: flex; flex-direction: column; min-width: 0; }
.content-title { font: 700 1.05rem var(--font-display); color: var(--navy-deep); }
.content-summary { color: var(--muted); font-size: .92rem; }
.content-meta { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.answer-list { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .35rem; }
.answer-list li { padding: .45rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; font-size: .95rem; }
.answer-list li.is-answer { border-color: var(--safe); background: var(--safe-tint); font-weight: 600; }
.bank-q { padding: .9rem 0; border-top: 1px solid var(--line); }
.bank-q:first-of-type { border-top: 0; padding-top: .2rem; }
.bank-q .qtext, .check-q .qtext { font: 700 1rem/1.4 var(--font-display); margin: 0; }
@media (max-width: 760px) {
  .content-list a { grid-template-columns: 1.4rem 1fr; }
  .content-list .landing-lesson-icon { display: none; }
  .content-meta { grid-column: 2; white-space: normal; }
}
