:root {
  --bg: #fbfaf7;
  --bg-alt: #f1efe9;
  --surface: #ffffff;
  --text: #1c2230;
  --muted: #56607a;
  --line: #dcd8ce;
  --accent: #1f5f8b;
  --accent-ink: #ffffff;
  --accent-soft: #e2edf5;
  --hero-bg: #13263a;
  --hero-text: #f3f1ea;
  --hero-muted: #b9c4d2;
  --c1: #1f5f8b;
  --c2: #b3591b;
  --c3: #3e7a4a;
  --code-bg: #f4f2ec;
  --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 4px 14px rgba(20, 30, 50, .05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151c;
    --bg-alt: #161b24;
    --surface: #1b212c;
    --text: #e6e8ee;
    --muted: #a3acbd;
    --line: #2c3442;
    --accent: #7fb6de;
    --accent-ink: #0d1520;
    --accent-soft: #1d2f40;
    --hero-bg: #0b1622;
    --hero-text: #f0eee8;
    --hero-muted: #a9b6c6;
    --c1: #6aa7d6;
    --c2: #e0915a;
    --c3: #7fbf8a;
    --code-bg: #141922;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #11151c; --bg-alt: #161b24; --surface: #1b212c; --text: #e6e8ee; --muted: #a3acbd;
  --line: #2c3442; --accent: #7fb6de; --accent-ink: #0d1520; --accent-soft: #1d2f40;
  --hero-bg: #0b1622; --hero-text: #f0eee8; --hero-muted: #a9b6c6;
  --c1: #6aa7d6; --c2: #e0915a; --c3: #7fbf8a; --code-bg: #141922; --shadow: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 "Source Sans 3", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; }

h1, h2, h3 { font-family: "Source Serif 4", Georgia, serif; line-height: 1.2; font-weight: 700; }
h2 { font-size: 2rem; margin: 0 0 .5rem; }
h3 { font-size: 1.2rem; margin: 0 0 .4rem; }
h4 { margin: 0; font-size: 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.brand { font-weight: 700; letter-spacing: .04em; color: var(--text); text-decoration: none; }
.nav nav { display: flex; gap: 20px; overflow-x: auto; }
.nav nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.nav nav a:hover { color: var(--text); }
.nav nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
@media (max-width: 860px) { .nav nav { gap: 14px; } .nav nav a { font-size: .88rem; } }
@media (max-width: 640px) {
  .nav { height: auto; flex-direction: column; align-items: flex-start; gap: 2px; padding-top: 10px; padding-bottom: 8px; }
  .nav nav { width: 100%; gap: 16px; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
}

/* Hero */
.hero { background: var(--hero-bg); color: var(--hero-text); padding: 88px 0 80px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--hero-muted); margin: 0 0 16px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); max-width: 18ch; margin: 0 0 20px; }
.lede { font-size: 1.2rem; max-width: 58ch; color: var(--hero-muted); margin: 0 0 28px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 32px; color: var(--hero-text); }
.hero-links { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 6px; font-weight: 600; text-decoration: none;
  background: #f3f1ea; color: #13263a; border: 1px solid #f3f1ea;
}
.btn:hover { background: #ffffff; }
.btn-ghost { background: transparent; color: var(--hero-text); border-color: rgba(243, 241, 234, .45); }
.btn-ghost:hover { background: rgba(243, 241, 234, .1); }

/* Section buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-section {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
  padding: 12px 22px; font-size: 1rem;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-section:hover { background: color-mix(in srgb, var(--accent) 82%, #000); border-color: color-mix(in srgb, var(--accent) 82%, #000); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-section:hover { background: color-mix(in srgb, var(--accent) 82%, #fff); border-color: color-mix(in srgb, var(--accent) 82%, #fff); }
}
:root[data-theme="dark"] .btn-section:hover { background: color-mix(in srgb, var(--accent) 82%, #fff); border-color: color-mix(in srgb, var(--accent) 82%, #fff); }
@media (max-width: 520px) { .btn-row { flex-direction: column; } .btn-section { text-align: center; } }

/* Page header for interior pages */
.page-hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  padding: 52px 0 44px;
}
.page-hero .eyebrow { color: var(--muted); margin-bottom: 10px; }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 14px; max-width: 22ch; }
.page-hero .lede { color: var(--muted); font-size: 1.12rem; max-width: 70ch; margin: 0; }
.page-hero + section, .page-hero + section.alt { padding-top: 56px; }

/* Sections */
section { padding: 72px 0; }
section.alt { background: var(--bg-alt); }
.section-intro { color: var(--muted); max-width: 70ch; margin: 0 0 32px; font-size: 1.05rem; }
.small { font-size: .92rem; color: var(--muted); }

.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 28px; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 24px; box-shadow: var(--shadow);
}
.card ul { padding-left: 1.1rem; margin: .4rem 0 0; }
.card li { margin: .2rem 0; }
.card p:last-child { margin-bottom: 0; }

.facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; }
.facts dt { font-weight: 700; color: var(--muted); font-size: .9rem; padding-top: 1px; }
.facts dd { margin: 0; }

.wrap.narrow { max-width: 780px; }
.two-col > aside > .card + .card { margin-top: 20px; }
.sidecard p:last-child { margin-bottom: 0; }

.grid { display: grid; gap: 20px; }
.modules { grid-template-columns: repeat(2, 1fr); }
.three { grid-template-columns: repeat(3, 1fr); }
.two-up { grid-template-columns: repeat(2, 1fr); margin-top: 20px; }
.cardlinks { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .three, .cardlinks { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .modules, .two-up, .three, .cardlinks { grid-template-columns: 1fr; } }

.link-card { text-decoration: none; color: inherit; display: block; transition: border-color .15s ease, transform .15s ease; }
.link-card h3 { color: var(--accent); }
.link-card p { color: var(--muted); margin-bottom: 0; }
.link-card:hover { border-color: var(--accent); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .link-card:hover { transform: none; } }

.pagelink { margin-top: 32px; font-weight: 600; }

.module { position: relative; padding-top: 28px; }
.module-full { margin-bottom: 24px; }
.module-full h2 { font-size: 1.5rem; margin: 0 0 .3rem; }
.module-full h3 { font-size: 1.05rem; margin-top: 1.2rem; }
ol.units, .module-full ol, .module-full ul { padding-left: 1.3rem; }
ol.units li, .module-full li { margin: .5rem 0; }
.module .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; margin-bottom: 12px;
}
.lead-by { color: var(--muted); font-size: .92rem; margin: 0 0 .6rem; font-weight: 600; }
.courses { margin-top: .8rem; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .6rem; }
.note { margin-top: 28px; padding: 16px 20px; background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 6px; max-width: 80ch; }

/* Pipeline */
.pipeline { display: flex; align-items: stretch; gap: 0; margin: 0 0 32px; }
.stage {
  flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px;
}
.stage p { margin: 4px 0 0; font-size: .92rem; color: var(--muted); }
.stage-accent { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.arrow { flex: 0 0 28px; position: relative; }
.arrow::after {
  content: ""; position: absolute; top: 50%; left: 6px; right: 6px; height: 2px; background: var(--muted);
}
.arrow::before {
  content: ""; position: absolute; top: calc(50% - 5px); right: 4px;
  border: 6px solid transparent; border-left: 8px solid var(--muted); border-right: 0;
}
@media (max-width: 760px) {
  .pipeline { flex-direction: column; }
  .arrow { flex-basis: 24px; }
  .arrow::after { top: 4px; bottom: 4px; left: 50%; right: auto; width: 2px; height: auto; }
  .arrow::before { top: auto; bottom: 2px; right: auto; left: calc(50% - 5px); border: 6px solid transparent; border-top: 8px solid var(--muted); border-bottom: 0; }
}

.code {
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 12px 14px; overflow-x: auto; font: 13px/1.55 "JetBrains Mono", ui-monospace, monospace; margin: 12px 0 0;
}
.code .c { color: var(--muted); }

.gallery-title { margin-top: 48px; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 20px; }
.gallery figure { margin: 0; }
.gallery figure.wide { grid-column: 1 / -1; }
.gallery img { border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.gallery figcaption { font-size: .92rem; color: var(--muted); margin-top: 8px; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } }

/* Gantt */
.gantt { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 20px 16px; margin-bottom: 40px; }
.g-row { display: grid; grid-template-columns: 250px 1fr; align-items: center; gap: 16px; min-height: 36px; }
.g-head { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 4px; }
.g-head .g-label { font-weight: 700; color: var(--muted); font-size: .85rem; }
.g-group { font-weight: 700; margin-top: 12px; font-size: .95rem; }
.g-label { font-size: .93rem; }
.g-track {
  position: relative; height: 26px;
  display: grid; grid-template-columns: repeat(24, 1fr);
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 2) 100%;
}
.yr, .bar { grid-row: 1; grid-column: var(--s) / calc(var(--e) + 1); }
.yr { font-size: .8rem; font-weight: 700; color: var(--muted); padding-left: 8px; align-self: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar {
  border-radius: 5px; color: #fff; font-size: .78rem; font-weight: 600; padding: 0 8px;
  display: flex; align-items: center; white-space: nowrap; overflow: hidden; margin: 0 2px;
}
.bar.c1 { background: var(--c1); }
.bar.c2 { background: var(--c2); }
.bar.c3 { background: var(--c3); }
.bar.soft { background: transparent; color: var(--text); border: 2px solid; }
.bar.c1.soft { border-color: var(--c1); }
.bar.c2.soft { border-color: var(--c2); }
.bar.c3.soft { border-color: var(--c3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bar:not(.soft) { color: #0d1520; } }
:root[data-theme="dark"] .bar:not(.soft) { color: #0d1520; }
@media (max-width: 700px) {
  .g-row { grid-template-columns: 1fr; gap: 4px; padding: 4px 0; }
  .g-head .g-label { display: none; }
}

/* Team */
.team { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .team { grid-template-columns: 1fr; } }
.person { border-top: 3px solid var(--accent); padding-top: 14px; }
.person .role { color: var(--muted); font-weight: 600; font-size: .92rem; margin: 0 0 .5rem; }
.person p:last-child { margin: 0; }

/* Table */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
.num-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: .9rem; color: var(--muted); }
.site-footer p { max-width: 90ch; margin: 0; }
