@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400&display=swap');

:root {
  --navy:    #1e3a5f;
  --blue:    #2563eb;
  --red:     #b91c1c;
  --muted:   #64748b;
  --border:  #e2e8f0;
  --bg-alt:  #f8fafc;
  --bg-row:  #f1f5f9;
  --text:    #0f172a;
  --max-w:   1080px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: #fff;
}

/* ── Header ── */

header {
  background: #2c5282;
  padding: 1.4rem 2rem;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.course-id {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.2rem;
}

.course-title {
  font-size: 22px;
  font-weight: 300;
  color: #fff;
  letter-spacing: 0.5px;
}

/* ── Layout ── */

.layout {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 0;
  align-items: start;
  padding: 2rem 1.5rem 4rem;
}

/* ── Sidebar ── */

.sidebar {
  padding-right: 2rem;
  position: sticky;
  top: 1.5rem;
}

.sidebar-section {
  margin-bottom: 1.8rem;
}

.sidebar-heading {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 2px solid var(--navy);
  padding-bottom: 0.3rem;
  margin-bottom: 0.8rem;
}

.sidebar-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.7rem;
  margin-bottom: 0.1rem;
}

.sidebar p, .sidebar address {
  font-size: 13.5px;
  line-height: 1.6;
  font-style: normal;
  color: var(--text);
}

.sidebar img.book-cover {
  width: 100%;
  max-width: 160px;
  display: block;
  margin: 0.6rem 0 0.4rem;
  border: 1px solid var(--border);
}

/* ── Main content ── */

.main { min-width: 0; }

.main section { margin-bottom: 2.5rem; }

.main h2 {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 2px solid var(--navy);
  padding-bottom: 0.3rem;
  margin-bottom: 1rem;
}

.main h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.2rem 0 0.4rem;
}

.main p { margin-bottom: 0.8rem; font-size: 15px; }
.main p:last-child { margin-bottom: 0; }

/* ── Grading table ── */

.grading-table {
  border-collapse: collapse;
  margin-bottom: 0.5rem;
}

.grading-table td {
  padding: 0.25rem 1rem 0.25rem 0;
  font-size: 14px;
  vertical-align: top;
}

.grading-table td:first-child {
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  min-width: 3.5rem;
}

/* ── Schedule table ── */

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-top: 0.5rem;
}

.schedule-table thead th {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--navy);
  padding: 0.4rem 0.6rem 0.5rem;
  text-align: left;
  white-space: nowrap;
}

.schedule-table tbody tr:nth-child(even) { background: var(--bg-row); }

.schedule-table tbody tr:hover { background: #dbeafe55; }

.schedule-table td {
  padding: 0.55rem 0.6rem;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}

.schedule-table .col-date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  width: 70px;
}

.schedule-table .col-topic { width: 30%; }

.schedule-table .col-readings { width: 25%; }

.schedule-table .col-due {
  width: 15%;
  color: var(--red);
  font-weight: 500;
}

.schedule-table .col-materials { width: 20%; }

tr.holiday td { color: var(--muted); font-style: italic; }

tr.special td { background: #eff6ff; }
tr.special:nth-child(even) td { background: #dbeafe; }

/* ── Links ── */

a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.1s;
}

a:hover {
  border-bottom-color: var(--blue);
}

.sidebar a { color: var(--blue); }

/* ── Footer ── */

footer {
  border-top: 1px solid var(--border);
  padding: 1.2rem 2rem;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ── Responsive ── */

@media (max-width: 720px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 1.5rem 1rem 3rem;
  }

  .sidebar {
    position: static;
    padding-right: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .schedule-table .col-readings,
  .schedule-table .col-materials { display: none; }
}
