* { box-sizing: border-box }
:root {
  color-scheme: light;
  --paper: #f7f6f1;
  --sheet: #fefdf9;
  --ink: #1b3029;
  --faint: #535f55;
  --line: #c9cfc2;
  --forest: #24513e;
  --brass: #d8bb83;
  --serif: "Songti SC","STSong","Noto Serif CJK SC","Source Han Serif SC",serif;
  --sans: "PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans CJK SC",system-ui,sans-serif;
  font-family: var(--sans);
  line-height: 1.55;
  background: var(--paper);
  color: var(--ink);
}
body { margin: 0; min-height: 100vh }
h1,h2,h3,p,ul { margin: 0 }
h1,h2,h3 { font-family: var(--serif); font-weight: 700 }
a { color: inherit; text-underline-offset: .22em }
:where(a,button,summary,input,select,[tabindex]):focus-visible {
  outline: 3px solid #995b18;
  outline-offset: 3px;
}
[hidden] { display: none !important }
.frame { width: min(1200px,calc(100% - clamp(32px,8vw,144px))); margin-inline: auto }
.skip {
  position: fixed; z-index: 3; top: .4rem; left: 1rem;
  transform: translateY(-160%); padding: .65rem 1rem; background: white; color: var(--ink);
}
.skip:focus { transform: none }
.masthead { border-bottom: 1px solid var(--line) }
.masthead-inner {
  min-height: 64px; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: .25rem 1rem;
}
.wordmark,.sections a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none }
.wordmark { gap: .62rem; font: 700 clamp(1.2rem,2vw,1.45rem)/1.2 var(--serif); white-space: nowrap }
.book-mark {
  display: inline-flex; align-items: flex-end; gap: 3px; justify-content: center;
  position: relative; width: 32px; height: 32px; border-radius: 6px; padding: 7px 6px 9px; background: #254537;
}
.book-mark i { height: 12px; width: 3px; background: #fbf4dd; border-radius: 1px }
.book-mark i:nth-child(2) { height: 16px }
.book-mark i:nth-child(3) { height: 13px; transform: rotate(-15deg); margin-left: 1px }
.book-mark::after { content: ""; position: absolute; height: 1.5px; bottom: 6px; left: 6px; right: 6px; background: #e1c38c }
.sections { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(.5rem,2.7vw,2.3rem) }
.sections a { min-width: 44px; justify-content: center; color: var(--faint); font-size: .94rem }
.sections a[aria-current] { color: var(--forest); font-weight: 700 }
.sections a:hover,.sections a:focus-visible { color: var(--ink); text-decoration: underline }
.cover {
  isolation: isolate; position: relative; overflow: hidden; display: grid; align-items: center;
  min-height: clamp(235px,22vw,304px); margin-top: clamp(14px,1.6vw,24px);
  border-radius: 8px; background: #16291e; color: #fffcf2;
}
.room,.course-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
.room { z-index: -2; object-position: 50% 57% }
.cover::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg,#0d1d1488,#0e1e1440 35%,transparent 65%);
}
.cover-ink { margin: clamp(1.65rem,3.4vw,3.2rem); max-width: 39rem }
.cover-ink::before { content: ""; display: block; width: 34px; height: 2px; margin-bottom: .8rem; background: var(--brass) }
.cover h1 { font-size: clamp(2.8rem,5.2vw,4.65rem); line-height: 1.13; letter-spacing: .012em }
.availability { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; color: #eee8d4; margin-top: .55rem; font-variant-numeric: tabular-nums }
.availability span + span { border-left: 1px solid #bdba9c; padding-left: .8rem; line-height: 1.15 }
.choose {
  display: inline-flex; gap: .62rem; min-height: 44px; align-items: center; justify-content: center;
  margin-top: 1.1rem; border-radius: 4px; padding: .42rem 1.05rem;
  background: #f8f2de; color: #193327; text-decoration: none; font-weight: 650;
}
.more-shortcuts summary::after,.review-record summary::after {
  content: ""; flex: none; width: .38em; height: .38em;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-.1em) rotate(45deg);
}
.choose:hover,.choose:focus-visible { background: white }
.shelf,.upcoming,.course-window { scroll-margin-block-start: 1rem }
.shelf { margin-top: clamp(1.35rem,2.4vw,2.2rem) }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem .8rem; margin-bottom: .65rem }
.section-heading h2 { font-size: clamp(1.55rem,2.8vw,2.1rem); line-height: 1.25 }
.section-heading p { font-size: .9rem; color: var(--faint) }
.course-index {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); column-gap: 1rem;
  margin-bottom: clamp(.9rem,1.7vw,1.4rem); padding: .15rem 0; border-block: 1px solid var(--line);
}
.course-index a {
  display: flex; justify-content: space-between; align-items: center; gap: .45rem; min-height: 44px;
  padding: .35rem .6rem; color: var(--forest); font-weight: 600; text-decoration: none;
}
.course-index a:hover,.course-index a:focus-visible { background: #e8ede3; border-radius: 3px }
.open-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(14px,2vw,24px) }
.course-window {
  display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--line); border-radius: 6px; background: var(--sheet);
}
.open-grid:has(details[open]) { align-items: start }
.course-window:target,.resource:target,.review-record:target { outline: 2px solid #8c713e; outline-offset: 3px }
.course-cover {
  position: relative; isolation: isolate; display: flex; align-items: end; overflow: hidden;
  min-height: clamp(154px,13vw,181px); border-radius: 5px 5px 0 0;
  background: #2c483c; color: #fffcf2; text-decoration: none;
}
#course-political-economy .course-cover { background: #644636 }
#course-money-and-banking .course-cover { background: #314d57 }
#course-marxist-principles .course-cover { background: #405745 }
.course-preview .course-cover { background: #315e73 }
.course-preview { border-style: dashed }
.course-cover::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg,#0a150fe0,rgba(10,21,15,.28) 58%,transparent 92%);
}
.course-cover:not(:has(img))::after {
  inset: .65rem; border-block-start: 1px solid #e6d8b485;
  border-inline-start: 2px solid #e6d8b485; background: none;
}
.course-cover img { z-index: -2; object-position: 50% 55% }
#course-probability .course-cover img { object-position: 60% 55% }
.cover-caption {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  width: 100%; gap: .55rem; padding: clamp(1rem,1.5vw,1.4rem);
}
.subject { font-size: .93rem; line-height: 1.4; margin-bottom: .18rem; color: #fff9e1; text-shadow: 0 1px 3px #17291e }
.cover-caption h3 { font-size: clamp(1.9rem,2.6vw,2.45rem); line-height: 1.12; letter-spacing: .025em }
.enter {
  align-self: end; flex: none; display: inline-flex; gap: .28rem; align-items: center;
  padding: .32rem .62rem; border: 1px solid #f8f4df96; border-radius: 4px;
  background: #f6f0df; color: #20372a; font-size: .88rem; font-weight: 650; white-space: nowrap;
}
.course-cover:hover .enter,.course-cover:focus-visible .enter { background: white; color: #11291d }
.card-body,.card-tools { margin-inline: clamp(.85rem,1.45vw,1.3rem) }
.card-body { flex: 1; padding-block: .7rem .65rem }
.card-body:empty { padding: 0 }
.facts { display: flex; flex-wrap: wrap; align-items: baseline; gap: .12rem .55rem; color: var(--faint); font-size: .92rem }
.facts span { overflow-wrap: anywhere }
.facts span + span::before { content: "·"; margin-inline-end: .45rem }
.reviewed-scope { font-size: .98rem; line-height: 1.55; color: var(--ink); font-weight: 650; margin-bottom: .35rem }
.card-tools { position: relative; min-height: 46px; border-top: 1px solid #d5dcce; padding-bottom: .12rem }
.materials-link,.more-shortcuts summary {
  display: flex; align-items: center; gap: .45rem; min-height: 44px;
  color: var(--forest); font-size: .92rem; font-weight: 600;
}
.materials-link { position: absolute; inset-inline-start: 0; top: 0; text-decoration-color: #92a796 }
.more-shortcuts summary { width: fit-content; max-width: calc(100% - 5rem); margin-inline-start: auto; cursor: pointer }
.more-shortcuts summary::-webkit-details-marker,.review-record summary::-webkit-details-marker { display: none }
.more-shortcuts summary span { font-size: .83rem; font-variant-numeric: tabular-nums; color: var(--faint) }
.more-shortcuts[open] summary::after,.review-record details[open] summary::after { transform: translateY(.1em) rotate(225deg) }
.more-shortcuts nav { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,9rem),1fr)); gap: 0 .8rem; padding-bottom: .3rem }
.more-shortcuts nav a {
  display: flex; align-items: center; min-height: 44px; padding-block: .4rem; border-top: 1px solid #e2e6dc;
  color: var(--forest); font-size: .92rem; line-height: 1.45; text-decoration-color: #9aaf9f;
}
.upcoming { margin-block: 2.4rem 1rem }
.planned-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,11rem),1fr)); list-style: none; padding: 0; border-block: 1px solid var(--line) }
.planned-grid li { display: flex; align-items: center; min-width: 0; gap: .65rem; padding: 1rem .65rem; font: 650 1.1rem/1.45 var(--serif) }
.spine { width: 7px; height: 25px; flex: none; background: #6d816e; border-radius: 1px }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem 1rem; padding: 1.3rem 0 2rem; color: var(--faint); font-size: .9rem }
.back-top, .credits summary { display: flex; align-items: center; min-height: 44px; width: fit-content }
.credits summary { cursor: pointer; text-decoration: underline }
.credits p { max-width: 52rem; margin: .2rem 0 0 }
@media (min-width: 1050px) {
  .course-index { grid-template-columns: repeat(6,minmax(0,1fr)); column-gap: .65rem }
  .open-grid:has(>.course-window:nth-child(3)) { grid-template-columns: repeat(3,minmax(0,1fr)) }
}
@media (max-width: 680px) {
  .frame { width: calc(100% - 32px) }
  .masthead-inner { min-height: 55px; gap: .15rem .5rem }
  .wordmark { gap: .38rem; font-size: 1.13rem }
  .book-mark { width: 27px; height: 28px; border-radius: 5px; padding: 5px 4px 8px }
  .sections { gap: .28rem }
  .sections a { font-size: .88rem; padding-inline: .12rem }
  .cover { min-height: 201px; margin-top: 12px }
  .room { object-position: 73% 55% }
  .cover::after { background: linear-gradient(80deg,#0a1816da,#0e1c1465 53%,transparent) }
  .cover-ink { margin: 1.3rem }
  .cover-ink::before { width: 27px; margin-bottom: .55rem }
  .cover h1 { font-size: clamp(2.5rem,10vw,3.1rem) }
  .availability { margin-top: .42rem; font-size: .95rem }
  .choose { margin-top: .75rem }
  .course-index { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 .55rem }
  .course-index a { font-size: .92rem; padding-inline: .2rem }
  .open-grid { grid-template-columns: minmax(0,1fr); gap: 1rem }
  .course-cover { min-height: 116px; aspect-ratio: 3 }
  .cover-caption { padding: .85rem .95rem }
  .cover-caption h3 { font-size: 1.95rem }
  .planned-grid { grid-template-columns: repeat(2,minmax(0,1fr)) }
}
@media (max-width: 360px) {
  .frame { width: calc(100% - 24px) }
  .cover { min-height: 179px }
  .cover-ink { margin: 1.05rem }
  .course-cover { min-height: 105px }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .course-cover img { transition: transform 220ms ease-out }
  .course-cover:hover img { transform: scale(1.018) }
}
@media (prefers-reduced-motion: no-preference) {
  .choose,.enter { transition: background-color 140ms ease-out }
  .more-shortcuts summary::after,.review-record summary::after { transition: transform 140ms ease-out }
}
@media (forced-colors: active) {
  .cover,.course-cover,.choose,.enter { border: 1px solid CanvasText }
  .cover-ink,.cover-caption { background: Canvas; color: CanvasText }
  .room,.course-cover img { opacity: .28 }
}
@media print {
  .masthead,.choose,.course-index,footer { display: none }
  .frame { width: 100% }
  .cover { min-height: 0; background: white; color: #111 }
  .room,.cover::after { display: none }
  .cover-ink { margin: 1rem 0 }
  .availability { color: #333 }
}
