:root {
  color-scheme: light;
  --ink: #17251f;
  --muted: #5b665f;
  --forest: #214f3d;
  --forest-dark: #16392d;
  --sage: #dfe9df;
  --sage-light: #f1f5ef;
  --clay: #bd6647;
  --clay-light: #f5e7df;
  --gold: #dfb75d;
  --paper: #fbf8f1;
  --white: #ffffff;
  --line: #d8ddd6;
  --shadow: 0 16px 44px rgba(23, 37, 31, 0.09);
  --radius-lg: 24px;
  --radius-md: 15px;
  --content: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Noto Sans", "Noto Sans TC", "PingFang TC", sans-serif;
  font-size: 17px;
  line-height: 1.68;
}

a {
  color: var(--forest);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-180%);
  border-radius: 999px;
  background: var(--white);
  color: var(--forest-dark);
  padding: 0.65rem 1rem;
  font-weight: 750;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 22%, rgba(223, 183, 93, 0.23) 0 8%, transparent 8.5%),
    radial-gradient(circle at 84% 20%, transparent 0 18%, rgba(255, 255, 255, 0.08) 18.5% 19%, transparent 19.5%),
    linear-gradient(128deg, var(--forest-dark), var(--forest) 68%, #37654f);
  color: var(--white);
}

.site-header::after {
  position: absolute;
  right: -5rem;
  bottom: -8rem;
  width: 24rem;
  height: 24rem;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 46% 54% 62% 38%;
  content: "";
  transform: rotate(18deg);
}

.header-shell,
.section-shell,
.nav-shell {
  width: min(calc(100% - 2rem), var(--content));
  margin-inline: auto;
}

.header-shell {
  position: relative;
  z-index: 1;
  padding: 1.25rem 0 5.5rem;
}

.utility-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 4.4rem;
  font-size: 0.88rem;
}

.college-mark {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.language-link {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: var(--white);
  padding: 0.45rem 0.8rem;
  text-decoration: none;
}

.language-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: #cde0d2;
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: Georgia, "Noto Serif TC", "Songti TC", serif;
  line-height: 1.18;
}

h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.25rem);
  font-weight: 650;
  letter-spacing: -0.035em;
}

h1 .course-code {
  display: block;
  margin-bottom: 0.45rem;
  color: #f3d790;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.28em;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.hero-lede {
  max-width: 720px;
  margin: 1.5rem 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-meta li {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.42rem 0.78rem;
  font-size: 0.9rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  color: var(--white);
  padding: 0.6rem 1.05rem;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  border-color: #f3d790;
  background: #f3d790;
  color: var(--forest-dark);
}

.button:hover {
  border-color: var(--white);
  background: var(--white);
  color: var(--forest-dark);
}

.section-nav {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 241, 0.94);
  backdrop-filter: blur(12px);
}

.nav-shell {
  display: flex;
  gap: 1.35rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nav-shell a {
  flex: 0 0 auto;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  padding: 0.9rem 0 0.72rem;
  font-size: 0.9rem;
  font-weight: 780;
  text-decoration: none;
}

.nav-shell a:hover {
  border-color: var(--clay);
  color: var(--ink);
}

main {
  padding-bottom: 5rem;
}

.section-shell {
  padding-top: 4.5rem;
}

.section-kicker {
  margin: 0 0 0.45rem;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h2 {
  max-width: 760px;
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 4vw, 3.15rem);
  letter-spacing: -0.025em;
}

.section-intro {
  max-width: 760px;
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  border: 1px solid #e4c97e;
  border-radius: var(--radius-md);
  background: #fff7df;
  padding: 1rem 1.1rem;
}

.notice-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--forest-dark);
  font-weight: 900;
}

.notice p {
  margin: 0;
}

.facts-grid,
.assessment-grid,
.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.fact,
.assessment-card,
.resource-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  padding: 1.25rem;
  box-shadow: 0 5px 22px rgba(23, 37, 31, 0.04);
}

.fact-label,
.assessment-weight {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--clay);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.fact strong {
  font-size: 1.05rem;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 1.5rem;
  align-items: start;
}

.panel {
  border-radius: var(--radius-lg);
  background: var(--sage-light);
  padding: clamp(1.3rem, 3vw, 2rem);
}

.panel.clay {
  background: var(--clay-light);
}

.panel h3,
.assessment-card h3,
.resource-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.22rem;
}

.clean-list {
  margin: 0;
  padding-left: 1.15rem;
}

.clean-list li + li {
  margin-top: 0.45rem;
}

.schedule-list {
  position: relative;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

.schedule-list::before {
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 8.85rem;
  width: 2px;
  background: var(--line);
  content: "";
}

.schedule-item {
  display: grid;
  grid-template-columns: 7.5rem 2.7rem minmax(0, 1fr);
  gap: 0;
  align-items: start;
  min-height: 8rem;
}

.date-block {
  padding-top: 0.5rem;
  text-align: right;
}

.date-block strong {
  display: block;
  color: var(--forest);
  font-size: 1.05rem;
}

.date-block span {
  color: var(--muted);
  font-size: 0.82rem;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 1rem;
  height: 1rem;
  margin: 0.75rem auto 0;
  border: 4px solid var(--paper);
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 2px var(--clay);
}

.schedule-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  padding: 1rem 1.15rem;
  box-shadow: 0 7px 25px rgba(23, 37, 31, 0.05);
}

.schedule-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.18rem;
}

.schedule-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.status {
  display: inline-block;
  margin-top: 0.7rem;
  border-radius: 999px;
  background: var(--sage);
  color: var(--forest-dark);
  padding: 0.18rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 850;
}

.status.no-class {
  background: #eeeae1;
  color: #625b4e;
}

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

.assessment-weight {
  font-size: 1.25rem;
}

.assessment-card p,
.resource-card p {
  margin: 0;
  color: var(--muted);
}

.assessment-alert {
  margin-top: 1rem;
  border-left: 5px solid var(--clay);
  background: var(--clay-light);
  padding: 0.9rem 1rem;
  font-weight: 700;
}

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

.resource-card a {
  font-weight: 800;
}

.site-footer {
  background: var(--forest-dark);
  color: rgba(255, 255, 255, 0.78);
}

.footer-shell {
  display: flex;
  width: min(calc(100% - 2rem), var(--content));
  margin-inline: auto;
  padding: 2.2rem 0;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.84rem;
}

.footer-shell p {
  margin: 0;
}

.footer-shell a {
  color: var(--white);
}

@media (max-width: 900px) {
  .facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-column {
    grid-template-columns: 1fr;
  }
}

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

  .header-shell {
    padding-bottom: 4rem;
  }

  .utility-nav {
    margin-bottom: 3rem;
  }

  .section-shell {
    padding-top: 3.5rem;
  }

  .assessment-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .schedule-list::before {
    left: 0.48rem;
  }

  .schedule-item {
    grid-template-columns: 1rem minmax(0, 1fr);
    column-gap: 1rem;
    min-height: auto;
    margin-bottom: 1rem;
  }

  .date-block {
    grid-column: 2;
    margin-bottom: 0.35rem;
    padding: 0;
    text-align: left;
  }

  .timeline-dot {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 0.85rem;
    height: 0.85rem;
    margin-top: 0.4rem;
  }

  .schedule-card {
    grid-column: 2;
  }

  .footer-shell {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .facts-grid {
    grid-template-columns: 1fr;
  }

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

@media print {
  .section-nav,
  .hero-actions,
  .language-link,
  .skip-link {
    display: none;
  }

  body {
    background: var(--white);
    font-size: 11pt;
  }

  .site-header {
    background: var(--white);
    color: var(--ink);
  }

  .site-header::after {
    display: none;
  }

  .college-mark,
  .hero-lede {
    color: var(--muted);
  }

  .hero-meta li {
    border-color: var(--line);
    color: var(--ink);
  }

  .section-shell {
    padding-top: 2rem;
  }

  .fact,
  .assessment-card,
  .resource-card,
  .schedule-card {
    break-inside: avoid;
    box-shadow: none;
  }
}

/* Expanded course content and three-language navigation. */
.language-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.language-link[aria-current="page"] {
  background: var(--sage);
  color: var(--forest-dark);
  border-color: var(--sage);
  font-weight: 800;
}
.utility-nav { flex-wrap: wrap; }
.course-description { max-width: 900px; margin-top: 2rem; }
.course-description h3 { font-size: 1.5rem; }
.spaced { margin-top: 1.5rem; }
[id] { scroll-margin-top: 5rem; }
.table-scroll { overflow-x: auto; margin-top: 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
caption { text-align: left; font-weight: 800; padding-bottom: 0.6rem; }
th, td { border: 1px solid var(--line); padding: 0.75rem; text-align: left; vertical-align: top; }
thead { background: var(--sage); }
tbody th { color: var(--forest-dark); }
.table-scroll th:first-child { min-width: 7rem; }
.rubric-details { margin-top: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1rem; }
.rubric-details summary { cursor: pointer; font-weight: 800; color: var(--forest); }
.rubric-details table { min-width: 780px; }
.resource-card p + p { margin-top: 0.65rem; }
.resource-card { overflow-wrap: anywhere; }
summary:focus-visible, .table-scroll:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
html[lang="zh-Hans"] body { font-family: ui-sans-serif, system-ui, "Noto Sans SC", "Microsoft YaHei", sans-serif; }
html[lang="zh-Hans"] h1, html[lang="zh-Hans"] h2, html[lang="zh-Hans"] h3 { font-family: Georgia, "Noto Serif SC", "Songti SC", serif; }
@media (min-width: 721px) { .schedule-item { padding-bottom: 1rem; } }
@media print {
  .language-switch { display: none; }
  .table-scroll { overflow: visible; }
  .rubric-details table { min-width: 0; }
  th, td { padding: 0.35rem; }
}
