:root {
  --blue: #003057;
  --blue-dark: #00233f;
  --gold: #b3a369;
  --gold-dark: #857437;
  --text: #222222;
  --muted: #555555;
  --light-bg: #f7f6f0;
  --border: #d8d2bd;
  --footer-bg: #003057;
  --footer-bottom: #00233f;
  --white: #ffffff;
  --max-width: 1120px;
}

/* Global Reset */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
}

.narrow {
  max-width: 850px;
}

/* Header */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}

.logo:hover {
  text-decoration: none;
}

.logo-image {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
}

.main-nav a {
  color: var(--blue);
}

.menu-button {
  display: none;
  border: 1px solid var(--border);
  background: var(--white);
  padding: 8px 14px;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
}

/* Main Hero / Intro Section */

.hero-section {
  padding: 72px 0 64px;
  text-align: center;
}

.hero-section h1 {
  color: var(--blue);
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 1.1;
  margin-bottom: 35px;
  font-weight: 700;
}

.hero-section h2 {
  color: var(--gold);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 400;
  margin-bottom: 44px;
}

.hero-section p {
  font-size: 1.12rem;
  margin-bottom: 22px;
}

.desktop-note {
  font-weight: 700;
  color: var(--blue-dark);
}

/* Citation Box */

.citation-box {
  text-align: left;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.98rem;
}

.citation-box strong {
  color: var(--blue-dark);
}

.citation-box p {
  margin-top: 6px;
  margin-bottom: 0;
}

/* Dark Footer Like PNPI Screenshot */

.site-footer {
  background: var(--footer-bg);
  color: var(--white);
  min-height: 520px;
  padding: 88px 0 0;
  font-family: Arial, Helvetica, sans-serif;
}

.footer-content {
  display: flex;
  justify-content: flex-start;
}

.footer-brand {
  max-width: 560px;
}

.footer-brand h3 {
  font-size: 1.25rem;
  line-height: 1.4;
  letter-spacing: 0.03em;
  margin-bottom: 34px;
  color: var(--white);
}

.footer-line {
  width: 100%;
  max-width: 520px;
  height: 2px;
  background: rgba(255, 255, 255, 0.75);
  margin-bottom: 24px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 1.15rem;
  line-height: 1.55;
  letter-spacing: 0.04em;
  margin-bottom: 30px;
}

.footer-bottom-bar {
  height: 28px;
  background: var(--footer-bottom);
  margin-top: 90px;
}

/* Responsive Layout */

@media (max-width: 850px) {
  .menu-button {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 88px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    z-index: 10;
  }

  .main-nav.active {
    display: flex;
  }

  .hero-section {
    padding-top: 52px;
  }

  .site-footer {
    min-height: auto;
    padding-top: 64px;
  }

  .footer-logo-text {
    font-size: 2rem;
  }

  .footer-brand h3 {
    font-size: 1.1rem;
  }

  .footer-brand p {
    font-size: 1rem;
  }

  .footer-line {
    max-width: 100%;
  }

  .social-links {
    margin-top: 42px;
  }

  .footer-bottom-bar {
    margin-top: 64px;
  }

  .school-grid,
  .district-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .summary-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 28px, var(--max-width));
  }

  .hero-section h1 {
    font-size: 2.5rem;
  }

  .hero-section h2 {
    font-size: 1.25rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .footer-logo {
    align-items: flex-start;
  }

  .footer-logo-text {
    font-size: 1.75rem;
  }

  .social-icon {
    width: 46px;
    height: 46px;
  }
  .school-grid,
  .district-grid {
    grid-template-columns: 1fr;
  }

  .summary-metrics {
    grid-template-columns: 1fr;
  }
}

/* Step 1 Explorer Section */

.explorer-steps {
  padding: 24px 0 72px;
  background: #ffffff;
  color: var(--blue);
}

.explorer-container {
  max-width: 900px;
}

.step-block {
  margin-bottom: 48px;
}

.step-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.step-icon {
  color: var(--gold);
  font-size: 1.25rem;
  line-height: 1.4;
  flex-shrink: 0;
  margin-top: 6px;
}

.step-title h2 {
  color: var(--blue);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: 0.035em;
}

.step-title strong {
  font-weight: 800;
  letter-spacing: 0.05em;
}

/* Step 1 Searchable Dropdown */

.custom-select {
  position: relative;
  width: 100%;
  margin: 24px 0 0;
  font-family: Arial, Helvetica, sans-serif;
}

.select-trigger {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  border: 2px solid var(--blue);
  border-radius: 7px;
  background: #ffffff;
  color: #333333;
  font-size: 1.05rem;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06);
}

.select-arrow {
  font-size: 1.45rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.custom-select.open .select-arrow {
  transform: rotate(180deg);
}

.select-menu {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  right: 0;
  z-index: 50;
  display: none;
  background: #ffffff;
  border-left: 2px solid var(--blue);
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  border-radius: 0 0 7px 7px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.custom-select.open .select-menu {
  display: block;
}

.select-search {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: none;
  border-bottom: 1px solid #eeeeee;
  outline: none;
  font-size: 1rem;
  color: #333333;
  font-family: Arial, Helvetica, sans-serif;
}

.select-search::placeholder {
  color: #999999;
}

.select-options {
  list-style: none;
  max-height: 300px;
  overflow-y: auto;
  padding: 6px;
  margin: 0;
}

.select-options li {
  padding: 8px 18px;
  font-size: 1rem;
  color: #5f6067;
  cursor: pointer;
  border-radius: 3px;
}

.select-options li:hover {
  background: #f1eddf;
}

.select-options li.selected {
  background: var(--blue);
  color: #ffffff;
}

.select-options li.hidden {
  display: none;
}

/* Report Grid Below Step 1 */

.option-grid {
  margin-top: 40px;
  display: none;
  gap: 20px;
  align-items: start;
}

.option-grid.show {
  display: grid;
}

/* School and District grid use same styling for now */
.school-grid,
.district-grid {
  grid-template-columns: 1fr 1fr;
}

/* Shaded shell around the full school report */
.school-grid.show {
  background: #eeeeee;
  border: 1px solid #dddddd;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.grid-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.report-card {
  background: #ffffff;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  padding: 24px;
  min-height: 170px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.report-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.1);
}

.report-card h3 {
  color: var(--blue);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.report-card p {
  color: #666666;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 18px 0 22px;
}

.metric-box {
  background: #f5f7fa;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}

.metric-number {
  display: block;
  color: var(--blue);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
}

.metric-label {
  display: block;
  margin-top: 6px;
  color: #666666;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
  line-height: 1.3;
}

.summary-text {
  margin-top: 12px;
}

.summary-text p,
.summary-text li {
  color: #444444;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
}

.summary-text p {
  margin-bottom: 12px;
}

.summary-text ul {
  margin: 0 0 14px 20px;
}

.summary-text li {
  margin-bottom: 8px;
}

.summary-list {
  margin: 0;
  padding-left: 22px;
  list-style-type: disc;
}

.summary-list li {
  color: #444444;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 12px;
}

.participation-card {
  min-height: 420px;
}

.chart-note {
  color: #666666;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 18px;
}

.participation-chart {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}
.chart-js-section {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #d9d9d9;
}

.chart-js-section h4 {
  color: var(--blue);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  margin-bottom: 12px;
}

.chart-box {
  width: 100%;
  height: 320px;
}

.gender-chart-box {
  height: 180px;
}

.double-chart-box {
  height: 280px;
}

.group-block {
  padding-bottom: 14px;
  border-bottom: 1px solid #eeeeee;
}

.group-block h4 {
  color: var(--blue);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.comparison-row {
  display: grid;
  grid-template-columns: 120px 1fr 48px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.comparison-track {
  height: 12px;
  background: #eef1f5;
  border-radius: 999px;
  overflow: hidden;
}

.comparison-bar {
  height: 100%;
  border-radius: 999px;
}

.cs-bar {
  background: var(--blue);
}

.comparison-value {
  color: #444444;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8rem;
  text-align: right;
}

.image-card {
  min-height: 360px;
}
.card-image {
  width: 100%;
  height: 220px;
  object-fit: contain;
  display: block;
  background: #ffffff;
}

.card-image-wrap {
  margin-top: 18px;
  width: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f7fa;
}

.two-image-card {
  min-height: 360px;
}

.two-image-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 18px;
}

.image-panel {
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f7fa;
}

.card-map-wrap {
  margin-top: 18px;
  width: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f7fa;
}

.card-map {
  width: 100%;
  height: 260px;
}

.two-map-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 18px;
}

.map-panel {
  border: none;
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
}

.map-panel-title {
  color: var(--blue);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  margin: 12px 14px 8px;
}

.small-card-map {
  height: 270px;
}

.bottom-citation-section {
  padding: 48px 0;
  background: #ffffff;
}

.bottom-citation-section .citation-box {
  margin-top: 0;
}

.snapshot-title-card {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--blue);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 24px 32px;
  min-height: 124px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.snapshot-title-card:hover {
  transform: none;
}

.snapshot-title-main {
  display: flex;
  align-items: center;
  gap: 26px;
  width: 100%;
  min-width: 0;
}

.snapshot-title-image {
  width: 104px;
  height: 104px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.snapshot-title-text {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.snapshot-title-card h2 {
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 2;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  white-space: normal;
}

.snapshot-title-card p {
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(0.9rem, 1.6vw, 1.1rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-top: 6px;
  line-height: 2;
}

.snapshot-title-card p span {
  color: var(--gold);
  margin: 0 8px;
}

/* Remove the first separation line in Demographic Participation, so there's no line before the first graph*/
.participation-card .chart-js-section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 8px;
}

.report-card {
  position: relative;
}

/* This part is for information overlay */
.info-button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #111111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 5;

  transition:
    background 0.18s ease,
    transform 0.18s ease;

  display: flex;
  align-items: center;
  justify-content: center;
}

.info-icon {
  width: 24px;
  height: 24px;
  display: block;
}

.info-button:hover {
  background: #d9d9d9;
  transform: scale(1.04);
}

.card-info-popup {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  z-index: 20;

  overflow-y: auto;

  background: #ffffff;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  padding: 54px 24px 24px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);

  opacity: 0;
  visibility: hidden;
  transform: scale(0.98);
  transform-origin: center;
  pointer-events: none;

  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s ease;
}

.card-info-popup.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
}

.card-info-popup p {
  color: #222222;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  margin: 0;
}

.card-info-popup a {
  color: var(--blue);
  text-decoration: underline;
}

.card-info-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: 2px solid #2d2d5f;
  border-radius: 50%;
  background: #ffffff;
  color: #2d2d5f;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 20px;
  cursor: pointer;

  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.card-info-close:hover {
  background: #f2f2f2;
  transform: scale(1.08);
}

.info-list {
  margin: 0;
  padding-left: 20px;
}

.info-list li {
  color: #222222;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 10px;
}

.info-list {
  margin: 0;
  padding-left: 20px;
}

.info-list li {
  color: #222222;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 10px;
}

/* Smaller ArcGIS legend inside card maps */

.card-map .esri-legend {
  max-width: 135px;
  max-height: none;
  overflow-y: visible;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.62rem;
}
.card-map .esri-widget {
  font-size: 0.62rem;
}

.card-map .esri-legend__service {
  padding: 4px;
}

.card-map .esri-legend__layer {
  margin-bottom: 2px;
}

.card-map .esri-legend__layer-caption {
  font-size: 0.6rem;
  margin-bottom: 2px;
}

.card-map .esri-legend__layer-table {
  margin-bottom: 0;
}

.card-map .esri-legend__layer-cell {
  padding: 1px 3px;
}

.card-map .esri-legend__symbol {
  width: 18px;
  height: 12px;
}

/* Simple show/hide legend button */

.card-map .legend-wrapper {
  width: 135px;
  max-height: none;
  background: #ffffff;
  padding: 4px;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.card-map .legend-toggle-button {
  width: 100%;
  border: 1px solid #d9d9d9;
  background: #f5f7fa;
  color: var(--blue);
  padding: 3px 4px;
  margin-bottom: 4px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.card-map .legend-toggle-button:hover {
  background: #eeeeee;
}

.card-map .legend-content {
  display: block;
}

.card-map .legend-content-hidden {
  display: none;
}

/* Force ArcGIS legend to show fully without scrollbars */

.card-map .legend-wrapper {
  width: 165px;
  max-height: none;
  overflow: visible;
}

.card-map .legend-content {
  max-height: none;
  overflow: visible;
}

.card-map .legend-content .esri-legend,
.card-map .legend-content .esri-widget,
.card-map .legend-content .esri-legend__service,
.card-map .legend-content .esri-legend__layer,
.card-map .legend-content .esri-legend__layer-table {
  max-width: none;
  max-height: none;
  overflow: visible;
}

.card-map .legend-content .esri-legend {
  width: 155px;
}

.card-map .legend-content .esri-legend__layer-table {
  width: 100%;
}

.card-map .legend-content .esri-legend__layer-cell {
  white-space: nowrap;
}

.card-map .legend-content .esri-legend__layer-caption {
  white-space: normal;
}

.summary-sublist {
  margin-top: 10px;
  padding-left: 24px;
  list-style-type: disc;
}

.summary-sublist li {
  margin-bottom: 6px;
}

.category-definition-list {
  margin-top: 8px;
  padding-left: 22px;
  list-style-type: disc;
}

.category-definition-list li {
  margin-bottom: 8px;
  list-style-type: disc;
}

.category-definition-list li::marker {
  color: #222222;
}

.report-export-row {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  padding-top: 10px;
}

.report-export-button {
  border: 2px solid var(--blue);
  background: var(--blue);
  color: #ffffff;
  border-radius: 999px;
  padding: 10px 20px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 48, 87, 0.18);
  transition:
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.report-export-button:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 48, 87, 0.24);
}

.exporting-report .report-card:hover {
  transform: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.report-export-button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.map-export-image {
  width: 100%;
  height: 270px;
  display: block;
  object-fit: cover;
}

.card-map.exporting-map {
  position: relative;
  overflow: hidden;
}

.card-map.exporting-map .map-export-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

.card-map.exporting-map .esri-ui {
  z-index: 2;
}

.card-map.exporting-map.legend-is-hidden .legend-wrapper {
  display: none !important;
}

.exporting-report .report-export-button {
  display: none !important;
}

/* Move legend Hide/Show button to top-right corner */
.card-map .legend-wrapper {
  position: relative;
  min-height: 24px;
}

.card-map .legend-toggle-button {
  position: absolute;
  top: 4px;
  right: 4px;

  width: auto;
  min-width: 36px;
  padding: 2px 6px;
  margin-bottom: 0;

  font-size: 0.6rem;
  line-height: 1.1;
  z-index: 5;
}

/* Give the legend title room so the button does not cover it */
.card-map .legend-content .esri-legend__service-label {
  padding-right: 44px;
}

/* Shrink legend box when legend is hidden */
.card-map.legend-is-hidden .legend-wrapper {
  width: auto !important;
  min-height: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

/* Let the Show button size itself instead of staying inside a wide bar */
.card-map.legend-is-hidden .legend-toggle-button {
  position: static;
  width: auto;
  min-width: 42px;
  padding: 3px 8px;
  margin: 0;
  display: block;
}

/* Remove the repeated top title inside ArcGIS legends */
.card-map .legend-content .esri-legend__service-label {
  display: none;
}

/* Remove extra space left by the hidden title */
.card-map .legend-content .esri-legend__service {
  padding-top: 2px;
}

/* Make ArcGIS polygon legend patches look more like the ArcGIS website */
.card-map .legend-content .esri-legend__symbol {
  width: 28px !important;
  height: 18px !important;
}

.card-map .legend-content .esri-legend__layer-cell {
  padding: 2px 4px;
  vertical-align: middle;
}

.card-map .legend-content .esri-legend__layer-caption {
  font-size: 0.68rem;
  line-height: 1.2;
  margin-bottom: 4px;
}

.card-map .legend-content .esri-legend {
  font-size: 0.68rem;
}

/* Keep the small Hide/Show button from covering legend titles */
.card-map .legend-content .esri-legend__layer-caption {
  padding-right: 38px;
  box-sizing: border-box;
  line-height: 1.15;
}

/* Make ArcGIS legend boxes more compact */
.card-map .legend-wrapper {
  width: fit-content !important;
  min-width: 126px !important;
  max-width: 152px !important;
  padding: 3px 4px !important;
}

.card-map .legend-content .esri-legend {
  width: fit-content !important;
  min-width: 116px !important;
  max-width: 144px !important;
}

.card-map .legend-content .esri-legend__service {
  padding: 2px 3px !important;
}

.card-map .legend-content .esri-legend__layer-cell {
  padding: 1px 2px !important;
}

.card-map .legend-content .esri-legend__symbol {
  width: 24px !important;
  height: 16px !important;
}

/* Reduce spacing inside map/image report cards */

.image-card h3,
.two-image-card h3 {
  margin-bottom: 4px;
}

.two-map-grid {
  margin-top: 4px;
  gap: 8px;
}

.map-panel-title {
  margin: 4px 0 6px;
}

.participation-card .chart-js-section {
  border-top: none;
  margin-top: 10px;
  padding-top: 6px;
}

/* Make report shell and cards align evenly */

.school-grid.show,
.district-report-grid.show {
  padding: 24px;
  gap: 24px;
  overflow: hidden;
}

.school-grid.show .report-card,
.district-report-grid.show .report-card {
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.school-grid.show .report-card:hover,
.district-report-grid.show .report-card:hover {
  transform: none;
}

/* Make school and district report layouts use the same shell/card sizing */

#schoolGrid.show,
#districtReportGrid.show {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 5px;
  align-items: stretch;

  background: #eeeeee;
  border: 1px solid #dddddd;
  border-radius: 16px;
  padding: 5px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);

  min-height: 980px;
}

#schoolGrid > .snapshot-title-card,
#districtReportGrid > .snapshot-title-card {
  grid-column: 1 / -1;
}

#schoolGrid > .grid-column,
#districtReportGrid > .grid-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* Match the major front-card heights */

/*
#schoolGrid .school-summary-card,
#districtReportGrid .school-summary-card {
  min-height: 520px;
}

#schoolGrid .participation-card,
#districtReportGrid .participation-card {
  min-height: 520px;
}

#schoolGrid .image-card,
#districtReportGrid .image-card,
#schoolGrid .two-image-card,
#districtReportGrid .two-image-card {
  min-height: 360px;
}
*/

/* Prevent hover from visually changing report size */

#schoolGrid .report-card:hover,
#districtReportGrid .report-card:hover {
  transform: none;
}

/* Make Summary metric boxes fit inside the card */

.school-summary-card .summary-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 18px;
}

.school-summary-card .metric-box {
  min-width: 0;
  padding: 10px 6px;
}

.school-summary-card .metric-number {
  color: #b39051;
  font-size: 1.35rem;
  line-height: 1.05;
  white-space: nowrap;
  letter-spacing: -0.04em;
  max-width: 100%;
  overflow: hidden;
}

.school-summary-card .metric-label {
  font-size: 0.62rem;
  line-height: 1.15;
  margin-top: 5px;
}

.snapshot-title-card {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--blue);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 24px 32px;
  min-height: 124px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.snapshot-title-card:hover {
  transform: none;
}

.snapshot-title-main {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
  flex: 1;
}

.snapshot-title-image {
  width: 200px;
  height: 90px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
  background: #ffffff;
  padding: 6px;
}

.snapshot-title-text {
  position: relative;
  z-index: 1;
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 0px;
}

.snapshot-title-card h2 {
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 2;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: -3px;
  white-space: normal;
}

.snapshot-title-card p {
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(0.9rem, 1.6vw, 1.1rem);
  line-height: 1.8;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.snapshot-title-card p span {
  color: var(--gold);
  margin: 0 8px;
}

.select-options li.district-group-option {
  margin-top: 8px;
  font-weight: 700;
  color: var(--blue);
  background: #f7f3e5;
  border-left: 4px solid var(--gold);
}

.select-options li.district-group-option:hover {
  background: #efe6c8;
}

.select-options li.school-sub-option {
  padding-left: 36px;
  font-size: 0.95rem;
  color: #555555;
}

.select-options li.school-sub-option::before {
  content: "↳";
  margin-right: 8px;
  color: var(--gold);
}

.select-options li.school-sub-option.selected {
  background: var(--blue);
  color: #ffffff;
}

.select-options li.school-sub-option.selected::before {
  color: #ffffff;
}

/* Make ArcGIS map legend text smaller */
.card-map .legend-content .esri-legend,
.card-map .legend-content .esri-legend__service,
.card-map .legend-content .esri-legend__layer,
.card-map .legend-content .esri-legend__layer-cell,
.card-map .legend-content .esri-legend__layer-cell--info {
  font-size: 0.72rem !important;
  line-height: 1.15 !important;
}

/* Smaller legend layer title, like "Mathematics Proficiency Percentage" */
.card-map .legend-content .esri-legend__layer-caption {
  font-size: 0.72rem !important;
  line-height: 1.15 !important;
}

/* Tighten spacing between legend rows */
.card-map .legend-content .esri-legend__layer-row {
  height: auto !important;
}

/* Optional: make the full legend box slightly more compact */
.card-map .legend-wrapper {
  padding: 6px 8px !important;
}

/* Different legend widths for different map types */

/* Math + English legends: narrower */
#mathProficiencyMap .legend-wrapper,
#englishProficiencyMap .legend-wrapper,
#districtMathProficiencyMap .legend-wrapper,
#districtEnglishProficiencyMap .legend-wrapper {
  width: 150px !important;
}

#mathProficiencyMap .legend-content .esri-legend,
#englishProficiencyMap .legend-content .esri-legend,
#districtMathProficiencyMap .legend-content .esri-legend,
#districtEnglishProficiencyMap .legend-content .esri-legend {
  width: 140px !important;
}

/* Income legend: wider because the number ranges are longer */
#incomeMap .legend-wrapper,
#districtIncomeMap .legend-wrapper {
  width: 200px !important;
}

#incomeMap .legend-content .esri-legend,
#districtIncomeMap .legend-content .esri-legend {
  width: 150px !important;
}

/* Make all ArcGIS map legends more compact */
.card-map .legend-wrapper {
  padding: 5px 6px !important;
  width: 100px !important;
}

/* Keep income legends a little wider because their numbers are longer */
#incomeMap .legend-wrapper,
#districtIncomeMap .legend-wrapper {
  width: 150px !important;
}

/* Shrink all legend text */
.card-map .legend-content .esri-legend,
.card-map .legend-content .esri-widget,
.card-map .legend-content .esri-legend *,
.card-map .legend-content .esri-legend__layer-cell,
.card-map .legend-content .esri-legend__layer-cell--info,
.card-map .legend-content .esri-legend__layer-caption {
  font-size: 0.56rem !important;
  line-height: 1.08 !important;
}

/* Shrink legend title */
.card-map .legend-content .esri-legend__layer-caption {
  margin-bottom: 2px !important;
  padding-right: 38px !important;
}

/* Shrink color patches */
.card-map .legend-content .esri-legend__symbol {
  width: 20px !important;
  height: 13px !important;
}

/* Reduce spacing between legend rows */
.card-map .legend-content .esri-legend__layer-cell {
  padding: 1px 3px !important;
}

/* Make Hide/Show button smaller too */
.card-map .legend-toggle-button {
  font-size: 0.55rem !important;
  padding: 1px 5px !important;
  min-width: 32px !important;
}

/* Keep collapsed Show button at bottom-right */
.card-map.legend-is-hidden .legend-wrapper {
  position: absolute !important;
  right: 8px !important;
  bottom: 8px !important;
  top: auto !important;
  left: auto !important;

  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;

  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.card-map.legend-is-hidden .legend-toggle-button {
  position: static !important;
  display: block !important;

  width: auto !important;
  min-width: 32px !important;
  padding: 1px 5px !important;
  margin: 0 !important;

  font-size: 0.55rem !important;
  line-height: 1.1 !important;
}

/* Force closed legend Show button to sit at the real bottom-right */
#mathProficiencyMap.legend-is-hidden .legend-wrapper,
#englishProficiencyMap.legend-is-hidden .legend-wrapper,
#incomeMap.legend-is-hidden .legend-wrapper,
#districtMathProficiencyMap.legend-is-hidden .legend-wrapper,
#districtEnglishProficiencyMap.legend-is-hidden .legend-wrapper,
#districtIncomeMap.legend-is-hidden .legend-wrapper {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;

  padding: 0 !important;
  margin: 0 !important;

  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  overflow: visible !important;
}

#mathProficiencyMap.legend-is-hidden .legend-toggle-button,
#englishProficiencyMap.legend-is-hidden .legend-toggle-button,
#incomeMap.legend-is-hidden .legend-toggle-button,
#districtMathProficiencyMap.legend-is-hidden .legend-toggle-button,
#districtEnglishProficiencyMap.legend-is-hidden .legend-toggle-button,
#districtIncomeMap.legend-is-hidden .legend-toggle-button {
  position: static !important;
  display: block !important;

  width: auto !important;
  min-width: 32px !important;

  padding: 1px 5px !important;
  margin: 0 !important;

  font-size: 0.55rem !important;
  line-height: 1.1 !important;
}

/* Better vertical alignment between polygon legend patch and text */
.card-map .legend-content .esri-legend__layer-table td,
.card-map .legend-content .esri-legend__layer-cell,
.card-map .legend-content .esri-legend__layer-cell--symbols,
.card-map .legend-content .esri-legend__layer-cell--info {
  vertical-align: middle !important;
}

/* Move legend label text down without increasing row spacing */
.card-map .legend-content .esri-legend__layer-cell--info {
  padding-top: 0 !important;
  position: relative !important;
  top: 8px !important;
}

/* Keep the symbol cell tight */
.card-map .legend-content .esri-legend__layer-cell--symbols {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* What Now / Future Suggestions card */
.future-suggestion-card {
  min-height: 260px;
  padding-right: 24px;
}

.future-suggestion-card h3 {
  padding-right: 0;
}

/* Readiness score badge */
.readiness-score-badge {
  position: absolute;
  top: 18px;
  right: 18px;

  min-width: 112px;
  padding: 8px 10px;

  background: #f5f7fa;
  border: 1px solid #d9d9d9;
  border-radius: 10px;

  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
}

.readiness-score-badge span {
  display: block;
  color: #555555;
  font-size: 0.68rem;
  line-height: 1.1;
  margin-bottom: 4px;
}

.readiness-score-badge strong {
  display: block;
  color: var(--blue);
  font-size: 1.35rem;
  line-height: 1;
}

/* Dynamic recommendation list */
.recommendation-list {
  display: grid;
  gap: 4px;
  margin-top: 20px;
}

.recommendation-item {
  padding: 5px 5px 1px 5px;
  background: #f5f7fa;
  border: 1px solid #d9d9d9;
  border-left: 5px solid var(--gold);
  border-radius: 8px;
}

.recommendation-item h4 {
  margin: 0 0 7px;
  color: var(--blue);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  line-height: 1.25;
}

.recommendation-item p {
  margin: 0;
  color: #444444;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  line-height: 1.5 !important;
}

.recommendation-empty {
  margin: 0;
  padding: 16px 18px;
  color: #666666;
  background: #f5f7fa;
  border: 1px dashed #b8b8b8;
  border-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  line-height: 1.45 !important;
}

/* Make normal report-card text closer to single-line spacing */
.report-card p,
.report-card li,
.summary-text p,
.summary-text li,
.summary-list li,
.summary-sublist li,
.info-list li,
.category-definition-list li {
  line-height: 1 !important;
}

.snapshot-title-card p {
  line-height: 1.3 !important;
}

/* Reduce extra vertical gaps between list items */
.summary-list li,
.summary-sublist li,
.info-list li,
.category-definition-list li {
  margin-bottom: 6px !important;
}

/* Keep paragraph spacing compact inside cards */
.report-card p {
  margin-bottom: 8px !important;
}

/* Make Summary card text smaller */
.school-summary-card .summary-list,
.school-summary-card .summary-list li,
.school-summary-card .summary-sublist,
.school-summary-card .summary-sublist li {
  font-size: 0.825rem;
  line-height: 1.2;
}

/* Keep bold numbers/values same size as surrounding text */
.school-summary-card .summary-list strong,
.school-summary-card .summary-sublist strong {
  font-size: inherit;
}

.school-summary-card .summary-list li,
.school-summary-card .summary-sublist li {
  margin-bottom: 4px;
}

.school-summary-card .summary-sublist {
  margin-top: 2px;
  margin-bottom: 6px;
}

/* Reduce space between Demographic Participation title and first chart title */
.participation-card > h3 {
  margin-bottom: 0 !important;
  line-height: 1.05 !important;
}

.participation-card > h3 + .chart-js-section {
  margin-top: 8px !important;
  padding-top: 0 !important;
  border-top: none !important;
}

.participation-card > h3 + .chart-js-section h4,
.participation-card .chart-js-section:first-of-type h4 {
  font-size: 0.95rem !important;
  margin-top: 0 !important;
  margin-bottom: 6px !important;
  line-height: 1.7 !important;
}

/* Reduce space between map-card title and first map title */
.image-card > h3,
.two-image-card > h3 {
  margin-bottom: 0 !important;
  line-height: 1.05 !important;
}

.image-card > .two-map-grid,
.two-image-card > .two-map-grid {
  margin-top: 8px !important;
}

.image-card .map-panel:first-child .map-panel-title,
.two-image-card .map-panel:first-child .map-panel-title {
  margin-top: 0 !important;
}

/* Change only main report card titles */
.report-card h3 {
  color: #051e39;
  font-size: 1.5rem;
  line-height: 1.15;
}

/* Make ArcGIS zoom buttons smaller */
.card-map .esri-zoom .esri-widget--button {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  font-size: 0.65rem !important;
  line-height: 24px !important;
}

.card-map .esri-zoom .esri-icon-plus,
.card-map .esri-zoom .esri-icon-minus {
  font-size: 11px !important;
}

/* Make info popup text match compact report text */
.card-info-popup,
.card-info-popup p,
.card-info-popup li,
.card-info-popup strong,
.info-list li,
.category-definition-list li {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px !important;
  line-height: 1.25 !important;
}

.info-list li,
.category-definition-list li {
  margin-bottom: 6px !important;
}

.category-definition-list {
  margin-top: 4px !important;
  margin-bottom: 0 !important;
}

#stateReportGrid > .future-suggestion-card,
#schoolGrid > .future-suggestion-card,
#districtReportGrid > .future-suggestion-card,
#stateReportGrid > .report-export-row,
#schoolGrid > .report-export-row,
#districtReportGrid > .report-export-row {
  grid-column: 1 / -1;
}

.dashboard-link {
  color: var(--gold);
  font-weight: 700;
  text-decoration: underline;
}

.dashboard-link:hover {
  color: var(--gold-dark);
}

/* Move Summary bullet lists closer to the left edge */
.summary-text .summary-list {
  margin-left: 0 !important;
  padding-left: 16px !important;
}

.summary-text .summary-sublist {
  margin-left: 0 !important;
  padding-left: 18px !important;
}

/* Reduce horizontal and vertical gaps between report cards */
#schoolGrid.show,
#districtReportGrid.show {
  gap: 5px !important;
  padding: 5px !important;
}

#schoolGrid > .grid-column {
  gap: 5px !important;
}

#districtReportGrid > .grid-column {
  gap: 12px !important;
}

.grid-column {
  gap: 5px !important;
}

/* Reduce space between intro note and Step 1 section */
.hero-section {
  padding-bottom: 28px !important;
}

.explorer-steps {
  padding-top: 0 !important;
}

.desktop-note {
  margin-bottom: 0 !important;
}

/* Inline asterisk link in summary text */
.inline-info-link {
  display: inline;
  border: none;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0 1px;
  vertical-align: baseline;
}

.inline-info-link:hover {
  color: var(--gold-dark);
}

/* Highlight the matching info sentence */
.info-highlight-target {
  border-radius: 6px;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.info-highlight-target.info-highlight-active {
  background: rgba(179, 163, 105, 0.22);
  box-shadow: 0 0 0 3px rgba(179, 163, 105, 0.22);
}

.school-summary-card .metric-box {
  min-width: 0;
  padding: 10px 6px;
  container-type: inline-size;
}

.school-summary-card .metric-label {
  font-size: 0.62rem;
  line-height: 1.15;
  margin-top: 5px;
}

.snapshot-district-link {
  border: none;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 700;
  letter-spacing: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.snapshot-district-link:hover {
  color: var(--gold);
}

.summary-table-list-item {
  margin-top: 12px;
}

.summary-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 10px;
}

.summary-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.7rem;
  line-height: 1.35;
}

.summary-comparison-table th,
.summary-comparison-table td {
  border: 1px solid #d9d9d9;
  padding: 8px 7px;
  text-align: center;
  vertical-align: middle;
}

.summary-comparison-table thead th {
  background: #f5f7fa;
  color: var(--blue);
  font-weight: 800;
}

.summary-comparison-table tbody th {
  background: #fafafa;
  color: #444444;
  text-align: center;
  font-weight: 700;
  width: 42%;
}

.summary-comparison-table td {
  color: #222222;
  font-weight: 700;
}

.summary-comparison-table td.comparison-higher {
  color: #168038;
  font-weight: 800;
}

.summary-comparison-table td.comparison-lower {
  color: #b00020;
  font-weight: 800;
}

.summary-comparison-table td.comparison-same {
  color: #222222;
  font-weight: 800;
}

.exporting-report .snapshot-title-image {
  width: 300px !important;
  height: 82px !important;
  object-fit: cover !important;
  padding: 5px 5px !important;
  background: #ffffff !important;
  border-radius: 8px !important;
  flex-shrink: 0 !important;
}

.exporting-report .snapshot-title-main {
  gap: 24px !important;
}

.exporting-report .snapshot-title-card {
  padding-left: 12px !important;
}

/* Remove badge spacing from the school help card */
#schoolGrid > .future-suggestion-card h3,
#districtReportGrid > .future-suggestion-card h3 {
  padding-right: 0;
}

/* School readiness score card */
.readiness-score-card {
  min-height: 0;
  padding: 0;
  display: block;
  overflow: hidden;
  text-align: left;
}

/* School report */
#schoolGrid .readiness-score-card {
  min-height: 362px;
}

/* District report */
#districtReportGrid .readiness-score-card {
  min-height: 297px;
}

/* Shared small uppercase heading */
.readiness-section-label {
  display: block;
  color: #444444;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

/* Top overall-score section */
.readiness-overall-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
  border-bottom: 1px solid #d9d9d9;
}

.readiness-overall-heading {
  min-width: 0;
}

.readiness-overall-heading h3 {
  margin: 6px 0 0;
  padding: 0;
  font-size: 1rem;
}

.readiness-overall-score {
  flex-shrink: 0;
  color: var(--blue);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
}

/* Move readiness score left to make room for info button */
.readiness-score-card .readiness-overall-score {
  margin-right: 40px;
}

/* Bottom component section */
.readiness-breakdown-section {
  padding: 16px 24px 18px;
}

.readiness-breakdown-heading {
  margin-bottom: 18px;
}

.readiness-breakdown-heading p {
  margin: 7px 0 0;
  color: #666666;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  line-height: 1.4;
}

/* A–D component list */
.readiness-component-list {
  display: flex;
  flex-direction: column;
}

.readiness-component-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #eeeeee;
}

/* School and district readiness comparison columns */
.school-readiness-component-list .readiness-component-row,
.district-readiness-component-list .readiness-component-row {
  grid-template-columns: minmax(0, 1fr) 48px 72px;
}

.readiness-component-row:first-child {
  border-top: none;
}

.readiness-component-column-headings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 72px;
  gap: 10px;
  align-items: end;
  padding: 0 0 5px;
}

.readiness-component-column-headings span {
  color: #666666;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: right;
}

.readiness-component-main {
  min-width: 0;
}

.readiness-component-label {
  display: block;
  margin-bottom: 4px;

  color: #333333;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
}

/* Clickable readiness component titles */
.readiness-component-info-link {
  width: fit-content;
  border: none;
  padding: 0;
  background: transparent;
  color: var(--blue);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.readiness-component-info-link:hover {
  color: var(--gold-dark);
}

/* Individual readiness component info popup */
.readiness-component-popup h4 {
  margin: 0 0 10px;
  color: var(--blue);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
}

/* Placeholder progress bar */
.readiness-component-track {
  width: 100%;
  height: 6px;
  overflow: hidden;

  background: #e8ebef;
  border-radius: 999px;
}

.readiness-component-fill {
  display: block;
  width: 0%;
  height: 100%;

  background: var(--gold);
  border-radius: inherit;
  transition: width 0.25s ease;
}

.readiness-component-score {
  color: var(--blue);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  text-align: right;
}

.readiness-component-state-average {
  color: #777777;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  text-align: right;
}

/* Slightly taller academic maps in the district report */
#districtMathProficiencyMap,
#districtEnglishProficiencyMap {
  height: 287px;
}

/* Slightly taller income map in the school report */
#incomeMap {
  height: 282px;
}

.future-suggestion-subtitle {
  margin-top: -4px;
  margin-bottom: 18px;
  color: #666666;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  line-height: 1.45;
}

/* Readiness Score formula in info popup */
.readiness-formula {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  width: 100%;
  color: #111111;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
}

.readiness-formula-label {
  white-space: nowrap;
}

.readiness-fraction {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  line-height: 1.15;
}

.readiness-numerator {
  width: 100%;
  padding: 0 4px 3px;
  border-bottom: 1px solid #111111;
  text-align: center;
  white-space: normal;
}

.readiness-denominator {
  padding-top: 3px;
}

.print-export-button {
  background: #ffffff;
  color: var(--blue);
}

.print-export-button:hover {
  background: #f2f4f6;
  color: var(--blue-dark);
}

/* Full-width district Academic Proficiency card */
#districtReportGrid > .district-academic-card {
  grid-column: 1 / -1;
}

/* Place the two proficiency maps side by side */
#districtReportGrid .district-academic-card .two-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

#districtReportGrid .district-academic-card .map-panel {
  min-width: 0;
}

.readiness-info-sublist {
  margin-top: 6px;
  padding-left: 20px;
}

.readiness-info-sublist li {
  margin-bottom: 6px;
}

.CSEnroll-definition-list {
  margin-top: 4px;
  padding-left: 22px;
  list-style-type: disc;
}

.CSEnroll-definition-list li {
  margin: 0 0 6px;
  line-height: 1;
  list-style-type: disc;
}

.CSEnroll-definition-list li::marker {
  color: #222222;
}

.comparison-green-text {
  color: #168038;
}

.comparison-red-text {
  color: #b00020;
}

/* Statewide CS Access */

/* Reduce space below the introductory sentence */
.state-access-card .chart-note {
  margin-bottom: 6px;
}

.state-access-table-wrap {
  width: 100%;
  margin-top: 6px;
  overflow-x: auto;
}

.state-access-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
}

.state-access-table th,
.state-access-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #dddddd;
  text-align: center;
}

.state-access-table th:first-child {
  text-align: left;
}

.state-access-table thead th {
  color: var(--blue);
  font-weight: 700;
}

.state-access-total-row th,
.state-access-total-row td {
  font-weight: 700;
  border-top: 2px solid var(--gold);
}

.state-access-advanced {
  margin-top: 6px;
  padding-top: 0;
  border-top: none;
  font-family: Arial, Helvetica, sans-serif;
}

.state-access-advanced h4 {
  color: var(--blue);
  font-size: 1rem;
  margin-bottom: 6px;
}

.state-access-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 0;
  color: #444444;
  font-size: 0.9rem;
}

.state-access-stat-row strong {
  color: var(--blue);
  white-space: nowrap;
}

.state-access-denominator-note {
  margin: 0 0 4px;
  color: #777777 !important;
  font-size: 0.78rem !important;
  font-style: italic;
}

.state-summary-card h3,
.state-access-card h3 {
  padding-right: 44px;
}

/* Statewide school map */

.state-school-map-card h3 {
  padding-right: 44px;
}

.state-school-map-card .chart-note {
  margin-bottom: 10px;
}

.state-school-map-wrap {
  margin-top: 10px;
}

.state-school-map {
  height: 360px;
}

/* Custom statewide school legend */

#stateSchoolMap .state-school-legend {
  position: relative;
  width: 158px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #d6d6d6;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  font-family: Arial, Helvetica, sans-serif;
  color: #333333;
}

#stateSchoolMap .state-school-legend-title {
  padding-right: 32px;
  margin-bottom: 7px;
  color: #333333;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
}

#stateSchoolMap .state-school-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 18px;
  font-size: 0.62rem;
  line-height: 1.2;
  white-space: nowrap;
}

#stateSchoolMap .state-school-legend-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border: 1px solid #777777;
  border-radius: 50%;
}

#stateSchoolMap .state-school-legend-toggle {
  position: absolute;
  top: 5px;
  right: 5px;
  border: 1px solid #d6d6d6;
  background: #f5f7fa;
  color: var(--blue);
  padding: 1px 5px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

#stateSchoolMap .state-school-legend-toggle:hover {
  background: #eeeeee;
}

#stateSchoolMap .state-school-legend.state-school-legend-collapsed {
  width: auto;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

#stateSchoolMap
  .state-school-legend.state-school-legend-collapsed
  .state-school-legend-toggle {
  position: static;
  padding: 2px 6px;
}

/* Reduce gap between demographic charts only in Statewide report */
.state-participation-card .chart-js-section + .chart-js-section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.state-access-table tbody tr:last-child th,
.state-access-table tbody tr:last-child td {
  border-bottom: none;
}

/* Statewide demographic chart toggle */

.state-participation-card .state-demographic-toggle {
  display: flex;
  width: 100%;
  margin: 12px 0 6px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
}

.state-participation-card .state-demographic-toggle-button {
  flex: 1;
  border: none;
  border-right: 1px solid #d9d9d9;
  background: #f5f7fa;
  color: var(--blue);
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.state-participation-card .state-demographic-toggle-button:last-child {
  border-right: none;
}

.state-participation-card .state-demographic-toggle-button:hover {
  background: #eeeeee;
}

.state-participation-card .state-demographic-toggle-button.active {
  background: var(--blue);
  color: #ffffff;
}

.state-participation-card .state-demographic-chart-section {
  margin-top: 6px !important;
  padding-top: 0 !important;
  border-top: none !important;
}

.state-participation-card .state-demographic-chart-section[hidden] {
  display: none !important;
}

/* Reduce spacing between demographic charts in School report only */
#schoolGrid .participation-card .chart-js-section + .chart-js-section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Statewide report layout */
#stateReportGrid .state-school-map {
  height: 290px;
}

#stateReportGrid .state-summary-card > .state-access-card {
  margin-top: 0;
  padding: 0;
}

#stateReportGrid .state-summary-card > .state-access-card h3 {
  padding-right: 0;
}

#stateReportGrid .state-participation-card #stateGenderSection {
  margin-top: 16px !important;
}

#stateReportGrid.show {
  gap: 5px;
  padding: 5px;
}

#stateReportGrid > .grid-column {
  gap: 20px;
}

/* District readiness table */
#districtReportGrid .readiness-score-card .readiness-breakdown-section {
  padding-top: 6px;
}

#districtReportGrid .readiness-score-card .state-access-table-wrap {
  margin-top: 0;
}

#districtReportGrid .readiness-score-card .state-access-table tr > :last-child {
  /* Reserve the 72px State average column and its 10px gap. */
  padding-right: 50px;
  text-align: right;
}

#districtReportGrid
  .readiness-score-card
  .state-access-table
  thead
  th:last-child {
  padding-right: 0;
}

#districtReportGrid .readiness-score-card .readiness-overall-section {
  border-bottom: none;
}

#districtReportGrid .readiness-score-card .readiness-breakdown-heading {
  border-bottom: 1px solid #d9d9d9;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

#districtReportGrid .readiness-score-card .readiness-overall-section {
  border-bottom: none;
  padding-bottom: 0;
}

#districtReportGrid .readiness-score-card .readiness-breakdown-section {
  padding-top: 0;
}

#districtReportGrid .readiness-score-card .state-access-table thead th {
  padding-top: 2px;
}

#districtReportGrid .readiness-score-card .state-access-table th,
#districtReportGrid .readiness-score-card .state-access-table td {
  font-size: 0.7rem;
  line-height: 1.2;
  padding-top: 2px;
  padding-bottom: 2px;
}

#districtReportGrid .readiness-overall-heading h3 {
  font-size: 1.5rem;
}

#districtReportGrid .readiness-score-card .district-readiness-type-table th,
#districtReportGrid .readiness-score-card .district-readiness-type-table td {
  font-size: 0.7rem;
  line-height: 1.2;
  padding: 4px 3px;
  overflow-wrap: anywhere;
}

#districtReportGrid .readiness-score-card .district-readiness-type-table tr > :not(:first-child) {
  text-align: center;
}

#districtReportGrid .readiness-score-card .district-readiness-type-table tr > :last-child {
  padding-right: 3px;
}

#districtReportGrid .district-readiness-type-table {
  width: 100%;
  table-layout: fixed;
}

#districtReportGrid .district-readiness-type-table thead th:first-child {
  width: 30%;
}

.exporting-report .snapshot-title-image {
  width: 300px !important;
  height: auto !important;
  object-fit: contain !important;
  padding: 5px !important;
  background: #ffffff !important;
  border-radius: 8px !important;
  flex-shrink: 0 !important;
}

.card-info-popup .info-list > li > ul {
  padding-left: 24px;
  margin-top: 6px;
}

#schoolGrid .summary-comparison-table th,
#schoolGrid .summary-comparison-table td,
#districtReportGrid .summary-comparison-table th,
#districtReportGrid .summary-comparison-table td {
  padding-top: 4px;
  padding-bottom: 4px;
  line-height: 1.2;
}

#districtReportGrid .readiness-score-card .district-readiness-type-table {
  width: 100%;
  table-layout: fixed;
}

#districtReportGrid .readiness-score-card .district-readiness-type-table th,
#districtReportGrid .readiness-score-card .district-readiness-type-table td {
  font-size: 0.85rem;
  line-height: 1.2;
  padding: 4px 8px;
}

#districtReportGrid .readiness-score-card .district-readiness-type-table thead th:first-child {
  width: 50%;
}

#districtReportGrid .readiness-score-card .district-readiness-type-table tr > :last-child {
  position: static;
  padding-right: 8px;
  text-align: center;
}

.district-type-details {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

#districtTypeReadinessDialog {
  box-sizing: border-box;
  width: min(480px, calc(100vw - 32px));
  max-height: 85vh;
  margin: auto;
  padding: 20px;
  overflow-y: auto;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  background: #ffffff;
  color: #051e39;
  font-family: Arial, Helvetica, sans-serif;
}

#districtTypeReadinessDialog::backdrop {
  background: rgb(0 0 0 / 35%);
}

.district-type-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
}

.district-type-dialog-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.district-type-dialog-header button {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1.5rem;
  cursor: pointer;
}

#districtTypeReadinessDialog p {
  font-size: 0.85rem;
  line-height: 1.4;
}

.district-type-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.district-type-breakdown-table th,
.district-type-breakdown-table td {
  padding: 9px 4px;
  border-bottom: 1px solid #dddddd;
  text-align: left;
}

.district-type-breakdown-table tr > :last-child {
  text-align: right;
}

.district-type-breakdown-table td {
  font-weight: 700;
}