/* ===========================================================================
   EECS 498/598: Systems for Greater Good
   Michigan-branded refresh — Blue #00274C / Maize #FFCB05
   =========================================================================== */

:root {
  --um-blue: #00274c;
  --um-blue-light: #113a6b;
  --um-maize: #ffcb05;
  --ink: #1a1a1a;
  --muted: #5c6672;
  --line: #e2e6ea;
  --bg: #f4f6f8;
  --card: #ffffff;
  --link: #0b5fa5;
  --accent-soft: #fff8dd;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 39, 76, 0.08), 0 4px 16px rgba(0, 39, 76, 0.06);
  --content-width: 900px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

/* ---------- Header / nav ---------- */
#top {
  background: var(--um-blue);
  border-bottom: 4px solid var(--um-maize);
  color: #fff;
}

#top-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 20px 24px 0;
}

.brandmark {
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.brandmark a {
  display: inline-block;
  line-height: 0;
}

.brandmark img {
  display: block;
  height: 30px;
  width: auto;
}

#top h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

#top h1 a {
  color: #fff;
  text-decoration: none;
}

#top h1 a:hover {
  color: var(--um-maize);
}

#top .subtitle {
  margin: 6px 0 16px;
  color: var(--um-maize);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
}

#top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

#top nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 16px;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

#top nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

#top nav a.current {
  color: #fff;
  border-bottom-color: var(--um-maize);
}

/* ---------- Main ---------- */
#main {
  max-width: var(--content-width);
  margin: 28px auto;
  padding: 0 24px;
}

#main> :first-child {
  margin-top: 0;
}

h2 {
  font-size: 1.5em;
  margin: 2em 0 0.6em;
  padding-bottom: 0.3em;
  border-bottom: 2px solid var(--line);
  color: var(--um-blue);
}

h3 {
  font-size: 1.15em;
  margin: 1.6em 0 0.5em;
  color: var(--um-blue);
}

p {
  margin: 0.7em 0;
}

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

a:hover {
  text-decoration: underline;
}

strong,
b {
  color: var(--ink);
}

/* ---------- Lead / intro ---------- */
.lead {
  font-size: 1.2em;
  line-height: 1.5;
  color: var(--um-blue);
  font-weight: 600;
  margin: 0.4em 0 1em;
}

/* ---------- Info / logistics card ---------- */
.info-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px 22px;
  margin: 1.2em 0 1.6em;
}

.info-card dl {
  display: grid;
  grid-template-columns: minmax(120px, max-content) 1fr;
  gap: 0;
  margin: 0;
}

.info-card dt {
  font-weight: 700;
  color: var(--um-blue);
  padding: 12px 18px 12px 0;
  border-top: 1px solid var(--line);
}

.info-card dd {
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.info-card dl>dt:first-of-type,
.info-card dl>dt:first-of-type+dd {
  border-top: none;
}

.tbd {
  color: var(--muted);
  font-style: italic;
  background: var(--accent-soft);
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 0.9em;
  font-style: normal;
}

/* ---------- Callout ---------- */
.callout {
  background: var(--accent-soft);
  border-left: 4px solid var(--um-maize);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 1.4em 0;
}

.callout p:first-child {
  margin-top: 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout.warn {
  border-left-color: #c0392b;
  background: #fdf1ef;
}

/* ---------- Feature list ---------- */
ul.feature {
  list-style: none;
  padding: 0;
  margin: 1em 0;
}

ul.feature>li {
  position: relative;
  padding: 4px 0 4px 26px;
  margin: 6px 0;
}

ul.feature>li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  width: 8px;
  height: 8px;
  background: var(--um-maize);
  border: 1px solid var(--um-blue);
  border-radius: 2px;
  transform: rotate(45deg);
}

/* ---------- Tables (grading, deliverables) ---------- */
.table-wrap {
  overflow-x: auto;
  margin: 1.2em 0;
}

table.grid {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.97em;
}

table.grid th,
table.grid td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.grid thead th {
  background: var(--um-blue);
  color: #fff;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table.grid tbody tr:last-child td {
  border-bottom: none;
}

table.grid tbody tr:nth-child(even) {
  background: #fafbfc;
}

table.grid td.weight,
table.grid td.due {
  white-space: nowrap;
}

table.grid td.weight {
  font-weight: 700;
  color: var(--um-blue);
}

/* ---------- Schedule ---------- */
.schedule {
  margin: 1.4em 0;
}

.week {
  display: grid;
  grid-template-columns: 74px 1fr;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 12px 0;
  overflow: hidden;
}

.week .wk-num {
  background: var(--um-blue);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 6px;
  text-align: center;
}

.week .wk-num .label {
  font-size: 0.62em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.week .wk-num .num {
  font-size: 1.9em;
  font-weight: 800;
  line-height: 1;
  color: var(--um-maize);
}

.week .wk-body {
  padding: 14px 20px 16px;
}

.week .wk-theme {
  margin: 0 0 3px;
  color: var(--um-blue);
  font-size: 1.1em;
  font-weight: 700;
}

.week .wk-summary {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95em;
  line-height: 1.45;
}

/* Two sessions (Monday / Wednesday) side by side within a week */
.week .sessions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.week .session {
  padding: 4px 22px 4px 0;
}

.week .session+.session {
  padding: 4px 0 4px 22px;
  border-left: 1px solid var(--line);
}

.week .s-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.week .s-date {
  color: var(--muted);
  font-size: 0.92em;
  font-weight: 700;
}

.week .s-cal {
  color: var(--um-blue);
  font-weight: normal;
}

/* Off day (stat holiday / reading week) */
.week .session.off .s-cal {
  color: var(--muted);
}

.week .s-offbox {
  margin-top: 6px;
  padding: 11px 14px;
  border: 1px dashed #c7ccd3;
  border-radius: 8px;
  background: #f5f6f8;
  display: flex;
  align-items: center;
  gap: 10px;
}

.week .off-tag {
  display: inline-block;
  background: var(--muted);
  color: #fff;
  font-size: 0.7em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 5px;
  white-space: nowrap;
}

.week .s-off {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95em;
}

.week .s-speaker {
  color: var(--muted);
  font-size: 0.7em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: right;
}

.week .s-title {
  margin: 2px 0 5px;
  color: var(--um-blue);
  font-size: 1.03em;
  font-weight: 700;
  line-height: 1.3;
}

.week .s-desc {
  margin: 0;
}

.week .s-notes {
  list-style: none;
  margin: 7px 0 0;
  padding: 0;
}

.week .s-notes li {
  color: var(--muted);
  font-size: 0.95em;
  line-height: 1.45;
}

.week .s-pill {
  display: inline-block;
  margin-top: 9px;
  background: var(--um-maize);
  color: var(--um-blue);
  font-weight: 700;
  font-size: 0.74em;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 5px;
}

/* Deliverables use the pill style; allow comfortable wrapping when longer */
.week .s-pill-deliverable {
  line-height: 1.4;
}

.week.milestone {
  border-color: var(--um-maize);
}

.week.milestone .wk-num {
  background: var(--um-blue-light);
}

.week .tag {
  display: inline-block;
  font-size: 0.72em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--um-blue);
  background: var(--um-maize);
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ---------- Deliverable / step blocks ---------- */
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--um-blue);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 4px 20px 16px;
  margin: 14px 0;
}

.step h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.step .due-pill {
  font-size: 0.72em;
  font-weight: 700;
  color: #fff;
  background: var(--um-blue);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

/* ---------- Footer ---------- */
#footer {
  border-top: 4px solid var(--um-maize);
  background: var(--um-blue);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88em;
  text-align: center;
  padding: 22px 24px;
  margin-top: 40px;
  line-height: 1.5;
}

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  #top h1 {
    font-size: 24px;
  }

  #top nav a {
    padding: 10px 11px;
    font-size: 14px;
  }

  .info-card dl {
    grid-template-columns: 1fr;
  }

  .info-card dt {
    padding-bottom: 0;
    border-top: 1px solid var(--line);
  }

  .info-card dd {
    padding-top: 4px;
    border-top: none;
  }

  .info-card dl>dt:first-of-type+dd {
    border-top: none;
  }

  .week {
    grid-template-columns: 56px 1fr;
  }

  .week .wk-num .num {
    font-size: 1.4em;
  }

  .week .sessions {
    grid-template-columns: 1fr;
  }

  .week .session {
    padding: 10px 0 4px;
  }

  .week .session+.session {
    padding: 12px 0 4px;
    border-left: none;
    border-top: 1px solid var(--line);
  }
}