:root {
  color-scheme: light;
  --paper: #f5f6f3;
  --surface: #ffffff;
  --ink: #17212b;
  --muted: #5c6873;
  --line: #d8dde1;
  --navy: #173b57;
  --teal: #087f73;
  --teal-soft: #dff2ee;
  --coral: #c64b3c;
  --coral-soft: #fae8e5;
  --amber: #9a6500;
  --amber-soft: #fff0c7;
  --code: #101820;
  --code-ink: #ecf4f6;
  --shadow: 0 12px 32px rgba(23, 33, 43, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

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

a:hover {
  color: var(--coral);
}

button,
input,
textarea {
  font: inherit;
}

button,
.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--navy);
  border-radius: 6px;
  color: #fff;
  background: var(--navy);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

button:focus-visible,
.button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--amber-soft);
  outline-offset: 3px;
}

.button.secondary {
  color: var(--navy);
  background: transparent;
}

.button.secondary:hover {
  color: #fff;
  background: var(--navy);
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  width: min(1120px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand span {
  color: var(--coral);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--teal);
}

.page-shell,
.lesson-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.lesson-shell {
  width: min(860px, calc(100% - 32px));
}

.course-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 48px;
  align-items: end;
  padding: 54px 0 38px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 5vw, 4.35rem);
  font-weight: 700;
}

.lesson-header h1 {
  font-size: clamp(2.1rem, 4vw, 3.55rem);
}

h2 {
  margin-bottom: 18px;
  font-size: 1.55rem;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.lede {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.overview-panel {
  padding-left: 24px;
  border-left: 4px solid var(--teal);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.metric strong,
.metric span {
  display: block;
}

.metric strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  line-height: 1;
}

.metric span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.75rem;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  margin: 10px 0 18px;
  border-radius: 4px;
  background: #e3e7e8;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: var(--teal);
  transition: width 240ms ease;
}

.content-band {
  padding: 42px 0;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.module-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.module {
  min-height: 172px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 2px 0 rgba(23, 33, 43, 0.03);
}

.module.available {
  border-left: 4px solid var(--teal);
  box-shadow: var(--shadow);
}

.module.done {
  border-color: #8cc7bd;
  background: #f4fbf9;
}

.module__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.module__status {
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--amber);
  background: var(--amber-soft);
}

.available .module__status {
  color: var(--teal);
  background: var(--teal-soft);
}

.done .module__status {
  color: #fff;
  background: var(--teal);
}

.module p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.module a {
  font-weight: 800;
}

.role-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.role-map__step {
  min-height: 150px;
  padding: 20px;
  background: var(--surface);
}

.role-map__step strong {
  display: block;
  margin-bottom: 10px;
  color: var(--navy);
}

.role-map__step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.lesson-header {
  padding: 44px 0 30px;
  border-bottom: 1px solid var(--line);
}

.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.88rem;
}

.lesson-meta strong {
  color: var(--ink);
}

.lesson-content {
  padding: 34px 0 70px;
}

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

.lesson-section:first-child {
  padding-top: 0;
}

.lesson-section p:last-child {
  margin-bottom: 0;
}

.objective-list,
.check-list {
  padding-left: 22px;
}

.objective-list li,
.check-list li {
  margin-bottom: 7px;
}

.callout {
  margin: 22px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--coral);
  background: var(--coral-soft);
}

.callout.note {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.callout strong {
  display: block;
  margin-bottom: 4px;
}

.mental-model {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 10px;
  margin: 26px 0;
}

.mental-model__node {
  display: grid;
  min-height: 128px;
  place-content: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--teal);
  border-radius: 8px;
  background: var(--surface);
  text-align: center;
}

.mental-model__node:nth-of-type(2) {
  border-top-color: var(--coral);
}

.mental-model__node:nth-of-type(3) {
  border-top-color: var(--amber);
}

.mental-model__node span {
  color: var(--muted);
  font-size: 0.78rem;
}

.mental-model__arrow {
  align-self: center;
  color: var(--muted);
  font-size: 1.35rem;
}

pre {
  position: relative;
  overflow-x: auto;
  margin: 18px 0;
  padding: 18px 20px;
  border-radius: 8px;
  color: var(--code-ink);
  background: var(--code);
  font: 0.9rem/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

code {
  padding: 0.1em 0.28em;
  border-radius: 3px;
  color: #174f54;
  background: #e6efef;
  font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

pre code {
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
}

.command-map {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  background: var(--surface);
}

.command-map th,
.command-map td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.command-map th {
  color: var(--navy);
  background: #edf1f2;
}

.saved-response {
  width: 100%;
  min-height: 112px;
  padding: 12px;
  border: 1px solid #aeb8bf;
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  resize: vertical;
}

.save-state {
  min-height: 24px;
  margin-top: 6px;
  color: var(--teal);
  font-size: 0.8rem;
}

.quiz {
  display: grid;
  gap: 16px;
}

.quiz-question {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.quiz-question fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.quiz-question legend {
  margin-bottom: 12px;
  font-weight: 800;
}

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.quiz-option:hover {
  border-color: var(--line);
  background: #f7f9f9;
}

.quiz-option input {
  margin-top: 5px;
  accent-color: var(--teal);
}

.quiz-feedback {
  min-height: 25px;
  margin: 10px 0 0;
  font-size: 0.88rem;
  font-weight: 700;
}

.quiz-feedback.correct {
  color: var(--teal);
}

.quiz-feedback.incorrect {
  color: var(--coral);
}

.interview-answer {
  padding: 22px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--amber);
  border-radius: 8px;
  background: var(--surface);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
}

.lesson-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-top: 28px;
}

.source-list {
  padding-left: 20px;
}

.source-list li {
  margin-bottom: 10px;
}

.site-footer {
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

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

.reference-block {
  break-inside: avoid;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.reference-block ul {
  margin-bottom: 0;
  padding-left: 19px;
}

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

.admin-login {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  max-width: 620px;
  margin: 20px 0;
}

.admin-login input {
  width: 100%;
  min-height: 42px;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid #aeb8bf;
  border-radius: 6px;
  background: var(--surface);
}

.admin-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.admin-summary > * {
  padding: 7px 10px;
  border-radius: 5px;
  background: var(--teal-soft);
}

.response-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.3fr) minmax(0, 1fr);
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.response-row span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.response-row p {
  margin: 0;
  white-space: pre-wrap;
}

.mock-question {
  margin: 10px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.mock-question summary {
  color: var(--navy);
  font-weight: 800;
  cursor: pointer;
}

.mock-question[open] summary {
  margin-bottom: 10px;
}

@media (max-width: 760px) {
  .site-header__inner {
    min-height: 58px;
  }

  .site-nav a:not([aria-current="page"]):not(:last-child) {
    display: none;
  }

  .course-overview {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 36px;
  }

  .overview-panel {
    padding-left: 16px;
  }

  .module-list,
  .reference-grid {
    grid-template-columns: 1fr;
  }

  .role-map {
    grid-template-columns: 1fr 1fr;
  }

  .mental-model {
    grid-template-columns: 1fr;
  }

  .mental-model__arrow {
    transform: rotate(90deg);
    justify-self: center;
  }

  .response-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .command-map {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .page-shell,
  .lesson-shell,
  .site-header__inner {
    width: min(100% - 22px, 1120px);
  }

  .site-nav {
    gap: 10px;
  }

  .site-nav a {
    font-size: 0.8rem;
  }

  h1 {
    font-size: 2.3rem;
  }

  .metric-row {
    gap: 6px;
  }

  .role-map {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .admin-login {
    grid-template-columns: 1fr;
  }
}

@media print {
  :root {
    --paper: #fff;
  }

  .site-header,
  .site-footer,
  .lesson-actions,
  .quiz,
  .saved-response,
  .save-state {
    display: none !important;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  .lesson-shell,
  .page-shell {
    width: 100%;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  pre {
    color: #000;
    background: #f1f1f1;
    white-space: pre-wrap;
  }
}
