.constituency-page {
  --atlas-ink: #07324a;
  --atlas-copy: #557284;
  --atlas-blue: #008fd5;
  --atlas-blue-dark: #0075b3;
  --atlas-line: #d8e6ec;
  --atlas-pale: #eef8fc;
  --atlas-surface: #ffffff;
  --atlas-radius: 16px;
  background: #f5fafc;
}

.constituency-page [hidden] { display: none !important; }
.constituency-page button,
.constituency-page select,
.constituency-page input { font: inherit; }
.constituency-page button { -webkit-tap-highlight-color: transparent; }
.constituency-page .page-shell { width: min(calc(100% - 96px), 1280px); max-width: 1280px; }

.constituency-hero {
  position: relative;
  isolation: isolate;
  min-height: 184px;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 125, 185, .12);
  background: #eaf6fb;
}

.constituency-hero-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(90deg, rgba(246, 252, 254, .98) 0%, rgba(246, 252, 254, .91) 34%, rgba(240, 249, 253, .36) 67%, rgba(238, 248, 252, .22) 100%),
    var(--cms-constituency-hero-desktop, url("../assets/kabindra-brand/gorkha-constituency-banner-v1.webp"));
  background-position: center;
  background-size: cover;
  filter: saturate(.82) contrast(.98);
}

.constituency-hero-art::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(0,143,213,.035));
  content: "";
}

.constituency-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 310px);
  gap: 54px;
  align-items: center;
  min-height: 184px;
  padding-block: 26px;
}

.constituency-hero-copy { max-width: 720px; }
.constituency-hero-copy .page-kicker { margin: 0 0 12px; }
.constituency-hero-copy h1 {
  margin: 0;
  color: var(--atlas-ink);
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: clamp(44px, 4vw, 56px);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: .96;
}
.constituency-hero-copy > p:last-child {
  max-width: 570px;
  margin: 10px 0 0;
  color: #41667a;
  font-size: 13px;
  line-height: 1.5;
}

.constituency-source-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-height: 62px;
  padding: 11px 14px;
  border: 1px solid rgba(0, 125, 185, .18);
  border-radius: 14px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 14px 34px rgba(7, 50, 74, .08);
  transition: border-color 160ms ease, transform 160ms ease;
}
.constituency-source-card:hover { border-color: rgba(0, 125, 185, .42); transform: translateY(-2px); }
.constituency-source-card:active { transform: translateY(0); }
.constituency-source-card > i:first-child { color: var(--atlas-blue); font-size: 23px; }
.constituency-source-card > i:last-child { color: var(--atlas-blue-dark); font-size: 17px; }
.constituency-source-card span { display: grid; gap: 4px; min-width: 0; }
.constituency-source-card strong { color: var(--atlas-ink); font-size: 11px; }
.constituency-source-card small { color: var(--atlas-copy); font-size: 9px; line-height: 1.35; }

.gorkha-atlas { position: relative; padding-bottom: 84px; background: linear-gradient(180deg, #f8fcfd 0%, #f3f9fb 72%, #f8fcfd 100%); color: var(--atlas-ink); }
.atlas-page-shell { padding-top: 34px; }
.atlas-view-nav-wrap { position: relative; z-index: 2; height: 0; }
.atlas-view-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(calc(100% - 36px), 400px);
  margin: 0 auto;
  padding: 4px;
  border: 1px solid #c9dce5;
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 26px rgba(7,50,74,.09);
  transform: translateY(-50%);
}
.atlas-view-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  min-width: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #496b7e;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.atlas-view-nav button.is-active { background: var(--atlas-blue); color: white; box-shadow: 0 6px 16px rgba(0,143,213,.23); }
.atlas-view-nav button:active { transform: translateY(1px); }
.atlas-view-nav i { font-size: 18px; }

.constituency-scorecard {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr .8fr 1fr .95fr;
  border: 1px solid var(--atlas-line);
  border-radius: var(--atlas-radius);
  background: var(--atlas-surface);
  box-shadow: 0 12px 32px rgba(7,50,74,.045);
}
.constituency-scorecard article {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  gap: 11px;
  align-items: center;
  min-width: 0;
  min-height: 70px;
  padding: 12px 14px;
}
.constituency-scorecard article + article { border-left: 1px solid var(--atlas-line); }
.constituency-scorecard article > i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eaf7fd;
  color: var(--atlas-blue);
  font-size: 17px;
}
.constituency-scorecard article span { display: grid; min-width: 0; }
.constituency-scorecard small { overflow: hidden; color: #6b8594; font-size: 10px; font-weight: 700; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.constituency-scorecard strong { margin-top: 2px; color: var(--atlas-ink); font-family: "Inter Tight", Inter, sans-serif; font-size: clamp(19px, 1.7vw, 24px); letter-spacing: -.035em; line-height: 1; }
.constituency-scorecard em { margin-top: 4px; overflow: hidden; color: #7d929e; font-size: 9px; font-style: normal; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }

.atlas-controls {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-top: 0;
}
.atlas-map-types { display:flex; min-height:46px; margin:0; padding:4px; align-items:center; border:1px solid #cddfe7; border-radius:10px; background:#f3f8fb; }
.atlas-map-types legend { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.atlas-map-types button { min-height:36px; padding:0 11px; border:0; border-radius:7px; color:#5b7889; background:transparent; cursor:pointer; font-size:10px; font-weight:800; }
.atlas-map-types button.is-active { color:#fff; background:var(--atlas-ink); box-shadow:0 4px 12px rgba(7,50,74,.16); }
.atlas-options { position: absolute; top: 8px; right: 12px; z-index: 5; }
.atlas-options summary { display: inline-flex; min-height: 34px; gap: 7px; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid #cddfe7; border-radius: 8px; background: rgba(255,255,255,.96); color: #315d73; cursor: pointer; font-size: 9px; font-weight: 900; list-style: none; }
.atlas-options summary::-webkit-details-marker { display: none; }
.atlas-options[open] > summary { border-color: var(--atlas-blue); color: var(--atlas-blue-dark); }
.atlas-options > .atlas-controls { position: absolute; top: 42px; right: 0; width: min(700px, calc(100vw - 130px)); padding: 12px; border: 1px solid #cddfe7; border-radius: 12px; background: rgba(255,255,255,.98); box-shadow: 0 14px 36px rgba(7,50,74,.13); }
.atlas-select-label { display: grid; gap: 6px; min-width: min(100%, 330px); color: #658090; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.atlas-select-wrap { position: relative; display: flex; align-items: center; }
.atlas-select-wrap > i:first-child { position: absolute; left: 14px; z-index: 1; color: var(--atlas-blue); font-size: 18px; pointer-events: none; }
.atlas-select-wrap > i:last-child { position: absolute; right: 14px; z-index: 1; color: #6e8795; font-size: 14px; pointer-events: none; }
.atlas-select-wrap select {
  width: 100%;
  min-height: 46px;
  padding: 0 42px;
  border: 1px solid #cddfe7;
  border-radius: 10px;
  appearance: none;
  background: white;
  color: var(--atlas-ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.atlas-reset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid #cddfe7;
  border-radius: 10px;
  background: white;
  color: #365f75;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.atlas-reset:active { transform: translateY(1px); }
.atlas-layers { display: flex; gap: 8px; align-items: center; min-height: 46px; margin: 0 0 0 auto; padding: 0; border: 0; }
.atlas-layers legend { float: left; margin-right: 4px; color: #6b8390; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.atlas-layer { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 12px; border: 1px solid #d3e2e8; border-radius: 999px; background: white; color: #476b7f; cursor: pointer; font-size: 11px; font-weight: 800; }
.atlas-layer input { position: absolute; opacity: 0; pointer-events: none; }
.atlas-layer:has(input:not(:checked)) { opacity: .5; }
.atlas-layer-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff765f; box-shadow: 0 0 0 3px rgba(255,118,95,.13); }
.atlas-layer-police .atlas-layer-dot { background: #764bc1; box-shadow: 0 0 0 3px rgba(118,75,193,.12); }

.atlas-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(380px, .9fr);
  gap: 16px;
  margin-top: 12px;
  align-items: stretch;
}
.atlas-map-card,
.atlas-profile,
.story-card,
.census-browser,
.census-library-dialog,
.explorer-method { border: 1px solid var(--atlas-line); border-radius: var(--atlas-radius); background: white; box-shadow: 0 12px 32px rgba(7,50,74,.045); }
.atlas-map-card { position: relative; display: flex; min-width: 0; min-height: 430px; margin: 0; flex-direction: column; overflow: hidden; }
.atlas-map-head { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 12px 148px 9px 16px; border-bottom: 1px solid #e0ebef; }
.atlas-map-head > div { display: grid; gap: 3px; }
.atlas-map-head span { color: var(--atlas-blue-dark); font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.atlas-map-head strong { color: var(--atlas-ink); font-size: 14px; }
.atlas-map-head p { display: inline-flex; gap: 7px; align-items: center; margin: 0; color: #78909c; font-size: 11px; }
.atlas-map-head > p { display: inline-flex; }
.atlas-map-head p i { color: var(--atlas-blue); font-size: 17px; }
.atlas-map-stage { position: relative; display: grid; min-height: 330px; flex: 1 1 auto; place-items: center; overflow: hidden; background: linear-gradient(145deg, #fafdfe 0%, #eef8fb 100%); }
.atlas-map-canvas { position: absolute; inset: 0; display: grid; min-width: 0; min-height: 0; overflow: hidden; place-items: center; }
.atlas-leaflet-map { position:absolute; z-index:1; inset:0; width:100%; height:100%; background:#eaf3f6; font-family:Inter,sans-serif; }
.atlas-leaflet-map .leaflet-control-attribution { font-size:8px; }
.atlas-leaflet-map .leaflet-tooltip { color:var(--atlas-ink); font-size:10px; font-weight:800; }
.atlas-facility-popup { display:grid; min-width:190px; gap:4px; color:var(--atlas-ink); }
.atlas-facility-popup small { color:var(--atlas-blue-dark); font-size:9px; font-weight:900; letter-spacing:.09em; text-transform:uppercase; }
.atlas-facility-popup strong { font-size:14px; line-height:1.25; }
.atlas-facility-popup span,.atlas-facility-popup em { color:#567586; font-size:10px; font-style:normal; }
.atlas-facility-popup code { margin-top:3px; color:#718b98; font-size:9px; }
.atlas-map-stage::before { position: absolute; inset: 0; background-image: linear-gradient(rgba(0,125,185,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(0,125,185,.045) 1px, transparent 1px); background-size: 28px 28px; content: ""; mask-image: linear-gradient(to bottom right, black, transparent 75%); pointer-events: none; }
.atlas-map { position: relative; z-index: 1; display: block; width: 100%; height: 100%; min-height: 0; margin: 0; cursor: grab; touch-action: none; user-select: none; }
.atlas-map.is-panning { cursor: grabbing; }
.atlas-map:focus-visible { outline: 3px solid rgba(0,143,213,.55); outline-offset: -3px; }
.atlas-map-viewport { transition: none; }
.atlas-local-path { fill: #cfeaf5; stroke: white; stroke-width: 2.7; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill 150ms ease, opacity 150ms ease; }
.atlas-local-path[data-local-id="2"] { fill: #bfe3f5; }
.atlas-local-path[data-local-id="3"] { fill: #ffd0c2; }
.atlas-local-path[data-local-id="7"] { fill: #c6ebe4; }
.atlas-local-path[data-local-id="8"] { fill: #ddd5f3; }
.atlas-local-path.is-partial { fill: url(#atlas-partial-pattern); }
.atlas-local-path:hover,
.atlas-local-path:focus-visible { fill: #8fd2ee; outline: none; }
.atlas-map.has-selection .atlas-local-path:not(.is-selected) { opacity: .48; }
.atlas-local-path.is-selected { fill: #66bee6; stroke: #007bb9; stroke-width: 3.2; opacity: 1 !important; }
.atlas-map-label { fill: #173d51; font-family: Inter, sans-serif; font-size: 14px; font-weight: 800; paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-width: 4px; text-anchor: middle; pointer-events: none; }
.atlas-map-label.is-selected { fill: #005f94; }
.atlas-marker { stroke: white; stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: pointer; }
.atlas-marker:focus-visible { stroke: #07324a; stroke-width: 3; outline: none; }
.atlas-marker-health { fill: #ff765f; }
.atlas-marker-police { fill: #764bc1; }
.atlas-map-tools { position: absolute; top: 58px; right: 12px; z-index: 3; display: grid; overflow: hidden; border: 1px solid #cddfe7; border-radius: 10px; background: white; box-shadow: 0 8px 20px rgba(7,50,74,.1); }
.atlas-map-stage .atlas-map-tools { top: 12px; }
.atlas-map-tools button { display: grid; width: 44px; height: 44px; border: 0; border-bottom: 1px solid #e0eaee; background: white; color: #315d73; cursor: pointer; place-items: center; }
.atlas-map-tools button:last-child { border-bottom: 0; }
.atlas-map-tools button:hover { background: #eff9fd; color: var(--atlas-blue-dark); }
.atlas-map-tools button:disabled { color: #a8bbc3; background: #f3f7f8; cursor: not-allowed; }
.atlas-map-footer { position: static; z-index: 2; display: flex; width: auto; gap: 14px; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid #dfebef; background: white; }
.atlas-legend { display: flex; flex-wrap: wrap; gap: 9px 14px; align-items: center; color: #5d7a89; font-size: 9px; font-weight: 700; }
.atlas-legend > span { display: inline-flex; gap: 6px; align-items: center; }
.atlas-legend i { display: block; width: 10px; height: 10px; border-radius: 3px; background: #bfe3f5; }
.atlas-legend .atlas-legend-partial { background: repeating-linear-gradient(45deg,#dff2fb 0 3px,#54acd2 3px 5px); }
.atlas-legend .atlas-legend-health,
.atlas-legend .atlas-legend-police { width: 8px; height: 8px; border-radius: 50%; background: #ff765f; }
.atlas-legend .atlas-legend-police { background: #764bc1; }
.atlas-map-footer-actions { display: flex; flex: 0 0 auto; gap: 10px; align-items: center; color: #728a97; font-size: 9px; font-weight: 700; }
.atlas-map-footer-actions button { display: inline-flex; gap: 6px; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid #cfe0e7; border-radius: 8px; background: white; color: #087ab5; cursor: pointer; font-size: 10px; font-weight: 800; }
.atlas-map-card:fullscreen { width: 100%; height: 100%; border: 0; border-radius: 0; background: white; }
.atlas-map-card:fullscreen .atlas-map-stage { min-height: calc(100vh - 116px); }

.atlas-profile { display: flex; min-width: 0; min-height: 315px; padding: 15px 17px; flex-direction: column; }
.atlas-profile-head { display: flex; gap: 15px; align-items: flex-start; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid #deeaee; }
.atlas-profile-head p { margin: 0 0 6px; color: var(--atlas-blue-dark); font-size: 9px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.atlas-profile-head h2 { margin: 0; color: var(--atlas-ink); font-family: "Inter Tight", Inter, sans-serif; font-size: clamp(25px, 2.5vw, 32px); letter-spacing: -.04em; line-height: 1; }
.atlas-profile-head > div > span { display: block; margin-top: 7px; color: #6e8795; font-size: 11px; line-height: 1.4; }
.atlas-verified { display: inline-flex; flex: 0 0 auto; gap: 6px; align-items: center; min-height: 30px; padding: 0 9px; border-radius: 999px; background: #eaf7fd; color: #087ab5; font-size: 10px; font-weight: 900; }
.atlas-verified i { font-size: 15px; }
.atlas-scope-note { margin: 10px 0; color: #577485; font-size: 10px; line-height: 1.45; }
.atlas-primary-stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 1px solid #deeaee; border-left: 1px solid #deeaee; }
.atlas-primary-stats > div { display: grid; gap: 3px; min-width: 0; padding: 9px 11px; border-right: 1px solid #deeaee; border-bottom: 1px solid #deeaee; }
.atlas-primary-stats span { color: #6a8492; font-size: 10px; font-weight: 700; }
.atlas-primary-stats strong { color: var(--atlas-ink); font-family: "Inter Tight", Inter, sans-serif; font-size: 19px; letter-spacing: -.03em; }
.atlas-service-stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 9px; }
.atlas-service { display: flex; gap: 8px; align-items: center; min-width: 0; padding: 8px 10px; border-radius: 10px; background: #fff3ef; }
.atlas-service-police { background: #f2eefb; }
.atlas-service > i { color: #e7614c; font-size: 18px; }
.atlas-service-police > i { color: #704bb4; }
.atlas-service span { display: grid; gap: 2px; min-width: 0; }
.atlas-service small { color: #748995; font-size: 9px; line-height: 1.3; }
.atlas-service strong { color: var(--atlas-ink); font-size: 15px; }
.atlas-condition-section { margin-top: 16px; }
.atlas-subhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.atlas-subhead h3 { margin: 0; font-size: 13px; }
.atlas-subhead span { color: #7a919d; font-size: 9px; }
.atlas-condition-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; overflow: hidden; border: 1px solid #deeaee; border-radius: 10px; background: #deeaee; }
.atlas-condition-grid > div { display: grid; gap: 4px; padding: 10px; background: white; }
.atlas-condition-grid span { color: #6d8591; font-size: 9px; }
.atlas-condition-grid strong { font-size: 13px; }
.atlas-details { margin-top: 14px; border-top: 1px solid #deeaee; }
.atlas-details summary { display: flex; align-items: center; justify-content: space-between; min-height: 45px; color: #315f76; cursor: pointer; font-size: 11px; font-weight: 800; list-style: none; }
.atlas-details summary > span { display: inline-flex; gap: 7px; align-items: center; }
.atlas-details summary i { color: var(--atlas-blue); font-size: 16px; }
.atlas-details[open] summary > i { transform: rotate(180deg); }
.atlas-details-body { padding: 0 0 12px; }
.atlas-evidence-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.atlas-evidence-grid h4,
.atlas-wards h4 { margin: 0 0 8px; color: #496b7d; font-size: 10px; }
.atlas-evidence-grid ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.atlas-evidence-grid li { display: flex; gap: 7px; justify-content: space-between; color: #6b8390; font-size: 9px; }
.atlas-evidence-grid li strong { color: #244f65; }
.atlas-ward-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
.atlas-ward-grid > div { display: grid; gap: 2px; padding: 8px; border-radius: 8px; background: #f3f9fb; }
.atlas-ward-grid span { color: #6c8490; font-size: 8px; }
.atlas-ward-grid strong { font-size: 11px; }
.atlas-profile-action { display: inline-flex; gap: 8px; align-items: center; justify-content: space-between; min-height: 36px; margin-top: auto; padding: 0 12px; border: 1px solid #c5dfe9; border-radius: 9px; background: #f2faff; color: #0079b8; cursor: pointer; font-size: 10px; font-weight: 900; }
.atlas-profile-action:active { transform: translateY(1px); }

.atlas-section-head { display: flex; gap: 30px; align-items: end; justify-content: space-between; margin: 72px 0 22px; }
.atlas-section-head .page-kicker { margin: 0 0 8px; }
.atlas-section-head h2,
.explorer-heading h2 { margin: 0; font-family: "Inter Tight", Inter, sans-serif; font-size: clamp(34px,4vw,50px); letter-spacing: -.045em; line-height: .98; }
.atlas-section-head > p { max-width: 470px; margin: 0; color: #5d7989; font-size: 13px; line-height: 1.6; }
.stories-panel { margin-top: 42px; padding-top: 28px; border-top: 1px solid var(--atlas-line); }
.stories-heading { max-width: 680px; margin-bottom: 22px; }
.stories-heading h2 { margin: 0; font-family: "Inter Tight", Inter, sans-serif; font-size: clamp(32px, 3.5vw, 46px); letter-spacing: -.045em; line-height: 1; }
.stories-heading p { max-width: 620px; margin: 12px 0 0; color: #5d7989; font-size: 14px; line-height: 1.6; }
.story-section { margin-top: 14px; }
.story-section > .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.story-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.story-card { display: grid; min-width: 0; min-height: 166px; padding: 13px 14px 11px; grid-template-rows: auto 1fr auto; }
.story-card > header { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.story-card > header h3 { margin: 0; color: var(--atlas-blue-dark); font-size: 11px; }
.story-card > header > i { color: var(--atlas-blue); font-size: 17px; }
.story-card[data-topic="households"] > header > i { color: #259f73; }
.story-card[data-topic="health"] > header > i { color: #e46854; }
.story-card[data-topic="economy"] > header > i { color: #6b56b5; }
.story-card-body { display: grid; grid-template-columns: minmax(82px,.75fr) minmax(0,1.25fr); gap: 9px; align-items: center; min-width: 0; }
.story-card-body > div:first-child { display: grid; align-content: center; min-width: 0; }
.story-main-label { color: #738995; font-size: 8px; line-height: 1.35; }
.story-main-value { margin-top: 5px; font-family: "Inter Tight", Inter, sans-serif; font-size: 23px; letter-spacing: -.04em; line-height: 1; }
.story-mini { display: grid; min-width: 0; align-items: center; }
.story-card > footer { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; align-items: end; padding-top: 7px; border-top: 1px solid #e5eef2; }
.story-interpretation { display: -webkit-box; margin: 0; overflow: hidden; color: #667f8d; font-size: 8px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.story-link { display: grid; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: #eef8fc; color: #007ab9; cursor: pointer; place-items: center; }
.story-link:active { transform: translateY(1px); }
.story-line-chart svg { display: block; width: 100%; min-width: 0; height: auto; }
.story-line-grid { stroke: #e0ebef; stroke-width: 1; }
.story-line-path { fill: none; stroke: #008fd5; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; }
.story-line-point { fill: #008fd5; stroke: white; stroke-width: 1.5; }
.story-line-chart text { fill: #78909c; font-family: Inter,sans-serif; font-size: 7px; }
.story-household-chart { display: grid; gap: 7px; }
.story-household-people { display: flex; gap: 2px; align-items: end; }
.story-household-people i { background: linear-gradient(90deg,#26a978 0 var(--person-fill),#d9eae4 var(--person-fill) 100%); background-clip: text; color: transparent; font-size: 22px; -webkit-background-clip: text; }
.story-household-chart > span { color: #66818f; font-size: 8px; }
.story-donut-wrap { display: grid; grid-template-columns: 70px minmax(0,1fr); gap: 6px; align-items: center; }
.story-donut-wrap svg { display: block; width: 70px; }
.story-donut-base,.story-donut-segment { fill: none; stroke-width: 11; }
.story-donut-base { stroke: #e5eef2; }
.story-donut-segment.is-1 { stroke: #008fd5; }
.story-donut-segment.is-2 { stroke: #7d9db0; }
.story-donut-total { fill: var(--atlas-ink); font-family: "Inter Tight",Inter,sans-serif; font-size: 11px; font-weight: 900; }
.story-donut-legend { display: grid; gap: 6px; }
.story-donut-legend span { display: flex; gap: 5px; align-items: center; color: #647f8d; font-size: 7px; }
.story-donut-legend span::before { width: 6px; height: 6px; border-radius: 50%; background: #008fd5; content: ""; }
.story-donut-legend span.is-2::before { background: #7d9db0; }
.mini-bars { display: grid; width: 100%; gap: 5px; }
.mini-bar-row { display: grid; grid-template-columns: 42px minmax(0,1fr) 30px; gap: 5px; align-items: center; }
.mini-bar-label { overflow: hidden; color: #6d8491; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.mini-bar-row > strong { color: #537083; font-size: 7px; text-align: right; }
.mini-bar-track { position: relative; height: 5px; overflow: hidden; border-radius: 99px; background: transparent; }
.mini-bar-fill { position: absolute; inset: 0 auto 0 0; width: var(--bar-size); border-radius: inherit; background: #4db7dc; }
.story-card[data-topic="economy"] .mini-bar-fill { background: #62bca7; }

.census-explorer-panel { padding-top: 18px; }
.explorer-heading { display: flex; gap: 40px; align-items: end; justify-content: space-between; margin-bottom: 24px; }
.explorer-heading .page-kicker { margin: 0 0 8px; }
.explorer-heading > div > p:last-child { max-width: 650px; margin: 14px 0 0; color: #5c7888; font-size: 14px; line-height: 1.65; }
.explorer-source-badge { display: inline-flex; flex: 0 0 auto; gap: 7px; align-items: center; min-height: 38px; padding: 0 12px; border-radius: 999px; background: #eaf7fd; color: #087ab5; font-size: 11px; font-weight: 900; }
.explorer-filters { display: grid; grid-template-columns: minmax(240px,1.5fr) minmax(120px,.6fr) minmax(170px,.9fr); gap: 10px; margin-bottom: 14px; }
.explorer-filters label { display: grid; gap: 6px; color: #67818f; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.explorer-filters select { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #cddfe7; border-radius: 9px; background: white; color: var(--atlas-ink); font-size: 12px; font-weight: 700; }

.census-browser { overflow: hidden; }
.census-browser-bar { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid #deeaee; }
.census-browser-identity { display: flex; gap: 11px; align-items: center; min-width: 0; }
.census-browser-identity > i { display: grid; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 10px; background: #eaf7fd; color: var(--atlas-blue); font-size: 19px; place-items: center; }
.census-browser-identity span { display: grid; gap: 2px; min-width: 0; }
.census-browser-identity small { color: var(--atlas-blue-dark); font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.census-browser-identity strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.census-browser-count { display: flex; gap: 5px; align-items: baseline; color: #6c8390; font-size: 10px; }
.census-browser-count strong { color: var(--atlas-ink); font-size: 17px; }
.census-browser-scope { display: flex; gap: 9px; align-items: flex-start; padding: 11px 20px; background: #f1f8fb; color: #5d7887; font-size: 10px; line-height: 1.5; }
.census-browser-scope i { margin-top: 1px; color: var(--atlas-blue); font-size: 16px; }
.census-browser-scope p { margin: 0; }
.census-browser-toolbar { display: flex; gap: 12px; padding: 15px 20px 10px; }
.census-browser-toolbar > label,
.census-library-toolbar > label { position: relative; display: flex; flex: 1; align-items: center; }
.census-browser-toolbar label > i,
.census-library-toolbar label > i { position: absolute; left: 13px; color: #78909d; font-size: 17px; }
.census-browser-toolbar input,
.census-library-toolbar input { width: 100%; min-height: 44px; padding: 0 14px 0 40px; border: 1px solid #cddfe7; border-radius: 9px; outline: 0; color: var(--atlas-ink); font-size: 12px; }
.census-browser-toolbar .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.census-browser-toolbar input:focus,
.census-library-toolbar input:focus { border-color: var(--atlas-blue); box-shadow: 0 0 0 3px rgba(0,143,213,.12); }
.census-browser-layout { display: flex; align-items: center; overflow: hidden; border: 1px solid #cddfe7; border-radius: 9px; }
.census-browser-layout button { display: grid; width: 44px; height: 42px; border: 0; border-left: 1px solid #dce8ed; background: white; color: #6d8592; cursor: pointer; place-items: center; }
.census-browser-layout button:first-child { border-left: 0; }
.census-browser-layout button.is-active { background: #eaf7fd; color: var(--atlas-blue-dark); }
.census-category-strip { display: flex; gap: 7px; padding: 0 20px 13px; overflow-x: auto; scrollbar-width: none; }
.census-category-strip::-webkit-scrollbar { display: none; }
.census-category-strip button { display: inline-flex; flex: 0 0 auto; gap: 7px; align-items: center; min-height: 34px; padding: 0 8px 0 11px; border: 1px solid #d6e4e9; border-radius: 999px; background: white; color: #567586; cursor: pointer; font-size: 10px; font-weight: 800; white-space: nowrap; }
.census-category-strip button small { display: grid; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #edf4f7; color: #67818e; font-size: 8px; font-weight: 900; place-items: center; }
.census-category-strip button.is-active { border-color: var(--atlas-blue); background: #eaf7fd; color: #0073ae; }
.census-category-strip button.is-active small { background: var(--atlas-blue); color: white; }
.census-category-strip button.is-unavailable { border-style: dashed; color: #8497a1; }
.census-category-strip button.is-unavailable small { background: #f1f3f4; color: #87969d; }
.census-browser-viewport { min-height: 260px; padding: 6px 20px 20px; }
.census-browser-grid,
.census-library-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.census-browser-grid.is-list,
.census-library-grid.is-list { grid-template-columns: 1fr; }
.census-browser-grid.is-list .census-view-card,
.census-library-grid.is-list .census-view-card { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(180px,.7fr) auto; gap: 18px; align-items: center; min-height: 0; }
.census-browser-grid.is-list .census-mini-chart,
.census-library-grid.is-list .census-mini-chart { margin: 0; }
.census-view-card { display: flex; min-width: 0; min-height: 222px; padding: 15px; border: 1px solid #d9e6eb; border-radius: 12px; background: #fcfeff; flex-direction: column; }
.census-view-card header { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.census-view-card header > div { min-width: 0; }
.census-view-card header small { color: var(--atlas-blue-dark); font-size: 8px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.census-view-card h3 { display: -webkit-box; margin: 5px 0 0; overflow: hidden; color: var(--atlas-ink); font-size: 12px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.census-scope-badge { flex: 0 0 auto; max-width: 90px; padding: 4px 6px; border-radius: 999px; background: #eaf7fd; color: #087ab5; font-size: 7px; font-weight: 900; line-height: 1.2; text-align: center; }
.census-scope-badge.is-context { background: #f0f2f4; color: #6e808b; }
.census-view-card > p { margin: 8px 0 0; color: #78909c; font-size: 8px; }
.census-mini-chart { display: grid; gap: 7px; margin: 13px 0; }
.census-mini-chart > div { display: grid; gap: 4px; }
.census-mini-chart span { display: flex; gap: 8px; justify-content: space-between; color: #718995; font-size: 7px; }
.census-mini-chart small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.census-mini-chart strong { color: #365c70; font-size: 7px; }
.census-mini-chart i { position: relative; display: block; height: 4px; overflow: hidden; border-radius: 99px; background: #e8f1f4; }
.census-mini-chart i::before { position: absolute; inset: 0 auto 0 0; width: var(--bar-size); border-radius: inherit; background: var(--atlas-blue); content: ""; }
.census-read-button { display: inline-flex; gap: 7px; align-items: center; justify-content: space-between; min-height: 36px; margin-top: auto; padding: 0; border: 0; border-top: 1px solid #e0eaee; background: transparent; color: #0079b8; cursor: pointer; font-size: 9px; font-weight: 900; }
.census-read-button:active { transform: translateY(1px); }
.census-browser-loading { display: grid; min-height: 210px; place-content: center; justify-items: center; gap: 12px; color: #5f7c8b; font-size: 11px; }
.census-browser-loading span { width: 110px; height: 8px; overflow: hidden; border-radius: 99px; background: linear-gradient(90deg,#e3eff3 25%,#c9e5f1 50%,#e3eff3 75%); background-size: 200% 100%; animation: atlas-shimmer 1.2s infinite linear; }
@keyframes atlas-shimmer { to { background-position: -200% 0; } }
.census-browser-empty { display: grid; min-height: 210px; place-content: center; justify-items: center; gap: 7px; color: #708895; font-size: 11px; }
.census-browser-empty i { color: var(--atlas-blue); font-size: 28px; }
.census-browser-empty > strong { max-width: 560px; color: var(--atlas-ink); font-size: 15px; text-align: center; }
.census-browser-empty > span { max-width: 620px; line-height: 1.55; text-align: center; }
.census-empty-area-actions { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; width: min(100%,1000px); margin-top: 15px; }
.census-empty-area-actions button { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 7px; align-items: center; min-height: 52px; padding: 7px 10px; border: 1px solid #cfe0e7; border-radius: 10px; background: white; color: #174d68; cursor: pointer; font-size: 9px; font-weight: 800; line-height: 1.25; text-align: left; }
.census-empty-area-actions button:hover { border-color: var(--atlas-blue); background: #f2faff; }
.census-empty-area-actions button:focus-visible { outline: 3px solid rgba(0,143,213,.22); outline-offset: 2px; }
.census-empty-area-actions button i:first-child { font-size: 16px; }
.census-empty-area-actions button i:last-child { color: #6d8793; font-size: 13px; }
.census-browser-open { display: flex; width: 100%; gap: 18px; align-items: center; justify-content: space-between; min-height: 62px; padding: 0 20px; border: 0; border-top: 1px solid #dce8ed; background: #f4fafc; color: #087ab5; cursor: pointer; text-align: left; }
.census-browser-open span { display: grid; gap: 3px; }
.census-browser-open strong { font-size: 11px; }
.census-browser-open small { color: #6a8390; font-size: 9px; font-weight: 500; }
.census-browser-open > i { font-size: 18px; }

.census-library-dialog { margin-top: 18px; overflow: hidden; }
.census-library-dialog:not([hidden]) {
  position: fixed;
  z-index: 80;
  top: 92px;
  right: clamp(18px, 3vw, 42px);
  bottom: 24px;
  width: min(880px, calc(100vw - 48px));
  margin: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #c9dce4;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(7,50,74,.28), 0 0 0 9999px rgba(7,50,74,.14);
}
.census-library-header { display: grid; grid-template-columns: minmax(140px,auto) minmax(0,1fr) auto; gap: 18px; align-items: center; padding: 20px; border-bottom: 1px solid #dce8ed; }
.census-library-header > div { min-width: 0; }
.census-library-header small { color: var(--atlas-blue-dark); font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.census-library-header h2 { margin: 4px 0 0; overflow: hidden; font-family: "Inter Tight",Inter,sans-serif; font-size: 24px; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.census-library-header p { margin: 5px 0 0; color: #708895; font-size: 10px; }
.census-library-back,
.census-library-close { display: inline-flex; gap: 7px; align-items: center; min-height: 40px; padding: 0 11px; border: 1px solid #cfdee4; border-radius: 9px; background: white; color: #315c72; cursor: pointer; font-size: 10px; font-weight: 900; }
.census-library-close { justify-self: end; }
.census-library-toolbar { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr); gap: 16px; padding: 16px 20px 0; }
.census-library-toolbar .census-category-strip { padding: 5px 0 11px; }
.census-library-content { padding: 12px 20px 22px; }
.census-library-status { min-height: 25px; color: #6f8793; font-size: 10px; font-weight: 800; }
.census-library-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.census-library-footer { display: flex; gap: 18px; justify-content: space-between; padding: 13px 20px; border-top: 1px solid #dce8ed; background: #f3f9fb; color: #6e8591; font-size: 9px; }
.census-dataset-detail { min-width: 0; }
.census-dataset-detail > header { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.census-dataset-detail > header small { color: var(--atlas-blue-dark); font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.census-dataset-detail h3 { margin: 5px 0 8px; font-family: "Inter Tight",Inter,sans-serif; font-size: clamp(27px,3vw,40px); letter-spacing: -.04em; line-height: 1; }
.dataset-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.dataset-actions button { display: inline-flex; gap: 7px; align-items: center; min-height: 40px; padding: 0 11px; border: 1px solid #cddfe7; border-radius: 9px; background: white; color: #0878b3; cursor: pointer; font-size: 9px; font-weight: 900; }
.dataset-full-chart { min-height: 300px; padding: 18px; border: 1px solid #dce8ed; border-radius: 12px; background: #fbfdfe; }
.dataset-full-chart svg { display: block; width: 100%; height: auto; max-height: 340px; }
.dataset-full-chart text { fill: #647e8c; font-family: Inter,sans-serif; font-size: 10px; }
.dataset-chart-summary { margin: 11px 0 0; color: #5d7887; font-size: 11px; line-height: 1.55; }
.census-detail-note { padding: 11px 13px; border-left: 3px solid var(--atlas-blue); background: #eef8fc; color: #537284; font-size: 10px; line-height: 1.5; }
.census-table-wrap { margin-top: 18px; overflow: auto; border: 1px solid #dce8ed; border-radius: 12px; }
.census-table-wrap table { width: 100%; border-collapse: collapse; font-size: 10px; }
.census-table-wrap th,
.census-table-wrap td { padding: 10px 12px; border-bottom: 1px solid #e0eaee; text-align: right; white-space: nowrap; }
.census-table-wrap th:first-child { text-align: left; }
.census-table-wrap thead th { position: sticky; top: 0; background: #f0f8fb; color: #355e72; font-size: 9px; }
.aggregate-metric-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-bottom: 16px; }
.aggregate-metric-grid > div { display: grid; gap: 5px; min-height: 78px; padding: 13px; border: 1px solid #dce8ed; border-radius: 11px; background: #f7fbfd; align-content: center; }
.aggregate-metric-grid span { color: #67818f; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.aggregate-metric-grid strong { color: var(--atlas-ink); font-family: "Inter Tight",Inter,sans-serif; font-size: 25px; letter-spacing: -.03em; }
.aggregate-intro { margin: 0 0 16px; color: #567586; font-size: 11px; line-height: 1.6; }
.aggregate-chart-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.aggregate-chart-card { min-width: 0; padding: 15px; border: 1px solid #d7e5ea; border-radius: 12px; background: #fff; }
.aggregate-chart-card h4 { margin: 0; color: var(--atlas-ink); font-size: 14px; }
.aggregate-chart-card > p { min-height: 30px; margin: 6px 0 10px; color: #66808e; font-size: 9px; line-height: 1.5; }
.aggregate-chart-card .census-mini-chart { min-height: 176px; margin: 0; }
.aggregate-chart-card details { margin-top: 10px; }
.aggregate-chart-card summary { min-height: 40px; display: flex; align-items: center; color: #0878b3; cursor: pointer; font-size: 10px; font-weight: 900; }
.aggregate-chart-card .census-table-wrap { max-height: 230px; margin-top: 4px; }

.explorer-method { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 13px; align-items: start; margin-top: 18px; padding: 18px; }
.explorer-method > i { color: var(--atlas-blue); font-size: 22px; }
.explorer-method strong { font-size: 12px; }
.explorer-method p { margin: 5px 0 0; color: #5d7887; font-size: 10px; line-height: 1.55; }
.explorer-method a { display: inline-flex; gap: 6px; align-items: center; color: #087ab5; font-size: 10px; font-weight: 900; }

.atlas-provenance { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 13px; align-items: center; margin-top: 32px; padding: 18px 20px; border-top: 1px solid #cadfe7; border-bottom: 1px solid #cadfe7; }
.atlas-provenance > i { color: var(--atlas-blue); font-size: 23px; }
.atlas-provenance p { display: grid; gap: 4px; margin: 0; }
.atlas-provenance strong { font-size: 11px; }
.atlas-provenance p span { color: #637e8c; font-size: 9px; line-height: 1.45; }
.atlas-source-links { display: flex; gap: 14px; }
.atlas-source-links a { display: inline-flex; gap: 5px; align-items: center; color: #087ab5; font-size: 9px; font-weight: 900; white-space: nowrap; }
.atlas-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.atlas-error { padding: 28px; color: #8a3b31; text-align: center; }
.atlas-loading { display: grid; gap: 10px; justify-items: center; color: #5c7887; font-size: 11px; }
.atlas-loading > span:first-child { width: 120px; height: 8px; border-radius: 99px; background: linear-gradient(90deg,#e2eef2,#bcddea,#e2eef2); background-size: 200% 100%; animation: atlas-shimmer 1.2s infinite linear; }

@media (max-width: 1180px) {
  .constituency-page .page-shell { width: min(calc(100% - 64px), 1280px); }
  .constituency-scorecard { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .constituency-scorecard article:nth-child(4) { border-left: 0; border-top: 1px solid var(--atlas-line); }
  .constituency-scorecard article:nth-child(5) { border-top: 1px solid var(--atlas-line); }
  .atlas-workspace { grid-template-columns: 1fr; }
  .atlas-map-card { height: auto; min-height: 430px; }
  .atlas-map-stage { min-height: 320px; }
  .atlas-map { width: 100%; min-height: 310px; margin-left: 0; }
  .atlas-map-footer { position: static; display: flex; width: auto; gap: 12px; padding: 9px 12px; border-top: 1px solid #dfebef; background: white; }
  .atlas-legend { display: flex; flex-wrap: wrap; }
  .atlas-map-footer-actions { display: flex; justify-items: initial; }
  .atlas-profile { min-height: 0; }
  .story-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .census-browser-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 767px) {
  .constituency-page .page-shell { width: 100%; padding-inline: max(18px, env(safe-area-inset-left)); }
  .constituency-hero { min-height: 220px; }
  .constituency-hero-art { background-image: linear-gradient(90deg,rgba(246,252,254,.98),rgba(246,252,254,.76)),var(--cms-constituency-hero-mobile, url("../assets/kabindra-brand/gorkha-constituency-banner-v1-mobile.webp")); background-position: center; }
  .constituency-hero-inner { display: block; min-height: 220px; padding-block: 30px 40px; }
  .constituency-hero-copy h1 { font-size: clamp(43px,13vw,56px); }
  .constituency-hero-copy > p:last-child { margin-top: 14px; font-size: 14px; line-height: 1.55; }
  .constituency-source-card { display: none; }
  .atlas-view-nav-wrap { height: 0; }
  .atlas-view-nav { width: calc(100% - 36px); }
  .atlas-view-nav button { min-height: 48px; padding-inline: 8px; font-size: 10.5px; white-space: normal; }
  .atlas-view-nav button i { display: none; }
  .atlas-page-shell { padding-top: 46px; }
  .constituency-scorecard { display: flex; gap: 10px; margin-inline: -18px; padding-inline: 18px; overflow-x: auto; border: 0; border-radius: 0; background: transparent; box-shadow: none; scroll-snap-type: x proximity; scrollbar-width: none; }
  .constituency-scorecard::-webkit-scrollbar { display: none; }
  .constituency-scorecard article { flex: 0 0 152px; min-height: 94px; padding: 14px; border: 1px solid var(--atlas-line) !important; border-radius: 12px; background: white; scroll-snap-align: start; }
  .constituency-scorecard strong { font-size: 21px; }
  .atlas-options { position: static; padding: 9px 12px; border-bottom: 1px solid #e0ebef; }
  .atlas-options summary { width: 100%; min-height: 42px; justify-content: space-between; }
  .atlas-options > .atlas-controls { position: static; width: auto; margin-top: 9px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .atlas-controls { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: end; margin-top: 14px; }
  .atlas-map-types { grid-column:1/-1; }
  .atlas-select-label { min-width: 0; }
  .atlas-reset { width: 44px; padding: 0; justify-content: center; }
  .atlas-reset span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .atlas-layers { grid-column: 1 / -1; width: 100%; margin-left: 0; overflow-x: auto; }
  .atlas-layers legend { flex: 0 0 auto; }
  .atlas-workspace { gap: 12px; margin-top: 12px; }
  .atlas-map-card { min-height: 0; border-radius: 14px; }
  .atlas-map-head { padding: 14px; }
  .atlas-map-head p { display: none; }
  .atlas-map-stage { min-height: 330px; }
  .atlas-map { min-height: 320px; }
  .atlas-map-stage .atlas-map-tools { top: 9px; right: 9px; }
  .atlas-map-tools button { width: 44px; height: 44px; }
  .atlas-map-label { font-size: 16px; }
  .atlas-marker { r: 5; }
  .atlas-map-footer { display: grid; gap: 10px; padding: 11px 12px; }
  .atlas-legend { gap: 9px; }
  .atlas-map-footer-actions { justify-content: space-between; }
  .atlas-profile { min-height: 0; padding: 18px; border-radius: 14px; }
  .atlas-profile-head h2 { font-size: 31px; }
  .atlas-verified span { display: none; }
  .atlas-verified { width: 30px; padding: 0; justify-content: center; }
  .atlas-primary-stats strong { font-size: 21px; }
  .atlas-condition-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .atlas-evidence-grid { grid-template-columns: 1fr; }
  .atlas-ward-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .atlas-section-head { display: block; margin: 48px 0 17px; }
  .atlas-section-head h2, .explorer-heading h2 { font-size: 34px; }
  .atlas-section-head > p { margin-top: 12px; font-size: 12px; }
  .story-grid { grid-template-columns: 1fr; gap: 10px; }
  .stories-heading { margin-bottom: 16px; }
  .stories-heading h2 { font-size: 32px; }
  .stories-heading p { font-size: 12px; }
  .story-card { min-height: 190px; padding: 16px; }
  .story-card-body { grid-template-columns: minmax(96px,.75fr) minmax(0,1.25fr); }
  .story-main-value { font-size: 28px; }
  .explorer-heading { display: block; margin-bottom: 18px; }
  .explorer-heading > div > p:last-child { font-size: 12px; }
  .explorer-source-badge { margin-top: 14px; }
  .explorer-filters { display: flex; gap: 8px; margin-inline: -18px; padding-inline: 18px; overflow-x: auto; scrollbar-width: none; }
  .explorer-filters::-webkit-scrollbar { display: none; }
  .explorer-filters label { flex: 0 0 190px; }
  .explorer-filters label:nth-child(3) { flex-basis: 112px; }
  .census-browser { border-radius: 14px; }
  .census-browser-bar { padding: 14px; }
  .census-browser-count span { display: none; }
  .census-browser-scope { padding-inline: 14px; }
  .census-browser-toolbar { padding: 12px 14px 8px; }
  .census-category-strip { margin-inline: -1px; padding-inline: 14px; }
  .census-browser-viewport { padding: 4px 14px 15px; }
  .census-browser-grid, .census-library-grid { grid-template-columns: 1fr; }
  .census-browser-grid.is-list .census-view-card, .census-library-grid.is-list .census-view-card { display: flex; }
  .census-view-card { min-height: 204px; }
  .census-library-dialog:not([hidden]) { position: fixed; top: 68px; right: 0; bottom: 0; left: 0; width: 100%; margin: 0; border-right: 0; border-bottom: 0; border-left: 0; border-radius: 18px 18px 0 0; }
  .census-library-header { position: sticky; top: var(--header-height); z-index: 3; grid-template-columns: auto minmax(0,1fr) auto; gap: 9px; padding: 13px 18px; background: rgba(255,255,255,.98); }
  .census-library-header > div { grid-column: 1 / -1; grid-row: 2; }
  .census-library-header h2 { font-size: 22px; }
  .census-library-back { grid-column: 1; grid-row: 1; }
  .census-library-close { grid-column: 3; grid-row: 1; width: 42px; padding: 0; justify-content: center; }
  .census-library-close span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .census-library-toolbar { display: block; padding: 13px 18px 0; }
  .census-library-toolbar .census-category-strip { margin-inline: -18px; padding-inline: 18px; }
  .census-library-content { padding: 11px 18px 18px; }
  .census-library-footer { display: grid; }
  .census-dataset-detail > header { display: block; }
  .dataset-actions { justify-content: flex-start; margin-top: 14px; }
  .dataset-full-chart { min-height: 240px; padding: 10px; overflow-x: auto; }
  .dataset-full-chart svg { min-width: 560px; }
  .aggregate-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .aggregate-metric-grid > div { min-height: 72px; padding: 11px; }
  .aggregate-metric-grid strong { font-size: 22px; }
  .aggregate-chart-grid { grid-template-columns: 1fr; }
  .aggregate-chart-card { padding: 13px; }
  .aggregate-chart-card .census-mini-chart svg { min-width: 0; }
  .census-table-wrap { border-right: 0; border-left: 0; border-radius: 0; }
  .explorer-method { grid-template-columns: auto 1fr; padding: 15px; }
  .explorer-method a { grid-column: 2; }
  .atlas-provenance { grid-template-columns: auto 1fr; gap: 10px; margin-top: 24px; padding-inline: 0; }
  .atlas-source-links { grid-column: 2; flex-wrap: wrap; }
}

@media (max-width: 360px) {
  .constituency-page .page-shell { padding-inline: 14px; }
  .constituency-scorecard { margin-inline: -14px; padding-inline: 14px; }
  .atlas-view-nav { width: calc(100% - 28px); }
  .atlas-view-nav button { font-size: 10px; }
  .atlas-profile { padding: 15px; }
  .atlas-primary-stats > div { padding: 12px; }
  .atlas-service-stats { grid-template-columns: 1fr; }
  .explorer-filters { margin-inline: -14px; padding-inline: 14px; }
  .census-library-dialog { margin-inline: -14px; }
}

/* Visual data atlas: grouped datasets and chart-specific study surfaces. */
.census-browser-grid { display: grid; grid-template-columns: 1fr; gap: 34px; }
.census-dataset-group { min-width: 0; }
.census-dataset-group > header { display: flex; gap: 24px; align-items: end; justify-content: space-between; margin-bottom: 14px; padding: 0 2px 12px; border-bottom: 1px solid #d9e7ec; }
.census-dataset-group > header h3 { margin: 0; color: var(--atlas-ink); font-family: "Inter Tight",Inter,sans-serif; font-size: 22px; letter-spacing: -.03em; }
.census-dataset-group > header p { max-width: 620px; margin: 5px 0 0; color: #657f8d; font-size: 10px; line-height: 1.5; }
.census-dataset-group > header > span { display: grid; flex: 0 0 auto; justify-items: end; color: #6d8490; }
.census-dataset-group > header strong { color: var(--atlas-blue-dark); font-size: 24px; line-height: 1; }
.census-dataset-group > header small { margin-top: 3px; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.census-dataset-mosaic { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 12px; }

.census-view-card { grid-column: span 4; min-height: 346px; padding: 17px; border-color: #d5e4ea; background: #fff; box-shadow: 0 10px 28px rgba(7,50,74,.045); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.census-view-card.is-wide { grid-column: span 8; }
.census-view-card:hover { border-color: #9dccdf; box-shadow: 0 15px 34px rgba(7,50,74,.08); transform: translateY(-2px); }
.census-view-card h3 { font-size: 14px; line-height: 1.28; }
.census-view-card header small { font-size: 7.5px; }
.census-dataset-description { display: -webkit-box; min-height: 31px; margin: 9px 0 0; overflow: hidden; color: #526f7f; font-size: 9px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.census-dataset-meta { margin: 7px 0 0 !important; color: #7a909b !important; font-size: 7.5px !important; font-weight: 700; letter-spacing: .02em; }
.census-mini-chart { display: grid; min-height: 164px; margin: 12px 0 9px; padding: 10px 10px 7px; overflow: hidden; border: 1px solid #e0ebef; border-radius: 10px; background: #f8fbfc; align-content: space-between; }
.census-mini-chart.is-area { background: linear-gradient(180deg,#f5fbfe,#eef8fc); }
.census-mini-chart.is-donut, .census-mini-chart.is-radial { background: #f4faff; }
.census-mini-chart.is-heatmap, .census-mini-chart.is-stacked { background: #f4faf9; }
.census-mini-chart.is-radar { background: #f7f6fc; }
.census-mini-chart.is-treemap { padding: 7px; background: #f5fafc; }
.census-mini-chart svg { display: block; width: 100%; height: 126px; }
.census-mini-chart text { fill: #5f7886; font-family: Inter,sans-serif; font-size: 8px; }
.census-mini-chart .mini-total { fill: var(--atlas-ink); font-size: 12px; font-weight: 900; }
.census-mini-chart .mini-value { fill: #315d72; font-weight: 800; }
.census-chart-kind { display: flex; gap: 6px; align-items: center; min-height: 20px; color: #567888; font-size: 7.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; }
.census-chart-kind i { color: var(--atlas-blue); font-size: 13px; }
.census-card-insight { display: flex; gap: 7px; align-items: flex-start; min-height: 31px; margin: 0 0 8px !important; color: #496a7a !important; font-size: 8px !important; line-height: 1.45; }
.census-card-insight i { flex: 0 0 auto; margin-top: 1px; color: var(--atlas-blue); font-size: 12px; }
.census-read-button { min-height: 34px; font-size: 8.5px; }

.census-browser-grid.is-list { gap: 10px; }
.census-browser-grid.is-list .census-view-card { display: grid; grid-template-columns: minmax(210px,.9fr) minmax(300px,1.2fr) minmax(180px,.75fr); grid-template-areas: "head chart insight" "description chart button" "meta chart button"; gap: 7px 18px; min-height: 194px; }
.census-browser-grid.is-list .census-view-card > header { grid-area: head; }
.census-browser-grid.is-list .census-dataset-description { grid-area: description; }
.census-browser-grid.is-list .census-dataset-meta { grid-area: meta; }
.census-browser-grid.is-list .census-mini-chart { grid-area: chart; min-height: 154px; margin: 0; }
.census-browser-grid.is-list .census-card-insight { grid-area: insight; }
.census-browser-grid.is-list .census-read-button { grid-area: button; align-self: end; }

.dataset-study-intro { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(220px,.65fr) minmax(250px,.8fr); gap: 12px; margin-bottom: 14px; }
.dataset-study-intro > div, .dataset-study-intro > aside { min-width: 0; padding: 16px; border: 1px solid #dce8ed; border-radius: 12px; background: #fbfdfe; }
.dataset-study-intro > div:first-child > span { display: inline-flex; gap: 7px; align-items: center; color: #087ab5; font-size: 8px; font-weight: 900; text-transform: uppercase; letter-spacing: .09em; }
.dataset-study-intro > div:first-child > span i { font-size: 15px; }
.dataset-study-intro h4 { margin: 9px 0 0; color: var(--atlas-ink); font-family: "Inter Tight",Inter,sans-serif; font-size: 18px; }
.dataset-study-intro p { margin: 6px 0 0; color: #5e7886; font-size: 9px; line-height: 1.55; }
.dataset-study-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; align-content: center; }
.dataset-study-facts span { display: grid; gap: 3px; min-width: 0; }
.dataset-study-facts strong { color: var(--atlas-ink); font-size: 19px; }
.dataset-study-facts small { color: #738995; font-size: 7px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.dataset-study-intro aside { border-left: 3px solid var(--atlas-blue); background: #eff8fc; }
.dataset-study-intro aside strong { color: var(--atlas-blue-dark); font-size: 10px; }
.dataset-full-chart.advanced-chart { min-height: 390px; padding: 16px; background: #fbfdfe; }
.dataset-full-chart.advanced-chart svg { max-height: none; }
.dataset-full-chart.advanced-chart text { font-size: 10px; }
.dataset-chart-summary { display: flex; gap: 9px; align-items: flex-start; padding: 11px 13px; border-radius: 9px; background: #eef8fc; }
.dataset-chart-summary i { flex: 0 0 auto; color: var(--atlas-blue); font-size: 16px; }

@media (max-width: 1180px) {
  .census-view-card { grid-column: span 6; }
  .census-view-card.is-wide { grid-column: span 12; }
  .dataset-study-intro { grid-template-columns: minmax(0,1fr) minmax(250px,.8fr); }
  .dataset-study-intro > aside { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  .census-browser-grid { gap: 30px; }
  .census-dataset-group > header { align-items: start; margin-bottom: 11px; }
  .census-dataset-group > header h3 { font-size: 20px; }
  .census-dataset-group > header p { font-size: 9px; }
  .census-dataset-mosaic { display: flex; gap: 10px; margin-inline: -14px; padding-inline: 14px; overflow-x: auto; scroll-padding-inline: 14px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .census-dataset-mosaic::-webkit-scrollbar { display: none; }
  .census-view-card, .census-view-card.is-wide { flex: 0 0 min(84vw,330px); min-height: 340px; scroll-snap-align: start; }
  .census-browser-grid.is-list .census-view-card { display: flex; min-height: 340px; }
  .dataset-study-intro { grid-template-columns: 1fr; }
  .dataset-study-intro > aside { grid-column: auto; }
  .dataset-study-facts { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dataset-full-chart.advanced-chart { min-height: 330px; overflow-x: auto; }
  .dataset-full-chart.advanced-chart svg { width: 720px; min-width: 720px; }
  .dataset-full-chart.advanced-chart.is-donut svg, .dataset-full-chart.advanced-chart.is-radial svg { width: 620px; min-width: 620px; }
  .census-browser-empty { justify-items: stretch; padding: 32px 4px; }
  .census-browser-empty > i, .census-browser-empty > strong, .census-browser-empty > span { justify-self: center; }
  .census-empty-area-actions { display: flex; gap: 8px; width: auto; margin-inline: -4px; padding: 0 4px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .census-empty-area-actions::-webkit-scrollbar { display: none; }
  .census-empty-area-actions button { flex: 0 0 210px; scroll-snap-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  .constituency-page *, .constituency-page *::before, .constituency-page *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
