@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;600;700&family=Roboto+Serif:opsz,wght@8..144,500;8..144,650;8..144,750&display=swap");

:root {
  --paper: #ffffff;
  --ink: #111111;
  --muted: #5e5e5e;
  --faint: #8c8c8c;
  --line: #d9d9d9;
  --line-strong: #111111;
  --soft: #f7f7f7;
  --soft-2: #eeeeee;
  --good: #14683d;
  --good-soft: #edf7f1;
  --bad: #9a2d26;
  --bad-soft: #fbefed;
  --focus: #111111;
  --max: 1120px;
  color-scheme: light;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover,
a:focus {
  color: var(--muted);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.brand-name,
.section-number {
  font-family: "Roboto Serif", Georgia, "Times New Roman", serif;
}

h1 {
  font-size: clamp(38px, 6vw, 76px);
  font-weight: 750;
  letter-spacing: 0;
  line-height: 0.98;
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.08;
  margin-bottom: 10px;
}

h3 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.2;
  margin-bottom: 8px;
}

code {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.92em;
  padding: 1px 4px;
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-nav {
  align-items: center;
  display: flex;
  gap: 22px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--max);
  min-height: 70px;
  padding: 0 24px;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  border: 1px solid var(--ink);
  display: grid;
  flex: 0 0 auto;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  gap: 0;
  height: 34px;
  letter-spacing: 0;
  line-height: 1;
  padding: 5px 0;
  place-items: center;
  width: 34px;
}

.brand-name {
  font-size: 20px;
  font-weight: 650;
}

.nav-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.nav-menu {
  position: relative;
}

.nav-menu summary {
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-menu summary::after {
  content: "v";
  font-size: 10px;
  margin-left: 4px;
}

.nav-menu-panel {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  display: grid;
  gap: 2px;
  min-width: 190px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 30;
}

.nav-menu-panel a {
  border-radius: 3px;
  padding: 7px 8px;
  white-space: nowrap;
}

.nav-menu-panel a:hover,
.nav-menu-panel a:focus {
  background: var(--soft);
}

.nav-links a:hover,
.nav-links a:focus,
.nav-menu summary:hover,
.nav-menu summary:focus {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.main {
  margin: 0 auto;
  max-width: var(--max);
  padding: 42px 24px 76px;
}

.hero {
  border-bottom: 1px solid var(--line-strong);
  display: grid;
  gap: 38px;
  grid-template-columns: minmax(0, 1fr) 330px;
  padding: 34px 0 46px;
}

.hero.compact {
  grid-template-columns: minmax(0, 1fr);
  padding-bottom: 32px;
}

.eyebrow,
.kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.lead {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.65;
  max-width: 760px;
}

.quiet {
  color: var(--muted);
}

.fine-print {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.status-panel {
  border-left: 1px solid var(--line-strong);
  padding-left: 24px;
}

.status-panel h2 {
  font-size: 22px;
}

.status-list,
.plain-list,
.result-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.status-list li,
.plain-list li,
.result-list li {
  list-style: none;
}

.status-list li {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  grid-template-columns: 44px minmax(0, 1fr);
  padding-top: 10px;
}

.status-list span:first-child {
  font-weight: 700;
}

.toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button {
  align-items: center;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 3px;
  color: var(--paper);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  justify-content: center;
  min-height: 40px;
  padding: 8px 13px;
  text-decoration: none;
}

.button:hover,
.button:focus {
  background: var(--paper);
  color: var(--ink);
}

.button.secondary {
  background: var(--paper);
  color: var(--ink);
}

.button.secondary:hover,
.button.secondary:focus {
  background: var(--soft);
  color: var(--ink);
}

.button.text-link {
  background: transparent;
  border-color: transparent;
  color: var(--ink);
  min-height: auto;
  padding-left: 0;
  padding-right: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section {
  border-bottom: 1px solid var(--line);
  padding: 42px 0;
}

.section:last-child {
  border-bottom: 0;
}

.section-head {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  margin-bottom: 24px;
}

.section-number {
  border-top: 1px solid var(--line-strong);
  font-size: 34px;
  font-weight: 650;
  line-height: 1;
  padding-top: 8px;
}

.section-copy p {
  color: var(--muted);
  margin-bottom: 0;
  max-width: 720px;
}

.grid,
.module-grid,
.resource-grid,
.quiz-link-grid,
.download-card-grid {
  display: grid;
  gap: 16px;
}

.grid.two,
.resource-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quiz-link-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.download-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.lesson-stack {
  display: grid;
  gap: 18px;
}

.lesson-block,
.resource-card,
.quiz-card,
.note-card,
.checkpoint-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

.lesson-block {
  display: grid;
  gap: 0;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 0.58fr);
  min-height: 250px;
}

.lesson-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
}

.lesson-copy p {
  color: var(--muted);
  margin-bottom: 16px;
}

.video-quality-note {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  margin: 10px 0 0;
  padding-top: 10px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
}

.video-slot {
  align-items: center;
  background: var(--soft);
  border-left: 1px solid var(--line);
  display: grid;
  min-height: 250px;
  overflow: hidden;
  position: relative;
}

.video-placeholder {
  align-items: center;
  color: var(--ink);
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 26px;
  text-align: center;
}

.video-code {
  border: 1px solid var(--line-strong);
  display: inline-grid;
  font-size: 14px;
  font-weight: 700;
  height: 54px;
  place-items: center;
  width: 92px;
}

.video-slot iframe {
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
  height: auto;
  width: 100%;
}

.resource-card,
.quiz-card,
.note-card,
.checkpoint-card {
  padding: 18px;
}

.resource-card p,
.quiz-card p,
.note-card p,
.checkpoint-card p {
  color: var(--muted);
}

.checkpoint-card {
  background: var(--soft);
  border-color: var(--line-strong);
}

.resource-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.resource-link {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-top: 10px;
  text-decoration: none;
}

.resource-link:hover span:first-child,
.resource-link:focus span:first-child {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.resource-link span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.quiz-checkpoint-link,
.download-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  display: grid;
  gap: 7px;
  min-height: 132px;
  padding: 16px;
  text-decoration: none;
}

button.quiz-checkpoint-link {
  background: var(--paper);
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
}

.quiz-checkpoint-link strong,
.download-card strong {
  font-family: "Roboto Serif", Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.15;
}

.quiz-checkpoint-link span:last-child,
.download-card .file-type {
  color: var(--muted);
}

.download-card .file-type {
  align-self: end;
  border-top: 1px solid var(--line);
  font-size: 12px;
  padding-top: 8px;
  text-transform: uppercase;
}

.quiz-checkpoint-link:hover strong,
.quiz-checkpoint-link:focus strong,
.download-card:hover strong,
.download-card:focus strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.callout {
  border-left: 1px solid var(--line-strong);
  margin: 26px 0 0;
  padding-left: 18px;
}

.is-hidden,
[hidden] {
  display: none !important;
}

.quiz-shell {
  display: grid;
  gap: 20px;
  grid-template-columns: 310px minmax(0, 1fr);
}

.quiz-sidebar,
.quiz-stage {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

.quiz-sidebar {
  align-self: start;
  padding: 18px;
  position: sticky;
  top: 90px;
}

.quiz-sidebar h1 {
  font-size: 32px;
  line-height: 1.05;
}

.quiz-stage {
  min-height: 560px;
  padding: 24px;
}

.mode-control {
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 18px 0;
}

.mode-control button {
  background: var(--paper);
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  min-height: 40px;
}

.mode-control button + button {
  border-left: 1px solid var(--line);
}

.mode-control button.active {
  background: var(--ink);
  color: var(--paper);
}

.stat-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 16px 0;
}

.stat {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.stat strong {
  display: block;
  font-family: "Roboto Serif", Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  line-height: 1.35;
  margin-top: 4px;
}

.progress-track {
  background: var(--soft);
  border: 1px solid var(--line);
  height: 10px;
  overflow: hidden;
}

.progress-bar {
  background: var(--ink);
  height: 100%;
  transition: width 180ms ease;
  width: 0;
}

.question-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.question-stem {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 20px;
}

.answers {
  display: grid;
  gap: 10px;
}

.answer-option {
  align-items: start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 12px;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 58px;
  padding: 12px;
  text-align: left;
  width: 100%;
}

.answer-option:hover,
.answer-option:focus {
  border-color: var(--line-strong);
}

.answer-option[disabled] {
  cursor: default;
  opacity: 0.94;
}

.answer-letter {
  border: 1px solid var(--line);
  display: inline-grid;
  font-weight: 700;
  height: 32px;
  place-items: center;
  width: 32px;
}

.answer-option.correct {
  background: var(--good-soft);
  border-color: var(--good);
}

.answer-option.correct .answer-letter {
  border-color: var(--good);
  color: var(--good);
}

.answer-option.incorrect {
  background: var(--bad-soft);
  border-color: var(--bad);
}

.answer-option.incorrect .answer-letter {
  border-color: var(--bad);
  color: var(--bad);
}

.feedback {
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-top: 16px;
  padding: 14px;
}

.feedback.correct {
  background: var(--good-soft);
  border-color: var(--good);
}

.feedback.incorrect {
  background: var(--bad-soft);
  border-color: var(--bad);
}

.result-list {
  margin: 18px 0;
}

.result-list li {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.result-item {
  display: grid;
  gap: 8px;
}

.result-row {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.result-review-button {
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 3px;
  padding: 0;
  text-align: left;
}

.result-review-button span:first-child {
  font-weight: 700;
}

.result-review-button span:last-child {
  color: var(--muted);
  font-size: 13px;
}

.result-review-button:hover span:first-child,
.result-review-button:focus span:first-child {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.result-status {
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 7px;
}

.result-status.correct {
  border-color: var(--good);
  color: var(--good);
}

.result-status.incorrect {
  border-color: var(--bad);
  color: var(--bad);
}

.review-video-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-video-links span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.review-video-links a {
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 7px;
  text-decoration: none;
}

.review-video-links a:hover,
.review-video-links a:focus {
  border-color: var(--line-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.review-modal {
  inset: 0;
  padding: 24px;
  position: fixed;
  z-index: 50;
}

.review-backdrop {
  background: rgba(255, 255, 255, 0.78);
  inset: 0;
  position: absolute;
}

.review-window {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  margin: 24px auto;
  max-height: calc(100vh - 96px);
  max-width: 820px;
  overflow: auto;
  padding: 22px;
  position: relative;
}

.review-close {
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 3px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 9px;
  position: absolute;
  right: 16px;
  top: 16px;
}

.review-close:hover,
.review-close:focus {
  background: var(--ink);
  color: var(--paper);
}

.review-summary {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  margin: 14px 0;
  padding-top: 12px;
}

.review-summary span {
  color: var(--muted);
}

.review-answer {
  cursor: default;
}

.answer-note {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
  text-transform: uppercase;
}

.empty-state {
  align-items: center;
  display: grid;
  min-height: 410px;
  place-items: center;
  text-align: center;
}

.empty-state > div {
  max-width: 560px;
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  padding: 28px 24px;
}

.footer-inner {
  display: grid;
  gap: 14px;
  grid-template-columns: 180px minmax(0, 1fr);
  margin: 0 auto;
  max-width: var(--max);
}

.footer-credit {
  color: var(--ink);
  font-weight: 600;
}

.footer-note {
  max-width: 820px;
}

@media (max-width: 920px) {
  .hero,
  .lesson-block,
  .quiz-shell,
  .grid.two,
  .grid.three,
  .resource-grid,
  .quiz-link-grid {
    grid-template-columns: 1fr;
  }

  .status-panel,
  .video-slot {
    border-left: 0;
  }

  .status-panel {
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 22px;
  }

  .section-head {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .section-head .button {
    grid-column: 2;
    justify-self: start;
  }

  .quiz-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 154px;
  }

  body {
    font-size: 14px;
  }

  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 14px;
    padding-top: 14px;
  }

  .nav-links {
    gap: 10px 14px;
    justify-content: flex-start;
  }

  .nav-menu-panel {
    left: 0;
    right: auto;
  }

  .main {
    padding: 28px 16px 56px;
  }

  .hero {
    padding-top: 22px;
  }

  .lead {
    font-size: 16px;
  }

  .section {
    padding: 32px 0;
  }

  .section-head {
    gap: 14px;
    grid-template-columns: 1fr;
  }

  .section-head .button {
    grid-column: auto;
  }

  .lesson-copy,
  .resource-card,
  .quiz-card,
  .note-card,
  .checkpoint-card,
  .quiz-sidebar,
  .quiz-stage {
    padding: 16px;
  }

  .video-slot {
    min-height: 210px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}
