:root {
  --duke-blue: #00539B;
  --duke-navy: #012169;
  --text: #2b2b2b;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --correct: #1a7f37;
  --incorrect: #b42318;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--text);
  background: var(--surface);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface);
}

a {
  color: var(--duke-blue);
}

a:hover {
  color: var(--duke-navy);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #8db3e2;
  outline-offset: 3px;
}

.site-header {
  background-color: #00539B;
  color: #ffffff;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1040px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-title {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.site-title:hover {
  color: #ffffff;
}

.site-nav-menu {
  display: block;
}

.nav-toggle {
  display: none;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  color: #ffffff;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.site-nav span[aria-hidden="true"] {
  margin-left: 0.2rem;
  font-size: 0.82em;
}

.site-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.site-main h1,
.site-main h2,
.site-main h3 {
  color: var(--duke-navy);
  line-height: 1.25;
}

.site-main h1 {
  margin: 0 0 1rem;
  font-size: 2.44rem;
}

.site-main h2 {
  margin-top: 2rem;
  font-size: 1.95rem;
}

.site-main h3 {
  margin-top: 1.5rem;
  font-size: 1.56rem;
}

.site-main p,
.site-main ul,
.site-main ol,
.site-main table {
  margin-top: 0;
  margin-bottom: 1rem;
}

.site-main table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  font-size: 0.95rem;
}

.site-main th,
.site-main td {
  padding: 0.75rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.site-main th {
  color: var(--duke-navy);
  background: var(--surface-soft);
}

.course-intro {
  padding: 2.5rem 0 1rem;
}

.course-intro__eyebrow {
  margin-bottom: 0.35rem;
  color: var(--duke-blue);
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.course-intro p:last-child {
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.25rem;
}

.question-card,
.practice-card,
.lecture-card {
  max-width: 720px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.correct,
.is-correct,
[data-result="correct"] {
  color: var(--correct);
}

.incorrect,
.is-incorrect,
[data-result="incorrect"] {
  color: var(--incorrect);
}

.site-footer {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 768px) {
  .site-header__inner {
    align-items: flex-start;
    min-height: 60px;
    padding: 0.5rem 1rem;
  }

  .site-nav-menu {
    position: relative;
  }

  .nav-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    margin-left: auto;
    padding: 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    list-style: none;
  }

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

  .nav-toggle::marker {
    content: "";
  }

  .nav-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
  }

  .site-nav-menu:not([open]) .site-nav {
    display: none;
  }

  .site-nav-menu[open] .site-nav {
    position: absolute;
    top: 48px;
    right: 0;
    z-index: 10;
    display: flex;
    width: min(78vw, 20rem);
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: var(--duke-navy);
    box-shadow: 0 18px 36px rgba(1, 33, 105, 0.22);
  }

  .site-nav a {
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 0.75rem;
  }

  .site-main {
    padding: 2rem 1rem 3rem;
  }

  .site-main h1 {
    font-size: 2rem;
  }

  .site-main h2 {
    font-size: 1.6rem;
  }

  .site-main h3 {
    font-size: 1.28rem;
  }

  .site-main table {
    display: block;
    overflow-x: auto;
  }

  .site-footer {
    padding: 1rem;
  }
}
