:root {
  --paper: #f2f4f3;
  --panel: #ffffff;
  --ink: #253b3f;
  --muted: #596a6d;
  --line: #d9e0df;
  --accent: #974927;
  --soft: #eaf0ee;
  --water: #d7e4e4;
  --shadow: 0 2px 8px #233b3912;
  font-family:
    Segoe UI,
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
  font-synthesis: none;
}
.identity svg { display: none; }
.identity strong { font-weight: 650; }
.masthead nav button { border-radius: 2px; }
.research-view { height: 100%; overflow: auto; padding: 32px clamp(20px, 4vw, 64px) 60px; }
.research-layout { display: grid; grid-template-columns: minmax(350px, 1fr) minmax(350px, 1.1fr); gap: clamp(28px, 5vw, 80px); }
.research-layout h2 { font-family: inherit; font-size: 19px; line-height: 1.4; font-weight: 600; margin-bottom: 12px; }
.research-subtitle { margin-top: 32px; }
.research-register { margin-top: 40px; }
.research-register h2 { font-size: 19px; }
.register-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.6; table-layout: fixed; }
.register-table caption { text-align: left; padding: 12px 0; }
.register-table th, .register-table td { text-align: left; vertical-align: top; padding: 16px 20px 16px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.register-table th { font-weight: 500; }
.register-table th:first-child { width: 27%; }
.register-table p { margin: 0 0 8px; }
.register-table .register-status { font-weight: 600; }
@media (max-width: 700px) {
  .register-table, .register-table tbody, .register-table tr, .register-table td, .register-table th { display: block; width: 100%; }
  .register-table thead { display: none; }
  .register-table tr { border-top: 1px solid var(--line); padding: 16px 0; }
  .register-table th, .register-table td { border: 0; padding: 4px 0; }
  .register-table th:first-child { width: 100%; }
  .register-table td:last-child::before { content: "Next action: "; font-weight: 600; }
}
.matrix-key { display: flex; flex-wrap: wrap; gap: 16px; font-size: 11px; margin: 20px 0 12px; }
.matrix-key span::before { content: ""; display: inline-block; height: 8px; width: 8px; background: currentColor; margin-right: 6px; }
.visual { color: #974927; }
.chemical { color: #286492; }
.unspecified { color: #6d7e80; }
.evidence-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; margin: 0 0 16px; }
.evidence-table caption { text-align: left; caption-side: bottom; padding: 14px 0 0; line-height: 1.5; }
.evidence-table thead th { color: var(--muted); font-size: 11px; font-weight: 500; padding: 12px 2px; text-align: center; border-bottom: 1px solid var(--line); }
.evidence-table thead th:first-child { text-align: left; }
.evidence-table tbody th { width: 45%; text-align: left; font-weight: 500; padding: 13px 16px 13px 0; }
.evidence-table td { text-align: center; }
.evidence-table tr { border-bottom: 1px solid var(--line); }
.region-name { font-size: 13px; }
.region-total { float: right; font-size: 12px; color: var(--muted); }
.coverage-bar { display: flex; height: 5px; margin-top: 9px; width: 100%; background: #e8edeb; }
.coverage-bar i { background: currentColor; }
.matrix-count { min-width: 40px; min-height: 40px; padding: 5px; border: 0; background: transparent; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.matrix-count:disabled { text-decoration: none; opacity: .45; }
.research-record { border-top: 1px solid var(--line); padding: 14px 0; }
.research-record p { margin: 6px 0 0; }
.research-record-link { text-align: left; font-size: 13px; padding: 0; border: 0; background: none; color: var(--accent); line-height: 1.5; }
.question-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.research-question { border-top: 1px solid var(--line); }
.research-question:last-child { border-bottom: 1px solid var(--line); }
.research-question summary { padding: 20px 0; font-size: 15px; font-weight: 600; }
.question-number { color: var(--muted); font: 12px ui-monospace, monospace; margin: 0 10px 0 4px; }
.question-content { padding: 0 0 22px 27px; }
.question-content p { margin: 0 0 16px; font-size: 13px; line-height: 1.7; }
.question-content h3 { font-size: 12px; margin: 16px 0 5px; }
.question-references { border-left: 2px solid var(--line); padding-left: 14px; }
.question-references a { display: block; font-size: 11px; margin-bottom: 10px; }
.question-references button { margin-right: 18px; }
.pin.clustered { background: #253b3f; border-color: white; color: white; width: 32px; height: 32px; }
* {
  box-sizing: border-box;
}
.record-tabs {
  display: flex;
  gap: 4px;
  margin: 0 20px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px;
  background: var(--paper);
}
.record-tabs button {
  flex: 1;
  font-size: 11px;
  border: 0;
  padding: 8px 5px;
  background: none;
}
.record-tabs button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--panel);
}
.panel-heading h1 #record-heading {
  font: inherit;
  color: var(--ink);
  margin: 0;
}
.key-region {
  width: 15px;
  height: 10px;
  border: 1px dashed #95783d;
  background: #cba35a40;
}
.reach-card .record-title {
  color: #745c2d;
}
.map-tools {
  right: 60px;
}
@media (max-width: 680px) {
  .record-tabs {
    margin: 0 16px 10px;
  }
  .record-tabs button {
    font-size: 10px;
    padding: 6px;
  }
  .map-tools {
    right: 45px;
  }
  .map-tools #continent-map {
    font-size: 10px;
    padding: 8px;
  }
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 4px;
  padding: 9px 13px;
}
button:hover {
  background: var(--soft);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #ad653e;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
input[type="search"],
select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 4px;
  padding: 10px;
}
input[type="checkbox"] {
  accent-color: var(--ink);
  width: 15px;
  height: 15px;
  vertical-align: middle;
  margin: 0 6px 0 0;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-family: inherit;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.6px;
}
h2 {
  font-family: inherit;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.18;
}
h3 {
  font-size: 14px;
}
p {
  line-height: 1.65;
}
label {
  font-size: 12px;
}
small,
.small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
.text-button {
  border: 0;
  padding: 2px 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
}
.text-button:hover {
  background: none;
  text-decoration: underline;
}
.quiet {
  border-color: transparent;
  background: none;
  font-size: 12px;
}
.outline {
  background: none;
  width: 100%;
  margin-top: 12px;
}
.eyebrow {
  text-transform: none;
  letter-spacing: 0.4px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}
.skip-link {
  position: absolute;
  top: -60px;
  left: 8px;
  z-index: 3000;
  background: var(--panel);
  padding: 12px;
}
.skip-link:focus {
  top: 8px;
}
.masthead {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  gap: 24px;
  background: var(--panel);
}
.identity {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  min-width: 245px;
}
.identity strong {
  font-family: inherit;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.6px;
}
.identity small {
  display: block;
  letter-spacing: 0.2px;
  text-transform: none;
  font-size: 12px;
  margin-top: 3px;
}
.masthead nav {
  display: flex;
  gap: 5px;
}
.masthead nav button {
  border: 0;
  background: transparent;
  padding: 12px 20px;
  font-size: 13px;
}
.masthead nav button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--panel);
}
#workspace {
  position: relative;
  height: calc(100dvh - 64px);
  overflow: hidden;
}
#loading {
  padding: 40px;
}
.map-layout {
  height: 100%;
  display: grid;
  grid-template-columns: 348px 1fr;
}
.observations {
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  z-index: 500;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 22px 16px;
}
.panel-heading h1 {
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 0;
  font-weight: 600;
  margin: 0;
}
.panel-heading h1 span {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
  margin-left: 6px;
}
.search-wrap {
  position: relative;
  margin: 0 20px 18px;
}
.search-wrap span {
  position: absolute;
  left: 11px;
  top: 3px;
  font-size: 28px;
  color: var(--muted);
}
.search-wrap input {
  padding-left: 36px;
}
.filters {
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 10px;
}
.filters label {
  font-size: 10px;
  letter-spacing: 0.2px;
  color: var(--muted);
}
.filters select {
  margin-top: 5px;
  font-size: 11px;
  padding: 8px 5px;
  color: var(--ink);
}
.list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 20px;
  gap: 5px;
}
.list-tools label {
  font-size: 11px;
}
.list-tools button {
  font-size: 11px;
}
.results-heading {
  background: var(--paper);
  padding: 11px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.record-list {
  flex: 1;
  overflow: auto;
  scrollbar-width: thin;
}
.record-card {
  display: block;
  position: relative;
  width: 100%;
  text-align: left;
  padding: 17px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.record-card:hover {
  background: #f1f5f4;
}
.record-card.selected {
  background: #e7efed;
  box-shadow: inset 3px 0 var(--accent);
}
.record-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.3px;
  color: var(--muted);
  margin-bottom: 7px;
}
.record-title {
  font-family: inherit;
  font-size: 17px;
  line-height: 1.25;
  display: block;
  color: var(--ink);
  margin-bottom: 7px;
}
.record-material {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}
.record-bottom {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
  font-size: 10px;
  color: var(--muted);
}
.method-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 4px;
}
.method-dot.chemical {
  background: #345d88;
}
.method-dot.unspecified {
  background: #849083;
}
.tag {
  padding: 3px 5px;
  background: #edf0e8;
  border: 1px solid #dde2d5;
  border-radius: 3px;
  font-size: 10px;
}
.tag.caution {
  color: #81532c;
  background: #f4ecdd;
  border-color: #e5d9c3;
}
.list-footnote {
  font-size: 10px;
  color: var(--muted);
  padding: 11px 20px;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}
.empty {
  padding: 32px 22px;
  color: var(--muted);
  line-height: 1.6;
}
.map-stage {
  position: relative;
  min-width: 0;
  height: 100%;
}
#map {
  height: 100%;
  width: 100%;
  background: var(--water);
}
.leaflet-container {
  font-family:
    Segoe UI,
    system-ui,
    sans-serif;
  font-size: 12px;
}
.leaflet-control-attribution {
  font-size: 9px !important;
  background: #fffdf7db !important;
}
.leaflet-control-zoom {
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow) !important;
}
.leaflet-control-zoom a {
  color: var(--ink) !important;
  background: var(--panel) !important;
  font-weight: 400 !important;
}
.map-tools {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 450;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.map-tools button {
  box-shadow: var(--shadow);
  font-size: 12px;
}
.map-tools label {
  background: #fffef9ed;
  padding: 10px;
  border-radius: 4px;
  box-shadow: var(--shadow);
  font-size: 11px;
}
.map-tools span {
  margin-left: 12px;
}
.map-key {
  position: absolute;
  bottom: 32px;
  left: 20px;
  z-index: 450;
  background: #fffef9f5;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 410px;
  box-shadow: var(--shadow);
  font-size: 10px;
}
.map-key span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.map-key small {
  display: block;
  flex-basis: 100%;
  font-size: 10px;
  line-height: 1.4;
  color: var(--muted);
}
.key-dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: #f6e6d0;
}
.key-diamond {
  width: 9px;
  height: 9px;
  background: var(--ink);
  transform: rotate(45deg);
}
.key-triangle {
  font-size: 15px;
  color: var(--muted);
  font-style: normal;
}
.map-summary {
  position: absolute;
  bottom: 140px;
  left: 20px;
  z-index: 450;
  font-size: 10px;
  background: #fffef9e8;
  border-radius: 4px;
  padding: 8px 12px;
  max-width: 350px;
  color: var(--muted);
}
.tile-status {
  position: absolute;
  top: 70px;
  left: 20px;
  right: 60px;
  z-index: 450;
  background: var(--panel);
  padding: 10px;
  font-size: 11px;
}
.place-marker {
  border: 0;
  background: transparent;
}
.place-marker .pin {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  background: #f9ead4;
  color: #783e25;
  border: 1.5px solid var(--accent);
  box-shadow: 0 1px 5px #21382a3b;
}
.place-marker .pin.selected {
  background: var(--accent);
  color: white;
  border-color: white;
  outline: 2px solid var(--accent);
}
.place-marker .pin.single {
  width: 13px;
  height: 13px;
  margin: 7px;
}
.source-marker {
  background: none;
  border: 0;
}
.source-mark {
  display: block;
  width: 12px;
  height: 12px;
  background: var(--ink);
  border: 2px solid var(--paper);
  transform: rotate(45deg);
  box-shadow: 0 0 0 1px var(--ink);
}
.reference-mark {
  font-size: 23px;
  line-height: 18px;
  font-weight: 700;
  color: var(--ink);
}
.landmark-label {
  border: 0;
  background: #f7f6f0e8;
  box-shadow: none;
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 6px;
}
.landmark-label:before {
  display: none;
}
.place-popup {
  max-width: 240px;
}
.place-popup p {
  font-size: 12px;
  margin: 8px 0;
}
.place-popup button {
  font-size: 12px;
  width: 100%;
}
.leaflet-popup-content-wrapper {
  border-radius: 4px;
  background: var(--panel);
}
.inspector {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 430px;
  z-index: 1100;
  background: var(--panel);
  box-shadow: -6px 0 35px #192e3029;
  border-left: 1px solid var(--line);
  overflow: auto;
}
.inspector-toolbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel);
  padding: 13px 24px;
  border-bottom: 1px solid var(--line);
  z-index: 1;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.8px;
  text-transform: none;
}
.inspector-toolbar button {
  border: 0;
  background: transparent;
  padding: 5px 8px;
  font-size: 17px;
}
#inspector-body {
  padding: 27px 26px 40px;
  overflow-wrap: anywhere;
}
#inspector-body h2 {
  margin: 10px 0 18px;
  font-size: 28px;
}
#inspector-body h3 {
  margin: 26px 0 10px;
}
.inspector-meta {
  font-size: 10px;
  letter-spacing: 0.7px;
  text-transform: none;
  color: var(--muted);
}
.material-callout {
  font-family: inherit;
  font-size: 19px;
  border-left: 2px solid var(--accent);
  padding: 3px 0 3px 14px;
  margin: 20px 0;
  line-height: 1.4;
}
.facts {
  margin: 0;
}
.fact {
  display: grid;
  grid-template-columns: 100px 1fr;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  gap: 15px;
  font-size: 12px;
  line-height: 1.6;
}
.fact dt {
  color: var(--muted);
  font-size: 11px;
}
.fact dd {
  margin: 0;
}
.note {
  font-size: 12px;
  line-height: 1.7;
}
.caution-box {
  border: 1px solid #e4d7bd;
  background: #f9f1e2;
  padding: 13px;
  font-size: 12px;
  line-height: 1.65;
}
.source-citation {
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
}
.source-link {
  display: inline-block;
  font-size: 12px;
  margin: 8px 0;
}
.related-link {
  display: block;
  width: 100%;
  text-align: left;
  margin: 8px 0;
  font-size: 12px;
  line-height: 1.5;
}
.related-link small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.source-view,
.connections-view {
  height: 100%;
  overflow: auto;
  padding: 42px clamp(24px, 5vw, 80px) 60px;
}
.view-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 25px;
  margin-bottom: 24px;
}
.view-title h1 {
  font-size: 30px;
  margin-bottom: 12px;
}
.view-title p:not(.eyebrow) {
  font-size: 13px;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 0;
}
.source-search {
  min-width: 280px;
  color: var(--muted);
  padding-top: 8px;
}
.source-search input {
  margin-top: 8px;
}
.source-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 100px;
  gap: 26px;
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
}
.source-row .source-citation {
  margin-bottom: 5px;
  font-size: 18px;
}
.source-row .source-id {
  font-size: 10px;
  overflow-wrap: anywhere;
  color: var(--muted);
  line-height: 1.6;
}
.source-row p {
  margin-bottom: 5px;
  font-size: 12px;
  color: var(--muted);
}
.source-row button {
  font-size: 11px;
}
.source-status {
  font-size: 11px;
  color: var(--muted);
  padding-top: 3px;
}
.source-status span {
  display: block;
  margin-bottom: 8px;
}
#source-count {
  color: var(--muted);
  font-size: 12px;
}
.connection-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 650px);
  gap: 70px;
}
.scenario-panel > label {
  display: block;
  font-size: 12px;
}
.scenario-panel select {
  margin-top: 8px;
}
.assumption-toggle {
  margin: 24px 0;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
#scenario-result {
  background: var(--soft);
  padding: 20px;
  margin: 22px 0;
}
#scenario-result h2 {
  font-size: 25px;
  margin-bottom: 12px;
}
#scenario-result p {
  font-size: 12px;
  margin-bottom: 0;
}
.connection-diagram {
  padding: 2px 0 25px;
}
.graph-node {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: inherit;
  font-size: 18px;
  line-height: 1.5;
}
.graph-node:before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--soft);
}
.graph-edge {
  margin-left: 4px;
  border-left: 2px solid #829780;
  padding: 17px 0 17px 21px;
  min-height: 61px;
  font-size: 11px;
  color: var(--muted);
}
.graph-edge.assumed {
  border-left: 2px dashed var(--accent);
  color: var(--accent);
}
.graph-edge.disabled {
  opacity: 0.46;
}
.graph-edge span {
  display: block;
  font-size: 10px;
  margin-top: 4px;
}
.graph-note {
  font-size: 11px;
  margin: 22px 0 0;
  color: var(--muted);
}
.connection-details details {
  margin-bottom: 8px;
}
#connection-details details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
summary {
  cursor: pointer;
  font-size: 12px;
  line-height: 1.5;
}
details p {
  font-size: 12px;
  margin: 12px 0 0;
}
details ul {
  padding-left: 20px;
  font-size: 11px;
  line-height: 1.8;
}
.source-ref {
  font-size: 11px;
  line-height: 1.6;
  margin: 8px 0;
}
.source-ref a {
  overflow-wrap: anywhere;
}
dialog {
  max-width: 620px;
  width: calc(100% - 32px);
  max-height: 85dvh;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #1d342e75;
  backdrop-filter: blur(3px);
}
dialog p {
  font-size: 13px;
}
dialog h3 {
  margin-top: 24px;
}
.dialog-close {
  float: right;
  border: 0;
  padding: 0 0 8px 12px;
  background: none;
  font-size: 18px;
}
@media (min-width: 1300px) {
  body.has-inspector .map-stage {
    margin-right: 430px;
  }
  .map-layout {
    grid-template-columns: 365px 1fr;
  }
}
@media (max-width: 950px) {
  .masthead {
    padding: 0 18px;
    gap: 12px;
  }
  .identity {
    min-width: 205px;
  }
  .identity strong {
    font-size: 21px;
  }
  .masthead nav button {
    padding: 11px 12px;
  }
  .map-layout {
    grid-template-columns: 310px 1fr;
  }
  .map-tools label {
    display: none;
  }
  .map-key {
    right: 18px;
    gap: 8px;
  }
  .connection-layout {
    gap: 35px;
    grid-template-columns: 240px 1fr;
  }
  .source-row {
    grid-template-columns: 130px 1fr;
  }
  .source-status {
    grid-column: 2;
    display: flex;
    gap: 15px;
  }
  .view-title {
    gap: 25px;
  }
  .source-search {
    min-width: 220px;
  }
  .inspector {
    width: 400px;
  }
}
@media (max-width: 680px) {
  .masthead {
    height: 110px;
    flex-wrap: wrap;
    padding: 13px 16px 0;
    gap: 8px;
  }
  .identity {
    min-width: 0;
  }
  .identity svg {
    width: 29px;
  }
  .identity strong {
    font-size: 22px;
  }
  .identity small {
    font-size: 8px;
  }
  .masthead nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .masthead nav button {
    flex: 1;
    padding: 8px 12px;
    border-radius: 4px 4px 0 0;
    font-size: 12px;
  }
  .quiet {
    font-size: 10px;
    padding: 6px;
  }
  #workspace {
    height: calc(100dvh - 110px);
  }
  .map-layout {
    display: flex;
    flex-direction: column;
  }
  .map-stage {
    order: -1;
    height: 40%;
    min-height: 225px;
    flex-shrink: 0;
  }
  .observations {
    flex: 1;
    min-height: 0;
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .panel-heading {
    padding: 12px 16px 9px;
  }
  .panel-heading h1 {
    font-size: 14px;
  }
  .search-wrap {
    margin: 0 16px 10px;
  }
  .search-wrap input {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .filters {
    padding: 0 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }
  .filters label {
    font-size: 9px;
  }
  .filters select {
    font-size: 10px;
    padding: 7px 3px;
  }
  .list-tools {
    padding: 10px 16px;
  }
  .results-heading {
    padding: 8px 16px;
  }
  .record-card {
    padding: 13px 16px;
  }
  .record-title {
    font-size: 16px;
  }
  .list-footnote {
    padding: 7px 16px;
    font-size: 9px;
  }
  .map-tools {
    top: 10px;
    left: 10px;
  }
  .map-tools button {
    font-size: 10px;
    padding: 8px;
  }
  .map-key {
    bottom: 20px;
    left: 10px;
    right: auto;
    max-width: 270px;
    padding: 7px 10px;
    font-size: 8px;
    gap: 8px;
  }
  .map-key small {
    font-size: 8px;
  }
  .map-summary {
    display: none;
  }
  .landmark-label {
    font-size: 9px;
  }
  .tile-status {
    top: 45px;
    left: 10px;
    font-size: 10px;
  }
  .inspector {
    width: 100%;
    top: 0;
    border: 0;
  }
  #inspector-body {
    padding: 24px;
  }
  .source-view,
  .connections-view {
    padding: 26px 20px 50px;
  }
  .view-title {
    display: block;
    padding-bottom: 22px;
    margin-bottom: 18px;
  }
  .view-title h1 {
    font-size: 32px;
  }
  .source-search {
    display: block;
    min-width: 0;
    margin-top: 20px;
  }
  .source-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .source-status {
    grid-column: 1;
  }
  .source-row .source-citation {
    font-size: 17px;
  }
  .connection-layout {
    display: block;
  }
  .scenario-panel {
    margin-bottom: 30px;
  }
  .scenario-panel .outline {
    margin-bottom: 12px;
  }
  .graph-node {
    font-size: 17px;
  }
  dialog {
    padding: 25px;
  }
  dialog h2 {
    font-size: 26px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

@media (max-width: 950px) {
  .map-tools label {
    display: flex;
    align-items: center;
    font-size: 10px;
    padding: 9px;
  }
  .map-tools {
    gap: 8px;
  }
}
@media (max-width: 680px) {
  .map-tools label {
    font-size: 9px;
    padding: 7px;
  }
  .map-tools {
    gap: 6px;
  }
}
@media (max-width: 680px) and (max-height: 740px) {
  .map-layout {
    overflow-y: auto;
  }
  .map-stage {
    height: 220px;
    min-height: 220px;
  }
  .observations {
    flex: none;
    height: 480px;
    min-height: 480px;
  }
}

/* Compact controls and readable records at desktop and touch sizes. */
.identity strong { font-size: 21px; font-weight: 650; letter-spacing: -.4px; }
.identity small { text-transform: none; }
.panel-heading { padding: 20px 20px 14px; }
.record-title { font-size: 16px; font-weight: 600; }
.record-top, .record-bottom { font-size: 11px; }
.record-material { font-size: 12px; }
.record-tabs button, .filters label, .filters select { font-size: 12px; }
.search-wrap { margin-bottom: 14px; }
.filters { gap: 10px; }
.list-footnote, .results-heading, .list-tools label, .list-tools button { font-size: 11px; }
.map-tools { top: 14px; left: 14px; gap: 6px; }
.map-tools button, .map-tools label { box-shadow: none; border: 1px solid var(--line); background: #fffffff5; font-size: 11px; }
.map-key { box-shadow: none; background: #fffffff5; }
.map-key small { font-size: 11px; }
.map-summary { bottom: 158px; font-size: 11px; }
.place-marker .pin.clustered { background: var(--ink); border-color: white; color: white; width: 32px; height: 32px; }
.place-marker .pin.selected { outline: 2px solid var(--accent); }
@media (max-width: 1050px) {
  .research-layout { grid-template-columns: 1fr; gap: 32px; }
  .research-view { padding: 28px; }
}
@media (max-width: 680px) {
  .masthead { height: 106px; padding: 12px 14px 0; }
  .masthead nav { justify-content: space-between; gap: 0; }
  .masthead nav button { padding: 10px 6px; font-size: 12px; }
  #workspace { height: calc(100dvh - 106px); }
  .identity strong { font-size: 19px; }
  .identity small { font-size: 11px; }
  .quiet { font-size: 11px; }
  .research-view { padding: 24px 16px 40px; }
  .research-layout { display: block; }
  .research-layout > section + section { margin-top: 32px; }
  .research-view .view-title h1 { font-size: 26px; }
  .region-name { font-size: 12px; }
  .matrix-count { min-width: 36px; min-height: 44px; }
  .question-heading { display: block; margin-bottom: 16px; }
  .question-content { padding-left: 0; }
  .map-tools { left: 8px; right: 42px; top: 8px; gap: 4px; }
  .map-tools button, .map-tools label { min-height: 32px; padding: 6px 8px; font-size: 10px; }
  .map-tools #continent-map { font-size: 10px; }
  .map-key { max-width: 300px; padding: 8px 10px; font-size: 10px; }
  .map-key small { display: none; }
  .record-title { font-size: 16px; }
  .filters label, .filters select { font-size: 11px; }
  .filters select { padding: 8px 4px; }
  .list-footnote { font-size: 10px; }
  .map-layout { overflow-y: auto; }
  .map-stage { height: 280px; min-height: 280px; }
  .observations { flex: none; height: 560px; min-height: 560px; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-key { bottom: 40px; }
}
