.atlas { background: #eeeada url("art/grain.svg"); border-bottom: 1px solid var(--line); }
.atlas-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: clamp(16px, 2vw, 30px);
}
.atlas-heading h1 { font-size: clamp(28px, 3.25vw, 49px); line-height: 1.08; }
.atlas-heading em { font-weight: 400; color: var(--clay); }
.atlas-heading > p { max-width: 46ch; color: var(--muted); font-size: 16px; line-height: 1.35; }
.region-bar { color: #fff9e7; background: var(--ink); }
.region-menu { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding-block: 5px; gap: 4px; }
.region-menu a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 15px;
  line-height: 1.15;
  text-decoration: none;
}
.region-menu a:hover, .region-menu a:focus-visible { color: #fffceb; border-color: #c5cbb8; }
.region-menu a[aria-current="location"] { color: var(--ink); background: var(--paper); }
.region-menu a:focus-visible, .footer a:focus-visible { outline-color: #efc68d; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; background: var(--region-color); border: 1px solid #3f46394d; flex: none; }
.central { --region-color: #c17652; } .northwest { --region-color: #b4b48c; } .north-central { --region-color: #dcad73; }
.northeast { --region-color: #dfca93; } .southwest { --region-color: #92a89b; } .southeast { --region-color: #d79c82; }

.atlas-frame { padding-block: clamp(15px, 2vw, 30px); }
.atlas-desk {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
  grid-template-areas: "map records";
  align-items: stretch;
  border: 1px solid #b7b9a4;
  background: #efebdc;
}
.record-book { grid-area: records; min-width: 0; border-left: 1px solid #b7b9a4; background: var(--surface); }
.region-record { scroll-margin-top: 1rem; }
.record-heading { padding: clamp(14px, 1.6vw, 24px) clamp(16px, 2vw, 32px) 12px; border-top: 5px solid var(--region-color); }
.record-heading h2 { display: flex; align-items: center; gap: 9px; font-size: clamp(23px, 2vw, 31px); }
.record-heading .swatch { width: 10px; height: 10px; }
.record { margin-inline: clamp(16px, 2vw, 32px); padding-block: clamp(13px, 1.5vw, 22px); border-top: 1px solid var(--line); }
.record .key-label { letter-spacing: .08em; font-size: 10px; }
.record h3 { font-size: clamp(21px, 1.7vw, 28px); line-height: 1.14; }
.record h3 a { display: inline-block; padding-block: 8px; }
.record h3 a span { color: var(--clay); font: .7em var(--sans); }
.record > p:last-child { font-size: 16px; line-height: 1.45; color: var(--muted); }
.guide-turn { display: flex; gap: 1rem; align-items: center; justify-content: space-between; min-height: 44px; padding: 8px clamp(16px, 2vw, 32px); border-top: 1px solid var(--line); font-size: 15px; }
.map-figure { grid-area: map; min-width: 0; display: grid; align-content: center; background: #eeeada url("art/grain.svg"); }
.region-map { display: block; width: 100%; height: auto; }
.map-figure figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35em 1em; margin-inline: 14px; padding: 7px 0; color: var(--muted); font: 11px/1.4 var(--mono); }
.map-neighbors { font: 10px var(--mono); letter-spacing: 3px; fill: #697363; }
.map-places { font: italic 13px Georgia,serif; fill: #253d32; }
.map-places text { stroke: #e8dcbc; stroke-width: 2px; paint-order: stroke; }
.map-halo { fill: #f5efdd; stroke: #756f5345; stroke-width: .8px; }
.map-tag { fill: #354a39; text-anchor: middle; font: bold 10px var(--mono); letter-spacing: .075em; }
.region-map [aria-current="location"] .map-halo { fill: #214535; stroke: #214535; }
.region-map [aria-current="location"] .map-tag { fill: #fff9e4; }
.region-map a:hover .area, .region-map a:focus-visible .area { stroke: #214535; stroke-width: 4px; }
.region-map a:hover .map-halo { stroke: #214535; stroke-width: 2px; }

.region-map a[aria-current="location"] .area { stroke: var(--ink); stroke-width: 2.8px; }
.map-leaders { fill: var(--ink); stroke: var(--ink); }
.map-leaders path { fill: none; stroke-width: 1.5px; stroke-dasharray: 3 3; }
.map-leaders [data-leader] { display: none; }
.map-leaders .selected-leader { display: inline; }
.region-feature { scroll-margin-top: 12px; }
.region-feature + .region-feature { border-top: 1px solid var(--line); }
.region-feature .section-head { margin-bottom: 22px; }
.region-feature .lead { font-size: 17px; max-width: 75ch; margin-top: 10px; }
.region-feature .kicker .swatch { width: 9px; height: 9px; }
.region-feature .kicker::before { display: none; }

/* Native region links also open the relevant records when scripting is disabled. */
@supports selector(:has(:target)) {
  body:not(.enhanced-atlas) .record-book:not(:has(:target)) .region-record:not(:first-child),
  body:not(.enhanced-atlas) .record-book:has(:target) .region-record:not(:target) { display: none; }
}
@media (max-width: 860px) {
  .atlas-heading { flex-wrap: wrap; gap: 6px; }
  .atlas-desk { grid-template-columns: minmax(0,1.2fr) minmax(280px,1fr); }
  .region-menu a { font-size: 14px; }
}
@media (max-width: 700px) {
  .atlas-heading { display: block; padding-block: 12px; }
  .atlas-heading h1 { font-size: clamp(26px, 5.6vw, 35px); }
  .atlas-heading > p { display: none; }
  .region-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding-block: 3px; }
  .region-menu a { gap: 5px; padding-inline: 3px; font-size: 13px; }
  .region-menu .swatch { width: 9px; height: 9px; }
  .atlas-frame { padding-block: 12px 17px; }
  .atlas-desk { grid-template-columns: minmax(0,1fr); grid-template-areas: "records" "map"; }
  .record-book { border: 0; border-bottom: 1px solid #b7b9a4; }
  .record-heading { padding: 9px 14px; border-top-width: 3px; }
  .record-heading h2 { font-size: 21px; }
  .record { margin-inline: 14px; padding-block: 9px; }
  .record h3 { font-size: 21px; }
  .record h3 a { min-height: 44px; display: inline-flex; align-items: center; gap: 4px; padding-block: 5px; }
  .record > p:last-child { font-size: 14px; line-height: 1.36; }
  .guide-turn { padding-inline: 14px; }
}

/* Both records stay in view on a short, landscape-oriented phone. */
@media (min-width: 540px) and (max-height: 500px) {
  .atlas-heading { display: block; padding-block: 8px; }
  .atlas-heading h1 { font-size: 26px; }
  .atlas-heading > p { display: none; }
  .region-menu { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; padding-block: 2px; }
  .region-menu a { gap: 4px; padding-inline: 2px; font-size: 13px; }
  .atlas-frame { padding-block: 8px; }
  .atlas-desk { grid-template-columns: minmax(0,1fr); grid-template-areas: "records" "map"; }
  .record-book { border: 0; border-bottom: 1px solid var(--line); }
  .region-record { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-heading, .guide-turn { grid-column: 1 / -1; }
  .record-heading { padding: 7px 14px; border-top-width: 3px; }
  .record-heading h2 { font-size: 21px; }
  .record { margin-inline: 14px; padding-block: 7px; }
  .record h3 { font-size: 20px; }
  .record h3 a { min-height: 44px; }
  .record > p:last-child { font-size: 14px; line-height: 1.35; }
}
