:root {
  --blue: #2274b5; --red: #d14938; --yellow: #d8db3e; --green: #9dc24c; --purple: #5c378d;
  --royal: #24478c; --navy: #0e1e42; --navy-2: #162a57; --ink: #15203a; --body: #3d4861;
  --muted: #6a7489; --line: #dfe5ee; --paper: #f4f7fb; --white: #fff;
  --good: #3f7d20; --good-bg: #eef6e4; --bad: #b8382a; --bad-bg: #fbecea;
  --radius: 14px;
  --display: "Sora", "Segoe UI", system-ui, sans-serif;
  --text: "Inter", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(14, 30, 66, .06), 0 12px 32px -12px rgba(14, 30, 66, .18);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--body); font: 16px/1.6 var(--text); min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.25; margin: 0 0 .5em; }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
em { font-style: normal; font-family: ui-monospace, Consolas, monospace; font-size: .92em; background: #fff3cd; padding: 0 .25em; border-radius: 4px; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* Top bar and progress */
.ast-top { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 24px; padding: 14px 24px; flex-wrap: wrap; }
.ast-logo { height: 30px; width: auto; }
.ast-course { display: flex; flex-direction: column; line-height: 1.3; border-left: 1px solid rgba(255,255,255,.25); padding-left: 24px; }
.ast-course span { font-size: .8rem; opacity: .75; }
.ast-course strong { font-family: var(--display); font-weight: 600; }
@media (max-width: 640px) { .ast-top { gap: 10px; padding: 12px 16px; } .ast-course { border-left: 0; padding-left: 0; } }
h2[tabindex="-1"]:focus { outline: none; }
.ast-progress { height: 6px; background: var(--navy-2); }
.ast-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--green)); transition: width .4s ease; }
.ast-main { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 32px 16px 48px; }
.ast-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 24px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); background: #fff; }

/* Cards and layout */
.ast-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 4vw, 36px); }
.ast-step-label { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.ast-intro { font-size: 1.05rem; }
.ast-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.ast-btn { background: var(--blue); color: #fff; border: 0; border-radius: 999px; padding: 12px 26px; font-weight: 600; }
.ast-btn:hover { background: var(--royal); }
.ast-btn[disabled] { background: #b9c3d3; cursor: not-allowed; }
.ast-btn.ghost { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.ast-hint { font-size: .9rem; color: var(--muted); margin: 0; }
.ast-with-wombat { display: grid; grid-template-columns: 1fr 150px; gap: 24px; align-items: start; }
.ast-wombat { width: 150px; height: auto; }
@media (max-width: 640px) { .ast-with-wombat { grid-template-columns: 1fr; } .ast-wombat { width: 110px; justify-self: center; order: -1; } }

/* Video */
.ast-video { position: relative; aspect-ratio: 16 / 9; background: var(--navy); border-radius: 10px; overflow: hidden; margin: 18px 0 8px; }
.ast-video video { width: 100%; height: 100%; display: block; }
.ast-video-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-align: center; padding: 20px; gap: 8px; }
.ast-video-empty img { width: 120px; }
.ast-video-empty small { opacity: .7; }
.ast-note { font-size: .82rem; color: var(--muted); margin: 0 0 12px; }
.ast-transcript summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.ast-transcript div { margin-top: 10px; padding: 14px 18px; background: var(--paper); border-radius: 10px; }

/* Five clues */
.ast-clues { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 12px; }
.ast-clues li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; opacity: 0; transform: translateY(8px); animation: ast-in .4s ease forwards; }
.ast-clues .i { font-size: 1.6rem; line-height: 44px; text-align: center; background: var(--paper); border-radius: 10px; }
.ast-clues h3 { margin: 0 0 2px; }
.ast-clues p { margin: 0; }
@keyframes ast-in { to { opacity: 1; transform: none; } }
.ast-tip { background: #eaf3fb; border-left: 4px solid var(--blue); padding: 14px 18px; border-radius: 0 10px 10px 0; }

/* Fake email for the hotspot exercise */
.ast-mail { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 18px 0; background: #fff; font-family: "Segoe UI", system-ui, sans-serif; }
.ast-mail-bar { background: #f3f4f6; padding: 8px 14px; font-size: .8rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.ast-mail-head { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ast-mail-subject { font-size: 1.1rem; font-weight: 700; color: #111; margin-bottom: 8px; }
.ast-mail-meta { font-size: .88rem; color: #444; }
.ast-mail-body { padding: 18px; color: #222; }
.ast-mail-logo { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #555; margin-bottom: 14px; }
.ast-mail-logo i { display: grid; grid-template-columns: 9px 9px; gap: 2px; }
.ast-mail-logo i b { width: 9px; height: 9px; display: block; }
.ast-mail-cta { display: inline-block; background: #0f6cbd; color: #fff; padding: 9px 18px; border-radius: 4px; font-weight: 600; }
.ast-spot { all: unset; cursor: pointer; border-radius: 4px; box-shadow: 0 0 0 2px transparent; transition: box-shadow .2s, background .2s; position: relative; }
.ast-spot:hover { background: #fff8d6; }
.ast-spot:focus-visible { outline: 3px solid var(--yellow); }
.ast-spot.found { background: #fdecea; box-shadow: 0 0 0 2px var(--red); }
.ast-spot .n { position: absolute; top: -10px; right: -12px; background: var(--red); color: #fff; border-radius: 50%; width: 20px; height: 20px; font: 700 12px/20px var(--text); text-align: center; }
.ast-link-peek { display: block; margin-top: 6px; font-size: .78rem; color: var(--muted); }
.ast-found-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ast-found-list li { background: var(--bad-bg); border-radius: 10px; padding: 10px 14px; animation: ast-in .3s ease forwards; opacity: 0; }
.ast-found-list strong { color: var(--bad); }
.ast-counter { font-weight: 700; color: var(--ink); }

/* Inbox triage */
.ast-triage { display: grid; gap: 14px; margin-top: 18px; }
.ast-msg { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.ast-msg-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.ast-msg-top strong { color: var(--ink); font-size: .95rem; }
.ast-msg-subject { font-weight: 600; color: var(--ink); margin: 4px 0; }
.ast-msg-body { font-size: .95rem; margin: 0 0 12px; }
.ast-msg.sms .ast-msg-body { background: #e9e9eb; border-radius: 16px 16px 16px 4px; padding: 10px 14px; display: inline-block; max-width: 520px; }
.ast-choose { display: flex; gap: 10px; flex-wrap: wrap; }
.ast-choose button { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 18px; font-weight: 600; color: var(--ink); }
.ast-choose button:hover:not([disabled]) { border-color: var(--blue); }
.ast-choose button.picked.right { background: var(--good-bg); border-color: var(--good); color: var(--good); }
.ast-choose button.picked.wrong { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.ast-why { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; font-size: .95rem; }
.ast-why.right { background: var(--good-bg); }
.ast-why.wrong { background: var(--bad-bg); }

/* Scenario and quiz */
.ast-options { display: grid; gap: 10px; margin: 18px 0; }
.ast-option { text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 14px 16px; color: var(--ink); }
.ast-option:hover:not([disabled]) { border-color: var(--blue); }
.ast-option.right { border-color: var(--good); background: var(--good-bg); }
.ast-option.wrong { border-color: var(--bad); background: var(--bad-bg); }
.ast-option[disabled] { cursor: default; }
.ast-q { margin-bottom: 26px; }
.ast-q h3 { font-size: 1.05rem; }
.ast-report { background: var(--paper); border-radius: 10px; padding: 12px 16px; font-size: .95rem; }

/* Finish */
.ast-finish { text-align: center; }
.ast-finish img { width: 170px; }
.ast-score { font: 700 2.6rem/1 var(--display); color: var(--ink); margin: 10px 0; }
.ast-next { color: var(--muted); }
.ast-sample-note { margin-top: 24px; font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .ast-clues li, .ast-found-list li { opacity: 1; transform: none; } }

/* Pages: sign in, My training, course, verify */
.ast-narrow { max-width: 560px; margin: 0 auto; }
.ast-msg { padding: 12px 16px; border-radius: 10px; margin: 0 0 18px; }
.ast-msg--ok { background: var(--good-bg); border-left: 5px solid var(--green); }
.ast-msg--err { background: var(--bad-bg); border-left: 5px solid var(--red); }
.ast-msg--info { background: #eaf3fb; border-left: 5px solid var(--blue); }
.ast-form { display: grid; gap: 14px; margin: 18px 0; }
.ast-form label span, .ast-pw span { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; font-size: .95rem; }
.ast-form input, .ast-pw input { width: 100%; font: inherit; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; }
.ast-form input:focus, .ast-pw input:focus { border-color: var(--blue); outline: none; }
.ast-form.ast-inline { grid-template-columns: 1fr auto; align-items: end; }
.ast-trap { position: absolute; left: -9999px; }
.ast-top a { line-height: 0; }
.ast-out { margin-left: auto; }
.ast-out button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 6px 14px; font-size: .85rem; }
.ast-course-card { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-top: 16px; }
.ast-course-card > div:first-child { flex: 1 1 280px; }
.ast-course-card h3 { margin: 0 0 2px; }
.ast-meta { margin: 0 0 10px; color: var(--muted); font-size: .9rem; }
.ast-bar { height: 8px; background: var(--paper); border-radius: 99px; overflow: hidden; }
.ast-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); }
.ast-course-acts { display: flex; gap: 10px; flex-wrap: wrap; }
a.ast-btn { display: inline-block; text-decoration: none; }
.ast-lessons { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 10px; }
.ast-lessons li { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.ast-lessons li small { display: block; color: var(--muted); }
.ast-lessons li strong { color: var(--ink); }
.ast-num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--paper); color: var(--ink); }
.ast-lessons .is-done .ast-num { background: var(--good-bg); color: var(--good); }
.ast-lessons .is-next { border-color: var(--blue); box-shadow: 0 0 0 3px #eaf3fb; }
.ast-lessons .is-next .ast-num { background: var(--blue); color: #fff; }
.ast-lessons .is-locked { opacity: .6; }
.ast-lock { font-size: .85rem; color: var(--muted); }
@media (max-width: 560px) { .ast-lessons li { grid-template-columns: 36px 1fr; } .ast-lessons li > a, .ast-lessons li > .ast-lock { grid-column: 2; justify-self: start; } }
.ast-verify { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 12px; margin-bottom: 18px; }
.ast-verify > span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; color: #fff; flex: none; }
.ast-verify strong { display: block; color: var(--ink); font-size: 1.1rem; }
.ast-verify small { color: var(--muted); }
.ast-verify.is-good { background: var(--good-bg); } .ast-verify.is-good > span { background: var(--good); }
.ast-verify.is-bad { background: var(--bad-bg); } .ast-verify.is-bad > span { background: var(--bad); }
.ast-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.ast-dl dt { font-weight: 600; color: var(--ink); } .ast-dl dd { margin: 0; }

/* Passphrase tester */
.ast-pw { display: block; margin: 18px 0 10px; }
.ast-meter { height: 10px; background: var(--paper); border-radius: 99px; overflow: hidden; }
.ast-meter span { display: block; height: 100%; width: 0; transition: width .3s, background .3s; background: var(--red); }
.ast-meter span.is-mid { background: #e0a400; } .ast-meter span.is-good { background: var(--good); }
.ast-pw-result { margin: 10px 0 4px; min-height: 1.6em; }
.ast-examples { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 14px 0 18px; font-size: .9rem; }
.ast-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; color: var(--ink); }
.ast-chip:hover { border-color: var(--blue); }

/* Message kinds, final quiz */
.ast-msg--call .ast-msg-body, .ast-msg--prompt .ast-msg-body { background: var(--paper); border-radius: 10px; padding: 10px 14px; }
fieldset.ast-q { border: 0; padding: 0; margin: 0 0 26px; }
fieldset.ast-q legend { padding: 0; }
.ast-option.chosen { border-color: var(--blue); background: #eaf3fb; }
.ast-result { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 8px; }
.ast-finish-acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ast-linkbtn { background: none; border: 0; color: var(--blue); text-decoration: underline; padding: 0; }
.ast-option.chosen.right { border-color: var(--good); background: var(--good-bg); }
.ast-option.chosen.wrong { border-color: var(--bad); background: var(--bad-bg); }
