/* TRCN CPD — design system */
:root {
  --bg: #04140e;
  --bg-2: #071f17;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-2: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.12);
  --text: #e9f5ef;
  --muted: #9bb9ab;
  --green: #10b981;
  --green-2: #34d399;
  --green-deep: #047857;
  --gold: #fbbf24;
  --rose: #fb7185;
  --sky: #38bdf8;
  --violet: #a78bfa;
  --b: #34d399;   /* Beginner */
  --p: #38bdf8;   /* Proficient */
  --m: #fbbf24;   /* Mentor */
  --d: #c084fc;   /* Distinguished */
  --radius: 18px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fraunces", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.6;
  background: radial-gradient(1200px 700px at 80% -10%, #0b3b2a 0%, transparent 60%),
              radial-gradient(900px 600px at -10% 30%, #0a2e22 0%, transparent 55%), var(--bg);
  overflow-x: hidden;
}
#bg3d { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.grain { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence baseFrequency='.8' numOctaves='3'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
a { color: var(--green-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-family: var(--display); font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
button, select, input, textarea { font: inherit; color: inherit; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 1.5rem; padding: .75rem clamp(1rem, 3vw, 2.5rem);
  background: rgba(4, 20, 14, .72); backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark svg { width: 38px; height: 38px; filter: drop-shadow(0 6px 14px rgba(16,185,129,.45)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { color: var(--muted); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.mainnav { display: flex; gap: .25rem; margin-left: auto; }
.mainnav a { color: var(--muted); padding: .5rem .85rem; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.mainnav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.mainnav a.active { color: #04140e; background: linear-gradient(135deg, var(--green-2), var(--green)); }
.topbar-tools { display: flex; align-items: center; gap: .5rem; }
.stage-pill { display: flex; align-items: center; gap: .4rem; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .4rem .25rem .8rem; font-size: .85rem; color: var(--muted); }
.stage-pill select { background: transparent; border: 0; color: var(--text); font-weight: 700; cursor: pointer; }
.stage-pill select option { background: #0a241b; }
.icon-btn { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; width: 38px; height: 38px; cursor: pointer; display: none; }
.demo-banner { position: relative; z-index: 40; text-align: center; padding: .6rem 1rem; font-weight: 600; font-size: .92rem;
  background: linear-gradient(90deg, rgba(251,191,36,.18), rgba(16,185,129,.18)); border-bottom: 1px solid var(--line); }

main { position: relative; z-index: 2; min-height: 70vh; outline: none; }
.wrap { width: min(1200px, 92vw); margin: 0 auto; }
.boot { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }
.boot-ring { width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--green-2); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; border-radius: 999px; padding: .7rem 1.25rem; font-weight: 700; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-2px); text-decoration: none; background: var(--panel-2); }
.btn-primary { background: linear-gradient(135deg, var(--green-2), var(--green)); color: #03150e; border: 0; box-shadow: 0 12px 30px -10px rgba(16,185,129,.7); }
.btn-primary:hover { background: linear-gradient(135deg, #6ee7b7, var(--green-2)); }
.btn-gold { background: linear-gradient(135deg, #fde68a, var(--gold)); color: #241800; border: 0; }
.btn-sm { padding: .4rem .85rem; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Hero */
.hero { min-height: calc(100vh - 70px); display: grid; align-items: center; padding: 4rem 0 3rem; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--gold);
  background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.25); padding: .35rem .8rem; border-radius: 999px; margin-bottom: 1.2rem; }
.hero h1 span { background: linear-gradient(120deg, #a7f3d0, var(--green-2) 40%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.2rem; color: #cfe6db; max-width: 40ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 2rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; max-width: 560px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1rem; }
.stat b { display: block; font-size: 1.6rem; font-family: var(--display); }
.stat span { color: var(--muted); font-size: .8rem; }
.hero-card { position: relative; border-radius: 26px; padding: 1.6rem; background: linear-gradient(160deg, rgba(14,48,36,.72), rgba(4,20,14,.6)); backdrop-filter: blur(10px); border: 1px solid var(--line);
  box-shadow: var(--shadow); transform: perspective(1000px) rotateY(-8deg) rotateX(4deg); transition: transform .6s; }
.hero-card:hover { transform: perspective(1000px) rotateY(0) rotateX(0); }
.hero-card h3 { margin-bottom: .25rem; }
.stage-ladder { display: grid; gap: .6rem; margin-top: 1rem; }
.rung { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.rung i { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 16px currentColor; }
.rung small { display: block; color: var(--muted); }

/* Sections */
.section { padding: 4rem 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.grid { display: grid; gap: 1.2rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* 3D tilt cards */
.card { position: relative; background: linear-gradient(165deg, rgba(255,255,255,.075), rgba(255,255,255,.025)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem; box-shadow: var(--shadow); transform-style: preserve-3d; transition: transform .25s ease, border-color .25s; }
.card:hover { border-color: rgba(52,211,153,.4); }
.tilt { will-change: transform; }
.tilt .lift { transform: translateZ(30px); }
.domain-card { min-height: 260px; display: flex; flex-direction: column; color: var(--text); overflow: hidden; }
.domain-card:hover { text-decoration: none; }
.domain-card .num { font-family: var(--display); font-size: 4rem; line-height: 1; opacity: .9; background: linear-gradient(160deg, #fff, var(--accent, var(--green-2))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.domain-card .glow { position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -60px; top: -60px; background: radial-gradient(circle, var(--accent, var(--green)) 0%, transparent 70%); opacity: .35; filter: blur(10px); }
.domain-card .meta { margin-top: auto; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .85rem; }
.progress { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--green-2), var(--gold)); border-radius: inherit; }

.feature { display: flex; gap: 1rem; }
.feature .ico { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; background: rgba(16,185,129,.14); border: 1px solid rgba(52,211,153,.3); }

/* Domain page */
.page-head { padding: 3rem 0 1.5rem; }
.crumbs { color: var(--muted); font-size: .9rem; margin-bottom: .8rem; }
.crumbs a { color: var(--muted); }
.subtheme { margin: 2rem 0 1rem; display: flex; align-items: center; gap: .8rem; }
.subtheme h3 { margin: 0; }
.subtheme::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.module-card { display: flex; flex-direction: column; gap: .5rem; color: var(--text); min-height: 150px; }
.module-card:hover { text-decoration: none; transform: translateY(-4px); }
.module-card .id { font-weight: 800; color: var(--green-2); font-size: .85rem; letter-spacing: .05em; }
.module-card .row { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.badge.done { background: rgba(16,185,129,.18); color: #a7f3d0; border-color: rgba(52,211,153,.4); }
.badge.locked { color: var(--muted); }
.overview-md { max-width: 80ch; }

/* Module layout */
.module-hero { padding: 2.5rem 0 1.5rem; }
.module-hero .standard { font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.9rem); max-width: 60ch; }
.module-layout > * { min-width: 0; }
.module-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2rem; align-items: start; padding-bottom: 4rem; }
.toc { position: sticky; top: 90px; display: flex; flex-direction: column; gap: .2rem; padding: .8rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.toc a { color: var(--muted); padding: .45rem .7rem; border-radius: 10px; font-size: .9rem; font-weight: 600; display: flex; gap: .55rem; }
.toc a span { opacity: .6; width: 1.1rem; }
.toc a:hover, .toc a.active { color: var(--text); background: rgba(16,185,129,.14); text-decoration: none; }
.toc .toc-progress { margin: .6rem .4rem .2rem; }
.msec { scroll-margin-top: 90px; margin-bottom: 2.2rem; }
.msec > h2 { display: flex; align-items: center; gap: .7rem; }
.msec > h2 .n { width: 2.1rem; height: 2.1rem; border-radius: 10px; display: grid; place-items: center; font-size: 1rem; background: linear-gradient(135deg, var(--green-2), var(--green-deep)); color: #03150e; flex: none; }
.callout { border-radius: 14px; padding: 1rem 1.2rem; margin: 1rem 0; border: 1px solid rgba(251,191,36,.35); background: rgba(251,191,36,.08); }
.callout.safe { border-color: rgba(251,113,133,.4); background: rgba(251,113,133,.08); }

.stage-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.stage-card { border-radius: 16px; padding: 1rem; background: rgba(0,0,0,.22); border: 1px solid var(--line); cursor: pointer; transition: all .25s; position: relative; overflow: hidden; }
.stage-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.stage-card h4 { margin: .2rem 0 .4rem; color: var(--c); }
.stage-card p { font-size: .9rem; color: #cfe2d9; margin: 0; }
.stage-card.on { background: color-mix(in srgb, var(--c) 14%, transparent); border-color: var(--c); transform: translateY(-4px) scale(1.02); box-shadow: 0 18px 40px -18px var(--c); }
.stage-card.dim { opacity: .5; }
[data-stage="Beginner"] { --c: var(--b); } [data-stage="Proficient"] { --c: var(--p); }
[data-stage="Mentor"] { --c: var(--m); } [data-stage="Distinguished"] { --c: var(--d); }

.md table, table.t { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1rem 0; font-size: .92rem; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.md th, .md td, table.t th, table.t td { padding: .65rem .8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.md th, table.t th { background: rgba(16,185,129,.12); font-weight: 700; }
.md tr:last-child td, table.t tr:last-child td { border-bottom: 0; }
.md blockquote { margin: 1rem 0; padding: .8rem 1.1rem; border-left: 3px solid var(--gold); background: rgba(251,191,36,.06); border-radius: 0 12px 12px 0; }
.md ul, .md ol { padding-left: 1.3rem; }
.md h3 { margin-top: 1.6rem; color: #d1fae5; }
.md code { background: rgba(255,255,255,.08); padding: .1rem .35rem; border-radius: 6px; }

.examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.example { border-radius: 16px; padding: 1.1rem; background: rgba(0,0,0,.22); border: 1px solid var(--line); border-top: 3px solid var(--c, var(--green)); }
.example .letter { font-family: var(--display); font-size: 1.6rem; color: var(--c, var(--green-2)); }

.activities { display: grid; gap: .8rem; }
.activity { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: start; border-radius: 16px; padding: 1rem 1.1rem; background: rgba(0,0,0,.22); border: 1px solid var(--line); border-left: 4px solid var(--c); }
.activity.done { background: rgba(16,185,129,.1); }
.activity .code { font-weight: 800; color: var(--c); font-size: 1.1rem; min-width: 2.2rem; }
.activity textarea { width: 100%; margin-top: .6rem; background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 10px; padding: .6rem; min-height: 64px; resize: vertical; }
.check { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }

/* Scene player */
.player { border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: #020a07; box-shadow: var(--shadow); }
.stage3d { position: relative; aspect-ratio: 16 / 8.2; background: radial-gradient(ellipse at 50% 30%, #0f3a2b, #020a07 70%); }
.stage3d canvas { width: 100% !important; height: 100% !important; display: block; }
.stage-hud { position: absolute; inset: 0; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; padding: 1rem; }
.scene-title { align-self: flex-start; background: rgba(0,0,0,.55); border: 1px solid var(--line); padding: .35rem .8rem; border-radius: 999px; font-weight: 700; font-size: .85rem; backdrop-filter: blur(6px); }
.subtitle { align-self: center; max-width: 88%; text-align: center; background: rgba(0,0,0,.72); border: 1px solid var(--line); border-radius: 14px; padding: .7rem 1.1rem; font-size: 1.05rem; backdrop-filter: blur(6px); min-height: 2.4rem; }
.subtitle b { color: var(--gold); }
.subtitle em { color: var(--muted); }
.player-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .8rem 1rem; border-top: 1px solid var(--line); background: rgba(255,255,255,.03); }
.player-bar .sp { flex: 1; }
.scene-dots { display: flex; gap: .35rem; }
.scene-dots button { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 700; font-size: .8rem; }
.scene-dots button.on { background: var(--green); color: #03150e; }
.pause-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(2,10,7,.78); backdrop-filter: blur(4px); pointer-events: auto; padding: 1rem; }
.pause-card { width: min(640px, 96%); border-radius: 18px; padding: 1.3rem; background: linear-gradient(160deg, #0d2c21, #071a13); border: 1px solid rgba(251,191,36,.4); box-shadow: var(--shadow); max-height: 100%; overflow: auto; }
.pause-card .tag { color: var(--gold); font-weight: 800; letter-spacing: .08em; font-size: .78rem; text-transform: uppercase; }
.pause-card textarea { width: 100%; min-height: 80px; margin: .6rem 0; background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 10px; padding: .6rem; }
.model-answer { margin-top: .8rem; padding: .8rem 1rem; border-radius: 12px; background: rgba(16,185,129,.12); border: 1px solid rgba(52,211,153,.35); }
.ai-answer { margin-top: .8rem; padding: .8rem 1rem; border-radius: 12px; background: rgba(56,189,248,.1); border: 1px solid rgba(56,189,248,.35); white-space: pre-wrap; }
.script { display: none; padding: 1rem 1.2rem; max-height: 420px; overflow: auto; font-size: .92rem; }
.script.on { display: block; }
.script .ln { margin: .3rem 0; }
.script .who { color: var(--gold); font-weight: 700; }
.script .pp { margin: .6rem 0; padding: .6rem .8rem; border-radius: 10px; background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.25); }

/* Quiz */
.quiz { display: grid; gap: .9rem; }
.qcard { border-radius: 16px; padding: 1.1rem; background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.qcard.right { border-color: rgba(52,211,153,.55); }
.qcard.wrong { border-color: rgba(251,113,133,.55); }
.qcard textarea { width: 100%; min-height: 56px; background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 10px; padding: .55rem; margin: .5rem 0; }
.qcard .actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.score-ring { --v: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.4rem;
  background: conic-gradient(var(--green-2) calc(var(--v) * 1%), rgba(255,255,255,.08) 0); position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--bg-2); }
.score-ring span { position: relative; }

/* Glossary */
.gloss { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.gcard { border-radius: 14px; padding: 1rem; background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.gcard h4 { margin: 0 0 .5rem; color: var(--green-2); }
.gcard dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .25rem .7rem; font-size: .9rem; }
.gcard dt { color: var(--muted); font-weight: 700; }
.gcard dd { margin: 0; }
.gcard dd.tbd { color: var(--muted); font-style: italic; }
.lang-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: 1rem; }
.lang-tabs button { border-radius: 999px; padding: .35rem .85rem; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 700; font-size: .85rem; }
.lang-tabs button.on { background: var(--gold); color: #241800; }

/* Sign-off */
.signoff { background: #fdfcf7; color: #13251d; border-radius: 18px; padding: 2rem; box-shadow: var(--shadow); }
.signoff h2, .signoff h3 { color: #064e3b; }
.signoff table { width: 100%; border-collapse: collapse; margin: .8rem 0 1.2rem; font-size: .92rem; }
.signoff th, .signoff td { border: 1px solid #b9cfc4; padding: .5rem .6rem; text-align: left; vertical-align: top; }
.signoff th { background: #e7f3ec; }
.signoff input[type=text] { width: 100%; border: 0; border-bottom: 1px dashed #8aa99a; background: transparent; padding: .2rem; color: #13251d; }
.signoff .so-head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 3px double #0f766e; padding-bottom: .8rem; margin-bottom: 1rem; }
.signoff .seal { width: 84px; height: 84px; border-radius: 50%; border: 3px solid #0f766e; display: grid; place-items: center; text-align: center; font-size: .62rem; font-weight: 800; color: #0f766e; transform: rotate(-12deg); }
.sigpad { width: 100%; height: 90px; border: 1px dashed #8aa99a; border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; }
.so-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.outcome-opts label { display: block; margin: .3rem 0; }

/* Dashboard */
.dash-domain { display: grid; grid-template-columns: 1fr 2fr; gap: 1.2rem; align-items: center; }
.mod-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.mod-chips a { font-size: .78rem; font-weight: 700; padding: .25rem .5rem; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.mod-chips a.done { background: rgba(16,185,129,.2); color: #a7f3d0; border-color: rgba(52,211,153,.4); }
.mod-chips a.started { background: rgba(251,191,36,.12); color: #fde68a; }
.profile-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.profile-form label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; color: var(--muted); font-weight: 600; }
.profile-form input, .profile-form select { background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem; color: var(--text); }

/* Tutor */
.tutor-fab { position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 60; display: flex; align-items: center; gap: .6rem; padding: .7rem 1.1rem .7rem .7rem; border-radius: 999px; border: 1px solid rgba(52,211,153,.5);
  background: rgba(4,20,14,.85); backdrop-filter: blur(10px); color: var(--text); font-weight: 800; cursor: pointer; box-shadow: 0 16px 40px -12px rgba(16,185,129,.6); }
.fab-orb { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d1fae5, var(--green) 45%, #064e3b); box-shadow: 0 0 18px var(--green); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); box-shadow: 0 0 30px var(--green-2); } }
.tutor { position: fixed; right: 1.4rem; bottom: 5.4rem; z-index: 61; width: min(420px, 92vw); height: min(560px, 72vh); display: flex; flex-direction: column;
  border-radius: 20px; background: rgba(6,24,18,.96); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.tutor[hidden] { display: none; }
.tutor header { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
.tutor header small { display: block; color: var(--muted); font-size: .75rem; }
.tutor .icon-btn { display: inline-grid; place-items: center; }
.tutor-log { flex: 1; overflow: auto; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; }
.msg { max-width: 88%; padding: .65rem .85rem; border-radius: 14px; font-size: .92rem; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: rgba(16,185,129,.22); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--panel-2); border-bottom-left-radius: 4px; }
.msg.bot .src { display: block; margin-top: .4rem; color: var(--muted); font-size: .78rem; }
.tutor-form { display: flex; gap: .5rem; padding: .8rem; border-top: 1px solid var(--line); }
.tutor-form textarea { flex: 1; resize: none; background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 12px; padding: .55rem; }
.typing::after { content: "●●●"; letter-spacing: 2px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }

.sitefoot { position: relative; z-index: 2; border-top: 1px solid var(--line); padding: 2rem clamp(1rem, 3vw, 2.5rem) 5rem; font-size: .85rem; text-align: center; color: #cfe2d9; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.lock-card { text-align: center; padding: 3rem 1.5rem; }

@media (max-width: 980px) {
  .hero-inner, .module-layout, .dash-domain { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .stage-cards { grid-template-columns: 1fr 1fr; }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; }
  .mainnav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: #04140e; padding: 1rem; border-bottom: 1px solid var(--line); }
  .mainnav.open { display: flex; }
  .icon-btn { display: inline-grid; place-items: center; }
  .hero-card { transform: none; }
}
@media (max-width: 620px) {
  .grid-4, .grid-3, .grid-2, .stage-cards, .profile-form { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  #bg3d { opacity: .45 !important; }
  .toc a { font-size: .8rem; padding: .35rem .5rem; }
  .stage3d { aspect-ratio: 4 / 3.4; }
  .subtitle { font-size: .9rem; }
  .activity { grid-template-columns: 1fr; }
  .stage-pill span { display: none; }
  .brand-text small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Print: only the sign-off sheet */
@media print {
  body { background: #fff; color: #000; }
  #bg3d, .grain, .topbar, .demo-banner, .tutor, .tutor-fab, .sitefoot, .no-print, .toc { display: none !important; }
  .module-layout { display: block; }
  .msec:not(#sec-9) { display: none !important; }
  .signoff { box-shadow: none; border-radius: 0; padding: 0; }
  .signoff input[type=text] { border-bottom: 1px solid #555; }
  .sigpad { border: 1px solid #555; }
}

/* ---------- Lite mode + 2D classroom ---------- */
.icon-btn.lite-btn { display: inline-grid; place-items: center; color: var(--muted, #9fb8ad); font-size: 16px; }
.icon-btn.lite-btn[aria-pressed="true"] { color: #04140e; background: var(--gold); border-color: var(--gold); }
body.lite { background: radial-gradient(ellipse at 70% -10%, #0d3b2a 0%, var(--bg) 60%); }
body.lite .tilt { transform: none !important; }

.class2d { position: absolute; inset: 0; display: grid; grid-template-rows: auto auto 1fr; gap: 14px; padding: 18px 22px; }
.c2-board { background: linear-gradient(#123f2d, #0b2c1f); border: 6px solid #6b4a2b; border-radius: 6px; min-height: 64px; display: grid; place-items: center; padding: 10px; box-shadow: inset 0 0 30px #0008; }
.c2-title { font-family: "Fraunces", Georgia, serif; color: #e8f5ee; font-size: clamp(14px, 2.2vw, 20px); text-align: center; }
.c2-front, .c2-desks { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-content: start; }
.c2-desks { background: repeating-linear-gradient(90deg, #ffffff06 0 120px, transparent 120px 132px); border-radius: 10px; padding: 10px; }
.c2-person { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 12px; transition: transform .25s, background .25s; min-width: 72px; }
.c2-av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #04140e; background: #a7f3d0; }
.c2-person.adult .c2-av { width: 50px; height: 50px; background: var(--gold); }
.c2-name { font-size: 12px; color: #cfe3da; max-width: 110px; text-align: center; line-height: 1.2; }
.c2-person.speaking { background: #10b98126; transform: translateY(-4px) scale(1.06); }
.c2-person.speaking .c2-av { box-shadow: 0 0 0 3px var(--green), 0 0 18px var(--green); }
@media (max-width: 640px) { .class2d { padding: 10px; gap: 8px; } .c2-av { width: 34px; height: 34px; font-size: 12px; } .c2-person.adult .c2-av { width: 40px; height: 40px; } }
.stage3d:has(.class2d) .scene-title { display: none; }

/* ---------- Course switch (Teaching / Leadership) ---------- */
.track-switch { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-left: .5rem; }
.track-switch a { padding: .35rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 700; color: var(--muted); }
.track-switch a:hover { text-decoration: none; color: var(--text); }
.track-switch a[aria-current="true"] { background: var(--gold); color: #04140e; }
.track-promo { display: block; margin-top: 1.2rem; border-left: 4px solid var(--gold); }
.track-promo:hover { text-decoration: none; }
body.track-leadership .hero h1 span { background: linear-gradient(135deg, var(--gold), #fb923c); -webkit-background-clip: text; background-clip: text; }
.mainnav a.nav-track { display: none; }
@media (max-width: 980px) { .track-switch { display: none; } .mainnav a.nav-track { display: block; border-top: 1px solid var(--line); border-radius: 0; } }
