/* The Lunenburg Rebellion — styled to match the Shipwrecks atlas (dist/NSshipwrecks/style.css), starting from a copy of the Bluenose page style. */
:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  color: #e6e9e1;
  background: #081820;
  font-synthesis: none;
  --muted: #9bafb3;
  --amber: #e8ba7b;
  --rival: #8fb0bd;
  --line: #81989935;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--amber); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: 0.4; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #f4d19d; outline-offset: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: #10212a; padding: 8px 12px; }
.skip:focus { left: 8px; z-index: 10; }
main { max-width: 1800px; margin: auto; }

.masthead { margin: 0 4.5%; padding: 25px 0; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); font-size: 13px; }
.wordmark { display: inline-block; min-height: 44px; padding: 14px 0 14px 54px; background: url("./atlas-schooner-star.svg") left center / 44px 44px no-repeat; letter-spacing: 0.16em; font-size: 12px; line-height: 16px; }
.wordmark span { color: #6d878c; margin: 0 12px; }
.masthead nav { display: flex; gap: 24px; color: var(--muted); }
.intro { padding: 42px 4.5% 30px; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.eyebrow { font-size: 12px; letter-spacing: 0.19em; color: var(--amber); font-weight: 400; margin: 0 0 15px; }
h1 { font: normal clamp(40px, 4.5vw, 78px) / 1.05 Georgia, serif; letter-spacing: -0.04em; margin: 0; }
h1 em { font-weight: 400; color: #c6d4cf; }
h2 { font: normal 32px/1.15 Georgia, serif; letter-spacing: -0.02em; margin: 0; }
.dek { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 0; max-width: 340px; }

/* on this page, and back to top */
.contents { margin: 0 4.5% 26px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; font-size: 13px; }
.contents .eyebrow { margin: 0 6px 0 0; }
.contents a { color: #c6d1cd; padding-bottom: 2px; border-bottom: 1px solid transparent; }
.contents a:hover, .contents a:focus-visible { color: var(--amber); border-color: var(--amber); }
.to-top { margin: 28px 0 0; text-align: right; font-size: 12px; letter-spacing: 0.15em; }
.to-top a { color: var(--muted); }
.to-top a:hover { color: var(--amber); }
.about .to-top { grid-column: 1 / -1; }
.hero-art .to-top { margin: 6px 2% 10px; }

/* the sail plan */
.hero-art { margin: 0 2% 22px; border: 1px solid var(--line); background: #0a1c25; position: relative; padding: 52px 2% 10px; }
.hero-stage svg.sheet { display: block; width: min(100%, 1240px); height: auto; margin: auto; }
.plan-note { margin: 6px 2% 10px; font-size: 13px; color: var(--muted); line-height: 1.7; max-width: 980px; }
.plan-note a { color: var(--amber); }

/* the town stage: the atlas map box */
.atlas { margin: 0 2%; border: 1px solid var(--line); background: #0a1c25; position: relative; }
.map-topline { position: absolute; z-index: 1; top: 22px; left: 28px; right: 28px; display: flex; justify-content: space-between; letter-spacing: 0.15em; font-size: 12px; color: #a4b6b9; pointer-events: none; }
.map-topline span:last-child { margin-right: 28px; text-align: right; }
.atlas-body { display: flex; }
.map-stage { flex: 1; min-width: 0; height: clamp(460px, 48vw, 740px); position: relative; overflow: hidden; }
canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
#stage-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font: italic 16px Georgia, serif; pointer-events: none; }
#stage-loading[hidden] { display: none; }
#stage-hover { position: absolute; z-index: 2; background: #0b2029f0; border: 1px solid #78919477; color: #dbe4df; padding: 9px 12px; font-size: 12px; line-height: 1.5; pointer-events: none; max-width: 260px; }
#stage-hover[hidden] { display: none; }
#stage-hover b { color: #fff1cf; font-weight: 400; }
.map-note { position: absolute; left: 28px; bottom: 25px; font: italic 19px/1.6 Georgia, serif; color: #c2cfca; pointer-events: none; }
.map-note span { font: 12px Arial, sans-serif; color: #9aafb4; }
.side-log { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: #081820; contain: size; }
.log-head { padding: 20px 20px 12px; border-bottom: 1px solid var(--line); }
.log-head .eyebrow { margin: 0 0 6px; }
.log-head span { font-size: 12px; color: var(--muted); line-height: 1.5; }
#record-list { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 6px 0; list-style: none; }
#record-list li[hidden] { display: none; }
#record-list li { display: flex; align-items: baseline; gap: 9px; padding: 5px 16px 5px 20px; color: #c6d1cd; font-size: 13px; line-height: 1.4; --heat: 0; background: rgb(232 186 123 / calc(var(--heat) * 0.1)); }
#record-list .text { flex: 1; min-width: 0; color: color-mix(in srgb, #fff1cf calc(var(--heat) * 100%), #c6d1cd); }
#record-list .text small { display: block; color: var(--muted); font-size: 11px; }
#record-list .t { color: color-mix(in srgb, #e8ba7b calc(var(--heat) * 100%), #9bafb3); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#record-list i, .log-key i { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: var(--amber); display: inline-block; position: relative; top: -1px; }
#record-list .est i, .log-key .hollow { background: transparent; border: 1px solid #849da5; }
#record-list .gov i { background: var(--rival); }
#record-list .gov.est i { background: transparent; border-color: var(--rival); }
.log-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 12px 20px 14px; border-top: 1px solid var(--line); font-size: 12px; color: #b6c3c3; }
.log-key span { display: flex; align-items: center; gap: 6px; }
.log-key .flag-note { color: var(--muted); line-height: 1.5; }
.legend { display: flex; align-items: center; gap: 28px; padding: 16px 28px; border-top: 1px solid var(--line); font-size: 12px; color: #b6c3c3; flex-wrap: wrap; }
.legend > span { display: flex; align-items: center; gap: 9px; }
.legend-note { margin-left: auto; color: #849da5; font-size: 12px; }
.legend i { display: inline-block; width: 8px; height: 8px; flex-shrink: 0; }
.legend .swatch { width: 18px; height: 8px; border-radius: 4px; }
.legend .swatch.bluenose { background: var(--amber); box-shadow: 0 0 8px #edb36666; }
.legend .swatch.rival { background: var(--rival); }
.legend .ring { width: 12px; height: 12px; border: 1px dashed var(--amber); border-radius: 100%; }
.legend .bar { width: 14px; height: 2px; background: var(--amber); }
.map-style { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 28px 16px; font-size: 12px; color: #b6c3c3; }
.map-style > span { margin-right: 4px; letter-spacing: 0.1em; text-transform: uppercase; }
.map-style button { min-height: 32px; padding: 5px 11px; background: transparent; border: 1px solid #58737a; color: #dbe5de; font-size: 12px; }
.map-style button[aria-pressed="true"] { border-color: var(--amber); background: #1a2f36; color: #fff1cf; }
.filter-note { flex-basis: 100%; margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* the clocks: the atlas transport bar */
.timeline, .life { padding: 27px 4.5% 30px; }
.time-heading { display: flex; align-items: center; gap: 44px; }
.year-wrap { display: flex; flex-direction: column; }
.year-wrap .eyebrow { font-size: 12px; margin: 0 0 4px; color: var(--muted); }
#day-clock, #life-year { font: normal 69px/0.98 Georgia, serif; font-variant-numeric: tabular-nums; letter-spacing: -0.05em; color: #f1cf9c; }
#day-clock { font-size: 56px; }
.count-wrap { display: flex; flex-direction: column; border-left: 1px solid var(--line); padding-left: 35px; }
.count-wrap strong { font-size: 31px; font-weight: 400; font-variant-numeric: tabular-nums; }
.count-wrap span, .coverage > span { font-size: 12px; color: var(--muted); margin-top: 8px; }
.coverage { margin-left: auto; display: flex; flex-direction: column; text-align: right; max-width: 360px; }
.coverage strong { font-size: 22px; font-weight: 400; }
.coverage h2 { font-size: 24px; }
.transport { display: flex; align-items: center; gap: 20px; margin-top: 25px; }
.transport button { min-height: 44px; border: 0; }
.primary { background: var(--amber); color: #10212a; min-width: 108px; padding: 12px 22px; }
.replay { background: transparent; color: #b2c0c1; font-size: 18px; padding: 8px; }
.replay span { font-size: 12px; margin-left: 4px; }
.track { flex: 1; padding-top: 17px; min-width: 0; }
input[type="range"] { width: 100%; display: block; margin: 0; height: 6px; appearance: none; background: linear-gradient(to right, var(--amber) var(--progress, 0%), #37505b var(--progress, 0%)); border-radius: 0; cursor: pointer; touch-action: pan-y; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; border: 2px solid #f3d4a5; border-radius: 50%; background: #ebbd7c; box-shadow: 0 0 12px #d9ab6840; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; background: var(--amber); border: 1px solid #f3d4a5; border-radius: 50%; }
.ticks { display: flex; justify-content: space-between; margin-top: 12px; color: #8fa6ad; font-size: 12px; }
#clock-state, #life-state { font-size: 12px; color: var(--muted); min-width: 118px; text-align: right; }
#motion-note { font-size: 13px; color: var(--muted); margin: 18px 0 0; }
#motion-note[hidden] { display: none; }

/* the story */
.story { padding: 44px 4.5% 10px; border-top: 1px solid var(--line); margin: 30px 2% 0; }
.story-head { margin-bottom: 26px; }
.story-grid { display: grid; grid-template-columns: 1.3fr 1fr 0.8fr; gap: 36px; align-items: start; }
.story-grid.two { grid-template-columns: 1fr 1fr; }
.story-copy p { font-size: 15px; line-height: 1.8; color: #d5dcd6; margin: 0 0 16px; max-width: 62ch; }
.story-copy p.small, p.small { font-size: 13px; color: var(--muted); }
.story-copy.wide { margin-top: 10px; }
/* Atlas house style: standalone copy marked wide uses the section's full desktop width. */
.story-copy.wide p, p.story-copy.wide { max-width: none; }
.photo { margin: 0; }
.photo img { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: #0a1c25; }
.photo figcaption { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 10px; }
.card { border: 1px solid var(--line); background: #0a1c25; padding: 14px 16px 6px; }
.card-art svg.sheet { display: block; width: 100%; height: auto; }
table.facts, table.series { width: 100%; border-collapse: collapse; font-size: 13px; }
table caption { text-align: left; font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--amber); padding: 10px 0 10px; }
table.facts th { text-align: left; font-weight: 400; color: var(--muted); padding: 7px 0; border-top: 1px solid var(--line); width: 40%; }
table.facts td { padding: 7px 0; border-top: 1px solid var(--line); color: #e6e9e1; font-variant-numeric: tabular-nums; }
table.series th { text-align: left; font-weight: 400; color: var(--muted); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
table.series td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; color: #d5dcd6; }
table.series td:first-child { color: #f1cf9c; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.series tr.loss td { color: #a9b9bc; }
table.series tr.loss td:first-child { color: #c9a76f; }
.dime-art { display: grid; place-items: center; }
.dime-art svg.sheet { width: min(100%, 520px); height: auto; }

/* the life list */
.life { border-top: 1px solid var(--line); margin: 30px 2% 0; }
.life-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 28px; }
.life-list li { padding: 10px 0 10px 16px; border-left: 1px solid #37505b; color: #7f949a; transition: color 0.4s, border-color 0.4s; }
.life-list li .when { display: block; font-size: 12px; letter-spacing: 0.1em; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.life-list li .what { display: block; font: normal 17px/1.3 Georgia, serif; color: inherit; }
.life-list li .how { display: block; font-size: 13px; line-height: 1.6; margin-top: 6px; max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.5s, opacity 0.5s; }
.life-list li.passed { color: #d5dcd6; border-left-color: var(--amber); }
.life-list li.passed .when { color: var(--amber); }
.life-list li.passed .how, .life-list li.current .how, .life-list.open li .how { max-height: 200px; opacity: 1; color: var(--muted); }
.life-list li.current { color: #fff1cf; border-left-color: #fff1cf; }
.life-list li.loss.passed { border-left-color: #f0483a; }

/* the Heritage Minute facade */
.minute-frame { aspect-ratio: 16 / 9; border: 1px solid var(--line); background: #0a1c25; display: grid; place-items: stretch; overflow: hidden; }
.minute-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.minute-button { display: grid; place-content: center; gap: 10px; text-align: center; background: radial-gradient(circle at 50% 60%, #123140, #0a1c25 70%); border: 0; color: #e6e9e1; }
.minute-eyebrow { font-size: 12px; letter-spacing: 0.19em; color: var(--amber); }
.minute-title { font: normal 40px/1.1 Georgia, serif; }
.minute-cta { display: inline-block; margin-top: 8px; padding: 12px 22px; background: var(--amber); color: #10212a; font-size: 13px; }
.minute-button:hover .minute-cta { background: #f1cf9c; }

/* about and footer, from the atlas */
.about { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 40px; padding: 48px 4.5% 30px; margin: 30px 2% 0; border-top: 1px solid var(--line); }
.about p { font-size: 14px; line-height: 1.8; color: #cfd7d2; margin: 0 0 14px; }
.about strong { font-weight: 400; color: #fff1cf; }
.method-link { color: var(--amber); font-size: 13px; }
footer { display: flex; justify-content: space-between; gap: 40px; padding: 30px 4.5% 50px; margin: 0 2%; border-top: 1px solid var(--line); font-size: 12px; color: #93a9ae; line-height: 1.9; }
footer a { color: #b6c3c3; }
footer a:hover { color: var(--amber); }
footer p { margin: 0; }
footer p:last-child { text-align: right; letter-spacing: 0.15em; white-space: nowrap; }
footer p:last-child span { letter-spacing: 0; font: italic 15px Georgia, serif; color: #c2cfca; }

/* the data method page */
.doc { margin: 0 4.5%; padding: 36px 0 60px; display: grid; grid-template-columns: 220px minmax(0, 76ch); gap: 40px 56px; }
.doc-head { grid-column: 1 / -1; max-width: 76ch; }
.doc-head h1 { font-size: clamp(36px, 4vw, 56px); }
.doc .lead { font: italic 19px/1.6 Georgia, serif; color: #c2cfca; margin: 18px 0 0; }
.toc { position: sticky; top: 20px; align-self: start; font-size: 13px; }
.toc p { margin: 0 0 10px; letter-spacing: 0.15em; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.toc ol { margin: 0; padding-left: 18px; line-height: 1.9; color: #b6c3c3; }
.doc article p, .doc article li { font-size: 15px; line-height: 1.8; color: #d5dcd6; }
.doc article p { margin: 0 0 16px; }
.doc article h2 { font-size: 26px; margin: 36px 0 14px; color: #fff1cf; }
.doc article ul, .doc article ol { padding-left: 20px; margin: 0 0 16px; }
.doc article code { font-size: 13px; color: #f1cf9c; }
.doc article a { color: var(--amber); }
.doc article table { margin: 0 0 20px; }
.doc article em { color: #e6e9e1; }
@media (max-width: 900px) { .doc { grid-template-columns: 1fr; } .toc { position: static; } }

@media (max-width: 1100px) {
  .story-grid { grid-template-columns: 1fr 1fr; }
  .story-grid .card { grid-column: 1 / -1; max-width: 560px; }
  .about { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 900px) {
  .intro { flex-direction: column; align-items: start; }
  .atlas-body { flex-direction: column; }
  .side-log { width: auto; border-left: 0; border-top: 1px solid var(--line); contain: none; max-height: 320px; }
  .map-stage { height: clamp(380px, 90vw, 600px); }
  .map-topline span:last-child { display: none; }
  .time-heading { flex-wrap: wrap; gap: 24px; }
  .coverage { margin-left: 0; text-align: left; }
  .story-grid, .story-grid.two { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
  footer p:last-child { text-align: left; white-space: normal; }
  .masthead nav { flex-direction: column; gap: 6px; text-align: right; }
}
@media (max-width: 560px) {
  .transport { flex-wrap: wrap; }
  .track { flex-basis: 100%; order: 3; }
  #clock-state, #life-state { margin-left: auto; }
  #day-clock, #life-year { font-size: 44px; }
  .count-wrap { padding-left: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .life-list li, .life-list li .how { transition: none; }
}

/* the town stage: additions for this page */
#record-list .tag { display: inline-block; margin-left: 6px; font-size: 10px; letter-spacing: 0.12em; color: #8fa6ad; }
#record-list q { display: block; margin-top: 4px; font: italic 13px/1.5 Georgia, serif; color: #b9c7c4; quotes: "\201C" "\201D"; }
#record-list .differs { display: block; margin-top: 4px; font-size: 11px; color: #c9a76f; }
#record-list .one i, .log-key .hollow { background: transparent; border: 1px solid var(--amber); }
#record-list .gov i { background: var(--rival); }
#record-list .gov.one i { background: transparent; border-color: var(--rival); }
#stage-caption { position: absolute; left: 28px; right: 340px; top: 52px; font-size: 12px; color: #c9a76f; line-height: 1.5; pointer-events: none; }
#stage-caption:empty { display: none; }
.legend .swatch.crowd { background: var(--amber); box-shadow: 0 0 8px #edb36666; }
.legend .swatch.gov { background: var(--rival); }
.legend .diamond { width: 8px; height: 8px; background: #c2cfca; transform: rotate(45deg); }
/* the plate finish: the town stage as a 1960s planning plate (paper, ink, one red) */
.map-stage.plate { background: #eee7d3; }
.map-stage.plate .map-topline { color: #22211e; top: 24px; left: 30px; right: 30px; }
.map-stage.plate .map-note { display: none; }
.map-stage.plate #stage-caption { color: #b8391f; left: 30px; top: 50px; }
.map-stage.plate #stage-hover { background: #f6f1e3f2; border-color: #22211e66; color: #22211e; }
.map-stage.plate #stage-hover b { color: #b8391f; }
.map-stage.plate { height: clamp(520px, 58vw, 860px); }
@media (max-width: 900px) { .map-stage.plate { height: clamp(460px, 120vw, 640px); } }
@media (max-width: 900px) { .map-stage.plate { flex: none; height: clamp(600px, 165vw, 780px); } }
/* the plate finish: legend and record dots in the plate's colours (red: the settlers; ink: the garrison and government) */
.plate-finish .legend .swatch.crowd { background: #c39a46; box-shadow: none; }
.plate-finish .legend .swatch.gov { background: #c4533b; }
.plate-finish #record-list i { background: #d6ad5a; }
.plate-finish #record-list .one i { background: transparent; border-color: #d6ad5a; }
.plate-finish #record-list .gov i { background: #e0634a; }
.plate-finish #record-list .gov.one i { background: transparent; border-color: #e0634a; }
.log-head .narrator { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.log-head .narrator svg { width: 58px; height: auto; flex-shrink: 0; }
.log-head .narrator span { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* the map's own controls */
.follow { position: absolute; z-index: 3; right: 36px; top: 56px; padding: 7px 12px; font-size: 12px; letter-spacing: 0.08em; background: #f6f1e3; color: #22211e; border: 1px solid #22211e; cursor: pointer; }
.follow[hidden] { display: none; }
.follow:hover { background: #22211e; color: #f6f1e3; }
.map-stage canvas { cursor: grab; }
.map-stage canvas:focus-visible { outline: 2px solid #c4533b; outline-offset: -4px; }

/* the plate's lettering above the map, to match the map (IM Fell English SC) */
.map-stage.plate .map-topline { font-family: "IM Fell English SC", Georgia, serif; font-size: 15px; letter-spacing: 0.12em; }

/* the day with its year: the year a step smaller, so the date still reads at a glance */
#day-clock { white-space: nowrap; }
#day-clock .yr { font-size: 0.8em; color: #f1cf9c; letter-spacing: -0.02em; }

.frak { font-family: "UnifrakturMaguntia", Georgia, serif; letter-spacing: 0; font-size: 1.25em; }

/* map references under the stage */
.map-credits { max-width: 980px; margin: 14px auto 0; padding: 0 16px; color: var(--muted, #9bafb3); font-size: 12.5px; line-height: 1.5; }
.map-credits .eyebrow { margin: 0 0 4px; letter-spacing: 0.14em; font-size: 10.5px; }
.map-credits em { font-style: italic; color: inherit; opacity: 0.9; }

.eyebrow b { font-weight: 400; color: #8fa6ad; margin-right: 10px; } /* the section's number, as on the Bluenose page */
/* ---- the page (2026-10-09): the section rail, lifted from the Bluenose page (ATLAS-PAGE-CONTRACT section 5) ---- */
/* the section rail: sits under the title, sticks to the top while reading, lights the section you are in */
.rail { position: sticky; top: 0; z-index: 5; margin: 0 2% 26px; border: 1px solid var(--line); background: #081820f2; backdrop-filter: blur(6px); display: flex; align-items: stretch; }
/* the strip of sections slides left and right: arrows, the mouse wheel, a drag, or a thumb */
.rail-strip { flex: 1; min-width: 0; display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab; }
.rail-strip::-webkit-scrollbar { display: none; }
.rail-strip.dragging { cursor: grabbing; scroll-behavior: auto; }
.rail-strip.more-right { mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.rail-strip.more-left { mask-image: linear-gradient(90deg, transparent, #000 56px); }
.rail-strip.more-left.more-right { mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); }
.rail-arrow { flex: none; width: 34px; border: 0; background: transparent; color: var(--amber); font: 22px/1 Georgia, serif; padding: 0 0 4px; }
.rail-arrow.left { border-right: 1px solid var(--line); }
.rail-arrow.right { border-left: 1px solid var(--line); }
.rail-arrow:disabled { color: #3f5a62; cursor: default; opacity: 1; }
.rail-arrow:hover:not(:disabled) { background: #0f2630; }
.rail .k { padding: 14px 18px; font-size: 12px; letter-spacing: 0.19em; color: var(--amber); border-right: 1px solid var(--line); white-space: nowrap; display: flex; align-items: center; }
.rail a { padding: 12px 16px 10px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #b6c3c3; white-space: nowrap; border-bottom: 2px solid transparent; display: flex; gap: 8px; align-items: baseline; }
.rail a i { font-style: normal; color: #6d878c; font-size: 11px; font-variant-numeric: tabular-nums; }
.rail a.on { color: #fff1cf; border-bottom-color: var(--amber); }
.rail a.on i { color: var(--amber); }
.rail a:hover, .rail a:focus-visible { color: var(--amber); outline-offset: -4px; }
.rail .up { margin-left: auto; border-left: 1px solid var(--line); color: var(--muted); display: none; }
.rail.stuck .up { display: flex; } /* Top appears only once the rail has stuck and there is somewhere to go back to */
.rail.stuck { box-shadow: 0 10px 30px #04101a99; }
[id] { scroll-margin-top: 64px; }
@media (max-width: 700px) {
  .rail .k { display: none; }
  .rail .up span { display: none; }
  .rail .up { padding: 12px 12px 10px; }
}

/* the map's lettering, from local files (SIL Open Font Licence; site/fonts/LICENSE-*): no font loads from elsewhere */
@font-face { font-family: "IM Fell English"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/im-fell-english-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IM Fell English"; font-style: italic; font-weight: 400; font-display: swap; src: url("./fonts/im-fell-english-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "IM Fell English SC"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/im-fell-english-sc-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "UnifrakturMaguntia"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/unifrakturmaguntia-latin-400-normal.woff2") format("woff2"); }

/* 01 the film: a click-to-load facade (ATLAS-PAGE-CONTRACT item 8); a poster until the YouTube id is set */
.film { position: relative; margin: 0 2%; padding: 64px 2.5% 24px; border: 1px solid var(--line); }
.film-body { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(280px, 1fr); gap: 36px; align-items: start; }
.film-frame { aspect-ratio: 16 / 9; border: 1px solid var(--line); background: #0a1c25; display: grid; overflow: hidden; }
.film-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.film-button { position: relative; display: block; padding: 0; border: 0; background: #0a1c25; color: #e6e9e1; }
.film-button img { display: block; width: 100%; height: 100%; object-fit: cover; }
.film-button:disabled { cursor: default; opacity: 1; }
.film-button:disabled img { filter: saturate(0.75) brightness(0.8); }
.film-cta { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 12px 22px; background: #081820e8; border: 1px solid var(--line); font-size: 13px; letter-spacing: 0.15em; text-transform: uppercase; white-space: nowrap; color: var(--amber); }
.film-button:not(:disabled) .film-cta { background: var(--amber); color: #10212a; border-color: var(--amber); }
.film-button:not(:disabled):hover .film-cta { background: #fff1cf; }
.film-copy h2 { margin: 0 0 18px; }
.film-copy p { font-size: 15px; line-height: 1.8; color: #d5dcd6; margin: 0 0 16px; }
.film-copy p.small { font-size: 13px; color: var(--muted); }

/* 02 the live map: a gate first; the stage loads only when asked */
.live { margin: 30px 2% 0; padding: 44px 2.5% 10px; border-top: 1px solid var(--line); }
.live .story-head { margin-bottom: 22px; }
.live-gate { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 36px; align-items: center; }
.live-gate img { width: 100%; height: auto; display: block; border: 1px solid var(--line); opacity: 0.7; }
.live-gate-copy p { font-size: 15px; line-height: 1.8; color: #d5dcd6; margin: 0 0 16px; max-width: 52ch; }
.live-gate-copy p.small { font-size: 13px; color: var(--muted); }
.live-gate-copy .primary { min-height: 44px; padding: 0 22px; border: 0; background: var(--amber); color: #10212a; font-size: 14px; letter-spacing: 0.04em; }
.live-gate-copy .primary:hover { background: #fff1cf; }
.live-body[hidden], .live-gate[hidden] { display: none; }
.map-loading { position: absolute; left: 0; right: 0; top: 46%; margin: 0; text-align: center; font: italic 18px Georgia, serif; color: #22211e; pointer-events: none; }
.map-loading[hidden] { display: none; }

/* 03 the letter: the rumoured list as a ledger */
.ledger { border: 1px solid var(--line); padding: 22px 24px; }
.ledger .eyebrow { margin-bottom: 14px; }
.ledger ul { list-style: none; margin: 0 0 14px; padding: 0; }
.ledger li { font: 17px/1.5 Georgia, serif; color: #fff1cf; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ledger li:last-child { color: var(--amber); }
.photo img { height: auto; }

/* 04 six people */
.people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 36px; }
.person { border-top: 1px solid var(--line); padding-top: 18px; }
.person h3 { font: normal 22px/1.2 Georgia, serif; margin: 0 0 10px; color: #fff1cf; }
.person p { font-size: 15px; line-height: 1.8; color: #d5dcd6; margin: 0 0 10px; }
.person p.small { font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.person .medal { float: right; width: 96px; height: auto; margin: 0 0 8px 14px; background: #eee7d3; border-radius: 50%; padding: 6px; }

/* 05 a table whose first column is words, not dates */
table.series.list td:first-child { white-space: normal; }

/* 07 where the sources disagree */
.disagree { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 48px; }
.disagree li { break-inside: avoid; font-size: 15px; line-height: 1.8; color: #d5dcd6; padding: 0 0 16px; }
.disagree b { color: #fff1cf; font-weight: 400; font-family: Georgia, serif; font-size: 17px; }
.disagree q { font-style: italic; font-family: Georgia, serif; }

/* 08 Murdoch's verdict */
.verdict { margin: 0; padding: 4px 0 0 28px; border-left: 2px solid var(--amber); }
.verdict p { font: italic 24px/1.45 Georgia, serif; color: #fff1cf; margin: 0 0 14px; }
.verdict footer { font-size: 13px; color: var(--muted); padding: 0; border: 0; display: block; }

@media (max-width: 1100px) { .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .film-body, .live-gate { grid-template-columns: 1fr; }
  .people-grid { grid-template-columns: 1fr; }
  .disagree { columns: 1; }
  .film-copy p, .live-gate-copy p, .person p { max-width: none; }
  .film-cta { white-space: normal; text-align: center; width: max-content; max-width: 86%; }
}

/* atlas control dock: essential playback controls stay attached above the map */
.timeline.docked {
  display: grid;
  grid-template-columns: 108px 48px minmax(150px, 0.72fr) minmax(270px, 1.55fr) minmax(220px, 0.9fr);
  grid-template-rows: auto auto;
  gap: 5px 18px;
  align-items: center;
  margin: 0;
  padding: 15px 28px 17px;
  border-bottom: 1px solid var(--line);
  background: #0b2028;
}
.timeline.docked .time-heading,
.timeline.docked .transport { display: contents; }
.timeline.docked .year-wrap { grid-column: 3; grid-row: 1; min-width: 0; }
.timeline.docked .year-wrap .eyebrow { margin-bottom: 3px; }
.timeline.docked #year,
.timeline.docked #day-clock,
.timeline.docked #race-clock { font-size: clamp(30px, 2.8vw, 43px); line-height: 0.95; white-space: nowrap; }
.timeline.docked .count-wrap {
  grid-column: 3;
  grid-row: 2;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  padding: 0;
  border: 0;
}
.timeline.docked .count-wrap strong { font-size: 18px; }
.timeline.docked .count-wrap span { margin: 0; }
.timeline.docked .coverage {
  grid-column: 5;
  grid-row: 1 / 3;
  align-self: center;
  margin: 0;
  max-width: none;
}
.timeline.docked .coverage strong { font-size: 18px; }
.timeline.docked .primary {
  grid-column: 1;
  grid-row: 1 / 3;
  min-width: 108px;
  min-height: 46px;
}
.timeline.docked .replay {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 44px;
  min-height: 44px;
  padding: 7px;
  border: 1px solid #58737a;
}
.timeline.docked .replay span { display: none; }
.timeline.docked .track {
  grid-column: 4;
  grid-row: 1;
  width: 100%;
  padding-top: 10px;
}
.timeline.docked #clock-state,
.timeline.docked #play-state,
.timeline.docked #race-state {
  grid-column: 4;
  grid-row: 2;
  min-width: 0;
  text-align: left;
}
.timeline.docked > .small,
.timeline.docked > #clock-note {
  grid-column: 1 / -1;
  margin: 6px 0 0;
}
.timeline.docked > .to-top { display: none; }

@media (max-width: 1000px) {
  .timeline.docked { display: block; padding: 16px 20px 18px; }
  .timeline.docked .time-heading { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
  .timeline.docked .transport { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 14px; }
  .timeline.docked .year-wrap { min-width: 145px; }
  .timeline.docked .count-wrap { padding-left: 20px; border-left: 1px solid var(--line); }
  .timeline.docked .coverage { width: 100%; padding-top: 10px; border-top: 1px solid var(--line); text-align: left; }
  .timeline.docked .track { flex: 1 1 320px; order: 3; padding-top: 8px; }
  .timeline.docked #clock-state,
  .timeline.docked #play-state,
  .timeline.docked #race-state { margin-left: auto; text-align: right; }
}

@media (max-width: 560px) {
  .timeline.docked { padding: 14px 16px 16px; }
  .timeline.docked .time-heading { align-items: flex-start; gap: 10px 16px; }
  .timeline.docked .year-wrap { min-width: 130px; }
  .timeline.docked #year,
  .timeline.docked #day-clock,
  .timeline.docked #race-clock { font-size: 36px; }
  .timeline.docked .count-wrap { padding-left: 16px; }
  .timeline.docked .coverage strong { font-size: 16px; }
  .timeline.docked .transport { margin-top: 12px; }
  .timeline.docked .primary { min-width: 92px; min-height: 44px; }
  .timeline.docked .track { flex-basis: 100%; margin: 0; }
}
