/* The Maritime Atlas hub — the Shipwrecks atlas style (dist/NSshipwrecks/style.css). */
:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  color: #e6e9e1;
  background: #081820;
  font-synthesis: none;
  --muted: #9bafb3;
  --amber: #e8ba7b;
  --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; }
a:focus-visible, button: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; }

/* The Atlas bar (Joel, 13 October 2026): the same bar the record pages carry in atlas-chrome.css. */
.masthead { margin: 0; padding: 0 4.5%; min-height: 72px; display: flex; align-items: center; gap: 28px; background: #06121b; border-bottom: 1px solid var(--line); font-size: 11px; }
.wordmark { display: flex; flex-direction: column; justify-content: center; gap: 5px; min-height: 40px; padding: 12px 0 12px 54px; background: url("./atlas-schooner-star.svg") left center / 40px 40px no-repeat; line-height: 1; }
.wordmark-name { font-size: 12px; letter-spacing: 0.18em; color: #e6e9e1; }
.wordmark-where { font-size: 11px; letter-spacing: 0.14em; color: #6d878c; }
.masthead:hover .wordmark-name { color: var(--amber); }
.masthead-menu { display: none; }
.masthead nav { display: flex; flex: 1 1 auto; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0 22px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.masthead nav a { color: #b6c3c3; padding: 28px 0 26px; border-bottom: 2px solid transparent; white-space: nowrap; }
.masthead nav a:hover { color: #e6e9e1; }
.masthead nav a.masthead-all { margin-left: 8px; padding-left: 22px; border-left: 1px solid var(--line); color: var(--amber); }
/* Below 1180 px the page list no longer fits beside the lockup, so the menu button takes over
   (the same breakpoint as the record pages' bar in atlas-chrome.css). */
@media (max-width: 1180px) {
  .masthead { flex-wrap: wrap; row-gap: 12px; }
  .masthead nav { width: 100%; justify-content: flex-start; gap: 10px 20px; }
  .nav-js .masthead { position: relative; z-index: 20; flex-wrap: nowrap; align-items: center; min-height: 64px; padding: 0 16px; gap: 14px; }
  .wordmark-where { display: none; }
  .nav-js .masthead nav a { white-space: normal; }
  .nav-js .masthead nav a.masthead-all { margin-left: 0; padding-left: 0; border-left: 0; }
  .nav-js .masthead-menu { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); background: #0a1c25; color: #e6e9e1; cursor: pointer; }
  .masthead-menu-lines { position: relative; display: block; width: 20px; height: 14px; }
  .masthead-menu-lines i { position: absolute; left: 0; width: 20px; height: 1px; background: currentColor; transition: transform 160ms ease, top 160ms ease, opacity 120ms ease; }
  .masthead-menu-lines i:nth-child(1) { top: 0; }
  .masthead-menu-lines i:nth-child(2) { top: 6px; }
  .masthead-menu-lines i:nth-child(3) { top: 12px; }
  .masthead-menu[aria-expanded="true"] .masthead-menu-lines i:nth-child(1) { top: 6px; transform: rotate(45deg); }
  .masthead-menu[aria-expanded="true"] .masthead-menu-lines i:nth-child(2) { opacity: 0; }
  .masthead-menu[aria-expanded="true"] .masthead-menu-lines i:nth-child(3) { top: 6px; transform: rotate(-45deg); }
  .nav-js .masthead nav { position: absolute; top: 100%; right: 0; display: none; width: min(330px, 100%); padding: 6px 16px 12px; border: 1px solid var(--line); border-top-color: #3b525c; background: #081820; box-shadow: 0 18px 28px rgba(0, 0, 0, 0.32); }
  .nav-js .masthead nav.open { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .nav-js .masthead nav a { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 9px 0; border-bottom: 1px solid var(--line); }
  .nav-js .masthead nav a:last-child { border-bottom: 0; }
}
.intro { padding: 42px 4.5% 30px; display: grid; gap: 24px; }
.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; width: 100%; }

/* the map */
.atlas { width: calc(100% - 4%); max-width: 1440px; margin: 0 auto; 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-stage { height: clamp(460px, 52vw, 760px); position: relative; overflow: hidden; }
canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
#loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font: italic 16px Georgia, serif; pointer-events: none; }
#loading[hidden] { display: none; }
#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; }
#hover[hidden] { display: none; }
#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; }
.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 i { display: inline-block; width: 8px; height: 8px; flex-shrink: 0; }
.dot { background: var(--amber); border-radius: 100%; box-shadow: 0 0 8px #edb36666; }
.legend .land { width: 14px; height: 10px; background: #1b3030; border: 1px solid #688080; }
.legend .land.dim { background: #13232a; border-color: #3a5157; }
.legend .schooner-key { width: 14px; height: 14px; background: linear-gradient(135deg, transparent 46%, var(--amber) 47%, var(--amber) 53%, transparent 54%); border: 1px solid #e8ba7b88; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }

/* the cards */
.pages, .next, .about { padding: 44px 4.5% 10px; border-top: 1px solid var(--line); margin: 30px 2% 0; }
.story-head { width: 100%; margin-bottom: 26px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 24px; padding-bottom: 20px; }
.card { border: 1px solid var(--line); background: #0a1c25; display: flex; flex-direction: column; transition: border-color 0.3s; }
.card:hover, .card.lit { border-color: #e8ba7b88; }
.card-vignette { height: 220px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; background: #06121b; }
.card-vignette canvas { width: 100%; height: 100%; }
.card-vignette img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0.92; }
.card[data-id="lunenburg-1753"] .card-vignette img { object-position: center 30%; }
.vignette-overlay { position: absolute; z-index: 2; left: 50%; top: 20px; transform: translateX(-50%); display: grid; justify-items: center; gap: 4px; pointer-events: none; }
.vignette-overlay span { padding: 4px 10px 3px; border: 1px solid #c9bda3; background: #eee5d0f2; box-shadow: 0 3px 12px #02080c88; color: #b33b2e; font-size: clamp(12px, 1.15vw, 17px); font-weight: 700; letter-spacing: 0.08em; line-height: 1; white-space: nowrap; }
.card-vignette svg.sheet { position: absolute; left: 50%; top: 52%; height: 112%; width: auto; max-width: none; transform: translate(-50%, -50%); }
/* the sea runs to the card's edges: the drawing's own water band is hidden and one band covers the box at the waterline
   (the SVG is 112% tall and centred at 52%, so its waterline, 640/770 down, falls at 89.1% of the box) */
.card-vignette.sea .ship .water, .card-vignette.sea .ship .wl, .card-vignette.sea .ship .reflect { display: none; }
.card-vignette.sea::after { content: ""; position: absolute; left: 0; right: 0; top: var(--wl, 89.1%); bottom: 0; background: rgba(12, 33, 44, 0.72); border-top: 1px solid rgba(109, 135, 140, 0.8); pointer-events: none; }
/* the water continues down through the text: no line under the drawing, and the body is the band's colour */
.card.sea .card-vignette { border-bottom: 0; }
.card.sea .card-body { background: #0a1d27; }
.card-vignette .corner { position: absolute; z-index: 3; left: 18px; top: 16px; font-size: 11px; letter-spacing: 0.15em; color: #a4b6b9; pointer-events: none; }
.card-vignette.has-image .corner { left: 12px; top: 12px; padding: 5px 7px 4px; border: 1px solid #81989966; background: rgba(6, 18, 27, 0.88); color: #e6e9e1; }
.card-body { padding: 22px 24px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body .eyebrow { margin: 0; }
.card h3 { font: normal 30px/1.1 Georgia, serif; letter-spacing: -0.03em; margin: 2px 0 4px; }
.card h3 em { font-weight: 400; color: #c6d4cf; }
.card h3 a:hover,
.card h3 a:focus-visible,
.card h3 a:hover em,
.card h3 a:focus-visible em { color: var(--amber); }
.card p { margin: 0; font-size: 14px; line-height: 1.75; color: #cfd7d2; }
.card .facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.card .facts li { display: flex; align-items: center; gap: 8px; }
.card .facts li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); }
.card .links { margin-top: auto; padding-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 13px; }
.card .open { background: var(--amber); color: #10212a; padding: 11px 18px; }
.card .method { color: var(--amber); font-size: 12px; }
/* Clicking anywhere on a card opens its page (Joel, 13 October 2026): the title link is
   stretched over the whole cell, so it stays one real link (keyboard, new tab, right-click all
   work). The data method link sits above it and keeps its own target. A card with no page
   (planned) has no title link, so it is not clickable. */
.card { position: relative; }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 4; }
.card .method { position: relative; z-index: 5; padding: 10px 0 10px 14px; margin: -10px 0; }
.card .method:hover { color: #f1cf9c; }
.card:has(h3 a:hover) .open { background: #f1cf9c; }
.card h3 a:focus-visible { outline: none; }
.card:has(h3 a:focus-visible) { outline: 2px solid #f4d19d; outline-offset: 4px; }
.card.planned { opacity: 0.85; }
.card.planned .open { background: transparent; color: #a9b9bc; border: 1px solid #58737a; cursor: default; }

/* charted next */
.next .section-head { margin-bottom: 24px; }
.next .section-copy { width: 100%; }
.next p { font-size: 14px; line-height: 1.8; color: #cfd7d2; margin: 0; }
.next p + p { margin-top: 10px; }
.text-cta { display: inline-flex; align-items: baseline; gap: 7px; margin-top: 12px; padding-bottom: 3px; border-bottom: 1px solid #e8ba7b88; color: var(--amber); font-size: 14px; }
.text-cta:hover { color: #fff1cf; border-color: #fff1cf; }

/* about and footer, from the atlas */
.about { display: flow-root; padding-top: 48px; padding-bottom: 30px; }
.about-head { margin-bottom: 24px; }
.about p { font-size: 14px; line-height: 1.8; color: #cfd7d2; margin: 0 0 14px; }
.about-story { display: flow-root; }
.about-portrait { float: left; width: 150px; height: 188px; margin: 0 26px 14px 0; object-fit: cover; object-position: 50% 32%; border: 1px solid var(--line); }
.about .about-byline { color: #b8c6c3; font-size: 16px; }
.about p.about-question { margin: 24px 0 4px; color: #e6e9e1; font: normal 22px/1.3 Georgia, serif; letter-spacing: -0.01em; }
.about strong { font-weight: 400; color: #fff1cf; }
.about a { color: var(--amber); }
/* "Beyond the Atlas" is the consulting pitch, not an Atlas record, so it wears the consulting
   site's colours (hirtle.ca: teal #22b39f / #67d7c5 on ink #0a121a) and names where it leads
   (Joel, 13 October 2026). Teal appears in this one box and nowhere else in the Atlas. */
.about-work { clear: both; margin-top: 30px; padding: 24px; border: 1px solid #22b39f66; border-left: 3px solid #22b39f; border-radius: 0; background: #0a121a; }
.about .about-work .eyebrow { margin: 0 0 14px; color: #67d7c5; font-size: 11px; line-height: 1.4; }
.about-work h3 { margin: 0 0 12px; color: #f4f1e9; font-size: 20px; line-height: 1.3; }
.about .about-work p { max-width: 900px; margin: 0 0 10px; color: #c8d2d8; font-size: 15px; line-height: 1.55; }
.about-work .text-cta { margin-top: 5px; font-size: 15px; font-weight: 700; color: #67d7c5; border-bottom-color: #22b39f88; }
.about-work .text-cta:hover { color: #f4f1e9; border-color: #f4f1e9; }
.about .about-work p.about-work-from { max-width: none; margin: 18px 0 0; padding-top: 12px; border-top: 1px solid #263746; color: #91a0aa; font-size: 11px; line-height: 1.5; letter-spacing: 0.14em; }
.site-footer { display: grid; grid-template-columns: minmax(190px, 1.1fr) auto minmax(230px, 1fr); align-items: start; gap: 28px; padding: 30px 4.5% 34px; margin: 0 2%; border-top: 1px solid var(--line); font-size: 12px; color: #93a9ae; line-height: 1.7; }
.site-footer p { margin: 0; }
.footer-wordmark { display: inline-block; margin-bottom: 8px; color: #e6e9e1; font-size: 12px; letter-spacing: 0.16em; }
.footer-brand p { max-width: 330px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-nav a { color: #b6c3c3; }
.footer-nav a:hover { color: var(--amber); }
.footer-meta { text-align: right; }
.footer-meta p:last-child { margin-top: 10px; color: #c2cfca; letter-spacing: 0.08em; text-transform: uppercase; }

@media (max-width: 900px) {
  .map-stage { height: clamp(380px, 90vw, 600px); }
  .map-topline span:last-child { display: none; }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .site-footer { grid-template-columns: 1fr; gap: 24px; }
  .footer-meta { text-align: left; }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .card h3 { font-size: 26px; }
  .vignette-overlay { top: 44px; }
  .about-portrait { width: 96px; height: 120px; margin: 0 16px 8px 0; }
  .about .about-byline { font-size: 14px; }
  .about-work { padding: 20px; }
}
/* The read-aloud control is inserted right after a section's title. In a section
   head it sits to the right of the title when the row has room, below it when not
   (Joel, 13 October 2026; the same rule lives in atlas-chrome.css for the record pages). */
main > section > div:has(> h2 + .atlas-listen) { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 32px; }
main > section > div:has(> h2 + .atlas-listen) > .eyebrow { flex: 1 0 100%; }
main > section > div:has(> h2 + .atlas-listen) > h2 { flex: 1 1 24ch; margin: 0; }
main > section > div:has(> h2 + .atlas-listen) > .atlas-listen { flex: 0 0 auto; margin: 2px 0 0; }
main > section > div:has(> h2 + .atlas-listen) > .atlas-listen ~ * { flex: 1 0 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
  .masthead-menu-lines i { transition: none; }
}
