/* directory.nihov.org's own stylesheet (#1108). Only a redesigned page type loads it (html/includes/facelift.php);
   every other page keeps the old CSS. No cascade layers, and nothing a page needs may depend on a newer feature:
   2.6% of record views in September 2026 came from browsers as old as iOS 10. docs/design-system.md has the rules. */

:root {
  --brand: #26231a;
  --brand-2: #3a3527;
  --gold: #f6b534;
  --gold-ink: #8a5a00;
  --paper: #f7f5ef;
  --surface: #ffffff;
  --surface-2: #f2efe6;
  --ink: #1d1a14;
  --ink-2: #555046;
  --line: #e4ded0;
  --link: #8c3a14;
  --focus: #1a5fd0;
  --mark: #fbe7bd;
  --primary-bg: #26231a;
  --primary-fg: #ffffff;
  --primary-icon: #f6b534;
  --primary-detail: #e5dfcf;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --radius: 12px;
  --radius-sm: 8px;
  --tap: 44px;
  --measure: 68ch;
  --page: 72rem;
}

/* The dark theme (#1116): the system's preference unless the visitor chose Light, or the visitor's choice of Dark, which
   frame.php's head script sets before the page draws. Only the tokens change; a browser without custom properties keeps
   the light literals. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #0f0d0a; --brand-2: #26231a; --gold-ink: #f6b534; --paper: #15130f; --surface: #1f1c16; --surface-2: #2a261e;
    --ink: #f1ece0; --ink-2: #bdb5a4; --line: #3a3428; --link: #f2a77a; --focus: #8ab4ff; --mark: #6b4a1f;
    --primary-bg: #f6b534; --primary-fg: #15130f; --primary-icon: #15130f; --primary-detail: #3a3428;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #0f0d0a; --brand-2: #26231a; --gold-ink: #f6b534; --paper: #15130f; --surface: #1f1c16; --surface-2: #2a261e;
  --ink: #f1ece0; --ink-2: #bdb5a4; --line: #3a3428; --link: #f2a77a; --focus: #8ab4ff; --mark: #6b4a1f;
  --primary-bg: #f6b534; --primary-fg: #15130f; --primary-icon: #15130f; --primary-detail: #3a3428;
  color-scheme: dark;
}

/* Until #1116, index.php keeps its own copies of the rules below for the pages not yet redesigned. */

/* Off-screen rather than display:none, which would take it out of the tab order (#254). */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 8px 16px;
  background: #26231a;
  background: var(--brand);
  color: #ffffff;
}
.skip-link:focus {
  left: 0;
}
/* Not display:none: the feedback form's decoy field is there to be filled by bots, and a bot that reads CSS skips a
   hidden input (#631). */
.nihov-offscreen {
  position: absolute;
  left: -9999px;
}
.nihov-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.nihov-asof {
  margin-left: 6px;
  color: #555046;
  color: var(--ink-2);
  font-size: 12px;
  white-space: nowrap;
}
/* Below 16px, iOS zooms the page when the box takes focus. */
#nihov-search {
  font-size: 16px;
}

/* ---- Base. Every var() follows a plain value, which a browser without custom properties keeps. Layout is block flow
   first; grid and flex only arrange what already reads in order, so a browser without them shows a single column. ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: #f7f5ef; background: var(--paper);
  color: #1d1a14; color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
}
h1, h2, h3 {
  margin: 0;
  font-family: Georgia, serif; font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: #1d1a14; color: var(--ink);
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
p, ul, ol, dl, dd, figure { margin: 0; }
img, svg { max-width: 100%; }
a { color: #8c3a14; color: var(--link); text-decoration: underline; }
a:hover { text-decoration-thickness: 2px; }
a:focus, button:focus, input:focus { outline: 3px solid #1a5fd0; outline: 3px solid var(--focus); outline-offset: 2px; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; }
/* A sticky header must not cover the target a link jumps to (WCAG 2.4.11). */
[id] { scroll-margin-top: 80px; }
.icon { width: 20px; height: 20px; flex: none; vertical-align: middle; }
@media (min-width: 900px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.45rem; }
}

/* ---- Header ---- */
.site-header { background: #26231a; background: var(--brand); color: #ffffff; }
.site-bar {
  display: flex;
  align-items: center;
  max-width: 72rem; max-width: var(--page);
  margin: 0 auto;
  padding: 8px 16px;
  min-height: 56px;
}
.brand { display: flex; align-items: center; color: #f6b534; color: var(--gold); text-decoration: none; margin-right: auto; }
.brand-mark { width: 84px; height: 28px; flex: none; }
.brand-name {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid #5a523f;
  color: #f1ece0;
  font-family: Georgia, serif; font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.15;
  max-width: 9.5em;
}
.site-nav { display: none; }
.site-admin { color: #f6b534; color: var(--gold); margin-left: 12px; font-weight: 600; font-size: 0.9rem; }
.menu-button {
  display: inline-flex;
  align-items: center;
  min-width: 44px; min-width: var(--tap);
  min-height: 44px; min-height: var(--tap);
  margin-left: 12px;
  padding: 0 10px;
  border: 1px solid #5a523f;
  border-radius: 10px;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.menu-button span { margin-left: 6px; }
.site-search { position: relative; max-width: 72rem; max-width: var(--page); margin: 0 auto; padding: 0 16px 12px; }
.site-search .icon { position: absolute; left: 28px; top: 13px; color: #555046; color: var(--ink-2); pointer-events: none; }
#nihov-search {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 0 16px 0 42px;
  border: 1px solid #e4ded0; border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff; background: var(--surface);
  color: #1d1a14; color: var(--ink);
}
.site-menu { background: #3a3527; background: var(--brand-2); color: #f1ece0; }
.site-menu-in { max-width: 72rem; max-width: var(--page); margin: 0 auto; padding: 16px; }
.menu-group + .menu-group { margin-top: 20px; }
.menu-heading {
  margin-bottom: 6px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-family: var(--font-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f6b534; color: var(--gold);
}
.menu-group ul { list-style: none; padding: 0; columns: 2 10rem; column-gap: 16px; }
.menu-group li { break-inside: avoid; }
.menu-group a { display: inline-block; padding: 6px 0; min-height: 24px; color: #f1ece0; text-decoration: none; }
.menu-group a:hover { text-decoration: underline; }
@media (min-width: 900px) {
  .site-bar { min-height: 68px; }
  .brand-mark { width: 120px; height: 40px; }
  .brand-name { font-size: 1.1rem; max-width: none; }
  .site-nav { display: flex; margin-left: 24px; }
  .site-nav a { padding: 10px 14px; border-radius: 8px; color: #f1ece0; text-decoration: none; font-weight: 500; }
  .site-nav a + a { margin-left: 4px; }
  .site-nav a:hover, .site-nav a[aria-current] { background: #3a3527; background: var(--brand-2); color: #f6b534; color: var(--gold); }
  .menu-group ul { columns: 4 10rem; }
}

/* ---- The page: breadcrumbs, then the content column ---- */
.page { max-width: 72rem; max-width: var(--page); margin: 0 auto; padding: 12px 16px 32px; }
.breadcrumb { margin-bottom: 8px; font-size: 0.9rem; color: #555046; color: var(--ink-2); }
.breadcrumb ol { list-style: none; padding: 0; }
.breadcrumb li { display: none; }
/* On a phone, only the way up: every rung stays in the page, so it still matches the BreadcrumbList (#113). */
.breadcrumb li:nth-last-child(2) { display: inline; }
.breadcrumb li:nth-last-child(2) a:before { content: "\2039\00a0"; }
.breadcrumb a, .breadcrumb span { display: inline-block; padding: 8px 0; color: #555046; color: var(--ink-2); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
@media (min-width: 700px) {
  .breadcrumb li { display: inline; }
  .breadcrumb li:nth-last-child(2) a:before { content: none; }
  .breadcrumb li + li:before { content: "/"; margin: 0 6px; color: #b9b19f; }
}

/* ---- Cards, facts and buttons ---- */
.card {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #e4ded0; border: 1px solid var(--line);
  border-radius: 12px; border-radius: var(--radius);
  background: #ffffff; background: var(--surface);
  box-shadow: 0 1px 2px rgba(30, 25, 15, 0.06), 0 2px 8px rgba(30, 25, 15, 0.06);
}
.card > h2 { margin-bottom: 12px; font-size: 1.2rem; }
.card h3 { margin: 16px 0 6px; font-size: 1rem; }
/* The value beside its label while both fit, under it when not: wrapping, not a media query, because the card decides,
   and at 900px the side card is narrower than a phone's. Each column is 9rem, to fit the longest label ("Date of
   Incorporation", 141px) and the "Show email address" button (144px): narrowing either brings a 360px phone inline but
   wraps that label or that button to two lines (measured 2026-10-05). */
.facts .fact { display: flex; flex-wrap: wrap; align-items: baseline; }
.facts .fact + .fact { margin-top: 8px; }
.facts dt { flex: 0 0 9rem; margin-right: 12px; font-size: 0.9rem; color: #555046; color: var(--ink-2); }
.facts dd { flex: 1 1 9rem; min-width: 0; overflow-wrap: break-word; word-wrap: break-word; }
.facts .fact-value { display: block; }
.facts .fact-value + .fact-value { margin-top: 8px; }
.actions { margin-top: 16px; }
.action, .button-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 8px;
  padding: 0 16px;
  border: 1px solid #e4ded0; border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff; background: var(--surface);
  color: #1d1a14; color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
/* A <button> sizes to its text even as a flex box; the links beside it fill the row. */
.action { width: 100%; }
.action .icon, .button-secondary .icon { margin-right: 8px; color: #8a5a00; color: var(--gold-ink); }
.link-button {
  padding: 4px 0;
  border: 0;
  background: none;
  color: #8c3a14; color: var(--link);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.action-detail { font-weight: 400; color: #555046; color: var(--ink-2); }
.action:first-child { background: #26231a; background: var(--primary-bg); border-color: #26231a; border-color: var(--primary-bg); color: #ffffff; color: var(--primary-fg); }
.action:first-child .icon { color: #f6b534; color: var(--primary-icon); }
.action:first-child .action-detail { color: #e5dfcf; color: var(--primary-detail); }
@media (min-width: 480px) {
  .actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); grid-gap: 8px; }
  .actions .action { margin-top: 0; }
}

/* ---- The record page ---- */
.record-hero { padding: 12px 0 4px; }
.eyebrow { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #8a5a00; color: var(--gold-ink); }
.record-name { margin: 4px 0 6px; }
.record-alt-name { font-family: Georgia, serif; font-family: var(--font-serif); font-size: 1.2rem; color: #555046; color: var(--ink-2); }
.record-place { margin-top: 4px; font-size: 1.1rem; color: #555046; color: var(--ink-2); }
.record-rank { font-weight: 600; color: #8a5a00; color: var(--gold-ink); }
.record-photo { margin-top: 16px; }
.record-photo img { display: block; width: 100%; max-width: 640px; height: auto; border-radius: 12px; border-radius: var(--radius); }
/* A cleric's photo is square and stays at 320 px (#1074): wider, the 320 px crop would be upscaled. */
.record-portrait img { max-width: 320px; }
.record-summary p + p { margin-top: 8px; }
/* The record's link chips, link_display.php's markup: a wrapping row, margins rather than flex gap for old browsers. */
.link-row { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; }
.link-row li { margin: 0 8px 8px 0; }
.link-row li > a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #f2efe6; background: var(--surface-2);
  color: #1d1a14; color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
}
.link-row .link-icon { width: 16px; height: 16px; margin-right: 6px; flex: none; }
.link-row .link-record { font-size: 0.85rem; }
.map { position: relative; height: 0; padding-top: 66.67%; margin-bottom: 12px; overflow: hidden; border-radius: 8px; background: #f2efe6; background: var(--surface-2); }
.map iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.address { font-style: normal; }
.address span { display: block; }
.address-links { margin: 8px 0 12px; }
.address-links a { display: inline-block; padding: 8px 0; }
.people { list-style: none; padding: 0; }
.person { display: flex; align-items: center; padding: 8px 0; }
.person + .person { border-top: 1px solid #e4ded0; border-top: 1px solid var(--line); }
.person-photo { flex: none; margin-right: 12px; }
.person-photo img { display: block; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #f2efe6; background: var(--surface-2); }
.person-name { display: inline-block; padding: 4px 0; font-weight: 600; }
.person-detail { display: block; font-size: 0.9rem; color: #555046; color: var(--ink-2); }
.person-detail a { display: inline-block; padding: 2px 0; }
.facts .fact-note { display: block; font-size: 0.9rem; color: #555046; color: var(--ink-2); }
.serving-diocese { margin-bottom: 8px; }
.parishes { list-style: none; padding: 0; }
.parishes li + li { margin-top: 8px; }
.parishes a { display: inline-block; padding: 4px 0; font-weight: 600; }
.parish-place { display: block; font-size: 0.9rem; color: #555046; color: var(--ink-2); }
.qr summary { min-height: 44px; min-height: var(--tap); padding: 10px 0; cursor: pointer; color: #8c3a14; color: var(--link); }
.qr img { display: block; max-width: 100%; height: auto; margin-top: 8px; }
.record-bio { overflow-wrap: break-word; word-wrap: break-word; }
.record-bio p + p { margin-top: 12px; }
.record-bio img { max-width: 100%; height: auto; }
.record-edit { margin-top: 24px; }
.record-updated { margin-top: 16px; font-size: 0.9rem; color: #555046; color: var(--ink-2); }
/* Two columns on a wide screen, the address and map spanning the right. The last row is 1fr so the tall side card does not
   stretch the rows beside it; margins, not a row gap, so an absent card leaves no gap. */
@media (min-width: 900px) {
  .record-body {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto 1fr;
    grid-column-gap: 24px;
    align-items: start;
  }
  .record-body > .card { grid-column: 1; }
  .record-body > .card-side { grid-column: 2; grid-row: 1 / -1; }
}
@media (min-width: 600px) {
  .record-edit { display: flex; }
  .record-edit .button-secondary + .button-secondary { margin-left: 8px; }
  .record-edit .button-secondary { margin-top: 0; }
  .people { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); grid-column-gap: 16px; }
  .person + .person { border-top: 0; }
}

/* ---- Lists, the home page and content pages (#1113) ---- */
.page-heading { margin: 8px 0; }
.list-count { margin-bottom: 8px; color: #555046; color: var(--ink-2); }
.list-filter { margin: 8px 0 16px; }
.list-filter label { display: block; margin-bottom: 4px; font-size: 0.9rem; color: #555046; color: var(--ink-2); }
.list-filter input {
  width: 100%; max-width: 28rem; min-height: 44px; padding: 0 12px;
  border: 1px solid #e4ded0; border: 1px solid var(--line); border-radius: 10px;
  background: #ffffff; background: var(--surface); color: #1d1a14; color: var(--ink);
  font: inherit; font-size: 16px;
}
.list-filter-none { margin-top: 8px; color: #555046; color: var(--ink-2); }
.group { margin-top: 16px; }
.group-heading { margin: 20px 0 6px; font-family: Georgia, serif; font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; }
.group-sub { margin-top: 16px; font-size: 1.05rem; }
/* In a card (a diocese's churches) the tiers sit one level lower; .card h3 would otherwise shrink the country below its states. */
.card .group-heading { font-size: 1.1rem; }
.card .group-sub { font-size: 1rem; }
.group-heading a { color: #1d1a14; color: var(--ink); text-decoration: none; }
.group-heading a:hover { text-decoration: underline; }
.rows { list-style: none; padding: 0; border-top: 1px solid #e4ded0; border-top: 1px solid var(--line); }
.rows > li { padding: 10px 0; border-bottom: 1px solid #e4ded0; border-bottom: 1px solid var(--line); }
.row > a { font-weight: 600; }
.row-meta { display: block; margin-top: 2px; font-size: 0.9rem; color: #555046; color: var(--ink-2); }
.row-logo { display: inline-block; width: 24px; margin-right: 8px; vertical-align: middle; }
.row-logo img { display: block; }
.tabs { margin-top: 16px; }
.tabs a {
  display: inline-block; min-height: 44px; margin: 0 8px 8px 0; padding: 10px 16px;
  border: 1px solid #e4ded0; border: 1px solid var(--line); border-radius: 999px;
  background: #ffffff; background: var(--surface); color: #1d1a14; color: var(--ink); font-weight: 600; text-decoration: none;
}
.diocese-hero { display: flex; align-items: center; }
.diocese-logo { flex: none; margin-right: 16px; }
.home-hero { padding: 16px 0 8px; }
.home-hero .lede { max-width: 40rem; margin: 8px 0 16px; font-size: 1.15rem; color: #555046; color: var(--ink-2); }
.site-search.home-search { max-width: 40rem; margin: 0; padding: 0; }
.home-search .icon { left: 12px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 8px; margin-top: 16px; list-style: none; padding: 0; }
.stats a {
  display: block; height: 100%; padding: 14px 16px; border: 1px solid #e4ded0; border: 1px solid var(--line); border-radius: 12px;
  background: #ffffff; background: var(--surface); color: #1d1a14; color: var(--ink); text-decoration: none;
}
.stat-n { display: block; font-family: Georgia, serif; font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600; }
.stat-label { color: #555046; color: var(--ink-2); }
.country-list { list-style: none; padding: 0; columns: 2 10rem; column-gap: 24px; }
.country-list li { padding: 6px 0; break-inside: avoid; }
.country-list .row-meta { display: inline; margin-left: 4px; }
.prose { max-width: 68ch; }
.prose h1 { margin: 8px 0 12px; }
.prose h2 { margin: 24px 0 8px; }
.prose h3 { margin: 16px 0 6px; font-size: 1.1rem; }
.prose p, .prose ul { margin-top: 10px; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose hr { margin: 12px 0; border: 0; border-top: 1px solid #e4ded0; border-top: 1px solid var(--line); }
@media (min-width: 768px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}

/* The search suggestions (#1113). js/record_picker.js draws them in the old pages' colours and injects its rules after
   this stylesheet, so these name both of the popup's classes to outrank its single one. */
.nrp-pop.nrp-go { border: 1px solid #e4ded0; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(30, 25, 15, 0.16); }
.nrp-pop.nrp-go a.nrp-row { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-family: var(--font-sans); color: #1d1a14; color: var(--ink); }
.nrp-pop.nrp-go .nrp-nm { color: #1d1a14; color: var(--ink); font-weight: 600; }
.nrp-pop.nrp-go .nrp-dt { color: #555046; color: var(--ink-2); }
.nrp-pop.nrp-go .nrp-ph { border-radius: 50%; }
.nrp-pop.nrp-go .nrp-list mark { background: #fbe7bd; background: var(--mark); color: inherit; }
.nrp-pop.nrp-go a.nrp-row[aria-selected="true"] { background: #26231a; background: var(--brand); }
.nrp-pop.nrp-go a.nrp-row[aria-selected="true"] .nrp-nm { color: #ffffff; }
.nrp-pop.nrp-go a.nrp-row[aria-selected="true"] .nrp-dt { color: #e5dfcf; }
.nrp-pop.nrp-go a.nrp-row[aria-selected="true"] mark { background: #8a5a00; background: var(--gold-ink); color: #ffffff; }
.nrp-pop.nrp-go .nrp-foot { border-top-color: #e4ded0; border-top-color: var(--line); color: #555046; color: var(--ink-2); }

/* ---- The map page (#1116) ---- */
.map-main { max-width: 72rem; max-width: var(--page); margin: 0 auto; padding: 12px 16px 24px; }
.map-bar { display: flex; flex-wrap: wrap; align-items: center; }
.map-title { flex: 1 1 100%; margin: 4px 0 8px; font-size: 1.4rem; }
.map-switch { display: flex; margin: 0 12px 8px 0; }
.map-switch a {
  min-height: 44px; padding: 10px 18px; border: 1px solid #e4ded0; border: 1px solid var(--line);
  background: #ffffff; background: var(--surface); color: #1d1a14; color: var(--ink); font-weight: 600; text-decoration: none;
}
.map-switch a:first-child { border-radius: 999px 0 0 999px; }
.map-switch a + a { border-left: 0; border-radius: 0 999px 999px 0; }
.map-switch a[aria-current] { border-color: #26231a; border-color: var(--primary-bg); background: #26231a; background: var(--primary-bg); color: #ffffff; color: var(--primary-fg); }
.map-state { display: flex; align-items: center; margin-bottom: 8px; }
.map-state span { margin-right: 8px; font-size: 0.9rem; color: #555046; color: var(--ink-2); }
.map-state select {
  min-height: 44px; padding: 0 12px; border: 1px solid #e4ded0; border: 1px solid var(--line); border-radius: 10px;
  background: #ffffff; background: var(--surface); color: #1d1a14; color: var(--ink); font: inherit; font-size: 16px;
}
.map-canvas {
  height: 70vh; min-height: 420px; overflow: hidden; border: 1px solid #e4ded0; border: 1px solid var(--line); border-radius: 12px;
  background: #f2efe6; background: var(--surface-2);
}
.map-sheet { margin-top: 12px; border: 1px solid #e4ded0; border: 1px solid var(--line); border-radius: 12px; background: #ffffff; background: var(--surface); }
.map-sheet summary { min-height: 48px; padding: 12px 16px; font-weight: 600; cursor: pointer; }
.map-legend { display: flex; flex-wrap: wrap; padding: 0 16px 12px; list-style: none; }
.map-legend li { display: flex; align-items: center; margin: 0 16px 8px 0; }
.map-legend img { margin-right: 6px; }
.map-table { overflow-x: auto; padding: 0 16px 16px; }
.map-table table { width: 100%; border-collapse: collapse; }
.map-table caption { margin-bottom: 6px; font-weight: 600; text-align: left; }
.map-table th, .map-table td { padding: 6px 8px; border-bottom: 1px solid #e4ded0; border-bottom: 1px solid var(--line); text-align: left; }
/* On a phone the sheet stays at the screen's foot while the map is in view, so the legend is one tap away. */
@media (max-width: 699px) {
  .map-sheet { position: -webkit-sticky; position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -4px 16px rgba(30, 25, 15, 0.12); }
}

/* ---- Footer ---- */
.site-footer { margin-top: 48px; background: #26231a; background: var(--brand); color: #d9d2c1; }
.site-footer-in { max-width: 72rem; max-width: var(--page); margin: 0 auto; padding: 32px 16px; }
.site-footer nav + nav { margin-top: 20px; }
.site-footer h2 {
  margin-bottom: 6px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-family: var(--font-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f6b534; color: var(--gold);
}
.site-footer ul { list-style: none; padding: 0; }
.site-footer a { display: inline-block; padding: 8px 0; color: #f1ece0; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.theme-switch { margin-top: 16px; }
.theme-switch > span { display: block; margin-bottom: 6px; font-size: 0.85rem; color: #bdb5a4; }
.theme-switch button {
  min-height: 44px; margin: 0 6px 6px 0; padding: 0 14px; border: 1px solid #5a523f; border-radius: 999px;
  background: transparent; color: #f1ece0; font: inherit; cursor: pointer;
}
.theme-switch button[aria-pressed="true"] { border-color: #f6b534; background: #f6b534; color: #15130f; font-weight: 600; }
@media (min-width: 700px) {
  .site-footer-in { display: grid; grid-template-columns: repeat(3, 1fr) auto; grid-column-gap: 32px; }
  .site-footer nav + nav { margin-top: 0; }
}
