:root {
  --se-blue: #3d89c9;
  --se-blue-dark: #2c6a9e;
  --se-blue-darker: #1f4d75;
  --se-blue-tint: #eaf3fb;
  --se-blue-tint-2: #d6e9f7;
  --ink: #1c2b36;
  --ink-soft: #52697a;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(31, 77, 117, 0.06), 0 12px 28px rgba(31, 77, 117, 0.10);
  --shadow-hover: 0 4px 10px rgba(31, 77, 117, 0.10), 0 20px 40px rgba(31, 77, 117, 0.16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 12% -10%, var(--se-blue-tint) 0%, rgba(234, 243, 251, 0) 60%),
    radial-gradient(1000px 500px at 110% 10%, var(--se-blue-tint-2) 0%, rgba(214, 233, 247, 0) 55%),
    var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(61, 137, 201, 0.14);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 36px;
  height: 36px;
  display: block;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-text .dept {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--se-blue-darker);
  text-transform: uppercase;
  text-decoration: none;
}

.brand-text .dept:hover { text-decoration: underline; }

.brand-text .brand-course {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  text-decoration: none;
}

.brand-text .brand-course:hover { text-decoration: underline; }

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: var(--se-blue-tint);
  color: var(--se-blue-darker);
}

.site-nav a.active {
  background: var(--se-blue);
  color: var(--white);
}

@media (max-width: 640px) {
  .brand-text .brand-course { display: none; }
  .topbar .wrap { flex-wrap: wrap; row-gap: 10px; }
  .site-nav { margin-left: 0; width: 100%; justify-content: center; }
}

/* ---------- hero ---------- */

main { flex: 1; }

.hero {
  text-align: center;
  padding: 56px 0 8px;
}

.hero .logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 22px;
  display: block;
  filter: drop-shadow(0 10px 20px rgba(61, 137, 201, 0.25));
}

.hero .course-code {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--se-blue-darker), var(--se-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .course-name {
  margin: 8px 0 0;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 500;
  color: var(--ink-soft);
}

.hero .tagline {
  margin: 22px auto 0;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* ---------- section cards ---------- */

.sections {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  padding: 44px 0 64px;
}

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px 28px 28px;
  background: var(--white);
  border: 1px solid rgba(61, 137, 201, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--se-blue), var(--se-blue-dark));
}

.card:hover,
.card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(61, 137, 201, 0.32);
}

.card .section-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--se-blue);
}

.card h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}

.card .meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.card .meta span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.card .meta svg {
  flex: none;
  width: 17px;
  height: 17px;
  color: var(--se-blue);
}

.card .go {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--se-blue-dark);
}

.card .go svg {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}

.card:hover .go svg { transform: translateX(4px); }

/* ---------- footer ---------- */

footer {
  padding: 26px 0 40px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* ---------- section header (schedule / interior pages) ---------- */

.page-head {
  padding: 44px 0 18px;
  text-align: center;
}

.page-head .badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--se-blue-tint);
  color: var(--se-blue-darker);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.page-head h1 {
  margin: 0 0 8px;
  font-size: clamp(1.9rem, 4.4vw, 2.6rem);
  font-weight: 800;
  color: var(--ink);
}

.page-head p {
  margin: 0 auto;
  max-width: 56ch;
  color: var(--ink-soft);
}

.page-head h1 a {
  text-decoration: none;
}

.page-head h1 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--se-blue);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 40px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--white);
  border: 1px solid rgba(61, 137, 201, 0.18);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  color: var(--ink);
}

.pill svg {
  width: 16px;
  height: 16px;
  color: var(--se-blue);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 34px;
  color: var(--se-blue-dark);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.back-link:hover { text-decoration: underline; }

/* ---------- placeholder section pages ---------- */

.placeholder {
  text-align: center;
  padding: 64px 0 56px;
}

.placeholder .badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--se-blue-tint);
  color: var(--se-blue-darker);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.placeholder h1 {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--ink);
}

.placeholder .instructor {
  color: var(--ink-soft);
  font-size: 1.1rem;
  margin-bottom: 28px;
}

.coming-soon {
  max-width: 520px;
  margin: 0 auto;
  padding: 30px 28px;
  background: var(--white);
  border: 1px dashed rgba(61, 137, 201, 0.35);
  border-radius: var(--radius);
  color: var(--ink-soft);
}

.coming-soon strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  margin-bottom: 6px;
}

/* ---------- calendar embed ---------- */

.calendar-embed {
  margin: 24px auto 32px;
  padding: 16px;
  background: var(--white);
  border: 1px solid rgba(61, 137, 201, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.calendar-embed iframe {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 800px;
  height: 600px;
}

/* ---------- slide list ---------- */

.slide-note {
  max-width: 520px;
  margin: 0 auto 12px;
  padding: 14px 20px;
  background: var(--se-blue-tint);
  border-radius: 12px;
  color: var(--se-blue-darker);
  font-size: 0.92rem;
  text-align: center;
}

.slide-list {
  list-style: none;
  max-width: 640px;
  margin: 24px auto 0;
  padding: 0;
}

.slide-list li {
  border-bottom: 1px solid rgba(61, 137, 201, 0.12);
}

.slide-list li:last-child {
  border-bottom: none;
}

.slide-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.98rem;
}

.slide-list a:hover {
  color: var(--se-blue-dark);
}

.slide-list svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--se-blue);
}

/* ---------- schedule / day cards ---------- */

.unit {
  padding: 46px 0 64px;
  max-width: 860px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.day-list {
  position: relative;
  padding-left: 8px;
}

.day-list::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 27px;
  width: 2px;
  background: linear-gradient(var(--se-blue-tint-2), rgba(214, 233, 247, 0.2));
}

.day-row {
  position: relative;
  display: flex;
  gap: 20px;
  padding: 18px 0;
}

.day-row.is-next .day-badge {
  background: var(--se-blue);
  color: var(--white);
}

.day-row.is-next .day-content {
  border-color: var(--se-blue);
  box-shadow: 0 0 0 1px var(--se-blue), var(--shadow);
}

.day-badge {
  position: relative;
  z-index: 1;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--se-blue);
  color: var(--se-blue-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: var(--shadow);
}

.day-content {
  flex: 1;
  min-width: 0;
  background: var(--white);
  border: 1px solid rgba(61, 137, 201, 0.14);
  border-radius: 14px;
  padding: 16px 20px 18px;
  box-shadow: var(--shadow);
}

.day-content-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.day-description {
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(61, 137, 201, 0.08);
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.6;
}

.tag-pill {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--se-blue-tint);
  color: var(--se-blue-darker);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tag-pill.tag-next {
  background: var(--se-blue);
  color: var(--white);
}

.day-date {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--se-blue-darker);
}

/* ---------- break markers (Labor Day, Fall Break, etc.) ---------- */
/* Prefixed "day-break-*" (not "break-*") to avoid colliding with the
   .break-row/.break-cell classes used by the sched-table's own break rows. */

.day-break-row {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 20px;
  padding: 6px 0;
}

.day-break-badge {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  border: 2px dashed rgba(82, 105, 122, 0.4);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.day-break-badge svg {
  width: 22px;
  height: 22px;
}

.day-break-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  background: repeating-linear-gradient(
    135deg,
    rgba(82, 105, 122, 0.05) 0,
    rgba(82, 105, 122, 0.05) 10px,
    rgba(82, 105, 122, 0.09) 10px,
    rgba(82, 105, 122, 0.09) 20px
  );
  border: 1px dashed rgba(82, 105, 122, 0.35);
  border-radius: 14px;
  padding: 12px 20px;
}

.day-break-title {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.98rem;
}

.day-break-sub {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.day-break-date {
  font-size: 0.85rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .day-break-badge { width: 44px; height: 44px; }
  .day-break-badge svg { width: 18px; height: 18px; }
}

.field {
  display: flex;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid rgba(61, 137, 201, 0.08);
  font-size: 0.92rem;
  line-height: 1.5;
}

.field:first-of-type { border-top: none; }

.field-label {
  flex: none;
  width: 84px;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 2px;
}

.field-lecture .field-label { color: var(--se-blue-darker); }

.field-due .field-label { color: var(--se-blue-darker); }

.field-list {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
}

.field-list li { margin: 2px 0; }
.field-list strong { color: var(--se-blue-darker); }

.field-list code {
  background: var(--se-blue-tint);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 0.85em;
}
