/* AI Explained — institutional, campus-style design system */
:root {
  --navy: #0b1f4d;
  --blue: #123c8c;
  --blue-600: #1a4fae;
  --sky: #5aa9e6;
  --red: #e8364f;
  --red-600: #c9223b;
  --ink: #0f1b33;
  --text: #2b3550;
  --muted: #5d6680;
  --line: #d9deea;
  --bg: #ffffff;
  --bg-soft: #f4f6fa;
  --card: #ffffff;
  --tile-icon: #0b1f4d;
  --heading: #0b1f4d;
  --link: #1a4fae;
  --callout: #eef4ff;
  --focus: #f5b700;
  --success: #1d7a4a;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(11, 31, 77, .06), 0 8px 24px rgba(11, 31, 77, .08);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eef2fb; --text: #c9d1e4; --muted: #94a0bd; --line: #2a3654;
    --bg: #0c1426; --bg-soft: #111c33; --card: #142140; --tile-icon: #9cc6f2; --heading: #eef2fb; --link: #7fbcf0; --callout: #16274a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #eef2fb; --text: #c9d1e4; --muted: #94a0bd; --line: #2a3654;
  --bg: #0c1426; --bg-soft: #111c33; --card: #142140; --tile-icon: #9cc6f2; --heading: #eef2fb; --link: #7fbcf0; --callout: #16274a; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--link); }
h1, h2, h3, h4 { color: var(--ink); font-family: var(--display); line-height: 1.2; margin: 0 0 .5em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--focus); color: #000; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); font-size: .9em; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9em; background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; }
pre { background: var(--navy); color: #e8eefc; padding: 14px 16px; border-radius: var(--radius); overflow-x: auto; }
pre code { background: none; border: 0; color: inherit; padding: 0; }
[data-icon] svg { width: 100%; height: 100%; }

/* ---------- Utility bar (RMIT-style navy strip) ---------- */
.utility { background: var(--navy); color: #fff; }
.utility-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff !important; }
.brand-mark { background: var(--red); color: #fff; font-weight: 800; font-size: 20px; letter-spacing: .5px; width: 56px; height: 64px; display: grid; place-items: center; margin-top: -1px; }
.utility .brand-mark { height: 72px; margin-bottom: -8px; box-shadow: 0 4px 10px rgba(0,0,0,.25); position: relative; z-index: 2; }
.brand-text { font-weight: 700; font-size: 20px; line-height: 1.05; display: flex; flex-direction: column; }
.brand-text small { font-weight: 500; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; opacity: .75; }
.utility-links { display: flex; align-items: center; gap: 20px; }
.utility-links a { color: #fff !important; text-decoration: none; font-weight: 600; font-size: 15px; }
.utility-links a:hover { text-decoration: underline; }
.icon-btn { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; padding: 7px; }
.icon-btn:hover { background: rgba(255,255,255,.12); }

/* ---------- Main nav (Chisholm-style blue bar) ---------- */
.mainnav { background: var(--blue); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.mainnav-inner { display: flex; align-items: stretch; min-height: 64px; padding-right: 0; }
.nav-home { width: 44px; display: grid; place-items: center; color: #fff !important; padding: 18px 8px; margin-right: 12px; }
.nav-links { display: flex; flex: 1; }
.nav-links a { color: #fff !important; text-decoration: none; display: flex; align-items: center; padding: 0 16px; font-size: 16px; font-weight: 500; transition: background .15s; }
.nav-links a:hover { background: rgba(255,255,255,.1); }
.nav-links a.active { background: #fff; color: var(--blue) !important; font-weight: 600; }
.nav-search { background: var(--sky); border: 0; width: 72px; color: #0b1f4d; cursor: pointer; padding: 20px 22px; }
.nav-search:hover { background: #79bbef; }
.nav-toggle { display: none; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 4px; margin: auto 12px auto 0; padding: 6px 12px; font: inherit; font-size: 15px; cursor: pointer; }

/* ---------- Search overlay ---------- */
.search-overlay { background: var(--navy); padding: 24px 0 32px; position: sticky; top: 64px; z-index: 49; box-shadow: var(--shadow); }
#searchForm { display: flex; gap: 12px; }
#searchInput { flex: 1; font: inherit; font-size: 20px; padding: 14px 16px; border: 0; border-bottom: 3px solid var(--sky); background: #fff; color: #0f1b33; border-radius: 2px; min-width: 0; }
.search-close { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); padding: 0 16px; font: inherit; cursor: pointer; border-radius: 4px; }
.search-results { list-style: none; margin: 16px 0 0; padding: 0; max-height: 60vh; overflow: auto; }
.search-results li a { display: block; padding: 12px 14px; color: #fff !important; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.12); }
.search-results li a:hover { background: rgba(255,255,255,.08); }
.search-results small { display: block; color: #a9bbe0; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.search-results .empty { color: #c7d3ee; padding: 12px 14px; }

/* ---------- Hero: home (full-bleed banner) ---------- */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--navy); }
.hero-art { position: absolute; inset: 0; }
.hero-art svg { width: 100%; height: 100%; }
.hero-home { min-height: 520px; display: grid; place-items: center; text-align: center; }
.hero-home .hero-content { position: relative; padding: 72px 16px; max-width: 960px; }
.hero-kicker { display: inline-block; font-size: 14px; letter-spacing: 3px; text-transform: uppercase; font-weight: 700; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); padding: 6px 14px; border-radius: 999px; margin-bottom: 22px; }
.hero-home h1 { color: #fff; font-size: clamp(40px, 7vw, 84px); font-weight: 800; text-transform: uppercase; letter-spacing: -1px; line-height: .98; text-shadow: 0 4px 24px rgba(0,0,0,.35); margin-bottom: 20px; }
.hero-home h1 em { font-style: normal; color: var(--sky); }
.hero-home p { font-size: 20px; max-width: 640px; margin: 0 auto 28px; color: #dbe5fb; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; font-size: 17px; padding: 12px 26px; border-radius: 4px; border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: transform .1s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: #fff !important; }
.btn-red:hover { background: var(--red-600); }
.btn-white { background: #fff; color: var(--navy) !important; }
.btn-white:hover { background: #eef3ff; }
.btn-blue { background: var(--blue); color: #fff !important; }
.btn-blue:hover { background: var(--blue-600); }
.btn-outline { background: transparent; color: var(--blue-600) !important; border-color: var(--blue-600); }
.btn-outline:hover { background: rgba(26, 79, 174, .08); }
.btn-ghost-light { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.7); }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); }
.btn-sm { padding: 7px 14px; font-size: 15px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }
.section-title { text-align: center; font-size: clamp(28px, 4vw, 40px); font-weight: 700; margin-bottom: 12px; }
.section-title em { color: var(--link); }
.section-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 40px; font-size: 18px; }

/* ---------- Icon tile grid (Chisholm "Find your course") ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 980px; margin: 0 auto; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 26px 14px 22px; text-align: center; text-decoration: none; color: var(--text) !important; display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 150px; box-shadow: 0 1px 2px rgba(11,31,77,.06); transition: transform .15s, box-shadow .15s, border-color .15s; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue-600); }
.tile-icon { width: 52px; height: 52px; color: var(--tile-icon); }
.tile span.count { font-size: 13px; color: var(--muted); margin-top: -8px; }

/* ---------- Stats band ---------- */
.stats { background: var(--blue); color: #fff; }
.stats-inner { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 36px 16px; gap: 16px; }
.stat b { display: block; font-size: 40px; line-height: 1; font-weight: 800; }
.stat span { font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase; color: #c8d7f5; }

/* ---------- Business banner (below stats) ---------- */
.biz-banner { background: var(--red); color: #fff; }
.biz-inner { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 28px 16px; }
.biz-inner p { margin: 0; font-size: clamp(20px, 2.6vw, 28px); font-weight: 700; line-height: 1.25; letter-spacing: -.3px; }
.biz-icon { width: 44px; height: 44px; flex: none; color: #fff; }
.biz-inner .btn { flex: none; }

/* ---------- Course cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--text) !important; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-art { height: 140px; position: relative; overflow: hidden; }
.card-art svg { width: 100%; height: 100%; }
.card-art .card-icon { position: absolute; left: 20px; bottom: -1px; width: 64px; height: 64px; background: var(--card); color: var(--tile-icon); padding: 14px; border-radius: 6px 6px 0 0; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 4px; height: 18px; background: var(--red); }
.card h3 { font-size: 21px; margin: 8px 0; }
.card p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.card-meta { margin-top: auto; display: flex; gap: 16px; font-size: 14px; color: var(--muted); align-items: center; }
.card-meta [data-icon] { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; margin-right: 4px; }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 14px; }
.progress > i { display: block; height: 100%; background: var(--success); border-radius: inherit; transition: width .3s; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip { font: inherit; font-size: 15px; padding: 8px 18px; border: 1.5px solid var(--heading); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--heading); color: var(--bg); }
.chip[aria-pressed="true"]::before { content: "✓ "; }

/* ---------- Page header (inner pages) ---------- */
.page-head { background: var(--navy); color: #fff; padding: 56px 0 48px; position: relative; overflow: hidden; }
.page-head h1 { color: #fff; font-size: clamp(32px, 5vw, 48px); font-weight: 700; }
.page-head p { color: #c8d7f5; max-width: 680px; font-size: 18px; margin: 0; }
.page-head .hero-art { opacity: .55; }
.page-head .wrap { position: relative; }

/* ---------- Breadcrumb (Chisholm italic lowercase) ---------- */
.crumbs { font-style: italic; font-size: 15px; padding: 22px 0 6px; color: var(--muted); }
.crumbs a { color: var(--text) !important; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span.sep { margin: 0 8px; }
.on-dark .crumbs, .on-dark .crumbs a { color: #c8d7f5 !important; }

/* ---------- Course hero (RMIT duotone) ---------- */
.course-hero { min-height: 430px; display: flex; align-items: center; }
.course-hero .hero-art { opacity: 1; }
.course-hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; padding: 40px 16px 56px; }
.course-hero h1 { color: #fff; font-size: clamp(34px, 5vw, 52px); font-weight: 600; margin: 8px 0 18px; }
.course-hero .eyebrow { color: #fff; font-size: 15px; letter-spacing: 2.5px; }
.course-hero .eyebrow::before { background: #ff8aa0; }
.course-hero p.lede { color: #eef2fb; font-size: 18px; max-width: 520px; margin: 18px 0 28px; }
.hero-figure { justify-self: center; width: min(360px, 100%); aspect-ratio: 1; position: relative; }
.hero-figure .disc { position: absolute; inset: 8%; border-radius: 50%; background: var(--red); }
.hero-figure .block { position: absolute; left: 0; top: 30%; width: 46%; height: 52%; background: var(--red); }
.hero-figure .glyph { position: absolute; inset: 22%; color: #fff; filter: drop-shadow(0 6px 16px rgba(0,0,0,.3)); }

/* ---------- Key facts bar ---------- */
.facts { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.facts-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; padding: 32px 16px; }
.fact label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.fact b { font-weight: 500; color: var(--ink); font-size: 17px; }
.fact .pill { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--heading); color: var(--heading); padding: 6px 16px; border-radius: 999px; font-size: 15px; font-weight: 500; }

/* ---------- Two-column layout with sticky sidebar ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; padding: 48px 16px 80px; }
.prose h2 { font-size: 28px; font-weight: 600; margin-top: 48px; color: var(--heading); }
.prose h2:first-child { margin-top: 0; }
.prose .lead { font-size: 24px; line-height: 1.35; color: var(--heading); font-weight: 500; margin-bottom: 28px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--red); }

.sidebar { position: sticky; top: 92px; align-self: start; display: flex; flex-direction: column; gap: 20px; }
.side-card { background: var(--card); border-radius: 4px; box-shadow: var(--shadow); padding: 22px 24px; border: 1px solid var(--line); }
.side-card h4 { font-size: 14px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; margin-bottom: 12px; }
.side-card a { display: block; text-decoration: none; color: var(--text) !important; padding: 6px 0 6px 12px; border-left: 3px solid transparent; font-size: 16px; }
.side-card a:hover { color: var(--blue-600) !important; }
.side-card a.current { border-left-color: var(--red); color: var(--ink) !important; font-weight: 600; }
.side-card a.done::after { content: " ✓"; color: var(--success); font-weight: 700; }

.blue-card { background: var(--blue); color: #fff; border-radius: 22px; padding: 28px 26px; box-shadow: var(--shadow); }
.blue-card h4 { color: #fff; font-size: 22px; font-weight: 800; text-transform: uppercase; line-height: 1.1; letter-spacing: 0; margin-bottom: 12px; }
.blue-card p { color: #dbe5fb; margin: 0 0 16px; font-size: 16px; }
.blue-card .big { font-size: 44px; font-weight: 800; line-height: 1; color: #fff; }
.blue-card .progress { background: rgba(255,255,255,.25); }
.blue-card .progress > i { background: var(--sky); }
.blue-card .btn { width: 100%; justify-content: center; margin-top: 18px; }
.btn-sky { background: var(--sky); color: var(--navy) !important; border-radius: 999px; }
.btn-sky:hover { background: #79bbef; }

/* ---------- Accordion ---------- */
.acc-tools { text-align: right; font-size: 14px; margin-bottom: 8px; }
.acc-tools button { background: none; border: 0; color: var(--link); text-decoration: underline; cursor: pointer; font: inherit; padding: 0 2px; }
.accordion { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-item > button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: none; border: 0; padding: 18px 14px; font: inherit; font-size: 20px; color: var(--ink); text-align: left; cursor: pointer; }
.acc-item > button:hover { background: var(--bg-soft); }
.acc-item > button .chev { width: 28px; height: 28px; flex: none; transition: transform .2s; color: var(--muted); }
.acc-item.open > button .chev { transform: rotate(180deg); }
.acc-panel { padding: 0 14px 20px; display: none; }
.acc-item.open .acc-panel { display: block; }
.lesson-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.lesson-row .num { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--bg-soft); border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--ink); }
.lesson-row.done .num { background: var(--success); border-color: var(--success); color: #fff; }
.lesson-row a { flex: 1; font-weight: 600; text-decoration: none; }
.lesson-row small { color: var(--muted); }

/* ---------- Lesson reader ---------- */
.lesson-head { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding-bottom: 32px; }
.lesson-head h1 { font-size: clamp(30px, 4.5vw, 44px); font-weight: 700; margin: 10px 0 12px; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: 15px; }
.lesson-meta [data-icon] { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; margin-right: 6px; }
.keypoints { background: var(--callout); border-left: 5px solid var(--blue-600); padding: 20px 24px; margin: 48px 0; border-radius: 0 6px 6px 0; }
.keypoints h3 { font-size: 15px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.keypoints ul { margin: 0; }
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--navy); color: #fff; font-weight: 600; }
tr:last-child td { border-bottom: 0; }
table:not(.sheet-grid) tbody tr:nth-child(even) td { background: var(--bg-soft); }

.quiz { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: 16px; }
.quiz-head { background: var(--navy); color: #fff; padding: 16px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.quiz-head h3 { color: #fff; margin: 0; font-size: 20px; }
.quiz-q { padding: 22px; border-bottom: 1px solid var(--line); }
.quiz-q:last-of-type { border-bottom: 0; }
.quiz-q p { font-weight: 600; color: var(--ink); margin: 0 0 12px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 6px; margin: 8px 0; cursor: pointer; background: var(--card); }
.opt:hover { border-color: var(--blue-600); }
.opt input { accent-color: var(--blue-600); width: 18px; height: 18px; }
.opt.correct { border-color: var(--success); background: rgba(29,122,74,.1); }
.opt.wrong { border-color: var(--red); background: rgba(232,54,79,.08); }
.why { font-size: 15px; color: var(--muted); margin-top: 8px; display: none; }
.quiz.checked .why { display: block; }
.quiz-foot { padding: 18px 22px; background: var(--bg-soft); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.score { font-weight: 700; color: var(--ink); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.pager a { border: 1px solid var(--line); border-radius: 6px; padding: 16px 20px; text-decoration: none; display: block; }
.pager a:hover { border-color: var(--blue-600); box-shadow: var(--shadow); }
.pager small { display: block; color: var(--muted); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; }
.pager b { color: var(--ink); }
.pager .next { text-align: right; grid-column: 2; }

/* ---------- My learning ---------- */
.learn-row { display: grid; grid-template-columns: 1fr 220px auto; gap: 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.learn-row h3 { margin: 0; font-size: 20px; }
.learn-row .progress { margin: 0; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.notice { padding: 14px 18px; border-radius: 6px; background: rgba(29,122,74,.1); border: 1px solid var(--success); color: var(--ink); margin-top: 16px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c8d7f5; padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer h3 { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: 2px; }
.site-footer a { display: block; color: #c8d7f5 !important; text-decoration: none; padding: 4px 0; }
.site-footer a:hover { color: #fff !important; text-decoration: underline; }
.brand-light .brand-mark { width: 48px; height: 48px; font-size: 17px; }
.footer-note { max-width: 380px; font-size: 15px; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid rgba(255,255,255,.15); margin-top: 40px; padding: 18px 16px 28px; font-size: 14px; }

.help-fab { position: fixed; right: 20px; bottom: 20px; background: var(--red); color: #fff !important; text-decoration: none; font-weight: 700; padding: 12px 20px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 6px 20px rgba(232,54,79,.4); z-index: 40; }
.help-fab:hover { background: var(--red-600); }
.help-fab span { width: 20px; height: 20px; }


/* ---------- Store: nav CTA, badges, levels ---------- */
.nav-cta { align-self: center; margin: 0 12px; background: var(--red); color: #fff !important; text-decoration: none; font-weight: 700; font-size: 15px; padding: 9px 16px; border-radius: 4px; white-space: nowrap; }
.nav-cta:hover { background: var(--red-600); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; vertical-align: middle; margin-left: 8px; }
.badge svg { width: 13px; height: 13px; }
.badge-free { background: rgba(29,122,74,.14); color: var(--success); }
.badge-lock { background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line); }
.card .badge-free { margin: 8px 0 0; align-self: flex-start; }
.level-tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 3px 10px; border-radius: 4px; color: #fff; vertical-align: middle; }
.level-tag.lv1 { background: #2f7d5b; } .level-tag.lv2 { background: var(--blue-600); } .level-tag.lv3 { background: #7a2d8c; } .level-tag.lv4 { background: #b07d10; }
.level-head { display: flex; align-items: center; gap: 12px; font-size: 20px; margin: 32px 0 8px; }
.level-head + .acc-tools { margin-top: -30px; }
.mini-lock { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; color: var(--muted); }
.acc-item > button > span:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

/* ---------- Paywall & upsell ---------- */
.paywall { border: 2px dashed var(--line); border-radius: 10px; padding: 32px; background: var(--bg-soft); }
.paywall-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--blue); color: #fff; padding: 14px; margin-bottom: 16px; }
.paywall h2 { margin-top: 0 !important; }
.upsell { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: var(--navy); color: #dbe5fb; border-radius: 10px; padding: 24px 28px; margin-top: 48px; }
.upsell h3 { color: #fff; margin: 0 0 4px; }
.upsell p { margin: 0; }

/* ---------- Pricing & buy page ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: 1140px; margin: 0 auto; }
.price-card { position: relative; background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: 28px; display: flex; flex-direction: column; text-decoration: none; color: var(--text) !important; }
.price-card.featured { border-color: var(--blue-600); box-shadow: var(--shadow); }
.price-card.selectable:hover { border-color: var(--blue-600); }
.price-card.selected { border-width: 3px; border-color: var(--red); }
.price-card h3 { font-size: 22px; margin: 0; }
.price { font-size: 44px; font-weight: 800; color: var(--ink); line-height: 1.1; margin: 8px 0; }
.price small { font-size: 16px; font-weight: 600; color: var(--muted); }
.price-card > .btn, .select-pill { margin-top: auto; justify-content: center; }
.select-pill { display: block; text-align: center; padding: 10px; border-radius: 6px; background: var(--bg-soft); font-weight: 700; color: var(--ink); }
.price-card.selected .select-pill { background: var(--red); color: #fff; }
.ribbon { position: absolute; top: -12px; right: 20px; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; }
.ticks { list-style: none; padding: 0; margin: 4px 0 22px; font-size: 15px; }
.ticks li { padding: 4px 0 4px 26px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 800; }
.pay-steps { max-width: 760px; margin: 56px auto 0; }
.steps { counter-reset: st; list-style: none; padding: 0; }
.steps li { counter-increment: st; position: relative; padding: 4px 0 22px 56px; }
.steps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; display: grid; place-items: center; }
.steps b { color: var(--ink); display: block; }
.copy-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.copy-row code { font-size: 22px; font-weight: 700; padding: 6px 14px; color: var(--ink); }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 600; padding: 7px 12px; border-radius: 6px; border: 1.5px solid var(--blue-600); background: transparent; color: var(--link); cursor: pointer; }
.copy-btn svg { width: 16px; height: 16px; }
.sms-btn { margin-top: 10px; }
.note { border-left: 4px solid var(--focus); background: var(--bg-soft); padding: 14px 18px; border-radius: 0 6px 6px 0; font-size: 15px; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.gallery figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.gallery img { width: 100%; height: auto; display: block; border-bottom: 1px solid var(--line); }
.gallery figcaption { padding: 12px 16px; font-size: 15px; color: var(--muted); }

/* ---------- Spreadsheet look ---------- */
.sheet { margin: 22px 0 8px; border: 1px solid #c7ccd6; border-radius: 6px; overflow: hidden; background: #fff; color: #1f2430; font-family: "Segoe UI", system-ui, Arial, sans-serif; font-size: 14px; box-shadow: 0 2px 10px rgba(11,31,77,.07); }
.sheet-bar { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: #f3f5f8; border-bottom: 1px solid #c7ccd6; }
.cell-ref { min-width: 44px; text-align: center; font-weight: 600; border: 1px solid #c7ccd6; background: #fff; padding: 1px 6px; border-radius: 3px; }
.fx { font-style: italic; color: #6a7385; font-family: Georgia, serif; }
.sheet-bar code { background: none; border: 0; color: #1f2430; padding: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-scroll { overflow-x: auto; }
.sheet-grid { border-collapse: collapse; width: 100%; font-size: 14px; }
.sheet-grid th, .sheet-grid td { border: 1px solid #dde1e8; padding: 5px 10px; white-space: nowrap; text-align: left; background: #fff; color: #1f2430; }
.sheet-grid thead th, .sheet-grid tbody th { background: #f3f5f8; color: #6a7385; font-weight: 500; font-size: 12px; text-align: center; min-width: 32px; }
.sheet-grid td.hdr { font-weight: 700; background: #e8eefb; }
.sheet-grid td.n { text-align: right; font-variant-numeric: tabular-nums; }
.sheet-grid td.hl { outline: 2px solid #1a73e8; outline-offset: -2px; background: #eaf2fe; }
.sheet-grid td.heat { background: rgba(26, 115, 232, var(--heat)); }
.sheet-tabs { display: flex; gap: 2px; background: #f3f5f8; border-top: 1px solid #c7ccd6; padding: 0 8px; font-size: 13px; }
.sheet-tabs span { padding: 5px 14px; color: #6a7385; }
.sheet-tabs span.active { background: #fff; color: #1a7a46; font-weight: 700; border-bottom: 3px solid #1a7a46; }
.sheet-caption { margin-top: 4px; }
.prompt-box { border: 1px solid var(--line); border-left: 5px solid var(--red); background: var(--card); border-radius: 0 8px 8px 0; padding: 14px 18px; margin: 18px 0; }
.prompt-label { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--red); margin-bottom: 4px; }
.prompt-box p { margin: 0; font-style: italic; }
blockquote { margin: 16px 0; padding: 12px 18px; border-left: 4px solid var(--muted); background: var(--bg-soft); font-style: italic; }
@media (max-width: 760px) {
  .pricing, .gallery { grid-template-columns: 1fr; }
  .tier-head { font-size: 23px; }
  .calc-form { grid-template-columns: 1fr; }
  .nav-cta { margin: 0 8px 0 auto; padding: 8px 10px; font-size: 14px; }
  .nav-links + .nav-cta + .nav-search { margin-left: 0; }
}

/* ---------- Core vs Advanced Studies ---------- */
.tier-head { font-size: 28px; margin: 8px 0 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tier-head + .tier-sub { color: var(--muted); margin: 0 0 24px; }
.cards + .tier-head { margin-top: 56px; }
.badge-adv { background: #7a2d8c; color: #fff; margin-left: 0; }
.advanced-band { background: linear-gradient(135deg, #1b0f4a, #3b2a8c 60%, #6a1b5c); color: #fff; text-align: center; }
.advanced-band .section-title, .advanced-band .section-sub { color: #fff; }
.advanced-band .section-sub { color: #dcd3ff; }
.advanced-band .cards { text-align: left; }

.badge-mastery { background: #b07d10; color: #fff; margin-left: 0; }
.mastery-band { background: linear-gradient(135deg, #2b1d05, #6b4a0a 55%, #b07d10); color: #fff; text-align: center; }
.mastery-band .section-title { color: #fff; }
.mastery-band .section-sub { color: #f6e7c4; }
.mastery-band .cards { text-align: left; }

/* ---------- Lesson extras: practice + program output ---------- */
.exercise { border: 1px solid var(--line); border-left: 5px solid var(--success); background: var(--card); border-radius: 0 8px 8px 0; padding: 14px 18px; margin: 12px 0; }
.exercise .prompt-label { color: var(--success); }
.exercise p { margin: 4px 0 0; }
pre.output { background: var(--bg-soft); color: var(--ink); border: 1px solid var(--line); margin-top: 4px; }
pre.output code { color: inherit; }
.prose pre { font-size: 14px; line-height: 1.5; }

/* ---------- Free calculators ---------- */
.nav-free { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; background: var(--sky); color: var(--navy); border-radius: 3px; padding: 1px 5px; margin-left: 6px; }
.calc-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.calc-jump a { border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px; text-decoration: none; font-size: 15px; color: var(--ink) !important; }
.calc-jump a:hover { border-color: var(--blue-600); }
.calc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.calc-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 24px; box-shadow: var(--shadow); scroll-margin-top: 90px; }
.calc-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.calc-head h2 { font-size: 21px; margin: 0 0 4px; }
.calc-head p { margin: 0; color: var(--muted); font-size: 15px; }
.calc-icon { width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--blue); color: #fff; padding: 9px; }
.calc-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.calc-field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; color: var(--ink); }
.calc-input { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 6px; background: var(--bg); overflow: hidden; }
.calc-input:focus-within { border-color: var(--blue-600); }
.calc-input i { font-style: normal; color: var(--muted); padding: 0 10px; font-weight: 500; }
.calc-input input, .calc-field select, .lesson-pick { font: inherit; font-size: 16px; font-weight: 500; border: 0; background: transparent; color: var(--ink); padding: 9px 10px; width: 100%; min-width: 0; }
.calc-field select, .lesson-pick { border: 1.5px solid var(--line); border-radius: 6px; background: var(--bg); }
.lesson-pick { display: block; max-width: 520px; margin-top: 8px; }
.calc-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 18px 0 6px; }
.calc-results div { background: var(--bg-soft); border-radius: 8px; padding: 10px 12px; }
.calc-results div.hl { background: var(--blue); color: #fff; }
.calc-results dt { font-size: 13px; color: var(--muted); }
.calc-results .hl dt { color: #c8d7f5; }
.calc-results dd { margin: 2px 0 0; font-size: 20px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.calc-results .hl dd { color: #fff; }
.calc-note { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.calc-out .table-wrap { margin-top: 12px; max-height: 260px; overflow: auto; }
.calc-disclaimer { margin-top: 32px; padding: 16px 20px; border-left: 4px solid var(--focus); background: var(--bg-soft); border-radius: 0 6px 6px 0; font-size: 15px; }

/* ---------- Study units table ---------- */
.units { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; margin: 8px 0 8px; }
.units table { width: 100%; border-collapse: collapse; font-size: 16px; }
.units th { background: transparent; color: var(--ink); font-weight: 700; text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.units td { padding: 13px 16px; border-bottom: 1px solid var(--line); background: transparent !important; vertical-align: middle; }
.units tr:last-child td { border-bottom: 0; }
.units td.unit-code { font-weight: 800; letter-spacing: .3px; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.units td a { color: var(--text) !important; text-decoration: none; }
.units td a:hover { color: var(--link) !important; text-decoration: underline; }
.units td a.btn, .units td a.btn:hover { color: #fff !important; text-decoration: none; }
.units tr.is-done td.unit-code { color: var(--success); }
.units tr.is-done td a { color: var(--muted) !important; }
.units .tick-col { text-align: center; width: 120px; font-size: 13px; line-height: 1.3; }
.units th.tick-col { font-size: 13px; }
.tick { width: 22px; height: 22px; accent-color: var(--success); cursor: pointer; vertical-align: middle; }
.tick-help { accent-color: var(--red); }
.tick:disabled { cursor: not-allowed; opacity: .35; }
.units .help-row td { background: var(--card) !important; padding: 4px 16px 18px; }
.help-form { display: grid; gap: 6px; max-width: 560px; }
.help-form label { font-size: 14px; font-weight: 600; color: var(--ink); }
.help-form input[type=email], .help-form textarea { font: inherit; font-size: 16px; border: 1.5px solid var(--line); border-radius: 6px; padding: 9px 11px; background: var(--bg); color: var(--ink); width: 100%; }
.help-form input:focus, .help-form textarea:focus { border-color: var(--blue-600); outline: none; }
.help-intro { margin: 8px 0 4px; font-size: 15px; }
.help-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.help-status { font-size: 14px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.help-privacy { font-size: 13px; margin: 2px 0 0; }
.hp-field { position: absolute; left: -9999px; }
.lesson-help { margin-top: 24px; border: 1px solid var(--line); border-radius: 8px; padding: 16px 20px; background: var(--bg-soft); }
.help-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 16px; }
.help-panel { margin-top: 10px; }

/* ---------- Software page ---------- */
.sw-index { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 48px; }
.sw-chip { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; background: var(--card); color: var(--ink) !important; }
.sw-chip:hover { border-color: var(--blue-600); box-shadow: var(--shadow); }
.sw-chip img { border-radius: 9px; }
.sw-chip b { display: block; font-size: 16px; }
.sw-chip small { display: block; color: var(--muted); font-size: 13px; }
.sw-product { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; padding: 48px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.sw-product.flip .sw-copy { order: 2; }
.sw-title { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.sw-title img { border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.sw-title h2 { font-size: 34px; margin: 0; }
.sw-tag { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--sw-accent); }
.sw-copy > p { font-size: 18px; }
.sw-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sw-shots figure { margin: 0; }
.sw-shots .sw-main { grid-column: 1 / -1; }
.sw-shots img[hidden] { display: none; }
.sw-shots .sw-thumb:nth-child(even):last-child { grid-column: 1 / -1; }
.sw-shots img { width: 100%; height: auto; display: block; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(11,31,77,.18); transition: transform .15s; }
.sw-shots a:hover img { transform: translateY(-2px); }
.sw-shots figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.sw-dev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 48px; border-top: 1px solid var(--line); }
.sw-dev { border: 2px dashed var(--line); border-radius: 12px; padding: 28px; background: var(--bg-soft); scroll-margin-top: 90px; }
.sw-dev h2 { font-size: 24px; margin: 12px 0 6px; }
.sw-dev p { margin: 0; color: var(--muted); }
.sw-dev-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--navy); color: #fff; padding: 11px; vertical-align: middle; margin-right: 8px; }
.sw-chip .sw-dev-icon { width: 40px; height: 40px; padding: 8px; margin: 0; border-radius: 9px; }
.badge-dev { background: #b07d10; color: #fff; }
.sw-cta { margin-top: 48px; }
.sw-soon { grid-column: 1 / -1; display: grid; place-items: center; gap: 10px; min-height: 320px; border: 2px dashed var(--line); border-radius: 12px; background: var(--bg-soft); color: var(--muted); font-weight: 600; text-align: center; }
.sw-shots .sw-soon img { width: 96px; height: 96px; border: 0; border-radius: 22px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.sw-soon p { margin: 0; }
.sw-home { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: 900px; margin: 0 auto; }
.sw-home-card { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-decoration: none; color: var(--text) !important; transition: transform .15s, box-shadow .15s; }
.sw-home-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.sw-home-card img { border-radius: 22px; box-shadow: 0 8px 22px rgba(0,0,0,.18); margin-bottom: 6px; }
.sw-home-card b { font-size: 20px; color: var(--ink); }
.sw-home-card span { font-size: 14px; color: var(--muted); }
@media (max-width: 600px) { .sw-home { grid-template-columns: 1fr; } }
@media (max-width: 1000px) {
  .sw-product { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .sw-product.flip .sw-copy { order: 0; }
  .sw-dev-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) { .sw-shots { grid-template-columns: 1fr; } .sw-title h2 { font-size: 28px; } }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .calc-grid { grid-template-columns: 1fr; }
  .pricing { grid-template-columns: 1fr; max-width: 560px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .facts-grid { grid-template-columns: repeat(3, 1fr); }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .sidebar { position: static; }
  .course-hero-grid { grid-template-columns: 1fr; }
  .hero-figure { display: none; }
}
@media (max-width: 760px) {
  .utility-links a { display: none; }
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--blue); flex-direction: column; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.12); }
  .mainnav-inner { position: relative; }
  .nav-links + .nav-search { margin-left: auto; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(3, 1fr); }
  .stat b { font-size: 32px; }
  .stat span { display: block; font-size: 12px; letter-spacing: 1px; line-height: 1.4; margin-top: 6px; }
  .biz-inner { flex-direction: column; text-align: center; }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .learn-row { grid-template-columns: 1fr; gap: 10px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .section { padding: 48px 0; }
  .hero-home { min-height: 440px; }
  .help-fab { right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .utility, .mainnav, .site-footer, .help-fab, .sidebar, .quiz-foot { display: none !important; } .layout { grid-template-columns: 1fr; } }

.sw-bonus-wrap { padding-bottom: 0; }
.sw-bonus { background: var(--callout); border-left: 4px solid var(--red); padding: 14px 18px; border-radius: var(--radius); color: var(--text); }
