:root {
  --bg: #f7f6f2; --surface: #ffffff; --surface-2: #efede7; --ink: #1d2730; --ink-2: #46525c; --muted: #6b757d;
  --line: #e0ddd5; --accent: #2f6b57; --accent-ink: #ffffff; --accent-soft: #e2eee8; --kicker: #2f6b57;
  --warn-bg: #fbf1dd; --warn-ink: #6b4a10; --logo-fg: #f4f1ea; --brand: #25313b; --shadow: 0 1px 2px rgba(20,30,40,.06), 0 6px 18px rgba(20,30,40,.06);
  --radius: 10px; --head-font: "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --body-font: "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12171b; --surface: #1a2127; --surface-2: #222b32; --ink: #e8ebed; --ink-2: #c3cad0; --muted: #949ea6;
    --line: #2d373f; --accent: #7cc2a5; --accent-ink: #0f1a16; --accent-soft: #1f3330; --kicker: #8fd0b4;
    --warn-bg: #3a2f17; --warn-ink: #f2d9a0; --logo-fg: #12171b; --brand: #dfe5e9; --shadow: 0 1px 2px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12171b; --surface: #1a2127; --surface-2: #222b32; --ink: #e8ebed; --ink-2: #c3cad0; --muted: #949ea6;
  --line: #2d373f; --accent: #7cc2a5; --accent-ink: #0f1a16; --accent-soft: #1f3330; --kicker: #8fd0b4;
  --warn-bg: #3a2f17; --warn-ink: #f2d9a0; --logo-fg: #12171b; --brand: #dfe5e9; --shadow: 0 1px 2px rgba(0,0,0,.3);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body-font); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--head-font); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }
.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(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.kicker { font: 700 .75rem/1.2 var(--head-font); letter-spacing: .09em; text-transform: uppercase; color: var(--kicker); margin: 0 0 .6rem; }
.kicker a { color: inherit; text-decoration: none; } .kicker a:hover { text-decoration: underline; }
.kicker .dot, .report-sub .dot { margin: 0 .45em; opacity: .6; }
.btn { font: 600 .95rem var(--head-font); background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; padding: .7em 1.4em; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: .875rem; cursor: pointer; text-decoration: underline; }

/* map */
.map-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 12px; font-size: .9rem; }
.map-bar label { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.map-bar select { font: .9rem var(--body-font); padding: .4em .5em; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); max-width: 100%; }
.map-layout { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.map-box { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
#map { width: 100%; height: min(72vh, 720px); min-height: 420px; }
.map-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; max-height: min(72vh, 720px); overflow: auto; box-shadow: var(--shadow); }
.map-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.map-panel h2 { font-size: 1.15rem; margin: 0 0 .4em; color: var(--brand); }
#m-close { display: none; }
.map-list { list-style: none; margin: 0; padding: 0; }
.map-list li { padding: 8px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.map-list a { color: var(--accent); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.map-list a:hover { text-decoration: underline; }
.map-list .muted { font-size: .82rem; }
.map-credit { margin-top: 10px; }
.m-dot { border: 2px solid rgba(255,255,255,.9); border-radius: 50%; background: rgba(47,107,87,.82); color: #fff; font: 700 12px/1 var(--head-font); display: grid; place-items: center; cursor: pointer; padding: 0; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.m-dot:hover, .m-dot:focus-visible, .m-dot.sel { background: #b4541c; outline: 2px solid #fff; }
.maplibregl-popup-content { color: #1d2730; font: .85rem var(--body-font); max-width: 240px; }
.maplibregl-popup-content a { color: #2f6b57; font-weight: 600; }
@media (max-width: 800px) {
  .map-layout { display: block; }
  #map { height: 62vh; min-height: 360px; }
  .map-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-height: 58vh; border-radius: 14px 14px 0 0; transform: translateY(105%); transition: transform .2s; padding-bottom: 24px; }
  .map-panel.open { transform: none; }
  #m-close { display: inline; }
}
@media (prefers-reduced-motion: reduce) { .map-panel { transition: none; } }

/* header / footer */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.head-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--brand); text-decoration: none; margin-right: auto; }
.logo-mark { height: 44px; width: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; font-family: var(--head-font); }
.brand-text strong { font-size: 1.15rem; letter-spacing: .04em; }
.brand-text span { font-size: .78rem; color: var(--muted); letter-spacing: .02em; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { color: var(--ink-2); text-decoration: none; font: 600 .82rem var(--head-font); text-transform: uppercase; letter-spacing: .08em; padding: 8px 10px; border-radius: 6px; }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.theme-btn { background: none; border: 1px solid var(--line); color: var(--ink-2); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; }
.theme-btn svg { width: 18px; height: 18px; }
@media (max-width: 720px) {
  /* phones: logo and theme button on the first row, the menu on its own full-width row with big tap targets */
  .head-inner { flex-wrap: wrap; gap: 0 12px; min-height: 0; padding-top: 8px; }
  .theme-btn { margin-left: auto; width: 40px; height: 40px; }
  .site-nav { order: 3; flex: 0 0 100%; overflow-x: auto; scrollbar-width: none; gap: 2px; margin: 4px -16px 0; padding: 0 12px; mask-image: linear-gradient(to right, #000 85%, transparent); -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { flex: none; white-space: nowrap; font-size: .9rem; letter-spacing: .03em; padding: 12px 10px; }
}
.site-foot { margin-top: 64px; background: #1f2a33; color: #c9d1d7; font-size: .9rem; }
.site-foot strong { color: #fff; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 16px 48px; justify-content: space-between; padding-top: 32px; padding-bottom: 40px; }
.site-foot code { background: rgba(255,255,255,.08); color: #e6ecef; }

/* hero */
.hero { position: relative; color: #fff; background: #26323b; overflow: hidden; }
.hero-media { position: absolute; inset: 0; background-size: cover; background-position: center 40%; transform: scale(1.02); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,20,26,.82) 0%, rgba(14,20,26,.55) 55%, rgba(14,20,26,.25) 100%), linear-gradient(0deg, rgba(14,20,26,.55), transparent 50%); }
.hero-inner { position: relative; padding-top: clamp(48px, 9vw, 110px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 800; margin-bottom: .25em; max-width: 14ch; }
.kicker-light { color: #cfe6dc; }
.lead { font-size: clamp(1.02rem, 2vw, 1.22rem); max-width: 40rem; color: #e9eef1; margin: 0 0 1.6rem; }
.hero-search { position: relative; max-width: 560px; }
.hero-search input { width: 100%; font: 1.05rem var(--body-font); padding: .95em 1em .95em 3em; border-radius: 999px; border: 0; background: #fff; color: #1d2730; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.hero-search svg { position: absolute; left: 1.05em; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: #5d6a73; pointer-events: none; }
.stats { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: 14px 40px; }
.stats strong { display: block; font: 800 1.7rem/1.1 var(--head-font); }
.stats span { font-size: .85rem; color: #d7e0e5; }
.hero-credit { position: absolute; right: 16px; bottom: 8px; margin: 0; font-size: .75rem; color: #d7e0e5; text-shadow: 0 1px 2px rgba(0,0,0,.6); max-width: 60%; text-align: right; }
.hero-credit a { color: inherit; }

.hero-links { margin: 1.1rem 0 0; font-size: .95rem; color: #e9eef1; text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.hero-links a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.55); text-underline-offset: 3px; }
.hero-links a:hover { text-decoration-color: #fff; }

/* lodge & Pāua page */
.place-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.place-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; scroll-margin-top: 80px; }
.place-photo { margin: 0; background: var(--surface-2); }
.place-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.place-photo figcaption { padding: 6px 18px; font-size: .78rem; color: var(--muted); }
.place-photo figcaption a { color: inherit; }
.place-body { padding: 8px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.place-body h2 { font-size: 1.5rem; margin: 0 0 .25em; }
.place-body p { margin: 0 0 .6em; color: var(--ink-2); }
.place-body .place-count { color: var(--muted); font-size: .9rem; }
.place-btn { align-self: flex-start; margin-top: auto; }
.place-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.place-note { margin: 14px 0 0; }
.place-toggle { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.results-search { flex: 1 1 100%; font: 1rem var(--body-font); padding: .55em .9em; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); min-width: 0; }
@media (max-width: 700px) { .place-panels { grid-template-columns: 1fr; } }

/* browse */
.browse { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 36px; padding-top: 32px; align-items: start; }
.filters { position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow: auto; padding: 4px 6px 24px 2px; scrollbar-width: thin; }
.filters-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 8px; }
.filters-head h2 { font-size: 1.05rem; margin: 0; }
.facet { border-bottom: 1px dotted var(--line); padding: 14px 0; }
.facet h3 { font: 700 .74rem var(--head-font); text-transform: uppercase; letter-spacing: .09em; color: var(--ink-2); margin: 0 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 600 .8rem var(--head-font); border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .35em .8em; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip:disabled { opacity: .4; cursor: default; }
.chip .n { font-weight: 400; opacity: .7; margin-left: .3em; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { margin: 0; }
.checks label { display: flex; gap: 8px; align-items: center; padding: 3px 0; cursor: pointer; font-size: .9rem; }
.checks input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }
.checks .n { margin-left: auto; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.checks .zero { opacity: .45; }
.facet select, .sort select { font: .9rem var(--body-font); padding: .45em .6em; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); max-width: 100%; }
.facet select { width: 100%; }
.facet .link-btn { margin-top: 6px; }
.results-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.count { margin: 0 auto 0 0; font: 600 1rem var(--head-font); }
.sort { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--muted); }
.filters-toggle { display: none; }
.active { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.active:empty { display: none; }
.active button { font: .8rem var(--body-font); background: var(--accent-soft); color: var(--ink); border: 0; border-radius: 999px; padding: .3em .75em; cursor: pointer; }
.active button::after { content: " \00d7"; font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 28px 24px; margin-top: 24px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(20,30,40,.08), 0 14px 30px rgba(20,30,40,.12); }
.card a { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.card a:focus-visible { outline-offset: -3px; }
.card-media { aspect-ratio: 3 / 2; background: var(--surface-2); overflow: hidden; position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { width: 100%; height: 100%; display: flex; align-items: flex-end; padding: 14px 16px; color: var(--ink-2);
  background-color: var(--surface-2);
  background-image: repeating-radial-gradient(circle at 70% 120%, transparent 0 14px, color-mix(in srgb, var(--ink) 9%, transparent) 14px 15px); }
.ph span { font: 800 2.2rem/1 var(--head-font); opacity: .55; }
.ph-ocr span::after { content: " newsletter"; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-left: .4em; }
.photo-n { position: absolute; right: 8px; bottom: 8px; background: rgba(10,15,20,.72); color: #fff; font: 600 .72rem var(--head-font); padding: .25em .6em; border-radius: 999px; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 1.22rem; font-weight: 700; margin: 0 0 .35em; }
.card .meta { font-size: .84rem; color: var(--muted); margin: 0 0 .6em; }
.card .excerpt { font-size: .9rem; color: var(--ink-2); margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card .excerpt mark, .card .hit mark { background: color-mix(in srgb, var(--accent) 25%, transparent); color: inherit; border-radius: 2px; }
.card .hit { font-size: .84rem; color: var(--ink-2); margin: .6em 0 0; font-style: italic; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; }
.badge { font: 600 .68rem var(--head-font); text-transform: uppercase; letter-spacing: .06em; padding: .25em .6em; border-radius: 4px; background: var(--surface-2); color: var(--ink-2); }
.badge-ocr { background: var(--warn-bg); color: var(--warn-ink); }
.more { text-align: center; margin: 32px 0 0; }
.empty-msg { grid-column: 1 / -1; padding: 40px 0; text-align: center; color: var(--muted); }
@media (max-width: 900px) {
  .browse { grid-template-columns: 1fr; gap: 0; padding-top: 20px; }
  .filters { position: static; max-height: none; display: none; background: var(--surface); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; box-shadow: var(--shadow); }
  .filters.open { display: block; }
  .filters-toggle { display: inline-block; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
}

/* report page */
.page-pad { padding-top: 36px; }
.narrow { max-width: 860px; }
.crumbs { font-size: .82rem; color: var(--muted); padding: 22px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--ink-2); }
.crumbs span[aria-current] { color: var(--muted); }
.report-head { padding: 18px 0 20px; max-width: 920px; }
.report-head h1 { font-size: clamp(2rem, 5vw, 3.3rem); font-weight: 800; color: var(--brand); }
.report-sub { color: var(--ink-2); font-size: 1.05rem; margin: 0; }
.report-hero { margin: 0 0 32px; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.report-hero img { width: 100%; max-height: 72vh; object-fit: cover; display: block; }
.report-hero figcaption { padding: 10px 14px; font-size: .88rem; color: var(--muted); background: var(--surface); }
.report-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.report-layout .facts { order: 2; position: sticky; top: 84px; }
.report-layout .prose { order: 1; }
@media (max-width: 960px) {
  .report-layout { grid-template-columns: 1fr; gap: 8px; }
  .report-layout .facts { order: 0; position: static; }
}
.facts dl, .provenance dl { margin: 0; }
.facts { background: var(--surface); border-radius: var(--radius); padding: 6px 18px; box-shadow: var(--shadow); }
.fact { padding: 10px 0; border-bottom: 1px dotted var(--line); display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
.fact:last-child { border-bottom: 0; }
.fact dt { font: 700 .72rem/1.9 var(--head-font); text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.fact dd { margin: 0; font-size: .93rem; overflow-wrap: anywhere; }
.fact .sub { color: var(--muted); }
.people { list-style: none; margin: 0; padding: 0; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.tags a { display: inline-block; font-size: .8rem; text-decoration: none; background: var(--accent-soft); color: var(--ink); padding: .15em .6em; border-radius: 999px; }
.tags a:hover { background: var(--accent); color: var(--accent-ink); }
.prose { font-size: 1.06rem; line-height: 1.75; max-width: 46rem; overflow-wrap: break-word; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; } .prose h3 { font-size: 1.2rem; margin-top: 1.4em; } .prose h4 { font-size: 1.05rem; margin-top: 1.2em; }
.media { margin: 1.2em 0; } .media video { width: 100%; max-height: 70vh; background: #000; border-radius: 8px; }
.media audio { width: 100%; }
.media.embed { position: relative; aspect-ratio: 16 / 9; } .media.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }
.prose blockquote { margin: 1.2em 0; padding: .2em 1.1em; border-left: 4px solid var(--accent); color: var(--ink-2); background: var(--surface); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.prose img { border-radius: 6px; display: block; }
.prose .fig { margin: 1.6em 0; }
.prose .fig a { display: block; }
.prose .fig img { margin: 0 auto; max-height: 80vh; width: auto; }
.prose .fig-multi { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.prose .fig-multi figcaption { grid-column: 1 / -1; }
.prose figcaption { font-size: .88rem; color: var(--muted); margin-top: .5em; line-height: 1.5; }
.prose pre { overflow: auto; background: var(--surface-2); padding: 12px; border-radius: 6px; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
.prose table { border-collapse: collapse; font-size: .9rem; min-width: 50%; }
.prose th, .prose td { border: 1px solid var(--line); padding: .35em .6em; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); }
.notice { background: var(--warn-bg); color: var(--warn-ink); border-radius: 8px; padding: 10px 14px; font-size: .92rem; }
.notice-soft { background: var(--surface-2); color: var(--ink-2); }
.gallery, .provenance { margin-top: 48px; border-top: 2px solid var(--ink); padding-top: 18px; }
.gallery h2, .provenance h2 { font-size: 1.35rem; }
.count-pill { display: inline-block; font: 600 .78rem var(--head-font); background: var(--surface-2); color: var(--ink-2); border-radius: 999px; padding: .2em .7em; vertical-align: middle; margin-left: .3em; }
.gallery-grid { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gallery-grid a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--surface-2); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.gallery-grid a:hover img { transform: scale(1.04); }
.provenance dl { max-width: 900px; }
.provenance .fact { grid-template-columns: 150px 1fr; }
@media (max-width: 560px) { .provenance .fact, .fact { grid-template-columns: 1fr; gap: 0; } }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); }
.pager a:hover { box-shadow: 0 0 0 2px var(--accent); }
.pager .next { text-align: right; }
.pager-label { font: 700 .72rem var(--head-font); text-transform: uppercase; letter-spacing: .09em; color: var(--accent); }
.pager-title { font: 700 1.05rem/1.25 var(--head-font); }
.pager-date { font-size: .82rem; color: var(--muted); }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; } }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8,11,14,.94); display: none; flex-direction: column; align-items: center; justify-content: center; padding: 48px 56px 16px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; border-radius: 4px; }
.lightbox p { color: #dfe5e9; font-size: .9rem; margin: 10px 0 0; text-align: center; max-width: 60rem; min-height: 1.4em; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 10px; right: 12px; } .lb-prev { left: 8px; top: 50%; } .lb-next { right: 8px; top: 50%; }
.lb-count { position: absolute; top: 18px; left: 18px; color: #aab4bb; font-size: .82rem; }

/* timeline + about */
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: var(--brand); }
.lead-dark { color: var(--ink-2); font-size: 1.08rem; margin: 0; }
.chart { display: flex; gap: 14px; overflow-x: auto; padding: 12px 0 4px; }
.decade { flex: 1 0 auto; }
.decade-bars { display: grid; grid-template-columns: repeat(10, 18px); gap: 3px; height: 150px; align-items: end; border-bottom: 2px solid var(--ink); }
.bar { position: relative; height: max(var(--h), 4px); background: var(--accent); border-radius: 3px 3px 0 0; display: block; text-decoration: none; }
.bar:hover { filter: brightness(1.15); }
.bar-empty { height: 0; background: none; }
.bar-n { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: .62rem; color: var(--muted); margin-bottom: 2px; }
.bar-y { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); font-size: .6rem; color: var(--muted); margin-top: 3px; }
.decade-label { font: 700 .8rem var(--head-font); margin: 18px 0 0; color: var(--ink-2); }
.year-jump { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 18px 0 8px; font-size: .9rem; }
.tl-year { margin-top: 36px; scroll-margin-top: 80px; }
.tl-year h2 { font-size: 1.6rem; border-bottom: 2px solid var(--ink); padding-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-filter { margin-left: auto; font: 600 .85rem var(--body-font); }
.tl-list { list-style: none; padding: 0; margin: 0; }
.tl-list li { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 0 16px; padding: 9px 0; border-bottom: 1px dotted var(--line); }
.tl-date { color: var(--muted); font-size: .88rem; grid-row: span 2; padding-top: 2px; }
.tl-title { font: 700 1.02rem var(--head-font); text-decoration: none; color: var(--ink); }
.tl-title:hover { color: var(--accent); text-decoration: underline; }
.tl-meta { font-size: .85rem; color: var(--muted); }
@media (max-width: 600px) { .tl-list li { grid-template-columns: 1fr; } .tl-date { grid-row: auto; } }
table.mini { border-collapse: collapse; font-size: .95rem; margin: 0 0 1.2em; }
table.mini td { padding: .3em 1em .3em 0; border-bottom: 1px dotted var(--line); }
table.mini td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
/* submit page */
[hidden] { display: none !important; }
.poc { margin: 0 0 24px; }
.sub-form { display: grid; gap: 24px; }
.sub-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 24px; }
.sub-form .sub-card { margin-bottom: 0; }
.sub-card h2 { font-size: 1.2rem; }
.sub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; }
.sub-grid .full { grid-column: 1 / -1; }
.field label { display: block; font: 700 .78rem var(--head-font); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); margin-bottom: 5px; }
.req { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); margin-left: .4em; }
.field input, .field select, .ed textarea, .photo-list input { width: 100%; font: 16px var(--body-font); padding: .55em .7em; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); }
.field input[aria-invalid="true"] { border-color: #c0392b; box-shadow: 0 0 0 1px #c0392b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ed { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 20px; }
.ed-tabs { display: none; grid-column: 1 / -1; gap: 4px; border-bottom: 1px solid var(--line); }
.ed-tabs button { font: 600 .9rem var(--head-font); background: none; border: 0; color: var(--ink-2); padding: 8px 14px; cursor: pointer; }
.ed-tabs button[aria-selected="true"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.ed-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ed-bar button, .photo-list button { font: 600 .82rem var(--head-font); background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: .45em .8em; cursor: pointer; }
.ed-bar button:hover, .photo-list button:hover { border-color: var(--accent); }
.ed textarea { min-height: 24rem; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 15px; line-height: 1.5; }
.preview { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; min-height: 24rem; max-width: none; font-size: 1rem; overflow-wrap: anywhere; }
.preview:empty::before { content: "The preview appears here."; color: var(--muted); }
.preview .img-missing { display: inline-block; padding: 6px 10px; background: var(--surface-2); color: var(--muted); border-radius: 6px; font-size: .88rem; }
.photo-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.photo-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.photo-list img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; grid-row: span 3; }
.photo-list .pn { font: 700 .85rem var(--head-font); } .photo-list .pf { font-weight: 400; color: var(--muted); margin-left: .4em; overflow-wrap: anywhere; }
.photo-list .pb { display: flex; gap: 6px; }
@media (max-width: 900px) {
  .ed { grid-template-columns: 1fr; }
  .ed-tabs { display: flex; }
  .ed[data-tab="write"] .ed-prev, .ed[data-tab="preview"] .ed-write { display: none; }
}
.sub-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 4px; }
#sub-errors ul { margin: .4em 0 0; padding-left: 1.2em; }
#confirm-meta { box-shadow: none; background: var(--surface-2); margin: 0 0 20px; }
#confirm-meta .fact { grid-template-columns: 120px 1fr; }
@media print { .site-head, .site-foot, .pager, .filters { display: none; } }
