:root {
  --blue: #3A81E8;
  --dark-blue: #2D528A;
  --gray: #3C3C50;
  --white: #FFFFFF;
  --smoke: #F5F5F5;
  --line: #E1E7EF;
  --muted: #6F778A;
  --pale: #EAF3FF;
  --pale-2: #F3F7FD;
  --shadow: 0 10px 28px rgba(45, 82, 138, .065);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--gray);
  background: var(--smoke);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
button, select { font: inherit; }

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 84% 8%, rgba(255,255,255,.22), transparent 0 10%, transparent 11%),
    linear-gradient(118deg, var(--dark-blue) 0%, var(--blue) 68%, #70A7F3 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -7% -160px 46%;
  height: 300px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  transform: rotate(-12deg);
  box-shadow: 0 0 0 42px rgba(255,255,255,.05), 0 0 0 86px rgba(255,255,255,.035);
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 42px;
  min-height: 0;
}
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.brand-logo { width: 64px !important; height: 64px !important; max-width: 64px !important; max-height: 64px !important; object-fit: contain; flex: 0 0 64px; display: block; }
.brand-name { max-width: 620px; font-weight: 700; font-size: 11px; line-height: 1.35; letter-spacing: .075em; }
.brand-subtitle { opacity: .82; font-size: 12px; margin-top: 2px; }
.hero-copy { max-width: 980px; }
.hero-eyebrow { color: rgba(255,255,255,.86); }
.eyebrow { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .15em; }
.eyebrow.blue { color: var(--blue); }
h1 { margin: 0; max-width: 980px; font-size: clamp(32px, 3.6vw, 48px); line-height: 1.09; letter-spacing: -.035em; }

.container { width: min(1220px, calc(100% - 40px)); margin: 0 auto; }
.section { padding: 54px 0 4px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.compact-heading { margin-bottom: 18px; }
h2 { margin: 0; color: var(--gray); font-size: clamp(27px, 3vw, 38px); line-height: 1.15; letter-spacing: -.028em; }
h3 { margin: 0; font-size: 17px; line-height: 1.35; color: var(--gray); }
h4 { margin: 0; color: var(--gray); font-size: 14px; font-weight: 700; }
.cohort-summary { color: var(--muted); font-size: 12px; }

.kpi-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 9px; margin-bottom: 16px; }
.kpi-card {
  min-height: 106px;
  padding: 14px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.kpi-card span { color: var(--gray); font-size: 11.5px; line-height: 1.28; text-align: center; }
.kpi-card strong { font-size: 31px; line-height: 1; color: var(--gray); letter-spacing: -.04em; text-align: center; }
.kpi-card.highlight { background: var(--pale-2); border-color: #CFE0F8; }
.kpi-card.highlight strong { color: var(--dark-blue); }

.panel {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.panel-title { margin-bottom: 14px; }
.panel-title p { margin: 5px 0 0; color: var(--muted); font-size: 12px; max-width: 820px; }
.chart-wrap { position: relative; height: 300px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }

.stages-panel { padding: 20px 22px 22px; }
.stage-flow {
  display: grid;
  grid-template-columns: minmax(105px,1fr) 46px minmax(105px,1fr) 46px minmax(125px,1fr) 46px minmax(105px,1fr) 46px minmax(105px,1fr);
  align-items: stretch;
  gap: 7px;
}
.stage-card {
  min-width: 0;
  min-height: 100px;
  padding: 16px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #FBFCFE);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.stage-card strong { color: var(--dark-blue); font-size: 30px; line-height: 1; letter-spacing: -.04em; }
.stage-card span { margin-top: 9px; font-size: 11.5px; line-height: 1.3; }
.stage-card:last-child { background: var(--pale-2); border-color: #CFE0F8; }
.stage-link { min-width: 44px; display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--muted); }
.stage-link b { color: var(--dark-blue); font-size: 12px; }
.stage-link i { display: block; width: 100%; height: 1px; margin-top: 7px; background: #C9D7E8; position: relative; }
.stage-link i::after { content: ""; position: absolute; right: -1px; top: -3px; border-left: 6px solid #C9D7E8; border-top: 3px solid transparent; border-bottom: 3px solid transparent; }

.cohort-heading { align-items: center; }
.cohort-tools { display: flex; align-items: center; gap: 18px; }
.cohort-control { display: flex; align-items: center; gap: 9px; }
.cohort-control label { color: var(--muted); font-size: 12px; }
select {
  max-width: 280px;
  padding: 9px 34px 9px 11px;
  color: var(--gray);
  background: white;
  border: 1px solid #C9D3E2;
  border-radius: 10px;
  font-size: 13px;
}
.cohort-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, .9fr); gap: 16px; align-items: stretch; }
.map-panel { padding: 0; overflow: hidden; }
.map-title-row { margin: 0; padding: 18px 20px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.map-legend { display: flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--muted); font-size: 11px; }
.legend-dot { display: inline-block; width: 13px; height: 13px; border-radius: 50%; background: rgba(58,129,232,.66); border: 2px solid white; box-shadow: 0 0 0 1px rgba(45,82,138,.28); }
.city-map { width: 100%; height: 440px; background: #DDE8F3; }
.leaflet-container { font-family: "Open Sans", Arial, sans-serif; }
.leaflet-container img, .leaflet-container .leaflet-tile { max-width: none !important; max-height: none !important; }
.leaflet-tooltip.city-tooltip { background: rgba(60,60,80,.94); color: white; border: 0; border-radius: 8px; padding: 7px 9px; box-shadow: 0 5px 18px rgba(0,0,0,.15); font-size: 12px; }
.leaflet-tooltip.city-tooltip::before { border-top-color: rgba(60,60,80,.94); }
.side-stack { display: grid; grid-template-rows: repeat(3, 1fr); gap: 12px; min-height: 440px; }
.side-panel { padding: 16px 16px 10px; overflow: hidden; }
.side-panel .panel-title { margin-bottom: 5px; }
.side-chart { height: 105px; }
.prior-chart { height: 112px; }

.course-panel { margin-bottom: 16px; }
.course-chart { height: 260px; }
.testing-panel { padding: 22px; margin-bottom: 54px; }
.testing-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 14px; }
.testing-title { margin: 0; flex: 1; }
.variant-control { display: flex; align-items: center; gap: 10px; }
.variant-label { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.segmented { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; padding: 4px; border: 1px solid var(--line); background: var(--pale-2); border-radius: 12px; }
.segment { border: 0; border-radius: 9px; background: transparent; color: var(--muted); padding: 8px 11px; cursor: pointer; font-size: 12px; font-weight: 600; transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
.segment:hover { color: var(--dark-blue); }
.segment.active { color: white; background: var(--dark-blue); box-shadow: 0 4px 12px rgba(45,82,138,.18); }
.testing-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 0 0 14px; }
.testing-kpi { min-height: 94px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: #FBFCFE; display: flex; flex-direction: column; justify-content: space-between; }
.testing-kpi span { display: block; color: var(--muted); font-size: 11.5px; }
.testing-kpi strong { color: var(--dark-blue); font-size: 27px; letter-spacing: -.03em; }
.testing-kpi small { color: var(--muted); font-size: 12px; font-weight: 600; }
.testing-charts { gap: 12px; }
.subpanel { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.emphasis-subpanel { background: #FCFDFF; }
.subpanel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.subpanel-heading span { color: var(--muted); font-size: 10.5px; }
.test-distribution, .block-chart { height: 300px; }

footer { background: var(--gray); color: rgba(255,255,255,.8); }
.footer-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 12px; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .cohort-layout { grid-template-columns: minmax(0, 1.75fr) minmax(260px, .85fr); gap: 12px; }
  .city-map { height: 420px; }
  .side-stack { min-height: 420px; gap: 10px; }
  .side-panel { padding: 13px 13px 8px; }
  .side-chart { height: 100px; }
  .prior-chart { height: 108px; }
  .stage-card { padding: 14px 10px; }
  .stage-card strong { font-size: 27px; }
  .stage-card span { font-size: 10.5px; }
  .stage-link { min-width: 36px; }
}

@media (max-width: 900px) {
  .stage-flow { grid-template-columns: 1fr; }
  .stage-link { min-height: 30px; }
  .stage-link i { width: 1px; height: 18px; margin-top: 4px; }
  .stage-link i::after { right: -3px; top: auto; bottom: -1px; border-left: 3px solid transparent; border-right: 3px solid transparent; border-top: 6px solid #C9D7E8; border-bottom: 0; }
  .cohort-layout { grid-template-columns: 1fr; }
  .city-map { height: 380px; }
  .side-stack { grid-template-columns: repeat(3, 1fr); grid-template-rows: none; min-height: 0; }
  .side-chart, .prior-chart { height: 190px; }
}

@media (max-width: 760px) {
  .hero-inner, .container { width: min(100% - 24px, 1220px); }
  .hero-inner { padding-top: 18px; padding-bottom: 34px; }
  .brand { margin-bottom: 24px; align-items: center; }
  .brand-logo { width: 52px !important; height: 52px !important; max-width: 52px !important; max-height: 52px !important; flex-basis: 52px; }
  .section { padding-top: 42px; }
  .section-heading, .cohort-heading { align-items: flex-start; flex-direction: column; }
  .cohort-tools { width: 100%; align-items: flex-start; flex-direction: column; gap: 10px; }
  .cohort-control { width: 100%; align-items: flex-start; flex-direction: column; }
  select { width: 100%; max-width: none; }
  .kpi-grid, .grid-2, .testing-kpis, .side-stack { grid-template-columns: 1fr; }
  .kpi-card { min-height: 94px; }
  .city-map { height: 400px; }
  .side-stack { display: grid; }
  .side-chart, .prior-chart { height: 240px; }
  .testing-header { flex-direction: column; }
  .variant-control { align-items: flex-start; flex-direction: column; width: 100%; }
  .segmented { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .segment { text-align: center; }
  .subpanel-heading { align-items: flex-start; flex-direction: column; }
  .footer-inner { padding: 22px 0; align-items: flex-start; flex-direction: column; }
}


/* Defensive hero sizing for GitHub Pages and external browser styles */
.hero { height: auto !important; min-height: 0 !important; }
.hero .brand img.brand-logo { width: 64px !important; height: 64px !important; max-width: 64px !important; max-height: 64px !important; }
@media (max-width: 760px) {
  .hero .brand img.brand-logo { width: 52px !important; height: 52px !important; max-width: 52px !important; max-height: 52px !important; }
}


/* 2026-08-16 readability/map fixes */
@media (max-width: 760px) {
  .city-map { height: 330px; }
}
