/* ═══════════════════════════════════════════════════════════
   CT for Educators — Stylesheet
   Color: Google quartet (CT framework standard) + Malaysian accents
   ═══════════════════════════════════════════════════════════ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Google CT quartet */
  --g-blue: #4285F4;
  --g-blue-d: #1a5fc4;
  --g-red: #EA4335;
  --g-red-d: #c0271a;
  --g-yellow: #FBBC04;
  --g-yellow-d: #b8860b;
  --g-green: #34A853;
  --g-green-d: #1e7e34;

  /* Light theme — sage/green-tinted  */
  --bg: #f1f6ef;
  --bg-2: #e6f0e3;
  --surface: #ffffff;
  --surface-2: #ecf3e9;
  --surface-3: #dde9d8;
  --border: #cadec2;
  --border-strong: #a4c198;
  --text: #1a1f2e;
  --text-dim: #3d4358;
  --text-muted: #5b6275;
  --shadow-sm: 0 1px 3px rgba(20,30,50,.06), 0 1px 2px rgba(20,30,50,.04);
  --shadow-md: 0 8px 24px rgba(20,30,50,.08), 0 2px 8px rgba(20,30,50,.05);
  --shadow-lg: 0 24px 60px rgba(20,30,50,.12), 0 8px 24px rgba(20,30,50,.08);

  --font-sans: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
  --font-display: 'Roboto', 'Plus Jakarta Sans', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --slide-pad: 38px 48px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
}

[data-theme="dark"] {
  --bg: #0b130e;
  --bg-2: #111d15;
  --surface: #14211a;
  --surface-2: #1c2c22;
  --surface-3: #26392d;
  --border: #26392d;
  --border-strong: #415a49;
  --text: #f0f2f8;
  --text-dim: #c6cbd9;
  --text-muted: #a0a8c0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
}

[data-density="cozy"] { --slide-pad: 28px 36px; }
[data-density="spacious"] { --slide-pad: 50px 64px; }

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ═══ APP SHELL ═══ */
.app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 24px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative; z-index: 10;
}
.brand {
  display: flex; align-items: center; gap: 12px;
}
.brand-logo {
  height: 24px; width: auto; display: block;
}
.brand-divider {
  width: 1px; height: 22px; background: var(--border);
}
.brand-mark {
  display: flex; align-items: center; gap: 6px;
}
.brand-mark span {
  width: 11px; height: 11px; border-radius: 50%;
}
.brand-mark span:nth-child(1) { background: var(--g-blue); }
.brand-mark span:nth-child(2) { background: var(--g-red); }
.brand-mark span:nth-child(3) { background: var(--g-yellow); }
.brand-mark span:nth-child(4) { background: var(--g-green); }
.brand-name {
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  letter-spacing: -0.01em;
}
.brand-tag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 1.5px;
  color: var(--text-muted); text-transform: uppercase;
  padding: 3px 8px; border: 1px solid var(--border); border-radius: 100px;
}

.topic-name {
  flex: 1; display: flex; align-items: center; gap: 12px;
  margin-left: 18px; padding-left: 18px;
  border-left: 1px solid var(--border);
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-dim); font-weight: 600;
  overflow: hidden;
}
.topic-name strong { color: var(--g-red); margin-right: 4px; }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.score-pill {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  background: linear-gradient(135deg, #FBBC04, #EA4335); color: white;
  padding: 6px 12px; border-radius: 100px;
  box-shadow: 0 2px 6px rgba(234,67,53,.3);
  transition: transform .25s;
}
.score-pill.bumped { animation: scoreBump .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes scoreBump {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

.hamburger {
  width: 36px; height: 36px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 0;
  transition: all .2s;
}
.hamburger:hover { background: var(--surface-3); border-color: var(--border-strong); }
.hamburger span {
  display: block; width: 16px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all .3s cubic-bezier(.2,.8,.2,1);
  transform-origin: center;
}
.hamburger.open { background: var(--text); border-color: var(--text); }
.hamburger.open span { background: var(--surface); }
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

[data-theme="dark"] .brand-logo {
  background: #fff; padding: 4px 8px; border-radius: 6px;
  box-sizing: content-box;
}

/* ═══ STAGE ═══ */
.main {
  flex: 1; position: relative; overflow: hidden;
  background: var(--bg);
}
.stage {
  position: absolute; inset: 0;
}
.slide {
  position: absolute; inset: 0;
  padding: var(--slide-pad);
  overflow-y: auto;
  opacity: 0; transform: translateY(30px) scale(.98);
  pointer-events: none;
  transition: opacity .55s cubic-bezier(.2,.8,.2,1), transform .55s cubic-bezier(.2,.8,.2,1);
}
.slide.active {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}
.slide.exit {
  opacity: 0; transform: translateY(-30px) scale(.98); pointer-events: none;
}

.slide-inner {
  max-width: 980px; margin: 0 auto;
}

/* Reveal animation for elements within active slide */
.slide.active .reveal {
  animation: revealUp .6s cubic-bezier(.2,.8,.2,1) backwards;
}
.slide.active .reveal:nth-child(1) { animation-delay: 0s; }
.slide.active .reveal:nth-child(2) { animation-delay: .08s; }
.slide.active .reveal:nth-child(3) { animation-delay: .16s; }
.slide.active .reveal:nth-child(4) { animation-delay: .24s; }
.slide.active .reveal:nth-child(5) { animation-delay: .32s; }
.slide.active .reveal:nth-child(6) { animation-delay: .40s; }
.slide.active .reveal:nth-child(n+7) { animation-delay: .48s; }
@keyframes revealUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══ TYPOGRAPHY & PRIMITIVES ═══ */
h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: 56px; line-height: 1.0; letter-spacing: -0.03em;
  margin-bottom: 14px;
}
h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 32px; line-height: 1.1; letter-spacing: -0.02em;
  margin-bottom: 16px;
}
h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 22px; line-height: 1.2; margin-bottom: 10px;
}
h4 {
  font-size: 15px; font-weight: 700;
  margin-bottom: 6px; letter-spacing: -0.01em;
}
p { font-size: 14px; line-height: 1.65; color: var(--text-dim); text-wrap: pretty; }
p strong, h4 strong { color: var(--text); }
a { color: var(--g-blue-d); text-decoration: none; }

code.kbd {
  font-family: var(--mono); font-size: 12px;
  background: var(--surface-2); padding: 2px 7px;
  border-radius: 5px; border: 1px solid var(--border); color: var(--g-red-d);
}

.tag {
  display: inline-block; font-family: var(--mono);
  font-size: 9.5px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; padding: 3px 8px; border-radius: 100px;
}
.tag.blue { background: rgba(66,133,244,.12); color: var(--g-blue-d); }
.tag.red { background: rgba(234,67,53,.12); color: var(--g-red-d); }
.tag.yellow { background: rgba(251,188,4,.18); color: var(--g-yellow-d); }
.tag.green { background: rgba(52,168,83,.12); color: var(--g-green-d); }

.act-label {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--g-red);
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.act-label::before {
  content: ''; width: 18px; height: 2px; background: var(--g-red);
}

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  margin-bottom: 12px;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { box-shadow: var(--shadow-sm); }

.card-accent {
  border-left: 4px solid var(--border-strong);
}
.card-accent.blue { border-left-color: var(--g-blue); }
.card-accent.red { border-left-color: var(--g-red); }
.card-accent.yellow { border-left-color: var(--g-yellow); }
.card-accent.green { border-left-color: var(--g-green); }

.box {
  padding: 12px 16px; border-radius: 10px; margin: 12px 0;
  font-size: 13.5px; line-height: 1.55;
}
.box strong:first-child {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 4px;
}
.box.tip { background: rgba(66,133,244,.08); border: 1px solid rgba(66,133,244,.2); color: var(--text); }
.box.tip strong:first-child { color: var(--g-blue-d); }
.box.note { background: rgba(52,168,83,.08); border: 1px solid rgba(52,168,83,.2); color: var(--text); }
.box.note strong:first-child { color: var(--g-green-d); }
.box.warn { background: rgba(251,188,4,.12); border: 1px solid rgba(251,188,4,.3); color: var(--text); }
.box.warn strong:first-child { color: var(--g-yellow-d); }

.tc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tc-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* ═══ TITLE SLIDE ═══ */
.title-slide {
  min-height: 100%; display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start; text-align: left;
  padding: 20px 0;
}
.title-slide .title-art { margin-bottom: 22px; }
.title-eyebrow {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; color: var(--g-red);
  margin-bottom: 12px;
}
.title-slide h1 { max-width: 760px; }
.title-slide p {
  font-size: 17px; max-width: 620px; color: var(--text-dim);
  line-height: 1.5;
}

/* ═══ CT ICONS ═══ */
.ct-icon { width: 48px; height: 48px; }
.ct-icon-lg { width: 110px; height: 110px; }

/* ═══ OBJECTIVES ═══ */
.obj-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 16px;
}
.obj {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; line-height: 1.5;
  transition: transform .2s;
}
.obj:hover { transform: translateX(4px); }
.obj-num {
  flex: 0 0 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 14px;
  color: white;
}
.obj.blue .obj-num { background: var(--g-blue); }
.obj.red .obj-num { background: var(--g-red); }
.obj.yellow .obj-num { background: var(--g-yellow); color: #222; }
.obj.green .obj-num { background: var(--g-green); }

/* ═══ FLOW STEPS ═══ */
.flow { display: flex; flex-direction: column; gap: 8px; }
.flow-step {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px;
}
.flow-num {
  flex: 0 0 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: white;
}
.flow-step.blue .flow-num { background: var(--g-blue); }
.flow-step.red .flow-num { background: var(--g-red); }
.flow-step.yellow .flow-num { background: var(--g-yellow); color: #222; }
.flow-step.green .flow-num { background: var(--g-green); }
.flow-content h4 { font-size: 13px; margin-bottom: 2px; }
.flow-content p { font-size: 12px; }

/* ═══ CHECKLIST ═══ */
.checklist { list-style: none; padding: 0; }
.checklist li {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 6px;
  cursor: pointer; transition: all .2s;
  display: flex; align-items: center; gap: 12px;
  font-size: 13px;
}
.checklist li:hover { border-color: var(--g-blue); transform: translateX(4px); }
.checklist .ck {
  flex: 0 0 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: transparent; transition: all .2s; font-weight: 700;
}
.checklist li.done .ck {
  background: var(--g-green); border-color: var(--g-green); color: white;
}
.checklist li.done {
  background: rgba(52,168,83,.06); border-color: rgba(52,168,83,.3);
  text-decoration: line-through; color: var(--text-dim);
}

/* ═══ DASHBOARD LAB (faculty attendance sheet) ═══ */
.ws-table { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--surface); border-radius: 10px; overflow: hidden; }
.ws-table th { background: var(--surface-2); text-align: left; padding: 8px 10px; font-weight: 700; font-size: 11px; letter-spacing: .3px; text-transform: uppercase; color: var(--text-muted); }
.ws-table td { padding: 7px 10px; border-top: 1px solid var(--border); }
.ws-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 10px; font-size: 12.5px; color: var(--text-dim); }
.ws-checks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
@media (max-width: 760px) { .ws-checks { grid-template-columns: 1fr 1fr; } }
.ws-check { padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }
.ws-check-fb { margin-top: 8px; font-size: 12.5px; line-height: 1.5; min-height: 16px; }
.ws-check-fb.ok { color: var(--g-green-d); }
.ws-check-fb.no { color: var(--g-red-d); }
.ws-fallback { margin-top: 16px; padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--border); background: var(--surface); }
.ws-fallback summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text-dim); }

/* ═══ AI ═══ */
.ai-input {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; font-family: var(--font-sans);
  font-size: 13px; color: var(--text);
}
.ai-input:focus { outline: 2px solid var(--g-blue); border-color: var(--g-blue); }
.ai-output {
  margin-top: 10px; padding: 16px 18px;
  background: linear-gradient(135deg, rgba(66,133,244,.06), rgba(52,168,83,.06));
  border: 1px solid rgba(66,133,244,.2);
  border-radius: var(--radius); font-size: 13px; line-height: 1.7;
  color: var(--text); white-space: pre-wrap;
}
.spinner {
  display: inline-block; width: 22px; height: 22px;
  border: 3px solid var(--border); border-top-color: var(--g-blue);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ TIMER ═══ */
.timer {
  font-family: var(--mono); font-size: 56px; font-weight: 700;
  text-align: center; color: var(--g-blue-d);
  margin: 14px 0; letter-spacing: 4px;
  text-shadow: 0 4px 20px rgba(66,133,244,.2);
}
.timer.urgent { color: var(--g-red); animation: pulse .8s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ═══ NAV ═══ */
.navbar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 20px; background: var(--surface);
  border-top: 1px solid var(--border);
}
.btn {
  border: none; border-radius: 100px; padding: 8px 18px;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn.primary { background: var(--text); color: var(--surface); }
.btn.primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); }
.btn:disabled { opacity: .35; cursor: not-allowed; }

.nav-spacer { flex: 1; }

.dots {
  flex: 1; display: flex; align-items: center; gap: 4px;
  justify-content: center; flex-wrap: wrap;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); cursor: pointer;
  transition: all .2s;
}
.dot:hover { background: var(--border-strong); transform: scale(1.3); }
.dot.complete { background: var(--g-green); }
.dot.active { background: var(--g-red); transform: scale(1.5); box-shadow: 0 0 0 3px rgba(234,67,53,.2); }
.dot-sep {
  width: 14px; height: 1px; background: var(--border);
  margin: 0 4px;
}

.progress {
  height: 3px; background: var(--border);
  border-radius: 0; overflow: hidden;
}
.pfill {
  height: 100%;
  background: linear-gradient(90deg, var(--g-blue), var(--g-red), var(--g-yellow), var(--g-green));
  background-size: 200% 100%;
  transition: width .55s cubic-bezier(.2,.8,.2,1);
  animation: gradFlow 4s linear infinite;
}
@keyframes gradFlow {
  to { background-position: 200% 0; }
}

.slide-count {
  font-family: var(--mono); font-size: 11px; color: var(--text-muted);
  font-weight: 600; letter-spacing: 1px; min-width: 60px; text-align: center;
}

/* ═══ TWEAKS PANEL (hamburger menu) ═══ */
.tweaks-panel {
  position: fixed; top: 56px; right: 18px; z-index: 50;
  max-height: calc(100dvh - 72px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 20px;
  width: 260px; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-8px) scale(.96); pointer-events: none;
  transform-origin: top right;
  transition: all .25s cubic-bezier(.34,1.4,.64,1);
}
.tweaks-panel.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.tweaks-panel::before {
  content: ''; position: absolute; top: -6px; right: 14px;
  width: 12px; height: 12px; background: var(--surface);
  border-left: 1px solid var(--border); border-top: 1px solid var(--border);
  transform: rotate(45deg);
}
.tweaks-panel h4 {
  font-family: var(--font-display); font-size: 14px;
  margin-bottom: 8px; color: var(--text); font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.tweaks-panel h4::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--g-red);
}
.tweak-row {
  display: grid; grid-template-columns: 84px 1fr; align-items: center;
  gap: 10px; margin-bottom: 6px;
}
.tweak-row:last-child { margin-bottom: 0; }
.tweak-row label {
  font-size: 9px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted);
  font-family: var(--mono); margin: 0;
}
.tweak-options { display: flex; gap: 3px; }
.tweak-options button {
  flex: 1; padding: 5px 8px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 11px; cursor: pointer; font-family: var(--font-sans);
  color: var(--text); transition: all .15s; font-weight: 500;
}
.tweak-options button:hover { background: var(--surface-3); }
.tweak-options button.on {
  background: var(--text); color: var(--surface);
  border-color: var(--text); font-weight: 600;
}
.tweak-slider { display: flex; align-items: center; gap: 8px; }
.tweak-slider input[type=range] {
  flex: 1; height: 4px; appearance: none; -webkit-appearance: none;
  background: var(--border); border-radius: 2px; outline: none;
  cursor: pointer; padding: 0; margin: 0;
}
.tweak-slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--g-blue); cursor: pointer; border: 2px solid var(--surface);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.tweak-slider input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--g-blue); cursor: pointer; border: 2px solid var(--surface);
}
.tweak-slider .tweak-slider-val {
  font-family: var(--mono); font-size: 10px; color: var(--text-muted);
  min-width: 30px; text-align: right; font-weight: 600;
}

/* Print */
@media print {
  .topbar, .navbar, .tweaks-panel, .tweaks-btn { display: none !important; }
  .slide { position: static; opacity: 1 !important; transform: none !important; page-break-after: always; }
  .stage { position: static; }
  body, html { overflow: visible; height: auto; }
}

/* Scrollbar */
.slide { scrollbar-width: auto; scrollbar-color: var(--text-muted) rgba(0,0,0,.06); }
.slide::-webkit-scrollbar { width: 12px; }
.slide::-webkit-scrollbar-track { background: rgba(0,0,0,.06); }
.slide::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
.slide::-webkit-scrollbar-thumb:hover { background: var(--text-dim); background-clip: padding-box; }

/* "More below" hint — shown only while the active slide has content under
   the fold. Overlay scrollbars (touch, macOS, some Windows setups) are
   invisible until you scroll, so without this nothing says there's more. */
.scroll-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  z-index: 20; display: none; align-items: center; gap: 8px;
  padding: 8px 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--g-blue); color: #fff; font-family: inherit; font-weight: 700; font-size: 12.5px;
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
  animation: scrollHintBob 1.6s ease-in-out infinite;
}
.scroll-hint.show { display: inline-flex; }
@keyframes scrollHintBob { 0%,100% { margin-bottom: 0; } 50% { margin-bottom: 6px; } }
@media (prefers-reduced-motion: reduce) { .scroll-hint { animation: none; } }
@media print { .scroll-hint { display: none !important; } }

/* Mobile */
@media (max-width: 720px) {
  :root { --slide-pad: 24px 22px; }
  h1 { font-size: 36px; }
  h2 { font-size: 26px; }
  .obj-list, .tc, .tc-3, .concept-grid, .drop-slots, .sb-compare { grid-template-columns: 1fr; }
  .topic-name { display: none; }
  .brand-tag { display: none; }

  /* Keep nav visible on phones — pin progress + navbar to bottom */
  .progress {
    position: fixed; left: 0; right: 0;
    bottom: calc(48px + env(safe-area-inset-bottom));
    z-index: 40;
  }
  .navbar {
    position: fixed; left: 0; right: 0;
    bottom: 0;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    gap: 8px;
    z-index: 40;
    box-shadow: 0 -4px 16px rgba(0,0,0,.06);
  }
  .navbar .btn { padding: 8px 14px; font-size: 13px; }
  .slide-count { min-width: 44px; font-size: 11px; letter-spacing: .5px; }
  /* Reserve room so slide content isn't hidden behind the fixed nav. The
     stage is absolutely positioned, so .main's padding alone didn't move it:
     the last ~50px of every scrolling slide sat under the navbar, and the
     "More below" pill was drawn behind it. */
  .main { padding-bottom: calc(51px + env(safe-area-inset-bottom)); }
  .stage { bottom: calc(52px + env(safe-area-inset-bottom)); }
  .scroll-hint { bottom: calc(66px + env(safe-area-inset-bottom)); }
}


/* ═══ DESIGN PASS: projection scale, type rails, badges, motion ═══ */
/* Projection: scale the whole slide on big screens (inline px sizes scale too). */
.slide-inner { max-width: 1020px; }
@media (min-width: 1500px) and (min-height: 820px) { .slide-inner { zoom: 1.22; } }
@media (min-width: 1800px) and (min-height: 980px) { .slide-inner { zoom: 1.4; max-width: 1060px; } }

/* Captions carry the message of every explainer: make them the loudest small text */
.ex-cap, .re-cap, .vx-cap p, .gx-verdict { font-size: 15px; line-height: 1.55; }
.ex-cap { font-weight: 500; }

/* Motion: the old slide leaves quickly, the new one arrives just after */
.slide { transition: opacity .16s ease, transform .16s ease; transform: translateY(14px); }
.slide.active { transition: opacity .3s ease .08s, transform .3s ease .08s; transform: none; }
.slide.exit { transform: translateY(-10px); transition: opacity .14s ease, transform .14s ease; }
.slide.active .reveal { animation-duration: .4s; }
.slide.active .reveal:nth-child(2) { animation-delay: .04s; }
.slide.active .reveal:nth-child(3) { animation-delay: .08s; }
.slide.active .reveal:nth-child(4) { animation-delay: .12s; }
.slide.active .reveal:nth-child(5) { animation-delay: .16s; }
.slide.active .reveal:nth-child(6) { animation-delay: .2s; }
.slide.active .reveal:nth-child(n+7) { animation-delay: .24s; }

/* Slide type badge (Learn / Lab / Help / Before the lab / Check / Timer) */
.act-label {
  font-size: 11px; letter-spacing: 1.4px; gap: 7px;
  padding: 6px 12px 6px 9px; border-radius: 999px; margin-bottom: 12px;
  background: var(--lab-bg, rgba(234,67,53,.1)); color: var(--lab-c, var(--g-red));
}
.act-label::before { display: none; }
.act-label .ex-ic { width: 15px; height: 15px; }
.al-learn  { --lab-c: var(--g-blue-d);  --lab-bg: rgba(66,133,244,.13); }
.al-lab    { --lab-c: #8a5a00;          --lab-bg: rgba(251,188,4,.26); }
.al-help   { --lab-c: var(--g-red-d);   --lab-bg: rgba(234,67,53,.13); }
.al-before { --lab-c: #6b3fc4;          --lab-bg: rgba(138,92,246,.15); }
.al-check  { --lab-c: var(--g-green-d); --lab-bg: rgba(52,168,83,.16); }
.al-timer  { --lab-c: var(--text-dim);  --lab-bg: var(--surface-3); }
[data-theme="dark"] .al-learn  { --lab-c: #8ab4f8; }
[data-theme="dark"] .al-lab    { --lab-c: #fdd663; }
[data-theme="dark"] .al-help   { --lab-c: #f28b82; }
[data-theme="dark"] .al-before { --lab-c: #c4a7f5; }
[data-theme="dark"] .al-check  { --lab-c: #81c995; }

/* Type rail: a coloured edge tells you the kind of slide before you read anything */
.slide.t-learn  { box-shadow: inset 6px 0 0 var(--g-blue);   background-image: linear-gradient(180deg, rgba(66,133,244,.06), transparent 200px); }
.slide.t-lab    { box-shadow: inset 6px 0 0 var(--g-yellow); background-image: linear-gradient(180deg, rgba(251,188,4,.10), transparent 220px); }
.slide.t-help   { box-shadow: inset 6px 0 0 var(--g-red);    background-image: linear-gradient(180deg, rgba(234,67,53,.06), transparent 200px); }
.slide.t-before { box-shadow: inset 6px 0 0 #8a5cf6;         background-image: linear-gradient(180deg, rgba(138,92,246,.07), transparent 200px); }
.slide.t-check  { box-shadow: inset 6px 0 0 var(--g-green);  background-image: linear-gradient(180deg, rgba(52,168,83,.07), transparent 200px); }

/* Progress: one segment per part, filled as you go */
.progress { display: flex; gap: 4px; height: 6px; background: transparent; padding: 0; }
.pseg { flex: var(--n) 1 0; background: var(--border); border-radius: 4px; overflow: hidden; }
.pseg i { display: block; height: 100%; width: 0; background: var(--c); transition: width .4s cubic-bezier(.2,.8,.2,1); }
.pseg.on { background: var(--border-strong); }

/* Top bar: one tidy line, the part name never wraps */
.topbar { gap: 12px; }
.topic-name { flex: 1 1 0; min-width: 0; white-space: nowrap; letter-spacing: 1px; margin-left: 12px; padding-left: 14px; }
.topic-name span { overflow: hidden; text-overflow: ellipsis; }

/* "More below" hint: out of the way, bottom right */
.scroll-hint { left: auto; right: 22px; transform: none; padding: 6px 12px; font-size: 12px; }

/* Hide the facilitator controls (pause / restart); the room sees Replay and Next only */
.ex-play, #re-play, #vx-play { display: none !important; }
.ex-ctl, .re-ctl, .vx-ctl { margin-top: 10px; }

/* Lab steps: instructions on the left, the prompt to copy on the right */
@media (min-width: 900px) {
  .rs-body.rs-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2px 20px; align-items: start; }
  .rs-body.rs-two > h5, .rs-body.rs-two > p { grid-column: 1; }
  .rs-body.rs-two > .rs-prompt-flow, .rs-body.rs-two > .prompt-card { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
}

/* Lab slides carry more text: scale them a little less so they still fit one screen */
@media (min-width: 1500px) and (min-height: 820px) { .slide.t-lab .slide-inner { zoom: 1.12; } }
@media (min-width: 1800px) and (min-height: 980px) { .slide.t-lab .slide-inner { zoom: 1.25; } }

/* Tall explainers get a smaller scale so the animation, caption and buttons stay on one screen */
@media (min-width: 1500px) and (min-height: 820px) { .slide:has(.re) .slide-inner, .slide:has(.vc-lanes) .slide-inner { zoom: 1.05; } }
@media (min-width: 1800px) and (min-height: 980px) {
  .slide:has(.re) .slide-inner, .slide:has(.vc-lanes) .slide-inner { zoom: 1.15; }
  .slide.t-lab .slide-inner { zoom: 1.18; }
}
