:root {
  --ink: #16202b;
  --muted: #5b6876;
  --line: #dde3ea;
  --bg: #f4f6f9;
  --card: #ffffff;
  --brand: #14335c;
  --brand-ink: #ffffff;
  --accent: #c9a227;
  --ok: #1f7a4a;
  --ok-bg: #e6f4ec;
  --warn: #9a5b00;
  --warn-bg: #fff3dc;
  --bad: #b42318;
  --bad-bg: #fdecea;
  --radius: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 17px; line-height: 1.5; }
a { color: var(--brand); }
header.bar {
  background: var(--brand); color: var(--brand-ink);
  padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
header.bar .mark { font-weight: 700; letter-spacing: .02em; }
header.bar .mark span { color: var(--accent); }
header.bar button { background: transparent; color: inherit; border: 1px solid rgba(255,255,255,.4); padding: 6px 12px; border-radius: 8px; font: inherit; font-size: 15px; cursor: pointer; }
main { max-width: 760px; margin: 0 auto; padding: 20px 16px 60px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.narrow { max-width: 420px; margin: 40px auto; }
h1 { font-size: 26px; margin: 0 0 6px; line-height: 1.2; }
h2 { font-size: 20px; margin: 0 0 12px; }
h3 { font-size: 17px; margin: 18px 0 6px; }
.muted { color: var(--muted); }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=email] {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit;
}
input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.btn {
  display: inline-block; background: var(--brand); color: var(--brand-ink); border: 0;
  padding: 12px 18px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
}
.btn.block { display: block; width: 100%; margin-top: 12px; }
.btn.secondary { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.alert { padding: 12px 14px; border-radius: 8px; margin: 12px 0; }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.hidden { display: none !important; }

.progress { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 4px; }
.progress > div { height: 100%; background: var(--ok); width: 0; transition: width .3s; }

.mods { list-style: none; margin: 0; padding: 0; }
.mods li { border-top: 1px solid var(--line); }
.mods li:first-child { border-top: 0; }
.mods a, .mods .row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; text-decoration: none; color: inherit; }
.mods a:hover { background: var(--bg); }
.mods .title { flex: 1; }
.mods .sub { display: block; font-size: 14px; color: var(--muted); }
.dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; flex: none; border: 2px solid var(--line); color: var(--muted); }
.dot.passed { background: var(--ok); border-color: var(--ok); color: #fff; }
.dot.failed { border-color: var(--bad); color: var(--bad); }
.dot.in_progress { border-color: var(--brand); color: var(--brand); }
.locked { opacity: .55; }
.pill { font-size: 13px; padding: 2px 8px; border-radius: 99px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }

.lesson img { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.q { border-top: 1px solid var(--line); padding: 14px 0; }
.q:first-of-type { border-top: 0; }
.q p { font-weight: 600; margin: 0 0 8px; }
.q label { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.q label:has(input:checked) { border-color: var(--brand); background: #eef3fa; }
.q.wrong p::after { content: "  \2014  review this one"; color: var(--bad); font-weight: 400; }
.score { font-size: 44px; font-weight: 800; line-height: 1; }
.video.demo-video { aspect-ratio: auto; background: #14335c; color: #fff; }
.demo-video-inner { padding: 24px 20px; text-align: center; }
.demo-video-inner p { margin: 0 0 8px; }
.demo-video-inner .muted { color: #c8d3e3; }
.demo-video-inner .btn.secondary { background: #fff; margin-top: 8px; }

/* ---- illustrated phone screens and examples in lessons ---- */
.fig { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 16px 0 18px; }
.fig figcaption { width: 100%; text-align: center; font-size: 14px; color: var(--muted); }
.m-note { display: block; font-size: 12px; margin-top: 2px; }
.m-tapkey { white-space: nowrap; }
.mock { flex: 1 1 0; max-width: 196px; min-width: 0; border: 7px solid #1b1f24; border-radius: 26px; background: #fff; overflow: hidden; font-size: 12px; line-height: 1.35; color: #16202b; box-shadow: 0 6px 18px rgba(20,51,92,.15); display: flex; flex-direction: column; }
.m-sb { display: flex; justify-content: space-between; padding: 4px 12px 2px; font-size: 10px; color: #5b6876; }
.m-hd { font-weight: 700; font-size: 14px; padding: 6px 10px 8px; border-bottom: 1px solid #e6eaef; display: flex; justify-content: space-between; align-items: center; }
.m-r { font-size: 11px; font-weight: 600; color: #2563eb; }
.m-bd { padding: 8px 10px; min-height: 250px; flex: 1; position: relative; }
.m-lbl { font-size: 10px; color: #5b6876; margin: 6px 0 2px; }
.m-in { border: 1px solid #cfd6de; border-radius: 6px; padding: 6px; }
.m-btn { background: #2563eb; color: #fff; text-align: center; font-weight: 700; border-radius: 8px; padding: 7px; margin-top: 10px; }
.m-btn.m-sec { background: #fff; color: #2563eb; border: 1px solid #2563eb; }
.m-btn.m-red { background: #b42318; }
.m-btn.m-big { padding: 14px; font-size: 14px; }
.m-btn.m-off { background: #cfd6de; color: #fff; }
.m-link { text-align: center; color: #2563eb; font-size: 11px; margin-top: 10px; }
.m-card { border: 1px solid #e1e6ec; border-radius: 8px; padding: 6px 8px; margin: 6px 0; }
.m-mut { color: #6b7785; }
.m-banner { background: #fff4d6; border: 1px solid #f0d58a; border-radius: 8px; padding: 6px 8px; font-weight: 700; margin: 6px 0; }
.m-week { display: flex; gap: 2px; text-align: center; font-size: 10px; margin-bottom: 4px; }
.m-week span { flex: 1; padding: 3px 0; border-radius: 6px; }
.m-week span.on { background: #2563eb; color: #fff; font-weight: 700; }
.m-tabs { display: flex; border-top: 1px solid #e6eaef; font-size: 9.5px; }
.m-tabs span { flex: 1; text-align: center; padding: 7px 2px; color: #6b7785; }
.m-tabs span.on { color: #2563eb; font-weight: 700; }
.m-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid #eef1f4; }
.m-row > span:last-child { text-align: right; }
.m-memo { background: #f4f6f9; border-radius: 6px; padding: 6px; margin-top: 6px; }
.m-ok { background: #e6f4ec; color: #1f7a4a; border-radius: 6px; padding: 6px; text-align: center; font-weight: 600; margin: 8px 0; }
.m-bad { background: #fdecea; color: #b42318; border-radius: 6px; padding: 6px; text-align: center; font-weight: 600; margin: 8px 0; }
.m-timer { text-align: center; font-size: 26px; font-weight: 800; margin: 14px 0 6px; font-variant-numeric: tabular-nums; }
.m-dim { opacity: .35; }
.m-dialog { position: absolute; left: 12px; right: 12px; top: 80px; background: #fff; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); padding: 12px; text-align: center; }
.m-dlg-btns { display: flex; justify-content: space-around; margin-top: 12px; font-weight: 700; color: #2563eb; }
.m-dlg-btns span { padding: 4px 8px; border-radius: 6px; }
.m-me { display: flex; gap: 8px; align-items: center; padding: 4px 0 8px; border-bottom: 1px solid #eef1f4; }
.m-av { width: 30px; height: 30px; border-radius: 50%; background: #14335c; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 11px; }
.m-warn { font-style: normal; font-size: 9.5px; background: #fff3dc; color: #9a5b00; border-radius: 99px; padding: 1px 5px; }
.m-seg { display: flex; background: #eef1f4; border-radius: 8px; padding: 2px; margin-bottom: 6px; }
.m-seg span { flex: 1; text-align: center; padding: 4px; border-radius: 6px; font-size: 11px; }
.m-seg span.on { background: #fff; font-weight: 700; }
.m-tap { outline: 3px solid var(--accent); outline-offset: 1px; }
figcaption .m-tap { outline-width: 2px; padding: 0 4px; border-radius: 3px; color: var(--ink); }
.example { background: #eef3fa; border-radius: 10px; padding: 12px 14px; margin: 14px 0; }
.example > strong { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); margin-bottom: 4px; }
.example p { margin: 0; }
@media (max-width: 460px) { .mock { font-size: 10px; border-width: 5px; border-radius: 20px; } .m-bd { min-height: 210px; padding: 6px 7px; } .m-hd { font-size: 12px; padding: 5px 7px 6px; } .m-timer { font-size: 20px; } .m-tabs { font-size: 8.5px; } .m-btn.m-big { padding: 10px; font-size: 12px; } }

/* ---- photos, rules and tables in lessons ---- */
.pics { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0; }
.pic { flex: 1 1 200px; max-width: 320px; margin: 0; }
.pic.wide { max-width: none; flex-basis: 100%; margin: 14px 0; }
.pic img { width: 100%; display: block; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.pic figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.rule { background: var(--bad-bg); color: var(--bad); border-radius: 10px; padding: 12px 14px; margin: 14px 0; }
.faq { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.faq th, .faq td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.faq th { background: var(--bg); }
.faq ol { margin: 0; padding-left: 18px; }
@media (max-width: 460px) { .faq { font-size: 14px; } .faq th, .faq td { padding: 6px; } }
.callout-cc { background: var(--brand); color: #fff; border-radius: 12px; padding: 16px 18px; margin: 14px 0; }
.cc-label { font-size: 14px; color: #c8d3e3; font-weight: 600; }
.cc-num { font-size: 30px; font-weight: 800; letter-spacing: .01em; margin: 2px 0 8px; }
.cc-num a { color: #fff; text-decoration: none; }
.callout-cc ul { margin: 0; padding-left: 20px; }
.attest { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 8px; }
.attest-row { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; padding: 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.attest-row input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.attest-row:has(input:checked) { border-color: var(--brand); background: #eef3fa; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
label.btn { cursor: pointer; }
label.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.upload-preview { margin: 10px 0; }
.upload-preview img { max-width: 100%; max-height: 360px; display: block; border: 1px solid var(--line); border-radius: 8px; }
.upload-file { display: inline-block; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-weight: 600; }
.kit { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.kit span { background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; font-size: 15px; }
.two-col { columns: 2; column-gap: 24px; }
@media (max-width: 460px) { .two-col { columns: 1; } }

/* ---- clean handbook graphics ---- */
.hb-cover { background: var(--brand); color: #fff; border-radius: 14px; padding: 26px 22px 22px; margin: 4px 0 18px; text-align: center; }
.hb-org { color: var(--accent); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.hb-title { font-size: 34px; font-weight: 800; line-height: 1.1; margin: 8px 0 6px; }
.hb-sub { color: #c8d3e3; font-size: 15px; max-width: 30ch; margin: 0 auto 18px; }
.hb-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hb-values span { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: 8px 4px; font-weight: 600; font-size: 14px; }
.hb-values .hb-main { grid-column: 1 / -1; background: var(--accent); border-color: var(--accent); color: #16202b; font-size: 17px; font-weight: 800; }
.role-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; margin: 14px 0; }
.role-grid > div { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; }
.role-grid > div:first-child { background: var(--ok-bg); border-color: #bfe3cf; }
.role-grid > div:last-child { background: #eef3fa; border-color: #cfdcf0; }
.rg-when { font-size: 13px; color: var(--muted); font-weight: 600; }
.rg-what { font-size: 19px; font-weight: 800; margin: 2px 0 4px; }
.role-grid p { margin: 0; font-size: 15px; }
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin: 8px 0 4px; }
.cards3 > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--bg); font-size: 14px; }
.cards3 b { display: block; margin-bottom: 4px; font-size: 15px; }
.exit-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; margin: 12px 0; }
.exit-grid > div { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.exit-grid ol { margin: 0; padding-left: 20px; font-size: 15px; }
.eg-h { font-weight: 800; margin-bottom: 6px; }
.stepper { list-style: none; padding: 0; margin: 10px 0 14px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; counter-reset: st; }
.stepper li { counter-increment: st; position: relative; border-radius: 10px; padding: 34px 10px 10px; background: #fdecea; text-align: center; }
.stepper li:nth-child(2) { background: #eef3fa; } .stepper li:nth-child(3) { background: var(--bg); }
.stepper li::before { content: counter(st); position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.stepper b { display: block; font-size: 15px; } .stepper span { font-size: 13px; color: var(--muted); }
@media (max-width: 520px) { .cards3, .exit-grid, .stepper { grid-template-columns: 1fr; } .stepper li { text-align: left; padding: 10px 10px 10px 42px; } .stepper li::before { top: 50%; left: 18px; transform: translateY(-50%); } .hb-title { font-size: 28px; } }
.video-label { margin: 14px 0 6px; }
.part-tick { color: var(--ok); font-weight: 700; margin-left: 4px; }
.senses { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin: 12px 0; }
.senses > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--bg); font-size: 14px; }
.senses b { display: block; font-size: 16px; margin-bottom: 2px; color: var(--brand); }
@media (max-width: 460px) { .senses { grid-template-columns: 1fr; } }
.anger-scale { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 0; margin: 12px 0; border-radius: 10px; overflow: hidden; font-size: 14px; text-align: center; }
.anger-scale > div { padding: 12px 8px; }
.anger-scale b { display: block; font-size: 16px; }
.as-angry { background: #fff3dc; color: #7a4a00; }
.as-work { background: var(--ok-bg); color: var(--ok); outline: 3px solid var(--ok); outline-offset: -3px; }
.as-combat { background: var(--bad-bg); color: var(--bad); }
.stepper.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.stepper.four li:nth-child(4) { background: var(--ok-bg); }
@media (max-width: 520px) { .stepper.four { grid-template-columns: 1fr; } }
