:root {
  --uw-red: #c5050c;
  --uw-dark-red: #9b0000;
  --uw-light-gray: #e1e5e7;
  --uw-black: #121212;
  --link: #0479a8;
  --bg: #f7f5f2;
  --paper: #ffffff;
  --ink: #171717;
  --muted: #53585c;
  --border: #d8dde0;
  --shadow: 0 16px 40px rgba(18, 18, 18, .12);
  --shadow-soft: 0 8px 24px rgba(18, 18, 18, .07);
  --radius: 8px;
  --wrap: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--link);
  text-decoration-thickness: .08em;
  text-underline-offset: .2em;
}

a:hover {
  text-decoration-thickness: .12em;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(4, 121, 168, .45);
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(18px, 3.2vw, 34px);
}

.narrow {
  max-width: 900px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--uw-black);
  color: #fff;
  padding: .75rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
}

.skip-link:focus {
  left: 1rem;
}

.uw-strip {
  background: var(--uw-black);
  color: #fff;
  font-size: .88rem;
}

.uw-strip .wrap {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  padding-block: .45rem;
}

.uw-strip a {
  color: #fff;
  text-decoration: none;
}

.uw-strip a:hover,
.uw-strip a:focus-visible {
  text-decoration: underline;
  text-underline-offset: .15em;
}

.institution-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .15rem .45rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
  border-top: 7px solid var(--uw-red);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
  color: var(--uw-black);
  text-decoration: none;
}

.brand-course {
  color: var(--uw-red);
  font-weight: 900;
}

.brand-name {
  color: #3d4246;
  font-size: .92rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.site-nav a {
  color: #262b2e;
  text-decoration: none;
  font-weight: 750;
  padding: .58rem .74rem;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--uw-light-gray);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: .55rem .86rem;
  font: inherit;
  font-weight: 850;
  color: var(--uw-black);
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.nav-toggle:hover {
  background: var(--uw-light-gray);
  border-color: var(--uw-red);
  color: var(--uw-dark-red);
}

.hero {
  background: #fff;
  border-bottom: 1px solid #edf0f2;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(480px, 1fr);
  gap: clamp(30px, 4vw, 64px);
  align-items: center;
  padding-block: clamp(44px, 7vw, 84px);
}

.eyebrow,
.section-kicker {
  margin: 0 0 .65rem;
  color: var(--uw-dark-red);
  font-size: .8rem;
  text-transform: uppercase;
  font-weight: 900;
}

.hero h1 {
  margin: .2rem 0 .95rem;
  color: var(--uw-black);
  font-size: 5rem;
  line-height: .98;
}

.lede {
  margin: 0 0 1.45rem;
  color: #363b3f;
  max-width: 66ch;
  font-size: 1.25rem;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  width: fit-content;
  max-width: 100%;
  gap: .55rem;
}

.hero-actions .button {
  min-height: 42px;
  padding: .62rem .82rem;
  font-size: .94rem;
  white-space: nowrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: .72rem 1.05rem;
  border: 2px solid transparent;
  border-radius: 999px;
  color: inherit;
  font-weight: 850;
  line-height: 1.1;
  text-decoration: none;
}

.button:hover {
  text-decoration: none;
}

.button-primary {
  background: var(--uw-red);
  color: #fff;
}

.button-primary:hover {
  background: var(--uw-dark-red);
}

.button-secondary {
  background: #fff;
  color: var(--uw-red);
  border-color: var(--uw-red);
}

.button-secondary:hover {
  background: #fff4f4;
}

.button-muted {
  background: var(--uw-light-gray);
  color: #222;
  border-color: var(--uw-light-gray);
}

.button-muted:hover {
  background: #d3d9dc;
}

.figure-card {
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: translateY(clamp(-32px, -2vw, -16px));
}

.figure-media {
  position: relative;
  background: #fff;
  height: clamp(360px, 34vw, 520px);
}

.figure-media img {
  display: block;
  width: 100%;
  height: auto;
}

.plot-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity .2s ease;
}

.figure-media.is-loaded .plot-canvas {
  opacity: 1;
}

/* Codex hides the native cursor while annotating. Keep a visible fallback
   when its overlay fails. Pause plot input while annotating so its drag
   handlers cannot swallow annotation clicks. Normal plot use is unchanged. */
html:has(style[data-browser-comment-cursor-style="true"]),
html:has(style[data-browser-comment-cursor-style="true"]) :is(body, body *, #codex-browser-sidebar-comments-root, #codex-browser-sidebar-comments-root *) {
  cursor: default !important;
}

html:has(style[data-browser-comment-cursor-style="true"]) .plot-canvas {
  pointer-events: none;
}

.plot-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  color: var(--muted);
  background: #fff;
  font-weight: 700;
  transition: opacity .2s ease, visibility .2s ease;
}

.figure-media.is-loaded .plot-loading {
  visibility: hidden;
  opacity: 0;
}

.plot-loading-dots {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.plot-loading-dots span {
  width: .38rem;
  height: .38rem;
  background: var(--uw-red);
  border-radius: 50%;
  opacity: .25;
  animation: plot-loading-dot 1.1s ease-in-out infinite;
}

.plot-loading-dots span:nth-child(2) {
  animation-delay: .16s;
}

.plot-loading-dots span:nth-child(3) {
  animation-delay: .32s;
}

@keyframes plot-loading-dot {
  0%, 60%, 100% {
    opacity: .25;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-.22rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .plot-canvas,
  .plot-loading {
    transition: none;
  }

  .plot-loading-dots span {
    animation: none;
    opacity: 1;
  }
}

.figure-card figcaption {
  padding: .8rem 1rem 1rem;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--border);
  font-size: .92rem;
}

.section {
  padding-block: clamp(26px, 3.2vw, 40px);
  scroll-margin-top: 96px;
}

.section + .section {
  padding-top: clamp(16px, 2vw, 26px);
}

.section-white {
  background: #fff;
}

.section h2 {
  margin: .1rem 0 1rem;
  color: var(--uw-black);
  font-size: 2.85rem;
  line-height: 1.05;
}

.section p {
  max-width: 76ch;
}

.course-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.audience-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, .52fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.detail-panel,
.textbook-card,
.lab-card,
.topic-card,
.game-card,
.resource-card,
.small-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.detail-panel,
.small-panel {
  padding: 1.25rem;
}

.detail-panel h3,
.small-panel h3 {
  margin: .05rem 0 1rem;
}

.detail-panel dl {
  margin: 0;
}

.detail-panel dl > div {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 1rem;
  padding: .78rem 0;
  border-bottom: 1px solid var(--border);
}

.detail-panel dl > div:first-child {
  padding-top: 0;
}

.detail-panel dl > div:last-child {
  border-bottom: 0;
}

.detail-panel dt {
  color: #292e31;
  font-weight: 900;
}

.detail-panel dd {
  margin: 0;
  color: #3d4246;
}

.detail-panel .button {
  width: 100%;
  margin-top: 1rem;
}

.verify-note,
.note-small {
  color: var(--muted);
  font-size: .92rem;
}

.verify-note {
  margin: 1rem 0 0;
}

.course-details-stack {
  display: grid;
  gap: clamp(1.2rem, 2vw, 1.7rem);
}

.course-archive-note {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

.note-small {
  margin-top: 1rem;
}

.small-panel ul {
  margin: .4rem 0 0;
  padding-left: 1.2rem;
}

.small-panel li {
  margin: .45rem 0;
}

.textbook-section {
  background: var(--bg);
}

.textbook-card .section-kicker {
  color: var(--uw-dark-red);
}

.textbook-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 3vw, 34px);
  align-items: start;
  padding: clamp(26px, 4vw, 44px);
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--ink);
}

.textbook-card h2,
.textbook-card p {
  color: var(--ink);
}

.textbook-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.45rem;
  width: 100%;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.archive-note {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

.check-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin: .52rem 0;
  padding-left: 1.55rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55rem;
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: var(--uw-red);
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  margin-bottom: 1.15rem;
}

.section-note,
.section-intro {
  color: var(--muted);
  font-size: .95rem;
}

.section-note {
  max-width: 440px;
  margin: 0;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

#topics {
  padding-bottom: clamp(10px, 1.5vw, 18px);
}

#topics + .textbook-section {
  padding-top: clamp(10px, 1.7vw, 20px);
}

#topics + .textbook-section .textbook-card {
  padding-top: clamp(16px, 2vw, 24px);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.game-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.game-card:hover {
  border-color: var(--uw-red);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.game-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--uw-light-gray);
}

.game-card-body {
  display: grid;
  align-content: start;
  gap: .35rem;
  padding: 1rem;
}

.game-title {
  color: var(--uw-black);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.18;
}

.game-version {
  color: var(--muted);
  font-size: .72em;
  font-weight: 700;
  white-space: nowrap;
}

.games-license {
  max-width: 76ch;
  margin-top: clamp(3rem, 6vw, 5rem);
  color: var(--muted);
  font-size: .92rem;
}

.games-license p {
  margin: 0;
}

.games-license p + p {
  margin-top: .8rem;
}

.game-skills {
  color: var(--muted);
  font-size: .94rem;
}

.lab-card {
  display: flex;
  flex-direction: column;
  min-height: 178px;
  padding: 1rem;
}

.lab-card .unit {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--uw-red);
  color: #fff;
  font-weight: 900;
}

.lab-card.extension .unit {
  background: var(--uw-black);
}

.lab-card h3 {
  margin: .85rem 0 .55rem;
  font-size: 1.05rem;
  line-height: 1.22;
}

.lab-card p {
  margin: 0 0 auto;
  color: #4a4f52;
  font-size: .92rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1rem;
}

.card-actions a {
  font-weight: 850;
}

.topic-card,
.resource-card {
  padding: 1.2rem;
}

#topics h2 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.topic-card h3,
.resource-card h3 {
  margin: .1rem 0 .45rem;
  font-size: 1.15rem;
}

.topic-card p,
.resource-card p {
  margin: 0 0 .8rem;
  color: #44494d;
}

.topic-card .topic-unit {
  margin: 0 0 .35rem;
  color: var(--uw-dark-red);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.subpage-hero {
  background: #fff;
  padding-block: clamp(42px, 6vw, 72px) clamp(28px, 4vw, 46px);
  border-bottom: 1px solid var(--border);
}

.subpage-hero h1 {
  margin: .1rem 0 .7rem;
  font-size: 4.25rem;
  line-height: 1;
}

.subpage-hero .lede {
  margin-bottom: 0;
}

.subpage-note {
  max-width: 72ch;
  margin: .65rem 0 0;
  color: var(--muted);
  font-size: .95rem;
}

.lab-detail-grid,
.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.lab-detail-card {
  padding: 1.15rem;
}

.lab-detail-card header {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  margin-bottom: .6rem;
}

.lab-detail-card h3 {
  margin: .05rem 0 .25rem;
}

.lab-detail-card p {
  margin: .4rem 0;
  color: #44494d;
}

.lab-detail-card .unit {
  flex: 0 0 auto;
}

.footer {
  background: var(--uw-black);
  color: #fff;
  padding-block: 30px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 2rem;
}

.footer p {
  margin: .2rem 0 0;
  color: #e7e7e7;
}

.footer a {
  color: #fff;
}

.footer time {
  font-weight: 700;
}

@media (max-width: 1080px) {
  .hero-grid,
  .course-grid,
  .textbook-card,
  .audience-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 4rem;
  }

  .figure-card {
    width: 100%;
    max-width: 680px;
    margin-inline: auto;
    transform: none;
  }

  .figure-media {
    height: min(72vw, 540px);
  }

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

}

@media (max-width: 820px) {
  body {
    font-size: 16px;
  }

  .header-inner {
    min-height: 66px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 0 18px 18px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 26px rgba(18, 18, 18, .08);
  }

  .site-nav.is-open {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .4rem;
  }

  .site-nav a {
    background: var(--bg);
    text-align: center;
  }

  .hero-grid {
    padding-block: 34px;
  }

  .hero h1 {
    font-size: 3.1rem;
  }

  .section h2 {
    font-size: 2.25rem;
  }

  .subpage-hero h1 {
    font-size: 3.25rem;
  }

  .hero-actions {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-actions .button,
  .textbook-actions .button {
    width: 100%;
  }

  .figure-card figcaption {
    font-size: .88rem;
  }

  .figure-media {
    height: min(78vw, 480px);
  }

  .detail-panel dl > div {
    grid-template-columns: 1fr;
    gap: .12rem;
  }

  .section-heading-row {
    display: block;
  }

  .section-note {
    margin-top: .2rem;
  }

  .topic-grid,
  .lab-detail-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    display: block;
  }

  .footer p:last-child {
    margin-top: 1rem;
  }
}

@media (max-width: 440px) {
  .wrap {
    padding-inline: 16px;
  }

  .brand-name {
    display: none;
  }

  .hero {
    background: #fff;
  }

  .hero h1 {
    font-size: 2.55rem;
  }

  .section h2 {
    font-size: 1.85rem;
  }

  .subpage-hero h1 {
    font-size: 2.6rem;
  }

  .lede {
    font-size: 1.08rem;
  }

  .site-nav.is-open {
    grid-template-columns: 1fr;
  }

  .lab-card {
    min-height: auto;
  }

  .button {
    width: 100%;
  }

  .figure-media {
    height: 330px;
  }
}
