:root {
  color-scheme: light;
  --maroon-950: #3e0010;
  --maroon-800: #670019;
  --maroon-700: #7a0019;
  --gold-400: #ffcc33;
  --ink: #231f20;
  --muted: #666064;
  --line: #d9d2d5;
  --surface: #ffffff;
  --canvas: #f6f3f1;
  --selected-one: #fff8df;
  --selected-two: #f3e6eb;
  --success: #17643a;
  --danger: #9b2c2c;
  --focus: #005fcc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--maroon-950) 0 13rem, transparent 13rem),
    var(--canvas);
  line-height: 1.5;
}

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

a:hover {
  color: var(--maroon-950);
  text-decoration-thickness: 0.14em;
}

a:focus-visible,
input:focus-visible,
.table-wrap:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.page-shell {
  width: min(100% - 2rem, 112rem);
  margin: 0 auto;
  padding: 2.25rem 0 2rem;
}

.page-header {
  color: #fff;
  margin-bottom: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--gold-400);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

h1 {
  margin: 0;
  max-width: 16ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 5vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.intro {
  max-width: 52rem;
  margin: 1rem 0 0;
  color: #f0e7ea;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
}

.local-note {
  display: grid;
  gap: 0.2rem;
  flex: 0 0 min(24rem, 34vw);
  padding: 1rem 1.1rem;
  color: var(--ink);
  background: var(--gold-400);
  border-radius: 0.65rem 0.65rem 0 0.65rem;
  box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 20%);
}

.local-note strong {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.local-note span {
  font-size: 0.9rem;
}

.legend {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 3.5rem;
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.75rem 0.75rem 0 0;
  font-size: 0.86rem;
  font-weight: 650;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border: 1px solid rgb(0 0 0 / 14%);
  border-radius: 0.18rem;
}

.legend-swatch.one {
  background: var(--selected-one);
  box-shadow: inset 0.22rem 0 var(--gold-400);
}

.legend-swatch.two {
  background: var(--selected-two);
  box-shadow: inset 0.22rem 0 var(--maroon-700);
}

.course-total {
  color: var(--muted);
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.4rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 0.75rem 0.75rem 0 0;
}

.offering-filter {
  display: inline-flex;
  margin: 0;
  padding: 0.2rem;
  border: 1px solid #c8bfc3;
  border-radius: 0.65rem;
  background: #f4f0f2;
}

.offering-filter legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.offering-filter label {
  position: relative;
  cursor: pointer;
}

.offering-filter input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.offering-filter label span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.65rem;
  padding: 0.55rem 0.85rem;
  color: #554d50;
  border-radius: 0.45rem;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1;
  transition: color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.offering-filter label strong {
  display: inline-grid;
  place-items: center;
  min-width: 1.65rem;
  height: 1.65rem;
  padding: 0 0.35rem;
  color: inherit;
  background: rgb(255 255 255 / 72%);
  border-radius: 999px;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.offering-filter input:checked + span {
  color: #fff;
  background: var(--maroon-700);
  box-shadow: 0 0.2rem 0.65rem rgb(62 0 16 / 24%);
}

.offering-filter input:checked + span strong {
  color: var(--maroon-950);
}

.offering-filter input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.course-total {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 750;
  text-align: right;
}

.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 4rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0 0 0.75rem 0.75rem;
  box-shadow: 0 1rem 3rem rgb(62 0 16 / 10%);
}

table {
  width: 100%;
  min-width: 92rem;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}

th,
td {
  padding: 0.8rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  position: sticky;
  top: 0;
  z-index: 3;
  color: #fff;
  background: var(--maroon-800);
  border-bottom-color: var(--maroon-950);
  font-size: 0.72rem;
  letter-spacing: 0.045em;
  line-height: 1.35;
  text-transform: uppercase;
}

th:first-child,
td:first-child {
  min-width: 17rem;
}

th:nth-child(2),
td:nth-child(2) {
  min-width: 10rem;
}

th:nth-child(3),
td:nth-child(3) {
  min-width: 11rem;
}

th:nth-child(4),
td:nth-child(4),
th:nth-child(5),
td:nth-child(5) {
  min-width: 8.25rem;
}

th:nth-child(6),
td:nth-child(6) {
  min-width: 15rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover > td {
  background-color: #faf8f9;
}

tbody tr.interest-level-1 > td {
  background: var(--selected-one);
}

tbody tr.interest-level-2 > td {
  background: var(--selected-two);
}

tbody tr.interest-level-1 > td:first-child {
  box-shadow: inset 0.3rem 0 var(--gold-400);
}

tbody tr.interest-level-2 > td:first-child {
  box-shadow: inset 0.3rem 0 var(--maroon-700);
}

.course-cell > a {
  display: grid;
  gap: 0.15rem;
  width: fit-content;
  text-decoration: none;
}

.course-cell strong {
  color: var(--maroon-700);
  font-size: 0.76rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.course-cell a span {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
}

.completed-badge,
.status,
.category {
  display: inline-block;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.3;
}

.completed-badge {
  margin-top: 0.45rem;
  padding: 0.24rem 0.5rem;
  color: #fff;
  background: var(--maroon-700);
  font-size: 0.68rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.status {
  padding: 0.3rem 0.55rem;
  font-size: 0.76rem;
}

.status-yes {
  color: var(--success);
  background: #e2f4e9;
}

.status-no {
  color: var(--danger);
  background: #fbe8e8;
}

.category {
  padding: 0.35rem 0.6rem;
  color: #4b4145;
  background: #eee9eb;
  font-size: 0.76rem;
}

.citation-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.empty-value {
  color: #8c8588;
}

.interest-heading,
.interest-cell {
  width: 8.5rem;
  text-align: center;
}

.interest-cell {
  vertical-align: middle;
}

.interest-cell label {
  display: inline-grid;
  place-items: center;
  min-width: 3rem;
  min-height: 3rem;
  cursor: pointer;
}

.interest-cell label span {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.interest-cell input {
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  accent-color: var(--maroon-700);
  cursor: pointer;
}

footer {
  padding: 1rem 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.noscript-note {
  padding: 1rem;
  color: var(--danger);
  background: #fff;
  border: 2px solid currentColor;
  border-radius: 0.5rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 54rem) {
  body {
    background: linear-gradient(180deg, var(--maroon-950) 0 17rem, transparent 17rem), var(--canvas);
  }

  .page-shell {
    width: min(100% - 1rem, 112rem);
    padding-top: 1.25rem;
  }

  .title-row {
    display: grid;
    gap: 1rem;
  }

  .local-note {
    width: 100%;
    max-width: 32rem;
  }

  .legend {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
  }

  .course-total {
    width: 100%;
    text-align: left;
  }

  .filter-bar {
    display: grid;
  }

  .offering-filter {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .offering-filter label span {
    justify-content: center;
    padding-inline: 0.45rem;
    text-align: center;
  }

  th,
  td {
    padding: 0.65rem 0.55rem;
  }
}

@media print {
  body {
    background: #fff;
  }

  .page-shell {
    width: 100%;
    padding: 0;
  }

  .page-header {
    color: var(--ink);
  }

  .local-note,
  .legend,
  .filter-bar,
  th:nth-child(7),
  th:nth-child(8),
  td:nth-child(7),
  td:nth-child(8) {
    display: none;
  }

  .table-wrap {
    overflow: visible;
    max-height: none;
    border: 0;
    box-shadow: none;
  }

  table {
    min-width: 0;
    font-size: 8pt;
  }

  th {
    position: static;
    color: #000;
    background: #eee;
  }
}
