@import url('../site-theme.css');

* { margin: 0; padding: 0; }

.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 1000;
  padding: 10px 14px; border-radius: 8px; color: #fff; background: var(--site-dark);
}
.skip-link:focus { top: 12px; }

.site-bar {
  min-height: 54px;
  padding: 0 max(24px, calc((100vw - 1080px) / 2));
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.9);
  border-bottom: 1px solid rgba(17,24,39,.08);
  backdrop-filter: blur(18px);
}
.site-bar a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.site-bar > a:first-child {
  color: var(--site-ink); font-family: 'Playfair Display', serif;
  font-size: 1rem; font-weight: 700;
}
.site-bar .back-link { color: #667085; font-size: .88rem; font-weight: 600; }
.site-bar a:hover { color: var(--site-blue); }

.page-header {
  position: relative;
  padding: clamp(58px, 8vw, 96px) max(42px, calc((100vw - var(--site-content)) / 2)) 46px;
  background: var(--site-surface);
}
.page-header::after {
  content: ''; position: absolute; bottom: 0;
  left: max(42px, calc((100vw - var(--site-content)) / 2));
  width: 54px; height: 3px; border-radius: 3px; background: var(--site-blue);
}
.page-header h1 {
  max-width: 900px; margin: 0;
  color: var(--site-ink); font-family: 'Playfair Display', serif;
  font-size: clamp(2.25rem, 5vw, 4.35rem); font-weight: 700;
  line-height: 1.06; letter-spacing: -.035em;
}

.page-body { max-width: 920px; margin: 0 auto; padding: 54px 42px 88px; }
.course-section, .legacy-course h1 { scroll-margin-top: 76px; }
.course-section { margin-bottom: 48px; }
.course-section h2, .legacy-course h1 {
  margin: 0 0 18px; padding: 0 0 10px;
  border-bottom: 1px solid var(--site-rule);
  color: var(--site-ink); font-family: 'Playfair Display', serif;
  font-size: 1.35rem; font-weight: 700; line-height: 1.3;
}
.course-section p, .legacy-course { color: var(--site-ink-soft); font-size: .98rem; }
.course-section p { margin: 0 0 13px; }
.course-section ul, .course-section ol, .legacy-course ul, .legacy-course ol {
  margin: 0 0 16px; padding-left: 25px;
}
.course-section li, .legacy-course li { margin-bottom: 7px; color: var(--site-ink-soft); }
.course-section ul ul, .course-section ol ol, .legacy-course ul ul { margin-top: 7px; }
.course-section strong, .legacy-course b { color: var(--site-ink); font-weight: 600; }
.course-section a, .legacy-course a { color: var(--site-blue); font-weight: 600; }

.info-grid {
  display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 12px 22px;
  padding: 26px 28px; margin-bottom: 18px;
  border-radius: 18px; background: var(--site-surface);
}
.info-label { color: var(--site-ink); font-size: .92rem; font-weight: 600; }
.info-value { color: var(--site-ink-soft); font-size: .92rem; }

.table-frame {
  width: 100%; max-width: 100%; margin-bottom: 16px;
  border: 1px solid var(--site-rule); border-radius: 14px; overflow: hidden;
  background: #fff;
}
.table-frame.table-wide {
  overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}
.grade-table {
  width: 100%; margin: 0; border: 0;
  border-spacing: 0; border-collapse: separate;
  font-family: 'Source Sans 3', sans-serif;
  font-size: .92rem; line-height: 1.45;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
.grade-table th, .grade-table td {
  font-family: inherit; font-size: inherit; line-height: inherit;
  vertical-align: top; white-space: normal;
}
.grade-table th { padding: 11px 15px; color: #fff; background: var(--site-dark); text-align: left; font-weight: 600; }
.grade-table td { padding: 11px 15px; color: var(--site-ink-soft); border-bottom: 1px solid var(--site-rule); }
.grade-table tr:last-child td { border-bottom: 0; }
.grade-table tr:nth-child(even) td { background: #fafafa; }
.table-wide.cols-3 .grade-table { min-width: 540px; }
.table-wide.cols-4 .grade-table { min-width: 680px; }
.table-wide.cols-5 .grade-table { min-width: 760px; }
.table-wide .grade-table th:first-child,
.table-wide .grade-table td:first-child { white-space: nowrap; }

.note-box {
  margin-bottom: 18px; padding: 16px 19px;
  border: 0; border-radius: 14px; background: var(--site-blue-soft);
  color: #374151; font-size: .93rem;
}

.legacy-course { max-width: 920px; }
.legacy-course .legacy-table { width: 100%; border: 0; border-collapse: collapse; color: var(--site-ink-soft); font: inherit; }
.legacy-course .legacy-table > tbody > tr:nth-child(-n+2) { display: none; }
.legacy-course .legacy-table td { padding: 0; }
.legacy-course h1 { margin-top: 46px; }
.legacy-course h1:first-child { margin-top: 0; }
.legacy-course br + br { line-height: 2.2; }

footer {
  padding: 34px max(24px, calc((100vw - 1080px) / 2));
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 42px;
  color: rgba(255,255,255,.66); background: var(--site-dark); font-size: .86rem;
}
footer strong { display: block; margin-bottom: 5px; color: #fff; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
footer a { color: rgba(255,255,255,.8); }

@media (max-width: 640px) {
  .site-bar { padding: 0 17px; gap: 12px; }
  .site-bar > a:first-child { font-size: .9rem; }
  .page-header { padding: 44px 22px 32px; }
  .page-header::after { left: 22px; }
  .page-header h1 { font-size: clamp(2rem, 10vw, 3rem); }
  .page-body { padding: 38px 22px 66px; }
  .info-grid { grid-template-columns: 1fr; gap: 4px; padding: 20px; }
  .info-value { margin-bottom: 8px; }
  .grade-table { font-size: .9rem; }
  .grade-table th, .grade-table td { padding: 10px 12px; }
  footer { grid-template-columns: 1fr; padding: 28px 22px; gap: 24px; }
}
