:root {
  color-scheme: light;
  --ink: #172c29;
  --paper: #f5f3e9;
  --white: #fffef8;
  --muted: #62695e;
  --yellow: #f4c84a;
  --line: #d8d9cd;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 0.22em;
}
button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
}
button,
summary {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button,
a,
summary {
  touch-action: manipulation;
}
:focus-visible {
  outline: 3px solid #ac591e;
  outline-offset: 5px;
}
::selection {
  background: var(--yellow);
  color: var(--ink);
}
img {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: break-word;
}
h1,
h2,
h3 {
  line-height: 1.12;
}
.container {
  width: min(100% - 4rem, 1260px);
  margin-inline: auto;
}
.mono,
.eyebrow {
  font-family: 'Courier New', monospace;
}
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--yellow);
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: none;
}
.parent-bar {
  background: var(--ink);
  color: #eeeedd;
  font-size: 0.8125rem;
}
.parent-bar .container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem;
}
.parent-bar a {
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.07em;
}
.site-header {
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 97px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}
.brand-mark {
  border: 2px solid var(--ink);
  padding: 0.25rem 0.45rem;
  background: var(--yellow);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.09em;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-4deg);
}
.brand-name {
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  font-weight: 900;
  line-height: 1;
}
.brand-name small {
  display: block;
  margin-top: 0.5rem;
  font:
    0.75rem 'Courier New',
    monospace;
  letter-spacing: 0.1em;
}
.top-nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  font-size: 0.875rem;
  font-weight: 650;
}
.top-nav > a {
  text-decoration: none;
}
.nav-dropdown {
  position: relative;
}
.nav-dropdown > summary {
  padding: 0.6rem 0;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
.nav-dropdown > summary::after {
  content: '⌄';
  margin-left: 0.6rem;
}
.dropdown-list {
  position: absolute;
  top: 100%;
  right: 0;
  width: 290px;
  padding: 0.5rem;
  background: var(--white);
  border: 1px solid var(--ink);
  box-shadow: 5px 5px 0 #172c2926;
  z-index: 20;
}
.dropdown-list a {
  display: block;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
}
.dropdown-list a:hover {
  background: var(--yellow);
}
.text-button {
  padding: 0.6rem 0;
  border: 0;
  background: none;
}
.club-button {
  border: 1px solid var(--ink);
  padding: 0.55rem 0.9rem;
  background: transparent;
}
.hero {
  background: var(--ink);
  color: var(--paper);
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  min-height: 310px;
}
.hero-copy {
  padding: 2.3rem 0 2.5rem 2.6rem;
  position: relative;
  z-index: 1;
}
.hero .eyebrow {
  color: var(--yellow);
  margin-bottom: 1rem;
}
.hero h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 3.7vw, 3.4rem);
  letter-spacing: -0.055em;
  margin-bottom: 1.1rem;
}
.hero h1 em {
  color: var(--yellow);
  font-weight: 400;
}
.hero-copy > p:last-child {
  max-width: 31rem;
  font-size: 1rem;
  color: #d5ddd3;
  margin-bottom: 0;
}
.hero-art {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 290px;
}
.hero-note {
  color: var(--yellow);
  border: 1px solid #a4b8a05c;
  padding: 2rem;
  transform: rotate(3deg);
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 2rem;
  line-height: 1.2;
}
.hero-note small {
  display: block;
  margin-top: 1rem;
  font:
    0.8rem 'Courier New',
    monospace;
  text-transform: uppercase;
}
.class-strip {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.25rem;
  background: var(--yellow);
  font-size: 0.8125rem;
  font-family: 'Courier New', monospace;
  font-weight: 700;
}
.library-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 2rem;
  margin-top: 2.7rem;
  margin-bottom: 3.5rem;
}
.sidebar {
  border-right: 1px solid var(--line);
  padding-right: 1.5rem;
}
.sidebar .eyebrow {
  color: var(--muted);
  margin: 0.4rem 0 1.1rem;
}
.sidebar a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.7rem;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.4;
  text-decoration: none;
}
.sidebar a[aria-current='page'] {
  background: var(--ink);
  color: var(--white);
}
.sidebar a:not([aria-current]):hover {
  background: #e7e8db;
}
.sidebar .nav-code {
  font:
    0.75rem 'Courier New',
    monospace;
  opacity: 0.7;
}
.side-note {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 1.3rem;
}
.side-note p {
  font:
    italic 1.15rem/1.4 Georgia,
    serif;
}
.side-note small {
  font-size: 0.8125rem;
  color: var(--muted);
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.section-heading h2 {
  font-size: 1.8rem;
  letter-spacing: -0.04em;
  margin-bottom: 0.4rem;
}
.section-heading p {
  color: var(--muted);
  font-size: 0.9375rem;
  margin: 0;
}
.section-heading > .mono {
  font-size: 0.8125rem;
  white-space: nowrap;
  padding-bottom: 0.25rem;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.game-card {
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 4px 5px 0 #172c2910;
}
.game-cover {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 148px;
  padding: 1rem 1.2rem;
  text-decoration: none;
  background: var(--cover);
  color: #fff9e7;
  position: relative;
  overflow: hidden;
}
.game-cover::after {
  content: '';
  position: absolute;
  width: 13rem;
  height: 13rem;
  border: 1px solid #fff9e72d;
  border-radius: 50%;
  right: -5rem;
  top: -3rem;
  box-shadow:
    0 0 0 22px #fff9e709,
    0 0 0 23px #fff9e71a,
    0 0 0 48px #fff9e707,
    0 0 0 49px #fff9e714;
}
.cover-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font:
    0.75rem 'Courier New',
    monospace;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}
.cover-code {
  font-family: Georgia, serif;
  font-size: 2.7rem;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.1;
  margin-top: 1rem;
  position: relative;
  z-index: 1;
}
.olive {
  --cover: #485341;
}
.wine {
  --cover: #703f49;
}
.space {
  --cover: #313e59;
}
.blue {
  --cover: #365c6c;
}
.rust {
  --cover: #8b5135;
}
.purple {
  --cover: #635273;
}
.teal {
  --cover: #386c66;
}
.ochre {
  --cover: #7c682c;
}
.red {
  --cover: #82483f;
}
.card-body {
  padding: 1.15rem 1.15rem 1rem;
  flex: 1;
}
.card-body h3 {
  font-size: 1.13rem;
  letter-spacing: -0.025em;
  margin-bottom: 0.6rem;
}
.card-body h3 a {
  text-decoration: none;
}
.card-body p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}
.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
}
.card-links a {
  text-decoration: none;
  border-bottom: 1px solid #9fae98;
}
.card-links a:last-child {
  color: #68675c;
  border-bottom-style: dashed;
}
.learning-note {
  margin-top: 1.5rem;
  border: 1px dashed #a8ad9c;
  padding: 1rem 1.25rem;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
}
.learning-note p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.learning-note strong {
  color: var(--ink);
}
.learning-note a {
  flex-shrink: 0;
  font-size: 0.875rem;
}
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 1.5rem;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  font-size: 0.875rem;
}
.footer-top p {
  margin: 0;
  font-family: Georgia, serif;
  font-style: italic;
}
.site-footer small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 0.8rem;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}
.game-heading {
  background: var(--cover);
  color: #fff9e7;
  padding: 2rem 2.3rem;
  margin-top: 1.3rem;
  border-bottom: 5px solid var(--yellow);
}
.game-heading h1 {
  font-family: Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.04em;
  margin-bottom: 0.9rem;
}
.game-heading .eyebrow {
  margin-bottom: 0.7rem;
  color: #fff5d0;
}
.game-heading > p:last-child {
  max-width: 42rem;
  margin-bottom: 0;
}
.course-main {
  min-width: 0;
}
.course-nav {
  display: flex;
  gap: 0.5rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
}
.course-nav a {
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 0.6rem 0.8rem;
  font-size: 0.875rem;
  font-weight: 650;
  background: var(--white);
}
.course-nav a:hover {
  background: var(--yellow);
  border-color: var(--ink);
}
.course-section {
  scroll-margin-top: 1.5rem;
  padding-top: 2rem;
}
.course-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}
.course-title h2 {
  font-size: 1.55rem;
  margin: 0;
  letter-spacing: -0.03em;
}
.level-number {
  font:
    0.875rem 'Courier New',
    monospace;
  background: var(--yellow);
  padding: 0.2rem 0.45rem;
}
.course-section > p {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}
.lesson {
  background: var(--white);
  border: 1px solid var(--line);
  margin-bottom: 0.6rem;
}
.lesson > summary {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  list-style: none;
  padding: 1rem 1.1rem;
  font-size: 1rem;
  font-weight: 650;
}
.lesson > summary::after {
  content: '+';
  margin-left: auto;
  font:
    1.3rem 'Courier New',
    monospace;
}
.lesson[open] > summary::after {
  content: '−';
}
.lesson[open] > summary {
  border-bottom: 1px solid var(--line);
}
.lesson-body {
  padding: 1.1rem;
}
.lesson-body > p {
  margin-bottom: 1rem;
  max-width: 65ch;
}
.lesson-body > p:last-child {
  margin-bottom: 0;
}
.try-this {
  padding: 0.8rem 1rem;
  background: #f0f1e5;
  border-left: 3px solid #a8b687;
  font-size: 0.9375rem;
}
.try-this strong {
  display: block;
  font:
    700 0.75rem 'Courier New',
    monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.note-button {
  background: none;
  border: 0;
  border-bottom: 1px dashed var(--ink);
  padding: 0;
  font-size: 0.875rem;
}
.status-label {
  font:
    0.75rem 'Courier New',
    monospace;
  border: 1px solid #c5bb94;
  color: #635a3a;
  padding: 0.2rem 0.5rem;
  margin-left: auto;
}
.advanced-section {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}
.advanced-section .lesson {
  background: #eeede2;
  border-style: dashed;
}
.advanced-section .lesson > summary {
  font-weight: 500;
}
.course-sources {
  margin-top: 2rem;
  padding: 1.2rem;
  border-top: 2px solid var(--ink);
  background: #eeede2;
}
.course-sources h2 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.course-sources p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.course-sources a {
  font-size: 0.875rem;
}
.course-sources small {
  display: block;
  font-size: 0.75rem;
  margin-top: 0.8rem;
  color: var(--muted);
}
dialog {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 0;
  width: min(560px, calc(100% - 2rem));
  max-height: 85dvh;
  box-shadow: 10px 10px 0 #0003;
}
dialog::backdrop {
  background: #122522b3;
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--yellow);
  padding: 0.8rem 1.4rem;
  border-bottom: 1px solid var(--ink);
}
.dialog-header p {
  margin: 0;
}
.dialog-close {
  border: 0;
  background: transparent;
  padding: 0.4rem;
  font-size: 0.875rem;
}
.dialog-body {
  padding: 1.5rem;
}
.dialog-body h2 {
  font:
    bold 2rem/1.1 Georgia,
    serif;
  letter-spacing: -0.035em;
}
.dialog-body p:last-child {
  margin: 0;
}
.dialog-body dt {
  font-weight: 700;
  margin-top: 1rem;
}
.dialog-body dd {
  margin-left: 0;
  color: var(--muted);
}
@media (min-width: 1100px) {
  .sidebar-inner {
    position: sticky;
    top: 1.5rem;
  }
}
@media (max-width: 1050px) {
  .library-layout {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 1.3rem;
  }
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-copy {
    padding-left: 2rem;
  }
  .hero-art {
    padding: 1rem;
  }
  .sidebar {
    padding-right: 1rem;
  }
}
@media (max-width: 740px) {
  .container {
    width: calc(100% - 2rem);
  }
  .parent-bar .container > span {
    display: none;
  }
  .header-inner {
    gap: 1rem;
    min-height: 88px;
  }
  .brand-name {
    font-size: 1.05rem;
  }
  .brand-name small {
    font-size: 0.75rem;
    letter-spacing: 0;
  }
  .top-nav {
    gap: 1rem;
  }
  .top-nav > a,
  .club-button {
    display: none;
  }
  .hero {
    margin-top: 1rem;
    grid-template-columns: 1fr;
  }
  .hero-copy {
    padding: 1.8rem 1.5rem;
  }
  .hero h1 {
    font-size: clamp(2rem, 6.8vw, 3rem);
  }
  .hero-art {
    padding: 0 1.5rem 1rem;
  }
  .hero-art img {
    max-height: 205px;
  }
  .hero-note {
    font-size: 1.3rem;
    padding: 1rem;
    transform: none;
  }
  .class-strip {
    flex-wrap: wrap;
    gap: 0.15rem 1rem;
    font-size: 0.75rem;
  }
  .library-layout {
    display: block;
    margin-top: 1.8rem;
  }
  .sidebar {
    display: none;
  }
  .section-heading > .mono {
    display: none;
  }
  .game-cover {
    min-height: 125px;
  }
  .game-heading {
    padding: 1.7rem 1.4rem;
  }
  .learning-note {
    align-items: start;
    flex-direction: column;
    gap: 0.6rem;
  }
  .course-nav {
    flex-wrap: wrap;
  }
  .footer-top {
    flex-wrap: wrap;
  }
  .course-title {
    flex-wrap: wrap;
  }
  .status-label {
    margin-left: 0;
  }
}
@media (max-width: 420px) {
  .game-grid {
    grid-template-columns: 1fr;
  }
  .game-cover {
    min-height: 145px;
  }
  .brand-mark {
    display: none;
  }
  .top-nav {
    gap: 0.6rem;
  }
  .course-nav a {
    padding: 0.5rem 0.65rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
