/* CS-70 design tokens (measured from Oli's proto) — shared by the SCORM shell and the academy */
:root {
  /* neutrals */
  --lu-bg: #f7f8f9;
  --lu-surface: #ffffff;
  --lu-surface-sunken: #fbfbfc;
  --lu-surface-canvas: #fcfcfd;
  --lu-ink: #111113;
  --lu-text-secondary: #52525b;
  --lu-text-muted: #6b6b73;
  --lu-text-faint: #8a8a93;
  --lu-text-disabled: #9a9aa2;
  --lu-border: #e7e7ea;
  --lu-border-soft: #f1f1f3;
  --lu-border-faint: #ededf0;
  --lu-border-node: #e4e4e8;
  --lu-track: #efeff1;
  --lu-neutral-fill: #d4d4d8;
  /* dark chrome */
  --lu-chrome-bg: #131316;
  --lu-chrome-border: #26262b;
  --lu-chrome-inset: #1d1d21;
  --lu-chrome-inset-border: #2e2e34;
  --lu-chrome-text: #e4e4e7;
  --lu-chrome-muted: #a1a1aa;
  --lu-chrome-avatar-border: #52525b;
  /* accent (violet) */
  --lu-accent: #7950f2;
  --lu-accent-soft: #f1eafe;
  --lu-accent-tint: rgba(121, 80, 242, 0.12);
  --lu-accent-edge: #b79bf7;
  --lu-accent-glow: rgba(121, 80, 242, 0.16);
  --lu-interactive-bg: #f3eefe;
  --lu-interactive-fg: #7950f2;
  /* success (green) */
  --lu-done: #37b24d;
  --lu-done-fg: #2f9e44;
  --lu-done-bg: #f4fbf5;
  --lu-done-border: #b7e4c0;
  --lu-done-icon-bg: #dcf3e1;
  --lu-done-ink: #1f3d28;
  --lu-done-edge: #8cd39b;
  --lu-done-row-bg: #fcfdfc;
  --lu-done-row-border: #e7efe9;
  --lu-done-row-fg: #6b7b70;
  /* track + lesson-type accents */
  --lu-track-foundations: #6b6b73;
  --lu-track-analyst: #1971c2;
  --lu-track-builder: #e8590c;
  --lu-track-ai: #7950f2;
  --lu-video-bg: #eef2ff;
  --lu-video-fg: #4c6ef5;
  --lu-reading-bg: #f4f4f5;
  --lu-reading-fg: #52525b;
  --lu-quiz-bg: #fff4e6;
  --lu-quiz-fg: #e8590c;
  --lu-workspace-bg: #f1f5f9;
  --lu-workspace-fg: #334155;
  /* buttons */
  --lu-btn-filled-bg: #1a1b1e;
  --lu-btn-filled-fg: #f8f9fa;
  --lu-btn-outline-border: #ced4da;
  /* radii */
  --lu-r-xs: 3px;
  --lu-r-icon: 7px;
  --lu-r-sm: 8px;
  --lu-r-tab: 9px;
  --lu-r-card: 11px;
  --lu-r-panel: 12px;
  --lu-r-section: 14px;
  --lu-r-pill: 99px;
  /* shadows */
  --lu-shadow-card: 0 1px 2px rgba(16, 16, 20, 0.04);
  --lu-shadow-node: 0 1px 2px rgba(16, 16, 20, 0.05);
  --lu-shadow-raised: 0 1px 2px rgba(16, 16, 20, 0.08);
  --lu-shadow-focus: 0 6px 18px rgba(121, 80, 242, 0.16);
  /* lifted graph node — has to read as raised above the nodes it now overlaps */
  --lu-shadow-hover-node: 0 12px 32px rgba(16, 16, 20, 0.16), 0 2px 8px rgba(16, 16, 20, 0.08);
  --lu-shadow-heavy: 0 12px 16px -4px rgba(10, 13, 18, 0.08), 0 4px 6px -2px rgba(10, 13, 18, 0.03),
    0 2px 2px -1px rgba(10, 13, 18, 0.04);
  /* course accent: SCORM shell overrides --accent per customer; defaults to the proto violet */
  --accent: var(--lu-accent);
}

* { box-sizing: border-box; }
/* system stack here — the SCORM zip stays self-contained; the academy layers Inter on top */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--lu-ink);
  background: var(--lu-bg);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--lu-surface);
  border-bottom: 1px solid var(--lu-border-soft);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.brand strong { font-weight: 600; }
.brand .logo { height: 26px; width: auto; }
header > div:last-child { font-size: 12.5px; color: var(--lu-text-faint); }
.progress { height: 4px; background: var(--lu-track); }
.progress-fill { height: 100%; background: var(--accent); transition: width 0.2s; }
main {
  max-width: 760px;
  margin: 24px auto;
  padding: 32px;
  background: var(--lu-surface);
  border: 1px solid var(--lu-border);
  border-radius: var(--lu-r-section);
  box-shadow: var(--lu-shadow-card);
}
main img { max-width: 100%; border: 1px solid var(--lu-border); border-radius: 6px; }
main a { color: var(--lu-accent); text-decoration-color: var(--lu-accent-edge); }
.pager { max-width: 760px; margin: 0 auto 40px; display: flex; justify-content: space-between; padding: 0 4px; }
button {
  background: var(--lu-btn-filled-bg);
  color: var(--lu-btn-filled-fg);
  border: 1px solid var(--lu-btn-filled-bg);
  padding: 10px 18px;
  border-radius: var(--lu-r-sm);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}
button:hover { filter: brightness(1.25); }
button.btn-outline {
  background: var(--lu-surface);
  color: var(--lu-ink);
  border: 1px solid var(--lu-btn-outline-border);
}
button.btn-outline:hover { filter: none; border-color: var(--lu-text-disabled); }
.quiz-head { display: flex; align-items: center; gap: 10px; }
.quiz-chip {
  width: 24px;
  height: 24px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--lu-r-icon);
  background: var(--lu-quiz-bg);
  color: var(--lu-quiz-fg);
  font-size: 13px;
  font-weight: 600;
}
.quiz-intro { font-size: 12.5px; color: var(--lu-text-muted); }
.quiz-q {
  border: 1px solid var(--lu-border);
  border-radius: var(--lu-r-card);
  margin-bottom: 16px;
  padding: 14px 16px 12px;
}
/* float pulls the legend inside the fieldset border so the prompt reads as card content */
.quiz-q legend { float: left; width: 100%; padding: 0; margin: 0 0 8px; font-size: 13.5px; font-weight: 600; }
.quiz-q label { display: block; padding: 4px 0; cursor: pointer; }
.result-pass {
  color: var(--lu-done-fg);
  font-weight: 600;
  background: var(--lu-done-bg);
  border: 1px solid var(--lu-done-border);
  border-radius: var(--lu-r-sm);
  padding: 10px 14px;
}
.result-fail {
  color: #b42318;
  font-weight: 600;
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: var(--lu-r-sm);
  padding: 10px 14px;
}
.demo-stage { position: relative; }
.demo-stage img { display: block; width: 100%; }
.demo-hotspot { position: absolute; background: transparent; border: 2px solid var(--accent); border-radius: 6px; padding: 0; animation: demo-pulse 1.6s ease-in-out infinite; }
.demo-hotspot:hover { filter: none; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.demo-caption { margin-top: 8px; font-size: 14px; color: var(--lu-text-secondary); }
.demo-caption button { padding: 4px 10px; font-size: 13px; margin-left: 6px; }
.demo-step-count { font-weight: 600; color: var(--accent); margin-right: 4px; }
@keyframes demo-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
/* Static product shots in concept sections — training also sells the product,
   so a well-framed screenshot shows it off where there is no flow to walk. */
.lesson figure.shot { margin: 1.25rem 0; }
.lesson figure.shot img { display: block; width: 100%; border: 1px solid var(--lu-border); border-radius: 10px; box-shadow: 0 6px 20px rgba(20, 25, 40, 0.1); }
.lesson figure.shot figcaption { margin-top: 0.5rem; font-size: 0.85rem; color: var(--lu-text-secondary); text-align: center; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.result-back {
  background: var(--lu-surface);
  color: var(--lu-ink);
  border: 1px solid var(--lu-border);
}
.result-back:hover { filter: none; background: var(--lu-surface-sunken); }

.feature-note {
  position: relative;
  display: inline-block;
  overflow: hidden;
  margin: 16px 0;
  padding: 10px 14px 10px 20px; /* 6px rail + 14px */
  font-size: 14px;
  color: var(--lu-text-secondary);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 6px;
}
.feature-note::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(to bottom, #361fa0 0 33.34%, #5b43f5 33.34% 66.67%, #9580ff 66.67% 100%);
}
.feature-note a { color: var(--lu-accent); text-decoration: underline; text-underline-offset: 2px; }

.quiz-feedback { border-left: 3px solid; padding: 0.5rem 0.75rem; margin: 0.75rem 0 }
.quiz-feedback-correct { border-color: var(--lu-done-fg) }
.quiz-feedback-wrong { border-color: #e03131 }
.quiz-feedback-prompt { font-weight: 600 }

/* Video lessons.
   Constrained to the text column so a 1920x1080 capture does not blow out the
   reading measure, and given an explicit aspect-ratio so layout does not jump
   while metadata loads. --lu-video-bg/-fg were declared but unused until now. */
.lesson video {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  margin: 1.5rem 0;
  border-radius: 10px;
  background: var(--lu-video-bg);
  border: 1px solid color-mix(in srgb, var(--lu-video-fg) 25%, transparent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Native controls are kept — a custom chrome would have to be re-implemented for
   the SCORM runtime and the academy separately. */
.lesson video:focus-visible {
  outline: 2px solid var(--lu-video-fg);
  outline-offset: 2px;
}

.lesson figure.video {
  margin: 1.5rem 0;
}

.lesson figure.video figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--lu-video-fg);
}
