/* v4.3.0: semantic palette tokens; warning and destructive colours stay distinct. */
:root,
:root[data-palette="coastal"] {
  --atlas-accent: #175b67;
  --atlas-text: #17313e;
  --atlas-muted: #4e6570;
  --atlas-page: #f9fbfc;
  --atlas-soft: #eff5f8;
  --atlas-highlight: #e3f1f7;
  --atlas-edge: #427b93;
  --atlas-border: #ccdbe2;
}
:root[data-palette="ocean"] {
  --atlas-accent: #205493;
  --atlas-text: #182c45;
  --atlas-muted: #4c6178;
  --atlas-page: #f8faff;
  --atlas-soft: #edf2fa;
  --atlas-highlight: #deebfc;
  --atlas-edge: #3e6fa5;
  --atlas-border: #cbd7e8;
}
:root[data-palette="forest"] {
  --atlas-accent: #286047;
  --atlas-text: #20362b;
  --atlas-muted: #506658;
  --atlas-page: #f8fbf8;
  --atlas-soft: #eef5ee;
  --atlas-highlight: #e0efdf;
  --atlas-edge: #4b785b;
  --atlas-border: #cbdccb;
}
:root[data-palette="plum"] {
  --atlas-accent: #6c427d;
  --atlas-text: #35273d;
  --atlas-muted: #69566f;
  --atlas-page: #fcf9fd;
  --atlas-soft: #f4eef7;
  --atlas-highlight: #eee0f5;
  --atlas-edge: #866194;
  --atlas-border: #ddcfe3;
}
:root[data-palette="slate"] {
  --atlas-accent: #3c5365;
  --atlas-text: #222f39;
  --atlas-muted: #53626d;
  --atlas-page: #fafbfc;
  --atlas-soft: #f0f3f5;
  --atlas-highlight: #e3eaf0;
  --atlas-edge: #637889;
  --atlas-border: #d1dbe2;
}
/* Atlas v1.3.11 — Bombo default selection; responsive map and profile presentation. */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--atlas-page);
  color: var(--atlas-text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
a {
  color: var(--atlas-accent);
  text-underline-offset: 3px;
}
header,
main,
footer {
  max-width: 1440px;
  margin: auto;
  padding: 0 48px;
}
header {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--atlas-soft);
}
.brand {
  text-decoration: none;
  color: var(--atlas-text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon {
  font-size: 34px;
  color: var(--atlas-accent);
}
.edition,
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--atlas-muted);
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  padding: 42px 0 32px;
}
.eyebrow {
  color: var(--atlas-accent);
  margin: 0 0 14px;
}
h1 {
  font-family: Georgia, serif;
  font-size: 44px;
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -1.4px;
  margin: 0;
}
.dek {
  color: var(--atlas-muted);
  margin: 14px 0 0;
}
.summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 38px;
}
.summary strong {
  display: block;
  font-size: 38px;
  font-weight: 400;
  line-height: 1.2;
}
.summary span {
  color: var(--atlas-muted);
  font-size: 14px;
}
.summary p {
  grid-column: span 2;
  color: var(--atlas-muted);
  font-size: 12px;
  margin: 0;
  border-top: 1px solid var(--atlas-soft);
  padding-top: 12px;
}
.explorer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  background: white;
  border: 1px solid var(--atlas-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px
    color-mix(in srgb, var(--atlas-text) 2.35%, transparent);
}
.map-column {
  min-width: 0;
  background: var(--atlas-soft);
}
.map-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px;
  background: #fff;
}
h2 {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}
.map-top span {
  font-size: 12px;
  color: var(--atlas-muted);
  align-self: center;
}
#map {
  position: relative;
  isolation: isolate;
}
#map > img {
  width: 100%;
  display: block;
}
#markers {
  position: absolute;
  inset: 0;
}
.marker {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--atlas-accent);
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--atlas-accent) 8.63%, transparent),
    0 2px 5px color-mix(in srgb, var(--atlas-text) 14.51%, transparent);
  cursor: pointer;
  z-index: 2;
  color: white;
  font-weight: bold;
  font-size: 12px;
}
.marker:hover,
.marker:focus-visible,
.marker.selected {
  background: var(--atlas-text);
  outline: 3px solid white;
  box-shadow: 0 0 0 6px
    color-mix(in srgb, var(--atlas-accent) 26.67%, transparent);
  z-index: 5;
}
.marker.pilot {
  background: #986322;
}
.marker.historical {
  background: var(--atlas-muted);
}
.marker-label {
  position: absolute;
  left: 35px;
  top: 3px;
  white-space: nowrap;
  color: var(--atlas-muted);
  font-size: 12px;
  font-weight: 600;
  text-shadow:
    0 1px 2px white,
    0 0 5px white;
  pointer-events: none;
}
.marker.left .marker-label {
  left: auto;
  right: 35px;
}
.continent {
  position: absolute;
  pointer-events: none;
  letter-spacing: 5px;
  font-size: 12px;
  color: var(--atlas-muted);
}
.africa {
  top: 48%;
  left: 21%;
}
.asia {
  top: 16%;
  left: 69%;
}
#tooltip {
  position: absolute;
  width: 290px;
  max-width: 90%;
  padding: 15px 18px;
  background: var(--atlas-text);
  color: white;
  border-radius: 8px;
  box-shadow: 0 8px 25px color-mix(in srgb, var(--atlas-text) 20%, transparent);
  z-index: 10;
  pointer-events: none;
  font-size: 14px;
}
#tooltip strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
}
#tooltip small {
  display: block;
  color: var(--atlas-border);
  margin-top: 7px;
}
.map-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  font-size: 12px;
  color: var(--atlas-muted);
  border-top: 1px solid var(--atlas-soft);
}
.map-foot a {
  color: inherit;
}
aside {
  padding: 26px;
  border-left: 1px solid var(--atlas-soft);
}
aside .eyebrow {
  margin-bottom: 10px;
}
aside h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
  margin-bottom: 20px;
}
.detail-block + .detail-block {
  border-top: 1px solid var(--atlas-soft);
  margin-top: 22px;
  padding-top: 22px;
}
.badge {
  display: inline-block;
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 4px;
  background: var(--atlas-soft);
  color: var(--atlas-accent);
  line-height: 1.4;
  font-weight: 700;
}
.badge.pilot {
  background: #f7ecdb;
  color: #825317;
}
.badge.historical {
  background: var(--atlas-soft);
  color: var(--atlas-muted);
}
aside h3 {
  font-size: 17px;
  line-height: 1.35;
  margin: 13px 0;
}
aside p {
  font-size: 14px;
  color: var(--atlas-muted);
}
aside .metric {
  font-size: 34px;
  color: var(--atlas-accent);
  margin: 16px 0 0;
  line-height: 1.2;
}
aside .metric-label {
  margin: 4px 0 16px;
  font-size: 13px;
}
aside a {
  font-size: 14px;
}
.location-note {
  font-size: 13px;
  color: var(--atlas-muted);
  margin: 14px 0 38px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--atlas-border);
  padding-bottom: 16px;
}
.section-heading h2 {
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 400;
}
.section-heading span {
  font-size: 13px;
  color: var(--atlas-muted);
}
.program {
  display: grid;
  grid-template-columns: 1.15fr 1.5fr 1.1fr;
  gap: 35px;
  padding: 28px 0;
  border-bottom: 1px solid var(--atlas-soft);
}
.program h3 {
  font-size: 19px;
  line-height: 1.4;
  margin: 12px 0 7px;
}
.program p {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--atlas-muted);
}
.program .geo {
  font-size: 13px;
  color: var(--atlas-muted);
}
.program .label {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--atlas-muted);
  font-weight: bold;
  margin-bottom: 8px;
}
.program a {
  font-size: 14px;
}
.phone {
  display: block;
  font-size: 16px !important;
  margin-top: 8px;
  font-weight: 600;
}
.contact-note {
  font-size: 12px !important;
  margin-top: 8px !important;
}
.method {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 50px;
  padding: 36px 0;
}
.method h2 {
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.3;
}
.method p {
  font-size: 14px;
  color: var(--atlas-muted);
  margin: 0 0 12px;
}
footer {
  border-top: 1px solid var(--atlas-soft);
  display: flex;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 24px;
  font-size: 12px;
  color: var(--atlas-muted);
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #b9762d;
  outline-offset: 4px;
}
@media (min-width: 1450px) {
  #map {
    min-height: 460px;
  }
}
@media (max-width: 1000px) {
  header,
  main,
  footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  .explorer {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
  aside {
    padding: 20px;
  }
  .marker-label {
    display: none;
  }
  .intro h1 {
    font-size: 38px;
  }
  .program {
    gap: 22px;
  }
  .summary {
    gap: 15px;
  }
}
@media (max-width: 740px) {
  header {
    height: 72px;
  }
  .edition {
    display: none;
  }
  .intro {
    display: block;
    padding-top: 28px;
  }
  h1 {
    font-size: 36px;
  }
  .summary {
    margin-top: 24px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
  }
  .summary strong {
    font-size: 27px;
  }
  .summary p {
    width: 100%;
  }
  .explorer {
    display: block;
  }
  .map-top {
    padding: 16px;
    display: block;
  }
  .map-top span {
    display: block;
    margin-top: 4px;
  }
  .map-foot {
    display: block;
  }
  .map-foot a {
    display: block;
    margin-top: 4px;
  }
  aside {
    border-left: 0;
    border-top: 1px solid var(--atlas-soft);
  }
  .marker {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }
  .continent {
    font-size: 10px;
    letter-spacing: 3px;
  }
  #tooltip {
    width: 245px;
    font-size: 13px;
  }
  .program {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .section-heading {
    display: block;
  }
  .section-heading span {
    display: block;
    margin-top: 8px;
  }
  .method {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  footer {
    display: block;
  }
  footer span {
    display: block;
    margin-bottom: 5px;
  }
}

.map-scroll {
  overflow-x: auto;
}
.map-foot {
  flex-wrap: wrap;
}
@media (max-width: 540px) {
  #map {
    min-width: 520px;
  }
  .marker {
    width: 24px;
    height: 24px;
  }
  .intro {
    padding-top: 20px;
  }
  h1 {
    font-size: 32px;
  }
  .summary {
    margin-top: 18px;
  }
}

aside {
  max-height: 680px;
  overflow-y: auto;
}
#tooltip {
  max-height: 90%;
  overflow-y: auto;
  pointer-events: auto;
}
.metric {
  overflow-wrap: anywhere;
}
@media (max-width: 740px) {
  aside {
    max-height: none;
    overflow: visible;
  }
}

.brand {
  letter-spacing: 1px;
}
.brand-icon {
  flex-shrink: 0;
}
@media (max-width: 540px) {
  .brand {
    font-size: 12px;
    letter-spacing: 0.5px;
  }
}

/* Horizontal-map affordance appears only when the viewport clips the map. */
.map-shell {
  position: relative;
}
.map-swipe-hint {
  display: none;
}
.map-shell::after,
.map-shell::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  pointer-events: none;
  z-index: 6;
  opacity: 0;
}
.map-shell::after {
  right: 0;
  background: linear-gradient(to right, transparent, var(--atlas-soft));
}
.map-shell::before {
  left: 0;
  background: linear-gradient(to left, transparent, var(--atlas-soft));
}
@media (max-width: 540px) {
  .map-shell.has-overflow .map-swipe-hint {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    padding: 8px 16px;
    color: var(--atlas-muted);
    background: var(--atlas-soft);
    font-size: 14px;
    line-height: 1.4;
  }
  .map-shell.has-overflow::before,
  .map-shell.has-overflow::after {
    top: 36px;
  }
  .map-shell.can-scroll-right::after,
  .map-shell.can-scroll-left::before {
    opacity: 1;
  }
  .map-scroll:focus-visible {
    outline: 2px solid var(--atlas-accent);
    outline-offset: -2px;
  }
}

/* Expanded geographic coverage keeps markers legible on narrow screens. */
#map {
  min-width: 1200px;
  min-height: 0;
}
.marker {
  width: 24px;
  height: 24px;
}
.africa {
  left: 53%;
  top: 48%;
}
.asia {
  left: 81%;
  top: 16%;
}
.americas {
  left: 4%;
  top: 23%;
}
.marker-label {
  display: none;
}
.map-shell.has-overflow .map-swipe-hint {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 8px 16px;
  color: var(--atlas-muted);
  font-size: 13px;
}
.map-shell.can-scroll-right::after,
.map-shell.can-scroll-left::before {
  opacity: 1;
}
.map-shell.has-overflow::before,
.map-shell.has-overflow::after {
  top: 36px;
}

.badge.related {
  background: var(--atlas-soft);
  color: var(--atlas-muted);
}
.method li {
  font-size: 14px;
  color: var(--atlas-muted);
  margin-bottom: 12px;
}
.phone {
  overflow-wrap: anywhere;
}
.directory + .directory {
  margin-top: 36px;
}

.metric-help {
  background: var(--atlas-soft);
  border-left: 3px solid var(--atlas-accent);
  border-radius: 4px;
  padding: 12px 14px;
  margin: 16px 0;
}
.metric-help h4 {
  font-size: 14px;
  margin: 0 0 8px;
}
.metric-help p {
  font-size: 13px;
  margin: 0 0 10px;
}
.metric-help p:last-child {
  margin-bottom: 0;
}

#tooltip .tooltip-profile {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--atlas-muted);
  border-radius: 5px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  touch-action: manipulation;
}
#tooltip .tooltip-profile:hover,
#tooltip .tooltip-profile:focus-visible {
  background: var(--atlas-muted);
}
article.program {
  scroll-margin-top: 20px;
}

/* A quiet location cue for profiles reached through map or sidebar links. */
.program {
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}
.program > div:first-child {
  padding-left: 18px;
}
.program:target,
.program.selected-profile {
  background-color: var(--atlas-highlight);
  box-shadow: inset 3px 0 0 var(--atlas-edge);
}
@media (prefers-reduced-motion: reduce) {
  .program {
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* Crowded maps and narrow screens show previews below the hotspots. */
.tooltip-dock {
  padding: 12px;
  background: var(--atlas-soft);
  border-top: 1px solid var(--atlas-border);
}
.tooltip-dock[hidden] {
  display: none;
}
#tooltip.docked {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: none;
  box-shadow: none;
}
.tooltip-dock #tooltip {
  font-size: 14px;
}

/* Keep the return link quiet and only show it on the linked profile. */
.program .back-to-map {
  display: none;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  margin: -12px 0 8px;
  color: #64746d;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
}
.program:target .back-to-map,
.program.selected-profile .back-to-map {
  display: flex;
}
.program .back-to-map:hover {
  text-decoration: underline;
  color: var(--atlas-accent);
}
#map-overview {
  scroll-margin-top: 20px;
}

/* Explicit sea color and contained previews on compact iPhone viewports. */
.map-column,
.map-shell,
.map-scroll,
#map,
#map > img,
.tooltip-dock {
  background-color: var(--atlas-soft);
  color-scheme: light;
}
.map-shell::after {
  background: linear-gradient(to right, transparent, var(--atlas-soft));
}
.map-shell::before {
  background: linear-gradient(to left, transparent, var(--atlas-soft));
}
.map-shell.has-overflow .map-swipe-hint {
  background: var(--atlas-soft);
}
.tooltip-dock {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
#tooltip {
  box-sizing: border-box;
  overflow-wrap: anywhere;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
#tooltip.docked {
  max-width: 100%;
  min-width: 0;
}
#tooltip .tooltip-profile {
  white-space: normal;
  overflow-wrap: anywhere;
}
.tooltip-dock {
  scroll-margin: 12px;
}

.map-return-icon {
  width: 16px;
  height: 16px;
  flex: none;
  opacity: 0.75;
}
.program .back-to-map {
  gap: 7px;
}
#tooltip {
  max-width: calc(100vw - 32px);
}
@supports (width: 100dvw) {
  #tooltip {
    max-width: calc(100dvw - 32px);
  }
}

.selected-projects[hidden] {
  display: none;
}
.selected-projects:not([hidden]) {
  margin-bottom: 36px;
}

/* Individually readable entries, using available space before scrolling. */
#tooltip.multi-project:not(.docked) {
  width: 360px;
}
.tooltip-entries {
  display: grid;
  gap: 6px;
}
.tooltip-entry {
  padding: 10px;
  border-radius: 5px;
  background: #ffffff04;
}
.tooltip-entry:nth-child(even) {
  background: #ffffff0d;
}
.tooltip-entry-title {
  font-weight: 600;
  line-height: 1.35;
}
#tooltip .tooltip-entry small {
  line-height: 1.4;
  margin-top: 5px;
}
#tooltip .tooltip-entry .tooltip-profile {
  margin-top: 6px;
  padding: 6px 8px;
}
.tooltip-entry {
  min-width: 0;
}
@media (min-width: 740px) {
  #tooltip.docked .tooltip-entries {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

/* Equal-height grid cards keep profile actions aligned below variable copy. */
.tooltip-entry {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#tooltip .tooltip-entry small {
  margin-top: 0;
  margin-bottom: 6px;
}
#tooltip .tooltip-entry .tooltip-profile {
  margin-top: auto;
  flex-shrink: 0;
}

footer .site-version {
  display: inline;
  white-space: nowrap;
}

/* Separate multi-project location records without adding visual weight. */
#detail.multiple-projects .detail-block {
  padding: 14px;
  border-radius: 7px;
  background: var(--atlas-page);
  border-top: 0;
}
#detail.multiple-projects .detail-block:nth-of-type(even) {
  background: var(--atlas-soft);
}
#detail.multiple-projects .detail-block + .detail-block {
  margin-top: 12px;
}

/* v1.3.11: consistent breathing room around text on phone screens. */
@media (max-width: 540px) {
  header,
  main,
  footer {
    padding-left: max(28px, env(safe-area-inset-left));
    padding-right: max(28px, env(safe-area-inset-right));
  }
  .program {
    padding-left: 18px;
    padding-right: 18px;
  }
  .program > div:first-child {
    padding-left: 0;
  }
  .program > div {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .map-top,
  .map-foot {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* v1.3.11: live profile search, including compact touch screens. */
.project-search {
  margin: 0 0 28px;
}
.project-search label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}
.search-controls {
  display: flex;
  gap: 10px;
}
.search-controls input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--atlas-edge);
  border-radius: 7px;
  background: #fff;
  color: var(--atlas-text);
  font: inherit;
}
.search-controls button {
  padding: 10px 16px;
  border: 1px solid var(--atlas-edge);
  border-radius: 7px;
  background: var(--atlas-soft);
  color: var(--atlas-text);
  font: inherit;
  cursor: pointer;
}
.search-controls input:focus-visible {
  outline: 3px solid var(--atlas-accent);
  outline-offset: 2px;
}
#search-status {
  font-size: 14px;
  color: var(--atlas-muted);
  margin: 8px 0 0;
}
.program[hidden],
.directory[hidden],
#clear-search[hidden] {
  display: none;
}

/* v1.3.11: quiet, readable full-text search highlights. */
mark.search-match {
  background: #cfe8ff;
  color: #123b62;
  border-radius: 2px;
  padding: 0;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* v1.3.11: give every result column space inside the selection boundary. */
.program {
  padding-left: 24px;
  padding-right: 24px;
}
.program > div:first-child {
  padding-left: 0;
}
@media (max-width: 540px) {
  .program {
    padding-left: 22px;
    padding-right: 22px;
  }
}

/* v1.3.11: subtle hover/focus cue; retain the stronger keyboard focus outline. */
.search-controls input {
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}
.search-controls input:hover,
.search-controls input:focus {
  border-color: var(--atlas-edge);
  box-shadow: 0 0 0 3px rgba(117, 173, 201, 0.12);
}
@media (prefers-reduced-motion: reduce) {
  .search-controls input {
    transition: none;
  }
}

/* v1.3.11: geography uses the same gentle interaction cue as search. */
#map-overview {
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}
#map-overview:hover,
#map-overview:focus-within {
  border-color: var(--atlas-edge);
  box-shadow: 0 0 0 3px rgba(117, 173, 201, 0.12);
}
@media (prefers-reduced-motion: reduce) {
  #map-overview {
    transition: none;
  }
}

/* v1.3.11: first search result and filtered map coverage. */
.program.search-first {
  background-color: var(--atlas-highlight);
  box-shadow: inset 3px 0 0 var(--atlas-edge);
}
.marker[hidden] {
  display: none;
}

/* v1.3.11: quiet row hover cue without replacing selection highlighting. */
.program {
  outline: 1px solid transparent;
  outline-offset: -1px;
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    outline-color 0.16s ease;
}
.program:hover,
.program:focus-within {
  outline-color: var(--atlas-soft);
  box-shadow: none;
}
.program.selected-profile:hover,
.program.selected-profile:focus-within,
.program.search-first:hover,
.program.search-first:focus-within,
.program:target:hover,
.program:target:focus-within {
  box-shadow: inset 3px 0 0 var(--atlas-edge);
}
@media (prefers-reduced-motion: reduce) {
  .program {
    transition: none;
  }
}

/* v1.3.11: selected country outlines and selected-set row numbering. */
#country-outlines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
#country-outlines path {
  display: none;
  fill: color-mix(in srgb, var(--atlas-accent) 7.06%, transparent);
  stroke: var(--atlas-accent);
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}
#country-outlines path.active {
  display: block;
}
.program:has(.result-number) {
  padding-top: 44px;
}
.result-number {
  position: absolute;
  top: 10px;
  left: 24px;
  font-size: 11px;
  line-height: 1.5;
  padding: 2px 7px;
  border-radius: 9px;
  background: var(--atlas-soft);
  color: var(--atlas-muted);
  font-weight: 600;
}

/* v1.3.11: persistent offshore markers without callout lines. */
.marker.selected {
  outline: 2px solid var(--atlas-highlight);
  box-shadow:
    0 0 0 6px var(--atlas-highlight),
    0 0 12px 8px color-mix(in srgb, var(--atlas-highlight) 60%, transparent);
}

/* v1.3.11: temporary dotted country connectors never capture pointer events. */
#country-hover-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
#country-hover-links line {
  stroke: var(--atlas-muted);
  stroke-opacity: 0.55;
  stroke-width: 1;
  stroke-dasharray: 1 5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

/* v1.3.11: pale-blue halo behind hovered country connectors. */
#country-hover-links line {
  filter: drop-shadow(0 0 2px var(--atlas-highlight))
    drop-shadow(0 0 4px var(--atlas-edge));
}

/* v1.3.11: gentle directional movement along country connectors. */
@keyframes country-dot-drift {
  to {
    stroke-dashoffset: -12;
  }
}
#country-hover-links line {
  animation: country-dot-drift 3s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  #country-hover-links line {
    animation: none;
  }
}

/* v1.3.11: two low-contrast selection pulses, then return to the usual outline. */
@keyframes country-selection-pulse {
  0%,
  100% {
    transform: scale(1);
    fill: var(--atlas-highlight);
  }
  50% {
    transform: scale(1.1);
    fill: var(--atlas-highlight);
  }
}
#country-outlines path.country-chosen {
  transform-box: fill-box;
  transform-origin: center;
  animation: country-selection-pulse 0.5s ease-in-out 1;
}
@media (prefers-reduced-motion: reduce) {
  #country-outlines path.country-chosen {
    animation: none;
  }
}
/* Atlas 2.0.0 — accessible, compact administration surface. */
#country-base {
  width: 100%;
  aspect-ratio: 1500/620;
  display: block;
  background: var(--atlas-soft);
}
#country-outlines path.country-chosen {
  display: block;
}
.admin-section {
  max-width: 1344px;
  margin: 40px auto;
  padding: 24px;
  border-top: 1px solid var(--atlas-soft);
}
.admin-section > p {
  color: var(--atlas-muted);
}
.admin-section button {
  font: inherit;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--atlas-edge);
  border-radius: 6px;
  background: var(--atlas-soft);
  color: var(--atlas-text);
  cursor: pointer;
}
.admin-section input:not([type="checkbox"]),
.admin-section textarea,
.admin-section select {
  display: block;
  width: 100%;
  font: inherit;
  padding: 10px;
  border: 1px solid var(--atlas-edge);
  border-radius: 5px;
  background: white;
  color: var(--atlas-text);
}
.admin-section label {
  display: block;
  font-size: 14px;
}
.admin-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 24px 0;
}
.admin-toolbar,
.admin-actions {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}
.admin-toolbar label {
  flex: 1;
  min-width: 200px;
}
.admin-section fieldset {
  border: 1px solid var(--atlas-soft);
  border-radius: 6px;
  padding: 16px;
  margin: 20px 0;
}
.admin-countries {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  max-height: 250px;
  overflow: auto;
  margin-top: 14px;
}
.admin-section .check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}
.admin-actions {
  margin-top: 18px;
}
#admin-login {
  max-width: 420px;
  margin: 18px 0;
}
#admin-login button {
  margin-top: 12px;
}
#admin-message {
  min-height: 24px;
}
.load-error {
  padding: 20px;
  background: var(--atlas-highlight);
  color: #734a22;
}
@media (max-width: 740px) {
  .admin-section {
    margin: 24px;
    padding: 20px 0;
  }
  .admin-fields {
    grid-template-columns: 1fr;
  }
}
.edit-log {
  margin-top: 32px;
  border-top: 1px solid var(--atlas-soft);
  padding-top: 20px;
}
#audit-entries {
  overflow-x: auto;
  margin-top: 14px;
}
#audit-entries table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
#audit-entries td,
#audit-entries th {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--atlas-soft);
  vertical-align: top;
}

/* 2.0.0: admin controls remain collapsed until explicitly opened. */
.admin-disclosure > summary {
  cursor: pointer;
  color: var(--muted, var(--atlas-muted));
  font-size: 0.9rem;
  list-style-position: inside;
  padding: 0.4rem 0;
  width: fit-content;
}
.admin-disclosure > summary:focus-visible {
  outline: 2px solid var(--atlas-edge);
  outline-offset: 4px;
  border-radius: 3px;
}
.admin-content {
  padding-top: 1rem;
}

/* v2.1.0: compact share links and explicit shared-result reset. */
.share-project {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.875rem;
  text-decoration: none;
  gap: 0.35rem;
}
.share-paperclip {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.share-project:hover {
  text-decoration: underline;
}
.share-feedback {
  display: block;
  font-size: 0.875rem;
  color: var(--atlas-muted);
  overflow-wrap: anywhere;
}
.share-feedback input {
  width: 100%;
  min-width: 0;
  font-size: 1rem;
}
.shared-project-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}
.shared-project-notice[hidden] {
  display: none;
}
.shared-project-notice button {
  padding: 0.5rem 0.75rem;
  background: var(--atlas-soft);
  border: 1px solid var(--atlas-border);
  border-radius: 4px;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

/* v2.1.0: destructive action, always followed by confirmation. */
.admin-section #admin-delete {
  background: #b42318;
  border-color: #b42318;
  color: #fff;
}
.admin-section #admin-delete:hover {
  background: #912018;
  border-color: #912018;
}
.admin-section #admin-delete:focus-visible {
  outline: 3px solid #f4aaa3;
  outline-offset: 3px;
}

/* v2.1.1: quiet catalog numbering, separate from selected-result counts. */
.record-number {
  display: block;
  margin: 0 0 0.5rem;
  color: var(--atlas-muted);
  font-size: 0.8125rem;
  line-height: 1.4;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* v2.2.0: retain blue feedback for the full pointer/keyboard hover. */
#country-outlines path.country-hovered {
  display: block;
  fill: var(--atlas-highlight);
  stroke: var(--atlas-muted);
  fill-opacity: 0.85;
}
.marker:hover,
.marker:focus-visible {
  box-shadow:
    0 0 0 7px color-mix(in srgb, var(--atlas-highlight) 70.2%, transparent),
    0 0 15px 7px color-mix(in srgb, var(--atlas-highlight) 40%, transparent);
}

/* v2.3.0: catalog-driven source directory. */
.source-group {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--atlas-soft);
}
.source-group summary {
  cursor: pointer;
  font-size: 0.95rem;
}
.source-group summary span {
  color: var(--atlas-muted);
  font-size: 0.8125rem;
  margin-left: 0.5rem;
}
.source-group li {
  margin: 0.85rem 0;
  overflow-wrap: anywhere;
}
.source-group li p {
  margin: 0.25rem 0;
  font-size: 0.8125rem;
}

/* v2.4.0: Aprukuma-inspired health symbol shared by the header and favicon. */
.brand .aprukuma-icon {
  width: 30px;
  height: 34px;
  flex: 0 0 30px;
  display: block;
}
@media (max-width: 540px) {
  .brand .aprukuma-icon {
    width: 26px;
    height: 30px;
    flex-basis: 26px;
  }
}

/* v2.4.1: native, unobtrusive country-name tooltips for represented countries. */
#markers {
  pointer-events: none;
}
#markers .marker {
  pointer-events: auto;
}

/* v2.5.0: compact numbered lookup above the optional project dropdown. */
.admin-number-lookup {
  margin: 0 0 24px;
}
.admin-number-lookup > div {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}
.admin-section #admin-project-number {
  width: 140px;
  max-width: 45%;
}
.admin-number-lookup p {
  font-size: 0.875rem;
  color: var(--atlas-muted);
  margin: 6px 0;
}
.admin-number-lookup #project-number-status {
  color: var(--atlas-text);
}

/* v2.6.0: concise search guidance. */
.search-help {
  font-size: 0.8125rem;
  color: var(--atlas-muted);
  margin: 8px 0;
}

.admin-section textarea[name="outcome"] {
  overflow-y: hidden;
  min-height: 100px;
  resize: vertical;
}

/* v2.7.0: number and text lookups share a row, stacking on phones. */
.admin-lookup-row {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(280px, 1.2fr);
  gap: 24px;
  align-items: start;
}
.admin-name-lookup > input {
  margin-top: 6px;
}
.admin-name-lookup > p {
  font-size: 0.875rem;
  color: var(--atlas-muted);
  margin: 6px 0;
}
.admin-search-results {
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 6px;
  margin: 10px 0 20px;
}
.admin-search-results button {
  text-align: left;
  width: 100%;
}
@media (max-width: 740px) {
  .admin-lookup-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .admin-name-lookup {
    margin-bottom: 20px;
  }
}

/* v2.7.1: non-editable project reference within the record form. */
.admin-project-reference {
  max-width: 260px;
  margin: 18px 0;
}
.admin-section #edit-project-number {
  background: var(--atlas-soft);
  color: var(--atlas-muted);
  cursor: default;
}

/* v2.7.2: retain map context and fixed marker positions during filtering. */
.marker.search-muted {
  opacity: 0.4;
  transition: opacity 0.15s ease;
}
.marker.search-muted:hover,
.marker.search-muted:focus-visible {
  opacity: 1;
}

/* v2.7.3: consistent single-line input and dropdown height, including Safari. */
.admin-section input:not([type="checkbox"]),
.admin-section select {
  height: 46px;
  min-height: 46px;
  box-sizing: border-box;
}

/* v2.7.5: sources remain collapsed until requested. */
.sources-disclosure > summary {
  cursor: pointer;
  color: var(--atlas-accent);
  padding: 8px 0;
  font-size: 0.9375rem;
}
.sources-disclosure[open] > summary {
  margin-bottom: 12px;
}

/* v3.0.0: shared shell for independent editor and audit pages. */
.site-navigation,
.page-navigation {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.site-navigation a,
.page-navigation a {
  text-decoration: none;
}
.page-navigation {
  margin: 26px 0;
}
.page-navigation [aria-current] {
  font-weight: 700;
  color: var(--atlas-text);
}
.management-page h1 {
  font-size: 34px;
  margin-bottom: 20px;
}
.management-page .admin-section {
  margin: 0;
  padding: 0 0 32px;
  border: 0;
  max-width: none;
}
.management-page #log-page {
  min-height: 240px;
}
.management-page #audit-entries {
  overflow-x: auto;
}
.management-page .admin-content > p:first-child {
  margin-top: 0;
}
footer {
  flex-wrap: wrap;
  gap: 16px;
}

/* v3.0.1: read-only version and unavailable rollback state. */
.admin-section #edit-record-version {
  background: var(--atlas-soft);
  color: var(--atlas-muted);
}
.admin-section button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* v3.1.0: version review within the selected record editor. */
.record-history {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--atlas-border);
}
.record-history h2 {
  margin-bottom: 12px;
}
.admin-section #version-slider {
  padding: 0;
  width: 100%;
  accent-color: var(--atlas-accent);
}
.version-change {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.version-change h3 {
  grid-column: 1/-1;
  margin: 0;
  font-size: 15px;
}
.version-change > div {
  padding: 12px;
  background: var(--atlas-soft);
  border-radius: 5px;
  min-width: 0;
}
.version-change > div:nth-of-type(2) {
  background: var(--atlas-soft);
}
.version-change p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 6px 0;
  font-size: 14px;
}
.version-change strong {
  font-size: 13px;
  color: var(--atlas-muted);
}
@media (max-width: 740px) {
  .version-change {
    grid-template-columns: 1fr;
  }
}

/* v3.1.0: exact changed text alongside historical form values. */
.admin-section .version-changed {
  background: #fffbe7;
  border-radius: 6px;
  padding: 10px;
  outline: 1px solid #ebd98a;
}
.field-version-diff {
  font-size: 13px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  margin-top: 8px;
}
.field-version-diff p {
  margin: 6px 0;
}
.field-version-diff mark {
  background: #ffe88e;
  color: var(--atlas-text);
}
.admin-section #record-form input:disabled,
.admin-section #record-form select:disabled,
.admin-section #record-form textarea:disabled {
  opacity: 1;
  color: var(--atlas-muted);
}
.record-history {
  margin: 20px 0 28px;
}

/* v3.1.1: labeled, touch-friendly version stops with instant native range scrubbing. */
.version-scroll {
  overflow-x: auto;
  padding: 4px 0 8px;
  max-width: 100%;
}
.version-timeline {
  position: relative;
  margin: 0 24px;
  padding-bottom: 44px;
}
.admin-section #version-slider {
  display: block;
  margin: 0;
  height: 32px;
  min-height: 32px;
  cursor: ew-resize;
  touch-action: pan-y;
}
.admin-section #version-nodes {
  position: relative;
  margin: 0 9px;
  height: 0;
}
.admin-section .version-node {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  min-width: 44px;
  min-height: 44px;
  padding: 12px 4px 2px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--atlas-muted);
  font-size: 12px;
  white-space: nowrap;
}
.version-node::before {
  content: "";
  position: absolute;
  top: 1px;
  left: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--atlas-edge);
}
.admin-section .version-node[aria-pressed="true"] {
  color: var(--atlas-accent);
  font-weight: 700;
  background: var(--atlas-soft);
}
.version-node[aria-pressed="true"]::before {
  background: var(--atlas-accent);
  box-shadow: 0 0 0 3px var(--atlas-border);
}
.admin-section .version-node:focus-visible {
  outline: 2px solid var(--atlas-accent);
  outline-offset: 2px;
}

/* v3.1.2: nodes sit on the track; labels stay below for readable guidance. */
.admin-section #version-slider {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  touch-action: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.admin-section #version-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: var(--atlas-border);
}
.admin-section #version-slider::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--atlas-border);
}
.admin-section #version-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--atlas-accent);
  box-shadow: 0 0 0 1px var(--atlas-accent);
  position: relative;
  z-index: 2;
}
.admin-section #version-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--atlas-accent);
  box-shadow: 0 0 0 1px var(--atlas-accent);
}
.version-node::before {
  top: -19px;
  pointer-events: none;
}
.version-node[aria-pressed="true"]::before {
  opacity: 0;
}
.admin-section #version-slider:focus-visible {
  outline: 2px solid var(--atlas-edge);
  outline-offset: 4px;
}

/* v3.2.0: version review controls and current/preview comparisons. */
.version-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}
.version-navigation label {
  flex: 1;
  min-width: 180px;
}
.version-navigation button {
  min-height: 44px;
}
#version-badges {
  font-size: 13px;
  font-weight: 600;
  color: var(--atlas-accent);
  background: var(--atlas-soft);
  padding: 10px 12px;
  border-radius: 6px;
}
.version-change-summary {
  font-size: 13px;
  color: var(--atlas-muted);
}
.field-version-diff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field-version-diff p {
  min-width: 0;
}
.field-version-diff strong {
  display: block;
  margin-bottom: 4px;
}
.admin-section [hidden] {
  display: none !important;
}
@media (max-width: 740px) {
  .field-version-diff {
    grid-template-columns: 1fr;
  }
  .version-navigation label {
    order: -1;
    flex-basis: 100%;
  }
  .version-navigation button {
    flex: 1;
  }
}

/* v3.2.2: compact editor layout; existing input, select and textarea heights are retained. */
.admin-content {
  padding-top: 0;
}
.admin-lookup-row {
  gap: 20px;
}
.admin-number-lookup {
  margin-bottom: 12px;
}
.admin-section #admin-message:empty {
  display: none;
}
.record-history {
  margin: 18px 0;
  padding-top: 16px;
}
.record-history h2 {
  margin: 0 0 8px;
}
.record-history #history-status {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--atlas-muted);
}
.version-navigation {
  margin-bottom: 10px;
}
.version-context {
  padding: 10px 12px;
  background: var(--atlas-soft);
  border-radius: 6px;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
}
.version-context #version-badges {
  background: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}
.version-context #version-description {
  margin: 0;
  font-size: 13px;
  color: var(--atlas-muted);
}
.version-context #version-summary {
  grid-column: 1/-1;
  margin: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.version-slider-label {
  font-size: 13px !important;
  color: var(--atlas-muted);
}
.version-review-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.version-review-actions .check-label {
  margin: 0;
}
#version-filter-status {
  font-size: 13px;
  color: var(--atlas-muted);
  margin: 6px 0;
}
#version-diff p {
  margin: 6px 0;
  font-size: 14px;
}
.record-form-heading {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.record-form-heading .admin-project-reference {
  margin: 0;
  max-width: none;
  flex: 1;
  min-width: 240px;
}
.record-form-heading #required-fields-note {
  font-size: 13px;
  color: var(--atlas-muted);
  margin: 0;
}
.admin-fields {
  gap: 14px 20px;
  margin: 16px 0;
  align-items: start;
}
.admin-fields > label {
  min-width: 0;
}
.admin-section #edit-record-reference {
  background: var(--atlas-soft);
  color: var(--atlas-muted);
}
.admin-section fieldset {
  margin: 16px 0;
}
.admin-actions {
  margin-top: 14px;
}
@media (max-width: 740px) {
  .version-context {
    grid-template-columns: 1fr;
  }
  .version-context #version-summary {
    grid-column: auto;
  }
  .version-navigation {
    gap: 8px;
  }
  .record-form-heading {
    gap: 8px;
  }
  .version-review-actions {
    align-items: stretch;
  }
  .version-review-actions > button {
    width: 100%;
  }
  .admin-fields {
    gap: 14px;
  }
  .version-context #version-description {
    font-size: 13px;
  }
}

/* Version summaries belong exclusively to their timeline labels. */
.version-timeline {
  margin-left: 80px;
  margin-right: 80px;
  padding-bottom: 114px;
}
.admin-section .version-node {
  width: 152px;
  max-width: 152px;
  min-height: 44px;
  padding: 12px 6px 6px;
  white-space: normal;
  font-size: 14px;
}
.version-node-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
  margin-top: 4px;
  color: var(--atlas-muted);
}
.version-context #version-description {
  align-self: center;
}

/* v3.2.3: emphasize field names only within version summaries. */
.version-node-summary strong {
  font-weight: 700;
  color: var(--atlas-muted);
}

/* v3.2.4: country picker shows results only during search. */
#selected-countries {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
#selected-countries:empty {
  display: none;
}
.admin-section .country-chip {
  min-height: 36px;
  padding: 5px 10px;
  font-size: 14px;
  background: var(--atlas-soft);
  border-color: var(--atlas-border);
}
#country-results {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--atlas-border);
  border-radius: 5px;
  padding: 4px;
  margin-top: 4px;
}
.admin-section #country-results button {
  display: block;
  width: 100%;
  text-align: left;
  background: white;
  border: 0;
  border-radius: 3px;
}
.admin-section #country-results button:hover,
.admin-section #country-results button:focus-visible {
  background: var(--atlas-soft);
}

/* v3.3.0: task-focused editor groups and a consistent save action. */
.admin-fields {
  display: block;
  margin: 18px 0;
}
.editor-field-group {
  margin: 0 0 22px;
  padding-top: 16px;
  border-top: 1px solid var(--atlas-soft);
}
.editor-field-group h3 {
  font-size: 16px;
  font-weight: 650;
  margin: 0 0 12px;
  color: var(--atlas-muted);
}
.field-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  align-items: start;
}
.field-group-grid > label {
  min-width: 0;
}
.field-group-grid input,
.field-group-grid textarea,
.field-group-grid select {
  margin-top: 5px;
}
.admin-actions {
  padding: 14px 0;
  border-top: 1px solid var(--atlas-soft);
  align-items: center;
}
.admin-section .admin-actions button[type="submit"] {
  background: var(--atlas-accent);
  border-color: var(--atlas-accent);
  color: white;
  font-weight: 600;
}
.admin-section .admin-actions button[type="submit"]:hover {
  background: var(--atlas-text);
}
.admin-section .admin-actions #admin-delete {
  margin-left: auto;
}
.admin-actions #edit-action-message {
  flex-basis: 100%;
  font-size: 14px;
  color: var(--atlas-muted);
  margin: 0;
}
.admin-actions #edit-action-message:empty {
  display: none;
}
.admin-lookup-row {
  padding: 16px;
  background: var(--atlas-soft);
  border-radius: 8px;
  margin-bottom: 14px;
}
.admin-lookup-row p {
  margin-bottom: 0;
}
.admin-toolbar {
  margin-bottom: 16px;
}
.record-form-heading {
  padding: 12px 0;
}
.admin-content > p:first-child {
  margin-bottom: 10px;
}
.record-history {
  background: var(--atlas-soft);
  border: 1px solid var(--atlas-soft);
  border-radius: 8px;
  padding: 18px;
}
.admin-section input:focus-visible,
.admin-section textarea:focus-visible,
.admin-section select:focus-visible {
  outline: 2px solid var(--atlas-edge);
  outline-offset: 2px;
}
@media (max-width: 740px) {
  .field-group-grid {
    grid-template-columns: 1fr;
  }
  .admin-lookup-row {
    padding: 12px;
  }
  .record-history {
    padding: 12px;
  }
  .admin-actions {
    gap: 10px;
  }
  .admin-toolbar {
    gap: 8px;
  }
  .admin-toolbar label {
    flex-basis: 100%;
  }
}

/* v3.4.0: accessible homepage navigation and compact mobile reading flow. */
.skip-link {
  position: fixed;
  top: 8px;
  left: 16px;
  transform: translateY(-150%);
  z-index: 100;
  background: white;
  padding: 12px 16px;
  border: 2px solid var(--atlas-accent);
  border-radius: 6px;
}
.skip-link:focus {
  transform: translateY(0);
}
.search-feedback {
  display: flex;
  justify-content: space-between;
  gap: 8px 20px;
  align-items: center;
  flex-wrap: wrap;
}
.search-feedback a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-size: 14px;
  text-decoration: none;
  font-weight: 600;
}
.search-feedback [hidden] {
  display: none;
}
.map-top {
  align-items: center;
}
.map-tools {
  display: flex;
  gap: 14px;
  align-items: center;
}
.map-pan-controls {
  display: flex;
  gap: 8px;
}
.map-pan-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--atlas-border);
  border-radius: 7px;
  background: var(--atlas-page);
  color: var(--atlas-accent);
  font-size: 21px;
  cursor: pointer;
}
.map-pan-controls button:disabled {
  opacity: 0.35;
  cursor: default;
}
.map-reading-notes {
  margin: 14px 0 28px;
  font-size: 14px;
  color: var(--atlas-muted);
}
.map-reading-notes summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
  width: fit-content;
}
.map-reading-notes .location-note {
  margin: 8px 0 18px;
  max-width: 100ch;
}
.marker::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
}
.program > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.program p {
  line-height: 1.65;
}
.search-controls input {
  font-size: 16px;
}
.sources-disclosure summary {
  min-height: 44px;
  padding-block: 10px;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--atlas-muted);
  outline-offset: 3px;
}
.map-scroll {
  overscroll-behavior-x: contain;
}
#project-search {
  scroll-margin-top: 20px;
}
@media (max-width: 740px) {
  .intro {
    padding: 24px 0 20px;
    gap: 20px;
  }
  .intro h1 {
    font-size: 32px;
    line-height: 1.16;
    letter-spacing: -0.6px;
  }
  .intro .dek {
    font-size: 15px;
    line-height: 1.5;
    margin-top: 10px;
  }
  .summary {
    margin-top: 16px;
    gap: 12px 24px;
  }
  .summary strong {
    font-size: 26px;
  }
  .summary p {
    padding-top: 8px;
  }
  .project-search {
    margin-bottom: 18px;
  }
  .search-feedback {
    gap: 0 12px;
  }
  .map-tools {
    justify-content: space-between;
    margin-top: 8px;
  }
  .map-top .map-tools span {
    margin: 0;
    font-size: 13px;
  }
  .map-pan-controls {
    flex: none;
  }
  .program p {
    font-size: 16px;
  }
  .program .geo {
    font-size: 14px;
  }
  .program .share-project {
    min-height: 44px;
  }
  .method {
    padding: 24px 0;
  }
  .map-reading-notes {
    margin-bottom: 20px;
  }
  header .brand {
    line-height: 1.35;
  }
}

/* v3.4.1: preserve readable action labels in both editing and historical preview. */
.admin-section #record-form .admin-actions button {
  font-size: 16px;
  font-weight: 600;
  opacity: 1;
  -webkit-text-fill-color: currentColor;
}
.admin-section #record-form .admin-actions button[type="submit"]:enabled {
  color: #fff;
  background: var(--atlas-accent);
  border-color: var(--atlas-accent);
}
.admin-section #record-form .admin-actions #admin-delete:enabled {
  color: #fff;
  background: #b42318;
  border-color: #b42318;
}
.admin-section #record-form .admin-actions button:disabled {
  color: var(--atlas-muted);
  background: var(--atlas-soft);
  border-color: var(--atlas-edge);
  opacity: 1;
  cursor: not-allowed;
}
.admin-section #record-form .admin-actions button[type="submit"]:enabled:hover {
  background: var(--atlas-text);
}
.admin-section #record-form .admin-actions #admin-delete:enabled:hover {
  background: #912018;
}

/* v3.5.0: synchronized review editors, distinct from immutable saved comparisons. */
#version-diff > h3 {
  margin: 20px 0 6px;
  font-size: 18px;
}
.version-edit-card {
  padding: 16px;
  margin: 14px 0;
  background: #fff;
  border: 1px solid var(--atlas-border);
  border-radius: 8px;
}
.version-edit-card h4 {
  margin: 0 0 10px;
  font-size: 15px;
}
.admin-section .version-edit-card.version-changed {
  padding: 16px;
  outline: 0;
  border-color: #e4d593;
  background: #fffdf2;
}
.version-edit-card .field-version-diff {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e2cc;
}
.version-draft-editor {
  font-weight: 600;
}
.version-draft-editor input,
.version-draft-editor textarea,
.version-draft-editor select {
  margin-top: 6px;
  font-weight: 400;
}
.admin-section .version-draft-editor select[multiple] {
  height: auto;
  min-height: 120px;
}
.admin-section .review-save {
  color: white;
  background: var(--atlas-accent);
  border-color: var(--atlas-accent);
  font-weight: 600;
}
.admin-section .review-save:disabled {
  opacity: 1;
  color: var(--atlas-muted);
  background: var(--atlas-soft);
}
#review-draft-status {
  color: var(--atlas-muted);
  font-size: 14px;
}

/* v3.6.0: bounded project navigation within the filtered results. */
.project-navigation {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 18px;
  padding: 10px 12px;
  background: var(--atlas-soft);
  border-radius: 7px;
}
.project-navigation #project-position {
  flex: 1;
  text-align: center;
  font-size: 14px;
  color: var(--atlas-muted);
}
.admin-section .project-navigation button {
  min-height: 44px;
  white-space: nowrap;
}
.admin-section .project-navigation button:disabled {
  opacity: 1;
  color: var(--atlas-muted);
  background: var(--atlas-soft);
  border-color: var(--atlas-border);
}
@media (max-width: 480px) {
  .project-navigation {
    gap: 6px;
    padding: 8px;
  }
  .admin-section .project-navigation button {
    padding: 8px 10px;
  }
  .project-navigation #project-position {
    font-size: 13px;
  }
}

/* v3.7.0: understated direct-edit affordance with comfortable touch targets. */
.program {
  position: relative;
}
.program > div:last-child {
  padding-right: 40px;
}
.program > .edit-project {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: var(--atlas-muted);
  background: transparent;
  text-decoration: none;
  z-index: 1;
}
.edit-project svg {
  width: 17px;
  height: 17px;
}
.program > .edit-project:hover,
.program > .edit-project:focus-visible {
  background: var(--atlas-soft);
  color: var(--atlas-accent);
}
.edit-access-dialog {
  width: min(420px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid var(--atlas-border);
  border-radius: 12px;
  color: var(--atlas-text);
  background: var(--atlas-page);
  box-shadow: 0 16px 60px
    color-mix(in srgb, var(--atlas-text) 18.82%, transparent);
}
.edit-access-dialog::backdrop {
  background: color-mix(in srgb, var(--atlas-text) 33.33%, transparent);
}
.edit-access-dialog h2 {
  margin: 0 0 12px;
}
.edit-access-dialog p {
  font-size: 15px;
}
.edit-access-dialog label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}
.edit-access-dialog input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--atlas-edge);
  border-radius: 6px;
  padding: 10px;
  font: inherit;
}
.edit-access-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.edit-access-actions button {
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--atlas-edge);
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
  background: white;
  color: var(--atlas-text);
}
.edit-access-actions button[type="submit"] {
  background: var(--atlas-accent);
  color: white;
  border-color: var(--atlas-accent);
}
.edit-access-actions button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.edit-access-error {
  color: #a52d36;
  min-height: 1.5em;
}
@media (max-width: 740px) {
  .program > div:first-of-type {
    padding-right: 44px;
  }
  .program > div:last-child {
    padding-right: 0;
  }
  .program > .edit-project {
    width: 44px;
    height: 44px;
    right: 4px;
    top: 4px;
  }
}

/* v3.7.1: full-screen front/back card turn, centered on the visible viewport. */
html.screen-flipping,
html.editor-flip-pending {
  background: var(--atlas-soft);
  overflow-x: clip;
}
.screen-flipping body {
  backface-visibility: hidden;
  box-shadow: 0 0 45px color-mix(in srgb, var(--atlas-text) 15.69%, transparent);
  will-change: transform;
  min-height: 100vh;
}
@media (prefers-reduced-motion: reduce) {
  .editor-flip-pending body {
    visibility: visible;
  }
  .screen-flipping body {
    transform: none !important;
    filter: none !important;
  }
}

/* v3.8.0: configuration is visually separate from individual record editing. */
.atlas-configuration {
  border-top: 1px solid var(--atlas-border);
  margin-top: 32px;
  padding-top: 24px;
}
.atlas-configuration > p,
.atlas-configuration #config-motion-note {
  color: var(--atlas-muted);
  font-size: 14px;
}
.atlas-configuration form {
  max-width: 640px;
  background: var(--atlas-soft);
  border: 1px solid var(--atlas-border);
  border-radius: 10px;
  padding: 20px;
}
.config-duration-row {
  margin: 20px 0 8px;
}
.config-duration-row label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.config-duration-row output {
  font-weight: 400;
  color: var(--atlas-muted);
}
.admin-section #config-flip-duration {
  width: 100%;
  height: 44px;
  min-height: 44px;
  padding: 0;
  accent-color: var(--atlas-accent);
}
.config-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--atlas-muted);
}
#config-status:empty {
  display: none;
}
.atlas-configuration button[type="submit"] {
  background: var(--atlas-accent);
  color: white;
  border-color: var(--atlas-accent);
  min-height: 44px;
}
@media (max-width: 740px) {
  .atlas-configuration form {
    padding: 16px;
  }
}

/* v3.8.1: keep the incoming front face hidden until its turn begins. */
.atlas-flip-pending body {
  visibility: hidden;
}
html.atlas-flip-pending {
  background: var(--atlas-soft);
}
@media (prefers-reduced-motion: reduce) {
  .atlas-flip-pending body {
    visibility: visible;
  }
}

/* v3.9.0: bounded version timeline with one readable summary. */
.version-scroll {
  overflow: visible;
  padding: 4px 0 8px;
}
.version-timeline {
  margin: 0 28px;
  padding-bottom: 48px;
  min-width: 0 !important;
}
.admin-section .version-node {
  width: auto;
  max-width: 80px;
  min-width: 44px;
  padding: 12px 6px 4px;
  white-space: nowrap;
  font-size: 14px;
}
#selected-version-summary {
  padding: 12px 14px;
  background: var(--atlas-soft);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.6;
  margin: 8px 0 16px;
  overflow-wrap: anywhere;
}
#version-search-status {
  font-size: 13px;
  color: var(--atlas-muted);
  font-weight: 400;
  display: block;
  margin-top: 5px;
}
.version-navigation label {
  flex-basis: 280px;
}
.version-navigation input {
  margin-bottom: 8px;
}
.version-navigation select {
  max-width: 100%;
}
.version-navigation {
  align-items: center;
}
@media (max-width: 740px) {
  .version-navigation label {
    min-width: 0;
    width: 100%;
  }
  .version-navigation button {
    flex: 1 1 40%;
  }
  .version-timeline {
    margin: 0 26px;
  }
}

/* v4.0.0: emphasize the project name in the overview form. */
.admin-section #record-form input[name="name"] {
  font-weight: 700;
}
/* v4.0.0: file operations are distinct from record editing and site configuration. */
.atlas-transfers {
  border-top: 1px solid var(--atlas-border);
  margin-top: 32px;
  padding-top: 24px;
}
.atlas-transfers > p {
  color: var(--atlas-muted);
}
.transfer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 18px 0;
}
.transfer-card {
  min-width: 0;
  background: var(--atlas-soft);
  border: 1px solid var(--atlas-border);
  border-radius: 10px;
  padding: 20px;
}
.transfer-card h3,
.global-history h3 {
  margin: 0 0 10px;
  font-size: 17px;
}
.transfer-card p {
  font-size: 15px;
}
.transfer-help {
  font-size: 14px !important;
  line-height: 1.5;
  color: var(--atlas-muted);
}
.admin-section #import-workbook {
  max-width: 100%;
  height: auto;
  font-size: 14px;
  background: white;
}
.transfer-card button,
.atlas-transfers #apply-import {
  background: var(--atlas-accent);
  border-color: var(--atlas-accent);
  color: white;
  min-height: 44px;
}
.atlas-transfers button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
#transfer-status:empty {
  display: none;
}
#transfer-status {
  padding: 12px 14px;
  background: var(--atlas-soft);
  border-radius: 6px;
}
#import-preview {
  padding: 20px;
  border: 1px solid var(--atlas-border);
  border-radius: 10px;
  margin: 20px 0;
}
.import-rows {
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--atlas-border);
  border-radius: 8px;
  overscroll-behavior: contain;
}
.import-row {
  padding: 16px;
  border-bottom: 1px solid var(--atlas-border);
  overflow-wrap: anywhere;
}
.import-row:nth-child(even) {
  background: var(--atlas-soft);
}
.import-row:last-child {
  border-bottom: 0;
}
.import-row h4 {
  margin: 0 0 6px;
  font-size: 15px;
}
.import-row p {
  font-size: 14px;
  margin: 6px 0;
}
.import-row details {
  margin: 12px 0;
}
.import-row summary,
.global-history summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--atlas-accent);
}
.import-row-invalid {
  border-left: 4px solid #ad4033;
}
.import-stale {
  color: #875f1c;
}
.import-field-diff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  padding: 10px;
  margin: 8px 0;
  background: #fff9df;
  border-radius: 6px;
}
.import-field-diff h5 {
  grid-column: 1/-1;
  margin: 0;
  font-size: 14px;
}
.import-field-diff strong {
  display: block;
  color: var(--atlas-muted);
  font-size: 13px;
}
.import-field-diff span {
  white-space: pre-wrap;
}
.import-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.import-actions p {
  margin-right: auto;
}
.global-history {
  margin-top: 24px;
}
.global-history-entry {
  padding: 16px 0;
  border-bottom: 1px solid var(--atlas-border);
  overflow-wrap: anywhere;
}
.global-history-entry h4 {
  font-size: 15px;
  margin: 0 0 5px;
}
.global-history-entry p {
  margin: 6px 0;
}
.global-history-entry button {
  min-height: 44px;
}
.global-history-entry details p {
  font-size: 13px;
}
.transfer-confirm {
  max-width: 480px;
  width: calc(100% - 32px);
  padding: 24px;
  border: 1px solid var(--atlas-border);
  border-radius: 12px;
  color: var(--atlas-text);
  background: var(--atlas-page);
  box-shadow: 0 18px 50px
    color-mix(in srgb, var(--atlas-text) 18.82%, transparent);
}
.transfer-confirm::backdrop {
  background: color-mix(in srgb, var(--atlas-text) 40%, transparent);
}
.transfer-confirm h3 {
  margin-top: 0;
}
.transfer-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.transfer-confirm button {
  min-height: 44px;
}
#transfer-confirm-yes {
  background: var(--atlas-accent);
  color: white;
}
#global-history-more {
  margin-top: 14px;
}
@media (max-width: 740px) {
  .transfer-grid {
    grid-template-columns: 1fr;
  }
  .transfer-card,
  #import-preview {
    padding: 16px;
  }
  .import-field-diff {
    grid-template-columns: 1fr;
  }
  .import-actions {
    align-items: stretch;
  }
  .import-actions p {
    width: 100%;
    margin: 0;
  }
  .import-actions button {
    flex: 1;
  }
  .import-rows {
    max-height: 65vh;
  }
  .transfer-confirm-actions button {
    flex: 1;
  }
}

/* v4.2.0: three-project evidence panels with palette-matched alternating rows. */
.evidence-scroll {
  max-height: var(--three-project-height, 1500px);
  overflow-y: auto;
  scrollbar-gutter: stable;
  border: 1px solid var(--atlas-soft);
  border-radius: 8px;
  scroll-padding-top: 12px;
}
.evidence-scroll > .program {
  background-color: var(--atlas-page);
  margin: 0;
}
.evidence-scroll > .program.evidence-alternate {
  background-color: var(--atlas-soft);
}
.evidence-scroll > .program.selected-profile,
.evidence-scroll > .program.search-first,
.evidence-scroll > .program:target {
  background-color: var(--atlas-highlight);
  box-shadow: inset 3px 0 0 var(--atlas-edge);
}
.evidence-scroll:focus-visible {
  outline: 2px solid var(--atlas-edge);
  outline-offset: 3px;
}
.evidence-scroll-hint {
  font-size: 13px;
  color: var(--atlas-muted);
  margin: 10px 0;
}
.evidence-scroll > .program {
  scroll-margin-top: 12px;
}
@media (max-width: 740px) {
  .evidence-scroll {
    max-height: min(var(--three-project-height, 1500px), 80svh);
  }
}

/* Palette choice cards retain a labelled native radio for keyboard and touch access. */
.palette-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.admin-section .palette-option {
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--atlas-border);
  border-radius: 9px;
  background: white;
  cursor: pointer;
  min-height: 124px;
}
.admin-section .palette-option:has(input:checked) {
  border: 2px solid var(--atlas-accent);
  padding: 13px;
  box-shadow: 0 0 0 2px var(--atlas-highlight);
}
.admin-section .palette-option input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 3px 0;
  accent-color: var(--atlas-accent);
}
.palette-option small,
.palette-swatches {
  grid-column: 2;
}
.palette-option small {
  font-weight: 400;
  color: var(--atlas-muted);
  line-height: 1.4;
}
.palette-swatches {
  display: flex;
  gap: 5px;
}
.palette-swatches i {
  display: block;
  width: 24px;
  height: 20px;
  border: 1px solid #8888;
  border-radius: 4px;
}
.palette-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.palette-note {
  font-size: 14px;
  color: var(--atlas-muted);
}
.brand-icon g {
  fill: var(--atlas-accent);
}
input,
select,
textarea {
  accent-color: var(--atlas-accent);
}
:is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not(
    [type="range"]
  ) {
  border-color: var(--atlas-edge);
}

/* Keep the sea neutral while country and interaction colours follow the chosen palette. */
#country-base {
  background: #edf0f2;
}

/* v4.4.0: compact phone cards, state-preserving views, and persistent editor actions. */
.mobile-view-switch,
.mobile-project-summary,
.project-expand {
  display: none;
}
.admin-section-nav {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0;
  background: var(--atlas-page);
  border-bottom: 1px solid var(--atlas-border);
  margin-bottom: 16px;
}
.admin-section-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  text-decoration: none;
  border-radius: 6px;
  background: var(--atlas-soft);
  color: var(--atlas-accent);
  font-size: 14px;
  font-weight: 600;
}
#project-editor-top,
#record-history,
#file-transfers,
#atlas-configuration {
  scroll-margin-top: 82px;
}
.management-page {
  padding-bottom: 145px;
}
.admin-section .admin-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  margin: 0;
  padding: 12px max(24px, calc((100vw - 1344px) / 2))
    calc(12px + env(safe-area-inset-bottom));
  background: var(--atlas-page);
  border-top: 1px solid var(--atlas-border);
  box-shadow: 0 -5px 20px #0000000b;
  align-items: center;
}
.admin-actions #draft-status {
  font-size: 14px;
  color: var(--atlas-text);
  margin-right: auto;
}
.admin-section .admin-actions #admin-delete {
  margin-left: 16px;
}
.admin-actions #edit-action-message {
  order: 5;
  max-height: 3em;
  overflow: auto;
}
.admin-actions button {
  min-height: 44px;
}
#record-form :is(input, textarea, select) {
  scroll-margin-bottom: 160px;
  scroll-margin-top: 88px;
}
@media (max-width: 740px) {
  .mobile-view-switch {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 20;
    gap: 6px;
    padding: 10px 0;
    background: var(--atlas-page);
    scroll-margin-top: 0;
  }
  .mobile-view-switch button {
    flex: 1;
    min-height: 44px;
    border: 1px solid var(--atlas-edge);
    border-radius: 7px;
    background: white;
    color: var(--atlas-accent);
    font: inherit;
    font-weight: 600;
  }
  .mobile-view-switch button[aria-pressed="true"] {
    background: var(--atlas-accent);
    color: white;
  }
  body[data-mobile-view="map"] .directory {
    display: none;
  }
  body[data-mobile-view="list"] #map-overview,
  body[data-mobile-view="list"] .map-reading-notes {
    display: none;
  }
  .mobile-project-summary {
    display: block;
    font-size: 15px !important;
    margin-top: 12px !important;
  }
  .project-expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 14px;
    background: white;
    border: 1px solid var(--atlas-edge);
    border-radius: 6px;
    color: var(--atlas-accent);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
  }
  .program:not(.project-expanded) > .program-extra {
    display: none;
  }
  .program:not(.project-expanded) .geo {
    display: none;
  }
  .program:not(.project-expanded) .mobile-project-summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }
  .evidence-scroll {
    max-height: none;
    overflow: visible;
    scrollbar-gutter: auto;
  }
  .program {
    scroll-margin-top: 78px !important;
  }
  .admin-section-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 8px 0;
  }
  .admin-section-nav a {
    padding: 8px;
    font-size: 13px;
    justify-content: center;
  }
  #project-editor-top,
  #record-history,
  #file-transfers,
  #atlas-configuration {
    scroll-margin-top: 112px;
  }
  .admin-section .admin-actions {
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    gap: 8px;
  }
  .admin-actions #draft-status {
    width: 100%;
    font-size: 13px;
  }
  .admin-section .admin-actions #admin-delete {
    margin-left: auto;
  }
  .admin-section .admin-actions button {
    padding: 8px 12px;
    font-size: 14px !important;
  }
  .management-page {
    padding-bottom: 185px;
  }
  #record-form :is(input, textarea, select) {
    scroll-margin-top: 118px;
    scroll-margin-bottom: 180px;
  }
}

/* v4.4.1: compact three-result maximum at every size; expand guidance belongs to mobile. */
.project-search {
  margin-top: 24px;
}
.mobile-expand-hint {
  display: none;
}
.evidence-scroll {
  max-height: min(var(--three-project-height, 1200px), 72svh);
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.evidence-scroll > .program {
  outline: 1px solid transparent;
  outline-offset: -2px;
}
.evidence-scroll > .program:focus-within {
  outline-color: color-mix(in srgb, var(--atlas-edge) 45%, transparent);
}
@media (hover: hover) {
  .evidence-scroll > .program:hover {
    outline-color: color-mix(in srgb, var(--atlas-edge) 35%, transparent);
  }
}
@media (max-width: 740px) {
  .mobile-expand-hint {
    display: inline;
  }
  .project-search {
    margin-top: 18px;
  }
  .evidence-scroll > .program {
    scroll-margin-top: 12px !important;
  }
}

/* v4.5.0: lightweight aggregate analytics and external-link paperclips. */
.external-paperclip {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
  margin-left: 5px;
  flex-shrink: 0;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.atlas-analytics {
  margin: 28px 0;
  padding-top: 24px;
  border-top: 1px solid var(--atlas-border);
  scroll-margin-top: 100px;
}
.analytics-help {
  font-size: 13px;
  color: var(--atlas-muted);
  max-width: 95ch;
}
.analytics-toolbar {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin: 20px 0;
}
.analytics-toolbar label {
  flex: 1;
  min-width: 150px;
}
.analytics-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.analytics-cards > div {
  background: var(--atlas-soft);
  padding: 18px;
  border: 1px solid var(--atlas-border);
  border-radius: 8px;
}
.analytics-cards strong {
  display: block;
  font-size: 28px;
  line-height: 1.3;
}
.analytics-cards span {
  font-size: 13px;
  color: var(--atlas-muted);
}
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0;
}
.analytics-breakdown {
  display: block;
  width: 100%;
  text-align: left;
  margin: 7px 0;
  background: linear-gradient(
    to right,
    var(--atlas-highlight) var(--share),
    white var(--share)
  ) !important;
}
.analytics-project {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 12px;
  border-bottom: 1px solid var(--atlas-border);
  font-size: 14px;
}
.analytics-project:nth-child(even) {
  background: var(--atlas-soft);
}
.analytics-project span {
  color: var(--atlas-muted);
}
.analytics-project p {
  margin: 0;
  flex-basis: 100%;
}
.analytics-bars {
  display: flex;
  align-items: end;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
}
.analytics-day {
  flex: 1;
  min-width: 38px;
  text-align: center;
}
.analytics-day small {
  font-size: 11px;
}
.analytics-stack {
  height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  max-width: 36px;
  margin: auto;
}
.analytics-stack span {
  display: block;
}
.analytics-bar-desktop {
  background: var(--atlas-accent);
}
.analytics-bar-mobile {
  background: var(--atlas-edge);
}
.analytics-bar-other {
  background: var(--atlas-border);
}
.analytics-empty {
  padding: 24px;
  background: var(--atlas-soft);
  border-radius: 8px;
}
.atlas-analytics summary {
  min-height: 44px;
  padding: 12px 0;
  cursor: pointer;
}
@media (max-width: 740px) {
  .analytics-cards {
    grid-template-columns: 1fr 1fr;
  }
  .analytics-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .analytics-toolbar {
    align-items: stretch;
  }
  .analytics-toolbar label {
    flex-basis: 100%;
  }
  .atlas-analytics {
    scroll-margin-top: 160px;
  }
  .admin-section-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .admin-section-nav a {
    font-size: 12px;
    padding: 6px;
  }
}

/* v4.5.0: compact responsive history; keep 44px targets and readable labels. */
.version-timeline {
  margin: 0 24px;
  padding-bottom: 44px;
}
.admin-section .version-node {
  min-width: 44px;
  min-height: 44px;
  padding: 10px 4px 4px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  max-width: none;
}
#selected-version-summary {
  padding: 8px 12px;
  margin: 4px 0 12px;
  line-height: 1.45;
}
.version-navigation {
  gap: 8px;
}
.version-navigation label {
  flex: 1 1 220px;
}
.version-navigation input {
  margin-bottom: 4px;
}
@media (max-width: 740px) {
  .version-timeline {
    margin: 0 22px;
  }
  .version-navigation {
    gap: 6px;
  }
  .version-navigation button {
    flex: 1 1 auto;
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* v4.6.0 — accessible record-level source language switching. */
.record-language {
  margin: 0.75rem 0;
}
.language-toggle {
  font: inherit;
  font-size: 0.875rem;
  min-height: 44px;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--atlas-border, #cbdde5);
  border-radius: 8px;
  background: var(--atlas-soft, #edf5f9);
  color: var(--atlas-ink, #17313e);
  cursor: pointer;
  text-align: left;
}
.language-toggle:focus-visible {
  outline: 2px solid #4282a4;
  outline-offset: 3px;
}
.original-evidence {
  margin-top: 0.65rem;
  overflow-wrap: anywhere;
}
.language-caption {
  font-size: 0.8rem;
  color: #526975;
}
.original-evidence[hidden],
.english-evidence[hidden] {
  display: none !important;
}

/* v4.7.1: selection consistently quiets other fixed-position markers. */
#markers .marker {
  transition: opacity 0.18s ease;
}
#markers:has(.marker.selected) .marker:not(.selected) {
  opacity: 0.45;
}
#markers .marker.selected,
#markers .marker:focus-visible {
  opacity: 1;
}
@media (hover: hover) {
  #markers .marker:hover {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  #markers .marker {
    transition: none;
  }
}

#markers.has-selection .marker:not(.selected) {
  opacity: 0.45;
}
#markers.has-selection .marker.selected {
  opacity: 1;
}

/* v4.8.1: empty searches have a clear standalone callout; word highlights stay blue in every palette. */
/* v4.8.2: compact continent summaries and touch/keyboard map navigation. */
#detail .continent-total {
  font-size: 14px;
  line-height: 1.6;
}
.continent-summary-row {
  padding: 14px 0;
  border-top: 1px solid var(--atlas-border);
  overflow-wrap: anywhere;
}
.continent-summary-row > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
#detail .continent-summary-row h3 {
  margin: 0;
  font-size: 16px;
}
.continent-summary-row span {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--atlas-accent);
  font-weight: 600;
}
#detail .continent-summary-row p {
  font-size: 14px;
  line-height: 1.6;
  margin: 6px 0 0;
}
/* v4.8.5: center every wrapped row within the visible map column. */
.continent-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 12px 0;
  padding-inline: 12px;
}
.continent-controls button {
  font: inherit;
  font-size: 14px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--atlas-border);
  border-radius: 6px;
  color: var(--atlas-text);
  background: var(--atlas-page);
  cursor: pointer;
}
.continent-controls button[aria-pressed="true"] {
  background: var(--atlas-highlight);
  border-color: var(--atlas-accent);
}
.continent-controls button:focus-visible {
  outline: 2px solid var(--atlas-accent);
  outline-offset: 2px;
}
#markers .marker.continent-hidden {
  visibility: hidden;
  pointer-events: none;
}
#search-status.search-empty {
  flex: 1 0 100%;
  box-sizing: border-box;
  padding: 18px 20px;
  margin: 14px 0 4px;
  border: 1px solid var(--atlas-edge);
  border-left: 4px solid var(--atlas-accent);
  border-radius: 8px;
  background: var(--atlas-highlight);
  color: var(--atlas-text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.batch-comment {
  padding: 12px 14px;
  background: var(--atlas-soft);
  border: 1px solid var(--atlas-border);
  border-radius: 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
}
#import-comment {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 88px;
  resize: vertical;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--atlas-edge);
  border-radius: 6px;
  background: var(--atlas-page);
  color: var(--atlas-text);
}
@media (max-width: 740px) {
  #search-status.search-empty {
    padding: 16px;
  }
}

/* v4.8.4: dated evidence follow-up stays separate from reported outcomes. */
.project-follow-up {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--atlas-accent);
  background: var(--atlas-soft);
  border-radius: 0 6px 6px 0;
}
.project-follow-up p:last-child {
  margin-bottom: 0;
}

/* v4.8.6: consolidate reference notes without duplicate headings or oversized gaps. */
.references {
  margin: 24px 0 32px;
  border-top: 1px solid var(--atlas-border);
  padding-top: 20px;
}
.references > h2 {
  margin: 0 0 12px;
  font-size: 20px;
}
.reference-list {
  border: 1px solid var(--atlas-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--atlas-page);
}
.reference-item + .reference-item {
  border-top: 1px solid var(--atlas-border);
}
.reference-item > summary {
  cursor: pointer;
  min-height: 48px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--atlas-text);
  list-style-position: inside;
}
.reference-item > summary:hover,
.reference-item[open] > summary {
  background: var(--atlas-soft);
}
.reference-item > summary:focus-visible {
  outline-offset: -3px;
}
.reference-content {
  padding: 0 16px 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.reference-content > p:first-child {
  margin-top: 12px;
}
.reference-content > :last-child {
  margin-bottom: 0;
}
.reference-content ul {
  padding-left: 22px;
}
.reference-content li + li {
  margin-top: 8px;
}
@media (max-width: 740px) {
  .references {
    margin: 20px 0 24px;
    padding-top: 16px;
  }
  .reference-item > summary {
    padding-inline: 12px;
  }
  .reference-content {
    padding-inline: 12px;
  }
}

/* v4.8.10: outcome and follow-up editing share one responsive row. */
.outcome-follow-up-fields {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.outcome-follow-up-fields > label {
  min-width: 0;
}
.outcome-partners-field {
  grid-column: 1/-1;
}

/* v4.8.13: accessible reference shortcut outside the project list scroller. */
.directory > .section-heading {
  flex-wrap: wrap;
  gap: 8px 16px;
}
.references-jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--atlas-border);
  border-radius: 7px;
  color: var(--atlas-accent);
  background: var(--atlas-page);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.references-jump:hover {
  background: var(--atlas-soft);
}
#references-title {
  scroll-margin-top: 24px;
}

/* v4.9.0: concise cards, explicit context, and compact mobile navigation. */
.search-tips {
  font-size: 14px;
  color: var(--atlas-muted);
  max-width: 75ch;
  margin: 0 0 8px;
}
.search-tips summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  width: fit-content;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.search-tips p {
  margin: 0 0 12px;
}
.selection-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--atlas-text);
  border-top: 1px solid var(--atlas-border);
}
.selection-context button {
  font: inherit;
  font-weight: 600;
  color: var(--atlas-accent);
  background: var(--atlas-page);
  border: 1px solid var(--atlas-border);
  border-radius: 6px;
  min-height: 44px;
  padding: 8px 12px;
  cursor: pointer;
}
.program:not(.project-expanded) > .program-extra {
  display: none;
}
.program:not(.project-expanded) {
  grid-template-columns: 1fr;
}
.program .mobile-project-summary {
  display: block;
  max-width: 85ch;
  margin: 12px 0;
  font-size: 15px;
}
.program:not(.project-expanded) .mobile-project-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.project-expand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--atlas-border);
  border-radius: 6px;
  background: var(--atlas-page);
  color: var(--atlas-accent);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.program.project-expanded .mobile-project-summary {
  display: none;
}
.more-projects-hint {
  font-size: 13px;
  color: var(--atlas-muted);
  text-align: center;
  margin: 0;
  padding: 10px;
  background: linear-gradient(to bottom, transparent, var(--atlas-soft));
  border-radius: 0 0 8px 8px;
}
.more-projects-hint[hidden] {
  display: none;
}
.has-more-projects .evidence-scroll {
  border-bottom-color: var(--atlas-border);
  box-shadow: inset 0 -12px 12px -14px var(--atlas-muted);
}
#references-title {
  scroll-margin-top: 84px;
}
.tooltip-close {
  display: block;
  margin: 0 0 8px auto;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid currentColor;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
@media (max-width: 740px) {
  #map {
    min-width: 900px;
  }
  .continent-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 0 12px;
  }
  .continent-controls button {
    width: 100%;
    min-height: 44px;
  }
  .selection-context {
    font-size: 13px;
  }
  .program:not(.project-expanded) .geo {
    display: block;
  }
  .directory > .section-heading {
    align-items: flex-start;
  }
  .directory > .section-heading h2 {
    font-size: 25px;
  }
  .references-jump {
    font-size: 13px;
  }
  .program .evidence-meta {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* v4.9.3: let the overview fit its content without a nested scrolling area. */
#detail {
  height: auto;
  max-height: none;
  overflow: visible;
  align-self: start;
}
#detail .sidebar-count {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px;
}
.sidebar-evidence-types {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  font-size: 14px;
}
.sidebar-evidence-types li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--atlas-border);
}
#detail .detail-block > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
/* v4.9.5: one complete evidence row, no faces, fixed height or nested card scroll. */
.evidence-scroll {
  padding: 8px;
  background: var(--atlas-soft);
  border-color: var(--atlas-border);
}
.evidence-scroll > .program {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  padding: 22px 20px 18px;
  margin: 0 0 8px;
  height: auto;
  max-height: none;
  overflow: visible;
  border: 1px solid var(--atlas-border);
  border-radius: 10px;
  box-shadow: 0 2px 5px color-mix(in srgb, var(--atlas-text) 4%, transparent);
}
.evidence-scroll > .program:last-child {
  margin-bottom: 0;
}
.evidence-scroll > .program > div {
  padding: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.evidence-scroll > .program > div:first-of-type {
  padding-right: 0;
}
.evidence-scroll > .program > div:last-child {
  padding-right: 22px;
}
.evidence-scroll > .program:not(.project-expanded) > .program-extra {
  display: block;
}
.evidence-scroll > .program:not(.project-expanded) .geo {
  display: block;
}
.evidence-scroll > .program h3 {
  margin: 8px 0 6px;
  font-size: 18px;
  line-height: 1.4;
}
.evidence-scroll > .program p {
  margin-bottom: 8px;
  line-height: 1.6;
}
.evidence-scroll > .program .label {
  margin: 0 0 10px;
}
@media (max-width: 900px) {
  .evidence-scroll > .program {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: 18px;
  }
  .evidence-scroll > .program > div:last-child {
    grid-column: 2;
  }
}
@media (max-width: 740px) {
  .evidence-scroll > .program {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 20px 16px 16px;
  }
  .evidence-scroll > .program > div:last-child {
    grid-column: auto;
    padding-right: 0;
  }
  .evidence-scroll > .program > div:first-of-type {
    padding-right: 22px;
  }
  .evidence-scroll > .program > .program-extra {
    border-top: 1px solid var(--atlas-border);
    padding-top: 14px;
  }
}
.evidence-scroll > .program .back-to-map {
  margin: 10px 0 8px;
}

/* v4.9.8: aligned column tops and a quiet shared row footer. */
.evidence-scroll > .program h3 {
  margin: 0 0 10px;
  line-height: 1.35;
}
.evidence-scroll > .program > div:nth-of-type(3) {
  padding-right: 22px;
}
.evidence-scroll > .program > .project-row-footer {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid var(--atlas-border);
  background: transparent;
  min-width: 0;
}
.project-row-meta {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
  color: var(--atlas-muted);
  font-size: 13px;
}
.project-row-meta .record-number {
  margin: 0;
  font-weight: 600;
}
.project-subset-size {
  font-size: 13px;
  color: var(--atlas-muted);
}
.evidence-scroll > .program .back-to-map {
  display: inline-flex;
  flex-shrink: 0;
  margin: 0;
  min-height: 44px;
  font-size: 13px;
}
@media (max-width: 900px) and (min-width: 741px) {
  .evidence-scroll > .program > div:nth-of-type(3) {
    grid-column: 2;
  }
}
@media (max-width: 740px) {
  .evidence-scroll > .program > div:nth-of-type(3) {
    padding-right: 0;
  }
  .project-row-meta {
    display: grid;
    gap: 3px;
  }
  .evidence-scroll > .program > .project-row-footer {
    gap: 8px;
  }
}

.evidence-scroll > .program > div:first-of-type {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  align-items: flex-start;
}
.project-evidence-status {
  margin: 0 0 10px;
  padding: 0;
}
.project-evidence-status .badge {
  margin-bottom: 0;
}

/* v4.9.9: subset position belongs with project identification in the footer. */
.project-row-meta .result-number {
  position: static;
  display: inline-block;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  padding: 2px 8px;
  font-variant-numeric: tabular-nums;
}

/* v4.9.11: related card actions share a compact, touch-friendly footer. */
.project-footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}
.project-footer-share {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.project-footer-links .share-project {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  font-size: 13px;
}
.project-footer-divider {
  width: 1px;
  height: 16px;
  background: var(--atlas-border);
  flex: none;
  margin: 0;
}
.project-footer-links .share-feedback:empty {
  display: none;
}
.project-footer-links .share-feedback {
  margin: 0;
  font-size: 12px;
}
@media (max-width: 740px) {
  .evidence-scroll > .program > .project-row-footer {
    flex-wrap: wrap;
  }
  .project-footer-links {
    margin-left: auto;
    gap: 10px;
  }
  .project-footer-links .share-project {
    white-space: nowrap;
  }
}
/* v4.9.11: square project surfaces; quiet neighbouring selections on hover. */
.evidence-scroll,
.evidence-scroll > .program {
  border-radius: 0;
}
.evidence-scroll > .program {
  transition:
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}
@media (hover: hover) {
  .evidence-scroll:has(> .program:hover)
    > .program.selected-profile:not(:hover):not(:focus-within) {
    background-color: color-mix(
      in srgb,
      var(--atlas-highlight) 22%,
      var(--atlas-page)
    );
    box-shadow: 0 2px 5px color-mix(in srgb, var(--atlas-text) 4%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .evidence-scroll > .program {
    transition: none;
  }
}

/* v4.9.12: edit control sits alongside the stable project identifier. */
.project-row-meta .edit-project {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--atlas-muted);
  text-decoration: none;
  background: transparent;
  flex: none;
}
.project-row-meta .edit-project:hover,
.project-row-meta .edit-project:focus-visible {
  background: var(--atlas-soft);
  color: var(--atlas-accent);
}
.project-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* v4.9.13: compact explanations for otherwise invisible full-text matches. */
.search-match-context {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--atlas-border);
  background: var(--atlas-soft);
  font-size: 14px;
}
.search-match-context strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--atlas-muted);
  margin-bottom: 4px;
}
.evidence-scroll > .program .search-match-context p {
  margin: 0;
  font-size: 14px;
}

/* v4.9.15: one quiet references link at the right of each results heading. */
.directory > .section-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.references-jump {
  margin-left: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 4px 0;
  font-weight: 400;
  min-height: 44px;
}
.references-jump:hover {
  background: transparent;
  text-decoration: underline;
}

/* v4.9.16: muted record position and a labelled edit action in the right footer. */
.project-row-meta .record-number,
.project-row-meta .result-number {
  color: var(--atlas-muted);
  font-weight: 400;
  font-size: 13px;
  background: transparent;
  padding: 0;
  margin: 0;
}
.project-row-meta {
  gap: 5px;
}
.project-footer-links .edit-project {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--atlas-muted);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.project-footer-links .edit-project:hover {
  color: var(--atlas-accent);
  text-decoration: underline;
}
@media (max-width: 740px) {
  .project-footer-links {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    margin-left: 0;
    gap: 4px 8px;
  }
  .project-footer-links .edit-project,
  .project-footer-links .share-project,
  .evidence-scroll > .program .back-to-map {
    font-size: 12px;
  }
}

/* v4.9.17: References shares the results heading typography. */
.directory > .section-heading .references-jump {
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--atlas-text);
  text-transform: none;
  letter-spacing: normal;
}
@media (max-width: 740px) {
  .directory > .section-heading .references-jump {
    font-size: 25px;
  }
}
.references > #references-title {
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--atlas-text);
  text-transform: none;
  letter-spacing: normal;
}
@media (max-width: 740px) {
  .references > #references-title {
    font-size: 25px;
  }
}

/* v4.9.18: quieter References disclosure headings. */
.references .reference-item > summary {
  font-weight: 400;
}

/* v4.9.19: expandable help anchored below the search field's right edge. */
.search-guidance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: start;
}
.search-guidance #search-help {
  margin: 10px 0;
}
.search-guidance .search-tips {
  justify-self: end;
  text-align: right;
  margin: 0;
  max-width: min(440px, 65vw);
}
.search-guidance .search-tips summary {
  margin-left: auto;
  gap: 7px;
  text-decoration: none;
}
.search-guidance .search-tips summary::-webkit-details-marker {
  display: none;
}
.search-guidance .search-tips p {
  text-align: left;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--atlas-soft);
  border: 1px solid var(--atlas-border);
}
.search-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  font-family: Georgia, serif;
  flex: none;
}
@media (max-width: 480px) {
  .search-guidance {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
  }
  .search-guidance .search-tips[open] {
    grid-column: 1/-1;
    max-width: 100%;
    width: 100%;
  }
}

/* v4.9.20: announce result counts to assistive technology without redundant visible text. */
#search-status:not(.search-empty) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* v4.10.0: clearer navigation, quiet selection and natural mobile reading. */
.mobile-search-shortcut {
  display: none;
}
.directory > .section-heading .references-jump {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: var(--atlas-border);
}
.directory > .section-heading .references-jump:hover {
  text-decoration-color: currentColor;
}
.evidence-scroll > .program.selected-profile,
.evidence-scroll > .program.search-first,
.evidence-scroll > .program:target {
  background-color: color-mix(
    in srgb,
    var(--atlas-highlight) 38%,
    var(--atlas-page)
  );
  box-shadow: inset 3px 0 0 var(--atlas-edge);
}
@media (max-width: 740px) {
  .mobile-search-shortcut {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 8px;
    font-size: 14px;
  }
  .evidence-scroll {
    max-height: none !important;
    overflow: visible;
    scrollbar-gutter: auto;
  }
  .project-footer-links .edit-project,
  .project-footer-links .share-project,
  .evidence-scroll > .program .back-to-map {
    font-size: 14px;
    min-height: 44px;
  }
  .project-footer-links {
    gap: 4px 12px;
  }
}

/* v4.10.1: consistent section headings and no redundant map count. */
.selection-context:empty {
  display: none;
}
.map-top h2,
.project-search > label {
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--atlas-text);
  text-transform: none;
  letter-spacing: normal;
}
@media (max-width: 740px) {
  .map-top h2,
  .project-search > label {
    font-size: 25px;
  }
}
/* v4.10.2: profile actions size to their labels without losing touch height. */
#tooltip .tooltip-profile {
  width: fit-content;
  max-width: 100%;
  align-self: flex-start;
  justify-self: start;
  flex-grow: 0;
}

/* v4.10.3: compact desktop search and adjacent inline help. */
.search-guidance {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0 7px;
}
.search-guidance .search-tips {
  margin: 0;
  text-align: left;
  max-width: 440px;
}
.search-guidance .search-tips summary {
  margin-left: 0;
  gap: 7px;
}
.search-guidance .search-tips p {
  max-width: 100%;
}
@media (min-width: 741px) {
  .search-controls {
    width: 50%;
    min-width: min(440px, 100%);
  }
}
@media (max-width: 740px) {
  .search-controls {
    width: 100%;
    min-width: 0;
  }
  .search-guidance .search-tips[open] {
    width: auto;
    max-width: 100%;
  }
}

/* v4.10.4: subtle individual emphasis for map preview cards. */
#tooltip .tooltip-entry {
  transition:
    background-color 0.16s ease,
    box-shadow 0.16s ease;
}
@media (hover: hover) {
  #tooltip .tooltip-entry:hover {
    background-color: color-mix(
      in srgb,
      var(--atlas-highlight) 40%,
      var(--atlas-page)
    );
    box-shadow: inset 0 0 0 1px
      color-mix(in srgb, var(--atlas-edge) 35%, transparent);
  }
}
#tooltip .tooltip-entry:focus-within {
  background-color: color-mix(
    in srgb,
    var(--atlas-highlight) 40%,
    var(--atlas-page)
  );
  box-shadow: inset 0 0 0 1px
    color-mix(in srgb, var(--atlas-edge) 35%, transparent);
}
@media (prefers-reduced-motion: reduce) {
  #tooltip .tooltip-entry {
    transition: none;
  }
}

.preview-study-details {
  display: grid;
  gap: 4px;
  margin: 8px 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--atlas-muted);
}
.preview-study-details strong {
  font-size: inherit;
  font-weight: 600;
}

/* v4.10.5: dedicated dark-surface colours stay readable in every site palette. */
#tooltip {
  background: #24343d;
  color: #f5f8fa;
}
#tooltip .tooltip-entry {
  background: #293b45;
  color: #f5f8fa;
}
#tooltip .tooltip-entry:nth-child(even) {
  background: #2d404a;
}
#tooltip .tooltip-entry small,
#tooltip .preview-study-details,
#tooltip .preview-study-details strong {
  color: #dce7ee;
}
#tooltip .tooltip-entry-title,
#tooltip > strong {
  color: #f5f8fa;
}
@media (hover: hover) {
  #tooltip .tooltip-entry:hover {
    background: #344853;
    box-shadow: inset 0 0 0 1px #809ba9;
  }
}
#tooltip .tooltip-entry:focus-within {
  background: #344853;
  box-shadow: inset 0 0 0 1px #809ba9;
}
#tooltip .tooltip-profile,
#tooltip .tooltip-close {
  color: #f5f8fa;
  border-color: #809ba9;
  background: transparent;
}
#tooltip .tooltip-profile:hover,
#tooltip .tooltip-profile:focus-visible,
#tooltip .tooltip-close:hover {
  background: #405967;
  color: #fff;
}
#tooltip a:focus-visible,
#tooltip button:focus-visible {
  outline: 2px solid #b9dff5;
  outline-offset: 3px;
}

/* v4.10.6: quiet rules separate the primary reading sections. */
main > .intro {
  border-bottom: 1px solid
    color-mix(in srgb, var(--atlas-border) 65%, transparent);
  margin-bottom: 24px;
}
main > .project-search {
  border-top: 1px solid color-mix(in srgb, var(--atlas-border) 65%, transparent);
  padding-top: 24px;
}
main > .directory {
  border-top: 0;
  padding-top: 20px;
}
@media (max-width: 740px) {
  main > .intro {
    margin-bottom: 18px;
  }
  main > .project-search {
    padding-top: 18px;
  }
  main > .directory {
    padding-top: 16px;
  }
}

/* v4.10.7: draft URL testing preserves existing field height. */
.url-test-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}
.admin-section .url-test-row input {
  flex: 1;
  min-width: 0;
  width: 0;
  margin: 0;
}
.admin-section .url-test-row .test-url {
  flex: none;
  min-height: 44px;
  margin: 0;
  white-space: nowrap;
  font-size: 13px;
  padding: 8px 10px;
}
.url-test-message {
  display: block;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  margin-top: 4px;
  color: var(--atlas-muted);
}
.url-test-message:empty {
  display: none;
}

/* v4.10.8: unmatched markers are removed from pointer and keyboard navigation. */
#markers .marker[hidden] {
  display: none !important;
}

/* v4.10.9: unchanged drafts have a clearly inactive, neutral save action. */
#admin #record-form button[type="submit"]:disabled,
#admin .review-save:disabled {
  background: #e4e7e9 !important;
  color: #687178 !important;
  border-color: #d5dade !important;
  box-shadow: none;
  opacity: 1;
  cursor: not-allowed;
}
#record-form[hidden],
#record-history[hidden] {
  display: none !important;
}

/* v4.13.2: compact QMD status; colour plus a slash distinguishes fallback. */
.search-cloud-divider {
  color: var(--atlas-muted);
  opacity: 0.65;
  font-size: 14px;
}
.qmd-cloud {
  display: inline-flex;
  align-items: center;
  color: #899590;
  vertical-align: middle;
}
.qmd-cloud.is-connected {
  color: #238451;
}
.qmd-cloud.is-connected svg {
  fill: #def2e6;
  stroke-width: 2;
}
.qmd-cloud.is-connected .cloud-slash {
  display: none;
}
.search-guidance .qmd-cloud {
  align-self: center;
}

/* v4.13.8: keep count and heading text on a shared baseline. */
.directory > .section-heading h2 {
  font-variant-numeric: lining-nums;
}

.qmd-cloud[hidden],
.search-cloud-divider[hidden] {
  display: none;
}

/* v4.13.12: configuration groups separate behavior from palette choices. */
#config-form .configuration-group {
  min-width: 0;
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid var(--atlas-border);
}
#config-form .configuration-group legend {
  padding: 0 7px;
  font-size: 16px;
  font-weight: 600;
}
#config-form .configuration-group p {
  font-size: 14px;
  color: var(--atlas-muted);
  line-height: 1.55;
}

/* v4.13.20: stable shared footer; scoped to avoid altering project-card footers. */
body > footer {
  position: static;
  display: grid;
  grid-template-columns: minmax(110px, 0.55fr) minmax(0, 1.8fr) minmax(0, 1fr);
  align-items: start;
  gap: 20px 32px;
  width: 100%;
  padding: 24px 48px;
  margin: 32px auto 0;
  background: color-mix(in srgb, var(--atlas-soft) 90%, var(--atlas-text));
  border-top: 1px solid var(--atlas-border);
  color: var(--atlas-text);
  line-height: 1.6;
}
body > footer > * {
  min-width: 0;
  overflow-wrap: anywhere;
}
body > footer > span {
  margin: 0;
}
body > footer > span:last-child {
  text-align: right;
}
body > footer small {
  display: block;
  font-size: 12px;
  margin-top: 4px;
}
body > footer .site-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
}
body > footer .site-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--atlas-text);
}
@media (max-width: 900px) {
  body > footer {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 24px;
    gap: 12px 24px;
  }
  body > footer .site-navigation {
    grid-column: 1/-1;
  }
}
@media (max-width: 600px) {
  body > footer {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px max(24px, env(safe-area-inset-right))
      calc(20px + env(safe-area-inset-bottom))
      max(24px, env(safe-area-inset-left));
    gap: 12px;
  }
  body > footer > span:last-child {
    text-align: left;
  }
}

/* Search vocabulary preview: compact desktop rows, stacked mobile fields. */
.thesaurus-editor {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--atlas-border);
}
.thesaurus-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.5fr auto auto;
  gap: 12px;
  align-items: end;
  padding: 12px 0;
  border-bottom: 1px solid var(--atlas-border);
}
.thesaurus-row label {
  min-width: 0;
}
.thesaurus-row input:not([type="checkbox"]) {
  width: 100%;
}
.thesaurus-enabled {
  display: flex;
  align-items: center;
  gap: 6px;
}
.thesaurus-actions {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}
.thesaurus-editor button {
  min-height: 44px;
}
.thesaurus-editor [data-remove] {
  color: #a32323;
}
.thesaurus-editor [data-status] {
  min-height: 24px;
}
.thesaurus-editor > label {
  display: block;
  margin-top: 16px;
}
.thesaurus-editor > label input,
.thesaurus-editor > label select {
  width: 100%;
  max-width: 540px;
}
@media (max-width: 800px) {
  .thesaurus-row {
    grid-template-columns: 1fr 1fr;
  }
  .thesaurus-row label:nth-child(2),
  .thesaurus-row label:nth-child(3) {
    grid-column: 1/-1;
  }
}

/* v4.13.31: compact, touch-accessible search sharing beside QMD status. */
.search-share-divider {
  opacity: 0.35;
  margin-inline: 0.2rem;
}
#share-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
#share-search:hover,
#share-search:focus-visible {
  background: color-mix(in srgb, currentColor 8%, transparent);
}
#share-search:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
#share-search:disabled {
  opacity: 0.45;
  cursor: wait;
}
#share-search-status {
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}
#share-search-status input {
  max-width: 100%;
  font-size: 0.8rem;
}

/* v4.13.32: keep compact status/share glyphs together with a generous touch target. */
.search-icon-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  align-self: center;
}
.search-icon-actions #share-search {
  width: 44px;
  flex: 0 0 44px;
  margin: 0;
  justify-content: flex-start;
  padding-left: 2px;
}
.search-icon-actions .qmd-cloud[hidden] + .search-share-divider {
  display: none;
}
.search-icon-actions #share-search svg {
  width: 15px;
  height: 15px;
}

/* v4.13.33: constrain desktop hover to the icon; retain the mobile touch target. */
@media (hover: hover) and (pointer: fine) {
  .search-icon-actions #share-search {
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
    flex: 0 0 24px;
    padding: 0;
    justify-content: center;
    align-self: center;
  }
}

/* 4.13.22: focused Admin workspace; preserve field heights and square edges. */
#admin-editor:not([hidden]) {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
#admin-editor .workspace-nav {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin: 0;
}
.workspace-nav button,
.workspace-nav a {
  text-align: left;
  padding: 12px;
  background: transparent;
  color: var(--atlas-text);
  border: 1px solid transparent;
  text-decoration: none;
  border-radius: 0;
}
.workspace-nav button[aria-current="page"] {
  background: var(--atlas-soft);
  border-color: var(--atlas-accent);
  font-weight: 600;
}
.workspace-panel {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}
.workspace-panel[hidden],
.workspace-mobile {
  display: none !important;
}
.workspace-panel .admin-lookup-row {
  display: block;
}
.workspace-panel .admin-toolbar {
  margin-bottom: 18px;
}
.workspace-project-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--atlas-soft, #dce2e2);
  padding-bottom: 14px;
  margin-bottom: 20px;
}
.workspace-project-header .admin-project-reference {
  flex: 1;
  margin: 0;
}
.workspace-project-title {
  width: 100%;
  font-size: 1.1rem;
}
.workspace-project-header .project-navigation {
  margin: 0;
}
.workspace-panel .admin-actions {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  background: var(--atlas-paper, #fff);
  border: 1px solid var(--atlas-soft, #dce2e2);
  box-shadow: 0 3px 12px #00000012;
  padding: 12px;
  gap: 10px;
}
.workspace-panel .admin-actions #edit-action-message:empty {
  display: none;
}
.workspace-danger {
  display: flex;
  justify-content: flex-end;
  padding: 16px 0;
}
.workspace-history {
  border-top: 1px solid var(--atlas-soft, #dce2e2);
  padding: 18px 0;
}
.workspace-history > summary {
  cursor: pointer;
  font-weight: 500;
  padding: 8px 0;
}
.workspace-panel .editor-field-group {
  border: 0;
  padding: 12px 0;
}
.workspace-panel .field-group-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.workspace-panel .thesaurus-row {
  display: block;
  border-bottom: 1px solid var(--atlas-soft, #dce2e2);
  padding: 10px 0;
}
.thesaurus-row > summary {
  cursor: pointer;
  padding: 8px 0;
}
.thesaurus-aliases {
  font-weight: 400;
  opacity: 0.85;
  overflow-wrap: anywhere;
}
.thesaurus-row[open] > label {
  display: block;
  margin: 10px 0;
}
@media (max-width: 760px) {
  #admin-editor:not([hidden]) {
    display: block;
  }
  .workspace-mobile {
    display: block !important;
    width: 100%;
    margin-bottom: 18px;
  }
  #admin-editor .workspace-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }
  .workspace-nav button[data-workspace] {
    display: none;
  }
  .workspace-panel .field-group-grid {
    grid-template-columns: 1fr;
  }
  .workspace-panel .admin-actions {
    bottom: 0;
    flex-wrap: wrap;
  }
  .workspace-project-header {
    display: block;
  }
  .workspace-project-header .project-navigation {
    margin: 12px 0;
  }
  .workspace-panel {
    min-width: 0;
  }
}
/* System diagrams are loaded only on demand. */
.system-canvas {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--atlas-border);
  padding: 16px;
  max-height: 65vh;
  background: white;
}
.system-canvas svg {
  max-width: none !important;
}
.system-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.system-table {
  overflow-x: auto;
}
.system-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.system-table th,
.system-table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--atlas-border);
}
