:root {
  --rh-primary: #006dbc;
  --rh-primary-rgb: 0, 109, 188;
  --rh-secondary: #333333;
  --rh-accent: #feba35;
  --rh-visited: #756693;
  --rh-success: #00853f;
  --rh-warning: #feba35;
  --rh-danger: #da291c;
  --rh-info: #005daa;
  --rh-critical: #333333;
  --rh-callout: #002c4e;
  --rh-background: #f2f2f2;
  --rh-surface: #ffffff;
  --rh-on-surface: #333333;
  --rh-muted: #666666;
  --rh-border: #dcdcdc;
  --rh-band-grey: #f2f2f2;
  --rh-band-sky: #ccf0fb;
  --rh-band-prairie: #fff4d7;
  --rh-band-sunset: #fbe8cc;
  --rh-band-dawn: #fcdeb8;
  --rh-band-pasture: #f6f8df;
  --rh-footer-bg: #333333;
  --rh-footer-header: #feba35;
  --rh-font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --rh-font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --rh-container-max: 1280px;
  --rh-radius: 0.5rem;
  --rh-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.public-shell {
  background: var(--rh-background);
  color: var(--rh-on-surface);
  font-family: var(--rh-font-body);
  line-height: 1.5;
  margin: 0;
  min-height: 100vh;
}

.public-shell a {
  color: var(--rh-primary);
}

.public-shell a:visited {
  color: var(--rh-visited);
}

.public-shell a:hover {
  color: var(--rh-secondary);
}

.public-shell a:focus-visible,
.public-shell button:focus-visible,
.public-shell .btn:focus-visible,
.public-shell .form-control:focus,
.public-shell .form-select:focus {
  border-color: var(--rh-accent);
  box-shadow: 0 0 0 0.2rem rgba(254, 186, 53, 0.45);
  outline: 2px solid var(--rh-accent);
  outline-offset: 2px;
}

.public-shell-main {
  flex: 1 1 auto;
  margin: 0 auto;
  max-width: var(--rh-container-max);
  padding: 2rem 1.5rem;
  width: 100%;
}

.site-header {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--rh-border);
  box-shadow: var(--rh-shadow);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 50;
}

.site-header-inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--rh-container-max);
  min-height: 4rem;
  padding: 0.75rem 1.5rem;
}

.site-brand {
  color: var(--rh-secondary);
  font-family: var(--rh-font-display);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-brand:visited,
.site-brand:hover,
.site-brand:focus {
  color: var(--rh-secondary);
}

.site-primary-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.site-nav-link {
  border-radius: var(--rh-radius);
  color: var(--rh-muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-nav-link:hover,
.site-nav-link:focus {
  background: var(--rh-band-sky);
  color: var(--rh-secondary);
}

.site-nav-link:visited {
  color: var(--rh-muted);
}

.site-nav-link.is-active {
  border-bottom: 2px solid var(--rh-primary);
  color: var(--rh-primary);
}

.site-account-nav {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

.site-dashboard-link {
  background: var(--rh-primary);
  border-radius: var(--rh-radius);
  color: #fff;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  text-decoration: none;
}

.site-login-link,
.site-login-current {
  background: #fff;
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius);
  color: var(--rh-primary);
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  text-decoration: none;
}

.site-dashboard-link:hover {
  background: var(--rh-secondary);
  color: #fff;
}

.site-dashboard-link:visited {
  color: #fff;
}

.site-login-link:hover,
.site-login-link:focus {
  background: var(--rh-band-sky);
  border-color: var(--rh-primary);
  color: var(--rh-secondary);
}

.site-login-link:visited,
.site-login-current:visited {
  color: var(--rh-primary);
}

.site-login-current {
  cursor: default;
}

.site-user-menu summary {
  align-items: center;
  background: #fff;
  border: 1px solid var(--rh-border);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  gap: 0.5rem;
  list-style: none;
  min-height: 2.5rem;
  padding: 0.2rem 0.65rem 0.2rem 0.2rem;
}

.site-user-menu summary::-webkit-details-marker {
  display: none;
}

.site-user-avatar {
  align-items: center;
  background: var(--rh-band-sky);
  border-radius: 999px;
  color: var(--rh-primary);
  display: inline-flex;
  font-weight: 700;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.site-user-dropdown {
  background: #fff;
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 0.15rem;
  min-width: 14rem;
  padding: 0.5rem;
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 60;
}

.site-user-dropdown a {
  align-items: center;
  border-radius: calc(var(--rh-radius) - 0.125rem);
  color: var(--rh-on-surface);
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
}

.site-user-dropdown a:hover {
  background: var(--rh-band-sky);
  color: var(--rh-secondary);
}

.public-footer {
  background: var(--rh-footer-bg);
  border-top: 4px solid var(--rh-footer-header);
  color: #f4f7fb;
  margin-top: auto;
  padding: 2.5rem 1.5rem;
}

.public-footer-inner {
  display: grid;
  gap: 2rem;
  margin: 0 auto;
  max-width: var(--rh-container-max);
}

.public-footer a {
  color: rgba(244, 247, 251, 0.78);
  text-decoration: none;
}

.public-footer a:visited {
  color: rgba(244, 247, 251, 0.78);
}

.public-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.public-footer-brand {
  color: #fff;
  font-family: var(--rh-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

.public-footer-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.public-footer-partner-logo {
  align-items: center;
  background: #fff;
  border-radius: var(--rh-radius);
  display: inline-flex;
  min-height: 4rem;
  padding: 0.75rem 1rem;
}

.public-footer-partner-logo img {
  height: 2.5rem;
  max-width: 9rem;
  object-fit: contain;
  width: auto;
}

.public-footer-columns {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.public-footer-columns h3 {
  color: rgba(244, 247, 251, 0.65);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

.public-footer-columns ul {
  display: grid;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.public-auth-card {
  margin: 2rem auto;
  max-width: 28rem;
}

.public-auth-card .card-title {
  color: var(--rh-secondary);
  font-family: var(--rh-font-display);
  font-weight: 700;
}

.public-auth-card .btn-primary {
  background-color: var(--rh-primary);
  border-color: var(--rh-primary);
}

.public-auth-card .btn-primary:hover {
  background-color: var(--rh-secondary);
  border-color: var(--rh-secondary);
}

.public-auth-card-wide {
  max-width: 42rem;
}

.public-hero-card .display-6,
.public-content-body h1,
.card-title.h3 {
  font-family: var(--rh-font-display);
}

.public-home-eyebrow,
.public-home-caption-kicker {
  font-size: 0.82rem;
  letter-spacing: 0.045em;
}

.public-home-section-kicker {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.public-home-actions .btn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 3.125rem;
}

.public-home-action-primary {
  background: var(--rh-primary);
  border: 1px solid var(--rh-primary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  color: #fff;
  font-weight: 700;
}

.public-home-action-primary:hover,
.public-home-action-primary:focus {
  background: var(--rh-secondary);
  border-color: var(--rh-secondary);
  color: #fff;
}

.public-home-action-primary:visited {
  color: #fff;
}

.public-home-action-secondary {
  background: #fff;
  font-weight: 700;
}

.public-hero-media {
  min-height: 20rem;
  background: var(--rh-band-grey);
}

.public-hero-media img {
  min-height: 20rem;
  object-fit: cover;
}

.public-hero-caption {
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--rh-border);
  bottom: 0;
  left: 0;
  padding: 1rem;
  position: absolute;
  right: 0;
}

.public-home-caption-text,
.public-theme-description {
  font-size: 0.95rem;
  line-height: 1.55;
}

.public-home-section-kicker {
  font-weight: 700;
}

.public-home-section-kicker a {
  color: var(--rh-on-surface);
  text-decoration: none;
}

.public-home-section-kicker a:hover,
.public-home-section-kicker a:focus {
  color: var(--rh-primary);
  text-decoration: underline;
}

.public-partner-logo {
  height: 3rem;
  max-width: 12rem;
  object-fit: contain;
  width: auto;
}

.public-partner-name {
  color: var(--rh-primary);
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  max-width: 12rem;
  text-align: center;
  text-wrap: balance;
}

.public-partner-strip a:hover .public-partner-name,
.public-partner-strip a:focus .public-partner-name {
  color: var(--rh-secondary);
  text-decoration: underline;
}

.public-content-body {
  max-width: none;
}

.public-content-card {
  background: var(--rh-surface, #fff);
}

.public-content-card .public-content-body > p:last-child,
.public-content-card .public-content-body > ul:last-child {
  margin-bottom: 0;
}

.public-policy-content {
  max-width: none;
}

.public-policy-section,
.public-policy-section-list {
  max-width: 64rem;
}

.public-policy-section-list {
  display: grid;
  gap: 0;
  margin-top: 0;
}

.public-policy-section h2 {
  font-family: var(--rh-font-display);
  margin-bottom: 0.75rem;
}

.public-policy-section p,
.public-policy-section li {
  line-height: 1.65;
}

.public-policy-section p:last-child,
.public-policy-section ul:last-child {
  margin-bottom: 0;
}

.public-theme-card h3 {
  font-family: var(--rh-font-display);
}

.public-theme-card {
  background: var(--rh-surface);
  border-left: 4px solid var(--rh-border) !important;
  border-top: 0 !important;
  color: var(--rh-on-surface);
}

.public-theme-card a {
  color: var(--rh-on-surface);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.public-theme-card a:hover,
.public-theme-card a:focus,
.public-theme-card a:visited {
  color: var(--rh-on-surface);
}

#themes .row > :nth-child(6n + 1) .public-theme-card {
  border-left-color: var(--rh-band-sky) !important;
}

#themes .row > :nth-child(6n + 2) .public-theme-card {
  border-left-color: var(--rh-band-pasture) !important;
}

#themes .row > :nth-child(6n + 3) .public-theme-card {
  border-left-color: var(--rh-band-prairie) !important;
}

#themes .row > :nth-child(6n + 4) .public-theme-card {
  border-left-color: var(--rh-band-sunset) !important;
}

#themes .row > :nth-child(6n + 5) .public-theme-card {
  border-left-color: var(--rh-band-dawn) !important;
}

.public-search-type-pill {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  padding: 0.4rem 0.65rem;
}

.public-search-type-researcher {
  background: var(--rh-band-sky);
  border-color: #8dddf5;
  color: #333333;
}

.public-search-type-research-area {
  background: var(--rh-band-pasture);
  border-color: #d8e8a9;
  color: #333333;
}

.public-search-type-partner {
  background: var(--rh-band-prairie);
  border-color: #ffd86f;
  color: #333333;
}

.public-search-type-organization {
  background: var(--rh-band-dawn);
  border-color: #f5c4a8;
  color: #333333;
}

.public-search-type-page {
  background: var(--rh-band-grey);
  border-color: var(--rh-border);
  color: #333333;
}

.public-shell .btn-primary {
  background-color: var(--rh-primary);
  border-color: var(--rh-primary);
  color: #fff;
}

.public-shell .btn-primary:visited {
  color: #fff;
}

.public-shell .btn-primary:hover,
.public-shell .btn-primary:focus {
  background-color: var(--rh-secondary);
  border-color: var(--rh-secondary);
  color: #fff;
}

.public-shell .alert-primary,
.public-shell .alert-info {
  background-color: var(--rh-info);
  border-color: var(--rh-info);
  color: #fff;
}

.public-shell .alert-success {
  background-color: var(--rh-success);
  border-color: var(--rh-success);
  color: #fff;
}

.public-shell .alert-warning {
  background-color: var(--rh-warning);
  border-color: var(--rh-warning);
  color: var(--rh-secondary);
}

.public-shell .alert-danger {
  background-color: var(--rh-danger);
  border-color: var(--rh-danger);
  color: #fff;
}

.public-shell .public-search-submit {
  background-color: var(--rh-primary);
  border-color: var(--rh-primary);
}

.public-shell .public-search-submit:hover,
.public-shell .public-search-submit:focus {
  background-color: var(--rh-secondary);
  border-color: var(--rh-secondary);
}

.public-shell .btn-outline-primary {
  --bs-btn-color: var(--rh-primary);
  --bs-btn-border-color: var(--rh-primary);
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-border-color: var(--rh-secondary);
  --bs-btn-hover-color: var(--rh-secondary);
  --bs-btn-active-bg: var(--rh-accent);
  --bs-btn-active-border-color: var(--rh-secondary);
  --bs-btn-active-color: var(--rh-secondary);
}

.public-shell .btn-outline-primary:visited {
  color: var(--rh-primary);
}

.public-shell .text-primary {
  color: var(--rh-primary) !important;
}

.public-tooltip-icon {
  cursor: help;
  display: inline-block;
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1;
  text-align: center;
}

.public-tooltip-icon:focus-visible {
  outline: 2px solid var(--rh-accent);
  outline-offset: 2px;
}

.public-shell .display-6 {
  font-family: var(--rh-font-display);
  font-weight: 700;
}

.public-action-card:hover {
  border-color: var(--rh-primary);
  transform: translateY(-1px);
}

.public-action-card {
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.public-hero-card .display-5,
.public-hero-card .display-6 {
  font-family: var(--rh-font-display);
}

.sitemap-link-list-two-column {
  display: grid;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .sitemap-link-list-two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.public-error-card img,
.public-error-hero .public-hero-media img {
  width: 100%;
}

.public-error-hero .public-hero-media {
  min-height: 22rem;
}

.public-error-detail code {
  color: var(--rh-secondary);
  font-size: 0.92em;
  word-break: break-all;
}

/* UI Pathways — guided diagram walkthrough */
.ui-pathways-intro {
  max-width: 44rem;
}

.ui-pathways-progress-track {
  background: var(--rh-border);
  border-radius: 999px;
  height: 0.35rem;
  overflow: hidden;
}

.ui-pathways-progress-fill {
  background: var(--rh-primary);
  border-radius: 999px;
  height: 100%;
  transition: width 0.25s ease;
}

.ui-pathways-pill {
  background: #fff;
  border: 1px solid var(--rh-border);
  border-radius: 999px;
  color: var(--rh-on-surface);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ui-pathways-pill:hover,
.ui-pathways-pill:focus-visible {
  border-color: var(--rh-primary);
  color: var(--rh-primary);
}

.ui-pathways-pill.is-active {
  background: var(--rh-primary);
  border-color: var(--rh-primary);
  color: #fff;
}

.ui-pathways-pill .badge {
  background: rgba(255, 255, 255, 0.35);
  font-weight: 700;
}

.ui-pathways-pill.is-active .badge {
  background: rgba(255, 255, 255, 0.28);
}

.ui-pathways-pill:not(.is-active) .badge {
  background: var(--rh-band-sky);
  color: var(--rh-secondary);
}

.ui-pathways-stage-card {
  overflow: visible;
}

.ui-pathways-stage-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

.ui-pathways-zoom-group {
  align-items: center;
  display: inline-flex;
  gap: 0.25rem;
}

.ui-pathways-zoom-group .btn {
  line-height: 1;
  padding: 0.35rem 0.65rem;
}

.ui-pathways-stage-wrap {
  background: var(--rh-band-grey);
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius);
  overflow: hidden;
  position: relative;
  touch-action: none;
}

.ui-pathways-stage {
  cursor: grab;
  height: 26rem;
  max-height: 640px;
  min-height: 320px;
  position: relative;
  width: 100%;
}

.ui-pathways-stage.is-panning {
  cursor: grabbing;
}

.ui-pathways-stage.is-expanded {
  background: var(--rh-band-grey);
  border-radius: 0;
  bottom: 0;
  height: auto;
  left: 0;
  max-height: none;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1055;
}

.ui-pathways-canvas {
  left: 0;
  position: absolute;
  top: 0;
  transform-origin: 0 0;
  transition: transform 0.18s ease;
}

.ui-pathways-canvas.is-dragging {
  transition: none;
}

.ui-pathways-canvas svg {
  display: block;
  height: auto;
  max-width: none;
}

.ui-pathways-stage-loading {
  align-items: center;
  color: var(--rh-muted);
  display: flex;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.ui-pathways-expand-close {
  align-items: center;
  display: none;
  gap: 0.5rem;
  position: absolute;
  right: 1rem;
  top: 1rem;
  z-index: 1056;
}

.ui-pathways-stage.is-expanded .ui-pathways-expand-close {
  display: inline-flex;
}

.ui-pathways-hint {
  color: var(--rh-muted);
  font-size: 0.8rem;
}

.ui-pathways-nav-btn {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  min-height: 3rem;
}

.ui-pathways-counter {
  color: var(--rh-muted);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.ui-pathways-jump-section h3 {
  color: var(--rh-secondary);
  font-family: var(--rh-font-display);
  font-size: 1rem;
}

.ui-pathways-jump-item {
  background: #fff;
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius);
  color: var(--rh-on-surface);
  display: block;
  font-size: 0.88rem;
  padding: 0.55rem 0.75rem;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

.ui-pathways-jump-item:hover,
.ui-pathways-jump-item:focus-visible {
  border-color: var(--rh-primary);
}

.ui-pathways-jump-item.is-current {
  background: var(--rh-band-sky);
  border-color: var(--rh-primary);
  color: var(--rh-secondary);
  font-weight: 700;
}

.ui-pathways-jump-item .ui-pathways-jump-id {
  color: var(--rh-primary);
  font-weight: 700;
  margin-right: 0.35rem;
}

@media (min-width: 992px) {
  .site-header-inner {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
  }

  .site-primary-nav {
    justify-content: center;
  }

  .site-account-nav {
    justify-content: flex-end;
  }

  .public-footer-inner {
    grid-template-columns: minmax(14rem, 1fr) minmax(16rem, 1.2fr) minmax(18rem, 1.4fr);
  }
}
