/* Making Minds · Phil 133 · site stylesheet
   Layout and table styling follow the Fall 2026 planning calendar;
   colors and the splash hero come from the original makingminds.org. */

:root {
  --bg: #FBFAFD;
  --surface: #FFFFFF;
  --surface-2: #F1EEF5;
  --ink: #2A2A2A;
  --ink-2: #4A4A4A;
  --ink-3: #7B7B7B;
  --line: #E5E5E5;
  --line-2: #D5D5D5;
  --navy: #030D24;           /* splash background (matches the image edges) */
  --accent: #C255B9;         /* magenta section labels / unit headings */
  --accent-2: #DA73D2;       /* subtitle pink */
  --accent-soft: #F7E6F5;
  --lav: #E2B4FF;            /* the band under the hero */
  --lav-soft: #F2E6FF;
  --lav-line: #DCC6F2;
  --link: #1382D6;
  --date: #24678D;
  --date-soft: #E3EEF6;
  --hw: #C93A3A;
  --hw-soft: #FCEBEB;
  --exam: #6E3A96;
  --exam-soft: #EFE2FF;
  --hol: #9A9A9A;
  --orange: #F5A623;
  --u1: #24678D;
  --u2: #C255B9;
  --u3: #F5A623;
  color-scheme: light;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
.page { max-width: 960px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
main.page { padding-block: 30px 40px; }
h1, h2, h3 { font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif; text-wrap: balance; margin: 0; }
h1 { font-size: 34px; font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: 19px; font-weight: 600; margin-bottom: 10px; color: var(--accent); }
h3 { font-size: 16px; font-weight: 600; margin: 20px 0 6px; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
b, strong { font-weight: 600; }
.mono { font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 11.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.dim { color: var(--ink-3); }
em { color: var(--ink-3); font-style: italic; }
section { margin-top: 32px; }
main > section:first-child, main > .withtoc:first-child { margin-top: 0; }

/* ---------- Top bar ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .page { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; padding-block: 12px; }
.brand {
  font-family: "IBM Plex Serif", Georgia, serif; font-weight: 700; font-size: 19px; color: var(--ink);
  text-decoration: none; display: inline-flex; align-items: baseline; gap: 10px;
}
.brand .course { font-family: "IBM Plex Sans", sans-serif; font-weight: 600; font-size: 11.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); }
.topbar nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; }
.topbar nav a { color: var(--ink-2); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.topbar nav a:hover { color: var(--accent); }
.topbar nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.topbar nav a.ext::after { content: " \2197"; color: var(--ink-3); font-size: 12px; }

/* ---------- Hero (splash image, bound to the main column) ---------- */
.hero { margin: 0; background: var(--navy); color: #fff; overflow: hidden; }
.hero-inner { position: relative; }
.hero-img {
  display: block; width: 100%; height: clamp(260px, 33vw, 390px); object-fit: cover; object-position: 20% 18%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.hero-text {
  position: absolute; top: 50%; right: clamp(16px, 4vw, 40px); transform: translateY(-50%);
  max-width: 58%; display: grid; gap: 10px; justify-items: end; text-align: right;
}
.hero h1 { font-size: clamp(38px, 5.4vw, 62px); font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.05; text-shadow: 0 2px 18px rgba(0,0,0,.45); }
.hero .tagline { font-family: "IBM Plex Serif", Georgia, serif; font-size: clamp(16px, 1.9vw, 20px); font-weight: 600; color: var(--accent-2); margin: 0; max-width: 34ch; text-shadow: 0 1px 12px rgba(0,0,0,.5); }
.hero .hero-meta { margin: 4px 0 0; font-size: 14.5px; line-height: 1.55; color: #E8ECF5; text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.hero .eyebrow { color: #C9D2E6; }
.hero.slim .hero-img { height: 190px; object-position: 20% 34%; }
.hero.slim .hero-text { gap: 6px; }
.hero.slim h1 { font-size: clamp(28px, 3.6vw, 40px); text-transform: none; letter-spacing: -0.01em; }
.hero.slim .tagline { color: #E8ECF5; font-weight: 500; font-size: 15.5px; max-width: 48ch; }
.hero.slim .tagline a { color: #fff; }
.band { height: 14px; background: var(--lav); }

/* ---------- Facts (two-column key / value grid) ---------- */
.facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 36px; border-top: 1px solid var(--line-2); }
.fact { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
.fact .k { color: var(--accent); font-weight: 600; }
.fact .v { min-width: 0; }

/* ---------- Up-next box (label left, compressed content right) ---------- */
.next { background: var(--lav-soft); border: 1px solid var(--lav-line); padding: 4px 16px; }
.nx { display: grid; grid-template-columns: 104px 1fr; gap: 12px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--lav-line); font-size: 13.5px; line-height: 1.45; }
.nx:last-child { border-bottom: 0; }
.nx .chip { display: inline-block; justify-self: start; background: var(--hw-soft); color: var(--hw); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; padding: 2px 8px; margin-top: 1px; white-space: nowrap; }
.nx-body { min-width: 0; }
.nx-main { color: var(--ink); font-weight: 600; text-decoration: none; }
.nx-main:hover { color: var(--accent); }
.nx-date { font-weight: 400; color: var(--date); margin-right: 4px; }
.nx-main .dim { font-weight: 400; }
.nx-detail { color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.nx-detail .rl { padding: 0; margin-right: 4px; }
.nx-detail .sep { color: var(--ink-3); margin: 0 2px; }
.nx-done { padding: 10px 0; font-size: 13.5px; color: var(--accent); font-weight: 600; }

/* ---------- Legend / chips ---------- */
.legend { font-size: 13.5px; color: var(--ink-2); margin: 0 0 12px; }
.tag {
  display: inline-block; font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  padding: 1px 6px; margin-right: 5px; white-space: nowrap; vertical-align: 1px; line-height: 1.5;
}
.tag.c { background: var(--accent-soft); color: var(--accent); }
.tag.t { background: var(--date-soft); color: var(--date); }
.tag.ct { background: var(--surface-2); color: var(--ink-2); }
.tag.file { background: var(--surface-2); color: var(--ink-2); }
.mm { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; font-weight: 600; color: var(--accent); margin-right: 6px; letter-spacing: 0.03em; }

/* ---------- Schedule table ---------- */
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); }
.tablewrap.narrow { max-width: 420px; }
.schedwrap + .schedwrap { margin-top: 22px; }
table { border-collapse: collapse; width: 100%; }
table.sched { min-width: 720px; table-layout: fixed; }
col.c-wk { width: 44px; }
col.c-date { width: 100px; }
col.c-topic { width: 30%; }
.sched-head { background: transparent; margin-bottom: 2px; }
.sched-head th { border: 0; padding: 4px 12px 6px; }
th { text-align: left; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.wk { color: var(--ink-3); font-size: 13px; }
td.date { white-space: nowrap; font-size: 13.5px; color: var(--date); }
td.topic { font-weight: 500; }
td.readings { color: var(--ink-2); font-size: 13.5px; }
tr.unit td { background: var(--surface-2); padding: 13px 12px 9px; border-bottom: 1px solid var(--line-2); box-shadow: inset 0 3px 0 var(--uc, var(--accent)); }
tr.unit td .un { display: inline-block; font-size: 11.5px; letter-spacing: 0.09em; text-transform: uppercase; font-weight: 700; color: var(--uc, var(--accent)); margin-right: 12px; vertical-align: 2px; }
tr.unit td .ut { font-family: "IBM Plex Serif", Georgia, serif; font-size: 19px; font-weight: 600; color: var(--ink); }
tr.u1 td.topic { box-shadow: inset 3px 0 0 var(--u1); }
tr.u2 td.topic { box-shadow: inset 3px 0 0 var(--u2); }
tr.u3 td.topic { box-shadow: inset 3px 0 0 var(--u3); }
tr.holiday td { color: var(--hol); }
tr.holiday td.topic { font-style: italic; font-weight: 400; }
tr.exam, tr.exam td { background: var(--exam-soft); }
tr.exam td.topic { font-weight: 600; color: var(--exam); }
tr.exam td.readings, tr.exam td.date, tr.exam td.wk { color: var(--exam); }
tr.hw, tr.hw td { background: var(--hw-soft); }
tr.hw td.topic { color: var(--hw); font-weight: 600; }
tr.hw td.topic .sub { color: var(--hw); opacity: .85; }
tr.hw td.wk, tr.hw td.date, tr.hw td.readings { color: var(--hw); }
.sub { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; font-weight: 400; }
tr:target td { outline: 2px solid var(--accent); outline-offset: -2px; }

/* reading groups inside a cell */
.rg { display: grid; grid-template-columns: 52px 1fr; gap: 10px; }
.rl { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding-top: 3px; }
.rg ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; }
.rg li { line-height: 1.45; }
.note { display: block; }

/* recommended readings: folded by default */
details.rec { margin: 7px 0 0 62px; }
details.rec summary {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; list-style: none;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 3px 9px 3px 7px;
}
details.rec summary::-webkit-details-marker { display: none; }
details.rec summary::before { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--ink-3); transition: transform .15s; }
details.rec[open] summary::before { transform: rotate(180deg); }
details.rec summary:hover { color: var(--accent); border-color: var(--line-2); }
details.rec summary .n { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-3); }
details.rec ul { margin: 8px 0 2px; padding: 0 0 0 10px; list-style: none; display: grid; gap: 4px; border-left: 2px solid var(--line); }
details.rec li { line-height: 1.45; }

/* ---------- Prose pages (policies) ---------- */
.withtoc { display: grid; grid-template-columns: minmax(0, 72ch) 1fr; gap: 40px; align-items: start; }
.toc { position: sticky; top: 20px; font-size: 13px; padding-top: 4px; }
.toc .eyebrow { margin-bottom: 8px; }
.toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; border-left: 1px solid var(--line-2); }
.toc li { padding-left: 12px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.prose { max-width: 72ch; min-width: 0; }
.prose h2 { margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line-2); scroll-margin-top: 16px; }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose p { margin: 8px 0; }
.prose ul, .prose ol { margin: 8px 0; padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose li::marker { color: var(--ink-3); }
table.plain td { padding: 7px 12px; font-size: 14px; }
table.plain td.num { text-align: right; width: 80px; }
.scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); max-width: 520px; }
.scale div { background: var(--surface); padding: 7px 10px; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.scale div span { color: var(--ink-3); }
.scale div b { color: var(--ink); }

/* ---------- Resources ---------- */
.reslist h2 { margin-top: 26px; }
.reslist h2:first-child { margin-top: 0; }
.reslist ul { margin: 0; padding: 0; list-style: none; display: grid; border-top: 1px solid var(--line-2); }
.reslist li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.reslist .rnote { color: var(--ink-3); font-size: 13px; margin-left: 10px; }

/* ---------- Footer ---------- */
footer.page { padding-block: 14px 40px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12.5px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  .hero-img { height: 210px; object-position: 22% 22%; -webkit-mask-image: none; mask-image: none; }
  .hero-text { position: static; transform: none; max-width: none; text-align: left; justify-items: start; padding: 16px 0 24px; }
  .hero h1 { font-size: 34px; }
  .hero.slim .hero-img { height: 120px; }
  .hero.slim .hero-text { padding: 12px 0 20px; }
  .nx { grid-template-columns: 1fr; gap: 4px; }
  .facts { grid-template-columns: 1fr; column-gap: 0; }
  .fact { grid-template-columns: 1fr; gap: 1px; }
  .fact .k { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; }
  .withtoc { grid-template-columns: 1fr; gap: 20px; }
  .toc { position: static; }
  .toc ul { display: flex; flex-wrap: wrap; gap: 4px 14px; border-left: 0; }
  .toc li { padding-left: 0; }
  .scale { grid-template-columns: repeat(2, 1fr); }
  .schedwrap { overflow: visible; }
  table.sched { min-width: 0; }
  table.sched, table.sched tbody, table.sched tr, table.sched td { display: block; }
  table.sched thead, .sched-head { display: none; }
  table.sched td.wk:empty { display: none; }
  table.sched tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.sched tr:last-child { border-bottom: 0; }
  table.sched td { padding: 0; border: 0; width: auto; min-width: 0; }
  table.sched td.wk, table.sched td.date { display: inline; font-size: 12.5px; }
  table.sched td.readings:empty { display: none; }
  table.sched td.wk::before { content: "Wk "; }
  table.sched td.wk::after { content: "\00b7"; margin: 0 7px; }
  table.sched td.topic { margin-top: 3px; box-shadow: none !important; padding-left: 10px; border-left: 3px solid transparent; }
  table.sched tr.u1 td.topic { border-left-color: var(--u1); }
  table.sched tr.u2 td.topic { border-left-color: var(--u2); }
  table.sched tr.u3 td.topic { border-left-color: var(--u3); }
  table.sched td.readings { margin-top: 6px; }
  table.sched tr.unit td { padding: 7px 12px; margin: 0 -12px; }
  .rg { grid-template-columns: 1fr; gap: 2px; }
  details.rec { margin-left: 0; }
  .topbar nav { gap: 4px 14px; }
}

/* ---------- Print ---------- */
@media print {
  body { font-size: 11.5px; background: #fff; }
  .topbar nav, .band, .next, footer { display: none; }
  .hero { background: none; color: #000; }
  .hero-img { display: none; }
  .hero h1, .hero .tagline, .hero .hero-meta { color: #000; text-shadow: none; }
  .hero-text { position: static; transform: none; text-align: left; justify-items: start; max-width: none; padding: 10px 0; }
  .tablewrap { border: 0; overflow: visible; }
  table.sched { min-width: 0; }
  tr { break-inside: avoid; }
  details.rec[open] summary::before { display: none; }
  a { color: inherit; text-decoration: none; }
}
