:root {
  --ink: #20313a;
  --muted: #56666d;
  --line: #dce2e4;
  --focus: #df693e;
  --gaza: #0072b2;
  --lives: #dc3655;
  --injuries: #f2cc32;
  --tools-offset: 184px;
}
:root {
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: #f5f7f7;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
select,
input {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  color: inherit;
  background: white;
  border: 1px solid #d4dde0;
  border-radius: 7px;
  padding: 10px 14px;
}
button:hover {
  background: #edf1f2;
}
.leaflet-marker-icon:focus-visible,
#map:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
header {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.brand {
  text-decoration: none;
  color: var(--ink);
  font-family: Manrope, sans-serif;
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 7px;
}
.brand i {
  font-style: normal;
  font-weight: 400;
}
.quiet {
  border: 0;
  font-size: 14px;
}
main {
  display: grid;
  grid-template-columns: 355px 1fr;
  height: calc(100dvh - 80px);
  min-height: 580px;
}
aside {
  padding: 29px 26px;
  overflow: auto;
  background: #fff;
  border-right: 1px solid var(--line);
}
.eyebrow,
.section-label {
  font-size: 12px;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--muted);
}
.hero-title {
  font-family: Manrope, sans-serif;
  font-size: 27px;
  line-height: 1.3;
  letter-spacing: -1px;
  margin: 14px 0 12px;
}
p.intro {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 24px;
}
.gaza-card {
  background: #20333b;
  border-radius: 12px;
  padding: 20px;
  color: white;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 1px;
}
.dot {
  display: inline-block;
  height: 8px;
  width: 8px;
  background: #ee7f58;
  border-radius: 50%;
  margin-right: 7px;
}
.tag {
  font-size: 12px;
  border: 1px solid #617279;
  border-radius: 4px;
  padding: 4px;
}
.big {
  font-family: Manrope, sans-serif;
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -2px;
  margin-top: 13px;
}
.big span {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0;
}
.hectares {
  color: #c6d1d4;
  font-size: 14px;
}
.line {
  height: 1px;
  background: #46575e;
  margin: 18px 0;
}
.gaza-card label {
  font-size: 12px;
  color: #c6d1d4;
}
select {
  width: 100%;
  border: 1px solid #d7dfe1;
  border-radius: 6px;
  padding: 11px;
  background: #fff;
  color: #233740;
  font-size: 14px;
  margin-top: 7px;
}
.gaza-card select {
  background: #2d434d;
  border-color: #586b74;
  color: #fff;
  font-size: 12px;
}
.stats {
  display: flex;
  justify-content: space-between;
  margin-top: 17px;
}
.stats strong {
  font-size: 21px;
  display: block;
  font-weight: 600;
}
.stats small {
  font-size: 12px;
  color: #c6d1d4;
  display: block;
  margin-top: 5px;
}
.micro {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  margin: 12px 0 0;
}
.gaza-card .micro {
  color: #c0ccd1;
  font-size: 12px;
}
.controls {
  margin-top: 25px;
}
.section-label {
  margin-bottom: 15px;
}
.controls label {
  font-size: 14px;
}
.rotation-label {
  display: flex;
  justify-content: space-between;
  margin-top: 19px;
}
output {
  font-size: 13px;
  color: #b4512b;
  font-weight: 700;
}
input[type="range"] {
  width: 100%;
  accent-color: #d96940;
  margin: 15px 0;
}
.actions {
  display: flex;
  gap: 8px;
}
.actions button {
  flex: 1;
  font-size: 13px;
}
.primary {
  width: 100%;
  background: #e97a50;
  color: #1c2f35;
  border: 0;
  font-weight: 700;
  font-size: 13px;
  margin-top: 9px;
}
.primary:hover {
  background: #f29370;
}
footer {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 24px;
}
.workspace {
  position: relative;
  min-width: 0;
}
#map {
  height: 100%;
  width: 100%;
  background: #dfe7e8;
}
.map-hint {
  position: absolute;
  top: 23px;
  left: 23px;
  z-index: 500;
  background: #fff;
  padding: 13px 18px;
  border-radius: 8px;
  font-size: 12px;
  box-shadow: 0 3px 14px #172d3915;
}
.map-hint b {
  font-weight: 500;
  color: var(--muted);
}
.hint-separator {
  padding: 0 8px;
}
.comparison {
  position: absolute;
  bottom: 32px;
  left: 24px;
  right: 24px;
  z-index: 500;
  background: #fff;
  border: 1px solid #dce1e4;
  box-shadow: 0 8px 35px #20313a20;
  border-radius: 12px;
  padding: 20px 23px;
}
.comparison-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.comparison h2 {
  font-family: Manrope, sans-serif;
  font-size: 23px;
  margin: 6px 0 0;
  letter-spacing: -0.6px;
}
.segmented {
  display: flex;
  background: #f0f3f4;
  padding: 3px;
  border-radius: 7px;
}
.segmented button {
  font-size: 12px;
  border: 0;
  background: transparent;
  padding: 8px 12px;
}
.segmented button[aria-pressed="true"] {
  background: #fff;
  box-shadow: 0 1px 5px #0001;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 17px 0;
}
.metric {
  border-right: 1px solid #e2e7e8;
}
.metric:last-child {
  border: 0;
}
.metric strong {
  display: block;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.6px;
}
.metric span {
  font-size: 12px;
  color: var(--muted);
}
.ratio {
  display: flex;
  align-items: center;
  gap: 13px;
  border-top: 1px solid #e6eaea;
  padding-top: 13px;
  font-size: 13px;
}
.ratio b {
  color: #b9512e;
}
.ratio-track {
  width: 130px;
  height: 6px;
  border-radius: 4px;
  background: #e4e9eb;
  overflow: hidden;
}
.ratio-track i {
  height: 100%;
  display: block;
  background: #e67c55;
}
.comparison-foot {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}
#territory-tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  max-width: 100%;
  margin-top: 10px;
}
#territory-tabs:empty {
  display: none;
}
#territory-tabs button {
  white-space: nowrap;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 5px;
}
#territory-tabs button.active {
  border-color: #dc7048;
  background: #fff4ee;
}
.leaflet-container {
  font-family: "DM Sans", sans-serif;
}
.leaflet-control-zoom {
  border: 0 !important;
  box-shadow: 0 3px 15px #0002 !important;
  margin-top: 24px !important;
  margin-right: 24px !important;
}
.leaflet-control-scale {
  margin-bottom: 8px !important;
}
.gaza-shape {
  cursor: grab;
  touch-action: none;
}
.center-handle,
.rotate-handle {
  display: grid;
  place-items: center;
  border: 2px solid white;
  background: var(--gaza);
  color: white;
  border-radius: 50%;
  box-shadow: 0 1px 6px #0005;
  font-size: 18px;
}
.rotate-handle {
  background: #20333b;
}
.gaza-label {
  color: #005f94;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px white;
  white-space: nowrap;
  pointer-events: none;
}
dialog {
  max-width: 660px;
  width: calc(100% - 32px);
  border: 0;
  border-radius: 15px;
  padding: 32px;
  color: #263b44;
  box-shadow: 0 15px 70px #0004;
}
dialog::backdrop {
  background: #152d3d80;
}
dialog h2 {
  font-size: 28px;
}
dialog h3 {
  font-size: 17px;
  margin-top: 24px;
}
dialog p,
dialog li {
  font-size: 14px;
  line-height: 1.65;
}
dialog a {
  color: #ad4f2b;
}
dialog li {
  margin: 7px 0;
}
#close-sources {
  float: right;
  border: 0;
  font-size: 25px;
  padding: 0 8px;
}
@media (min-width: 1450px) {
  main {
    grid-template-columns: 385px 1fr;
  }
  aside {
    padding: 34px;
  }
  .comparison {
    max-width: 840px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
  }
}
@media (max-width: 950px) {
  main {
    grid-template-columns: 305px 1fr;
  }
  aside {
    padding: 23px 19px;
  }
  .map-hint b,
  .hint-separator {
    display: none;
  }
  .comparison {
    padding: 16px;
    left: 12px;
    right: 12px;
  }
  .comparison-heading {
    display: block;
  }
  .segmented {
    width: max-content;
    margin-top: 12px;
  }
  .metric strong {
    font-size: 19px;
  }
  .ratio-track {
    display: none;
  }
}
@media (max-width: 650px) {
  header {
    height: 65px;
    padding: 0 15px;
  }
  .brand {
    font-size: 19px;
  }
  .quiet {
    font-size: 12px;
    padding: 8px;
  }
  main {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  .workspace {
    order: -1;
    height: 73dvh;
    min-height: 530px;
  }
  .comparison {
    bottom: 24px;
  }
  .map-hint {
    top: 12px;
    left: 12px;
    font-size: 12px;
    padding: 10px;
  }
  .comparison h2 {
    font-size: 19px;
  }
  .comparison-heading {
    display: flex;
    gap: 8px;
  }
  .segmented {
    margin-top: 0;
  }
  .segmented button {
    font-size: 12px;
    padding: 7px;
  }
  .metric strong {
    font-size: 20px;
  }
  aside {
    overflow: visible;
    padding: 25px;
  }
  .gaza-card {
    max-width: 480px;
  }
  .controls {
    max-width: 480px;
  }
  .leaflet-control-zoom {
    margin-top: 12px !important;
    margin-right: 12px !important;
  }
  .comparison-foot {
    font-size: 12px;
  }
}
[hidden] {
  display: none !important;
}
.grab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: white;
}
.shape-toolbar {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 550;
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 3px 16px #20313a1c;
  padding: 7px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.shape-toolbar button {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.circle-symbol {
  width: 14px;
  height: 14px;
  display: inline-block;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.damage-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  padding-right: 8px;
  cursor: pointer;
}
.damage-toggle input {
  width: 17px;
  height: 17px;
  accent-color: #555b64;
}
.map-hint {
  top: 86px;
  box-shadow: none;
  background: #fffffff0;
  padding: 9px 12px;
}
.damage-panel {
  margin: 0 0 20px;
  border-bottom: 1px solid #d8e0e3;
  padding-bottom: 18px;
}
.linked-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 16px;
  position: relative;
}
.linked-cards:before {
  content: "";
  position: absolute;
  width: 10px;
  height: 2px;
  left: calc(50% - 5px);
  top: 50%;
  background: #a9b7bd;
}
.linked-cards > div {
  border: 1px solid #bddbea;
  background: #eff8fe;
  border-radius: 9px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-start;
}
.linked-cards .damage-card {
  background: #f1f2f4;
  border-color: #c9cdd2;
}
.linked-cards span {
  font-size: 12px;
  line-height: 1.35;
}
.linked-cards strong {
  font-size: 26px;
  font-family: Manrope, sans-serif;
}
.linked-cards strong small {
  font-size: 14px;
  font-weight: 400;
}
.linked-cards small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.circle-key {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: block;
}
.outer-key {
  border: 2px solid var(--gaza);
}
.inner-key {
  background: #7b818a;
  border: 2px solid #555b64;
}
.damage-panel label {
  font-size: 14px;
}
.damage-explanation {
  font-size: 13px;
  line-height: 1.55;
  margin: 12px 0 0;
  color: #4f616a;
}
.damage-panel a {
  color: #555b64;
}
.damage-panel .section-label {
  font-size: 12px;
}
button:disabled,
input:disabled {
  opacity: 0.4;
  cursor: default;
}
.center-handle {
}
#angle {
  max-width: 170px;
  text-align: right;
}
@media (max-width: 1100px) {
  .shape-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }
  .damage-toggle {
    padding: 4px 8px;
  }
  .map-hint {
    top: 135px;
  }
}
@media (max-width: 650px) {
  .shape-toolbar {
    left: 12px;
    top: 12px;
    right: 51px;
    gap: 3px;
    padding: 5px;
  }
  .shape-toolbar button {
    font-size: 12px;
    padding: 8px;
  }
  .shape-toolbar .segmented {
    margin: 0;
  }
  .damage-toggle {
    font-size: 12px;
  }
  .map-hint {
    top: 110px;
    left: 12px;
    max-width: calc(100% - 24px);
  }
  .damage-panel {
    max-width: 480px;
  }
  .linked-cards span {
    font-size: 14px;
  }
  .linked-cards small {
    font-size: 12px;
  }
}
.comparison-close {
  position: absolute;
  right: 9px;
  top: 8px;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #445c68;
  border-radius: 50%;
  z-index: 1;
}
.comparison-close:hover {
  background: #edf1f2;
}
.comparison-heading {
  padding-right: 36px;
}
.comparison-reopen {
  position: absolute;
  z-index: 510;
  bottom: 34px;
  left: 24px;
  box-shadow: 0 4px 18px #20313a22;
  background: #20333b;
  color: #fff;
  border: 0;
  padding: 12px 18px;
  min-height: 44px;
  font-size: 14px;
}
.comparison-reopen:hover {
  background: #344e5b;
}
.center-handle {
  touch-action: none;
}
.comparison {
  max-height: 45%;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.comparison .segmented button {
  min-height: 40px;
}
.comparison .comparison-foot {
  font-size: 12px;
}
.comparison .metric span {
  font-size: 13px;
}
@media (max-width: 650px) {
  .workspace {
    height: calc(100svh - 65px);
    min-height: 500px;
  }
  .comparison {
    max-height: 35%;
    bottom: 25px;
    padding: 16px;
    left: 8px;
    right: 8px;
    box-shadow: 0 -3px 25px #20313a25;
    border-radius: 14px;
  }
  .comparison-heading {
    display: block;
    padding-right: 40px;
  }
  .comparison h2 {
    font-size: 20px;
  }
  .comparison .eyebrow {
    font-size: 12px;
  }
  .comparison .segmented {
    margin-top: 9px;
  }
  .comparison .segmented button {
    font-size: 12px;
    min-height: 40px;
    padding: 8px 12px;
  }
  .comparison-close {
    right: 5px;
    top: 5px;
  }
  .comparison .metrics {
    gap: 8px;
    margin: 12px 0;
  }
  .comparison .metric strong {
    font-size: 20px;
  }
  .comparison .metric span {
    font-size: 12px;
  }
  .comparison .ratio {
    font-size: 13px;
  }
  .comparison .comparison-foot {
    font-size: 12px;
  }
  .comparison-reopen {
    bottom: 30px;
    left: 12px;
    font-size: 14px;
  }
  .shape-toolbar button {
    min-height: 40px;
  }
  .damage-toggle {
    min-height: 36px;
  }
  .shape-toolbar {
    gap: 0;
  }
  .comparison #territory-tabs button {
    min-height: 36px;
    font-size: 12px;
  }
}
.lives-card {
  margin: 0 0 22px;
  padding: 19px;
  border: 1px solid #c9cdd2;
  border-radius: 10px;
  background: #f1f2f4;
}
.lives-card .section-label {
  color: #454b54;
  font-size: 12px;
}
.lives-card > strong {
  font-size: 38px;
  letter-spacing: -1px;
  color: #30343b;
  font-family: Manrope, sans-serif;
}
.lives-card p {
  font-size: 14px;
  line-height: 1.5;
  margin: 8px 0;
}
.lives-card p.micro {
  font-size: 12px;
}
.lives-card button {
  font-size: 13px;
  min-height: 44px;
  width: 100%;
  margin: 9px 0;
  background: #30343b;
  color: white;
  border: 0;
}
.lives-card a {
  display: block;
  color: #454b54;
}
.life-equivalence {
  margin-top: 15px;
  padding: 14px 16px;
  background: #f1f2f4;
  border-left: 3px solid #30343b;
  border-radius: 4px;
}
.life-equivalence > span {
  font-size: 13px;
  color: #454b54;
}
.life-equivalence strong {
  display: block;
  color: #30343b;
  font-size: 21px;
  line-height: 1.35;
  margin: 5px 0;
}
.life-equivalence small {
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 650px) {
  .life-equivalence {
    padding: 10px 12px;
    margin-top: 10px;
  }
  .life-equivalence strong {
    font-size: 18px;
  }
  .life-equivalence small {
    font-size: 12px;
  }
  .comparison .metrics {
    grid-template-columns: 1.25fr 1fr 1fr;
  }
  .comparison .metric strong {
    font-size: 17px;
  }
  .comparison .comparison-heading {
    padding-right: 28px;
  }
  .comparison .segmented button {
    padding: 7px 9px;
  }
  .comparison {
    max-height: 38%;
  }
}
.gaza-dragging .comparison-reopen {
  display: none !important;
}
.gaza-dragging .center-handle {
  cursor: grabbing;
}
.center-handle:before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
}
.group-population {
  margin: 15px 0 10px;
}
.group-population strong {
  display: block;
  font-size: 28px;
  font-family: Manrope, sans-serif;
  letter-spacing: -0.5px;
}
.group-population span {
  display: block;
  font-size: 13px;
  margin-top: 4px;
  color: var(--muted);
}
.communes-details {
  margin-top: 13px;
  border-top: 1px solid #e2d7da;
  padding-top: 6px;
}
.communes-details summary {
  cursor: pointer;
  min-height: 44px;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
}
.group-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin: 10px 0;
}
.comparison {
  max-height: 49%;
}
@media (max-width: 650px) {
  .comparison {
    max-height: 39%;
  }
  .group-population strong {
    font-size: 23px;
  }
  .group-population {
    margin-top: 10px;
  }
  .group-population span {
    font-size: 12px;
  }
  .communes-details summary {
    font-size: 13px;
  }
}
.inner-key {
  border-style: dashed;
}
.gaza-label {
  text-shadow:
    0 1px 2px white,
    0 -1px 2px white;
}
.lives-card {
  background: #fff1f3;
  border-color: #e6b4be;
}
.lives-card .section-label,
.lives-card a,
.life-equivalence > span {
  color: #9c1733;
}
.lives-card > strong,
.life-equivalence strong {
  color: #b21836;
}
.lives-card button {
  background: #b21836;
}
.life-equivalence {
  background: #fff1f3;
  border-left-color: #b21836;
}
@media (max-width: 650px) {
  .comparison .segmented button {
    padding: 8px;
    font-size: 12px;
  }
}
.shape-toolbar {
  flex-wrap: wrap;
  max-width: calc(100% - 92px);
  gap: 6px 14px;
}
.lives-toggle input {
  accent-color: #b21836;
}
@media (max-width: 650px) {
  .shape-toolbar {
    gap: 0;
    max-width: calc(100% - 62px);
  }
  .damage-toggle {
    font-size: 13px;
  }
}
.injuries-toggle input {
  accent-color: #9b7300;
}
.injury-equivalence {
  margin-top: 16px;
  padding: 14px 16px;
  background: #fff9df;
  border-left: 3px solid #bb8d00;
  border-radius: 4px;
}
.injury-equivalence > strong {
  font-size: 21px;
  color: #725300;
}
.injury-equivalence > p {
  font-size: 14px;
  line-height: 1.5;
}
.injury-equivalence small {
  font-size: 12px;
  color: #665c38;
}
.injury-equivalence .group-note {
  font-size: 12px;
}
.shape-toolbar {
  max-width: calc(100% - 92px);
}
.map-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-right: 24px !important;
  margin-top: 10px !important;
}
.map-tools button {
  height: 44px;
  width: 44px;
  padding: 0;
  border: 1px solid #cbd5db;
  border-radius: 8px;
  background: #fff;
  color: #243b48;
  box-shadow: 0 2px 10px #20313a20;
  font-size: 24px;
  font-weight: 600;
}
.map-tools button[aria-expanded="true"] {
  background: #e7f3fc;
  border-color: var(--gaza);
  color: #005b8e;
}
.map-tools button:focus-visible {
  outline: 3px solid var(--gaza);
  outline-offset: 2px;
}
.leaflet-control-zoom a {
  width: 44px !important;
  height: 40px !important;
  line-height: 40px !important;
}
.map-panel-title {
  display: block;
  flex-basis: 100%;
  font-size: 14px;
  color: #263b44;
  margin: 2px 0 8px;
}
.shape-toolbar {
  left: auto !important;
  right: var(--tools-offset);
  top: 24px !important;
  width: 300px;
  max-width: calc(100% - 100px) !important;
  box-sizing: border-box;
  padding: 14px;
  max-height: calc(100% - 80px);
  overflow: auto;
  pointer-events: auto;
  box-shadow: 0 5px 24px #20313a30;
}
.shape-toolbar {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.shape-toolbar .segmented {
  flex-wrap: wrap;
}
.shape-toolbar .damage-toggle {
  min-height: 44px;
  padding: 0;
  font-size: 14px;
}
.map-hint {
  display: none !important;
}
.comparison {
  left: 20px;
  right: auto;
  bottom: 28px;
  width: 520px;
  max-width: calc(100% - 40px);
  max-height: 34%;
  padding: 12px 14px;
  border-radius: 10px;
}
.comparison-heading {
  display: block;
  padding-right: 34px;
}
.comparison h2 {
  font-size: 18px;
  margin: 3px 0;
}
.comparison .eyebrow {
  font-size: 12px;
}
.comparison .segmented {
  display: inline-flex;
  margin-top: 7px;
}
.comparison .segmented button {
  font-size: 12px;
  padding: 7px 9px;
  min-height: 36px;
}
.comparison .life-equivalence,
.comparison .injury-equivalence {
  padding: 8px 10px;
  margin-top: 9px;
}
.comparison .life-equivalence strong,
.comparison .injury-equivalence > strong {
  font-size: 16px;
  margin: 3px 0;
}
.comparison .injury-equivalence > p {
  font-size: 13px;
  margin: 4px 0;
}
.comparison .life-equivalence small,
.comparison .injury-equivalence small {
  font-size: 12px;
}
.comparison .group-note {
  font-size: 12px;
  margin: 7px 0;
}
.comparison .communes-details {
  margin-top: 7px;
  padding-top: 0;
}
.comparison .comparison-foot {
  font-size: 12px;
  margin-top: 8px;
}
.comparison-close {
  top: 3px;
  right: 3px;
}
.comparison-state {
  position: absolute;
  z-index: 510;
  bottom: 30px;
  left: 20px;
  max-width: calc(100% - 40px);
  padding: 10px 13px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 16px #20313a20;
  font-size: 13px;
}
.comparison-state button {
  margin-left: 10px;
  min-height: 40px;
}
.gaza-dragging .comparison-state {
  display: none !important;
}
@media (max-width: 650px) {
  .map-tools {
    margin-right: 12px !important;
  }
  .leaflet-control-zoom {
    margin-right: 12px !important;
    margin-top: 12px !important;
  }
  .shape-toolbar {
    top: 12px !important;
    right: var(--tools-offset);
    width: 290px;
    max-width: calc(100% - 80px) !important;
    padding: 12px;
  }
  .shape-toolbar button {
    font-size: 12px;
  }
  .comparison {
    left: 8px;
    right: 8px;
    bottom: 25px;
    width: auto;
    max-width: none;
    max-height: 30%;
    padding: 10px 12px;
  }
  .comparison h2 {
    font-size: 17px;
  }
  .comparison .segmented button {
    font-size: 12px;
    padding: 7px 8px;
  }
  .comparison .metrics {
    margin: 10px 0;
  }
  .comparison-reopen,
  .comparison-state {
    bottom: 28px;
    left: 12px;
  }
  .comparison .injury-equivalence > strong,
  .comparison .life-equivalence strong {
    font-size: 16px;
  }
  .center-handle {
    transform-origin: center;
  }
  .gaza-label {
    font-size: 12px;
  }
}
.gaza-shape {
  cursor: inherit;
  touch-action: auto;
}
.center-handle {
  pointer-events: none;
}
.scenario-toggle {
  border-top: 1px solid #d4dde0;
  padding-top: 10px;
}
.shape-toolbar {
  max-height: calc(100% - 28px);
  overflow: auto;
}
.scenario-badge {
  position: absolute;
  z-index: 450;
  top: 14px;
  left: 180px;
  right: var(--tools-offset);
  width: fit-content;
  max-width: calc(100% - 254px);
  padding: 7px 10px;
  border: 1px solid #b21836;
  border-radius: 6px;
  background: #fff5f5;
  color: #87142b;
  font-size: 12px;
  pointer-events: none;
}
.life-equivalence > a {
  font-size: 12px;
}
.scenario-toggle input {
  flex-shrink: 0;
}
@media (max-width: 650px) {
  .scenario-badge {
    top: 62px;
    left: 12px;
    right: var(--tools-offset);
    max-width: calc(100% - 80px);
  }
}
.life-equivalence > a {
  display: block;
  margin-top: 5px;
}
.gazascale-icon {
  width: 40px;
  height: 40px;
  display: block;
  flex-shrink: 0;
}
.brand-domain {
  font-family: inherit;
  font-size: 0.58em;
  font-weight: 500;
  color: #64766c;
  margin-left: 2px;
}
footer a {
  color: #176644;
  text-underline-offset: 3px;
}
footer strong {
  color: var(--ink);
}
@media (max-width: 650px) {
  .gazascale-icon {
    width: 34px;
    height: 34px;
  }
}
.city-search {
  position: absolute;
  z-index: 520;
  top: 70px;
  left: 20px;
  width: 250px;
  max-width: calc(100% - 100px);
}
.city-search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #c6d0d6;
  border-radius: 8px;
  background: white;
  font: inherit;
  font-size: 14px;
  box-shadow: 0 2px 10px #20313a20;
}
.sr-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
#city-results {
  background: white;
  border-radius: 8px;
  box-shadow: 0 5px 20px #20313a30;
  max-height: 230px;
  overflow: auto;
}
#city-results button,
.overseas-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 0;
  min-height: 44px;
  padding: 9px 12px;
  font-size: 13px;
}
#city-results button:hover,
.overseas-menu button:hover {
  background: #edf4f6;
}
#search-feedback:not(:empty) {
  display: block;
  background: white;
  padding: 6px;
  font-size: 12px;
}
.overseas-menu {
  position: absolute;
  z-index: 530;
  right: var(--tools-offset);
  top: 24px;
  width: 260px;
  max-height: calc(100% - 55px);
  overflow: auto;
  background: #fff;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 4px 20px #20313a30;
}
.overseas-menu small {
  display: block;
  font-size: 12px;
  margin-top: 8px;
}
#toggle-overseas {
  font-size: 13px;
}
.color-key {
  position: absolute;
  z-index: 500;
  right: 20px;
  bottom: 30px;
  width: 195px;
  padding: 9px 11px;
  background: #fffffff2;
  border: 1px solid #d5dde1;
  border-radius: 8px;
  font-size: 12px;
  pointer-events: none;
}
.color-key span {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 3px 0;
}
.color-key span[hidden] {
  display: none;
}
.color-key i {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  display: inline-block;
  border: 1px solid #0003;
}
.key-blue {
  background: #56b4e9;
}
.key-grey {
  background: #7b818a;
}
.key-red {
  background: var(--lives);
}
.key-yellow {
  background: var(--injuries);
}
.color-key small {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 5px;
}
.combined-communes {
  background: #f2f4f5;
  padding: 10px;
  border-radius: 8px;
  margin-top: 10px;
}
.combined-communes summary {
  cursor: pointer;
  font-size: 13px;
}
.table-scroll {
  overflow-x: auto;
}
.combined-communes table {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
  margin-top: 8px;
}
.combined-communes th,
.combined-communes td {
  padding: 7px 5px;
  text-align: right;
  border-bottom: 1px solid #d7dfe2;
}
.combined-communes th:first-child,
.combined-communes td:first-child {
  text-align: left;
}
.combined-communes td small {
  display: block;
  font-size: 12px;
}
.combined-communes button {
  border: 0;
  padding: 5px 0;
  background: none;
  color: #244454;
  text-align: left;
  font-size: 12px;
  min-height: 36px;
}
.text-lives {
  color: #a51232;
}
.text-injuries {
  color: #795600;
}
.commune-popup {
  font-size: 13px;
}
.commune-popup > strong {
  font-size: 16px;
}
.commune-popup small {
  display: block;
  line-height: 1.45;
}
.leaflet-popup-content {
  margin: 14px;
}
.comparison {
  max-width: calc(100% - 250px);
}
.shape-toolbar {
  z-index: 540 !important;
}
@media (max-width: 900px) {
  .color-key {
    right: 12px;
    bottom: 28px;
    width: 170px;
    font-size: 12px;
  }
  .comparison {
    max-width: calc(100% - 215px);
  }
}
@media (max-width: 650px) {
  .city-search {
    left: 12px;
    top: 62px;
    width: 230px;
  }
  .scenario-badge {
    top: 115px;
    max-width: calc(100% - 85px);
  }
  .color-key {
    bottom: 65px;
    right: 12px;
    width: 150px;
    font-size: 12px;
    padding: 7px;
    pointer-events: none;
  }
  .color-key small {
    font-size: 12px;
  }
  .comparison {
    max-width: none;
    z-index: 515;
  }
  .overseas-menu {
    right: var(--tools-offset);
    top: 12px;
    width: calc(100% - 95px);
    max-height: calc(100% - 35px);
  }
}
.comparison-state.is-loading {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #cbdce4;
  border-radius: 24px;
  background: #fffffff5;
  color: #294957;
  box-shadow: 0 4px 18px #18334325;
  pointer-events: none;
}
.comparison-state.is-loading::before {
  content: "";
  display: block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border: 2px solid #c7dfe9;
  border-top-color: var(--gaza);
  border-radius: 50%;
  animation: calculation-spin 0.8s linear infinite;
}
@keyframes calculation-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .comparison-state.is-loading::before {
    animation: none;
    border-style: dotted;
  }
}
.color-key {
  pointer-events: auto;
}
#toggle-key {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  padding: 0;
  background: none;
  border: 0;
  color: #294957;
  font-size: 12px;
  font-weight: 600;
}
#toggle-key[aria-expanded="false"] svg {
  transform: rotate(180deg);
}
.color-key.collapsed {
  width: 110px;
}
#city-results strong,
#city-results small {
  display: block;
}
#city-results strong {
  font-size: 13px;
}
#city-results small {
  font-size: 12px;
  color: #52636c;
  margin-top: 3px;
  line-height: 1.4;
}
.city-search {
  top: 20px;
}
.scenario-badge {
  top: 74px;
  left: 20px;
}
.overseas-menu {
  overflow: visible;
}
#overseas-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0;
}
.overseas-menu .territory-icon {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 66px;
  padding: 5px;
  border: 1px solid #d8e1e5;
  border-radius: 8px;
  background: #f4f8f8;
  color: #305d6c;
}
.territory-icon svg {
  width: 54px;
  height: 54px;
  fill: currentColor;
}
.territory-tooltip {
  position: absolute;
  z-index: 2;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 220px;
  background: #203d48;
  color: white;
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
}
.territory-icon:hover .territory-tooltip,
.territory-icon:focus-visible .territory-tooltip {
  opacity: 1;
}
.territory-icon:focus-visible {
  outline: 3px solid var(--gaza);
}
.territory-icon:hover {
  color: var(--gaza) !important;
  background: #e4f0f5 !important;
}
@media (max-width: 650px) {
  .city-search {
    top: 12px;
  }
  .scenario-badge {
    top: 64px;
    left: 12px;
  }
  .color-key {
    pointer-events: auto;
  }
}
@media (hover: none) {
  .overseas-menu .territory-icon {
    height: 92px;
    flex-direction: column;
  }
  .territory-tooltip {
    position: static;
    transform: none;
    opacity: 1;
    max-width: 100%;
    width: auto;
    background: none;
    color: inherit;
    padding: 3px 0;
    text-align: center;
    font-size: 12px;
  }
}
@media (hover: none) {
  .overseas-menu {
    overflow: auto;
  }
}
.bombing-card {
  padding: 18px;
  margin: 20px 0;
  background: #f1f3f3;
  border-left: 3px solid #52616a;
  border-radius: 9px;
}
.bombing-total {
  display: block;
  font-size: 27px;
  letter-spacing: -1px;
}
.bombing-card > span {
  font-size: 13px;
  color: #52616a;
}
.hiroshima-stat {
  font-size: 16px;
  margin: 13px 0 0;
}
.hiroshima-stat b {
  font-size: 29px;
}
.bombing-card a {
  display: block;
  color: #385563;
  text-underline-offset: 3px;
}
main {
  position: relative;
  --sidebar-width: 355px;
  grid-template-columns: var(--sidebar-width) 1fr;
}
.sidebar-collapsed main {
  grid-template-columns: 0 1fr;
}
.sidebar-collapsed .workspace {
  grid-column: 2;
}
#toggle-sidebar {
  position: absolute;
  left: calc(var(--sidebar-width) - 17px);
  top: 44%;
  z-index: 570;
  width: 34px;
  height: 52px;
  padding: 0;
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 10px #20313a30;
  font-size: 30px;
  color: #385563;
}
.sidebar-collapsed #toggle-sidebar {
  left: 8px;
}
.placement-panel {
  position: absolute;
  z-index: 540;
  right: var(--tools-offset);
  top: 24px;
  width: 300px;
  max-width: calc(100% - 100px);
  max-height: calc(100% - 48px);
  overflow: auto;
  background: white;
  padding: 18px;
  margin: 0;
  border-radius: 10px;
  box-shadow: 0 5px 24px #20313a30;
}
.sources-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sources-nav a {
  font-size: 12px;
  padding: 6px 9px;
  background: #edf2f3;
  border-radius: 5px;
}
dialog h3[id] {
  scroll-margin-top: 20px;
}
#close-sources {
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
}
aside .micro a {
  color: #385563;
}
@media (min-width: 1450px) {
  main {
    --sidebar-width: 385px;
  }
}
@media (max-width: 950px) {
  main {
    --sidebar-width: 305px;
  }
}
@media (max-width: 650px) {
  #explanation-panel {
    position: absolute;
    z-index: 560;
    top: 0;
    left: 0;
    width: calc(100% - 65px);
    max-height: 73dvh;
    overflow: auto;
    box-shadow: 4px 0 20px #20313a30;
    padding: 22px;
  }
  #toggle-sidebar {
    left: calc(100% - 65px);
    top: 150px;
  }
  .sidebar-collapsed #toggle-sidebar {
    left: 8px;
  }
  .placement-panel {
    right: var(--tools-offset);
    top: 12px;
    width: 290px;
    max-width: calc(100% - 80px);
    max-height: calc(100% - 24px);
    padding: 14px;
  }
  .bombing-total {
    font-size: 25px;
  }
}
@media (max-width: 650px) {
  body:not(.sidebar-collapsed) #toggle-sidebar {
    left: calc(100% - 99px);
    top: 8px;
    width: 32px;
    height: 38px;
  }
  .sidebar-collapsed #toggle-sidebar {
    top: 150px;
  }
}
.map-tools {
  margin-top: 24px !important;
}
.map-tools button {
  display: flex;
  align-items: center;
  justify-content: center;
}
.leaflet-bottom.leaflet-right .leaflet-control-zoom {
  margin-bottom: 25px !important;
  margin-top: 0 !important;
}
.color-key {
  right: 82px;
}
.shape-toolbar {
  overflow-x: hidden;
  min-width: 0;
}
.shape-toolbar .segmented {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
}
.shape-toolbar .segmented button {
  min-width: 0;
  flex: 1;
  white-space: normal;
  padding: 8px;
}
.shape-toolbar .damage-toggle {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
  line-height: 1.4;
}
.shape-toolbar input {
  flex-shrink: 0;
}
.shape-toolbar p {
  overflow-wrap: anywhere;
}
.map-tools #locate-me[aria-busy="true"] svg {
  animation: calculation-spin 1.5s linear infinite;
}
#location-status {
  position: absolute;
  top: 74px;
  left: 20px;
  z-index: 550;
  max-width: calc(100% - 105px);
  background: white;
  border: 1px solid #d1dee3;
  padding: 9px 10px;
  border-radius: 8px;
  box-shadow: 0 3px 15px #20313a20;
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: center;
}
#location-status button {
  padding: 2px 8px;
  min-height: 32px;
  border: 0;
}
#location-status[hidden] {
  display: none;
}
@media (max-width: 650px) {
  .map-tools {
    margin-top: 12px !important;
  }
  .leaflet-bottom.leaflet-right .leaflet-control-zoom {
    margin-bottom: 25px !important;
  }
  .color-key {
    right: 68px;
    bottom: 30px;
  }
  #location-status {
    left: 12px;
    top: 64px;
    max-width: calc(100% - 85px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .map-tools #locate-me[aria-busy="true"] svg {
    animation: none;
  }
}
@media (max-width: 650px) {
  .comparison {
    right: 68px;
  }
}
#toggle-sidebar {
  left: calc(var(--sidebar-width) + 12px);
  top: 20px;
  width: 36px;
  height: 44px;
}
.sidebar-collapsed #toggle-sidebar {
  left: 12px;
  top: 20px;
}
.city-search {
  left: 60px;
  max-width: calc(100% - 145px);
}
.comparison {
  max-height: 46%;
  width: 560px;
}
.leaflet-control-zoom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: transparent;
  box-shadow: none !important;
}
.leaflet-control-zoom a {
  border: 1px solid #d4dde0 !important;
  border-radius: 7px !important;
  box-shadow: 0 2px 9px #20313a25;
}
.leaflet-control-zoom a:first-child,
.leaflet-control-zoom a:last-child {
  border-radius: 7px !important;
}
@media (max-width: 650px) {
  #toggle-sidebar,
  .sidebar-collapsed #toggle-sidebar,
  body:not(.sidebar-collapsed) #toggle-sidebar {
    left: 12px;
    top: 12px;
    width: 36px;
    height: 44px;
  }
  .city-search {
    left: 58px;
    max-width: calc(100% - 126px);
  }
  body:not(.sidebar-collapsed) #explanation-panel {
    padding-top: 68px;
  }
  .comparison {
    width: auto;
    max-height: 42%;
  }
  .comparison .segmented {
    flex-wrap: wrap;
    max-width: 100%;
    width: auto;
  }
  .comparison .segmented button {
    padding: 7px 6px;
  }
}
#location-status {
  flex-wrap: wrap;
}
#location-status > span {
  flex: 1 1 180px;
}
#location-browser-link {
  font-size: 12px;
  color: #006d9f;
}
#location-browser-link[hidden] {
  display: none;
}
.leaflet-maplibre-gl {
  pointer-events: none;
}

/* The comparison panel stays on the map: the wide-screen centring shift no longer applies. */
.comparison {
  transform: none;
  overflow-x: hidden;
}
.comparison .table-scroll {
  overflow-x: auto;
}
@media (min-width: 651px) and (max-width: 950px) {
  .comparison {
    left: 12px;
    right: auto;
    width: 560px;
    max-width: calc(100% - 90px);
  }
  .comparison .segmented {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: auto;
  }
  .comparison .segmented button {
    padding: 6px 4px;
    line-height: 1.2;
  }
}
@media (min-width: 951px) {
  .comparison {
    width: 680px;
    max-height: 46%;
  }
}
/* Guided tour bubble and highlighted element. */
.tour {
  position: fixed;
  z-index: 3000;
  width: min(340px, calc(100vw - 24px));
  padding: 16px 18px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px #20313a66;
}
.tour[hidden] {
  display: none;
}
.tour strong {
  display: block;
  padding-right: 30px;
  font-family: Manrope, sans-serif;
  font-size: 16px;
  margin-bottom: 6px;
}
.tour p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #dbe5e8;
}
.tour-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
  line-height: 1;
}
.tour-close:hover {
  background: #ffffff1f;
}
.tour-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.tour-actions:has(.tour-next[hidden]) {
  display: none;
}
.tour-count {
  margin-right: auto;
  font-size: 12px;
  color: #b9c7cc;
}
.tour-skip {
  border: 0;
  background: transparent;
  color: #dbe5e8;
  padding: 8px 10px;
}
.tour-skip:hover {
  background: #ffffff1f;
}
.tour-next {
  border: 0;
  background: #e97a50;
  color: #1c2f35;
  font-weight: 700;
  padding: 8px 14px;
}
.tour-next:hover {
  background: #f29370;
}
.tour-target {
  outline: 3px solid #e97a50 !important;
  outline-offset: 3px;
}
#explanation-panel.tour-target,
#comparison-panel.tour-target {
  outline-offset: -3px;
}
/* Sidebar: surface on its own row, then destroyed and damaged buildings. */
.linked-cards .surface-card {
  grid-column: 1 / -1;
}
.linked-cards:before {
  display: none;
}
.damaged-key {
  background: #c3c8ce;
  border: 2px dashed #7b818a;
}
.damaged-card.is-off {
  opacity: 0.5;
}
/* Screen-reader-only text never adds height to the page. */
.sr-label {
  top: 0;
  left: 0;
  margin: 0;
}
/* The Gaza card now opens the sidebar. */
.gaza-card {
  margin: 0 0 22px;
}
/* Injuries card, right under the lives-lost card. */
.injuries-card {
  margin: 0 0 22px;
  padding: 19px;
  background: #fff9df;
  border: 1px solid #e6d27a;
  border-left: 4px solid #c9a100;
  border-radius: 10px;
}
.injuries-card .section-label {
  color: #6f5200;
}
.injuries-card strong {
  display: block;
  font-family: Manrope, sans-serif;
  font-size: 40px;
  line-height: 1.1;
  color: #6f5200;
}
.injuries-card p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}
.injuries-card .micro {
  font-size: 12px;
  color: var(--muted);
}
/* Missile pictogram in the bombing card. */
.bombing-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.missile-icon {
  flex: 0 0 22px;
  color: #3d4a51;
}
/* Filters: damaged buildings depend on the destruction layer. */
.damaged-toggle {
  padding-left: 26px;
}
.damaged-toggle:has(input:disabled),
.injuries-toggle:has(input:disabled) {
  opacity: 0.55;
}
.injuries-toggle {
  padding-left: 26px;
}
/* Legend panel opened from the tools column, placed like the filters panel. */
#color-key.legend-panel {
  position: absolute;
  z-index: 560;
  top: 24px;
  right: var(--tools-offset);
  width: 290px;
  max-height: calc(100% - 48px);
  overflow: auto;
  padding: 14px 16px;
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 5px 24px #20313a30;
  font-size: 14px;
}
#color-key.legend-panel[hidden] {
  display: none;
}
.legend-panel span {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 7px 0;
}
.legend-panel span[hidden] {
  display: none;
}
.legend-panel i {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  border-radius: 3px;
  border: 1px solid #0003;
}
.legend-panel small {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
@media (max-width: 950px) {
  #color-key.legend-panel {
    top: 12px;
  }
}
@media (max-width: 650px) {
  #color-key.legend-panel {
    left: 56px;
    width: auto;
  }
}
/* Position button above the zoom buttons, as in map apps. */
.leaflet-bar.locate-control {
  margin-right: 24px !important;
  margin-bottom: 10px !important;
  border: 0 !important;
  border-radius: 8px;
  box-shadow: 0 3px 15px #0002 !important;
}
#locate-me {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #243b48;
}
#locate-me:hover {
  background: #edf1f2;
}
@media (max-width: 650px) {
  .leaflet-bar.locate-control {
    margin-right: 12px !important;
  }
}
#locate-me[aria-busy="true"] svg {
  animation: calculation-spin 1.5s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  #locate-me[aria-busy="true"] svg {
    animation: none;
  }
}
/* Sources dialog: 50px from each side on large screens, full width on phones; round close button like the panel's. */
dialog {
  max-width: none;
  width: calc(100% - 100px);
}
#close-sources {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #445c68;
  font-size: 28px;
  line-height: 1;
}
#close-sources:hover {
  background: #edf1f2;
}
@media (max-width: 650px) {
  dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    padding: 18px 18px 24px;
  }
  dialog h2 {
    font-size: 22px;
  }
}
/* The sidebar title sits right under the header line. */
aside {
  padding-top: 18px;
}
.hero-title {
  margin-top: 0;
}
/* Scale under the zoom buttons, aligned with them. */
.leaflet-bottom.leaflet-right .leaflet-control-scale {
  margin-right: 24px !important;
  margin-bottom: 6px !important;
}
.leaflet-bottom.leaflet-right .leaflet-control-zoom {
  margin-bottom: 10px !important;
}
@media (max-width: 650px) {
  .leaflet-bottom.leaflet-right .leaflet-control-scale {
    margin-right: 12px !important;
  }
}
/* Copy-link buttons next to each section of the sources dialog. */
.source-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.source-heading h3 {
  margin-bottom: 0;
}
.copy-link {
  border: 1px solid #d4dde0;
  padding: 5px 10px;
  font-size: 12px;
  color: #ad4f2b;
  white-space: nowrap;
}
.copy-link[data-copied] {
  color: #1d6b3a;
  border-color: #9cc9ab;
}
/* Map tools: visible labels on wide screens, icons only below 950px. */
#map:focus-visible {
  outline-offset: -3px;
}
.map-tools button {
  width: auto;
  min-width: 44px;
  padding: 0 12px 0 9px;
  gap: 9px;
  justify-content: flex-start;
}
.map-tools .tool-icon {
  flex: 0 0 26px;
  text-align: center;
}
.map-tools .tool-label {
  font-size: 13px;
  white-space: nowrap;
}
@media (max-width: 950px) {
  :root {
    --tools-offset: 82px;
  }
  .map-tools button {
    width: 44px;
    padding: 0;
    justify-content: center;
  }
  .color-key:not(.collapsed) {
    z-index: 520;
  }
  .map-tools .tool-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
/* Small screens: panels leave room for the drawer button, loading notices sit above the map. */
@media (max-width: 650px) {
  :root {
    --tools-offset: 68px;
  }
  .shape-toolbar,
  .placement-panel,
  .overseas-menu {
    left: 56px !important;
    width: auto !important;
    max-width: none !important;
  }
  .brand-domain {
    font-size: 12px;
  }
  .comparison-state {
    top: 64px;
    bottom: auto;
    left: 12px;
    right: var(--tools-offset);
  }
  .comparison .segmented {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .comparison .segmented button {
    padding: 6px 4px;
    line-height: 1.2;
  }
}
