:root {
  --ink: #101011;
  --ink-2: #2b2b2c;
  --muted: #6b6b70;
  --line: #e7e7ea;
  --bg: #fafafa;
  --card: #ffffff;
  --black: #000000;
  --green: #01d18f;
  --green-soft: rgba(1, 209, 143, 0.12);
  --green-ink: #00805a;
  --amber: #b26b00;
  --amber-soft: #fff4e0;
  --red: #b42318;
  --red-soft: #fdecea;
  --radius: 16px;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --text: "Switzer", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink-2);
  font: 500 16px/1.6 var(--text); letter-spacing: -0.01em;
}
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 600; letter-spacing: -0.04em; }
h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

/* header */
.top { background: var(--black); color: #fff; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand img { height: 22px; width: auto; display: block; }
.brand span { font-family: var(--display); font-weight: 500; font-size: 15px; color: rgba(255,255,255,.7); border-left: 1px solid rgba(255,255,255,.25); padding-left: 10px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a, .nav button { color: rgba(255,255,255,.8); text-decoration: none; font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; padding: 8px 12px; border-radius: 50px; }
.nav a:hover, .nav button:hover { color: #fff; background: rgba(255,255,255,.1); }
.nav form { margin: 0; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
main { padding: 40px 0 80px; }

/* hero */
.hero { background: var(--black); color: #fff; padding: 56px 0 64px; }
.hero h1 { color: #fff; max-width: 720px; }
.hero p { color: rgba(255,255,255,.75); max-width: 620px; font-size: 18px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: var(--green); letter-spacing: .02em; text-transform: uppercase; margin-bottom: 14px; }

/* buttons */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 50px; padding: 12px 22px; font: 600 15px/1 var(--text); text-decoration: none; border: 1px solid transparent; cursor: pointer; background: var(--black); color: #fff; }
.btn:hover { opacity: .88; }
.btn.light { background: #fff; color: var(--black); }
.btn.green { background: var(--green); color: #002b1d; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.small { padding: 8px 14px; font-size: 13px; }
.btn.danger { background: transparent; border-color: #f2c4bf; color: var(--red); }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 50px; background: #f1f1f3; color: var(--ink-2); white-space: nowrap; }
.pill.done { background: var(--green-soft); color: var(--green-ink); }
.pill.wait { background: var(--amber-soft); color: var(--amber); }
.pill.bad { background: var(--red-soft); color: var(--red); }

.bar { height: 8px; background: #ececef; border-radius: 50px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--green); border-radius: 50px; }

/* module list */
.track-label { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 28px 0 10px; }
.mlist { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mlist li + li { border-top: 1px solid var(--line); }
.mlist a { display: flex; align-items: center; gap: 14px; padding: 16px 20px; text-decoration: none; }
.mlist a:hover { background: #f6f6f7; }
.mnum { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 600 13px var(--display); background: #f1f1f3; color: var(--ink); }
.mnum.done { background: var(--green); color: #002b1d; }
.mtitle { flex: 1; min-width: 0; }
.mtitle b { display: block; font-weight: 600; color: var(--ink); }
.mtitle span { font-size: 14px; color: var(--muted); }

/* module page */
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { text-decoration: none; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.linkcard { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border: 1px dashed #cfcfd4; border-radius: var(--radius); background: #fff; text-decoration: none; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin: 1em 0; padding: 12px 16px; border-left: 3px solid var(--green); background: var(--green-soft); border-radius: 0 10px 10px 0; color: var(--ink); }
.prose blockquote p:last-child { margin: 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14.5px; margin: 1em 0; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; color: var(--ink); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title h2 { margin: 0; }

.q { padding: 18px 0; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: 0; padding-top: 4px; }
.q p { font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; cursor: pointer; }
.opt:hover { border-color: #cfcfd4; }
.opt input { margin-top: 5px; accent-color: var(--black); }
.opt.right { border-color: var(--green); background: var(--green-soft); }
.opt.wrong { border-color: #f2c4bf; background: var(--red-soft); }
.why { font-size: 14px; color: var(--muted); margin-top: 8px; }

.result { border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.result.pass { background: var(--green-soft); color: #00573c; }
.result.fail { background: var(--amber-soft); color: #6b4100; }
.result b { font-family: var(--display); font-size: 20px; }

.flash { background: #111; color: #fff; padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; font-size: 15px; }

/* forms */
label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%; font: 500 16px var(--text); padding: 12px 14px; border: 1px solid #d9d9de; border-radius: 12px; background: #fff; color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: transparent; }
.auth { max-width: 420px; margin: 40px auto; }

/* certificates */
.certs { display: grid; gap: 12px; }
.cert-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.cert-row:hover { border-color: #cfcfd4; }
.seal { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--green-soft); display: grid; place-items: center; color: var(--green-ink); font-weight: 700; }
.seal.big { width: 64px; height: 64px; font-size: 26px; background: var(--green); color: #002b1d; }
.cert-row.major { border-color: var(--green); }

.certificate { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: clamp(28px, 6vw, 56px); text-align: center; position: relative; overflow: hidden; }
.certificate::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--green); }
.certificate .brandmark { height: 26px; margin: 0 auto 28px; display: block; }
.certificate h1 { font-size: clamp(26px, 4.5vw, 40px); }
.certificate .who { font-family: var(--display); font-size: clamp(24px, 4vw, 34px); font-weight: 600; color: var(--ink); letter-spacing: -0.02em; margin: 6px 0 18px; }
.meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin: 26px 0 8px; font-size: 14px; color: var(--muted); }
.meta b { color: var(--ink); font-weight: 600; }
.revoked { background: var(--red-soft); color: var(--red); padding: 10px 14px; border-radius: 12px; font-weight: 600; margin-bottom: 20px; }

/* admin */
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.t th, table.t td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t th { font-weight: 600; color: var(--muted); font-size: 13px; }
.inline { display: inline; margin: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > div { flex: 1; min-width: 180px; }
.copy { display: flex; gap: 8px; }
.copy input { font-size: 14px; }
.table-scroll { overflow-x: auto; }

footer { padding: 28px 0 40px; color: var(--muted); font-size: 13px; text-align: center; }

@media (max-width: 640px) {
  .brand span { display: none; }
  main { padding: 28px 0 60px; }
  .hero { padding: 40px 0 44px; }
  .card { padding: 18px; }
  .mlist a { padding: 14px 16px; }
}

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
