/* Education timeline: field-notebook styling borrowed from ben.collier.phd
   (css/site.css tokens: bench, paper grid, margin rule, index cards, sticky
   notes, pen blue and red). Self-contained so the page can move into
   ben.collier.phd/projects/ later without the site's header or nav. */

:root {
  --bench: #22302b;
  --bench-ink: #efe8d6;
  --paper: #fbf8f1;
  --card: #fffefa;
  --legal: #fff2ad;
  --ink: #1d2633;
  --ink-2: #4a5463;
  --pen: #2447a6;
  --red: #b8352a;
  --margin: #e7a2a0;
  --grid: rgba(64, 120, 168, .12);
  --grid-major: rgba(64, 120, 168, .2);
  --rule: rgba(64, 120, 168, .28);
  --hl-yellow: #ffe56b;
  --hl-green: #b9f0a0;
  --sticky: #ffe17a;
  --sticky-pink: #ffbdcc;
  --tape: rgba(232, 220, 186, .82);
  --tab-1: #f6c453; --tab-2: #9ccbea; --tab-3: #a9d8a1; --tab-4: #f3a391;
  --tab-5: #cdb8e8; --tab-6: #8ed3c7; --tab-7: #f5b5c8; --tab-8: #e9dfc4;
  --gutter: 168px;
  --pad-r: 64px;
  --lab: 128px;          /* term label column */
  --lgap: 44px;          /* label column to cards */
  --line-x: calc(var(--lab) + var(--lgap) / 2);
  --serif-d: "Young Serif", Georgia, serif;
  --serif: "Literata", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --hand: "Kalam", "Comic Sans MS", cursive;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background-color: var(--bench);
  background-image: radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.06), transparent 55%), var(--noise);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.62;
  padding: 28px 0 56px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--pen); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--pen); }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; border-radius: 3px; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute !important; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--sticky); padding: 10px 14px; font-family: var(--mono); font-size: 14px; }
.skip:focus { top: 12px; }
.hand { font-family: var(--hand); font-weight: 700; }
.muted { color: var(--ink-2); }
h1, h2, h3 { font-family: var(--serif-d); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 6px; }

/* ---------- the notebook sheet ---------- */
.sheet {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
  border-radius: 3px 3px 6px 6px;
  box-shadow: 0 2px 0 #e8e0cc, 0 4px 0 #f6f2e7, 0 6px 0 #e3dac4, 0 8px 0 #f3eee1, 0 40px 70px -20px rgba(0,0,0,.6);
  padding: 0 var(--pad-r) 40px var(--gutter);
  overflow-x: clip;
}
.sheet::before { /* margin rule */
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--gutter) - 32px); width: 2px;
  background: var(--margin); box-shadow: 5px 0 0 0 rgba(231,162,160,.45);
}
.sheet::after { /* punched holes showing the bench */
  content: ""; position: absolute; top: 40px; bottom: 40px; left: 34px; width: 26px;
  background: radial-gradient(circle at 13px 13px, var(--bench) 0 10px, rgba(0,0,0,.18) 11px, transparent 12px) 0 0 / 26px 120px repeat-y;
}
.sheet-head {
  display: flex; flex-wrap: wrap; gap: 10px 36px; align-items: baseline;
  padding: 34px 0 0;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.sheet-head .field { display: flex; align-items: baseline; gap: 10px; }
.sheet-head .val {
  font-family: var(--hand); font-size: 22px; letter-spacing: 0; text-transform: none; color: var(--pen);
  border-bottom: 1.5px solid var(--rule); padding: 0 10px 0 6px; line-height: 1.2;
}

/* ---------- page head ---------- */
.page-head { position: relative; padding: 46px 0 8px; }
.page-head h1 { font-size: clamp(38px, 5.2vw, 74px); line-height: 1; margin: 18px 0 24px -3px; max-width: 13em; }
.lede { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.5; max-width: 32em; }
.u { white-space: nowrap; padding-bottom: .08em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9c40-5 90-6 140-4s100 3 154-3' fill='none' stroke='%23b8352a' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") 0 100% / 100% .28em no-repeat; }
.stamp {
  display: inline-block; font-family: var(--mono); font-weight: 600; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); border: 2px solid currentColor; border-radius: 4px; padding: 5px 10px 4px;
  transform: rotate(var(--rot, -2deg)); background: rgba(255,255,255,.35);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 1.7'/%3E%3C/filter%3E%3Crect width='120' height='60' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 1.7'/%3E%3C/filter%3E%3Crect width='120' height='60' filter='url(%23n)'/%3E%3C/svg%3E");
  white-space: nowrap;
}
.tape {
  position: absolute; width: 96px; height: 28px; background: var(--tape); z-index: 3;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
  background-image: linear-gradient(90deg, rgba(255,255,255,.25), transparent 30%, rgba(255,255,255,.2) 70%, transparent);
}
.tape.tc { top: -14px; left: 50%; margin-left: -40px; width: 80px; transform: rotate(-3deg); }
.sticky {
  position: relative; background: var(--sticky); padding: 22px 22px 20px; color: var(--ink);
  box-shadow: 0 1px 1px rgba(0,0,0,.12), 0 16px 22px -12px rgba(0,0,0,.4);
  transform: rotate(var(--rot, -2deg));
  font-size: 15.5px; line-height: 1.5;
}
.sticky .big { font-family: var(--hand); font-weight: 700; font-size: 27px; line-height: 1.05; display: block; margin-bottom: 8px; }
.privacy { position: absolute; right: 8px; bottom: -44px; width: 270px; background: var(--sticky-pink); }
.note { font-family: var(--hand); color: var(--pen); font-size: 22px; line-height: 1.15; display: inline-block; transform: rotate(-2deg); margin: 0; }

/* ---------- degree strip ---------- */
.degrees { padding: 30px 0 8px; }
.tally { margin: 0 0 22px 4px; }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 26px; }
.deg-card {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 22px 20px 18px; text-decoration: none; color: var(--ink);
  background-color: var(--card);
  border-top: 5px solid var(--sc, var(--red));
  box-shadow: 0 1px 2px rgba(0,0,0,.15), 0 16px 26px -16px rgba(0,0,0,.45);
  transform: rotate(var(--rot, 0deg));
  transition: transform .25s ease, box-shadow .25s ease;
}
.deg-card:hover, .deg-card:focus-visible { transform: rotate(0deg) translateY(-5px); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.15), 0 26px 34px -18px rgba(0,0,0,.5); }
.deg-logo { height: 46px; display: flex; align-items: center; margin-bottom: 8px; }
.deg-logo .logo { max-height: 46px; width: auto; max-width: 100%; object-fit: contain; }
.deg-logo .logo-uwm { height: 46px; }
.deg-label { display: flex; align-items: baseline; gap: 10px; }
.deg-abbr { font-family: var(--serif-d); font-size: 44px; line-height: 1; }
.deg-year { font-size: 26px; color: var(--pen); transform: rotate(-3deg); display: inline-block; }
.deg-school { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 6px 0 4px; line-height: 1.4; }
.deg-field { font-size: 15px; line-height: 1.4; margin: 0 0 10px; }
.deg-count { font-family: var(--mono); font-size: 12px; color: var(--ink-2); margin: auto 0 0; line-height: 1.5; display: flex; flex-direction: column; gap: 2px; border-top: 1.5px dashed var(--rule); padding-top: 8px; }
.deg-count .big-n { font-size: 13px; color: var(--ink); }
.deg-count strong { font-family: var(--hand); font-size: 28px; color: var(--red); font-weight: 700; line-height: 1; margin-right: 2px; }
.deg-card.mini { grid-column: 1 / -1; display: grid; grid-template-columns: 150px auto 1fr auto; align-items: center; gap: 4px 22px; padding: 16px 22px; background-image: none; background-color: var(--legal); }
.deg-card.mini .deg-logo { margin: 0; }
.deg-card.mini .deg-abbr { font-size: 30px; }
.deg-card.mini .deg-school { display: none; }
.deg-card.mini .deg-field { margin: 0; }
.deg-card.mini .deg-count { margin: 0; border: 0; padding: 0; }
.deg-card.mini .deg-year { white-space: nowrap; }
.wordmark {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif-d); font-size: 22px; line-height: 1; letter-spacing: .01em;
  color: #fff; background: var(--wc, var(--ink)); padding: 9px 14px 8px; border-radius: 6px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}
.wordmark.big { font-size: 24px; }

/* ---------- controls ---------- */
.controls {
  position: relative; margin: 48px 0 10px; padding: 0 0 18px;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 24px; align-items: end;
  border-bottom: 2px solid rgba(184,53,42,.45);
}
.view-tabs { display: flex; gap: 6px; }
.view-tabs [role=tab] {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 10px 16px 12px; border: 0; border-radius: 9px 9px 0 0;
  font-family: var(--mono); font-size: 14px; font-weight: 500;
  background: var(--tab-2);
  box-shadow: inset 0 -8px 10px -8px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.5);
  transform: translateY(5px); transition: transform .18s ease;
}
.view-tabs [role=tab]:nth-child(2) { background: var(--tab-3); }
.view-tabs [role=tab]:hover { transform: translateY(1px); }
.view-tabs [role=tab][aria-selected=true] { transform: translateY(0); background: var(--sticky); font-weight: 600; }
svg.ui { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.search { display: flex; align-items: center; gap: 10px; border-bottom: 2px solid var(--rule); padding: 0 4px 4px; color: var(--pen); min-width: 0; }
.search input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-family: var(--hand); font-size: 23px; color: var(--pen); padding: 2px 0;
}
.search input::placeholder { color: rgba(36,71,166,.5); }
.search:focus-within { border-bottom-color: var(--pen); }
.chip-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip-label { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); width: 70px; flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1.5px solid rgba(29,38,51,.28); background: rgba(255,254,250,.85); border-radius: 999px;
  padding: 4px 12px 4px; font-family: var(--mono); font-size: 12.5px; line-height: 1.4; color: var(--ink);
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.chip:hover { border-color: var(--pen); color: var(--pen); }
.chip[aria-pressed=true] { background: var(--sticky); border-color: var(--ink); transform: rotate(-1.5deg); }
.chip .n { font-size: 11px; color: var(--ink-2); }
.chip .chip-ico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chip.more, .chip.clear { border-style: dashed; color: var(--pen); }
.chip.clear { color: var(--red); }
.chip.mat-chip { border-color: rgba(36,71,166,.5); }
.result-count { grid-column: 1 / -1; margin: 2px 0 0; font-family: var(--hand); color: var(--red); font-size: 20px; }
.empty { font-family: var(--hand); font-size: 24px; color: var(--red); padding: 40px 0; }

/* ---------- timeline ---------- */
.timeline { position: relative; padding: 26px 0 10px; }
.timeline::before { /* the pen line, now (top) to fall 2000 (bottom) */
  content: ""; position: absolute; left: var(--line-x); top: 0; bottom: 40px; width: 3px; margin-left: -1.5px;
  background: linear-gradient(var(--pen), var(--pen) 92%, rgba(36,71,166,0));
  border-radius: 2px; opacity: .75;
}
.deg { position: relative; padding-bottom: 18px; }
.deg-head {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 8px 26px; align-items: center;
  margin: 34px 0 18px; padding: 20px 24px;
  background: var(--card);
  border-left: 8px solid var(--sc, var(--red));
  box-shadow: 0 1px 2px rgba(0,0,0,.15), 0 18px 28px -18px rgba(0,0,0,.45);
}
.deg-head .deg-logo { margin: 0; height: 60px; justify-content: center; }
.deg-head .deg-logo .logo { max-height: 60px; }
.deg-head h2 { font-size: clamp(28px, 3vw, 40px); }
.deg-head .yr { color: var(--pen); font-size: .85em; display: inline-block; transform: rotate(-4deg); margin-left: 4px; }
.deg-sub { margin: 8px 0 0; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); max-width: 44em; }
.deg-head .stamp { align-self: start; }
.term { position: relative; display: grid; grid-template-columns: var(--lab) minmax(0, 1fr); column-gap: var(--lgap); padding: 16px 0 14px; }
.term-label { position: relative; text-align: right; padding-top: 6px; }
.term-label h3 { font-size: 25px; line-height: 1.05; color: var(--ink); transform: rotate(-3deg); }
.term-label .n { display: block; font-family: var(--mono); font-size: 11px; color: var(--ink-2); margin-top: 6px; line-height: 1.4; }
.term-label .dot {
  position: absolute; top: 14px; right: calc(-1 * var(--lgap) / 2 - 8px); width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--pen); box-shadow: 0 0 0 4px var(--paper);
}
/* compact slips: one line per course, magnified near the reading line */
.rows { display: flex; flex-direction: column; gap: 7px; padding-top: 2px; }
.slot { scroll-margin-top: 40vh; }
.row {
  --m: 0;
  appearance: none; -webkit-appearance: none; border: 0; margin: 0; cursor: pointer;
  width: 100%; text-align: left; color: var(--ink);
  display: grid; grid-template-columns: 28px auto minmax(0, 1fr) auto 18px; align-items: center; gap: 12px;
  padding: 7px 12px 7px 9px; border-radius: 3px;
  background: var(--card);
  border-left: 4px solid var(--tint);
  box-shadow: 0 1px 1px rgba(0,0,0,.12), 0 calc(4px + var(--m) * 14px) calc(8px + var(--m) * 16px) calc(-6px - var(--m) * 6px) rgba(0,0,0,.42);
  transform-origin: 0 50%;
  transform: translateX(calc(var(--m) * 22px)) scale(calc(1 + var(--m) * .11)) rotate(calc(var(--rot, 0deg) * (1 - var(--m))));
  transition: transform .14s ease-out, box-shadow .14s ease-out, background-color .25s ease;
  position: relative; z-index: calc(1 + var(--m) * 10);
  will-change: transform;
}
.row:hover { background-color: #fffdf2; }
.row.on {
  background: linear-gradient(100deg, transparent 6px, rgba(255,229,107,.55) 14px, rgba(255,229,107,.55) calc(100% - 20px), transparent calc(100% - 6px)), var(--card);
}
.row.on .ico { animation: wobble .55s cubic-bezier(.3,1.6,.5,1); }
@keyframes wobble { 0% { transform: rotate(0) scale(1); } 35% { transform: rotate(-14deg) scale(1.15); } 70% { transform: rotate(8deg); } 100% { transform: none; } }
.row .ico.sm { width: 28px; height: 28px; }
.r-code { font-family: var(--mono); font-weight: 600; font-size: 13px; color: var(--red); white-space: nowrap; }
.r-code.uni { font-family: var(--serif-d); font-weight: 400; font-size: 14px; color: var(--sc); }
.r-title { font-family: var(--serif); font-size: 16px; line-height: 1.3; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.r-who { font-family: var(--hand); color: var(--pen); font-size: 16.5px; line-height: 1.1; white-space: nowrap; min-width: 0; max-width: 10.5em; overflow: hidden; text-overflow: ellipsis; }
.r-mat svg.ui { width: 16px; height: 16px; color: var(--pen); opacity: .75; }
.row.kind-research { background-color: var(--legal); }
.row.kind-transfer .r-code::after { content: "transfer"; margin-left: 8px; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; border: 1.2px solid currentColor; border-radius: 3px; padding: 0 4px; vertical-align: 1px; }
.js .row:not(.in) { opacity: 0; }
.row.in { animation: slipIn .5s cubic-bezier(.25,1.3,.5,1) var(--d, 0s) backwards; }
@keyframes slipIn { from { opacity: 0; transform: translateX(-26px) rotate(-2deg); } }

/* tap to unfold (narrow screens) */
.more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s cubic-bezier(.3,1.2,.5,1); }
.more-in { overflow: hidden; min-height: 0; padding: 0 4px; }
.slot.open .more { grid-template-rows: 1fr; }
.slot.open .more-in { padding: 12px 4px 10px; }
.slot.open .more .card { animation: dropIn .45s cubic-bezier(.25,1.45,.5,1); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-18px) rotate(-3deg) scale(.96); } }

/* the lens: sticky full card beside the list */
.lens { display: none; }
@media (min-width: 1100px) {
  .timeline { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 390px); column-gap: 64px; align-items: start; }
  .lens { display: block; position: sticky; top: 22px; padding-top: 34px; z-index: 20; }
  .lens-hint { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
  .lens-where { margin: 0 0 12px; font-size: 22px; color: var(--red); transform: rotate(-2deg); transform-origin: left; }
  .lens-stage { position: relative; display: grid; }
  .lens-stage > .card { grid-area: 1 / 1; align-self: start; box-shadow: 0 2px 3px rgba(0,0,0,.15), 0 26px 40px -22px rgba(0,0,0,.55); }
  .lens-stage > .card.leaving { pointer-events: none; }
  .lens-stage > .card::before { /* tape */
    content: ""; position: absolute; top: -12px; left: 50%; width: 92px; height: 24px; margin-left: -46px;
    background: var(--tape); transform: rotate(-3deg); box-shadow: 0 1px 2px rgba(0,0,0,.08);
  }
  .lens .card h3 { font-size: 25px; }
  .lens .desc { font-size: 16px; }
  .lens-count { margin: 16px 0 0; font-family: var(--mono); font-size: 12px; color: var(--ink-2); text-align: right; }
}
.origin { margin: 18px 0 0 calc(var(--line-x) - 10px); color: var(--red); font-size: 22px; position: relative; padding-left: 28px; transform: rotate(-2deg); }
.origin::before { content: ""; position: absolute; left: 0; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--paper); }

/* index card */
.card {
  position: relative; display: flex; flex-direction: column;
  padding: 14px 20px 16px;
  background-color: var(--card);
  box-shadow: 0 1px 2px rgba(0,0,0,.15), 0 14px 22px -14px rgba(0,0,0,.42);
  transform: rotate(var(--rot, 0deg));
  transition: transform .25s ease, box-shadow .25s ease;
  scroll-margin-top: 30px;
}
.card:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 0 1px 2px rgba(0,0,0,.15), 0 22px 30px -16px rgba(0,0,0,.45); }
.card:target { outline: 3px solid var(--hl-yellow); outline-offset: 4px; }
.card-top {
  display: flex; align-items: center; gap: 12px;
  margin: 0 -20px 12px; padding: 0 20px 10px; background: var(--card);
  border-bottom: 2px solid rgba(184,53,42,.55);
}
.ico {
  flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--tint, var(--tab-8)); color: var(--ink);
  box-shadow: inset 0 0 0 2px rgba(29,38,51,.12);
}
.ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 28px; height: 28px; }
.ico.sm svg { width: 17px; height: 17px; }
.ids { display: flex; flex-direction: column; min-width: 0; }
.code { font-family: var(--mono); font-weight: 600; font-size: 16px; color: var(--red); letter-spacing: .02em; line-height: 1.25; }
.school-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); line-height: 1.4; display: inline-flex; align-items: center; gap: 6px; }
.school-tag::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--sc, var(--ink-2)); }
.card h3 { font-size: 21px; line-height: 1.2; margin: 0 0 8px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 8px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.meta .who { color: var(--pen); font-family: var(--hand); font-size: 18px; line-height: 1.1; }
.meta .who::before { content: "with "; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.desc { font-size: 15.5px; line-height: 26px; margin: 0 0 10px; color: #2c3442;
  background-image: repeating-linear-gradient(transparent 0 24px, rgba(64,120,168,.2) 24px 25px, transparent 25px 26px); }
.mnote { font-family: var(--hand); color: var(--pen); font-size: 16.5px; line-height: 1.25; margin: 0 0 10px; transform: rotate(-.6deg); }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: auto; padding-top: 4px; }
.mat {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .01em;
  color: var(--pen); text-decoration: none;
  border: 2px solid var(--pen); border-radius: 6px; padding: 5px 11px 5px 9px;
  background: rgba(191,227,255,.35);
  transition: background .15s ease, transform .15s ease;
}
.mat:hover, .mat:focus-visible { background: var(--pen); color: #fff; transform: rotate(-1deg); }
.mat.sm { font-size: 12px; padding: 3px 9px 3px 7px; border-width: 1.5px; }
.mat.sm svg.ui { width: 15px; height: 15px; }
.src { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.src-syllabus { background: linear-gradient(100deg, transparent .2em, var(--hl-green) .35em, var(--hl-green) calc(100% - .35em), transparent calc(100% - .15em)); padding: 1px 6px; color: var(--ink); }
.src-materials { background: linear-gradient(100deg, transparent .2em, var(--hl-yellow) .35em, var(--hl-yellow) calc(100% - .35em), transparent calc(100% - .15em)); padding: 1px 6px; color: var(--ink); }
.card.kind-research { background-color: var(--legal); }
.card.kind-research .card-top { background: var(--legal); }
.card.kind-transfer { background-color: #fbf6e9; box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 10px 18px -14px rgba(0,0,0,.4); }
.card.kind-transfer::after { content: "transfer"; position: absolute; right: 14px; top: 14px; font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--red); border: 1.5px solid currentColor; border-radius: 3px; padding: 1px 6px; transform: rotate(4deg); opacity: .8; }

/* ---------- table ---------- */
.table-wrap { padding: 22px 0 10px; }
.course-table { width: 100%; border-collapse: collapse; background: rgba(255,254,250,.92); box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 18px 28px -20px rgba(0,0,0,.4); font-size: 15px; }
.course-table thead th {
  position: sticky; top: 0; z-index: 2; background: var(--card);
  font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2);
  text-align: left; padding: 12px 12px 10px; border-bottom: 2px solid rgba(184,53,42,.55);
}
.course-table td { padding: 8px 12px; border-bottom: 1px solid rgba(64,120,168,.2); vertical-align: middle; line-height: 1.4; }
.course-table tbody tr:not(.grp):hover td { background: rgba(255,229,107,.28); }
.course-table tr.grp th { text-align: left; padding: 22px 12px 8px; font-family: var(--hand); font-size: 23px; font-weight: 700; color: var(--pen); background: transparent; border-bottom: 1.5px solid var(--rule); }
.t-term { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; color: var(--ink-2); }
.t-code { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--red); white-space: nowrap; }
.t-school { font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.sdot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--sc); margin-right: 7px; }
.t-in { display: flex; align-items: center; gap: 10px; }
.t-in .ico { flex: none; }
.t-who { font-family: var(--hand); font-size: 17px; color: var(--pen); }

/* ---------- loose papers ---------- */
.loose { padding: 54px 0 10px; }
.loose h2 { font-size: clamp(30px, 3.4vw, 44px); margin-bottom: 10px; }
.loose > p { max-width: 40em; font-size: 16px; }
.loose-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.loose-list li { display: flex; flex-direction: column; gap: 4px; background: var(--card); padding: 12px 16px 14px; border-left: 4px solid var(--tab-1); box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 10px 18px -14px rgba(0,0,0,.4); transform: rotate(var(--rot, 0deg)); font-size: 14.5px; line-height: 1.45; }
.loose-name { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13.5px; font-weight: 600; color: var(--pen); text-decoration: none; }
.loose-name:hover { text-decoration: underline; }

/* ---------- foot ---------- */
.sheet-foot { margin-top: 56px; padding-top: 22px; border-top: 2px solid var(--rule); font-size: 15px; color: var(--ink-2); max-width: 52em; }
.go { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.go::after { content: " \2191"; }
.noscript { max-width: 600px; margin: 20px auto; color: var(--bench-ink); font-family: var(--mono); }
.noscript a { color: var(--sticky); }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(16px) rotate(var(--rot, 0deg)); transition: opacity .55s ease var(--d, 0s), transform .7s cubic-bezier(.25,1.2,.5,1) var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: rotate(var(--rot, 0deg)); }
.js .deg-card.reveal.in:hover, .js .deg-card.reveal.in:focus-visible { transform: rotate(0deg) translateY(-5px); }
.js .deg-head.reveal { transform: translateX(-14px); }
.js .deg-head.reveal.in { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal, .js .deg-head.reveal { opacity: 1; transform: rotate(var(--rot, 0deg)); }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .page-head { padding-right: 0; }
  .privacy { position: relative; right: auto; top: auto; width: auto; max-width: 420px; margin: 26px 0 6px 6px; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  :root { --lab: 104px; --lgap: 36px; }
  .deg-head { grid-template-columns: 120px minmax(0, 1fr); }
  .deg-head .stamp { grid-column: 2; justify-self: start; }
  .controls { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --gutter: 46px; --pad-r: 16px; --lab: 0px; --lgap: 0px; --line-x: 8px; }
  body { padding: 10px 0 30px; font-size: 17px; }
  .sheet { margin: 0 8px; }
  .sheet::after { left: 9px; width: 18px; background: radial-gradient(circle at 9px 9px, var(--bench) 0 6px, rgba(0,0,0,.18) 7px, transparent 8px) 0 0 / 18px 96px repeat-y; }
  .sheet::before { left: calc(var(--gutter) - 12px); }
  .sheet-head { gap: 6px 16px; padding-top: 22px; }
  .sheet-head .val { font-size: 18px; }
  .page-head { padding-top: 30px; }
  .page-head h1 { font-size: 38px; }
  .strip { gap: 22px 14px; }
  .deg-card { padding: 18px 14px 14px; }
  .deg-abbr { font-size: 34px; }
  .deg-year { font-size: 21px; }
  .deg-field { font-size: 13.5px; }
  .deg-logo { height: 38px; }
  .deg-logo .logo { max-height: 38px; }
  .deg-card.mini { grid-template-columns: auto 1fr; gap: 6px 14px; }
  .deg-card.mini .deg-field, .deg-card.mini .deg-count { grid-column: 1 / -1; }
  .view-tabs [role=tab] { padding: 9px 13px 11px; font-size: 13.5px; }
  .search input { font-size: 20px; }
  .chip-label { width: 100%; }
  .chip-row { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 2px 2px 6px; margin: 0 -2px; flex-direction: row; }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip-row .chip { flex: none; white-space: nowrap; }
  .chip-row .chip-label { display: none; }
  .deg-card.mini .deg-logo { display: none; }
  .deg-card.mini { grid-template-columns: 1fr; }
  .timeline { padding-left: 0; }
  .deg-head { grid-template-columns: 1fr; padding: 16px 16px 16px 18px; margin-left: 0; }
  .deg-head .deg-logo { justify-content: flex-start; height: 36px; }
  .deg-head .deg-logo .logo { max-height: 36px; }
  .deg-head .stamp { grid-column: 1; }
  .term { grid-template-columns: minmax(0, 1fr); padding-left: 26px; }
  .term-label { text-align: left; padding: 0 0 12px; }
  .term-label h3 { font-size: 23px; transform: rotate(-2deg); transform-origin: left; }
  .term-label .n { display: inline; margin-left: 10px; }
  .term-label .dot { left: -26px; right: auto; top: 6px; }
  .rows { gap: 8px; }
  .row { grid-template-columns: 28px auto minmax(0, 1fr) 16px; grid-template-areas: "ico code who mat" "ico title title title"; gap: 1px 10px; padding: 8px 10px 9px 8px; }
  .row .ico { grid-area: ico; align-self: start; margin-top: 2px; }
  .row .r-code { grid-area: code; }
  .row .r-who { grid-area: who; justify-self: start; max-width: 100%; font-size: 15.5px; }
  .row .r-mat { grid-area: mat; }
  .row .r-title { grid-area: title; white-space: normal; font-size: 15.5px; }
  .row { transform: translateX(calc(var(--m) * 8px)) scale(calc(1 + var(--m) * .05)) rotate(calc(var(--rot, 0deg) * (1 - var(--m)))); }
  .card { padding: 12px 15px 14px; }
  .card-top { margin: 0 -15px 10px; padding: 0 15px 9px; }
  .card h3 { font-size: 19.5px; }
  .origin { margin-left: 0; }

  /* the table becomes a stack of small cards */
  .course-table, .course-table tbody, .course-table tr, .course-table td { display: block; width: 100%; }
  .course-table { background: transparent; box-shadow: none; }
  .course-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .course-table tr.grp { display: block; }
  .course-table tr.grp th { display: block; padding: 18px 2px 6px; }
  .course-table tbody tr:not(.grp) {
    display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: center;
    background: var(--card); margin: 10px 0; padding: 10px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 10px 16px -12px rgba(0,0,0,.4);
  }
  .course-table td { border: 0; padding: 0; width: auto; }
  .t-code { grid-column: 1; grid-row: 1; }
  .t-term { grid-column: 2; grid-row: 1; }
  .t-school { grid-column: 3; grid-row: 1; justify-self: end; }
  .t-title { grid-column: 1 / -1; grid-row: 2; padding: 4px 0 !important; font-size: 15.5px; }
  .t-who { grid-column: 1 / 3; grid-row: 3; }
  .t-who:empty { display: none; }
  .t-mat { grid-column: 3; grid-row: 3; justify-self: end; }
  .t-mat .muted { display: none; }
}

/* Online courses: the university leads, the platform is the small print */
.code.uni { font-family: var(--serif-d); font-weight: 400; font-size: 17px; letter-spacing: 0; color: var(--sc); }
.card.kind-online { border-top: 3px double var(--sc); }
.card.kind-online .card-top { border-bottom-style: dashed; }
.deg-logo .logo-jhu { max-height: 40px; }
