:root {
  --color-ink: #001E5B;
  --color-primary: #022AC0;
  --color-accent-1: #066AFE;
  --color-accent-2: #7CB1FE;
  --color-accent-3: #A8CBFF;
  --color-accent-4: #CB65FF;
  --color-accent-5: #7526E3;
  --color-accent-6: #1AB9FF;
  --color-lilac: #E9E0FC;
  --color-bg: #F7F9FD;
  --color-surface: #FFFFFF;
  --color-border: #E2E8F5;
  --font-family: Arial, Helvetica, sans-serif;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 1px 3px rgba(0, 30, 91, 0.08), 0 1px 2px rgba(0, 30, 91, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--color-ink);
  background: var(--color-bg);
}

a { color: var(--color-primary); }

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--color-ink);
  color: #fff;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 16px;
}

.sidebar-brand-mark {
  background: linear-gradient(135deg, var(--color-accent-1), var(--color-accent-5));
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}

.sidebar-brand-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  text-decoration: none;
}

.sidebar-brand-name:hover { color: var(--color-accent-3); }

.global-search { position: relative; margin: 0 0 18px; }
.global-search-label {
  display: block;
  margin: 0 8px 7px;
  color: var(--color-accent-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.global-search-input-wrap { position: relative; }
.global-search-input {
  width: 100%;
  height: 40px;
  padding: 0 36px 0 36px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 9px;
  background: rgba(255,255,255,0.09);
  color: #fff;
  font: 13px Arial, sans-serif;
}
.global-search-input::placeholder { color: rgba(255,255,255,0.58); }
.global-search-input:focus { border-color: var(--color-accent-2); outline: 2px solid rgba(124,177,254,0.28); }
.global-search-icon { position: absolute; left: 13px; top: 12px; width: 14px; height: 14px; border: 2px solid var(--color-accent-3); border-radius: 50%; pointer-events: none; }
.global-search-icon::after { content: ""; position: absolute; right: -5px; bottom: -3px; width: 6px; height: 2px; background: var(--color-accent-3); transform: rotate(45deg); }
.global-search-shortcut { position: absolute; right: 10px; top: 10px; padding: 2px 6px; border: 0; border-radius: 4px; background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.72); font: 11px Arial, sans-serif; }
.global-search-results {
  position: fixed;
  z-index: 20;
  left: 16px;
  top: 126px;
  width: min(420px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 150px));
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(0,30,91,0.28);
}
.global-search-result { display: grid; gap: 4px; padding: 11px 12px; border-radius: 8px; color: var(--color-ink); text-decoration: none; }
.global-search-result:hover, .global-search-result.is-active { background: #edf4ff; }
.global-search-result-title { font-size: 14px; font-weight: 700; line-height: 1.3; }
.global-search-result-meta { color: #657590; font-size: 11px; line-height: 1.35; }
.global-search-empty { margin: 0; padding: 18px 12px; color: #657590; font-size: 13px; }

.nav-section {
  margin-bottom: 4px;
}

.nav-section-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  padding: 4px 4px 4px 8px;
  border-radius: 8px;
}

.nav-section-summary::-webkit-details-marker {
  display: none;
}

.nav-section-summary:hover {
  background: rgba(255,255,255,0.06);
}

.nav-section-label {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-accent-3);
  padding: 8px 0;
  font-weight: 700;
  text-decoration: none;
  flex: 1;
}

.nav-section-label.is-active {
  color: #fff;
}

.nav-caret {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-accent-3);
  border-bottom: 2px solid var(--color-accent-3);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

details[open] > .nav-section-summary .nav-caret {
  transform: rotate(45deg);
}

.nav-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0 0 0 6px;
  max-height: 60vh;
  overflow-y: auto;
}

.nav-group-label {
  margin: 14px 10px 5px;
  color: var(--color-accent-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.35;
  text-transform: uppercase;
}

.nav-link {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.35;
}

.nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.nav-link.is-active {
  background: var(--color-accent-1);
  color: #fff;
  font-weight: 600;
}

/* Content */
.content {
  flex: 1;
  padding: 48px 56px;
  max-width: 1200px;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.block-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-accent-5);
  margin: 0 0 6px;
}

.block-heading {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--color-ink);
}

.block-note {
  font-size: 13px;
  color: #5a6b8c;
}

.source-note {
  font-size: 12px;
  color: #8896b3;
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
}

/* Hero */
.block-hero-title {
  font-size: 40px;
  font-weight: 800;
  margin: 0 0 16px;
  color: var(--color-ink);
}

.block-hero-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
}

.block-hero-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

/* Welcome */
.block-welcome {
  position: relative;
  background: linear-gradient(135deg, var(--color-lilac), #ffffff);
  border-radius: var(--radius-lg);
  padding: 48px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 220px;
}

.welcome-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.welcome-label {
  margin: 0 0 8px;
  color: var(--color-accent-5);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.welcome-message {
  max-width: 560px;
  margin: 10px 0 0;
  color: #405170;
  font-size: 15px;
  line-height: 1.5;
}

.welcome-glow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  z-index: 0;
}

.welcome-heading {
  position: relative;
  z-index: 1;
  font-size: 34px;
  font-weight: 800;
  margin: 0;
}

.welcome-mascot {
  position: relative;
  z-index: 1;
  width: 140px;
  height: auto;
}

/* Landing splash */
.block-splash {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  align-items: center;
  min-height: 430px;
  padding: 56px;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 20%, rgba(26,185,255,0.32), transparent 33%),
    radial-gradient(circle at 60% 90%, rgba(203,101,255,0.25), transparent 38%),
    linear-gradient(135deg, #fff 5%, #eef5ff 52%, #e9e0fc 100%);
  border: 1px solid rgba(6,106,254,0.12);
}

.splash-copy { position: relative; z-index: 2; }
.splash-title {
  max-width: 700px;
  margin: 0 0 18px;
  font-size: clamp(46px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.055em;
}
.splash-description {
  max-width: 620px;
  margin: 0 0 28px;
  color: #405170;
  font-size: 20px;
  line-height: 1.45;
}
.splash-network {
  position: relative;
  width: 260px;
  height: 260px;
  justify-self: center;
}
.splash-network::before,
.splash-network::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 190px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(6,106,254,0.35), transparent);
  transform-origin: center;
}
.splash-network::before { transform: translate(-50%, -50%) rotate(35deg); }
.splash-network::after { transform: translate(-50%, -50%) rotate(-35deg); }

.splash-network-ring {
  position: absolute;
  inset: 22px;
  border: 2px solid rgba(6,106,254,0.22);
  border-radius: 50%;
  transform: rotate(28deg) scaleY(0.48);
}
.splash-network-ring-two {
  inset: 4px 42px;
  border-color: rgba(117,38,227,0.24);
  transform: rotate(-32deg) scaleY(0.55);
}
.splash-network-node {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 4px solid rgba(255,255,255,0.9);
  border-radius: 50%;
  background: var(--color-accent-1);
  box-shadow: 0 8px 20px rgba(2,42,192,0.25);
}
.splash-network-node-center {
  top: 50%;
  left: 50%;
  width: 84px;
  height: 84px;
  background: radial-gradient(circle at 35% 30%, var(--color-accent-6), var(--color-accent-1) 48%, var(--color-accent-5));
  transform: translate(-50%, -50%);
}
.splash-network-node-one { top: 34px; left: 58px; }
.splash-network-node-two { top: 52px; right: 36px; background: var(--color-accent-4); }
.splash-network-node-three { bottom: 35px; left: 42px; background: var(--color-accent-6); }
.splash-network-node-four { right: 50px; bottom: 46px; background: var(--color-accent-5); }

/* TOC */
.toc-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.toc-list li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14px;
}

/* Person cards, shared by hub + org columns */
.person-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.person-card-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.person-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-lilac);
  margin: 0 auto 8px;
  display: block;
}

.person-card-inline .person-photo {
  margin: 0;
}

.person-photo-lg {
  width: 96px;
  height: 96px;
}

.person-name {
  font-weight: 700;
  font-size: 14px;
}

.person-title {
  font-size: 12.5px;
  color: #5a6b8c;
  margin-top: 2px;
}

.person-clouds {
  font-size: 12px;
  color: var(--color-accent-5);
  font-weight: 600;
  margin-top: 2px;
}

/* Leadership hub */
.hub-lead {
  text-align: center;
  margin-bottom: 28px;
}

.hub-lead .person-name {
  font-size: 18px;
  margin-top: 10px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

/* Org columns */
.sponsor-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.org-groups {
  display: flex;
  align-items: stretch;
  gap: 20px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.org-group {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
}

.org-group-has-partner {
  background: var(--color-lilac);
  border-radius: var(--radius-lg);
  padding: 16px 16px 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.org-columns {
  display: grid;
  gap: 12px;
  align-items: stretch;
}

.org-column {
  display: grid;
  grid-template-rows: 44px 170px 170px;
  gap: 12px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 14px;
}

.org-column-label {
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.org-column .person-card {
  height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.group-connector {
  height: 2px;
  background: var(--color-accent-5);
  opacity: 0.4;
  margin: 16px 24px 0;
}

.partner-card {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 88px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 12px auto 0;
  max-width: 340px;
  width: 340px;
}

.partners-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--color-accent-5);
  margin: 0 0 10px;
}

/* Stat table */
.block-accountability {
  font-size: 14px;
  color: #5a6b8c;
  margin-bottom: 20px;
  max-width: 900px;
}

.stat-table-wrap {
  overflow-x: auto;
}

.stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.stat-table th,
.stat-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.stat-table th {
  background: var(--color-ink);
  color: #fff;
  font-weight: 600;
  position: sticky;
  top: 0;
}

.stat-row-total {
  background: var(--color-lilac);
  font-weight: 700;
}

/* Vision / Values / Methods */
.vvm-link {
  display: inline-block;
  margin-left: 14px;
  font-size: 13px;
  font-weight: 600;
  vertical-align: middle;
}

.vvm-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
}

.vvm-column-heading {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent-5);
  margin: 0 0 12px;
}

.vvm-column-heading-spaced {
  margin-top: 28px;
}

.vvm-vision-text {
  font-size: 15px;
  line-height: 1.6;
  color: #2a3a5c;
  white-space: pre-line;
}

.vvm-footnote {
  font-size: 12px;
  color: #8896b3;
  margin-top: 12px;
}

.value-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.value-pill {
  background: var(--color-accent-1);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
}

.method-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.method-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
}

.method-number {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-accent-5);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Diagram */
.diagram-wrap {
  position: relative;
  max-width: 1100px;
}

.diagram-image {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
}

.diagram-callout {
  position: absolute;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: sparkle-in 0.5s ease forwards;
  animation-delay: 0.15s;
}

@keyframes sparkle-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Diagram toggle tabs */
.diagram-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.diagram-tab {
  appearance: none;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 4px 12px;
  margin-right: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #5a6b8c;
  cursor: pointer;
}

.diagram-tab:hover {
  color: var(--color-ink);
}

.diagram-tab.is-active {
  color: var(--color-ink);
  border-bottom-color: var(--color-accent-1);
}

.diagram-view {
  display: none;
  animation: fade-in 0.25s ease;
}

.diagram-view.is-active {
  display: block;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Project stub pages */
.stub-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 10px;
}

.stub-contributors {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 12px;
}

.stub-snippet {
  font-size: 15px;
  line-height: 1.6;
  color: #2a3a5c;
  max-width: 800px;
  margin: 0 0 20px;
}

.stub-pending {
  font-size: 13px;
  color: #8896b3;
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  max-width: 700px;
}

/* Full project pages */
.project-header {
  max-width: 900px;
  margin-bottom: 32px;
}

.project-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.project-contributors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 18px;
  color: #5a6b8c;
}

.project-contributors p { margin: 0; }

.project-slide,
.overview-slide {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(520px, 1.65fr);
  gap: 44px;
  padding: 30px 0 44px;
  border-top: 1px solid var(--color-border);
}

.project-slide-number {
  margin: 0 0 8px;
  color: var(--color-accent-5);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-slide-title,
.overview-slide h2 {
  margin: 0 0 24px;
  font-size: 24px;
  line-height: 1.15;
}

.project-section { margin: 0 0 22px; }
.project-section h3 {
  margin: 0 0 7px;
  font-size: 12px;
  color: var(--color-accent-5);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.project-section p,
.overview-slide p {
  margin: 0 0 10px;
  color: #2a3a5c;
  font-size: 15px;
  line-height: 1.55;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.project-links a {
  display: inline-flex;
  gap: 7px;
  padding: 9px 13px;
  border: 1px solid var(--color-accent-2);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.overview-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
}
.overview-images img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.project-carousel {
  min-width: 0;
  align-self: start;
}

.carousel-viewport {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.carousel-slide {
  display: none;
  width: 100%;
  margin: 0;
}

.carousel-slide.is-active {
  display: block;
  animation: fade-in 0.22s ease;
}

.carousel-slide a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

.carousel-slide img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 640px;
  object-fit: contain;
}

.carousel-slide figcaption {
  padding: 10px 14px;
  color: #647493;
  font-size: 12px;
  line-height: 1.4;
  border-top: 1px solid var(--color-border);
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 30, 91, 0.14);
  border-radius: 50%;
  background: rgba(255,255,255,0.94);
  color: var(--color-ink);
  font: 32px/1 Arial, sans-serif;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 3px 12px rgba(0,30,91,0.16);
}
.carousel-arrow:hover { background: var(--color-accent-1); color: #fff; }
.carousel-arrow-prev { left: 14px; }
.carousel-arrow-next { right: 14px; }

.carousel-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 34px;
  padding-top: 10px;
}
.carousel-dots { display: flex; gap: 7px; }
.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #bcc7dc;
  cursor: pointer;
}
.carousel-dot.is-active { background: var(--color-accent-1); }
.carousel-count { color: #647493; font-size: 12px; font-weight: 700; }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-accent-6);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .content { padding: 24px; }
  .vvm-grid { grid-template-columns: 1fr; }
  .project-slide,
  .overview-slide { grid-template-columns: 1fr; }
  .overview-images { grid-template-columns: 1fr; }
  .carousel-viewport,
  .carousel-slide a { min-height: 240px; }
  .block-splash { grid-template-columns: 1fr; padding: 34px; }
  .splash-network { display: none; }
  .global-search-results { top: 132px; }
}
