.research-page figure.flood-atlas {
  width: min(1120px, calc(100vw - 24px));
  margin: 28px 50% 26px;
  transform: translateX(-50%);
}

.research-page .flood-atlas figcaption {
  max-width: 940px;
  margin: 10px auto 0;
}

.flood-atlas {
  --flood-accent: #8a4d2d;
  box-sizing: border-box;
  padding: 15px;
  border: 1px solid #b89d72;
  background: #ede3ce;
  box-shadow: 0 12px 32px rgba(50, 45, 34, .11);
}

.flood-atlas__masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 1px 2px 12px;
  color: #2b2822;
}

.flood-atlas__masthead strong {
  font: 700 clamp(1.4rem, 3.5vw, 2.25rem)/1.05 Georgia, serif;
}

.flood-atlas__masthead > span {
  max-width: 28rem;
  color: #62594a;
  font: 700 .72rem/1.35 system-ui, sans-serif;
  letter-spacing: .08em;
  text-align: right;
  text-transform: uppercase;
}

.flood-atlas__map-shell {
  position: relative;
  overflow: hidden;
  min-height: 580px;
  border: 1px solid rgba(70, 65, 52, .34);
  background: #d3e5e7;
}

.flood-atlas__map {
  position: absolute;
  inset: 0;
}

.flood-atlas__status {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 2;
  margin: 0;
  padding: 8px 12px;
  transform: translateX(-50%);
  border: 1px solid rgba(83, 74, 61, .28);
  background: rgba(247, 241, 225, .94);
  color: #514a3e;
  font: 700 .76rem/1.35 system-ui, sans-serif;
  box-shadow: 0 2px 9px rgba(40, 34, 28, .12);
}

.flood-atlas__status[hidden] {
  display: none;
}

.flood-map-marker {
  --marker-color: #76574b;
  display: grid;
  width: 24px;
  height: 24px;
  box-sizing: border-box;
  place-items: center;
  border: 2px solid #fffaf0;
  border-radius: 50%;
  padding: 0;
  background: var(--marker-color);
  color: #fffdf5;
  cursor: pointer;
  font: 800 8px/1 system-ui, sans-serif;
  box-shadow: 0 1px 3px rgba(30, 25, 20, .48);
  transition: transform .12s ease, border-color .12s ease;
}

.flood-map-marker.is-candidate {
  border-color: var(--marker-color);
  background: #f7f1e1;
  color: var(--marker-color);
  box-shadow: 0 0 0 2px #fffaf0, 0 1px 4px rgba(30, 25, 20, .48);
}

.flood-map-marker:hover,
.flood-map-marker:focus-visible,
.flood-map-marker.is-active {
  z-index: 2;
  transform: scale(1.22);
  border-color: #151d1c;
  outline: none;
}

.flood-map-label {
  color: #6b614f;
  pointer-events: none;
  font: 800 clamp(8px, .8vw, 11px)/1.05 system-ui, sans-serif;
  letter-spacing: .08em;
  text-align: center;
  text-shadow: -1px -1px 0 #f4eedf, 1px -1px 0 #f4eedf, -1px 1px 0 #f4eedf, 1px 1px 0 #f4eedf;
  text-transform: uppercase;
  white-space: nowrap;
}

.flood-atlas__key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 17px;
  margin: 12px 1px 2px;
  color: #514a3e;
  font: .8rem/1.35 system-ui, sans-serif;
}

.flood-atlas__key span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.flood-atlas__swatch {
  width: 11px;
  height: 11px;
  border: 2px solid #fffaf0;
  border-radius: 50%;
  background: var(--swatch, #a35331);
  box-shadow: 0 0 0 1px #62452f;
}

.flood-atlas__key--kinds {
  gap: 6px 14px;
  margin-top: 7px;
  font-size: .74rem;
}

.flood-atlas__key-label {
  color: #766854;
  font: 800 .64rem/1.3 system-ui, sans-serif;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.flood-atlas__key--kinds .flood-atlas__swatch {
  width: 9px;
  height: 9px;
  border-width: 1.5px;
}

.flood-atlas__swatch.is-ring {
  border-color: var(--swatch, #a35331);
  background: #f7f1e1;
  box-shadow: 0 0 0 2px #fffaf0, 0 0 0 3px #62452f;
}

.flood-atlas__picker {
  display: block;
  margin: 14px 0 2px;
}

.flood-atlas__picker > select,
.flood-atlas__selector-row > select {
  display: block;
  width: min(100%, 52rem);
  min-height: 46px;
  margin: 0 0 11px;
  border: 1px solid #9c8768;
  border-radius: 2px;
  padding: 8px 34px 8px 10px;
  background: #f7f1e1;
  color: #25231f;
  font: 650 .86rem/1.25 system-ui, sans-serif;
}

.flood-atlas__selector-row {
  display: grid;
  grid-template-columns: minmax(0, 52rem) auto;
  gap: 8px;
  align-items: stretch;
  width: min(100%, 59.5rem);
  margin: 0 0 11px;
}

.flood-atlas__selector-row > select {
  width: 100%;
  margin: 0;
}

.flood-atlas__stepper {
  display: grid;
  grid-template-columns: 44px auto 44px;
  overflow: hidden;
  min-height: 46px;
  border: 1px solid #9c8768;
  border-radius: 2px;
  background: #eee2ca;
  color: #513926;
  box-shadow: inset 0 1px 0 rgba(255, 253, 246, .7), 0 2px 7px rgba(71, 52, 31, .08);
}

.flood-atlas__step {
  display: grid;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  padding: 0;
  place-items: center;
  background: #f7f1e1;
  color: #6e3f29;
  cursor: pointer;
  transition: background-color .2s cubic-bezier(.16, 1, .3, 1), color .2s cubic-bezier(.16, 1, .3, 1), transform .14s cubic-bezier(.16, 1, .3, 1);
}

.flood-atlas__step + .flood-atlas__position,
.flood-atlas__position + .flood-atlas__step {
  border-left: 1px solid rgba(156, 135, 104, .62);
}

.flood-atlas__step svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s cubic-bezier(.16, 1, .3, 1);
}

.flood-atlas__step:hover {
  background: #e6d8bc;
  color: #452d1f;
}

.flood-atlas__step--previous:hover svg {
  transform: translateX(-1px);
}

.flood-atlas__step--next:hover svg {
  transform: translateX(1px);
}

.flood-atlas__step:active {
  transform: translateY(1px) scale(.98);
}

.flood-atlas__step:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid #263735;
  outline-offset: -3px;
}

.flood-atlas__step:disabled {
  color: #a2947f;
  cursor: default;
}

.flood-atlas__position {
  display: grid;
  min-width: 44px;
  padding: 0 7px;
  place-items: center;
  color: #6b5b47;
  font: 750 .68rem/1 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: .035em;
  white-space: nowrap;
}

.flood-atlas__card {
  min-height: 0;
  padding: 16px 19px 17px;
  border-left: 4px solid var(--flood-accent);
  background: #f7f1e1;
}

.flood-atlas__card p {
  max-width: 82ch;
  margin: 0;
  color: #514a3e;
  font: .86rem/1.48 system-ui, sans-serif;
}

.flood-atlas__card .flood-atlas__kind {
  margin: 0 0 6px;
  color: #766854;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.flood-atlas__after {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(123, 75, 49, .2);
}

.flood-atlas__after span,
.flood-atlas__source span {
  display: block;
  margin-bottom: 2px;
  color: #766854;
  font: 800 .64rem/1.3 system-ui, sans-serif;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.flood-atlas__after p[hidden],
.flood-atlas__source a[hidden],
.flood-atlas__source small[hidden] {
  display: none;
}

.flood-atlas__card .flood-atlas__comparison {
  margin-top: 9px;
  color: #7b4b31;
  font-size: .78rem;
  font-weight: 650;
}

.flood-atlas__source {
  margin-top: 15px;
  color: #62594a;
  font: .73rem/1.4 system-ui, sans-serif;
}

.flood-atlas__source a {
  color: #6e3f29;
  font-weight: 750;
}

.flood-atlas__source small,
.flood-gazetteer td:last-child small {
  display: block;
  margin-top: 2px;
  color: #766854;
  font-size: .68rem;
  line-height: 1.35;
}

.flood-atlas__note {
  margin: 9px 1px 0;
  color: #62594a;
  font: .76rem/1.45 system-ui, sans-serif;
}

.flood-gazetteer-guide {
  width: min(1120px, calc(100vw - 24px));
  margin: 22px 50% 0;
  padding: 15px 18px;
  transform: translateX(-50%);
  border: 1px solid #c8b68f;
  background: #f3ead8;
  color: #514a3e;
  font: .86rem/1.55 system-ui, sans-serif;
}

.flood-gazetteer-guide p {
  margin: .35rem 0;
}

.flood-gazetteer {
  width: min(1120px, calc(100vw - 24px));
  margin: 12px 50% 26px;
  transform: translateX(-50%);
  border: 1px solid #c8b68f;
  background: #fbf7ed;
}

.flood-gazetteer summary {
  cursor: pointer;
  padding: 15px 18px;
  color: #513926;
  font: 750 .9rem/1.3 system-ui, sans-serif;
}

.flood-gazetteer .table-scroll {
  margin: 0;
  border: 0;
  border-top: 1px solid #c8b68f;
}

.flood-gazetteer table {
  font-size: .79rem;
}

.flood-gazetteer td:first-child {
  color: #8a4d2d;
  font-weight: 800;
  text-align: center;
}

.flood-gazetteer .flood-gazetteer__region th {
  padding: 10px 12px;
  border-top: 2px solid #9c8768;
  border-bottom: 1px solid #c8b68f;
  background: #eee2ca;
  color: #513926;
  font: 800 .72rem/1.25 system-ui, sans-serif;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}

.flood-gazetteer .flood-gazetteer__region:first-child th {
  border-top: 0;
}

.flood-atlas .maplibregl-ctrl-group {
  border-radius: 2px;
  box-shadow: 0 1px 6px rgba(42, 31, 12, .22);
}

.flood-atlas .maplibregl-ctrl button {
  width: 34px;
  height: 34px;
}

.flood-atlas .maplibregl-ctrl-attrib {
  background: rgba(247, 241, 225, .86);
  color: #514a3e;
  font-size: 10px;
}

@media (max-width: 700px) {
  .flood-atlas {
    padding: 10px;
  }

  .flood-atlas__masthead {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .flood-atlas__masthead strong {
    font-size: 1.45rem;
  }

  .flood-atlas__masthead > span {
    max-width: none;
    text-align: left;
  }

  .flood-atlas__map-shell {
    min-height: 400px;
  }

  .flood-atlas__picker {
    display: block;
  }

  .flood-atlas__picker > select,
  .flood-atlas__selector-row > select {
    min-height: 48px;
  }

  .flood-atlas__selector-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    width: 100%;
  }

  .flood-atlas__stepper {
    grid-template-columns: 44px auto 44px;
    min-height: 48px;
  }

  .flood-atlas__step {
    min-width: 44px;
    min-height: 46px;
  }

  .flood-atlas__position {
    min-width: 40px;
    padding-inline: 5px;
  }

  .flood-atlas__card {
    padding: 14px 15px 15px;
  }

  .flood-map-marker {
    width: 19px;
    height: 19px;
    border-width: 1.5px;
    font-size: 6.5px;
  }

  .flood-gazetteer .table-scroll {
    overflow: visible;
  }

  .flood-gazetteer table {
    display: block;
    width: 100%;
    margin: 0;
    font-size: .84rem;
  }

  .flood-gazetteer caption {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 13px 14px 8px;
    font-size: .72rem;
    line-height: 1.35;
    letter-spacing: .03em;
    text-align: left;
    text-transform: none;
    white-space: normal;
  }

  .flood-gazetteer thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .flood-gazetteer tbody,
  .flood-gazetteer tr,
  .flood-gazetteer td {
    display: block;
    width: auto;
  }

  .flood-gazetteer tr {
    padding: 11px 14px;
    border-top: 1px solid rgba(156, 127, 78, .28);
  }

  .flood-gazetteer tr.flood-gazetteer__region {
    padding: 0;
  }

  .flood-gazetteer .flood-gazetteer__region th {
    display: block;
    padding: 11px 14px;
  }

  .flood-gazetteer td {
    padding: 2px 0;
    border: 0;
    text-align: left;
  }

  .flood-gazetteer td:first-child {
    display: inline-block;
    margin-bottom: 3px;
    color: #8a4d2d;
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .flood-gazetteer td:first-child::before {
    content: "Tradition ";
  }

  .flood-gazetteer td:nth-child(2) {
    color: #332e27;
    font-weight: 750;
  }

  .flood-gazetteer td:nth-child(3) {
    margin-top: 6px;
  }

  .flood-gazetteer td:nth-child(3)::before,
  .flood-gazetteer td:nth-child(4)::before,
  .flood-gazetteer td:nth-child(5)::before,
  .flood-gazetteer td:nth-child(6)::before {
    display: block;
    color: #8a4d2d;
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .07em;
    text-transform: uppercase;
  }

  .flood-gazetteer td:nth-child(3)::before {
    content: "What the story remembers";
  }

  .flood-gazetteer td:nth-child(4),
  .flood-gazetteer td:nth-child(5),
  .flood-gazetteer td:nth-child(6) {
    margin-top: 6px;
    color: #62594a;
  }

  .flood-gazetteer td:nth-child(4)::before {
    content: "World after the water";
  }

  .flood-gazetteer td:nth-child(5)::before {
    content: "Story and landscape";
  }

  .flood-gazetteer td:nth-child(6)::before {
    content: "Primary source";
  }
}

@media (prefers-reduced-motion: reduce) {
  .flood-atlas .maplibregl-canvas,
  .flood-atlas__step,
  .flood-atlas__step svg {
    scroll-behavior: auto;
    transition: none;
  }
}
