:root {
  --bg: #F4F8FB;
  --fg: #0C2233;
  --accent: #2E6FA9;
  --accent-dark: #1A4270;
  --accent-light: #7ab0dd;
  --signal: #B1301F;
  --muted: #5a6a78;
  --border: #d9e2ea;
  --card: #ffffff;
  --dark: #0C2233;
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--fg);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.15rem; font-weight: 600; }

p { color: var(--fg); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

/* Status strip */
.status-strip {
  background: var(--dark);
  color: #c0d2e0;
  font-size: 0.82rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.status-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.status-dot {
  width: 7px;
  height: 7px;
  background: var(--signal);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(177, 48, 31, 0.2);
}

/* Header */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 24px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
}

.brand-word {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.brand-word.small { font-size: 1rem; }

.site-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--fg);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}

.site-nav a:hover { border-color: var(--accent); }
.site-nav a.active { border-color: var(--accent); color: var(--accent); }

/* Hero */
.hero {
  padding: 64px 0 72px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-copy .eyebrow { margin-bottom: 20px; }
.hero-copy h1 { margin-bottom: 20px; }

.lede {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 62ch;
}

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
}

.eyebrow.light { color: var(--accent-light); }

.hero-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.hero-meta > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 500;
}

.meta-value {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
}

.hero-art {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 10px 40px -12px rgba(12, 34, 51, 0.18);
  aspect-ratio: 1 / 1;
  background: #E4EEF6;
}

.handwritten-note {
  margin-top: 28px;
  opacity: 0.8;
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-alt {
  background: #ffffff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-dark {
  background: var(--dark);
  color: #ffffff;
}

.section-dark h2, .section-dark .light { color: #ffffff; }
.section-dark p, .section-dark .light-p { color: #c0d2e0; }
.section-dark a.inline-link.light { color: var(--accent-light); border-color: var(--accent-light); }

.section-head {
  max-width: 760px;
  margin-bottom: 48px;
}

.section-head .eyebrow { margin-bottom: 14px; display: inline-block; }
.section-head h2 { margin-bottom: 16px; }
.section-intro { color: var(--muted); font-size: 1.02rem; }

/* Directory cards */
.directory {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.dir-card {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 36px 32px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.18s, transform 0.18s;
}

.dir-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.dir-num {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.dir-list {
  list-style: none;
  margin: 6px 0 10px;
  padding: 0;
}

.dir-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.93rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.dir-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 1px;
  background: var(--accent);
}

.dir-link {
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: auto;
}

/* Two col */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
  align-items: start;
}

.two-col h2 { margin-top: 12px; margin-bottom: 20px; }
.two-col-body p { margin-bottom: 16px; color: var(--muted); }
.two-col-body p:first-child { color: var(--fg); font-size: 1.05rem; }

.two-col-art {
  margin-top: 24px;
  background: #fff;
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 4px;
}

.inline-link {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

/* Metrics */
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
  margin-bottom: 32px;
}

.metric {
  padding: 32px 28px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
}

.metric-value {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--accent-light);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.metric-label {
  color: #c0d2e0;
  font-size: 0.94rem;
  line-height: 1.55;
}

.footnote-light {
  color: #9ab0c1;
  font-size: 0.85rem;
  max-width: 72ch;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footnote-light a { color: var(--accent-light); border-color: var(--accent-light); }

/* CTA */
.cta {
  text-align: left;
  max-width: 680px;
}

.cta h2 { margin-bottom: 16px; }
.cta p { color: var(--muted); margin-bottom: 20px; font-size: 1.02rem; }

/* Page head */
.page-head {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border);
}

.page-head .eyebrow { margin-bottom: 14px; display: inline-block; }
.page-head h1 { margin-bottom: 18px; max-width: 24ch; }
.page-head .lede { max-width: 66ch; }

.in-page-nav {
  margin-top: 24px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.in-page-nav a {
  font-family: var(--font-head);
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.in-page-nav a:hover { color: var(--accent); }

/* Service blocks */
.service-block { max-width: 840px; }

.service-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.service-num {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--accent);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}

.service-block p { color: var(--muted); margin-bottom: 20px; font-size: 1rem; }
.service-block h3 { margin: 24px 0 12px; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg); }

.spec-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.spec-list li {
  padding: 16px 20px;
  background: var(--bg);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  font-size: 0.95rem;
  color: var(--muted);
}

.section-alt .spec-list li { background: #fff; }

.spec-list strong { color: var(--fg); font-weight: 600; }

.service-note {
  margin-top: 24px;
  padding: 14px 18px;
  background: transparent;
  border: 1px dashed var(--border);
  font-size: 0.88rem;
  color: var(--muted);
  border-radius: 2px;
}
.service-note strong { color: var(--fg); font-weight: 600; }

/* Approach principles */
.narrow { max-width: 780px; }

.narrow > h2 { margin-bottom: 24px; }
.narrow > p { margin-bottom: 18px; color: var(--muted); }

.principle {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.principle:last-child { border-bottom: none; }

.principle h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.principle-num {
  color: var(--accent);
  font-weight: 700;
  font-family: var(--font-head);
}

.principle p { color: var(--muted); }

/* Cadence */
.cadence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}
.cadence-block {
  padding: 24px 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.cadence-label {
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.cadence-block h3 { margin-bottom: 10px; font-size: 1.05rem; }
.cadence-block p { color: var(--muted); font-size: 0.93rem; }

/* Footnote */
.fn-ref { font-size: 0.7em; color: var(--accent); font-weight: 600; }
.footnote {
  font-size: 0.85rem;
  color: var(--muted);
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

/* Stage list */
.stage-list {
  list-style: none;
  padding: 0;
  counter-reset: stage;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stage-list li {
  counter-increment: stage;
  padding: 28px 0 28px 64px;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.stage-list li:last-child { border-bottom: none; }

.stage-list li::before {
  content: counter(stage, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 30px;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.stage-list h3 { margin-bottom: 8px; }
.stage-list p { color: var(--muted); }

/* Fit list */
.fit-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.fit-list li {
  padding-left: 22px;
  position: relative;
  color: var(--muted);
  line-height: 1.6;
}
.fit-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.fit-list strong { color: var(--fg); font-weight: 600; }

/* Protocol tables */
.protocol-group { margin-bottom: 56px; }
.protocol-group-head { margin-bottom: 16px; }
.protocol-group-head h2 { margin-bottom: 6px; font-size: 1.3rem; }
.protocol-group-head p { color: var(--muted); font-size: 0.92rem; }

.protocol-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.protocol-table th,
.protocol-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.protocol-table thead th {
  background: var(--bg);
  font-family: var(--font-head);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.protocol-table tbody tr:last-child td { border-bottom: none; }
.protocol-table td:first-child {
  font-family: var(--font-head);
  color: var(--accent-dark);
  font-weight: 600;
  white-space: nowrap;
}
.protocol-table td:nth-child(3),
.protocol-table td:nth-child(4),
.protocol-table td:nth-child(5) {
  color: var(--muted);
  white-space: nowrap;
}
.protocol-footnote {
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 72ch;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Casework */
.case-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 32px;
  overflow: hidden;
}
.case-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.case-id {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}
.case-meta {
  font-size: 0.86rem;
  color: var(--muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.case-body { padding: 28px; }
.case-section { margin-bottom: 24px; }
.case-section:last-child { margin-bottom: 0; }
.case-section h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
  font-weight: 600;
}
.case-section p { color: var(--fg); font-size: 0.96rem; }
.case-metrics {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 12px 0 16px;
}
.case-metrics li {
  padding: 18px 20px;
  background: var(--bg);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cm-val {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--accent-dark);
  letter-spacing: -0.01em;
}
.cm-lbl {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}
.case-note {
  font-size: 0.86rem;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-style: italic;
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: #c0d2e0;
  padding: 48px 0;
  margin-top: 0;
}

.site-footer .brand-word { color: #fff; }

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: end;
}

.footer-note {
  color: #9ab0c1;
  font-size: 0.9rem;
  margin-top: 8px;
  max-width: 48ch;
}
.footer-note.muted-small { font-size: 0.8rem; color: #7a8d9c; margin-top: 4px; }

.footer-meta {
  text-align: right;
  font-size: 0.88rem;
  color: #9ab0c1;
}

.footer-meta p { margin-bottom: 4px; color: inherit; }
.footer-meta a { color: #9ab0c1; }
.footer-meta a:hover { color: #fff; }

/* 404 */
.error-section { padding: 96px 0; }
.error-inner { text-align: center; }
.error-inner svg { margin-bottom: 24px; }
.error-inner .eyebrow { display: inline-block; margin-bottom: 14px; }
.error-inner h1 { margin-bottom: 16px; max-width: 28ch; margin-left: auto; margin-right: auto; }
.error-inner p { color: var(--muted); margin-bottom: 24px; max-width: 52ch; margin-left: auto; margin-right: auto; }

/* Responsive */
@media (max-width: 960px) {
  .hero-meta { grid-template-columns: repeat(2, 1fr); }
  .cadence-grid { grid-template-columns: 1fr; }
  .case-metrics { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { max-width: 460px; }
  .directory { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .metrics { grid-template-columns: 1fr; gap: 20px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
  .section { padding: 56px 0; }
  .page-head { padding: 48px 0 32px; }
  .protocol-table { font-size: 0.82rem; }
  .protocol-table th, .protocol-table td { padding: 10px 12px; }
}

@media (max-width: 640px) {
  .protocol-table thead { display: none; }
  .protocol-table, .protocol-table tbody, .protocol-table tr, .protocol-table td { display: block; width: 100%; }
  .protocol-table tr {
    border-bottom: 1px solid var(--border);
    padding: 10px 14px;
  }
  .protocol-table tr:last-child { border-bottom: none; }
  .protocol-table td { border: none; padding: 3px 0; white-space: normal; }
  .protocol-table td:first-child { margin-bottom: 4px; }
  .protocol-table td:nth-child(2) { color: var(--fg); font-weight: 500; margin-bottom: 4px; }
  .protocol-table td:nth-child(3)::before { content: "rev. "; color: var(--muted); }
  .protocol-table td:nth-child(4)::before { content: "reviewed "; color: var(--muted); }
  .protocol-table td:nth-child(5)::before { content: "owner "; color: var(--muted); }
  .protocol-table td:nth-child(3),
  .protocol-table td:nth-child(4),
  .protocol-table td:nth-child(5) { display: inline-block; font-size: 0.82rem; margin-right: 12px; }
}

@media (max-width: 520px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .site-nav { gap: 14px; font-size: 0.85rem; }
  .hero-meta { grid-template-columns: 1fr 1fr; gap: 18px; }
  .dir-card { padding: 28px 24px; }
  .stage-list li { padding-left: 48px; }
  .case-head { padding: 18px 20px; }
  .case-body { padding: 22px 20px; }
}