/* Visit Fort William: the same dark lake palette and type as the rest of the site (about/about.css). */
:root {
  color-scheme: dark;
  --night: #0b1215; --panel: #0f1a1e; --glass: rgba(9,16,19,0.78); --rule: rgba(160,196,201,0.17); --rule2: rgba(160,196,201,0.34);
  --fg: #e4eceb; --text: #d3e2e3; --dim: #93a6a8; --aqua: #86d9dd; --aqua-ink: #0b1215; --amber: #f3b94a; --pink: #ff8fb8; --green: #8fd0a4;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif; --body: "Public Sans", "Segoe UI", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --measure: 68ch;
}
html.hc { --night: #000; --panel: #000; --glass: #000; --rule: #8aa3a7; --rule2: #cfe0e2; --fg: #fff; --text: #fff; --dim: #d5e0e2; --aqua: #a9f0f3; --amber: #ffd27a; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
html[data-text="115"] { font-size: 18.4px; }
html[data-text="130"] { font-size: 20.8px; }
html[data-text="150"] { font-size: 24px; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; }
body { min-height: 100vh; color: var(--fg); font: 400 1rem/1.6 var(--body); background: radial-gradient(ellipse at 80% -10%, rgba(134,217,221,0.12), transparent 55%), var(--night); background-attachment: fixed; }
html.hc body { background: #000; }
img { max-width: 100%; }
a { color: var(--aqua); text-underline-offset: 0.15em; }
a:hover { color: #b9eef0; }
:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0 0 0.4em; color: var(--fg); }
h1 { font: 800 clamp(2.4rem, 7vw, 4rem)/0.95 var(--display); letter-spacing: 0.01em; text-transform: uppercase; }
h2 { font: 600 1.65rem/1.08 var(--display); letter-spacing: 0.02em; }
h3 { font: 600 1.35rem/1.15 var(--display); letter-spacing: 0.02em; }
h4 { font: 500 0.75rem/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
p { margin: 0 0 0.8em; }
em { font-style: italic; }
[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--panel); padding: 8px 12px; }
.skip:focus { left: 8px; top: 8px; }
.loading { font-style: italic; color: var(--dim); padding: 24px var(--gutter); }
[hidden] { display: none !important; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 24px var(--gutter) 48px; }
.wrap-x { padding-inline: var(--gutter); }
.prose { max-width: var(--measure); color: var(--text); }
.prose p { margin-bottom: 0.8em; }
.eyebrow { margin: 0 0 0.4em; font: 500 0.7rem var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--aqua); }
.label { font: 500 0.7rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.marker { font: 500 0.72em var(--mono); color: var(--amber); background: rgba(243,185,74,0.13); padding: 0.1em 0.35em; border-radius: 4px; white-space: nowrap; }
.draft { display: inline-block; vertical-align: middle; font: 500 0.62rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); border: 1px solid rgba(243,185,74,0.55); border-radius: 999px; padding: 0.35em 0.65em; }
.error-detail { white-space: pre-wrap; overflow-wrap: anywhere; font: 400 0.8rem var(--mono); background: var(--panel); border-left: 3px solid var(--pink); padding: 10px 12px; max-width: var(--measure); }
.not-written { font-style: italic; font-size: 1.2rem; color: var(--dim); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.4em; min-height: 42px; font: 600 0.85rem var(--body); color: var(--fg); background: rgba(9,16,19,0.9); border: 1px solid var(--rule2); border-radius: 10px; padding: 0.4em 1em; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--aqua); color: var(--fg); }
.btn-primary { background: var(--aqua); color: var(--aqua-ink); border-color: var(--aqua); }
.btn-primary:hover { background: #b9eef0; color: var(--aqua-ink); }
.btn-quiet { min-height: 36px; font-weight: 500; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; padding: calc(6px + env(safe-area-inset-top, 0px)) var(--gutter) 6px; background: rgba(9,16,19,0.9); border-bottom: 1px solid var(--rule); backdrop-filter: blur(6px); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-back { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--rule2); border-radius: 10px; color: var(--fg); text-decoration: none; }
.brand-back:hover { border-color: var(--aqua); color: var(--fg); }
.brand-name { font: 800 1.45rem/1 var(--display); letter-spacing: 0.02em; text-transform: uppercase; color: var(--fg); text-decoration: none; white-space: nowrap; }
.brand-name:hover { color: var(--aqua); }
.topnav { display: flex; gap: 4px; align-items: center; padding: 3px; border: 1px solid var(--rule); border-radius: 12px; background: var(--glass); }
.topnav a, .topnav button { font: 600 0.8rem var(--body); color: var(--dim); background: none; border: 0; padding: 7px 12px; min-height: 36px; display: inline-flex; align-items: center; text-decoration: none; cursor: pointer; border-radius: 9px; }
.topnav a:hover, .topnav button:hover { color: var(--fg); background: rgba(255,255,255,0.05); }
.topnav [aria-current="page"], .topnav [aria-expanded="true"] { background: var(--aqua); color: var(--aqua-ink); }
.topnav [aria-current="page"]:hover, .topnav [aria-expanded="true"]:hover { background: var(--aqua); color: var(--aqua-ink); }
.settings-menu { position: absolute; right: var(--gutter); top: calc(100% + 6px); z-index: 40; width: min(300px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--rule2); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,0.5); padding: 14px 16px; }
.settings-menu fieldset { border: 0; padding: 0; margin: 0 0 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.settings-menu legend { font: 500 0.7rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; padding: 0; }
.settings-menu label { display: flex; align-items: center; gap: 8px; min-height: 38px; cursor: pointer; font-size: 0.9rem; }
.settings-menu input { width: 18px; height: 18px; accent-color: var(--aqua); margin: 0; }
.settings-note { font-size: 0.8rem; color: var(--dim); margin: 6px 0 0; }

/* Cards */
.paper-card { position: relative; background: var(--glass); border: 1px solid var(--rule); border-radius: 14px; padding: clamp(20px, 4vw, 36px); }

/* Arrival */
.arrival { max-width: 820px; }
.arrival-title { margin: 0; }
.arrival-sub { font: 500 1.15rem/1.45 var(--body); margin: 0.5em 0 0; color: #d9ecec; }
.arrival-era { font: 500 0.8rem var(--mono); letter-spacing: 0.12em; color: var(--amber); margin: 0.5em 0 0; }
.rule { border-top: 1px solid var(--rule); margin: 20px 0; }
.small-head { margin-top: 1.2em; }
.how-list { max-width: var(--measure); color: var(--text); padding-left: 1.2em; }
.how-list li { margin-bottom: 0.4em; }
.arrival-note { max-width: var(--measure); border-left: 3px solid var(--amber); padding: 4px 0 4px 14px; margin: 1.2em 0; font-size: 0.9rem; color: var(--dim); }
.arrival-note p:last-child { margin-bottom: 0; }
.enter-row { margin: 24px 0 0; }
.enter-row .btn { font-size: 1rem; min-height: 46px; padding: 0.4em 1.6em; }

/* Map */
.map-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 12px; padding-bottom: 10px; }
.map-title { font: 700 1.9rem/1 var(--display); margin: 0; }
.map-title .era { font: 500 0.8rem var(--mono); letter-spacing: 0.1em; color: var(--amber); text-transform: none; }
.map-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.season-switch, .zoom-bar { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border: 1px solid var(--rule); border-radius: 12px; background: var(--glass); }
.season-switch button, .zoom-bar button { font: 600 0.8rem var(--body); color: var(--dim); background: none; border: 0; border-radius: 9px; padding: 6px 12px; min-height: 36px; min-width: 36px; cursor: pointer; }
.season-switch button:hover, .zoom-bar button:hover { color: var(--fg); background: rgba(255,255,255,0.05); }
.season-switch button[aria-pressed="true"] { background: var(--aqua); color: var(--aqua-ink); }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; padding: 0 var(--gutter) 32px; align-items: start; }
.map-frame { min-width: 0; max-width: calc((100vh - 150px) * 16 / 9); }
.map-viewport { position: relative; overflow: hidden; touch-action: pan-y; border: 1px solid var(--rule); border-radius: 14px; background: #123c4b; }
.map-viewport.zoomed { touch-action: none; cursor: grab; }
.map-stage { position: relative; width: 100%; transform-origin: 0 0; --z: 1; }
.map-layers { position: absolute; inset: 0; pointer-events: none; user-select: none; }
.map-layers svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map-layers .drift { animation: smoke-drift 9s ease-in-out infinite alternate; }
@keyframes smoke-drift { 0% { opacity: 0.4; } 50% { opacity: 1; } 100% { opacity: 0.55; } }
html.reduce-motion .map-layers .drift { animation: none; display: none; }
.map-hint { font-size: 0.8rem; color: var(--dim); margin: 6px 0 0; }

.hotspots { position: absolute; inset: 0; }
.hotspot { position: absolute; display: block; border-radius: 6px; color: var(--fg); background: transparent; outline: none; -webkit-tap-highlight-color: transparent; }
.hotspot:hover, .hotspot:focus-visible { box-shadow: 0 0 0 2px var(--aqua), 0 0 14px rgba(134,217,221,0.55); background: rgba(134,217,221,0.14); z-index: 3; }
.hotspot .tag { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%) scale(calc(1 / var(--z))); transform-origin: 50% 100%; white-space: nowrap; pointer-events: none; opacity: 0; font: 600 0.8rem/1.2 var(--body); color: var(--fg); background: var(--panel); border: 1px solid var(--rule2); border-radius: 8px; padding: 5px 9px; transition: opacity 0.15s; z-index: 2; }
.hotspot.tag-below .tag { bottom: auto; top: calc(100% + 6px); transform-origin: 50% 0; }
.hotspot:hover .tag, .hotspot:focus-visible .tag { opacity: 1; }
.hotspot .tick { position: absolute; right: -7px; top: -9px; width: 18px; height: 18px; display: none; padding: 3px; border-radius: 50%; background: var(--aqua); transform: scale(calc(1 / var(--z))); transform-origin: 100% 0; }
.hotspot.visited .tick { display: block; }
.tick-icon { width: 100%; height: 100%; overflow: visible; display: block; }
.tick-icon path { fill: none; stroke: var(--aqua); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hotspot .tick-icon path { stroke: var(--aqua-ink); stroke-width: 3.5; }

.all-sites { border: 1px solid var(--rule); border-radius: 14px; background: var(--glass); overflow: hidden; }
.all-sites summary { font: 600 1.25rem var(--display); letter-spacing: 0.02em; padding: 10px 14px; cursor: pointer; min-height: 44px; }
.all-sites summary .count { font: 500 0.7rem var(--mono); color: var(--dim); letter-spacing: 0.02em; }
.all-sites ol { list-style: none; margin: 0; padding: 0 0 6px; max-height: calc(100vh - 210px); overflow-y: auto; }
.all-sites li { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--rule); padding: 0 14px; }
.all-sites li a { flex: 1; display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 0; color: var(--fg); text-decoration: none; font-size: 0.88rem; line-height: 1.3; }
.all-sites li a:hover .name { color: var(--aqua); }
.all-sites .tick { width: 14px; height: 14px; flex: none; visibility: hidden; }
.all-sites li.visited .tick { visibility: visible; }
.all-sites .kind { font: 500 0.6rem var(--mono); letter-spacing: 0.04em; color: var(--dim); text-align: right; }

/* Place page */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(4,8,10,0.6); }
.sheet { position: relative; width: min(760px, 100%); height: 100%; overflow-y: auto; overscroll-behavior: contain; background: var(--panel); border-left: 1px solid var(--rule2); box-shadow: -12px 0 32px rgba(0,0,0,0.45); animation: sheet-in 220ms ease-out; }
@keyframes sheet-in { from { transform: translateX(24px); } to { transform: none; } }
html.reduce-motion .sheet, html.reduce-motion * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.sheet-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(8px + env(safe-area-inset-top, 0px)) var(--gutter) 8px; background: rgba(15,26,30,0.96); border-bottom: 1px solid var(--rule); }
.esc-hint { font: 400 0.7rem var(--mono); color: var(--dim); }
.sheet-body { padding: 20px clamp(16px, 5vw, 40px) 40px; }
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: start; margin-bottom: 8px; }
.page-head > * { grid-column: 1; }
.page-head .kind { margin: 0; font: 500 0.7rem var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--aqua); }
.page-head h2 { font: 800 clamp(2rem, 6vw, 2.9rem)/0.98 var(--display); letter-spacing: 0.01em; text-transform: uppercase; margin: 0.15em 0 0.3em; }
.page-head .one-line { font: 500 1.1rem/1.45 var(--body); color: #d9ecec; margin: 0 0 0.5em; max-width: var(--measure); }
.page-head .in-use { margin: 0; font-size: 0.9rem; color: var(--text); }
.locator { grid-column: 2; grid-row: 1 / span 4; width: 148px; position: relative; display: block; border: 1px solid var(--rule2); border-radius: 10px; background: #123c4b; overflow: hidden; }
.locator img { position: absolute; inset: 0; width: 100%; height: 100%; }
.locator-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 3px rgba(11,18,21,0.8); }
.page-sec { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--rule); }
.pictures { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; border-top: 0; padding-top: 0; }
.pictures figure { margin: 0; max-width: 420px; }
.pictures img { display: block; width: 100%; height: auto; max-height: 60vh; object-fit: contain; border-radius: 10px; border: 1px solid var(--rule); }
.pictures figcaption { font-size: 0.8rem; color: var(--dim); margin-top: 6px; line-height: 1.45; }
.pic-kind { font: 500 0.7rem var(--mono); color: var(--aqua); }
.credit { display: block; font-size: 0.75rem; margin-top: 2px; }
.winter-note { max-width: var(--measure); margin-top: 12px; padding: 10px 14px; border: 1px solid var(--rule); border-left: 3px solid var(--aqua); border-radius: 10px; background: rgba(134,217,221,0.06); color: var(--text); }
.winter-note p:last-child { margin-bottom: 0; }
.people { margin: 0; max-width: var(--measure); }
.people > div { margin-bottom: 10px; }
.people dt { font-weight: 600; color: var(--fg); }
.people dd { margin: 0; color: var(--text); }
.quote { margin: 0 0 8px; max-width: var(--measure); font: 500 1.1rem/1.5 var(--body); color: var(--fg); border-left: 3px solid var(--aqua); padding: 2px 0 2px 16px; }
.quote p { margin: 0; }
.paraphrase { max-width: var(--measure); border-left: 3px dashed var(--rule2); padding: 2px 0 2px 16px; font-style: italic; color: var(--text); }
.cite { font-size: 0.85rem; color: var(--dim); max-width: var(--measure); }
.how-we-know { max-width: var(--measure); margin-top: 12px; color: var(--text); font-size: 0.92rem; }
.gaps ul { max-width: var(--measure); padding-left: 1.2em; margin: 0; color: var(--text); }
.gaps li { margin-bottom: 0.4em; }
.protocol-note { margin-top: 18px; max-width: var(--measure); padding: 14px 16px; border: 1px solid rgba(143,208,164,0.5); border-radius: 12px; background: rgba(143,208,164,0.08); color: var(--text); }
.protocol-note h3 { color: var(--green); }
.protocol-note p:last-child { margin-bottom: 0; }
.experience-card { display: grid; gap: 2px; max-width: var(--measure); text-decoration: none; color: var(--fg); padding: 14px 18px; border: 1px solid var(--aqua); border-radius: 14px; background: rgba(134,217,221,0.07); }
.experience-card:hover { background: rgba(134,217,221,0.14); color: var(--fg); }
.ex-kind { font: 500 0.7rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--aqua); }
.ex-title { font: 700 1.55rem/1.1 var(--display); letter-spacing: 0.02em; }
.ex-min { color: var(--dim); font-size: 0.85rem; }
.ex-go { font: 500 0.75rem var(--mono); color: var(--aqua); justify-self: end; }
.sources summary { font: 600 1.2rem var(--display); letter-spacing: 0.02em; cursor: pointer; min-height: 40px; display: flex; align-items: center; }
.sources ol { max-width: var(--measure); font-size: 0.85rem; padding-left: 1.4em; color: var(--text); }
.sources li { margin-bottom: 0.5em; overflow-wrap: anywhere; }
.sheet-foot { margin-top: 28px; }

/* Story scene */
.scene { max-width: 760px; }
.scene-head { margin-bottom: 18px; border-bottom: 1px solid var(--rule); padding-bottom: 12px; }
.scene-title { font-size: clamp(2.2rem, 6vw, 3.2rem); }
.scene-min { color: var(--dim); font-size: 0.9rem; margin: 0; }
.scene-text { font-size: 1.05rem; min-height: 4em; }
.scene-text .chosen { font-weight: 500; color: var(--aqua); border-left: 2px solid var(--aqua); padding-left: 12px; }
.choices { list-style: none; padding: 0; margin: 18px 0 8px; max-width: var(--measure); }
.choices li { margin: 0 0 8px; }
.choice { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); align-items: baseline; width: 100%; text-align: left; font: 500 0.98rem/1.45 var(--body); color: var(--fg); background: var(--glass); cursor: pointer; border: 1px solid var(--rule2); border-radius: 12px; padding: 11px 14px 11px 8px; min-height: 48px; }
.choice:hover, .choice:focus-visible { border-color: var(--aqua); background: rgba(134,217,221,0.08); }
.choice .numeral { font: 500 0.8rem var(--mono); color: var(--aqua); text-align: right; padding-right: 0.7em; }
.key-hint, .scene-leave { font-size: 0.8rem; color: var(--dim); }
.wrh-card { margin-top: 24px; max-width: 680px; border-color: rgba(243,185,74,0.45); }
.wrh-card h2 { color: var(--amber); }
.wrh-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }

/* Notebook */
.notebook { max-width: 860px; }
.nb-nav { font-size: 0.85rem; margin-bottom: 6px; color: var(--dim); }
.nb-note { color: var(--dim); font-size: 0.85rem; }
.nb-sec { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule); }
.nb-list { padding-left: 1.2em; max-width: var(--measure); color: var(--text); }
.nb-list li { margin-bottom: 0.3em; overflow-wrap: anywhere; }
.nb-list.ticked { list-style: none; padding-left: 0; }
.nb-list.ticked li { display: flex; gap: 8px; align-items: center; }
.nb-list.ticked .tick-icon { width: 16px; height: 16px; flex: none; }
.about h3 { margin-top: 1.2em; }
.bib { max-width: var(--measure); padding-left: 1.4em; font-size: 0.85rem; color: var(--text); }
.bib li { margin-bottom: 0.5em; overflow-wrap: anywhere; }
.label-foot { margin-top: 40px; padding-top: 12px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; color: var(--dim); font-size: 0.8rem; }
.bbn { font: 500 0.7rem var(--mono); letter-spacing: 0.18em; color: var(--aqua); }
.fatal h1 { font-size: 2rem; }

/* Phones and narrow windows */
@media (max-width: 900px) {
  .map-layout { grid-template-columns: minmax(0, 1fr); }
  .map-frame { max-width: none; }
  .all-sites ol { max-height: none; }
}
@media (max-width: 560px) {
  .brand-name { font-size: 1.2rem; }
  .topnav a, .topnav button { padding: 7px 9px; }
  .map-title { font-size: 1.6rem; }
  .map-head { padding-top: 8px; }
  .map-controls { width: 100%; }
  .season-switch { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .zoom-bar { width: 100%; display: grid; grid-template-columns: 1fr 1fr 1fr; }
  .page-head { grid-template-columns: minmax(0, 1fr); }
  .locator { grid-column: 1; grid-row: auto; width: 150px; margin-top: 10px; }
  .esc-hint { display: none; }
  .sheet { width: 100%; border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html:not(.reduce-motion) .sheet { animation-duration: 1ms; }
}
