/* Paper, ink, and type for editorial maps. The geographic plate keeps its printed
   palette in either site theme. The controls follow the reader's theme. */
.atlas {
  --atlas-ink: #25352c;
  --atlas-red: #982f24;
  --atlas-paper: #f8f0d9;
  --atlas-sans: Arial, Helvetica, sans-serif;
  margin: 0;
  min-width: 0;
}
.atlas-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .8rem 0; }
.atlas-heading { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.atlas .atlas-heading h3 { margin: 0; font: 500 clamp(1.6rem,3vw,2.4rem)/1.04 var(--serif,Georgia,serif); letter-spacing: -.025em; }
.atlas-heading > span, .atlas-tools button, .atlas-key { font-family: var(--atlas-sans); }
.atlas-heading > span { font-size: .84rem; color: var(--muted); }
.atlas-tools { display: flex; align-items: center; border: 1px solid var(--rule); }
.atlas-tools button { min-width: 40px; min-height: 40px; padding: 0 .5rem; font-size: 1rem; line-height: 1; background: var(--bg); color: var(--ink); border: 0; cursor: pointer; }
.atlas-tools button + button { border-left: 1px solid var(--rule); }
.atlas-tools [data-action="reset"] { font-size: .78rem; }
.atlas-tools button:disabled { color: var(--muted); opacity: .55; cursor: default; }
.atlas-frame { border: 1px solid #a7ae93; background: var(--atlas-paper); }
.atlas-plot { display: block; width: 100%; height: clamp(300px, 48vw, 525px); touch-action: pan-y; overflow: hidden; color-scheme: light; }
.atlas-plot.can-pan { cursor: grab; touch-action: none; }
.atlas-plot.can-pan:active { cursor: grabbing; }
.atlas-plot:focus-visible { outline: 2px solid var(--atlas-red); outline-offset: -2px; }
.atlas :is(.atlas-name,.atlas-furniture text) { font-family: var(--atlas-sans); fill: var(--atlas-ink); }
.atlas-name, .atlas-region, .atlas-furniture text { paint-order: stroke fill; stroke: var(--atlas-paper); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.atlas .atlas-name-target { cursor: pointer; }
.atlas .name-primary { fill: var(--atlas-red); }
.atlas .name-context { fill: #435045; }
.atlas-region { font-family: Georgia,serif; font-style: italic; letter-spacing: .04em; fill: #586247; stroke-width: 1.5px; stroke-opacity: .55; }
.atlas-region.region-water { fill: #315e62; stroke-opacity: .38; }
.atlas-region.region-terrain { fill: #555a42; }
.atlas-ring { stroke: #8e6044; stroke-opacity: .7; stroke-width: 1.2; stroke-dasharray: 2 4; fill: none; }
.atlas-route { stroke: var(--atlas-red); stroke-width: 2.2; stroke-linecap: round; fill: none; }
.atlas-route.route-dashed, .atlas-route.route-north { stroke-width: 1.7; stroke-dasharray: 5 4; }
.atlas-route.route-north { stroke: #5e5747; }
.atlas-leader { stroke: #5f614e; stroke-width: 1; pointer-events: none; }
.atlas-place { cursor: pointer; outline: none; }
.atlas-hit { fill: transparent; }
.atlas-focus { fill: none; stroke: var(--atlas-ink); opacity: 0; }
.atlas-place:focus-visible .atlas-focus, .atlas-place.is-inspected .atlas-focus { opacity: 1; }
.atlas-symbol { stroke: var(--atlas-paper); stroke-width: 1.4; fill: #666d58; }
.dot-primary .atlas-symbol { fill: var(--atlas-red); stroke-width: 2; }
.dot-related .atlas-symbol { fill: var(--atlas-paper); stroke: var(--atlas-red); stroke-width: 2; }
.dot-anchor .atlas-symbol { fill: var(--atlas-ink); }
.atlas-furniture { pointer-events: none; }
.atlas-furniture text { font-size: 11px; font-weight: 600; }
.atlas-furniture path { fill: none; stroke: var(--atlas-ink); stroke-width: 1.3; }
.atlas-furniture .atlas-north { fill: var(--atlas-ink); }
.atlas-key { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.25rem; padding: .75rem 0; font-size: .8rem; color: var(--ink-2); }
.atlas-key > span { display: inline-flex; align-items: center; gap: .4rem; }
.atlas-swatch { display: inline-block; box-sizing: border-box; width: 9px; height: 9px; color: var(--ink); }
.sw-primary, .sw-related { border-radius: 50%; border: 2px solid var(--atlas-red); }
.sw-primary { background: var(--atlas-red); }
.sw-anchor { width: 7px; height: 7px; transform: rotate(45deg); background: currentColor; }
.sw-route { width: 19px; height: 0; border-top: 2px dashed var(--atlas-red); }
.sw-ring { border: 1.3px dotted currentColor; border-radius: 50%; width: 13px; height: 13px; }
[data-theme="dark"] .atlas-key { --atlas-red: #e78d71; }

.atlas-frame { position: relative; isolation: isolate; }
.atlas-find { position: relative; display: block; width: 40px; height: 40px; color: var(--ink); border-right: 1px solid var(--rule); }
.atlas-find::before, .atlas-find::after { content: ""; position: absolute; pointer-events: none; }
.atlas-find::before { left: 12px; top: 11px; width: 10px; height: 10px; border: 1.6px solid currentColor; border-radius: 50%; }
.atlas-find::after { left: 23px; top: 22px; width: 7px; height: 1.6px; background: currentColor; transform: rotate(45deg); transform-origin: left; }
.atlas-select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.atlas-find:focus-within, .atlas-tools button:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.atlas-tools :is(.atlas-find,button:not(:disabled)):hover { background: var(--bg-2); }
.atlas-info { position: absolute; z-index: 2; top: 4px; right: 4px; }
.atlas-info summary { list-style: none; display: grid; place-items: center; width: 42px; height: 42px; cursor: pointer; }
.atlas-info summary::-webkit-details-marker { display: none; }
.atlas-info summary span { display: grid; place-items: center; width: 25px; height: 25px; box-sizing: border-box;
  border: 1px solid #5c6657; border-radius: 50%; background: #faf4e5ed; color: var(--atlas-ink); font: bold italic 16px/1 Georgia,serif; }
.atlas-info[open] summary span, .atlas-info summary:hover span { color: #fff7e5; background: var(--atlas-ink); }
.atlas-info summary:focus-visible { outline: 2px solid var(--atlas-ink); outline-offset: -4px; border-radius: 50%; }
.atlas-pop { position: absolute; z-index: 1; box-sizing: border-box; padding: .75rem .85rem;
  border: 1px solid #a7a794; background: #fffaed; color: #25352c; box-shadow: 0 3px 12px #2b392324;
  font: .82rem/1.45 var(--atlas-sans); overflow-wrap: break-word; }
.atlas-sources { top: 40px; right: 5px; width: min(18rem, calc(100vw - 70px)); }
.atlas-sources a { color: inherit; text-decoration-color: #66725e; }
.atlas-profile { width: min(16.5rem, calc(100% - 16px)); border-left: 3px solid var(--atlas-red); }
.atlas-profile[hidden] { display: none; }
.atlas-place-name { display: block; margin-right: 1.5rem; font: 700 1.03rem/1.25 var(--atlas-sans); }
.atlas .atlas-place-info { margin: .3rem 0 0; font: inherit; color: inherit; }
.atlas-dismiss { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; cursor: pointer;
  border: 0; background: transparent; color: inherit; font: 1.13rem/1 var(--atlas-sans); }
@media (prefers-reduced-motion: no-preference) {
  .atlas-profile:not([hidden]), .atlas-info[open] .atlas-sources { animation: atlas-reveal .16s ease-out; }
  .atlas-info summary span, .atlas-tools button { transition: background-color .12s ease, color .12s ease; }
  @keyframes atlas-reveal { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 600px) {
  .atlas-plot { height: clamp(280px,84vw,375px); }
  .atlas-head { flex-wrap: wrap; }
  .atlas-heading { display: block; }
  .atlas-heading > span { font-size: .76rem; }
  .atlas-key { gap: .4rem .8rem; }
}
.atlas-header-actions { display: flex; align-items: center; gap: .55rem; }
.atlas-locator { width: 70px; padding: 0; border: 1px solid var(--rule); background: var(--atlas-paper); cursor: zoom-out; }
.atlas-locator svg { display: block; width: 100%; }
.atlas-locator[aria-pressed="true"] { cursor: zoom-in; }
.atlas-locator-box { fill: #fff0db33; stroke: var(--atlas-red); stroke-width: 1.5; }
.atlas-locator polyline { fill: none; stroke: #5b332e; stroke-width: 1.2; stroke-dasharray: 2 1; }
.atlas-locator circle { fill: #79392e; }
.atlas-locator:focus-visible, .atlas-locator:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.atlas .region-country { font-style: normal; font-weight: bold; letter-spacing: .06em; }
.atlas .region-city { font: 600 13px var(--atlas-sans); fill: var(--atlas-ink); }
.atlas-context-city { fill: var(--atlas-ink); stroke: var(--atlas-paper); stroke-width: 1; }
.atlas-place.is-active .atlas-focus { opacity: 1; stroke-width: 2; }
.atlas-route.route-arc, .atlas-route.route-distance { fill: none; stroke-width: 1.5; stroke-dasharray: 4 4; }
.atlas-route.route-distance { stroke: #504135; }
.atlas .is-dimmed { opacity: .26; }
.atlas .atlas-place.is-dimmed:is(:hover,:focus-visible,.is-active) { opacity: 1; }
.atlas-global .atlas-plot { height: auto; aspect-ratio: 2.13; }
@media (max-width: 640px) {
  .atlas-global .atlas-plot { min-height: 185px; }
  .atlas-locator { width: 47px; }
  .atlas-header-actions { gap: .28rem; }
}

.atlas-filters { display: flex; flex-wrap: wrap; gap: .15rem .45rem; margin: .1rem 0 .75rem; }
.atlas .atlas-filters button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: .45rem .45rem .35rem;
  font: .84rem/1.3 var(--atlas-sans); background: transparent; color: var(--ink-2); cursor: pointer; }
.atlas .atlas-filters button:hover { background: var(--bg-2); }
.atlas .atlas-filters button[aria-pressed="true"] { border-color: var(--accent); color: var(--ink); font-weight: 600; }
.atlas .atlas-filters button:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

.atlas-area { fill: #ad5940; fill-opacity: .24; stroke: #864331; stroke-width: 1.4; stroke-dasharray: 4 4; stroke-linejoin: round; }
.atlas-profile { max-height: calc(100% - 16px); overflow: auto; }
.atlas-profile a { color: inherit; text-decoration: underline; }
