:root {
  --bg: #f8fafd;
  --paper: #ffffff;
  --ink: #202124;
  --muted: #5f6368;
  --blue: #1a73e8;
  --blue-hover: #1557b0;
  --blue-bg: #e8f0fe;
  --pill-selected: #d3e3fd;
  --pill-text: #041e49;
  --line: #dadce0;
  --font: 'Roboto', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --radius-card: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a.button { cursor: pointer; }
button {
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
}
button:hover { background: #f1f3f4; }
button:disabled { opacity: .5; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Sidebar Drawer */
aside {
  position: fixed;
  width: 256px;
  inset: 0 auto 0 0;
  border-right: 1px solid var(--line);
  background: var(--bg);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  z-index: 3;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--ink);
  padding: 0 12px;
}
.brand small { display: block; font-size: 9px; font-weight: 500; color: var(--muted); letter-spacing: 1.5px; }
.brandmark {
  font: 700 18px 'Roboto', sans-serif;
  background: var(--blue);
  color: #ffffff;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  letter-spacing: -0.5px;
}
.brandmark span { font-size: 12px; color: #c2e7ff; }
.navlabel {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 1.2px;
  margin: 32px 16px 12px;
}
nav { display: grid; gap: 4px; }
nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}
nav a:hover { background: #f1f3f4; color: var(--ink); }
nav a.active {
  background: var(--pill-selected);
  color: var(--pill-text);
  font-weight: 700;
}
.sidebottom { margin-top: auto; font-size: 12px; padding: 20px 16px 0; color: var(--muted); }
.sidebottom p { font-size: 11px; color: var(--muted); margin: 6px 0 14px; }
.sidebottom a { font-size: 12px; color: var(--blue); font-weight: 500; }
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #34a853;
  border-radius: 50%;
  margin-right: 6px;
}

/* Shell & Header */
.shell { margin-left: 256px; }
header {
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  font-size: 13px;
}
.header-left { display: flex; align-items: center; }
.ws-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--blue-bg);
  color: var(--blue);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-right: 14px;
  border: 1px solid #c2e7ff;
}
.breadcrumb { color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 1px; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-bg);
  color: var(--blue);
  border: 1px solid #c2e7ff;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
}
main { max-width: 1280px; padding: 36px 40px 60px; min-height: calc(100vh - 120px); }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--blue); margin-bottom: 8px; text-transform: uppercase; }
h1, h2, h3, h4 { font-family: 'Roboto', sans-serif; line-height: 1.3; color: var(--ink); }
h1 { font-size: 32px; font-weight: 700; margin: 8px 0 12px; letter-spacing: -0.5px; }
h2 { font-size: 22px; font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 17px; font-weight: 500; margin: 0 0 8px; }
h4 { font-size: 14px; font-weight: 700; margin: 12px 0 6px; }
p { margin: 0 0 16px; color: var(--ink); }
.muted, .sub { color: var(--muted); }
.sub { max-width: 720px; font-size: 14px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Buttons & Tags */
.button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #ffffff;
  border: 0;
  padding: 10px 22px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { background: var(--blue-hover); box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.button.light { background: var(--blue-bg); color: var(--blue); border: 1px solid #c2e7ff; }
.button.light:hover { background: #d3e3fd; }
.button.ghost { background: var(--paper); border: 1px solid var(--line); color: var(--blue); }
.button.ghost:hover { background: #f8fafd; border-color: #c6c6c6; }

/* Hero Banner */
.hero {
  margin: 24px 0 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  background: var(--blue-bg);
  color: var(--ink);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #c2e7ff;
}
.hero .hero-copy { padding: 36px; }
.hero h2 { font-size: 28px; color: #041e49; max-width: 460px; font-weight: 700; }
.hero p { color: #444746; font-size: 14px; max-width: 440px; }
.hero .eyebrow { color: var(--blue); }
.hero-visual {
  background: #d3e3fd;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  overflow: hidden;
}
.orbit { position: absolute; border: 1px solid #a8c7fa; width: 280px; height: 280px; border-radius: 50%; transform: rotate(-20deg); }
.orbit.two { width: 190px; height: 190px; }
.core {
  z-index: 1;
  text-align: center;
  background: var(--paper);
  color: var(--blue);
  border-radius: 16px;
  padding: 24px 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 1px solid #c2e7ff;
}
.core strong { font: 700 26px 'Roboto', sans-serif; display: block; color: #041e49; }
.core small { font-size: 10px; letter-spacing: 1.5px; color: var(--blue); font-weight: 700; }
.float {
  position: absolute;
  font-size: 11px;
  font-weight: 500;
  background: var(--paper);
  color: #1f1f1f;
  padding: 8px 14px;
  border-radius: 20px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  border: 1px solid var(--line);
}
.float.a { left: 16px; top: 24px; }
.float.b { right: 18px; bottom: 28px; }
.float.c { right: 14px; top: 38px; }

/* Stats & Grid */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin: 24px 0; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.stat small { font-size: 12px; color: var(--muted); display: block; font-weight: 500; }
.stat strong { font: 700 24px 'Roboto', sans-serif; display: block; margin: 6px 0 4px; color: var(--ink); }
.stat span { font-size: 11px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin: 20px 0; }
.grid.two { grid-template-columns: repeat(2,1fr); }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover { box-shadow: 0 2px 8px rgba(60,64,67,0.12); border-color: #c6c6c6; }
.card p { font-size: 13.5px; color: #3c4043; }
.card a.link { font-size: 13px; font-weight: 500; color: var(--blue); }
.card a.link:hover { text-decoration: underline; }
.card .icon {
  font-size: 18px;
  width: 40px;
  height: 40px;
  background: var(--blue-bg);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  margin-bottom: 16px;
}
.tag {
  display: inline-block;
  padding: 4px 10px;
  background: #f1f3f4;
  border-radius: 6px;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: #3c4043;
  font-weight: 700;
  text-transform: uppercase;
}
.tag.orange { background: #fef7e0; color: #b06000; border: 1px solid #fce8b2; }
.tag.dark { background: #3c4043; color: #ffffff; }
.tag.blue { background: var(--blue-bg); color: var(--blue); border: 1px solid #c2e7ff; }

/* 5-Stage Stage Nav Bar */
.stage-nav {
  display: flex;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: 12px;
  margin: 20px 0 24px;
  flex-wrap: wrap;
}
.stage-tab {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.stage-tab:hover { background: #f1f3f4; color: var(--ink); }
.stage-tab.active {
  background: var(--blue-bg);
  color: var(--blue);
  border-color: #c2e7ff;
  font-weight: 700;
}

/* Collapsible Original Text */
details.orig-text {
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 16px 0;
}
details.orig-text summary {
  font-weight: 500;
  color: var(--blue);
  cursor: pointer;
}
details.orig-text[open] summary { margin-bottom: 14px; }

/* Status Badges Grid on Module Cards */
.status-badges {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f1f3f4;
  color: var(--muted);
}
.status-pill.pass { background: #e6f4ea; color: #137333; }
.status-pill.saved { background: #e8f0fe; color: #1a73e8; }
.status-pill.reported { background: #fef7e0; color: #b06000; }

/* Sections & Path */
.sectionhead { margin-top: 32px; }
.sectionhead h2 { font-size: 20px; margin: 0; }
.sectionhead a { font-size: 13px; color: var(--blue); font-weight: 500; }
.progress { height: 8px; background: #e8f0fe; border-radius: 8px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--blue); border-radius: 8px; }
.pathrow {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.pathrow:last-child { border: 0; }
.number {
  width: 36px;
  height: 36px;
  background: #f1f3f4;
  color: var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.pathrow h3 { font-size: 15px; margin: 0 0 2px; }
.pathrow p { font-size: 12px; margin: 0; color: var(--muted); }
.pathrow a { font-size: 13px; color: var(--blue); font-weight: 500; }

/* Notice Boxes */
.notice {
  background: var(--blue-bg);
  border-left: 4px solid var(--blue);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  margin: 20px 0;
  color: #041e49;
}
.notice.warn {
  background: #fef7e0;
  border-left-color: #fbbc04;
  color: #3c4043;
}

/* Lesson Layout & Code */
.lessonlayout { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(240px,1fr); gap: 24px; align-items: start; }
.lessonlayout .card { margin-bottom: 20px; }
.bodycopy p, .bodycopy li { font-size: 14px; color: #202124; }
.bodycopy li { margin: 8px 0; }
.bodycopy ol, .bodycopy ul { padding-left: 20px; }
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f8f9fa;
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 8px;
  font: 12px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace;
  color: #1f1f1f;
}
label { display: block; font-size: 12px; font-weight: 500; margin: 14px 0 6px; color: var(--ink); }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 2px rgba(26,115,232,0.2);
}
textarea { min-height: 140px; resize: vertical; }

/* Quizzes & Filters */
.quiz fieldset { border: 0; padding: 0; margin: 0 0 20px; }
.quiz legend { font-weight: 500; font-size: 14px; margin-bottom: 8px; color: var(--ink); }
.quiz label {
  display: flex;
  gap: 10px;
  align-items: start;
  font-size: 13px;
  font-weight: 400;
  background: #f8f9fa;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  margin: 6px 0;
  border: 1px solid var(--line);
}
.quiz label:hover { background: #f1f3f4; }
.quiz input { width: auto; margin-top: 3px; }
.result { font-size: 13px; margin-top: 14px; }
.asset pre { max-height: 340px; overflow: auto; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.filters button { border-radius: 20px; font-size: 12px; font-weight: 500; }
.filters button.selected { background: var(--blue); color: #ffffff; border-color: var(--blue); }
.search { max-width: 420px; margin: 16px 0; }
.tablewrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
td, th { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f8f9fa; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700; }
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { font-weight: 500; cursor: pointer; color: var(--blue); }
details p { font-size: 13px; margin-top: 10px; }
.checklist label { display: flex; gap: 10px; font-size: 13px; font-weight: 400; margin: 8px 0; }
.checklist input { width: auto; }
.score { font: 700 48px 'Roboto', sans-serif; color: var(--blue); }
.link { color: var(--blue); text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }
footer {
  padding: 24px 40px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background: var(--paper);
}
dialog { border: 1px solid var(--line); border-radius: 16px; padding: 28px; max-width: 440px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
dialog::backdrop { background: rgba(32,33,36,0.4); }
dialog p { font-size: 13px; color: var(--muted); margin-top: 10px; }
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #323232;
  color: #ffffff;
  padding: 14px 22px;
  border-radius: 4px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}
#toast.show { opacity: 1; }
.skip { position: fixed; top: -100px; background: white; padding: 10px; z-index: 20; }
.skip:focus { top: 10px; }
.certificate { border: 2px solid var(--blue); background: #ffffff; padding: 44px; text-align: center; max-width: 800px; margin: 24px auto; border-radius: 16px; }
.certificate h2 { font-size: 30px; color: var(--blue); }
.certificate .learner { font-size: 26px; font-weight: 700; margin: 24px 0; color: var(--ink); }
.certificate p { font-size: 13px; color: var(--muted); }

/* Video Cards & Tab System */
.tab-group { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 16px 0 14px; }
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 0;
  cursor: pointer;
}
.tab-btn:hover { background: #f1f3f4; color: var(--ink); }
.tab-btn.active { border-bottom-color: var(--blue); color: var(--blue); font-weight: 700; }
.scene-block { background: #f8f9fa; border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.scene-header { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13px; color: var(--blue); margin-bottom: 6px; }
.scene-meta { font-size: 11.5px; color: var(--muted); margin: 4px 0; }
.scene-audio { background: var(--paper); border-left: 3px solid var(--blue); padding: 8px 12px; border-radius: 0 6px 6px 0; font-size: 12.5px; margin-top: 8px; color: var(--ink); }
.vtt-box { background: #202124; color: #e8eaed; padding: 16px; border-radius: 8px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; line-height: 1.6; max-height: 280px; overflow: auto; }
.empty { padding: 30px; background: var(--paper); border: 1px dashed var(--line); border-radius: 12px; text-align: center; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Responsive Media Queries */
@media(min-width:1500px){ main { margin: 0 auto; } }
@media(max-width:1100px){
  aside { width: 220px; padding: 20px 12px; }
  .shell { margin-left: 220px; }
  main { padding: 24px; }
  header, footer { padding: 16px 24px; }
  .grid { grid-template-columns: repeat(2,1fr); }
  .hero-visual .float.c { display: none; }
  .hero-visual { min-height: 240px; }
  .hero h2 { font-size: 24px; }
  .stats { gap: 10px; }
  .stat { padding: 14px; }
  .lessonlayout { grid-template-columns: minmax(0,1fr); }
}
@media(max-width:760px){
  aside { position: relative; width: auto; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin-bottom: 14px; }
  .navlabel, .sidebottom { display: none; }
  nav { display: flex; overflow: auto; gap: 6px; }
  nav a { white-space: nowrap; font-size: 12px; padding: 8px 12px; gap: 6px; }
  .shell { margin: 0; }
  header { height: 56px; padding: 0 16px; }
  main { padding: 20px 16px; }
  h1 { font-size: 26px; }
  .hero { grid-template-columns: 1fr; }
  .hero .hero-copy { padding: 24px; }
  .hero-visual { display: none; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .grid, .grid.two { grid-template-columns: 1fr; }
  .row { align-items: flex-start; }
  .sectionhead { align-items: center; }
  .pathrow { grid-template-columns: 36px 1fr auto; gap: 10px; }
  footer { padding: 16px; flex-direction: column; gap: 6px; }
  .certificate { padding: 24px 16px; }
  .certificate h2 { font-size: 24px; }
  .actions .button { flex-grow: 1; }
}
@media print {
  aside, header, footer, .actions, button, .notice, .eyebrow { display: none !important; }
  .shell { margin: 0; }
  main { padding: 0; }
  .certificate { margin: 20px auto; break-inside: avoid; }
  body { background: white; }
}

/* Lesson journey refinements */
.stage-nav { display:flex; gap:8px; margin:20px 0 24px; padding:4px; overflow-x:auto; background:transparent; }
.stage-nav a { flex:0 0 auto; }
.stage-nav~.card { margin-bottom:18px; }
.stage-nav~.grid { margin-bottom:18px; }
.stage-tab span { display:inline-flex; }
.stage-tab svg { width:20px;height:20px; }
@media(max-width:760px){ .stage-nav { flex-wrap:nowrap; } #submissionForm > div[style*=grid] { grid-template-columns:1fr!important; } }

.caldr-wordmark{font-size:27px!important;letter-spacing:-1px!important;font-weight:700;line-height:1.15}.caldr-wordmark small{font-size:9px!important;letter-spacing:1.5px!important;margin-top:6px}.brandmark{font:700 32px/1 Arial,sans-serif!important}


/* Human presenter + Google Vids watch layout */
.watch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(270px, .8fr);
  gap: 18px;
  align-items: start;
  margin: 0 0 18px;
}
.lesson-film video,
.presenter-card video {
  width: 100%;
  display: block;
  background: #000;
  border-radius: 12px;
}
.lesson-film video { margin: 14px 0; aspect-ratio: 16 / 9; }
.presenter-card { padding: 18px; position: sticky; top: 82px; }
.presenter-card video {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: 8px 0 14px;
}
.presenter-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.presenter-meta strong { font-size: 14px; }
.presenter-card p { margin-bottom: 0; font-size: 12.5px; }
.google-production-note {
  border: 1px solid #c2e7ff;
  background: var(--blue-bg);
  color: #174ea6;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 12.5px;
}
.video-library-lead { margin-top: 24px; }
@media(max-width:900px){
  .watch-grid { grid-template-columns: 1fr; }
  .presenter-card { position: static; }
}
