:root {
  --bg: #f5f6f9;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --text: #1b2232;
  --muted: #5d6679;
  --muted-2: #a3abbb;
  --line: #dfe3eb;
  --primary: #2754c5;
  --primary-ink: #ffffff;
  --primary-soft: #e8eefc;
  --ok: #1f8a4c;
  --ok-soft: #e3f4ea;
  --warn: #b26b00;
  --warn-soft: #fdf1dc;
  --bad: #c53030;
  --bad-2: #8f1f1f;
  --bad-soft: #fde8e8;
  --info: #2f7fd1;
  --info-soft: #e5f0fb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 2px 8px rgba(20, 30, 50, .04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

/* Dark theme: follows the device unless the person picked light; or forced when they picked dark.
   Keep these two blocks identical (test/theme.test.js checks). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f131b;
    --surface: #171c26;
    --surface-2: #1e2430;
    --text: #e6e9f0;
    --muted: #9aa3b5;
    --muted-2: #5b6476;
    --line: #2a3140;
    --primary: #6e94ff;
    --primary-ink: #0b1020;
    --primary-soft: #1f2a48;
    --ok: #4cc283;
    --ok-soft: #15301f;
    --warn: #e7a740;
    --warn-soft: #3a2a10;
    --bad: #f07070;
    --bad-2: #c04848;
    --bad-soft: #3a1717;
    --info: #67a9f0;
    --info-soft: #152a40;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f131b;
  --surface: #171c26;
  --surface-2: #1e2430;
  --text: #e6e9f0;
  --muted: #9aa3b5;
  --muted-2: #5b6476;
  --line: #2a3140;
  --primary: #6e94ff;
  --primary-ink: #0b1020;
  --primary-soft: #1f2a48;
  --ok: #4cc283;
  --ok-soft: #15301f;
  --warn: #e7a740;
  --warn-soft: #3a2a10;
  --bad: #f07070;
  --bad-2: #c04848;
  --bad-soft: #3a1717;
  --info: #67a9f0;
  --info-soft: #152a40;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: .92em; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
.wrap { word-break: break-all; display: block; margin-top: .4em; }

/* Layout */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 880px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 24px; height: 58px; }
.topbar-inner.wide, .container.wide { max-width: 1180px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; white-space: nowrap; }
.brand svg { color: var(--primary); }
.brand:hover { text-decoration: none; }
.brand-sub { color: var(--muted); font-weight: 500; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a { color: var(--muted); padding: 6px 10px; border-radius: 6px; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav a.active { color: var(--primary); background: var(--primary-soft); }
.who { display: flex; align-items: center; gap: 12px; margin-left: auto; font-size: .9rem; }
.who-name { color: var(--muted); }
.theme-toggle { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.theme-toggle:hover { color: var(--text); background: var(--surface-2); }
.theme-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.theme-toggle[hidden] { display: none; }
.theme-toggle .ti { display: none; }
:root:not([data-theme]) .theme-toggle .ti-auto, :root[data-theme="light"] .theme-toggle .ti-light, :root[data-theme="dark"] .theme-toggle .ti-dark { display: block; }
.container { max-width: 880px; width: 100%; margin: 0 auto; padding: 28px 16px 48px; flex: 1; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.footer .container { padding: 18px 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; flex: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }
.card.flush { padding: 0; overflow-x: auto; }
.card.flush .table { margin: 0; }
.card.flush > .small { padding: 0 16px 12px; }
.card.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.card.narrow-left { max-width: 520px; }
.card.narrow-wide { max-width: 720px; margin-left: auto; margin-right: auto; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin-bottom: .2em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head p { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 { margin-bottom: 20px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.eyebrow { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-bottom: .5em; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 620px; margin: 0 auto 1.5em; }
.text-ok { color: var(--ok); }
.text-bad { color: var(--bad); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.center.actions, .center .actions { justify-content: center; }
.actions form { margin: 0; }
.inline { display: inline; }

.hero { text-align: center; padding: 56px 0 24px; }
.hero h1 { font-size: 2.1rem; }
.hero .actions { justify-content: center; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; text-decoration: none; line-height: 1.3; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary); filter: brightness(1.08); }
.btn-lg { padding: 11px 22px; font-size: 1.02rem; }
.btn-sm { padding: 5px 10px; font-size: .85rem; }
.btn-danger-outline { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.linklike { background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; padding: 0; }
.linklike.text-bad { color: var(--bad); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.stack .btn { align-self: flex-start; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 550; font-size: .92rem; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }
label.check input { margin-top: 4px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-weight: 400; width: 100%; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--primary); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
textarea { resize: vertical; }
.hint { color: var(--muted); font-weight: 400; font-size: .84rem; }
.hint-inline { color: var(--muted); font-weight: 400; font-size: .82rem; }
.filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filters input { flex: 1 1 260px; width: auto; }
.filters select { width: auto; }
.copy-row { display: flex; gap: 6px; min-width: 260px; }
.copy-row input { padding: 5px 8px; }
.qr-wrap { margin: 12px 0; }
.qr-wrap .qr { display: block; width: 200px; height: 200px; border-radius: 8px; border: 1px solid var(--line); }
.secret { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.secret code { font-size: 1.05rem; letter-spacing: .05em; padding: 6px 10px; }
.steps-list li { margin-bottom: 10px; }

/* Flash & badges */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; border: 1px solid transparent; }
.flash-ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.flash-error { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.flash-info { background: var(--info-soft); color: var(--text); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: var(--surface-2); color: var(--muted); }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-compact td { padding: 8px 10px; }
.table-compact th { padding: 8px 10px; }
.card > .table { margin: 0 -8px; width: calc(100% + 16px); }

/* KPIs & charts */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; color: var(--text); box-shadow: var(--shadow); }
a.kpi:hover { text-decoration: none; border-color: var(--primary); }
.kpi-label { color: var(--muted); font-size: .82rem; font-weight: 600; }
.kpi-value { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; }
.kpi-sub { color: var(--muted); font-size: .82rem; }
.stacked { border-radius: 7px; overflow: hidden; display: block; background: var(--surface-2); }
.seg-compliant, .swatch-compliant { fill: var(--ok); background: var(--ok); }
.seg-expiring, .swatch-expiring { fill: var(--warn); background: var(--warn); }
.seg-in_progress, .swatch-in_progress { fill: var(--info); background: var(--info); }
.seg-not_started, .swatch-not_started { fill: var(--muted-2); background: var(--muted-2); }
.seg-overdue, .swatch-overdue { fill: var(--bad); background: var(--bad); }
.seg-expired, .swatch-expired { fill: var(--bad-2); background: var(--bad-2); }
.seg-unassigned, .swatch-unassigned { fill: var(--line); background: var(--line); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 14px 0 0; font-size: .88rem; }
.legend a { color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.activity { list-style: none; padding: 0; margin: 0; }
.activity li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.activity li:last-child { border-bottom: 0; }
.pager { display: flex; justify-content: space-between; align-items: center; }

progress.progress { appearance: none; -webkit-appearance: none; width: 100%; height: 10px; border: 0; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 6px 0 8px; display: block; }
progress.progress::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
progress.progress::-webkit-progress-value { background: var(--primary); border-radius: 999px; }
progress.progress::-moz-progress-bar { background: var(--primary); border-radius: 999px; }
progress.progress-sm { width: 90px; height: 6px; display: inline-block; vertical-align: middle; margin: 0; }

/* Learning */
.learn-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.learn-side { position: sticky; top: 78px; }
.stepper { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 2px; }
.learn-side .stepper { margin: 0; }
.step { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: .88rem; color: var(--muted); }
.step .dot { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; border: 1.5px solid var(--line); background: var(--surface); }
.step-done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.step-done { color: var(--text); }
.step-active { background: var(--primary-soft); color: var(--text); font-weight: 600; }
.step-active .dot { border-color: var(--primary); color: var(--primary); }
.step-next .dot { border-color: var(--primary); }
.step:has(> a), .step:has(> .step-inner) { padding: 0; }
.step > a, .step > .step-inner { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.step > a:hover { background: var(--surface-2); }
.step > a:hover .label { text-decoration: underline; }
.step > a:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.center-actions { justify-content: center; flex-wrap: wrap; }

.prose { font-size: 1rem; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.module h1 { font-size: 1.7rem; }
.callout, .scenario { border-radius: 8px; padding: 14px 16px; margin: 1.4em 0; }
.callout { background: var(--warn-soft); border-left: 4px solid var(--warn); }
.scenario { background: var(--info-soft); border-left: 4px solid var(--info); }
.takeaways { background: var(--surface-2); border-radius: 8px; padding: 16px 20px; margin: 1.8em 0 1.2em; }
.takeaways h3 { margin-top: 0; }
.takeaways ul { margin-bottom: 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 1em 0; display: block; overflow-x: auto; }
.data-table th, .data-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.data-table th { background: var(--surface-2); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-weight: 600; font-size: .8rem; white-space: nowrap; }
.pill-public { background: var(--ok-soft); color: var(--ok); }
.pill-internal { background: var(--info-soft); color: var(--info); }
.pill-confidential { background: var(--warn-soft); color: var(--warn); }
.pill-restricted { background: var(--bad-soft); color: var(--bad); }
kbd { font-family: var(--mono); font-size: .82em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 .35em; background: var(--surface-2); }
.module-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 8px; }

.quiz .question { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin: 0 0 14px; }
.quiz legend { font-weight: 600; padding: 0 4px; }
.qnum { color: var(--muted); }
.option { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: .96rem; }
.option input { margin-top: 5px; }
.option:hover { background: var(--surface-2); }
.option:has(input:checked) { background: var(--primary-soft); }
.score { font-size: 3rem; font-weight: 750; margin: 0; letter-spacing: -.02em; }
.review { list-style: none; padding: 0; }
.review li { border-top: 1px solid var(--line); padding: 14px 0 4px; }
.review p { margin-bottom: .4em; }
.attestation { margin: 0 0 20px; padding: 16px 20px; background: var(--surface-2); border-left: 4px solid var(--primary); border-radius: 6px; line-height: 1.65; }
.evidence h3 { margin-bottom: .2em; }

.verify-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 4px auto 16px; font-size: 1.9rem; font-weight: 700; }
.verify-icon.ok { background: var(--ok-soft); color: var(--ok); }
.verify-icon.warn { background: var(--warn-soft); color: var(--warn); }
.verify-icon.bad { background: var(--bad-soft); color: var(--bad); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; text-align: left; max-width: 380px; margin: 16px auto 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }

/* Certificate */
.actions-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.certificate { background: #fffdf8; color: #1b2232; border-radius: 6px; padding: 14px; box-shadow: var(--shadow); }
.cert-inner { border: 2px solid #c9a24a; outline: 1px solid #c9a24a; outline-offset: 5px; padding: 48px 36px; text-align: center; }
.cert-org { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #2754c5; margin-bottom: 6px; }
.cert-kicker { font-size: 1.9rem; font-family: Georgia, "Times New Roman", serif; margin-bottom: 24px; }
.cert-text { color: #5d6679; margin-bottom: 6px; }
.cert-name { font-family: Georgia, "Times New Roman", serif; font-size: 2.2rem; border-bottom: 1px solid #c9a24a; display: inline-block; padding: 0 24px 4px; margin: 6px 0 16px; }
.cert-course { font-size: 1.3rem; font-weight: 650; margin-bottom: 6px; }
.cert-meta { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin: 30px 0 18px; }
.cert-meta div { display: flex; flex-direction: column; font-size: .9rem; }
.cert-meta span { color: #5d6679; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.cert-verify { font-size: .8rem; color: #5d6679; margin: 0; word-break: break-all; }

/* Illustrations: SVG art uses these classes so it follows the light/dark theme */
.hero-art { margin: -4px 0 18px; }
.hero-art svg, .scene svg { display: block; width: 100%; height: auto; border-radius: 12px; }
.art text { font-family: var(--font); }
.a-bg { fill: var(--primary-soft); }
.a-bg2 { fill: color-mix(in srgb, var(--primary) 14%, var(--primary-soft)); }
.a-paper { fill: var(--surface); }
.a-paper2 { fill: var(--surface-2); }
.a-line { fill: var(--line); }
.a-ink { fill: #262f40; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .a-ink { fill: #0b0f17; } }
:root[data-theme="dark"] .a-ink { fill: #0b0f17; }
.a-muted { fill: var(--muted-2); }
.a-pri { fill: var(--primary); }
.a-pri-soft { fill: color-mix(in srgb, var(--primary) 35%, var(--surface)); }
.a-ok { fill: var(--ok); }
.a-warn { fill: #e2a034; }
.a-bad { fill: var(--bad); }
.a-info { fill: var(--info); }
.a-white { fill: #fff; }
.a-skin1 { fill: #f2c9a5; }
.a-skin2 { fill: #c68b5e; }
.a-skin3 { fill: #8a5a3c; }
.a-hair { fill: #3a2a22; }
.a-wood { fill: color-mix(in srgb, #b07a4a 70%, var(--surface)); }
.a-s, .a-s-pri, .a-s-white, .a-s-muted, .a-s-line, .a-s-bad, .a-s-ok, .a-s-warn { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; }
.a-s { stroke: var(--text); }
.a-s-pri { stroke: var(--primary); }
.a-s-white { stroke: #fff; }
.a-s-muted { stroke: var(--muted-2); }
.a-s-line { stroke: var(--line); }
.a-s-bad { stroke: var(--bad); }
.a-s-ok { stroke: var(--ok); }
.a-s-warn { stroke: #e2a034; }
.a-thin { stroke-width: 2.5; }
.a-dash { stroke-dasharray: 2 9; }
.a-t { fill: var(--text); font-weight: 700; }
.a-t-white { fill: #fff; font-weight: 700; }
.a-t-muted { fill: var(--muted); font-weight: 600; }
.a-t-bad { fill: var(--bad); font-weight: 800; }
.a-sticky { fill: #ffe27a; }
.a-t-note { fill: #3a3a2a; font-weight: 700; }

/* Interactive scene: numbered hotspots appear when the answers are revealed */
.scene { margin: 12px 0; }
.hotspot { opacity: 0; transition: opacity .25s; }
.hotspot circle.hs-dot { fill: var(--warn); stroke: var(--surface); stroke-width: 3; }
.hotspot .hs-ring { fill: none; stroke: var(--warn); stroke-width: 3; stroke-dasharray: 6 5; }
.hotspot text { fill: var(--surface); font-family: var(--font); font-size: 15px; font-weight: 800; text-anchor: middle; dominant-baseline: central; }
.exercise:has(.reveal[open]) .hotspot { opacity: 1; }

/* Visual step diagrams and icon cards */
.icon { display: block; }
.flow, .icon-cards { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 1.2em 0 1.4em; counter-reset: flow; }
.prose .flow, .prose .icon-cards { padding-left: 0; }
.flow > li, .icon-cards > li { position: relative; background: var(--surface-2); border-radius: 12px; padding: 14px 14px 16px; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: .92rem; color: var(--muted); }
.flow > li strong, .icon-cards > li strong { color: var(--text); font-size: 1rem; }
.flow-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 4px; }
.flow > li { counter-increment: flow; }
.flow > li::before { content: counter(flow); position: absolute; top: 12px; right: 14px; font-size: .78rem; font-weight: 800; color: var(--muted-2); }
.flow > li.is-bad .flow-icon { background: var(--bad-soft); color: var(--bad); }
.flow > li.is-ok .flow-icon { background: var(--ok-soft); color: var(--ok); }
.flow > li.is-warn .flow-icon { background: var(--warn-soft); color: var(--warn); }
.flow > li.is-ok { box-shadow: inset 0 0 0 2px var(--ok); }

/* "In the news": recent real incidents with organization logos */
.news { margin: 2em 0 1.4em; }
.prose .news-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.news-updated { font-size: .78rem; font-weight: 600; color: var(--muted); }
.news-card { display: grid; grid-template-columns: 56px 1fr; gap: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 10px 0; background: var(--surface); }
.news-logo img, .news-logo svg { display: block; width: 56px; height: 56px; border-radius: 12px; object-fit: contain; }
.news-logo img { background: #fff; border: 1px solid var(--line); padding: 6px; box-sizing: border-box; }
.news-badge text { font-family: var(--font); }
.news-logo svg { box-shadow: 0 0 0 1px var(--line); }
.prose .news-body p { margin: 0 0 .5em; }
.prose .news-body p:last-child { margin-bottom: 0; }
.news-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag-news { background: var(--bad-soft); color: var(--bad); }
.news-sources { font-size: .8rem; color: var(--muted); }
@media (max-width: 560px) {
  .news-card { grid-template-columns: 1fr; }
  .news-logo img, .news-logo svg { width: 44px; height: 44px; }
}

/* Rich course content: practice exercises, case studies, diagrams (no JS required) */
.tag { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; line-height: 1.5; }
.tag-try { background: var(--primary-soft); color: var(--primary); }
.tag-case { background: var(--warn-soft); color: var(--warn); }
.stat { display: flex; gap: 18px; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 16px 20px; margin: 1.4em 0; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--primary); white-space: nowrap; line-height: 1; }
.stat-text { color: var(--muted); }
.prose .legend-list, .prose .url-legend { list-style: none; padding-left: 0; }
.legend-list li { margin-bottom: .6em; }
.exercise { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 1.6em 0; background: var(--surface); }
.exercise-label { font-weight: 700; margin-bottom: .6em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mock { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); margin: 12px 0; font-size: .93rem; overflow-wrap: anywhere; }
.mock-head { padding: 10px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.mock-row { display: flex; gap: 10px; }
.mock-k { color: var(--muted); width: 4.2em; flex: none; }
.mock-body { padding: 12px 14px; }
.prose .mock-body p { margin: 0 0 .7em; }
.mock-btn { display: inline-block; background: #2b6cb0; color: #fff; padding: 7px 16px; border-radius: 6px; font-weight: 600; }
.mock-small { font-size: .8rem; color: var(--muted); }
.mock-sms { max-width: 360px; padding: 12px; }
.prose .mock-sms-from { font-size: .8rem; color: var(--muted); text-align: center; margin: 0 0 8px; }
.bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 10px 12px; }
.flag { border-radius: 4px; }
.exercise:has(.reveal[open]) .flag { background: var(--warn-soft); box-shadow: 0 0 0 2px var(--warn); }
.exercise:has(.reveal[open]) .mock-btn.flag { background: #2b6cb0; }
.exercise:has(.reveal[open]) .flag::after { content: attr(data-n); display: inline-block; min-width: 1.35em; height: 1.35em; line-height: 1.35em; text-align: center; margin-left: 5px; border-radius: 999px; background: var(--warn); color: var(--surface); font-size: .72rem; font-weight: 700; vertical-align: text-top; }
.reveal { margin-top: 10px; }
.reveal > summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.flag-list { margin: 10px 0; }
.classify, .choice { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; background: var(--surface-2); margin-top: 8px; }
.classify > summary, .choice > summary { cursor: pointer; }
.classify[open] > summary, .choice[open] > summary { margin-bottom: 6px; font-weight: 600; }
.prose .classify p, .prose .choice p { margin: 0; }
.choice[open].good { border-color: var(--ok); background: var(--ok-soft); }
.choice[open]:not(.good) { border-color: var(--bad); background: var(--bad-soft); }
.choice-fb::before { font-weight: 700; }
.choice.good .choice-fb::before { content: "\2713  Right. "; color: var(--ok); }
.choice:not(.good) .choice-fb::before { content: "\2717  Not this one. "; color: var(--bad); }
.case { border-left: 4px solid var(--warn); background: var(--surface-2); border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 1.4em 0; }
.case-label { display: flex; gap: 8px; align-items: center; font-weight: 700; flex-wrap: wrap; }
.prose .case p:last-child { margin-bottom: 0; }
.url-anatomy { margin: 1.2em 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.url-line { font-family: var(--mono); font-size: 1rem; overflow-wrap: anywhere; padding: 12px; background: var(--surface-2); border-radius: 8px; line-height: 1.9; }
.u { padding-bottom: 2px; border-bottom: 3px solid transparent; }
.u-scheme { color: var(--muted); }
.u-sub { border-color: var(--muted-2); }
.u-dom { border-color: var(--bad); color: var(--bad); font-weight: 700; }
.u-path { color: var(--muted); border-color: var(--line); }
.url-legend { margin: 12px 0 8px; }
.url-legend li { display: flex; gap: 10px; align-items: baseline; }
.url-key { flex: none; width: 16px; height: 4px; border-radius: 2px; position: relative; top: -3px; }
.key-sub { background: var(--muted-2); }
.key-dom { background: var(--bad); }
.key-path { background: var(--muted); }
.url-anatomy figcaption { font-size: .85rem; color: var(--muted); }
.compare, .dodont { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 1.2em 0; }
.compare-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.compare-item code { font-size: 1rem; display: inline-block; margin: 4px 0 6px; overflow-wrap: anywhere; }
.prose .compare-label, .prose .dodont-h { font-weight: 700; margin: 0 0 .3em; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.compare-item.weak { border-top: 4px solid var(--bad); }
.weak .compare-label { color: var(--bad); }
.compare-item.strong { border-top: 4px solid var(--ok); }
.strong .compare-label { color: var(--ok); }
.prose .compare-item p:last-child { margin-bottom: 0; }
.dodont > div { border-radius: 10px; padding: 12px 16px; }
.do { background: var(--ok-soft); }
.dont { background: var(--bad-soft); }
.do .dodont-h { color: var(--ok); }
.dont .dodont-h { color: var(--bad); }
.prose .dodont ul { margin: 0; }
.report-card { border: 1px dashed var(--primary); border-radius: 12px; padding: 14px 18px; margin: 1.4em 0; background: var(--primary-soft); }
.prose .report-h { font-weight: 700; margin: 0 0 .4em; }
.prose .report-card p:last-child { margin-bottom: 0; }

/* Course preview (admin) */
.kv.kv-left { margin: 8px 0 0; max-width: none; }
.kv.kv-left dd { font-weight: 500; }
.toc { padding-left: 1.4em; margin: 0; }
.kv-left + h3 { margin-top: 1.4em; }
.toc li { margin-bottom: .3em; }
.course-module { scroll-margin-top: 80px; }
.module-title { font-size: 1.5rem; margin-bottom: .3em; }
.key { padding-left: 1.6em; margin: 0; }
.key-q { padding: 14px 0 6px; border-top: 1px solid var(--line); }
.key-q:first-child { border-top: 0; }
.key-prompt { margin-bottom: .5em; }
.key-options { list-style: none; padding: 0; margin: 0 0 .5em; }
.key-options li { display: flex; align-items: baseline; gap: 10px; padding: 5px 10px; border-radius: 6px; }
.key-options li.is-correct { background: var(--ok-soft, var(--primary-soft)); font-weight: 600; }
.key-letter { flex: none; width: 1.4em; height: 1.4em; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); font-size: .78rem; font-weight: 600; color: var(--muted); }
.key-options li.is-correct .key-letter { border-color: var(--ok); color: var(--ok); }
.key-why { margin: 0 0 .4em 10px; }
.key-options li > span:not(.key-letter):not(.badge), .option > span { min-width: 0; overflow-wrap: anywhere; }
.key-options .badge { flex: none; }
@media (max-width: 560px) {
  .module-actions > span.muted { order: -1; flex-basis: 100%; }
  .kv.kv-left { grid-template-columns: 1fr; gap: 2px; }
  .kv.kv-left dd { margin-bottom: 10px; }
}

@media (max-width: 1100px) {
  .topbar-inner.wide .brand-sub, .topbar-inner.wide .who-name { display: none; }
  .topbar-inner.wide { gap: 14px; }
}

@media (max-width: 760px) {
  .learn-layout { grid-template-columns: 1fr; }
  .learn-side { position: static; display: none; }
  .topbar-inner { gap: 12px; height: auto; min-height: 58px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .brand-sub { display: none; }
  .nav { order: 3; flex-basis: 100%; }
  .card { padding: 18px; }
  .hero h1 { font-size: 1.6rem; }
  .cert-inner { padding: 32px 14px; }
  .cert-name { font-size: 1.6rem; }
  .table th, .table td { padding: 8px; }
}

@media print {
  body { background: #fff; color: #000; }
  .topbar, .footer, .no-print, .actions-bar, .flash, form, .theme-toggle { display: none !important; }
  .container { max-width: none; padding: 0; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .certificate { box-shadow: none; padding: 0; }
  details { display: block; }
  details > * { display: block; }
  .course-module { break-inside: auto; break-before: page; }
  .key-q, .exercise, .case, .compare, .dodont, .report-card, .news-card { break-inside: avoid; }
  .key-options li.is-correct { outline: 1px solid #000; }
  a[href^="#"] { color: inherit; text-decoration: none; }
}

/* Reset training panel (employee page) */
.reset-panel > summary { cursor: pointer; list-style-position: outside; }
.reset-panel[open] > summary { margin-bottom: 14px; }
.reset-panel form { max-width: 560px; }

/* Sign in with Google */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: #fff; color: #1f1f1f; border: 1px solid #747775; font-weight: 500; }
.btn-google:hover { background: #f8f9fa; color: #1f1f1f; }
.btn-google .g-logo { flex: none; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0 6px; color: var(--muted); font-size: 0.85rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* Google Workspace admin page */
.pad { padding: 16px 16px 0; }
.actions.pad { padding: 12px 16px 16px; align-items: center; }
.check-col { width: 36px; text-align: center; }
.check-col input { width: 16px; height: 16px; }
.inline-label { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 500; margin: 0; }
.inline-label select { width: auto; }
.setup-steps li { margin-bottom: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------------- Phish or Legit? ---------------- */
.game-top { display: flex; justify-content: space-between; align-items: baseline; }
.game-dots { list-style: none; display: flex; gap: 6px; padding: 0; margin: 8px 0 16px; }
.game-dots li { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.game-dots li.is-ok { background: var(--ok); border-color: var(--ok); }
.game-dots li.is-bad { background: var(--bad); border-color: var(--bad); }
.game-dots li.is-active { background: var(--primary-soft); border-color: var(--primary); }
.game-card { margin: 0 0 16px; animation: card-in .25s ease-out; }
.game-card .eyebrow { margin-bottom: 6px; }
.game-context { display: flex; gap: 8px; align-items: flex-start; background: var(--info-soft); color: var(--text); border-radius: 8px; padding: 8px 12px; font-size: .9rem; margin: 0 0 10px; }
.game-context .icon { color: var(--info); flex: none; width: 18px; height: 18px; margin-top: 2px; }
.game-card .mock p { margin: 0 0 .6em; }
.game-card .mock p:last-child { margin-bottom: 0; }
.mock-attach { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; background: var(--surface); font-size: .85rem; }
.mock-attach .icon { width: 16px; height: 16px; color: var(--muted); }
.mock-push { max-width: 380px; padding: 12px 14px; border-radius: 16px; }
.mock-push-app { display: flex; gap: 6px; align-items: center; font-size: .8rem; font-weight: 600; }
.mock-push-app .icon { width: 16px; height: 16px; color: var(--primary); }
.mock-push-app .muted { margin-left: auto; font-weight: 400; }
.mock-push-title { font-weight: 650; }
.mock-push-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.mock-push-actions span { text-align: center; padding: 6px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .85rem; }
.mock-qr { padding: 14px; }
.mock-qr-sticker { max-width: 230px; margin: 0 auto 10px; background: #fff7d6; color: #2b2410; border: 2px dashed #c9a24a; border-radius: 6px; padding: 12px; text-align: center; transform: rotate(-1.5deg); }
.mock-qr-sticker .mock-small { color: #5b4f2a; }
.mock-qr-title { font-weight: 750; text-transform: uppercase; font-size: .85rem; letter-spacing: .03em; }
.mock-qr-sticker svg.qr { width: 120px; height: 120px; display: block; margin: 8px auto; background: #fff; }
.mock-browser { overflow: hidden; }
.mock-bar { display: flex; gap: 8px; align-items: center; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 12px; font-size: .85rem; overflow-wrap: anywhere; }
.mock-bar .icon { width: 14px; height: 14px; color: var(--muted); flex: none; }
.mock-signin { text-align: center; font-size: 1.2rem; padding: 18px 0 8px; }
.mock-chat { padding: 12px 14px; }
.mock-chat-from { display: flex; gap: 8px; align-items: center; }
.avatar { width: 28px; height: 28px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); display: inline-grid; place-items: center; font-weight: 700; font-size: .85rem; }
.game-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-choice { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; font-size: 1.05rem; font-weight: 700; border-width: 2px; }
.btn-choice .icon { width: 20px; height: 20px; }
.btn-choice.is-phish { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: var(--bad-soft); }
.btn-choice.is-legit { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: var(--ok-soft); }
.btn-choice:hover { transform: translateY(-1px); }
.game-verdict { display: flex; gap: 12px; align-items: flex-start; border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; animation: card-in .2s ease-out; }
.game-verdict .icon { flex: none; width: 24px; height: 24px; margin-top: 1px; }
.game-verdict p { margin: 6px 0 0; }
.game-verdict.is-ok { background: var(--ok-soft); color: var(--text); }
.game-verdict.is-ok .icon { color: var(--ok); }
.game-verdict.is-bad { background: var(--bad-soft); color: var(--text); }
.game-verdict.is-bad .icon { color: var(--bad); }
.game-clues-title { font-size: 1rem; margin: 0 0 6px; }
.game-clues { margin: 0 0 8px; padding-left: 1.2em; }
.game-clues li { margin-bottom: 4px; }
.game-clues.is-bad li::marker { color: var(--bad); }
.game-clues.is-ok li::marker { color: var(--ok); }
.game-recap { list-style: none; padding: 0; margin: 20px 0; border-top: 1px solid var(--line); }
.game-recap li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px 10px 26px; border-bottom: 1px solid var(--line); position: relative; }
.game-recap li::before { position: absolute; left: 2px; font-weight: 700; }
.game-recap li.is-ok::before { content: "✓"; color: var(--ok); }
.game-recap li.is-bad::before { content: "✕"; color: var(--bad); }
.game-recap .small { white-space: nowrap; color: var(--muted); }
.game-stats { display: flex; gap: 28px; flex-wrap: wrap; margin: 18px 0 8px; }
.game-stats div { display: flex; flex-direction: column; }
.game-stats span { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.game-stats strong { font-size: 1.4rem; }
.game-recent { list-style: none; padding: 0; margin: 0 0 12px; }
.game-recent li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.game-teaser .btn { margin-top: 4px; }
.game-callout { display: flex; gap: 16px; align-items: center; justify-content: space-between; border: 1px dashed var(--primary); background: var(--primary-soft); border-radius: 12px; padding: 14px 16px; margin: 1.6em 0; }
.game-callout p { margin: 0 0 4px; }
.game-callout .btn { flex: none; }
.game-card .mock-sms-from { font-size: .8rem; color: var(--muted); text-align: center; margin: 0 0 8px; }
.tag-external { background: var(--warn-soft); color: var(--warn); font-size: .7rem; }
.badge-earned { display: inline-flex; gap: 8px; align-items: center; background: linear-gradient(135deg, #f6d27a, #e2a034); color: #4a3200; font-weight: 700; border-radius: 999px; padding: 6px 14px; animation: pop .4s ease-out; }
.badge-earned .icon { width: 18px; height: 18px; }
@keyframes card-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.7); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .game-card, .game-verdict, .badge-earned { animation: none; } .btn-choice:hover { transform: none; } }

/* ---------------- Badges ---------------- */
.badges { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.badges li { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.badges li > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.badge-icon { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.badge-icon .icon { width: 20px; height: 20px; }
.badges .is-earned .badge-icon { background: linear-gradient(135deg, #f6d27a, #e2a034); color: #4a3200; box-shadow: 0 0 0 3px var(--warn-soft); }
.badges .is-locked { opacity: .6; }
.badges .is-locked .badge-icon { background: var(--surface-2); color: var(--muted); }

/* ---------------- Department race ---------------- */
.race-prize { background: var(--warn-soft); color: var(--text); border-radius: 8px; padding: 8px 12px; font-weight: 600; }
.race-list { list-style: none; padding: 0; margin: 0 0 10px; }
.race-list li { display: grid; grid-template-columns: 2em 1fr 90px 3.2em; gap: 10px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.race-list li.is-mine { background: var(--primary-soft); border-radius: 8px; }
.race-list li.is-pooled { color: var(--muted); }
.race-place { font-size: 1.1rem; text-align: center; width: 2em; }
.race-rate { text-align: right; font-weight: 700; }
.race-bar { width: 100px; }

/* ---------------- Certificate extras ---------------- */
.cert-codename { color: #5d6679; font-size: .9rem; margin: -8px 0 14px; }
.cert-codename strong { color: #1b2232; font-family: var(--mono); font-size: .85rem; letter-spacing: .02em; }
.cert-badges { list-style: none; padding: 0; margin: 0 0 18px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.cert-badges li { display: inline-flex; gap: 6px; align-items: center; border: 1px solid #c9a24a; color: #6b4f12; border-radius: 999px; padding: 3px 10px 3px 6px; font-size: .78rem; font-weight: 600; }
.cert-badges .icon { width: 14px; height: 14px; }
.actions-bar .actions { display: inline-flex; gap: 8px; }

@media (max-width: 640px) {
  .game-callout { flex-direction: column; align-items: flex-start; }
  .race-list li { grid-template-columns: 2em 1fr 3.2em; }
  .race-list li progress { display: none; }
  .game-recap li { flex-direction: column; gap: 2px; }
}
