/* =========================================================
   Rey Timson — Timson AI Academy
   Shared stylesheet
   ========================================================= */

/* Theme: "Bold & modern" — dark by default, light via the toggle */
:root {
  --bg: #0e1217;
  --surface: #141a21;
  --surface-2: #1b232c;
  --ink: #eef2ee;
  --ink-2: #b8c2c0;
  --muted: #7d8a8c;
  --line: #222c3a;
  --accent: #6fd6c3;
  --accent-ink: #0a0d12;
  --accent-soft: #12302c;
  --accent-2: #e9c27d;
  --gold: #ffb547;
  --gold-soft: #2e2210;
  --good: #7fd6a0;
  --good-soft: #142b1f;
  --bad: #ff6b6b;
  --bad-soft: #331717;
  --grid: rgba(255, 255, 255, .03);
  --glow-1: rgba(111, 214, 195, .08);
  --glow-2: rgba(233, 194, 125, .05);
  --tier-unacceptable: #d63a32;
  --tier-high: #d9661a;
  --tier-limited: #b98314;
  --tier-minimal: #1f8a57;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px rgba(0, 0, 0, .35);
  --max: 1120px;
  --read: 720px;
  --font-head: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Atkinson Hyperlegible", "Verdana", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f2f3ec;
  --surface: #ffffff;
  --surface-2: #e7eade;
  --ink: #0a0d12;
  --ink-2: #39424a;
  --muted: #5f6a72;
  --line: #d2d8c8;
  --accent: #0f6e63;
  --accent-ink: #f2f3ec;
  --accent-soft: #dcefeb;
  --accent-2: #a8742a;
  --gold: #a15c07;
  --gold-soft: #fbecd2;
  --good: #2f7d4f;
  --good-soft: #ddf0e3;
  --bad: #b3261e;
  --bad-soft: #fbe5e3;
  --grid: rgba(10, 13, 18, .035);
  --glow-1: rgba(15, 110, 99, .07);
  --glow-2: rgba(168, 116, 42, .05);
  --shadow: 0 1px 2px rgba(10, 13, 18, .05), 0 10px 28px rgba(10, 13, 18, .07);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 16px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }
.read { max-width: var(--read); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: .95rem; font-family: var(--font-head); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: .95rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.icon-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 38px; height: 38px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .menu-btn { display: grid; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: .98rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: var(--font-body); transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--gold); margin-bottom: 12px; display: inline-block; }
.lead { font-size: 1.2rem; color: var(--ink-2); }
.muted { color: var(--muted); }
.center { text-align: center; }

.hero { padding: 80px 0 64px; }
.hero-grid { display: grid; gap: 48px; grid-template-columns: 1.3fr 1fr; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.stat b { display: block; font-family: var(--font-head); font-size: 1.8rem; }
.stat span { font-size: .88rem; color: var(--muted); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-top: 4px; }
.card.link-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .15s ease, border-color .15s ease; }
.card.link-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card .foot { margin-top: auto; padding-top: 16px; display: flex; justify-content: space-between; align-items: center; font-size: .9rem; color: var(--muted); }
.icon-tile { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }

.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); letter-spacing: .02em; }
.tag-live { background: var(--good-soft); color: var(--good); }
.tag-soon { background: var(--gold-soft); color: var(--gold); }

.band { background: var(--ink); color: var(--bg); border-radius: 24px; padding: 48px; }
.band h2 { color: var(--bg); }
.band p { color: color-mix(in srgb, var(--bg) 80%, transparent); }
@media (max-width: 600px) { .band { padding: 28px 20px; } }

/* ---------- Academy paths ---------- */
.path { padding: 48px 0; border-top: 1px solid var(--line); }
.path:first-of-type { border-top: 0; }
.path-head { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; margin-bottom: 24px; }
@media (max-width: 720px) { .path-head { grid-template-columns: 1fr; } }
.path-head h2 { margin-bottom: 6px; }
.path-head p { margin: 0; color: var(--ink-2); max-width: 680px; }
.path-num { font-family: var(--font-head); color: var(--gold); font-size: 1rem; font-weight: 600; display: block; margin-bottom: 4px; }
.why { font-size: .86rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 12px; }
.why b { color: var(--ink-2); font-weight: 600; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-level { background: var(--accent-soft); color: var(--accent); }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.jump a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 500; }
.jump a:hover { border-color: var(--accent); }
.stat-card b { display: block; font-family: var(--font-head); font-size: 2.2rem; line-height: 1.1; color: var(--accent); }
.stat-card p { margin: 6px 0 0; font-size: .93rem; }
.stat-card .src { font-size: .8rem; color: var(--muted); margin-top: 8px; display: block; }
.source-list { font-size: .92rem; }
.source-list li { margin-bottom: 8px; }

/* ---------- Course ---------- */
.course-hero { padding: 56px 0 32px; border-bottom: 1px solid var(--line); }
.meta-row { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: .95rem; margin: 16px 0 24px; }
.progress { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .4s ease; }

.module-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.module-item a { display: grid; grid-template-columns: 56px 1fr auto; gap: 18px; align-items: center; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; }
.module-item a:hover { border-color: var(--accent); }
.module-num { width: 56px; height: 56px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; }
.module-item.done .module-num { background: var(--good-soft); color: var(--good); }
.module-item h3 { margin: 0 0 4px; font-size: 1.15rem; }
.module-item p { margin: 0; color: var(--muted); font-size: .93rem; }
.status-pill { font-size: .8rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.module-item.done .status-pill { color: var(--good); }
@media (max-width: 560px) { .module-item a { grid-template-columns: 44px 1fr; } .module-num { width: 44px; height: 44px; } .status-pill { grid-column: 2; } }

/* ---------- Lesson layout ---------- */
.lesson-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 48px; padding: 40px 0 80px; }
@media (max-width: 960px) { .lesson-wrap { grid-template-columns: 1fr; gap: 24px; } .lesson-side { position: static !important; } }
.lesson-side { position: sticky; top: 88px; align-self: start; font-size: .92rem; }
.lesson-side .side-title { font-weight: 700; margin-bottom: 8px; }
.lesson-side ol { padding-left: 0; list-style: none; margin: 0 0 20px; }
.lesson-side li a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.lesson-side li a:hover { background: var(--surface-2); }
.lesson-side li a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.lesson-side li.done a::after { content: " ✓"; color: var(--good); }

.lesson { max-width: var(--read); min-width: 0; }
.lesson h2 { margin-top: 2em; }
.lesson h3 { margin-top: 1.6em; }
.lesson ul, .lesson ol { padding-left: 1.3em; }
.lesson li { margin-bottom: .4em; }
.objectives { background: var(--accent-soft); border-radius: var(--radius); padding: 20px 24px; margin: 24px 0; }
.objectives h4 { margin: 0 0 8px; color: var(--accent); }
.objectives ul { margin: 0; }

.callout { border-left: 4px solid var(--accent); background: var(--surface); padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 24px 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.callout.warn { border-left-color: var(--gold); }
.callout.update { border-left-color: var(--good); }
.callout b:first-child { display: block; margin-bottom: 4px; }
.callout p:last-child { margin-bottom: 0; }

.example { background: var(--surface-2); border-radius: var(--radius); padding: 20px 24px; margin: 24px 0; }
.example .eyebrow { margin-bottom: 6px; }
.example p:last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* Risk pyramid */
.pyramid { display: grid; gap: 6px; margin: 28px auto; max-width: 560px; }
.pyramid div { color: #fff; text-align: center; padding: 14px 12px; border-radius: 8px; font-weight: 600; font-size: .95rem; margin: 0 auto; }
.pyramid small { display: block; font-weight: 400; opacity: .92; font-size: .82rem; }
.pyramid .p1 { background: var(--tier-unacceptable); width: 46%; }
.pyramid .p2 { background: var(--tier-high); width: 64%; }
.pyramid .p3 { background: var(--tier-limited); width: 82%; }
.pyramid .p4 { background: var(--tier-minimal); width: 100%; }
@media (max-width: 520px) { .pyramid div { width: 100% !important; } }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 28px 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 22px 36px; }
.timeline li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.timeline li.past::before { background: var(--accent); }
.timeline li.now::before { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 5px var(--gold-soft); }
.timeline .date { font-weight: 700; font-size: .92rem; color: var(--accent); }
.timeline li.now .date { color: var(--gold); }
.timeline p { margin: 2px 0 0; color: var(--ink-2); }

/* ---------- Quiz ---------- */
.quiz { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; margin: 48px 0 24px; box-shadow: var(--shadow); }
.quiz h2 { margin-top: 0; }
.q { padding: 20px 0; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: 0; }
.q-text { font-weight: 600; margin-bottom: 12px; }
.q-num { color: var(--muted); font-weight: 500; margin-right: 6px; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--bg); }
.opt:hover { border-color: var(--accent); }
.opt input { margin-top: 5px; accent-color: var(--accent); }
.opt.correct { border-color: var(--good); background: var(--good-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.feedback { margin-top: 10px; font-size: .94rem; padding: 10px 14px; border-radius: 10px; display: none; }
.feedback.show { display: block; }
.feedback.good { background: var(--good-soft); color: var(--ink); }
.feedback.bad { background: var(--bad-soft); color: var(--ink); }
.quiz-result { margin-top: 20px; padding: 18px 20px; border-radius: 12px; background: var(--surface-2); display: none; }
.quiz-result.show { display: block; }
.score-big { font-family: var(--font-head); font-size: 2.4rem; font-weight: 600; }

.lesson-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- Risk checker ---------- */
.wizard { max-width: 760px; margin: 0 auto; }
.step { display: none; }
.step.active { display: block; }
.choice-list { display: grid; gap: 10px; margin: 20px 0; }
.choice { text-align: left; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.choice:hover { border-color: var(--accent); background: var(--accent-soft); }
.choice small { display: block; color: var(--muted); margin-top: 2px; }
.check-grid { display: grid; gap: 8px; margin: 18px 0; }
.check-grid label { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.check-grid input { margin-top: 5px; accent-color: var(--accent); }
.result-card { border-radius: 18px; padding: 28px; color: #fff; }
.result-card h2 { color: #fff; }
.result-card.unacceptable { background: var(--tier-unacceptable); }
.result-card.high { background: var(--tier-high); }
.result-card.limited { background: var(--tier-limited); }
.result-card.minimal { background: var(--tier-minimal); }
.wizard-progress { font-size: .88rem; color: var(--muted); margin-bottom: 8px; }

/* ---------- Glossary ---------- */
.glossary-search { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; margin: 16px 0 24px; }
dl.glossary dt { font-weight: 700; margin-top: 20px; font-family: var(--font-head); font-size: 1.1rem; }
dl.glossary dd { margin: 4px 0 0; color: var(--ink-2); padding-bottom: 16px; border-bottom: 1px solid var(--line); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field textarea { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }

/* ---------- Certificate ---------- */
.certificate { background: #fffdf7; color: #151a2d; border: 10px double #b7791f; padding: 56px 48px; text-align: center; border-radius: 6px; margin: 32px auto; max-width: 860px; }
.certificate h2 { font-size: 2.4rem; margin: 6px 0 18px; color: #151a2d; }
.certificate .cert-name { font-family: var(--font-head); font-size: 2.2rem; font-style: italic; border-bottom: 1px solid #ccc; display: inline-block; padding: 0 24px 6px; margin: 10px 0 18px; }
.certificate .cert-meta { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 20px; margin-top: 36px; font-size: .9rem; color: #464c63; }
.certificate .eyebrow { color: #b7791f; }
.certificate .cert-brand { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; letter-spacing: .02em; color: #151a2d; }
.certificate .cert-tagline { font-size: .85rem; color: #6c7187; margin: 2px 0 22px; }
.certificate .cert-detail { margin: 0; font-weight: 600; color: #464c63; }
.certificate .cert-desc { max-width: 560px; margin: 8px auto 0; font-size: .85rem; color: #6c7187; }
.certificate .cert-sign { margin-top: 36px; }
.certificate .cert-sig { font-family: var(--font-head); font-size: 1.4rem; font-style: italic; border-top: 1px solid #ccc; display: inline-block; padding: 8px 32px 0; }
.certificate .cert-role { font-size: .85rem; color: #6c7187; margin-top: 4px; }
@media (max-width: 600px) { .certificate { padding: 32px 18px; } .certificate h2 { font-size: 1.7rem; } .certificate .cert-name { font-size: 1.6rem; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 32px; margin-top: 40px; font-size: .92rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--ink); margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.disclaimer { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .85rem; }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .certificate { margin: 0 auto; border-width: 8px; }
}

/* Four-card paths: keep a balanced 2 × 2 grid */
.path .grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }

/* =========================================================
   Additions (Oct 2026): code & prompt blocks, comparisons,
   activities and "Go further" panels for the new courses
   ========================================================= */
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
pre { position: relative; border: 1px solid var(--line); background: #151a2d; color: #e8ebf5; border-radius: var(--radius-sm); padding: 18px 20px; overflow-x: auto; margin: 20px 0; font-size: .88rem; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; }
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
pre .label { display: block; font-family: var(--font-body); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #9aa3c7; margin-bottom: 8px; }
.copy-btn { position: absolute; top: 10px; right: 10px; font: 600 .75rem var(--font-body); background: rgba(255,255,255,.1); color: #e8ebf5; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.copy-btn:hover { background: rgba(255,255,255,.2); }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 24px 0; }
.compare > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--surface); }
.compare > div p:last-child { margin-bottom: 0; }
.compare .weak { border-top: 4px solid var(--bad); }
.compare .strong { border-top: 4px solid var(--good); }
.compare h4 { margin: 0 0 8px; font-size: .95rem; }
.activity { border: 2px dashed var(--accent); border-radius: var(--radius); padding: 18px 22px; margin: 28px 0; background: var(--accent-soft); }
.activity > b:first-child { display: block; margin-bottom: 6px; color: var(--accent); }
.activity p:last-child { margin-bottom: 0; }
.activity details { margin-top: 10px; }
.activity summary { cursor: pointer; font-weight: 600; }
.go-further { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 20px 24px; margin: 32px 0; }
.go-further h3 { margin-top: 0; font-size: 1.1rem; }
.go-further ul { list-style: none; padding: 0; margin: 0; }
.go-further li { padding: 10px 0; border-top: 1px solid var(--line); font-size: .93rem; }
.go-further li:first-child { border-top: 0; }
.go-further .provider { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.checklist { list-style: none; padding-left: 0; }
.checklist li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.checklist li::before { content: "✓"; position: absolute; left: 4px; top: 0; color: var(--good); font-weight: 700; }
@media print { .copy-btn, .go-further { display: none; } }

/* =========================================================
   Diagrams (inline SVG figures in course modules)
   ========================================================= */
figure.diagram { margin: 28px 0; padding: 20px 20px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
figure.diagram .dg-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
figure.diagram figcaption { font-size: .88rem; color: var(--muted); margin-top: 12px; line-height: 1.5; }
svg.dg { display: block; width: 100%; height: auto; margin: 0 auto; color: var(--ink); font-family: var(--font-body); }
svg.dg text { fill: currentColor; }
svg.dg .mut { fill: var(--muted); }
svg.dg .t-a { fill: var(--accent); }
svg.dg .t-g { fill: var(--good); }
svg.dg .t-b { fill: var(--bad); }
svg.dg .t-w { fill: var(--gold); }
svg.dg .b-n { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.5; }
svg.dg .b-s { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
svg.dg .b-a { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
svg.dg .b-g { fill: var(--good-soft); stroke: var(--good); stroke-width: 1.5; }
svg.dg .b-b { fill: var(--bad-soft); stroke: var(--bad); stroke-width: 1.5; }
svg.dg .b-w { fill: var(--gold-soft); stroke: var(--gold); stroke-width: 1.5; }
svg.dg .b-none { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 5 4; }
svg.dg .f-a { fill: var(--accent); } svg.dg .f-g { fill: var(--good); } svg.dg .f-b { fill: var(--bad); } svg.dg .f-w { fill: var(--gold); } svg.dg .f-m { fill: var(--muted); } svg.dg .f-l { fill: var(--line); }
svg.dg .ln { stroke: currentColor; stroke-width: 1.5; fill: none; opacity: .8; }
svg.dg .ln-a { stroke: var(--accent); opacity: 1; stroke-width: 2; }
svg.dg .ln-g { stroke: var(--good); opacity: 1; stroke-width: 2; }
svg.dg .ln-b { stroke: var(--bad); opacity: 1; stroke-width: 2; }
svg.dg .ln-w { stroke: var(--gold); opacity: 1; stroke-width: 2; }
svg.dg .ln-m { stroke: var(--muted); opacity: .6; }
svg.dg .ln-l { stroke: var(--line); opacity: 1; }
svg.dg .dash { stroke-dasharray: 5 4; }
svg.dg .ah { fill: currentColor; opacity: .8; }
svg.dg .ah-a { fill: var(--accent); }
svg.dg .d-a { fill: var(--accent); } svg.dg .d-b { fill: var(--gold); } svg.dg .d-g { fill: var(--good); } svg.dg .d-r { fill: var(--bad); } svg.dg .d-n { fill: var(--muted); }
svg.dg .d-o { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
@media print { figure.diagram { break-inside: avoid; } }
@media (max-width: 600px) { figure.diagram { padding: 14px 12px 10px; } figure.diagram figcaption::before { content: "Swipe the diagram sideways to see all of it. "; font-style: italic; } }


/* =========================================================
   Theme layer: "Bold & modern" (Oct 2026)
   ========================================================= */
body {
  font-size: 17.5px;
  background:
    radial-gradient(1100px 560px at 88% -8%, var(--glow-1), transparent 62%),
    radial-gradient(900px 520px at -12% 6%, var(--glow-2), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 35%, transparent 80%);
          mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 35%, transparent 80%);
}
::selection { background: var(--accent); color: var(--accent-ink); }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.025em; font-variation-settings: "opsz" 72; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.035em; }
h2 { letter-spacing: -0.02em; }
h4 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.005em; }
.hero h1 em, h1 em { font-style: normal; color: var(--accent); }

.eyebrow, .path-num, .tag, .status-pill, .go-further .provider, pre .label, .wizard-progress, .meta-row {
  font-family: var(--font-mono);
}
.eyebrow { color: var(--accent); letter-spacing: .14em; font-weight: 600; font-size: .74rem; }
.eyebrow::before { content: "// "; opacity: .55; }
.path-num { color: var(--accent); font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; }
.tag { border-radius: 6px; font-weight: 600; letter-spacing: .03em; border: 1px solid var(--line); }
.tag-live { background: var(--good-soft); color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.tag-level { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }

/* Header */
.site-header { background: color-mix(in srgb, var(--bg) 78%, transparent); }
.brand { font-family: var(--font-head); font-weight: 800; letter-spacing: -0.02em; }
.brand-mark { background: var(--accent); color: var(--accent-ink); border-radius: 8px; font-family: var(--font-mono); font-weight: 600; font-size: .82rem; }
.nav a { font-weight: 700; font-size: .93rem; }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

/* Buttons */
.btn { border-radius: 10px; font-family: var(--font-head); font-weight: 700; letter-spacing: -0.005em; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn-primary { box-shadow: 0 0 0 0 var(--glow-1); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(0,0,0,.25), 0 0 0 3px var(--accent-soft); }
.btn-ghost { border-color: var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.btn-ghost:hover { border-color: var(--accent); background: var(--surface); }

/* Cards & surfaces */
.card, .hero-card, .quiz, .go-further, figure.diagram, .table-wrap, .compare > div, .module-item a {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}
.card { border-radius: 16px; position: relative; overflow: hidden; }
.card.link-card::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.card.link-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 16px 40px rgba(0,0,0,.28), 0 0 0 1px var(--accent-soft); }
.card.link-card:hover::after { transform: scaleX(1); }
.icon-tile { background: var(--accent-soft); color: var(--accent); border-radius: 10px; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.stat b, .stat-card b, .score-big { font-family: var(--font-head); font-weight: 800; letter-spacing: -0.03em; color: var(--accent); }
.progress { height: 8px; }
.progress > span { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.module-num { font-family: var(--font-mono); font-weight: 600; border: 1px solid var(--line); }
.module-item a:hover { border-color: var(--accent); }
.objectives { border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.callout { border-left-width: 3px; }
.lesson-side li a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); border-radius: 0 8px 8px 0; }

/* Feature band */
.band { background: linear-gradient(135deg, #12332f 0%, #16413b 60%, #1d4a43 100%); color: #eef4f2; position: relative; overflow: hidden; }
.band::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 28px 28px; }
.band > * { position: relative; z-index: 1; }
.band h2, .band h3 { color: #ffffff; }
.band p { color: rgba(238, 244, 242, .82); }
.band .eyebrow { color: #e9c27d; }
.band .btn-primary { background: #6fd6c3; color: #0e1217; }
.band .btn-ghost, .band .btn-dark { background: transparent; color: #eef4f2; border-color: rgba(238,244,242,.35); }

/* Code */
code { font-family: var(--font-mono); }
pre { background: #05070a; border-color: #1d2633; color: #e4ebe6; box-shadow: inset 3px 0 0 var(--accent); }
pre .label { color: #6fd6c3; opacity: .9; }
.copy-btn { font-family: var(--font-mono); }

/* Diagrams use the body font for labels */
svg.dg { font-family: var(--font-body); }

/* Certificate stays on paper, with the new brand */
.certificate { border: 10px double #1b2a33; box-shadow: inset 0 6px 0 #0f6e63; }
.certificate .eyebrow { color: #0f6e63; }
.certificate .eyebrow::before { content: ""; }
.certificate .cert-brand { font-family: var(--font-head); font-weight: 800; letter-spacing: -0.02em; }
.certificate .cert-name { font-family: var(--font-head); font-style: normal; font-weight: 700; letter-spacing: -0.02em; }
.certificate h2 { font-weight: 800; letter-spacing: -0.03em; }
.certificate .cert-sig { font-family: var(--font-body); font-style: italic; }

/* Page-load: one orchestrated, staggered reveal */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-grid > *, .hero .container > :not(.hero-grid), .course-hero .container > *, .lesson > :nth-child(-n+4),
  .grid > .card, .module-list > li, .stats > * {
    animation: rise .7s cubic-bezier(.2, .7, .2, 1) both;
  }
  .hero-grid > :nth-child(2), .course-hero .container > :nth-child(2), .lesson > :nth-child(2) { animation-delay: .08s; }
  .course-hero .container > :nth-child(3), .lesson > :nth-child(3) { animation-delay: .16s; }
  .course-hero .container > :nth-child(4), .lesson > :nth-child(4) { animation-delay: .24s; }
  .stats > :nth-child(1) { animation-delay: .25s; } .stats > :nth-child(2) { animation-delay: .32s; } .stats > :nth-child(3) { animation-delay: .39s; }
  .grid > .card:nth-child(1), .module-list > li:nth-child(1) { animation-delay: .12s; }
  .grid > .card:nth-child(2), .module-list > li:nth-child(2) { animation-delay: .18s; }
  .grid > .card:nth-child(3), .module-list > li:nth-child(3) { animation-delay: .24s; }
  .grid > .card:nth-child(4), .module-list > li:nth-child(4) { animation-delay: .30s; }
  .grid > .card:nth-child(5), .module-list > li:nth-child(5) { animation-delay: .36s; }
  .grid > .card:nth-child(n+6), .module-list > li:nth-child(n+6) { animation-delay: .42s; }
  .brand-mark { transition: transform .4s cubic-bezier(.2,.7,.2,1); }
  .brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
}

@media print {
  body { background: #fff !important; }
  body::before { display: none; }
}
