:root {
  --bg: #f2f2f2;
  --bg-deep: #e6e6e6;
  --card: #ffffff;
  --ink: #111111;
  --ink-2: #333333;
  --muted: #5c5c5c;
  --line: #cfcfcf;
  --line-strong: #111111;
  --blue: #0051BA;
  --blue-2: #003e8f;
  --blue-soft: #e7eef8;
  --rust: #333333;
  --rust-soft: #ececec;
  --green: #1a1a1a;
  --green-soft: #e8e8e8;
  --amber: #333333;
  --amber-soft: #e8e8e8;
  --shadow: none;
  --serif: "freight-display-pro", Georgia, "Palatino Linotype", serif;
  --text: "freight-text-pro", Georgia, "Palatino Linotype", serif;
  --sans: "halyard-text", "Segoe UI", Arial, sans-serif;
  --mono: Consolas, "Cascadia Mono", monospace;
  --max: 1100px;
  --header: 4.2rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue-2); text-underline-offset: 0.18em; }
a:hover { color: var(--blue); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: 0; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(2rem, 3.4vw, 2.7rem); margin: 0 0 0.85rem; }
h2 { font-size: clamp(1.55rem, 2.4vw, 2rem); margin: 2.2rem 0 0.7rem; }
h3 { font-size: 1.25rem; margin: 1.5rem 0 0.4rem; }
p { margin: 0 0 0.9rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }
li { margin: 0.28rem 0; }
code, .mono { font-family: var(--mono); font-size: 0.86em; }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink); color: white; padding: 0.5rem 0.8rem; z-index: 20;
}
.skip:focus { top: 0.6rem; }

.wrap { width: min(var(--max), calc(100% - 2.4rem)); margin-inline: auto; }

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--blue);
  border-bottom: 3px solid #111111;
}
.site-header::before { content: none; }
.header-inner {
  min-height: var(--header);
  display: flex; align-items: center; gap: 1.25rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: #fff; margin-right: auto; }
.brand-mark {
  width: 2.3rem; height: 2.3rem; flex: none;
  border: 1px solid #fff; border-radius: 0;
  display: grid; place-items: center; background: #fff;
}
.brand-mark svg { width: 1.35rem; height: 1.35rem; }
.brand strong { display: block; font-family: var(--sans); font-weight: 600; font-size: 0.98rem; letter-spacing: 0; line-height: 1.15; color: #fff; }
.brand em { display: block; font-style: normal; font-family: var(--sans); color: rgba(255,255,255,0.82); font-size: 0.75rem; letter-spacing: 0.03em; text-transform: none; }

.nav { display: flex; gap: 0.15rem; align-items: center; }
.nav a {
  font-family: var(--sans); font-size: 0.92rem; font-weight: 500;
  text-decoration: none; color: #fff;
  padding: 0.4rem 0.7rem; border-radius: 0;
}
.nav a:hover { background: rgba(255,255,255,0.14); color: #fff; }
.nav a[aria-current="page"] { background: #003e8f; color: #fff; }

.nav-toggle {
  display: none;
  font-family: var(--sans); font-weight: 600;
  border: 1px solid #fff; background: transparent; color: #fff;
  padding: 0.4rem 0.75rem; border-radius: 0; cursor: pointer;
}

.hero { padding: 3.2rem 0 2.2rem; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 0.85fr; gap: 2.5rem; align-items: start; }
.eyebrow, .kicker, .crumb {
  font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 0.85rem;
}
.eyebrow span { color: var(--blue-2); }
.lede { font-family: "freight-display-pro", Georgia, serif; font-weight: 300; font-size: 1.35rem; line-height: 1.45; color: var(--ink-2); max-width: 42rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.4rem; }

.btn {
  font-family: var(--sans); font-weight: 600; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.65rem 1rem; border-radius: 0; border: 1px solid var(--ink);
}
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-2); border-color: var(--blue-2); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); }
.btn-ghost:hover { background: var(--bg-deep); }

.toc {
  list-style: none; margin: 0; padding: 0.4rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 0;
  box-shadow: var(--shadow);
}
.toc a {
  display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.15rem 0.65rem;
  text-decoration: none; color: inherit;
  padding: 0.48rem 0.7rem; border-radius: 0;
}
.toc a:hover { background: var(--blue-soft); }
.toc span { font-family: var(--sans); font-weight: 600; color: var(--blue-2); font-size: 0.82rem; grid-row: span 2; align-self: center; }
.toc b { font-family: var(--sans); font-weight: 600; font-size: 0.92rem; letter-spacing: -0.01em; }
.toc em { grid-column: 2; font-style: normal; font-family: var(--sans); font-size: 0.75rem; color: var(--muted); }

.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat-row div { padding: 1.15rem 1rem 1.2rem 0; }
.stat-row div + div { border-left: 1px solid var(--line); padding-left: 1.15rem; }
.stat-row b { display: block; font-family: var(--serif); font-size: 1.85rem; font-weight: 600; letter-spacing: -0.03em; }
.stat-row span { display: block; font-family: var(--sans); font-size: 0.86rem; color: var(--muted); line-height: 1.35; margin-top: 0.15rem; }

.section { padding: 3.2rem 0; }
.section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1.3rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; max-width: 36rem; color: var(--ink-2); }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.card, .mod-card, .course-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 0; padding: 1.15rem 1.15rem 1.2rem;
}
.card h3 { margin-top: 0.35rem; }
.card .num {
  font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue-2); font-weight: 600;
}
.card p:last-child { margin-bottom: 0; color: var(--ink-2); }

.principle {
  background: #111111; color: #ffffff; border-radius: 0; padding: 1.6rem 1.7rem;
  border-top: 4px solid var(--blue);
}
.principle p { font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.35; letter-spacing: 0; margin: 0; }
.principle span { display: block; margin-top: 0.8rem; font-family: var(--sans); font-size: 0.86rem; letter-spacing: 0.04em; text-transform: none; color: #c8c8c8; }

.mod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem; }
.mod-card { display: flex; flex-direction: column; gap: 0.45rem; text-decoration: none; color: inherit; min-height: 100%; transition: border-color 0.15s, transform 0.15s; }
.mod-card:hover { border-color: var(--blue); color: inherit; }
.mod-card .id { font-family: var(--sans); font-weight: 600; color: var(--blue-2); font-size: 0.82rem; }
.mod-card h3 { margin: 0; font-size: 1.28rem; }
.mod-card p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }
.mod-card .meta { margin-top: auto; padding-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }

.pills { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.85rem; }
.pill {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em;
  border-radius: 0; padding: 0.18rem 0.5rem; background: var(--bg-deep); color: var(--ink-2);
}
.pill-field { background: var(--blue-soft); color: var(--blue-2); }
.pill-supply { background: var(--rust-soft); color: var(--rust); }
.pill-ok { background: var(--green-soft); color: var(--green); }
.pill-taught { background: var(--blue-soft); color: var(--blue-2); }
.pill-ready { background: var(--amber-soft); color: var(--amber); }

.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.course-card h3 { margin: 0.2rem 0 0.35rem; }
.course-card .where { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.course-card ol { margin: 0.6rem 0 0; padding-left: 1.1rem; }
.course-card a { text-decoration: none; font-weight: 600; }
.course-card a:hover { text-decoration: underline; }

.page { padding: 2.4rem 0 4rem; }
.page-intro { max-width: 46rem; margin-bottom: 1.6rem; }
.page-intro h1 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--blue-2); }

.rule-list { display: grid; gap: 0.75rem; }
.rule {
  display: grid; grid-template-columns: 4.2rem 1fr; gap: 0.8rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 0; padding: 1rem 1.1rem;
}
.rule b { font-family: var(--sans); font-size: 0.95rem; color: var(--blue-2); }
.rule h3 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.rule p { margin: 0; color: var(--ink-2); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 0; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: #ffffff; background: var(--ink); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: rgba(26, 25, 22, 0.025); }

.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.4rem 0 1rem; }
.filters button {
  font-family: var(--sans); font-size: 0.85rem; font-weight: 600;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  border-radius: 0; padding: 0.35rem 0.75rem; cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--ink); color: #ffffff; border-color: var(--ink); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 18.5rem; gap: 1.6rem; align-items: start; }
.prose h2 { scroll-margin-top: 5.5rem; }
.prose h2:first-child { margin-top: 0.3rem; }
.prose ul li { margin: 0.28rem 0; }
.prose .outcome {
  border: 1.5px solid var(--ink); border-radius: 0; overflow: hidden; margin: 1.2rem 0 1.4rem; background: var(--card);
}
.prose .outcome p { margin: 0; }
.outcome-title {
  margin: 0; background: var(--ink); color: #ffffff;
  font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.45rem 0.8rem; border-bottom: 3px solid var(--blue);
}
.outcome p:not(.outcome-title) { padding: 0.8rem 0.9rem 0.9rem; }
.steps { padding-left: 0; list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative; padding: 0.15rem 0 0.85rem 2.6rem;
  border-left: 1px solid var(--line); margin-left: 0.7rem;
}
.steps li::before {
  content: counter(step); position: absolute; left: -0.75rem; top: 0;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--ink); color: #ffffff; font-family: var(--sans); font-size: 0.75rem;
  display: grid; place-items: center;
}
.steps li:last-child { border-left-color: transparent; }

.downloads { display: grid; gap: 0.5rem; }
.download {
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  text-decoration: none; color: inherit;
  border: 1px solid var(--line); background: var(--card); border-radius: 0; padding: 0.75rem 0.9rem;
}
.download:hover { border-color: var(--blue); }
.download b { display: block; font-family: var(--sans); font-weight: 600; font-size: 0.95rem; }
.download span { display: block; color: var(--muted); font-family: var(--sans); font-size: 0.8rem; }
.download i { font-style: normal; font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue-2); }

.rail { position: sticky; top: 5.4rem; display: grid; gap: 0.8rem; }
.facts { background: var(--card); border: 1px solid var(--line); border-radius: 0; padding: 0.9rem 1rem; margin: 0; }
.facts div { padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0.12rem 0 0; font-size: 0.95rem; }
.rail-nav { font-family: var(--sans); font-size: 0.88rem; }
.rail-nav a { display: flex; gap: 0.45rem; text-decoration: none; color: var(--ink-2); padding: 0.22rem 0; }
.rail-nav a strong { color: var(--blue-2); font-weight: 600; width: 1.6rem; }
.rail-nav a[aria-current="page"] { color: var(--ink); }

.bars { display: grid; gap: 0.7rem; margin: 1rem 0 1.4rem; }
.bar-row { display: grid; grid-template-columns: 9.5rem 1fr; gap: 0.7rem; align-items: center; }
.bar-row span { font-family: var(--sans); font-size: 0.86rem; }
.track { display: grid; gap: 0.28rem; }
.track i { display: block; height: 0.55rem; border-radius: 0; width: calc(var(--w) * 1%); }
.track i.before { background: #b9c8ee; }
.track i.after { background: var(--blue); }
.legend { display: flex; gap: 1rem; font-family: var(--sans); font-size: 0.8rem; color: var(--muted); margin-bottom: 0.4rem; }
.swatch { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; margin-right: 0.3rem; vertical-align: -1px; }
.swatch.before { background: #b9c8ee; }
.swatch.after { background: var(--blue); }

.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.6rem; }
.time {
  background: var(--card); border-top: 3px solid var(--blue); border-radius: 0; padding: 0.8rem;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line);
}
.time b { display: block; font-family: var(--sans); font-size: 0.85rem; }
.time p { margin: 0.35rem 0 0; font-size: 0.92rem; color: var(--ink-2); }

.callout {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue);
  border-radius: 0; padding: 0.9rem 1rem; color: var(--ink);
}
.callout p:last-child { margin-bottom: 0; }
.prose h3 { font-family: var(--sans); font-size: 1.05rem; letter-spacing: 0; text-transform: none; font-weight: 600; color: #111; }
.callout strong { font-family: var(--sans); }
.note {
  font-family: var(--sans); font-size: 0.88rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 0.8rem;
}

details.fold { background: var(--card); border: 1px solid var(--line); border-radius: 0; padding: 0.7rem 0.9rem; margin: 0.8rem 0 1rem; }
details.fold summary { cursor: pointer; font-family: var(--sans); font-weight: 600; }
details.fold p, details.fold ul { margin-top: 0.7rem; }

.framework-fig { background: white; border: 1px solid var(--line); border-radius: 0; padding: 0.8rem; }
.framework-fig img, .framework-fig svg { width: 100%; height: auto; }

.team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
.person { background: var(--card); border: 1px solid var(--line); border-radius: 0; padding: 0.85rem 1rem; }
.person b { display: block; font-family: var(--sans); }
.person span { color: var(--muted); font-family: var(--sans); font-size: 0.88rem; }

.ack { background: #fff; border-top: 1px solid var(--line); padding: 2.2rem 0 1.8rem; }
.ack h2 { font-size: 1.45rem; margin: 0 0 0.7rem; }
.ack p { max-width: 44rem; }
.ack-logos { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem 2.2rem; margin: 1.3rem 0 0; padding: 0; }
.ack-logos a { display: flex; align-items: center; line-height: 0; }
.ack-logos img { height: 2.55rem; width: auto; max-width: none; object-fit: contain; }
.ack-logos .logo-nsf { height: 4.4rem; }

.site-footer { border-top: 3px solid var(--blue); padding: 2rem 0 1.4rem; margin-top: 0; background: #1a1a1a; color: #d5d5d5; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 0.8fr; gap: 1.5rem; }
.site-footer strong { font-family: var(--sans); color: #fff; }
.site-footer p, .site-footer a { font-family: var(--sans); font-size: 0.9rem; }
.site-footer a { display: block; text-decoration: none; color: #fff; margin: 0.2rem 0; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-base { margin-top: 1.2rem; padding-top: 0.8rem; border-top: 1px solid #3a3a3a; }
.footer-base p { color: #b5b5b5; font-size: 0.82rem; margin: 0; }

.hidden { display: none !important; }

@media (max-width: 980px) {
  .hero-grid, .cards-3, .mod-grid, .course-grid, .layout, .footer-grid, .team, .timeline, .stat-row {
    grid-template-columns: 1fr;
  }
  .stat-row div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .rail { position: static; }
  .bar-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--blue); border-bottom: 3px solid #111; padding: 0.5rem 1.2rem 0.9rem;
  }
  .nav.is-open { display: flex; }
  .header-inner { position: relative; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mod-card { transition: none; }
}
