/* RSH product styles — inherit ED-DATA shell + MOS report tokens; no invented cream theme. */

body.rsh-body {
  /* shell already sets --soft background; keep product pages on the shared surface */
  background: var(--soft, #f4f8fb);
}

.rsh-body .page-content {
  position: relative;
  z-index: 1;
}

.rsh-hero {
  padding: clamp(2rem, 6vw, 4.5rem) 0 3rem;
}

.rsh-kicker,
.rsh-body .eyebrow {
  margin: 0 0 0.55rem;
  color: var(--deep, #0b3a57);
  font-weight: 700;
  font-size: 0.9rem;
}

.rsh-hero h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink, #102033);
}

.rsh-lede {
  margin: 0.9rem 0 0;
  max-width: 42ch;
  font-size: 1.08rem;
  color: var(--muted, #44586c);
}

.rsh-search {
  margin-top: 1.5rem;
  max-width: 42rem;
}

.rsh-search label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 600;
}

.rsh-search input {
  width: 100%;
  padding: 0.9rem 1.05rem;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius-sm, 8px);
  background: var(--surface, #fff);
  font: inherit;
  font-size: 1.05rem;
}

.rsh-search input:focus {
  outline: 3px solid color-mix(in srgb, var(--blue, #12607f) 28%, transparent);
  border-color: var(--blue, #12607f);
}

.rsh-results {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.4rem;
}

.rsh-result {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm, 8px);
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e2e8f0);
}

.rsh-result strong {
  display: block;
}

.rsh-result span {
  color: var(--muted, #44586c);
  font-size: 0.9rem;
}

.rsh-result:hover {
  border-color: var(--blue, #12607f);
  background: var(--wash, #eaf5f6);
}

.rsh-empty {
  color: var(--muted, #44586c);
  margin: 0.6rem 0 0;
}

/* Inherited KPI tiles: MOS stats-card + Radar home-stat-total shape */
.rsh-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.75rem;
  max-width: 52rem;
}

@media (min-width: 900px) {
  .rsh-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 72rem;
  }
}
@media (min-width: 1100px) {
  .rsh-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.rsh-stats-grid .stats-card,
.rsh-stats-grid a.stats-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.95rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  min-height: 7.2rem;
}

.rsh-stats-grid a.stats-card:hover {
  border-color: var(--blue, #12607f);
  background: var(--wash, #eaf5f6);
}

.rsh-stats-grid .stats-card h3 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.3;
  min-height: 2.4rem;
  color: var(--ink, #102033);
  font-weight: 700;
}

.rsh-stats-grid .stats-card .stat-value {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--deep, #0b3a57);
  line-height: 1.15;
}

.rsh-stats-grid .stats-card .stat-note {
  margin: 0.15rem 0 0;
  color: var(--muted, #44586c);
  font-size: 0.8rem;
  line-height: 1.35;
}

.rsh-body .ed-tool-name .nav-status-tag {
  margin-inline-start: 0.45rem;
  vertical-align: middle;
}

.rsh-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 1.4rem 0 0.8rem;
  color: var(--muted, #44586c);
  font-size: 0.92rem;
}

.rsh-crumbs a {
  color: var(--deep, #0b3a57);
  font-weight: 700;
}

.rsh-crumbs__sep {
  opacity: 0.45;
}

.rsh-filter-label {
  display: block;
  font-weight: 600;
}

.rsh-filter {
  display: block;
  width: min(28rem, 100%);
  margin: 0.4rem 0 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius-sm, 8px);
  background: var(--surface, #fff);
  font: inherit;
}

.rsh-filter:focus {
  outline: 3px solid color-mix(in srgb, var(--blue, #12607f) 28%, transparent);
  border-color: var(--blue, #12607f);
}

.rsh-subhead {
  margin: 1.1rem 0 0.45rem;
  font-size: 1.15rem;
}

.rsh-section {
  padding: 0 0 4.5rem;
}

.rsh-section h1 {
  margin: 0.15rem 0 0.6rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
}

.rsh-section h2 {
  margin: 0 0 0.4rem;
  font-size: 1.55rem;
}

.rsh-note {
  margin: 0 0 1.2rem;
  color: var(--muted, #44586c);
  max-width: 52ch;
}

.rsh-table-wrap {
  overflow-x: auto;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius, 12px);
}

.rsh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.rsh-table th,
.rsh-table td {
  padding: 0.7rem 0.85rem;
  text-align: start;
  border-bottom: 1px solid var(--line, #e2e8f0);
  white-space: nowrap;
}

.rsh-table th {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--muted, #44586c);
}

.rsh-recon-table {
  margin: 0 0 1.6rem;
}

.rsh-recon-table .rsh-table {
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
}

.rsh-recon-table th,
.rsh-recon-table td {
  white-space: nowrap;
}

.evidence-badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--deep, #0b3a57) 10%, white);
  font-size: 0.78rem;
  cursor: help;
}

.rsh-table a {
  color: var(--deep, #0b3a57);
  font-weight: 700;
}

.rsh-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.85rem;
  margin: 1.4rem 0 1.8rem;
}

.rsh-kpi {
  padding: 0.9rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
}

.rsh-kpi b {
  display: block;
  font-size: 1.45rem;
  line-height: 1.15;
  color: var(--deep, #0b3a57);
}

.rsh-kpi span {
  color: var(--muted, #44586c);
  font-size: 0.88rem;
}

.rsh-panel {
  margin: 1.4rem 0;
  padding-top: 0.4rem;
}

.rsh-panel h2 {
  font-size: 1.45rem;
}

.rsh-chip {
  display: inline-block;
  margin-inline-end: 0.4rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--wash, #eaf5f6);
  color: var(--deep, #0b3a57);
  font-size: 0.78rem;
  font-weight: 700;
}

.rsh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.75rem 0 0;
}

.rsh-mos {
  margin-top: 2rem;
}

.rsh-network-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}

.rsh-network-card {
  display: block;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  color: inherit;
}

.rsh-network-card:hover {
  border-color: var(--blue, #12607f);
  background: var(--wash, #eaf5f6);
}

.rsh-network-card p {
  margin: 0.35rem 0 0;
  color: var(--muted, #44586c);
}

.rsh-body .rsh-authority-doc,
.rsh-body .rsh-network-doc {
  max-width: 72rem;
}

.rsh-body .rsh-entity-header {
  margin-bottom: 0.75rem;
}

.rsh-body .report-section.panel-fold,
.rsh-body details.report-section {
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 0.75rem;
  margin-top: 1.1rem;
}

.rsh-body .panel-fold > .panel-fold-summary {
  background: transparent;
}

.rsh-body .facts-list > div {
  background: #f8fafc;
}

.rsh-body .table-wrap {
  background: var(--surface, #fff);
  border-radius: 0.55rem;
}

.rsh-body .table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.rsh-body .table-wrap th,
.rsh-body .table-wrap td {
  padding: 0.55rem 0.7rem;
  text-align: start;
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.rsh-chart-grid {
  display: grid;
  gap: 1rem;
  margin-top: 0.75rem;
}

.rsh-chart-card {
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
}

.rsh-chart-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
}

.rsh-chart-card canvas {
  width: 100% !important;
  max-height: 280px;
}

#section-rsh-links {
  margin-top: 1.5rem;
}

@media (max-width: 720px) {
  .rsh-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Org finance layers + municipal associations */
.rsh-guidestar-card,
.rsh-municipal-association {
  margin: 1.5rem 0;
  padding: 1.1rem 1.2rem 1.25rem;
  border: 1px solid var(--line, #d7e2ea);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(11, 58, 87, 0.04), rgba(234, 245, 246, 0.9));
}

.rsh-guidestar-card h2,
.rsh-municipal-association h2 {
  margin: 0 0 0.55rem;
  font-size: 1.2rem;
}

.rsh-lede-inline {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.rsh-lede-inline a {
  color: var(--deep, #0b3a57);
  text-decoration: none;
}

.rsh-lede-inline a:hover {
  text-decoration: underline;
}

#section-network-gefen {
  margin-top: 1.25rem;
}

#section-network-gefen .rsh-kpis {
  margin-bottom: 0.85rem;
}

.rsh-association-doc .rsh-panel {
  margin-top: 1.5rem;
}

/* Homepage expansions */
.rsh-stats-grid--wide {
  max-width: 72rem;
}
@media (min-width: 900px) {
  .rsh-stats-grid--wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .rsh-stats-grid--wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.rsh-home-section {
  padding: 1.5rem 0 3rem;
}
.rsh-section-head {
  margin-bottom: 1rem;
  max-width: 46rem;
}
.rsh-section-head h2 {
  margin: 0.2rem 0 0.45rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
}
.rsh-section-lede {
  margin: 0;
  color: var(--muted, #44586c);
}
.rsh-highlight-grid,
.rsh-inequality-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}
.rsh-highlight-card,
.rsh-inequality-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.05rem;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  min-height: 8rem;
}
a.rsh-highlight-card:hover {
  border-color: var(--blue, #12607f);
  background: var(--wash, #eaf5f6);
}
.rsh-highlight-kicker {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--deep, #0b3a57);
}
.rsh-highlight-card h3,
.rsh-inequality-card h3 {
  margin: 0;
  font-size: 1.05rem;
}
.rsh-highlight-value {
  margin: 0.15rem 0 0;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink, #102033);
}
.rsh-highlight-note {
  margin: 0;
  color: var(--muted, #44586c);
  font-size: 0.9rem;
}
.rsh-inequality-pair {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.35rem 0 0;
}
.rsh-inequality-pair span {
  color: var(--muted, #44586c);
}
.rsh-inequality-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
}
.rsh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Expandable ranking tables + inequality charts */
.rsh-dual-tables {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 1100px) {
  .rsh-dual-tables {
    grid-template-columns: 1fr;
  }
}
.rsh-expand-table-wrap {
  margin: 0 0 1.25rem;
}
.rsh-expandable-table .rsh-row-toggle,
.rsh-row-toggle {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--line, #d7e0ea);
  background: #fff;
  color: var(--deep, #0b3a57);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.rsh-row-toggle[aria-expanded="true"] {
  background: var(--wash, #eaf5f6);
  border-color: var(--blue, #12607f);
}
.rsh-row-detail td,
.rsh-row-detail[hidden] {
  background: #f8fafc;
}
.rsh-row-detail-grid,
.rsh-row-detail-grid {
  display: grid;
  gap: 0.65rem 1rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  margin: 0.35rem 0 0.75rem;
}
.rsh-row-detail-grid dt,
.rsh-row-detail-grid dt {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted, #44586c);
}
.rsh-row-detail-grid dd,
.rsh-row-detail-grid dd {
  margin: 0.1rem 0 0;
  font-weight: 600;
}
.rsh-row-detail-link {
  margin: 0;
}
.rsh-chart-grid--home,
.rsh-chart-grid--dense {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}
@media (min-width: 900px) {
  .rsh-chart-grid--home,
  .rsh-chart-grid--dense {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.rsh-chart-block {
  margin: 0;
  padding: 1rem;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
}
.rsh-chart-caption {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.75rem;
}
.rsh-chart-caption span {
  color: var(--muted, #44586c);
  font-size: 0.9rem;
}
.rsh-chart-block .rsh-chart-grid,
.rsh-chart-block [data-rsh-chart-host] {
  min-height: 220px;
  position: relative;
}
.rsh-inequality-charts {
  margin-top: 1.75rem;
}
.rsh-authority-link {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}
.rsh-authority-link:hover {
  color: var(--blue, #12607f);
  text-decoration: underline;
}

.rsh-sort-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.85rem 0 0.75rem;
  color: var(--muted, #44586c);
  font-size: 0.92rem;
}
.rsh-sort-btn {
  min-height: 2.1rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line, #d7e0ea);
  border-radius: 999px;
  background: #fff;
  color: var(--deep, #0b3a57);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.rsh-sort-btn.is-active,
.rsh-sort-btn:hover {
  background: var(--wash, #eaf5f6);
  border-color: var(--blue, #12607f);
}

body.rsh-float-open {
  overflow: hidden;
}
.rsh-float {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.rsh-float[hidden] {
  display: none !important;
}
.rsh-float__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, #102033 55%, transparent);
}
.rsh-float__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1080px, 100%);
  height: min(92vh, 920px);
  background: var(--surface, #fff);
  border-radius: 18px;
  border: 1px solid var(--line, #e2e8f0);
  box-shadow: 0 24px 60px color-mix(in srgb, #102033 28%, transparent);
  overflow: hidden;
}
.rsh-float__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line, #e2e8f0);
  background: #f8fafc;
}
.rsh-float__bar h2 {
  margin: 0;
  font-size: 1.05rem;
}
.rsh-float__actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.rsh-float__close {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line, #d7e0ea);
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #102033);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.rsh-float__frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #fff;
}
@media (max-width: 720px) {
  .rsh-float {
    padding: 0;
  }
  .rsh-float__panel {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
}

/* Gefen authority allocation card */
.rsh-gefen-allocation {
  margin: 1.25rem 0 1.75rem;
  padding: 1.1rem 1.15rem 1.25rem;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--deep, #0b3a57) 4%, white), #fff 42%);
}
.rsh-gefen-allocation h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
}
.rsh-gefen-allocation-kpis {
  margin: 0 0 1rem;
}
.rsh-gefen-kpi-auth b { color: #0f6a5c; }
.rsh-gefen-kpi-inst b { color: var(--deep, #0b3a57); }
.rsh-gefen-kpi-total b { color: #1f2937; }
.rsh-gefen-stack {
  display: flex;
  width: 100%;
  height: 1.05rem;
  border-radius: 999px;
  overflow: hidden;
  background: #e8eef3;
  margin: 0.35rem 0 0.55rem;
}
.rsh-gefen-stack-seg { min-width: 0; }
.rsh-gefen-stack-inst { background: #1d4f7a; }
.rsh-gefen-stack-auth { background: #1f9d85; }
.rsh-gefen-stack-legend {
  display: flex;
  gap: 1rem;
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  color: var(--muted, #44586c);
}
.rsh-gefen-legend-inst::before,
.rsh-gefen-legend-auth::before {
  content: "";
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  margin-inline-end: 0.35rem;
  vertical-align: -0.05rem;
}
.rsh-gefen-legend-inst::before { background: #1d4f7a; }
.rsh-gefen-legend-auth::before { background: #1f9d85; }
.rsh-gefen-how {
  margin-top: 0.55rem;
  border-top: 1px dashed var(--line, #e2e8f0);
  padding-top: 0.55rem;
}
.rsh-gefen-how summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--deep, #0b3a57);
}
.rsh-gefen-how p {
  margin: 0.55rem 0 0;
  color: var(--muted, #44586c);
  max-width: 62ch;
  line-height: 1.55;
}
/* Organizations layer */
.rsh-org-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.rsh-org-card,
a.rsh-org-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line, #d7e2ea);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(234, 245, 246, 0.85), #fff);
  color: inherit;
  text-decoration: none;
  min-height: 7.5rem;
}
a.rsh-org-card:hover {
  border-color: var(--blue, #12607f);
  background: var(--wash, #eaf5f6);
}
.rsh-org-card--static {
  opacity: 0.92;
}
.rsh-org-card__class {
  margin: 0;
  color: var(--deep, #0b3a57);
  font-size: 0.9rem;
  font-weight: 600;
}
.rsh-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.35rem 0;
}
.rsh-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line, #d7e2ea);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--deep, #0b3a57);
}
.rsh-org-capability {
  margin-top: 1.25rem;
}
