/* =============================================================================
   PyStatR+ — Institutional Rebrand Stylesheet
   -----------------------------------------------------------------------------
   Implements the "Institutional Rebranding & Website Transformation Proposal".
   Design intent: clean, institutional, human-centered, globally credible.
   - Minimal gradients, generous whitespace, no decorative orbs/particles.
   - Flat brand colors. Deep Blue + Bright Yellow primary; Cyan accent.
   - Typography: Poppins (headings), Inter (UI/body), Roboto (fallback).
   Loaded LAST in _quarto.yml so it takes precedence over legacy styles.
   Namespace: .rb-* to avoid collisions with the legacy 14k-line stylesheet.
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@500;600;700;800&family=Roboto:wght@300;400;500;700&display=swap');

/* ---------- Design tokens ---------- */
:root {
  --rb-deep-blue: #003366;
  --rb-blue-alt: #1E3A8A;
  --rb-cyan: #38BDF8;
  --rb-yellow: #FFD700;
  --rb-yellow-soft: #FACC15;

  --rb-white: #ffffff;
  --rb-grey: #F7F9FC;
  --rb-slate: #1E293B;
  --rb-black: #0B1120;

  --rb-heading: #0B1120;
  --rb-body: #374151;
  --rb-muted: #6B7280;

  --rb-heading-dark: #ffffff;
  --rb-body-dark: #E5E7EB;
  --rb-muted-dark: #9CA3AF;

  --rb-border: #e5e7eb;
  --rb-border-dark: rgba(56, 189, 248, 0.18);

  --rb-success: #10b981;

  --rb-font-head: 'Poppins', system-ui, sans-serif;
  --rb-font-body: 'Inter', 'Roboto', system-ui, sans-serif;

  --rb-maxw: 1180px;
  --rb-radius: 14px;
  --rb-radius-sm: 10px;
  --rb-shadow: 0 1px 2px rgba(11,17,32,.06), 0 8px 24px rgba(11,17,32,.06);
  --rb-shadow-hover: 0 2px 4px rgba(11,17,32,.08), 0 16px 40px rgba(11,17,32,.12);
  --rb-pad-y: clamp(3.5rem, 7vw, 6.5rem);
}

/* ---------- Base resets for rebrand surfaces ---------- */
.rb { font-family: var(--rb-font-body); color: var(--rb-body); }
.rb * { box-sizing: border-box; }

.rb-section {
  font-family: var(--rb-font-body);
  padding: var(--rb-pad-y) 0;
  position: relative;
}
.rb-section--grey { background: var(--rb-grey); }
.rb-section--white { background: var(--rb-white); }
.rb-section--dark {
  background: var(--rb-black);
  color: var(--rb-body-dark);
}
.rb-section--blue {
  background: var(--rb-deep-blue);
  color: var(--rb-body-dark);
}

.rb-container {
  max-width: var(--rb-maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.rb-container--narrow { max-width: 820px; }

/* ---------- Typography ---------- */
.rb-label {
  display: inline-block;
  font-family: var(--rb-font-body);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rb-blue-alt);
  margin: 0 0 .9rem;
}
.rb-section--dark .rb-label,
.rb-section--blue .rb-label { color: var(--rb-cyan); }

.rb-h1 {
  font-family: var(--rb-font-head);
  font-weight: 800;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--rb-heading);
  margin: 0 0 1.25rem;
}
.rb-h2 {
  font-family: var(--rb-font-head);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -.015em;
  color: var(--rb-heading);
  margin: 0 0 1rem;
}
.rb-h3 {
  font-family: var(--rb-font-head);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--rb-heading);
  margin: 0 0 .6rem;
}
.rb-section--dark .rb-h1, .rb-section--dark .rb-h2, .rb-section--dark .rb-h3,
.rb-section--blue .rb-h1, .rb-section--blue .rb-h2, .rb-section--blue .rb-h3 {
  color: var(--rb-heading-dark);
}
.rb-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.65;
  color: var(--rb-body);
  max-width: 64ch;
  margin: 0 0 1rem;
}
.rb-section--dark .rb-lead, .rb-section--blue .rb-lead { color: var(--rb-body-dark); }
.rb-text { font-size: 1rem; line-height: 1.7; color: var(--rb-body); max-width: 68ch; }
.rb-section--dark .rb-text,
.rb-section--blue .rb-text { color: var(--rb-body-dark); }
.rb-section--dark .rb-text strong,
.rb-section--blue .rb-text strong { color: var(--rb-heading-dark); }
.rb-muted { color: var(--rb-muted); }

.rb-head { max-width: 760px; margin: 0 0 2.75rem; }
.rb-head--center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Buttons ---------- */
.rb-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--rb-font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: .9rem 1.6rem;
  min-height: 48px;
  border-radius: var(--rb-radius-sm);
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease, color .15s ease, border-color .15s ease;
}
.rb-btn:hover { transform: translateY(-2px); text-decoration: none; }
.rb-btn-primary {
  background: var(--rb-deep-blue);
  color: #fff;
}
.rb-btn-primary:hover { background: var(--rb-blue-alt); color: #fff; box-shadow: var(--rb-shadow-hover); }
.rb-btn-gold {
  background: var(--rb-yellow);
  color: var(--rb-black);
}
.rb-btn-gold:hover { background: var(--rb-yellow-soft); color: var(--rb-black); box-shadow: var(--rb-shadow-hover); }
.rb-btn-outline {
  background: transparent;
  color: var(--rb-deep-blue);
  border-color: var(--rb-deep-blue);
}
.rb-btn-outline:hover { background: var(--rb-deep-blue); color: #fff; }
.rb-section--dark .rb-btn-outline,
.rb-section--blue .rb-btn-outline {
  color: #fff;
  border-color: rgba(255,255,255,.5);
}
.rb-section--dark .rb-btn-outline:hover,
.rb-section--blue .rb-btn-outline:hover { background: #fff; color: var(--rb-deep-blue); border-color:#fff; }
.rb-btn-group { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.75rem; }

/* ---------- HERO (Section 1) ---------- */
.rb-hero {
  background: var(--rb-white);
  border-bottom: 1px solid var(--rb-border);
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
}
.rb-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.rb-hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .82rem; letter-spacing: .04em;
  color: var(--rb-blue-alt);
  background: rgba(30,58,138,.07);
  border: 1px solid rgba(30,58,138,.14);
  padding: .4rem .85rem; border-radius: 999px;
  margin-bottom: 1.5rem;
}
.rb-hero h1 {
  font-family: var(--rb-font-head);
  font-weight: 800;
  font-size: clamp(2.2rem, 4.6vw, 3.55rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--rb-heading);
  margin: 0 0 1.3rem;
}
.rb-hero h1 .rb-accent { color: var(--rb-deep-blue); }
.rb-hero-support {
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  line-height: 1.6;
  color: var(--rb-body);
  max-width: 40ch;
  margin: 0 0 1.5rem;
}
.rb-hero-statements {
  display: flex; flex-direction: column; gap: .35rem;
  margin: 0 0 .5rem;
}
.rb-hero-statements span {
  font-weight: 600; color: var(--rb-slate); font-size: .98rem;
}
.rb-hero-statements span::before {
  content: ""; display: inline-block; width: 18px; height: 2px;
  background: var(--rb-yellow); margin-right: .6rem; vertical-align: middle;
}
/* Official tagline — used lower on the page / on dark CTA surfaces */
.rb-tagline {
  margin: 1.75rem 0 0;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--rb-yellow, #FFD700);
}
.rb-hero-visual {
  border-radius: var(--rb-radius);
  overflow: hidden;
  box-shadow: var(--rb-shadow);
  border: 1px solid var(--rb-border);
  background: var(--rb-grey);
}
.rb-hero-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Generic feature/value/card grids ---------- */
.rb-grid { display: grid; gap: 1.5rem; }
.rb-grid--2 { grid-template-columns: repeat(2, 1fr); }
.rb-grid--3 { grid-template-columns: repeat(3, 1fr); }
.rb-grid--4 { grid-template-columns: repeat(4, 1fr); }

.rb-card {
  background: var(--rb-white);
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  padding: 1.9rem 1.7rem;
  box-shadow: var(--rb-shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.rb-card:hover { transform: translateY(-4px); box-shadow: var(--rb-shadow-hover); border-color: rgba(56,189,248,.45); }
.rb-card .rb-h3 { margin-bottom: .5rem; }
.rb-card p { color: var(--rb-body); line-height: 1.65; margin: 0; font-size: .98rem; }
.rb-section--dark .rb-card,
.rb-section--blue .rb-card {
  background: rgba(255,255,255,.06);
  border-color: var(--rb-border-dark);
}
.rb-section--dark .rb-card p,
.rb-section--blue .rb-card p,
.rb-section--dark .rb-card .rb-text,
.rb-section--blue .rb-card .rb-text { color: var(--rb-body-dark); }
.rb-section--dark .rb-card .rb-h3,
.rb-section--blue .rb-card .rb-h3,
.rb-section--dark .rb-card h3,
.rb-section--blue .rb-card h3,
.rb-section--dark .rb-card strong,
.rb-section--blue .rb-card strong { color: var(--rb-heading-dark); }

.rb-card-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 10px;
  background: rgba(0,51,102,.08);
  color: var(--rb-deep-blue);
  font-family: var(--rb-font-head); font-weight: 700; font-size: 1.15rem;
  margin-bottom: 1.1rem;
}
.rb-section--dark .rb-card-mark,
.rb-section--blue .rb-card-mark { background: rgba(56,189,248,.14); color: var(--rb-cyan); }
.rb-card-mark img { width: 26px; height: 26px; }

/* ---------- VISION (Section 2) ---------- */
.rb-vision .rb-h2 { max-width: 18ch; }
.rb-vision-statement {
  font-family: var(--rb-font-head);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.4;
  letter-spacing: -.01em;
  color: var(--rb-heading-dark);
  max-width: 24ch;
  border-left: 4px solid var(--rb-yellow);
  padding-left: 1.4rem;
}

/* ---------- WHY OUR WORK MATTERS (Section 4) ---------- */
.rb-why-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,3.5rem);
  align-items: center;
}
.rb-why-callout {
  background: var(--rb-deep-blue);
  color: #fff;
  border-radius: var(--rb-radius);
  padding: 2.5rem;
}
.rb-why-callout .rb-h3 { color: #fff; }
.rb-why-callout p { color: var(--rb-body-dark); line-height: 1.7; }
.rb-why-bridge {
  margin-top: 1.2rem; font-weight: 600; color: var(--rb-yellow);
}

/* ---------- INSTITUTIONAL IMPACT (Section 5) ---------- */
.rb-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }
.rb-stat {
  text-align: center;
  padding: 1.75rem 1rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--rb-border-dark);
  border-radius: var(--rb-radius);
}
.rb-stat-num {
  font-family: var(--rb-font-head); font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--rb-cyan); line-height: 1; display: block;
}
.rb-stat-label {
  display: block; margin-top: .6rem; font-size: .9rem;
  color: var(--rb-body-dark); letter-spacing: .01em;
}

/* ---------- STRATEGIC PILLARS (Section 6) ---------- */
.rb-pillar { border-top: 3px solid var(--rb-deep-blue); }
.rb-pillar:nth-child(2) { border-top-color: var(--rb-cyan); }
.rb-pillar:nth-child(3) { border-top-color: var(--rb-blue-alt); }
.rb-pillar:nth-child(4) { border-top-color: var(--rb-yellow-soft); }
.rb-pillar ul {
  list-style: none; margin: 1rem 0 0; padding: 0;
}
.rb-pillar li {
  position: relative; padding-left: 1.3rem; margin-bottom: .5rem;
  font-size: .96rem; color: var(--rb-body); line-height: 1.5;
}
.rb-pillar li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--rb-cyan);
}

/* ---------- REGIONAL COMMITMENT (Section 7) ---------- */
.rb-region { text-align: center; }
.rb-region-places {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem;
  margin-top: 2rem;
}
.rb-region-place {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .7rem 1.3rem; border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--rb-border-dark);
  color: var(--rb-body-dark); font-weight: 500;
}
.rb-region-place span { color: var(--rb-yellow); font-weight: 700; }

/* ---------- FROM KAKUMA TO CODE — timeline (Section 8) ---------- */
.rb-timeline { position: relative; margin-top: 2.5rem; }
.rb-timeline::before {
  content: ""; position: absolute; left: 120px; top: 0; bottom: 0;
  width: 2px; background: var(--rb-border);
}
.rb-tl-item {
  position: relative; display: grid; grid-template-columns: 120px 1fr;
  gap: 2rem; padding-bottom: 2.25rem;
}
.rb-tl-year {
  font-family: var(--rb-font-head); font-weight: 700; font-size: 1.15rem;
  color: var(--rb-deep-blue); text-align: right; padding-right: 1.5rem;
  padding-top: .1rem;
}
.rb-tl-body { position: relative; padding-left: 1.5rem; }
.rb-tl-body::before {
  content: ""; position: absolute; left: -6px; top: .35rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--rb-yellow); border: 2px solid var(--rb-white);
  box-shadow: 0 0 0 2px var(--rb-deep-blue);
}
.rb-tl-body .rb-h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.rb-tl-body p { color: var(--rb-body); font-size: .96rem; line-height: 1.6; margin: 0; }

/* ---------- RESPONSIBLE AI (Section 9) ---------- */
.rb-rai-tag {
  display: inline-block; padding: .35rem .9rem; border-radius: 999px;
  background: rgba(56,189,248,.14); color: var(--rb-cyan);
  font-weight: 600; font-size: .85rem; margin-bottom: 1rem;
}

/* ---------- COMMUNITY (Section 10) ---------- */
.rb-chips { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0; }
.rb-chip {
  padding: .6rem 1.2rem; border-radius: 999px;
  background: var(--rb-white); border: 1px solid var(--rb-border);
  font-weight: 600; color: var(--rb-deep-blue); font-size: .95rem;
}
.rb-section--dark .rb-chip,
.rb-section--blue .rb-chip {
  background: rgba(255,255,255,.06); border-color: var(--rb-border-dark); color: var(--rb-body-dark);
}

/* ---------- RESOURCE LIBRARY (Section 12) ---------- */
.rb-resource-card { text-align: left; }
.rb-resource-card .rb-card-mark { font-size: 1.4rem; }
.rb-resource-card a.rb-resource-link {
  display: inline-block; margin-top: 1rem; font-weight: 600;
  color: var(--rb-deep-blue); text-decoration: none;
}
.rb-resource-card a.rb-resource-link:hover { color: var(--rb-cyan); }

/* ---------- Article cards (auto-pulled latest blog posts) ---------- */
.rb-article-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.rb-article-card:hover { text-decoration: none; }
.rb-article-thumb {
  height: 150px;
  background: var(--rb-grey);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
/* Bias the cover-crop slightly above centre so portrait/headshot thumbnails
   keep the subject's face (and graphic thumbnails keep their top titles). */
.rb-article-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; display: block; }
.rb-article-thumb .rb-article-glyph { font-size: 2rem; opacity: .8; }
.rb-article-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.rb-article-cat {
  align-self: flex-start;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: .25rem .65rem; border-radius: 999px; margin-bottom: .7rem;
}
.rb-article-card h3 { font-family: var(--rb-font-head); font-weight: 600; font-size: 1.1rem; line-height: 1.3; color: var(--rb-heading); margin: 0 0 .5rem; }
.rb-article-card p { color: var(--rb-body); font-size: .95rem; line-height: 1.6; margin: 0 0 1rem; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rb-article-meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto;
  font-size: .85rem; color: var(--rb-muted); }
.rb-article-meta .rb-article-read { color: var(--rb-deep-blue); font-weight: 600; }
.rb-article-card:hover .rb-article-read { color: var(--rb-cyan); }

/* ---------- STRATEGIC ROADMAP (Section 13) ---------- */
.rb-roadmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.rb-road-col { padding-top: 1.25rem; border-top: 3px solid var(--rb-cyan); }
.rb-road-col:nth-child(2) { border-top-color: var(--rb-blue-alt); }
.rb-road-col:nth-child(3) { border-top-color: var(--rb-yellow-soft); }
.rb-road-col:nth-child(4) { border-top-color: var(--rb-success); }
.rb-road-year {
  font-family: var(--rb-font-head); font-weight: 800; font-size: 1.5rem;
  color: var(--rb-heading-dark);
}
.rb-road-phase {
  display: block; margin-top: .35rem; font-weight: 600; font-size: .9rem;
  color: var(--rb-cyan);
}
.rb-road-msg {
  margin-top: 1rem; font-size: .92rem; font-style: italic; color: var(--rb-muted-dark);
  border-top: 1px solid var(--rb-border-dark); padding-top: .85rem;
}
.rb-road-col ul { list-style: none; margin: 1rem 0 0; padding: 0; }
.rb-road-col li {
  padding-left: 1.3rem; position: relative; margin-bottom: .55rem;
  color: var(--rb-body-dark); font-size: .96rem; line-height: 1.5;
}
.rb-road-col li::before {
  content: "→"; position: absolute; left: 0; color: var(--rb-cyan); font-weight: 700;
}
/* "Available Today" — reinforces that PyStatR+ delivers value now */
.rb-road-now {
  margin-top: 1.1rem; padding: .85rem 1rem;
  border: 1px solid var(--rb-border-dark); border-left: 3px solid var(--rb-yellow);
  border-radius: 10px; background: rgba(56, 189, 248, .06);
}
.rb-road-now-label {
  display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--rb-yellow); margin-bottom: .5rem;
}
.rb-road-now-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.rb-road-now-list li {
  margin: 0; padding: .2rem .65rem; font-size: .82rem; line-height: 1.4;
  color: var(--rb-body-dark); background: rgba(255, 255, 255, .06);
  border: 1px solid var(--rb-border-dark); border-radius: 999px;
}
.rb-road-now-list li::before { content: none; }

/* ---------- FINAL CTA (Section 14) ---------- */
.rb-cta { text-align: center; }
.rb-cta .rb-h2 { color: #fff; max-width: 22ch; margin-left: auto; margin-right: auto; }
.rb-cta .rb-lead { color: var(--rb-body-dark); margin-left: auto; margin-right: auto; text-align: center; max-width: 60ch; }
.rb-cta .rb-btn-group { justify-content: center; }

/* ---------- Section divider ---------- */
.rb-rule { height: 1px; background: var(--rb-border); border: 0; margin: 0; }

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 1024px) {
  .rb-stats { grid-template-columns: repeat(3, 1fr); }
  .rb-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .rb-roadmap { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .rb-hero-grid { grid-template-columns: 1fr; }
  .rb-hero-visual { order: -1; }
  .rb-why-grid { grid-template-columns: 1fr; }
  .rb-grid--3 { grid-template-columns: 1fr; }
  .rb-grid--2 { grid-template-columns: 1fr; }
  .rb-roadmap { grid-template-columns: 1fr; }
  .rb-vision-statement { max-width: none; }
}
@media (max-width: 620px) {
  .rb-stats { grid-template-columns: repeat(2, 1fr); }
  .rb-grid--4 { grid-template-columns: 1fr; }
  .rb-timeline::before { left: 8px; }
  .rb-tl-item { grid-template-columns: 1fr; gap: .25rem; padding-left: 1.75rem; }
  .rb-tl-year { text-align: left; padding-right: 0; }
  .rb-tl-body::before { left: -1.75rem; }
  .rb-btn { width: 100%; justify-content: center; }
  .rb-btn-group { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .rb-btn, .rb-card { transition: none; }
  .rb-btn:hover, .rb-card:hover { transform: none; }
}

/* =============================================================================
   LIGHT NAVBAR — institutional white header showcasing the full-color logo.
   Overrides the legacy dark-navbar rules (loaded earlier). Clean & minimal.
   ============================================================================= */
#quarto-header > nav,
header#quarto-header .navbar {
  background: #ffffff !important;
  border-bottom: 1px solid var(--rb-border) !important;
  box-shadow: 0 1px 3px rgba(11, 17, 32, 0.06) !important;
}

/* Nav links: dark ink on white, cyan/blue on hover (no glow) */
.navbar .nav-link,
.navbar .navbar-nav .nav-link,
#quarto-header .nav-link,
.navbar-nav .nav-link {
  color: #1E293B !important;
  text-shadow: none !important;
}
.navbar .nav-link:hover,
.navbar .navbar-nav .nav-link:hover,
#quarto-header .nav-link:hover,
.navbar-nav .nav-link:hover {
  color: var(--rb-deep-blue) !important;
  text-shadow: none !important;
}

/* Active state: deep-blue text, subtle light highlight (no dark-mode glow) */
.navbar .nav-link.active,
.navbar .nav-link[aria-current="page"],
.navbar .navbar-nav .nav-link.active,
.navbar .navbar-nav .nav-link[aria-current="page"],
#quarto-header .nav-link.active,
#quarto-header .nav-link[aria-current="page"],
.navbar-nav .nav-item .nav-link.active,
.navbar-nav > li > a.nav-link.active {
  color: var(--rb-deep-blue) !important;
  background: rgba(0, 51, 102, 0.06) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* Dropdown menus: white surface, dark items */
#quarto-header .dropdown-menu,
.dropdown-menu {
  background: #ffffff !important;
  border: 1px solid var(--rb-border) !important;
  box-shadow: 0 10px 30px rgba(11, 17, 32, 0.12) !important;
}
.navbar .dropdown-item,
#quarto-header .dropdown-item,
.dropdown-menu .dropdown-item {
  color: #1E293B !important;
}
.navbar .dropdown-item:hover,
#quarto-header .dropdown-item:hover,
.dropdown-menu .dropdown-item:hover {
  background: rgba(0, 51, 102, 0.06) !important;
  color: var(--rb-deep-blue) !important;
}

/* Search input: light field, dark text */
.navbar input[type="search"],
#quarto-search input,
.navbar input {
  background: var(--rb-grey) !important;
  border: 1px solid var(--rb-border) !important;
  color: var(--rb-heading) !important;
}
#quarto-search input::placeholder,
.navbar input::placeholder { color: var(--rb-muted) !important; }

/* Search icon / nav icons inherit dark ink */
.navbar .aa-DetachedSearchButtonIcon,
.navbar .bi,
#quarto-search .aa-DetachedSearchButtonIcon { color: #1E293B !important; }

/* Mobile hamburger: dark icon + border on white */
.navbar-toggler,
.navbar .navbar-toggler {
  border-color: var(--rb-border) !important;
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%231E293B' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Navbar logo (horizontal_logo.png — light-background lockup): the visible
   lockup occupies ~60% of the canvas width and ~22% of its height, centered on a
   transparent field. Clip the brand to a window and zoom the image so the lockup
   sizes correctly; translate(-50%,-50%) centers the centered lockup in the window.
   Desktop: img height 155px → lockup ≈ 139×34px inside a 240×56 window. */
.navbar .navbar-brand,
#quarto-header .navbar-brand {
  position: relative !important;
  width: 240px !important;
  height: 56px !important;
  overflow: hidden !important;
  margin-right: 1.5rem !important;
}
.navbar .navbar-brand img,
#quarto-header .navbar-brand img {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  height: 155px !important;
  max-height: 155px !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  transform: translate(-50%, -50%) !important;
  filter: none !important;
}
/* Keep centering on hover (legacy hover sets transform: scale, which would drop the translate) */
.navbar .navbar-brand:hover img,
#quarto-header .navbar-brand:hover img {
  transform: translate(-50%, -50%) scale(1.03) !important;
}
@media (max-width: 991.98px) {
  .navbar .navbar-brand,
  #quarto-header .navbar-brand { width: 185px !important; height: 46px !important; }
  .navbar .navbar-brand img,
  #quarto-header .navbar-brand img {
    height: 123px !important; max-height: 123px !important;
    width: auto !important; max-width: none !important;
    transform: translate(-50%, -50%) !important;
  }
}

/* ============================================================ */
/* SECTION 2 — WHAT IS TECHNICAL CAPACITY (definition bridge)   */
/* Added 2026-06-04: explicit definition between Hero and Vision */
/* ============================================================ */
.rb-capacity .rb-head { margin-bottom: 1.5rem; }
.rb-capacity .rb-text { margin-left: auto; margin-right: auto; text-align: center; }
.rb-capacity-definition {
  max-width: 60ch;
  margin: 0 auto 1.6rem;
  text-align: center;
  font-weight: 600;
  color: var(--rb-deep-blue);
  border-left: 4px solid var(--rb-yellow);
  border-right: 4px solid var(--rb-yellow);
  padding: 0 1.4rem;
}
@media (max-width: 640px) {
  .rb-capacity-definition { padding: 0 1rem; border-left-width: 3px; border-right-width: 3px; }
}

/* ============================================================ */
/* WHY-TECHNICAL-CAPACITY-MATTERS — "The Experience" chapters    */
/* Added 2026-06-04: thematic, date-free story blocks           */
/* ============================================================ */
.rb-chapter {
  margin-top: 2rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--rb-yellow);
}
.rb-chapter:first-of-type { margin-top: 1.75rem; }
.rb-chapter .rb-h3 {
  margin-bottom: .5rem;
  color: var(--rb-deep-blue);
  font-size: 1.2rem;
}
.rb-chapter .rb-text { margin: 0; }

/* ============================================================ */
/* SECTION 12 — VOICES OF IMPACT (testimonials)                 */
/* Added 2026-06-04: clean institutional masonry impact grid     */
/* Aesthetic ref: Stripe / Linear / Notion — thin borders,       */
/* rounded corners, whitespace, soft hover. No gradients/glass.  */
/* ============================================================ */
.rb-voices-tabs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem;
  margin: 1.75rem auto .5rem;
}
.rb-voices-tab {
  font-family: var(--rb-font-body); font-size: .9rem; font-weight: 500;
  color: var(--rb-body); background: transparent;
  border: 1px solid var(--rb-border); border-radius: 999px;
  padding: .45rem 1.05rem; cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.rb-voices-tab:hover { border-color: var(--rb-deep-blue); color: var(--rb-deep-blue); }
.rb-voices-tab.is-active { background: var(--rb-deep-blue); border-color: var(--rb-deep-blue); color: #fff; }
.rb-voices-tab:focus-visible { outline: 2px solid var(--rb-cyan); outline-offset: 2px; }

/* Masonry impact grid (CSS multi-column — varying heights, no slider/autoplay) */
.rb-voices-masonry { column-count: 3; column-gap: 22px; margin-top: 1.5rem; }
@media (max-width: 1024px) { .rb-voices-masonry { column-count: 2; } }
@media (max-width: 640px)  { .rb-voices-masonry { column-count: 1; } }

.rb-voices-card {
  width: 100%; margin: 0 0 22px;
  break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid;
  display: flex; flex-direction: column; gap: .9rem;
  background: var(--rb-white); border: 1px solid var(--rb-border);
  border-radius: 16px; padding: 1.6rem 1.5rem;
  box-shadow: 0 1px 2px rgba(11, 17, 32, .04);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.rb-voices-card:hover { transform: translateY(-3px); border-color: #cbd5e1; box-shadow: 0 8px 24px rgba(11, 17, 32, .07); }
.rb-voices-tag {
  align-self: flex-start; font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--rb-deep-blue);
  background: var(--rb-grey); border: 1px solid var(--rb-border);
  border-radius: 999px; padding: .25rem .7rem;
}
.rb-voices-mark {
  font-family: Georgia, "Times New Roman", serif; font-size: 2.6rem;
  line-height: 1; color: var(--rb-cyan); opacity: .5;
  display: block; height: 1.2rem; margin-bottom: -.5rem;
}
.rb-voices-quote {
  font-family: var(--rb-font-body); font-size: 1.04rem; line-height: 1.6;
  color: var(--rb-heading); margin: 0; font-weight: 400;
}
.rb-voices-cite { display: flex; flex-direction: column; gap: .12rem; margin-top: .25rem; }
.rb-voices-name { font-family: var(--rb-font-head); font-weight: 600; color: var(--rb-heading); font-size: 1rem; }
.rb-voices-role { color: var(--rb-deep-blue); font-weight: 500; font-size: .92rem; }
.rb-voices-org { color: var(--rb-muted); font-size: .84rem; }
.rb-voices-readfull {
  align-self: flex-start; margin-top: .15rem;
  font-family: var(--rb-font-body); font-size: .9rem; font-weight: 600;
  color: var(--rb-deep-blue); text-decoration: none;
}
.rb-voices-readfull:hover { text-decoration: underline; }
.rb-voices-readfull:focus-visible { outline: 2px solid var(--rb-cyan); outline-offset: 2px; border-radius: 4px; }
.rb-voices-links { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.rb-voices-link { font-size: .88rem; font-weight: 600; color: var(--rb-deep-blue); text-decoration: none; }
.rb-voices-link:hover { text-decoration: underline; }
.rb-voices-empty { color: var(--rb-muted); text-align: center; padding: 2.5rem 1rem; }

/* ============================================================ */
/* IMPACT STORIES (impact-stories.qmd)                          */
/* Added 2026-06-04: outcome-driven stories, not a quote wall.  */
/* Background -> Challenge -> Experience -> Outcome -> Reflection */
/* ============================================================ */
.rb-story-featured {
  background: var(--rb-white); border: 1px solid var(--rb-border);
  border-radius: 18px; padding: 2.25rem 2.1rem; margin-top: 1.5rem;
  box-shadow: 0 1px 2px rgba(11, 17, 32, .04);
}
.rb-story-media { margin: 0 0 1.4rem; border-radius: 12px; overflow: hidden; }
.rb-story-media img { width: 100%; height: auto; display: block; }

.rb-story-card {
  display: flex; flex-direction: column; gap: 1rem;
  background: var(--rb-white); border: 1px solid var(--rb-border);
  border-radius: 16px; padding: 1.75rem 1.6rem;
  box-shadow: 0 1px 2px rgba(11, 17, 32, .04);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.rb-story-card:hover { transform: translateY(-3px); border-color: #cbd5e1; box-shadow: 0 8px 24px rgba(11, 17, 32, .07); }
.rb-section--grey .rb-story-card, .rb-section--grey .rb-story-featured { background: var(--rb-white); }

.rb-story-parts { display: flex; flex-direction: column; gap: .85rem; margin-top: 1rem; }
.rb-story-part p { margin: .15rem 0 0; color: var(--rb-body); font-size: .98rem; line-height: 1.6; }
.rb-story-k {
  display: block; font-family: var(--rb-font-body);
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--rb-deep-blue); margin-bottom: .35rem;
}
.rb-story-itw { margin-top: .25rem; }

.rb-story-reflection { margin-top: 1.3rem; }
.rb-story-pullquote {
  margin: .4rem 0 .9rem; padding: .2rem 0 .2rem 1.15rem;
  border-left: 3px solid var(--rb-yellow);
  font-family: var(--rb-font-body); font-size: 1.12rem; line-height: 1.6;
  color: var(--rb-heading); font-weight: 400;
}
.rb-story-featured .rb-story-pullquote { font-size: 1.22rem; }
.rb-story-cite { display: flex; flex-direction: column; gap: .1rem; }
.rb-story-cite .rb-voices-name { font-family: var(--rb-font-head); font-weight: 600; color: var(--rb-heading); font-size: 1rem; }
.rb-story-cite .rb-voices-role { color: var(--rb-deep-blue); font-weight: 500; font-size: .92rem; }

/* ============================================================ */
/* TEAM — "The Minds Behind the Mission" (institutional roster)  */
/* Added 2026-06-04: replaces legacy startup-style profile cards */
/* with a unified, credible leadership presentation. Photos are  */
/* standardized at display time (fixed 4:5 frame + object-fit)   */
/* so varied source crops/dimensions appear consistent.          */
/* ============================================================ */
.rb-team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}
.rb-member {
  display: flex;
  flex-direction: column;
  background: var(--rb-white);
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  overflow: hidden;
}
/* Standardized photo frame: every portrait is presented in the same
   4:5 window, cover-cropped and biased toward the top so faces are kept,
   regardless of the source image's aspect ratio or resolution. */
.rb-member-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--rb-grey);
  border-bottom: 1px solid var(--rb-border);
}
.rb-member-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}
.rb-member-body {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 1.25rem 1.25rem 1.4rem;
}
.rb-member-name {
  font-family: var(--rb-font-head);
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--rb-heading);
  margin: 0;
}
.rb-member-role {
  font-family: var(--rb-font-head);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--rb-deep-blue);
  margin: 0 0 .2rem;
}
.rb-member-bio {
  font-family: var(--rb-font-body);
  font-size: .92rem;
  line-height: 1.55;
  color: var(--rb-body);
  margin: 0;
}
.rb-member-loc {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: .55rem 0 0;
  padding-top: .7rem;
  border-top: 1px solid var(--rb-border);
  font-family: var(--rb-font-body);
  font-size: .82rem;
  color: var(--rb-muted);
}
.rb-member-loc .rb-pin {
  flex: 0 0 auto;
  color: var(--rb-cyan);
}
/* Channel list — "Available Today / Coming Q2 2027" lists inside .rb-card. */
.rb-channel-list { margin: .75rem 0 0; padding-left: 1.15rem; }
.rb-channel-list li {
  font-family: var(--rb-font-body);
  font-size: .95rem;
  line-height: 1.5;
  color: var(--rb-body);
  margin-bottom: .55rem;
}
.rb-channel-list li::marker { color: var(--rb-cyan); }
.rb-channel-list li a { color: var(--rb-deep-blue); font-weight: 600; text-decoration: none; }
.rb-channel-list li a:hover { color: var(--rb-cyan); text-decoration: underline; }

/* Linked variant (used on the Team index page, where cards open full profiles).
   Restrained: a quiet border/colour shift only — no transforms or heavy shadow. */
a.rb-member--link {
  text-decoration: none;
  color: inherit;
  transition: border-color .2s ease, box-shadow .2s ease;
}
a.rb-member--link:hover {
  border-color: var(--rb-cyan);
  box-shadow: var(--rb-shadow);
}
a.rb-member--link:focus-visible {
  outline: 2px solid var(--rb-cyan);
  outline-offset: 2px;
}

/* Tablet: two across */
@media (max-width: 1023.98px) {
  .rb-team-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}
/* Mobile: single column */
@media (max-width: 639.98px) {
  .rb-team-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}
