:root {
  --ink: #14171f;
  --slate: #33415c;
  --accent: #c5050c;
  --link: #9b1015;
  --link-hover: #c5050c;
  --border: #c2ccd8;
  --thead: #f3f6f9;
  --tint-noclass: #f7eeee;
  --tint-note: #f8f4e8;
  --zebra: #fafbfc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

#centerpanelfull {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 28px 60px;
}

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

/*
 * Hero illustration: flat-vector data-systems banner (generated for this course).
 * The artwork is bright and its left side is near-white, so the title sits in dark
 * type over a soft white scrim rather than white type over a dark one.
 */
.hero {
  position: relative;
  min-height: 420px;
  margin-bottom: 30px;
  border-radius: 4px;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.55) 38%, rgba(255, 255, 255, 0) 62%),
    url("assets/hero-illustration.jpg") center / cover no-repeat,
    #f7f8f9;
}

.hero-logo {
  position: absolute;
  top: 24px;
  right: 28px;
  height: 82px;
  width: auto;
}

.hero-content {
  max-width: 660px;
  /* no left padding: the title column lines up with the body text below */
  padding: 46px 36px 40px 0;
}

.hero h1 {
  margin: 0 0 30px;
  color: var(--slate);
}

.hero h1 .course-num {
  display: block;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.5px;
}

.hero h1 .course-name {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.hero p {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 2;
}

.hero strong {
  color: var(--slate);
}

/* ---- sections ---- */

p {
  margin: 14px 0;
}

.header {
  margin-top: 38px;
  padding: 6px 0;
  border-bottom: 2px solid var(--accent);
  color: var(--slate);
  font-size: 22px;
  font-weight: bold;
}

ul {
  margin: 14px 0 0 22px;
  padding: 0;
}

li {
  margin: 8px 0;
}

.policies-intro,
.policies {
  font-size: 14px;
  line-height: 1.6;
  color: #6a7280;
}

.policies-intro {
  margin-bottom: 0;
}

.policies li {
  margin: 4px 0;
}

.legend {
  font-size: 14px;
  color: #5b6472;
  margin: 12px 0 0;
}

.checkin {
  cursor: help;
  font-style: normal;
}

/* ---- schedule table ---- */

table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
}

.schedule-table {
  table-layout: fixed;
  min-width: 940px;
}

th,
td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
  overflow: hidden;
}

th {
  background: var(--thead);
  color: var(--slate);
  font-weight: bold;
}

.schedule-table th:nth-child(1),
.schedule-table td:nth-child(1) {
  width: 62px;
}

.schedule-table th:nth-child(2),
.schedule-table td:nth-child(2) {
  width: 132px;
  white-space: nowrap;
}

.schedule-table th:nth-child(3),
.schedule-table td:nth-child(3) {
  width: 300px;
}

.schedule-table td:nth-child(1),
.schedule-table td:nth-child(2) {
  color: var(--slate);
  font-weight: bold;
}

/* multi-day rows (e.g. recess) need to wrap in the date column */
.schedule-table tr.no-class td:nth-child(2) {
  white-space: normal;
}

.schedule-table tr:nth-child(even) td {
  background: var(--zebra);
}

.schedule-table tr.no-class td {
  background: var(--tint-noclass);
}

.schedule-table tr.note td {
  background: var(--tint-note);
}

.schedule-table td a {
  line-height: 1.5;
}

.tba {
  color: #6a7280;
  font-style: italic;
}

/* ---- guest talk pages (talks/*.html) ---- */

.talk-page {
  max-width: 820px;
}

.back-link {
  font-size: 14px;
}

.talk-meta {
  margin: 28px 0 6px;
  color: #5b6472;
  font-size: 15px;
}

.talk-title {
  margin: 0 0 12px;
  color: var(--slate);
  font-size: 32px;
  line-height: 1.2;
}

.talk-speaker {
  margin: 0;
  font-size: 19px;
}

.speaker-name {
  margin: 18px 0 0;
  color: var(--slate);
  font-weight: bold;
}

.speaker-name + p {
  margin-top: 4px;
}

/* ---- responsive ---- */

@media (max-width: 820px) {
  #centerpanelfull {
    padding: 22px 16px 46px;
  }

  /* narrow screens: don't overlay text on the artwork. Stack a plain text
     panel above the illustration, and crop the illustration to its artwork
     (the right 60% of the file; the left 40% is empty wall). */
  .hero {
    min-height: 0;
    flex-direction: column;
    background: #f4f6f8;
  }

  .hero::after {
    content: "";
    display: block;
    width: 100%;
    aspect-ratio: 1.4;
    background: url("assets/hero-illustration.jpg") right center / cover no-repeat;
  }

  .hero-content {
    max-width: none;
    /* keep clear of the crest in the top-right corner */
    padding: 22px 76px 22px 16px;
  }

  .hero h1 {
    margin-bottom: 16px;
  }

  .hero h1 .course-num {
    font-size: 34px;
  }

  .hero h1 .course-name {
    font-size: 20px;
  }

  .hero p {
    font-size: 16px;
    line-height: 1.7;
  }

  .hero-logo {
    top: 16px;
    right: 16px;
    height: 48px;
  }

  .talk-title {
    font-size: 26px;
  }

  /* the schedule keeps its 940px layout and scrolls inside its own wrapper,
     instead of widening the whole page */
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
