.atlas-page { background: #f6f5ee; color: #26382d; }
.atlas-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem var(--gutter); }
.atlas-footer { font-size: .9rem; }
.atlas-footer a:hover { text-decoration: underline; }
.atlas-main { max-width: 1500px; margin: 0 auto; padding: clamp(2rem,4vw,4rem) var(--gutter) 2rem; }
.atlas-intro { margin-bottom: clamp(1.25rem,2.8vw,2.5rem); }
.atlas-title-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.atlas-intro h1 { font-size: clamp(2.9rem,5.8vw,6rem); line-height: 1; margin: 0; }
.atlas-intro p { max-width: 70ch; font-size: clamp(1rem,1.5vw,1.12rem); }
.atlas-board { display: grid; grid-template-columns: clamp(112px,12vw,165px) minmax(0, 1fr) clamp(240px,24vw,340px); gap: clamp(1rem,2.6vw,2.75rem); align-items: start; padding: 1.35rem 0; border-block: 1px solid #c3cdbd; }
.atlas-timeline h2, .atlas-story .evidence-label, .atlas-period { font: 650 .74rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .12em; }
.atlas-timeline h2 { color: #435a48; margin-bottom: .65rem; }
.atlas-rail { display: grid; grid-template-columns: 29px minmax(0,1fr); column-gap: 4px; height: clamp(320px,30vw,430px); }
.atlas-rail input[type=range] { writing-mode: vertical-lr; direction: ltr; appearance: none; -webkit-appearance: none; height: 100%; width: 28px; margin: 0; background: transparent; cursor: pointer; touch-action: none; }
.atlas-rail input[type=range]::-webkit-slider-runnable-track { width: 3px; background: #96a88f; border-radius: 5px; }
.atlas-rail input[type=range]::-moz-range-track { width: 3px; background: #96a88f; border-radius: 5px; }
.atlas-rail input[type=range]::-webkit-slider-thumb { appearance: none; width: 19px; height: 19px; margin-left: -8px; border-radius: 50%; border: 3px solid #f6f5ee; background: #824623; box-shadow: 0 0 0 1px #824623; }
.atlas-rail input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; border: 3px solid #f6f5ee; background: #824623; box-shadow: 0 0 0 1px #824623; }
.atlas-stops { display: flex; flex-direction: column; justify-content: space-between; padding-block: 0; }
.atlas-stops a { display: flex; align-items: center; position: relative; color: #526252; font-size: .86rem; font-variant-numeric: tabular-nums; line-height: 1.1; min-height: 22px; }
.atlas-stops a:hover { text-decoration: underline; }
.atlas-stops a[aria-current=true] { color: #703c1e; font-weight: 700; }
#time-spacing { color: #566354; font-size: .76rem; line-height: 1.4; margin-top: .9rem; max-width: 16ch; }
.map-surface { border: 1px solid #b9c9b6; overflow: hidden; background: #cfe4f2; position: relative; }
.map-surface > img { display: block; width: 100%; height: auto; }
.map-surface > #modern-reference { position: absolute; inset: 0; pointer-events: none; }
.map-surface > img[hidden] { display: none; }
.atlas-map figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .7rem 0 .1rem; font: .76rem/1.35 var(--sans); color: #455447; }
.map-evidence-key { display: inline-flex; gap: .5rem; align-items: center; }
.map-evidence-key::before { content: ''; width: 12px; height: 12px; background: #b1c39d; border: 1px solid #597557; }
.map-evidence-key[data-kind=evidence]::before { background: #97512b; border-color: #82491e; border-radius: 50%; }
.coast-toggle { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; }
.coast-toggle input { accent-color: #526648; width: 16px; height: 16px; margin: 0; }
.coast-toggle::after { content:''; width: 20px; border-top: 2px dashed #835033; }
.coast-toggle:has(input:disabled) { opacity: .65; }
.era-readout { font: 600 .82rem/1.4 var(--sans); color: #6a482e; margin: 0 0 .3rem; }
.era-card { scroll-margin-top: 1.5rem; }
.era-card + .era-card { margin-top: 1.5rem; }
.atlas-page.enhanced .era-card { margin: 0; }
.era-card h2 { font: 400 clamp(1.8rem,3vw,3.4rem)/1.04 var(--serif); letter-spacing: -.035em; margin: .35rem 0 .8rem; }
.era-card > p { line-height: 1.55; margin: .65rem 0; }
.atlas-period { color: #566a55; }
.era-card .evidence-label { border-top: 1px solid #c5cebd; padding-top: .85rem; margin: 1rem 0 .28rem; }
.evidence-copy, .era-sources, .era-reading { font-size: .89rem; }
.era-card .era-sources { margin: .7rem 0; padding: 0; list-style: none; }
.era-sources li + li { margin-top: .3rem; }
.era-card a, .atlas-methods a, .era-fallback { text-decoration: underline; text-underline-offset: .18em; }
.era-reading { margin-top: .7rem; }
.atlas-stepper { display: flex; gap: .5rem; margin-top: 1.25rem; }
.atlas-stepper button { background: transparent; padding: .45rem .7rem; border: 1px solid #a3b19c; font-size: .84rem; }
.atlas-stepper button:hover:not(:disabled) { background: #e3e8da; }
.atlas-stepper button:disabled { opacity: .4; cursor: default; }
.atlas-methods { max-width: 82ch; margin: 1.6rem 0; }
.atlas-methods summary { cursor: pointer; font: 400 1.35rem/1.5 var(--serif); }
.methods-copy p { margin-top: .75rem; }
.atlas-footer { border-top: 1px solid #d1d7c9; }
.era-fallback { font-size: .9rem; }
.atlas-page.enhanced .era-fallback { display: none; }
@media(max-width:1050px) {
  .atlas-board { grid-template-columns: 136px minmax(0, 1fr); }
  .atlas-story { grid-column: 2; max-width: 70ch; }
  .atlas-rail { height: clamp(320px,46vw,430px); }
  .atlas-map { max-width: 640px; }
}
@media(max-width:620px) {
  .atlas-main { padding-inline: 16px; }
  .atlas-footer { padding-inline: 16px; }
  .atlas-board { grid-template-columns: 68px minmax(0,1fr); gap: .75rem .45rem; padding: .85rem 0 1.2rem; }
  .atlas-rail { grid-template-columns: 20px minmax(0,1fr); column-gap: 2px; height: clamp(228px,62vw,305px); }
  .atlas-rail input[type=range] { width: 20px; }
  .atlas-stops a { font-size: .72rem; }
  .atlas-map figcaption { font-size: .73rem; align-items: flex-start; gap: .55rem; }
  .atlas-story { grid-column: 1 / -1; padding-top: .9rem; border-top: 1px solid #d4dacb; }
  .atlas-timeline h2 { margin: 0 0 .25rem; }
  #time-spacing { font-size: .64rem; line-height: 1.3; }
  .atlas-intro h1 { font-size: clamp(2.65rem,11vw,3.9rem); }
  .atlas-footer { font-size: .75rem; }
}
.atlas-page .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media(min-width:621px) { .stop-short { display: none; } }
@media(max-width:620px) { .stop-long { display: none; } }
.atlas-page.enhanced .fallback-age { display: none; }
.era-citations { margin: .65rem 0; font-size: .89rem; }
.era-citations summary { cursor: pointer; color: #405643; }
.era-wildlife { margin: .65rem 0; font-size: .89rem; }
.era-wildlife summary { cursor: pointer; color: #405643; padding-block: .3rem; }
.era-wildlife ul { list-style: none; padding: 0; margin: .35rem 0 0; }
.era-wildlife li { padding: .65rem 0; border-top: 1px solid #c5cebd; }
.era-wildlife li a { font-weight: 650; }
.era-wildlife li p { margin: .2rem 0 0; }
.atlas-map figcaption { padding: 0 0 .65rem; min-height: 1.6rem; }
@media(max-width:620px) {
  .atlas-map figcaption { min-height: 0; }
  .atlas-stops a { min-height: 24px; }
}
.enlarge-map { border: 0; border-bottom: 1px solid currentColor; color: #3d5542; padding: .25rem 0 .1rem; background: transparent; margin-top: .35rem; font: .82rem var(--sans); }
#detail-map { width: min(684px,96vw); max-width: 96vw; max-height: 92dvh; overflow: auto; margin: auto; padding: 1rem; color: #26382d; background: #f6f5ee; border: 1px solid #a3b19c; }
#detail-map::backdrop { background: rgba(20,32,26,.64); }
#detail-map header { display: flex; justify-content: space-between; gap: .75rem; align-items: start; margin-bottom: .5rem; }
#detail-map h2 { font: 400 1.4rem/1.1 var(--serif); }
#detail-map button { padding: .25rem .6rem; border: 1px solid #879882; background: transparent; }
.detail-help { font-size: .82rem; margin-bottom: .5rem; }
.detail-scroll { overflow: auto; max-height: 70dvh; }
.detail-scroll .map-surface { width: 640px; }
.detail-reference { position: absolute; inset: 0; pointer-events: none; }
@media(min-width:621px) { .enlarge-map { display: none; } }
.atlas-layer-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .12rem 1rem; padding: 0; margin: 0; min-width: 0; border: 0; }
.atlas-layer-controls label { min-height: 28px; display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; white-space: nowrap; }
.atlas-layer-controls input { width: 16px; height: 16px; margin: 0; accent-color: #526648; }
.atlas-layer-controls label:has(input:disabled) { opacity: .67; cursor: default; }
.city-toggle::after, .place-toggle::after { content: ''; width: 8px; height: 8px; }
.city-toggle::after { border-radius: 100%; background: #274d61; }
.place-toggle::after { transform: rotate(45deg); border: 2px solid #814322; }
.map-names { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map-names text { font: 600 15px Arial,sans-serif; paint-order: stroke; stroke: #fcfaee; stroke-width: 3.25px; stroke-linejoin: round; }
.city-layer text { fill: #274d61; }
.city-layer circle { fill: #274d61; stroke: #fbf9ef; stroke-width: 1.4px; }
.period-layer a { pointer-events: auto; cursor: pointer; }
.period-layer .marker-target { fill: transparent; }
.period-layer path { fill: #fff5de; fill-opacity: .45; stroke: #87431d; stroke-width: 2.4px; }
.period-layer text { fill: #743814; font-weight: 700; }
.period-layer a:focus-visible text, .period-layer a:hover text { text-decoration: underline; }
.place-status { color: #4a5d50; margin: .5rem 0 0; font: .84rem/1.4 var(--sans); }
.place-record { margin: .3rem 0; font: .9rem/1.5 var(--sans); }
.place-record summary { color: #733e22; cursor: pointer; font-weight: 600; }
.place-record p { margin: .4rem 0; }
.place-record .place-kind { color: #4b6051; font-size: .82rem; }
@media(max-width:620px) {
  .atlas-layer-controls { gap: 0 .7rem; }
  .atlas-map figcaption { justify-content: flex-start; }
  .atlas-stops a { min-height: 23px; }
  .atlas-rail { min-height: 272px; }
}
.map-surface.awaiting-map > * { visibility: hidden; }

/* The modern ridge reference remains visually distinct from reconstructed land. */
.atlas-layer-controls { flex-basis: 100%; gap: .12rem .85rem; }
.ridge-toggle::after { content: ''; width: 19px; border-top: 2px dashed #79556c; }
.ridge-toggle input { accent-color: #79556c; }
.ridge-boundary { fill: none; stroke: #79556c; stroke-width: 2.2px; stroke-dasharray: 5 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map-evidence-key[data-kind=ridge-evidence]::before { background: repeating-linear-gradient(135deg,#cfe4f2 0 3px,#9eb9cb 3px 4px); border-color: #79556c; }
.ridge-marker { fill: #fff9ee; stroke: #704b62; stroke-width: 2px; }
.ridge-layer .ridge-label { fill: #603b53; font-size: 13px; stroke-width: 3.8px; }
.ridge-layer .ridge-note { fill: #71556a; font-size: 11px; font-weight: 400; }
.ridge-layer .ridge-leader { fill: none; stroke: #79556c; stroke-width: 1.2px; }
#ridge-status { display: flex; align-items: flex-start; gap: .5rem; margin: .5rem 0 0; color: #634b5b; font: .78rem/1.45 var(--sans); }
#ridge-status::before { content: ''; flex: 0 0 19px; margin-top: .65em; border-top: 2px dashed #79556c; }
#ridge-status[hidden], .ridge-context[hidden] { display: none; }
.ridge-context { margin: 1.5rem 0; padding: clamp(1.15rem,2.5vw,2rem); border: 1px solid #d2c8cc; border-radius: 3px; background: #f0ede5; scroll-margin-top: 1rem; }
.ridge-context-head { max-width: 80ch; }
.ridge-context h2 { margin: 0 0 .65rem; font: 400 clamp(1.8rem,3vw,2.7rem)/1.1 var(--serif); letter-spacing: -.025em; }
.ridge-context h3 { margin: 0 0 .45rem; font: 600 1rem/1.3 var(--sans); }
.ridge-context p { line-height: 1.6; }
.ridge-context p + p { margin-top: .65rem; }
.ridge-context a { text-decoration: underline; text-underline-offset: .18em; }
.ridge-context .ridge-period-note { margin-top: .85rem; padding-left: .85rem; border-left: 3px solid #8d6383; color: #5e4255; font-size: .93rem; }
.ridge-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.25rem; margin: 1.35rem 0; }
.ridge-facts > * { padding-top: .85rem; border-top: 1px solid #d2c8cc; }
.ridge-facts p { font-size: .91rem; }
.ridge-process { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.15rem; padding: 0; margin: 1.5rem 0 .8rem; list-style: none; counter-reset: ridge-step; }
.ridge-step { padding: 1rem; background: #f9f7ef; border: 1px solid #d8d6c8; border-radius: 2px; counter-increment: ridge-step; }
.ridge-step::before { content: '0' counter(ridge-step); display: block; color: #7a596c; font: 600 .75rem/1.4 var(--sans); letter-spacing: .1em; margin-bottom: .65rem; }
.ridge-step p { font-size: .9rem; }
.ridge-step svg { display: block; width: 100%; height: auto; margin: .4rem 0 .85rem; }
.ridge-context .ridge-source-note { max-width: 105ch; margin-top: 1rem; color: #586357; font-size: .81rem; line-height: 1.55; }
.ridge-context details { margin-top: 1rem; font-size: .88rem; }
.ridge-context summary { cursor: pointer; color: #634b5b; }
.ridge-context details ul { padding-left: 1.2rem; margin-top: .65rem; }
.ridge-context details li + li { margin-top: .3rem; }
@media(max-width:800px) {
  .ridge-process { grid-template-columns: 1fr; gap: .7rem; }
}
@media(max-width:620px) {
  .atlas-layer-controls { gap: 0 .6rem; }
  .atlas-layer-controls label { min-height: 30px; }
  .atlas-rail { min-height: 300px; }
  #ridge-status { font-size: .72rem; }
  .ridge-context { margin-top: 1rem; padding: 1rem; }
  .ridge-facts { grid-template-columns: 1fr; gap: .8rem; }
  .ridge-process { margin-top: 1rem; }
}
