:root {
  --ink: #0b0a08;
  --ink-2: #26241f;
  --paper: #ffffff;
  --soft: #f4f3ef;
  --line: #e3e1db;
  --muted: #6b6862;
  --yellow: #f5b800;
  --red: #d42a1f;
  --blue: #1d5fbf;
  --green: #1a8f4a;
  --radius: 18px;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 7vw, 4rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 560px; }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.brand img { width: 30px; height: 30px; }
.brand small { display: block; font-weight: 500; font-size: .72rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.nav { display: flex; gap: 16px; align-items: center; font-size: .92rem; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; margin-top: 64px; font-size: .85rem; color: var(--muted); }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 8px; }
.site-footer a { color: var(--ink); }

/* Hero */
.hero { background: var(--ink); color: #fff; padding: 56px 0 64px; }
.hero .eyebrow { color: #b9b6ae; }
.hero p.lead { font-size: 1.12rem; color: #dcd9d2; max-width: 680px; }
.hero-icons { display: flex; gap: 10px; margin: 0 0 24px; }
.hero-icons img { width: 40px; height: 40px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 32px 0; max-width: 560px; }
.stat { border: 1px solid #3a3832; border-radius: 14px; padding: 14px; }
.stat b { display: block; font-family: var(--serif); font-size: 1.7rem; line-height: 1.1; }
.stat span { font-size: .8rem; color: #b9b6ae; }

.notice { border: 1px solid var(--line); border-left: 4px solid var(--ink); background: var(--soft); border-radius: 12px; padding: 14px 16px; font-size: .92rem; }
.hero .notice { background: #17150f; border-color: #3a3832; border-left-color: var(--yellow); color: #e9e6df; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: var(--ink); color: #fff; font: 600 1rem var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--ink-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.light { background: #fff; color: var(--ink); border-color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.text-links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-weight: 600; }
.text-links a { text-underline-offset: 4px; }

/* Sections */
section { padding: 56px 0 0; }
.grid-2 { display: grid; gap: 20px; }
@media (min-width: 820px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.module-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.module-item { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.module-item .num { font-family: var(--serif); font-size: 1.5rem; }
.module-item img { width: 44px; height: 44px; }
.module-item h3 { margin-bottom: 4px; font-size: 1.1rem; }
.module-item p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Pricing window */
.pricing { border: 1.5px solid var(--ink); border-radius: 24px; padding: 24px; background: #fff; }
.price-usd { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-usd b { font-family: var(--serif); font-size: clamp(2.6rem, 9vw, 3.4rem); line-height: 1; letter-spacing: -0.01em; }
.price-usd span, .price-zar span { font-size: .78rem; font-weight: 700; letter-spacing: .14em; color: var(--muted); }
.price-zar { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.price-zar b { font-size: 1.5rem; font-weight: 600; }
.currency-select { display: grid; gap: 8px; margin-top: 18px; font-size: .9rem; }
.currency-select select {
  appearance: none; -webkit-appearance: none; width: 100%; font: 500 1rem var(--sans); color: var(--ink);
  padding: 13px 44px 13px 14px; border: 1.5px solid var(--ink); border-radius: 12px; background-color: #fff; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%230b0a08' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.converted { margin: 12px 0 16px; min-height: 2rem; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.converted b { font-size: 1.35rem; }
.converted span { color: var(--muted); font-size: .9rem; }
.charge-box { background: var(--soft); border-radius: 14px; padding: 14px 16px; font-size: .92rem; }
.charge-box b { font-size: 1.02rem; }
.feature-list { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; }
.feature-list li { display: flex; gap: 10px; align-items: center; }
.feature-list img { width: 26px; height: 26px; flex: none; }

/* Forms */
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #fff; }
.form { display: grid; gap: 14px; }
label { font-weight: 600; font-size: .92rem; display: grid; gap: 6px; }
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%; font: inherit; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
input:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-color: var(--ink); }
.msg { border-radius: 12px; padding: 12px 14px; font-size: .92rem; }
.msg.error { background: #fdecea; color: #8a1b14; }
.msg.ok { background: #e7f5ec; color: #135c31; }
.msg.info { background: var(--soft); }

/* Course dashboard */
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--ink); width: 0; transition: width .3s ease; }
.dash-head { padding: 28px 0 8px; }
.continue-card { background: var(--ink); color: #fff; border-radius: 24px; padding: 22px; display: grid; gap: 12px; }
.continue-card .eyebrow { color: #b9b6ae; margin: 0; }
.continue-card h2 { margin: 0; font-size: 1.5rem; }
.mod-acc { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mod-acc + .mod-acc { margin-top: 12px; }
.mod-acc summary { list-style: none; display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 16px; cursor: pointer; }
.mod-acc summary::-webkit-details-marker { display: none; }
.mod-acc summary img { width: 44px; height: 44px; }
.mod-acc summary h3 { margin: 0; font-size: 1.02rem; }
.mod-acc summary .muted { font-size: .82rem; }
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); text-decoration: none; }
.lesson-row[aria-disabled="true"] { color: var(--muted); pointer-events: none; }
.tick { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; font-size: .8rem; }
.tick.done { background: var(--green); border-color: var(--green); color: #fff; }
.tick.next { border-color: var(--ink); }
.lock { font-size: .9rem; }

/* Lesson player (Coursiv-style, one card per screen) */
.player { position: fixed; inset: 0; background: #fff; z-index: 50; display: flex; flex-direction: column; }
.player-top { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.player-top .close { border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 4px 8px; }
.player-top .progress { flex: 1; }
.player-body { flex: 1; overflow-y: auto; }
.player-body .wrap { max-width: 640px; padding-top: 24px; padding-bottom: 88px; }
.player-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.player-foot .wrap { max-width: 640px; padding: 0; display: flex; gap: 10px; }
.card-icon { width: 64px; height: 64px; margin-bottom: 16px; }
.card-image { border-radius: 20px; margin-bottom: 20px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--soft); }
.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.points li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.points img { width: 44px; height: 44px; }
.points b { display: block; }
.tip { display: grid; grid-template-columns: 52px 1fr; gap: 16px; background: var(--soft); border-radius: 20px; padding: 20px; }
.tip img { width: 52px; height: 52px; }
.options { display: grid; gap: 10px; margin-top: 18px; }
.option { text-align: left; font: inherit; padding: 15px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; color: var(--ink); display: flex; gap: 12px; align-items: center; }
.option .key { width: 28px; height: 28px; flex: none; border-radius: 8px; border: 1.5px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.option[aria-pressed="true"] { border-color: var(--ink); }
.option[aria-pressed="true"] .key { background: var(--ink); color: #fff; border-color: var(--ink); }
.option.correct { border-color: var(--green); background: #eef8f2; }
.option.correct .key { background: var(--green); border-color: var(--green); color: #fff; }
.option.wrong { border-color: var(--red); background: #fdf0ef; }
.option:disabled { cursor: default; }
.feedback { margin-top: 16px; border-radius: 14px; padding: 14px 16px; font-size: .95rem; }
.feedback.good { background: #eef8f2; }
.feedback.bad { background: #fdf0ef; }
.qcount { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Safety Coach */
.coach-btn { position: fixed; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 60; border-radius: 999px; padding: 0 16px; min-height: 44px; font-size: .9rem; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.sheet { position: fixed; inset: auto 0 0 0; z-index: 70; background: #fff; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.2); max-height: 82vh; display: flex; flex-direction: column; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 8px; }
.sheet-body { padding: 0 16px 16px; overflow-y: auto; }
.coach-answer { white-space: pre-wrap; background: var(--soft); border-radius: 14px; padding: 14px; margin-top: 12px; font-size: .95rem; }

/* Certificate preview (same drawing as the PDF, rendered as SVG) */
.cert-stage { background: var(--soft); border-radius: 24px; padding: 16px; }
.cert-svg { aspect-ratio: 841.89 / 595.28; background: #fdfcf9; box-shadow: 0 10px 30px rgba(11, 10, 8, .12); }
.cert-svg svg { display: block; width: 100%; height: 100%; }

/* Verification */
.status { display: flex; gap: 14px; align-items: center; border-radius: 18px; padding: 18px; margin-bottom: 18px; }
.status img { width: 52px; height: 52px; flex: none; }
.status h2 { margin: 0; font-size: 1.4rem; }
.status.valid { background: #eef8f2; border: 1.5px solid var(--green); }
.status.revoked, .status.notfound { background: #fdf0ef; border: 1.5px solid var(--red); }
.details { width: 100%; border-collapse: collapse; }
.details th, .details td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.details th { width: 42%; font-weight: 600; color: var(--muted); font-size: .9rem; padding-right: 12px; }
.prose h2 { font-size: 1.4rem; margin-top: 1.6em; }
.prose li { margin-bottom: .4em; }
