/* ==========================================================================
   Buckie & District War Memorial
   Stone, ink and bronze: a quiet, archival look for a place of remembrance.
   ========================================================================== */

:root {
  --ink: #141619;
  --ink-2: #1c1f23;
  --ink-3: #2a2e33;
  --paper: #f6f3ed;
  --paper-2: #eee8dd;
  --paper-3: #e4dbcb;
  --surface: #fffdf9;
  --line: #e0d7c7;
  --line-2: #cdbfa8;

  --text: #1c1f23;
  --text-2: #464b52;
  --text-3: #666b72;
  --on-ink: #ede8df;
  --on-ink-2: #b9b1a4;

  --bronze: #7a5c32;        /* text & links on light backgrounds */
  --bronze-2: #a8834b;      /* rules, icons */
  --bronze-3: #cfae74;      /* on dark backgrounds */
  --poppy: #b3232a;

  --ww1: #5c5829; --ww1-bg: #ebe8d3;
  --ww2: #2f4c66; --ww2-bg: #dfe7ee;

  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 25, .05), 0 1px 3px rgba(20, 22, 25, .07);
  --shadow: 0 6px 18px rgba(20, 22, 25, .08), 0 1px 3px rgba(20, 22, 25, .06);
  --shadow-lg: 0 24px 60px rgba(20, 22, 25, .18);

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bronze); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--bronze-2); outline-offset: 3px; border-radius: 3px; }
button { font: inherit; color: inherit; }
address { font-style: normal; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; color: inherit; letter-spacing: -.005em; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.25rem); }
h2 { font-size: clamp(2rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.5rem; }
::selection { background: #e7d6b6; color: var(--ink); }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap--narrow { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 600; }
.skip-link:focus { top: 12px; }

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  margin: 0 0 1rem;
  font: 700 .75rem/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  color: var(--bronze);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; }
.eyebrow--plain::before { display: none; }
.on-ink .eyebrow, .eyebrow--light, .page-head .eyebrow, .profile-head .eyebrow { color: var(--bronze-3); }

.lead { font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--text-2); }
.prose { max-width: 68ch; }
.prose p, .prose li { color: var(--text-2); }
.prose h2 { margin-top: 1.6em; }
.prose > h2:first-child, .prose .eyebrow + h2 { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .7rem 1.35rem;
  border: 1px solid transparent; border-radius: 6px;
  font: 600 1rem/1.1 var(--sans); letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--bronze); color: #fff; }
.btn--bronze { background: var(--bronze-3); color: var(--ink); }
.btn--bronze:hover { background: #e0c290; color: var(--ink); }
.btn--outline { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn--outline:hover { border-color: var(--ink); color: var(--ink); background: var(--surface); }
.btn--ghost-light { border-color: rgba(237, 232, 223, .35); color: var(--on-ink); background: transparent; }
.btn--ghost-light:hover { border-color: var(--bronze-3); color: #fff; }
.btn--small { min-height: 40px; padding: .5rem .95rem; font-size: .9375rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45em;
  font-weight: 600; text-decoration: none; color: var(--bronze);
}
.link-arrow .icon { transition: transform .2s var(--ease); }
.link-arrow:hover { color: var(--ink); }
.link-arrow:hover .icon { transform: translateX(3px); }
.on-ink .link-arrow { color: var(--bronze-3); }
.on-ink .link-arrow:hover { color: #fff; }

.tag {
  display: inline-block; padding: .2em .6em; border-radius: 4px;
  font: 700 .6875rem/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  background: var(--paper-2); color: var(--text-2);
}
.tag--ww1 { background: var(--ww1-bg); color: var(--ww1); }
.tag--ww2 { background: var(--ww2-bg); color: var(--ww2); }

/* ---------- Poppy ---------- */

.poppy { width: 28px; height: 28px; display: block; }
.poppy--muted { opacity: .35; filter: grayscale(1); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(20, 22, 25, .97);
  color: var(--on-ink);
  border-bottom: 1px solid rgba(207, 174, 116, .22);
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
@supports (backdrop-filter: blur(10px)) {
  .site-header { background: rgba(20, 22, 25, .9); backdrop-filter: saturate(140%) blur(12px); }
}
.site-header--overlay { position: fixed; inset: 0 0 auto; background: transparent; border-color: transparent; backdrop-filter: none; }
.site-header--overlay.is-scrolled { background: rgba(20, 22, 25, .94); border-color: rgba(207, 174, 116, .22); }
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand:hover { color: #fff; }
.brand__poppy { width: 34px; height: 34px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__small { font: 700 .6875rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--bronze-3); margin-bottom: 5px; }
.brand__big { font: 600 1.5rem/1 var(--serif); letter-spacing: .01em; }

.site-nav ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: inline-flex; align-items: center; gap: .45em;
  padding: 10px 14px; border-radius: 6px;
  color: var(--on-ink); text-decoration: none; font-weight: 600; font-size: .96875rem;
  position: relative;
}
.site-nav a:not(.site-nav__cta)::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1px;
  background: var(--bronze-3); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.site-nav a:hover { color: #fff; }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: #fff; }
.site-nav__cta { margin-left: 10px; border: 1px solid rgba(207, 174, 116, .55); color: var(--bronze-3) !important; }
.site-nav__cta:hover, .site-nav__cta[aria-current="page"] { background: var(--bronze-3); border-color: var(--bronze-3); color: var(--ink) !important; }

.nav-toggle { display: none; }

@media (max-width: 980px) {
  .nav-toggle {
    display: inline-grid; place-items: center; width: 46px; height: 46px; margin-right: -8px;
    background: none; border: 0; border-radius: 6px; color: var(--on-ink); cursor: pointer;
  }
  .nav-toggle .icon { width: 26px; height: 26px; grid-area: 1 / 1; }
  .nav-toggle__close { display: none; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--ink); border-bottom: 1px solid rgba(207, 174, 116, .22);
    box-shadow: 0 24px 40px rgba(0, 0, 0, .35);
    padding: 8px var(--gutter) 24px;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li + li { border-top: 1px solid rgba(255, 255, 255, .07); }
  .site-nav a { padding: 16px 4px; font-size: 1.0625rem; border-radius: 0; }
  .site-nav a::after { display: none; }
  .site-nav a[aria-current="page"] { color: var(--bronze-3); }
  .site-nav__cta { display: flex !important; margin: 12px 0 0; justify-content: center; border-radius: 6px !important; padding: 14px !important; }
  .brand__big { font-size: 1.35rem; }
}

/* ---------- Home hero ---------- */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(92vh, 880px);
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 48px) 0 72px;
  background: var(--ink); color: var(--on-ink);
}
.hero__media { position: absolute; inset: 0 0 0 auto; width: min(64%, 1180px); z-index: -1; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; filter: grayscale(.85) sepia(.25) contrast(1.05) brightness(.82); }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--ink) 0%, rgba(20, 22, 25, .82) 22%, rgba(20, 22, 25, .25) 55%, rgba(20, 22, 25, .15) 100%),
    linear-gradient(0deg, rgba(20, 22, 25, .75) 0%, rgba(20, 22, 25, 0) 38%),
    linear-gradient(180deg, rgba(20, 22, 25, .6) 0%, rgba(20, 22, 25, 0) 25%);
}
.hero__content { max-width: 620px; }
.hero__title { font-size: clamp(2.9rem, 6.2vw, 5.1rem); font-weight: 600; line-height: .98; margin-bottom: .35em; color: #fff; }
.hero__title em { font-style: italic; font-weight: 500; color: var(--bronze-3); }
.hero__lead { font-size: clamp(1.125rem, 1.7vw, 1.3rem); color: var(--on-ink-2); max-width: 52ch; margin-bottom: 2rem; }
.hero__lead strong { color: var(--on-ink); font-weight: 600; }

.hero-search {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border-radius: 8px; padding: 6px 6px 6px 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  max-width: 560px;
}
.hero-search .icon { color: var(--text-3); width: 22px; height: 22px; }
.hero-search input {
  flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; outline: none;
  font: 400 1.0625rem var(--sans); color: var(--text);
}
.hero-search input::placeholder { color: #8a8f95; }
.hero-search:focus-within { box-shadow: 0 0 0 3px rgba(207, 174, 116, .6), 0 20px 50px rgba(0, 0, 0, .35); }
.hero__browse { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 1.4rem; font-size: .96875rem; color: var(--on-ink-2); }
.hero__browse a { color: var(--on-ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(207, 174, 116, .5); padding-bottom: 2px; }
.hero__browse a:hover { color: #fff; border-color: var(--bronze-3); }

@media (max-width: 860px) {
  .hero { min-height: 0; padding-top: calc(var(--header-h) + 38vw); align-items: flex-end; }
  .hero__media { width: 100%; height: 72vw; inset: 0 0 auto 0; }
  .hero__media img { object-position: 50% 20%; }
  .hero__media::after {
    background: linear-gradient(0deg, var(--ink) 2%, rgba(20, 22, 25, .55) 45%, rgba(20, 22, 25, .45) 100%);
  }
  .hero-search { padding-left: 12px; }
  .hero-search .btn { padding-inline: 1rem; }
}

/* ---------- Stats band ---------- */

.stats { background: var(--ink-2); color: var(--on-ink); border-top: 1px solid rgba(207, 174, 116, .18); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 28px 24px; border-left: 1px solid rgba(255, 255, 255, .08); text-decoration: none; color: inherit; transition: background-color .2s; }
.stat:first-child { border-left: 0; padding-left: 0; }
a.stat:hover { background: rgba(255, 255, 255, .03); color: #fff; }
.stat__num { display: block; font: 600 clamp(2.2rem, 3.6vw, 3rem)/1 var(--serif); font-variant-numeric: lining-nums; color: var(--bronze-3); margin-bottom: 6px; }
.stat__label { font-size: .9375rem; color: var(--on-ink-2); line-height: 1.35; display: block; }
@media (max-width: 760px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 22px 16px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .08); }
}

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--tight { padding: clamp(48px, 6vw, 72px) 0; }
.section--alt { background: var(--paper-2); }
.section--ink { background: var(--ink); color: var(--on-ink); }
.section--ink h2, .section--ink h3 { color: #fff; }
.section--ink .lead, .section--ink p { color: var(--on-ink-2); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(28px, 4vw, 44px); flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: .6rem 0 0; max-width: 60ch; }

/* Epigraph */
.epigraph { text-align: center; padding: clamp(72px, 10vw, 128px) 0; background: var(--paper); position: relative; }
.epigraph .poppy { width: 40px; height: 40px; margin: 0 auto 28px; }
.epigraph blockquote { margin: 0; }
.epigraph blockquote p {
  font: italic 500 clamp(1.9rem, 4vw, 3.1rem)/1.2 var(--serif);
  color: var(--ink); margin: 0 auto; max-width: 22ch; text-wrap: balance;
}
.epigraph__cite { margin-top: 1.6rem; font-size: .9375rem; color: var(--text-3); letter-spacing: .02em; }
.rule { width: 72px; height: 1px; background: var(--bronze-2); margin: 28px auto; border: 0; }

/* Split feature */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split--reverse > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--reverse > :first-child { order: 0; } }

.framed { position: relative; margin: 0; }
.framed__img { position: relative; isolation: isolate; }
.framed img { width: 100%; border-radius: 4px; box-shadow: var(--shadow-lg); }
.framed__img::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 1px solid var(--line-2); border-radius: 4px; z-index: -1; }
.framed figcaption { margin-top: 26px; font-size: .9375rem; color: var(--text-3); }
.section--ink .framed__img::before { border-color: rgba(207, 174, 116, .3); }

.facts { margin: 1.8rem 0 2rem; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.facts li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1rem; color: var(--text-2); }
.facts strong { font: 600 1.3rem/1.2 var(--serif); color: var(--bronze); font-variant-numeric: lining-nums; }

/* Panel cards */
.panel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 28px); }
@media (max-width: 980px) { .panel-grid { grid-template-columns: repeat(2, 1fr); } }
.panel-card { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.panel-card__img { position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 6px; background: var(--ink-3); }
.panel-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .4s; filter: saturate(.85); }
.panel-card:hover .panel-card__img img { transform: scale(1.04); filter: saturate(1); }
.panel-card__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20, 22, 25, .55), transparent 45%); }
.panel-card__count { position: absolute; left: 14px; bottom: 12px; z-index: 1; font: 600 .875rem/1 var(--sans); color: #fff; letter-spacing: .02em; }
.panel-card h3 { margin: 16px 0 4px; font-size: 1.55rem; }
.panel-card p { margin: 0; font-size: .9375rem; }
.panel-card:hover h3 { color: var(--bronze-3); }
.section:not(.section--ink) .panel-card:hover h3 { color: var(--bronze); }

/* Call to action band */
.cta-band { background: var(--paper-3); position: relative; overflow: hidden; }
.cta-band__inner { display: grid; grid-template-columns: auto 1fr auto; gap: clamp(20px, 4vw, 48px); align-items: center; padding: clamp(40px, 6vw, 64px) 0; }
.cta-band .poppy { width: 64px; height: 64px; }
.cta-band h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: .3em; }
.cta-band p { margin: 0; color: var(--text-2); max-width: 60ch; }
.cta-band__actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 860px) { .cta-band__inner { grid-template-columns: 1fr; } }

/* ---------- Page heads (inner pages) ---------- */

.page-head { background: var(--ink); color: var(--on-ink); padding: clamp(36px, 5vw, 64px) 0 clamp(40px, 5vw, 60px); position: relative; overflow: hidden; isolation: isolate; }
.page-head h1 { color: #fff; margin: 0 0 .25em; font-size: clamp(2.4rem, 5vw, 3.75rem); }
.page-head__lead { color: var(--on-ink-2); font-size: clamp(1.0625rem, 1.5vw, 1.2rem); max-width: 62ch; margin: 0; }
.page-head--image { padding: clamp(80px, 12vw, 160px) 0 clamp(40px, 5vw, 64px); }
.page-head__bg { position: absolute; inset: 0; z-index: -1; }
.page-head__bg img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.8) sepia(.2) brightness(.7); }
.page-head__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20, 22, 25, .95) 0%, rgba(20, 22, 25, .55) 60%, rgba(20, 22, 25, .45) 100%); }

.breadcrumb { margin-bottom: 20px; font-size: .875rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; color: var(--on-ink-2); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.breadcrumb a { color: var(--on-ink-2); text-decoration: none; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--on-ink); }

/* ==========================================================================
   Search the names
   ========================================================================== */

.finder { background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); position: relative; z-index: 20; }
@media (min-width: 900px) { .finder { position: sticky; top: var(--header-h); } }
.finder__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 0; }
.finder__search { position: relative; flex: 1 1 320px; display: flex; align-items: center; }
.finder__search > .icon { position: absolute; left: 14px; width: 20px; height: 20px; color: var(--text-3); pointer-events: none; }
.finder__search input {
  width: 100%; height: 48px; padding: 0 44px 0 44px;
  border: 1px solid var(--line-2); border-radius: 6px; background: var(--paper);
  font: 400 1.0625rem var(--sans); color: var(--text); outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
  -webkit-appearance: none; appearance: none;
}
.finder__search input::-webkit-search-cancel-button { display: none; }
.finder__search input:focus { border-color: var(--bronze-2); background: #fff; box-shadow: 0 0 0 3px rgba(168, 131, 75, .18); }
.finder__clear {
  position: absolute; right: 6px; width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: 4px; background: none; color: var(--text-3); cursor: pointer;
}
.finder__clear:hover { color: var(--ink); background: var(--paper-2); }
.finder__kbd { position: absolute; right: 12px; font: 600 .75rem/1 var(--sans); color: var(--text-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 3px 6px; pointer-events: none; }
.finder__search input:focus ~ .finder__kbd, .finder__search.has-value .finder__kbd { display: none; }
@media (hover: none) { .finder__kbd { display: none; } }

.finder__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.seg { display: inline-flex; margin: 0; padding: 3px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--paper); }
.seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 9px 14px; border-radius: 5px; font-weight: 600; font-size: .9375rem; color: var(--text-2); white-space: nowrap; transition: background-color .15s, color .15s; }
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--bronze-2); outline-offset: 1px; }
.seg label:hover input:not(:checked) + span { color: var(--ink); background: var(--paper-2); }

.select { position: relative; display: inline-flex; align-items: center; }
.select select {
  height: 44px; padding: 0 38px 0 14px; border: 1px solid var(--line-2); border-radius: 6px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23464b52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 16px no-repeat;
  font: 600 .9375rem var(--sans); color: var(--text); cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.select select:hover { border-color: var(--text-3); }
.select select:focus-visible { outline: 2px solid var(--bronze-2); outline-offset: 1px; }

.view-toggle { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--paper); }
.view-toggle button { display: grid; place-items: center; width: 38px; height: 36px; border: 0; border-radius: 5px; background: none; color: var(--text-3); cursor: pointer; }
.view-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.view-toggle button:hover:not([aria-pressed="true"]) { background: var(--paper-2); color: var(--ink); }
.view-toggle .icon { width: 19px; height: 19px; }
html:not(.js) .view-toggle, html:not(.js) .finder__clear, html:not(.js) .finder__kbd { display: none; }
.js .finder__submit { display: none; }

@media (max-width: 899px) {
  .finder__controls { width: 100%; }
  .seg { flex: 1 1 100%; }
  .seg label { flex: 1; text-align: center; }
  .seg span { padding: 9px 8px; }
  .finder__controls .select { flex: 1 1 0; min-width: 0; }
  .finder__controls .select select { width: 100%; }
  .az { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .az::-webkit-scrollbar { display: none; }
  .az li { flex: none; }
  .results-meta { padding-top: 18px; }
}

.results-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 26px 0 8px; }
.results-meta__count { margin: 0; font-size: 1rem; color: var(--text-2); }
.results-meta__count strong { color: var(--ink); }
.results-meta__reset { font-weight: 600; font-size: .9375rem; }
.results-meta__tools { display: flex; align-items: center; gap: 18px; margin-left: auto; }

.az { display: flex; flex-wrap: wrap; gap: 2px; margin: 8px 0 18px; padding: 0; list-style: none; }
.az a, .az span {
  display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 4px;
  border-radius: 4px; font: 600 1.05rem/1 var(--serif); text-decoration: none;
}
.az a { color: var(--ink); }
.az a:hover { background: var(--ink); color: #fff; }
.az span { color: #bfb6a6; }
.az[hidden] { display: none; }

.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 22px 18px; padding-bottom: 32px; }
.results--four { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: 0; }
@media (max-width: 900px) { .results--four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; } }

.results__divider {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 16px;
  margin: 18px 0 0; font: 600 2.1rem/1 var(--serif); color: var(--bronze);
  scroll-margin-top: calc(var(--header-h) + 100px);
}
.results__divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.results__divider:first-child { margin-top: 0; }
.results__group {
  grid-column: 1 / -1; margin: 30px 0 0; padding-top: 22px; border-top: 1px solid var(--line-2);
  font: 600 1.6rem/1.2 var(--serif); color: var(--ink);
}
.results__group small { display: block; margin-top: 4px; font: 400 .9375rem/1.4 var(--sans); color: var(--text-3); }
.results__group:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.no-results { text-align: center; padding: 56px 24px 80px; max-width: 560px; margin: 0 auto; }
.no-results .poppy { width: 44px; height: 44px; margin: 0 auto 18px; opacity: .5; filter: grayscale(1); }
.no-results h2 { font-size: 2rem; }
.no-results p { color: var(--text-2); }

/* ---------- Person card ---------- */

.pcard { min-width: 0; content-visibility: auto; contain-intrinsic-size: auto 420px; }
.pcard[hidden] { display: none; }
.pcard__link {
  display: flex; flex-direction: column; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: inherit; text-decoration: none; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.pcard__link:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); color: inherit; }
.pcard__link:focus-visible { outline-offset: 2px; }
.pcard__photo { position: relative; aspect-ratio: 3 / 4; background: var(--paper-2); overflow: hidden; }
.pcard__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transition: transform .5s var(--ease); }
.pcard__link:hover .pcard__photo img { transform: scale(1.035); }
.pcard__photo::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(20, 22, 25, .06); pointer-events: none; }
.pcard__nophoto { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-size: .8125rem; color: var(--text-3); letter-spacing: .04em; background: repeating-linear-gradient(135deg, var(--paper-2) 0 10px, #ebe4d8 10px 11px); }
.pcard__nophoto .poppy { width: 40px; height: 40px; }
.pcard__photo.is-missing, .relative__photo.is-missing { background: repeating-linear-gradient(135deg, var(--paper-2) 0 10px, #ebe4d8 10px 11px); }
.pcard__body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.pcard__ref { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.pcard__code { font: 600 .75rem/1 var(--sans); letter-spacing: .08em; color: var(--text-3); white-space: nowrap; }
.pcard__name { font-size: 1.4rem; line-height: 1.08; margin: 0 0 6px; color: var(--ink); overflow-wrap: anywhere; }
.pcard__link:hover .pcard__name { color: var(--bronze); }
.pcard__service { font-size: .875rem; line-height: 1.4; color: var(--text-2); margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__death { margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; font-size: .8125rem; color: var(--text-3); line-height: 1.35; }
.pcard__death:empty { display: none; }
.pcard__age { white-space: nowrap; }
@media (max-width: 520px) {
  .pcard__body { padding: 12px 12px 14px; }
  .pcard__name { font-size: 1.2rem; }
  .pcard__ref .tag { font-size: .625rem; padding: .2em .45em; }
}

/* List view */
.results--list { grid-template-columns: 1fr; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 0 4px; margin-bottom: 32px; overflow: hidden; }
.results--list .pcard { contain-intrinsic-size: auto 76px; }
.results--list .pcard + .pcard .pcard__link { border-top: 1px solid var(--line); }
.results--list .pcard__link { flex-direction: row; align-items: center; gap: 16px; padding: 10px 16px; border: 0; border-radius: 0; background: none; }
.results--list .pcard__link:hover { transform: none; box-shadow: none; background: var(--paper); }
.results--list .pcard__photo { width: 48px; flex: none; border-radius: 4px; }
.results--list .pcard__nophoto span, .results--list .pcard__nophoto .poppy { display: none; }
.results--list .pcard__body {
  padding: 0; display: grid; align-items: center; gap: 2px 20px;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr) minmax(0, 1.1fr) 112px;
  grid-template-areas: "name service death ref";
}
.results--list .pcard__name { grid-area: name; font-size: 1.3rem; margin: 0; }
.results--list .pcard__service { grid-area: service; margin: 0; -webkit-line-clamp: 1; }
.results--list .pcard__death { grid-area: death; margin: 0; padding: 0; border: 0; flex-direction: column; gap: 0; justify-content: center; }
.results--list .pcard__ref { grid-area: ref; margin: 0; flex-direction: row-reverse; justify-content: flex-end; }
.results--list .results__divider { margin: 0; padding: 18px 16px 8px; font-size: 1.7rem; background: var(--paper); border-top: 1px solid var(--line); }
.results--list .results__divider:first-child { border-top: 0; }
.results--list .results__group { margin: 0; padding: 20px 16px 12px; background: var(--paper-2); border-top: 1px solid var(--line-2); }
@media (max-width: 760px) {
  .results--list .pcard__body { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name ref" "service service" "death death"; }
  .results--list .pcard__death { flex-direction: row; gap: 10px; }
  .results--list .pcard__photo { width: 44px; }
  .results--list .pcard__link { padding: 12px; align-items: flex-start; }
}

/* ==========================================================================
   Profile
   ========================================================================== */

.profile-head { background: var(--ink); color: var(--on-ink); padding: 28px 0 clamp(48px, 7vw, 88px); position: relative; isolation: isolate; overflow: hidden; }
.profile-head::before { content: ""; position: absolute; inset: auto -10% -60% auto; width: 60%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(207, 174, 116, .1), transparent); z-index: -1; }
.profile-head__grid { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; margin-top: 12px; }
@media (max-width: 760px) { .profile-head__grid { grid-template-columns: 1fr; } }

.portrait { margin: 0; }
.portrait__frame {
  display: block; position: relative; width: 100%; padding: 12px; border: 0; cursor: zoom-in;
  background: #f4efe6; border-radius: 3px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(0, 0, 0, .05);
}
.portrait__frame img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 20%; border-radius: 1px; }
.portrait__zoom { position: absolute; right: 22px; bottom: 22px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(20, 22, 25, .75); color: #fff; opacity: 0; transition: opacity .2s; }
.portrait__frame:hover .portrait__zoom, .portrait__frame:focus-visible .portrait__zoom { opacity: 1; }
.portrait figcaption { margin-top: 14px; font-size: .875rem; color: var(--on-ink-2); line-height: 1.5; white-space: pre-line; }
.portrait--empty .portrait__frame { cursor: default; aspect-ratio: 3 / 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; color: var(--text-3); padding: 28px; }
.portrait--empty .poppy { width: 52px; height: 52px; }
.portrait--empty p { margin: 0; font-size: .9375rem; }
@media (max-width: 760px) { .portrait { max-width: 300px; } }

.profile-head h1 { color: #fff; font-size: clamp(2.6rem, 5.6vw, 4.4rem); margin: 0 0 .2em; line-height: 1; }
.profile-head__service { font-size: clamp(1.125rem, 1.7vw, 1.3rem); color: var(--on-ink); margin: 0 0 1.4rem; }
.profile-head__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.profile-head .tag { background: rgba(255, 255, 255, .08); color: var(--on-ink); }
.profile-head .tag--ww1 { background: rgba(235, 232, 211, .14); color: #e6e0b8; }
.profile-head .tag--ww2 { background: rgba(223, 231, 238, .14); color: #c9d8e6; }

.vitals { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 0 0 1.6rem; border-top: 1px solid rgba(255, 255, 255, .1); border-bottom: 1px solid rgba(255, 255, 255, .1); }
.vitals div { padding: 14px 18px 14px 0; }
.vitals div + div { padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, .1); }
.vitals dt { font: 700 .6875rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--bronze-3); margin-bottom: 6px; }
.vitals dd { margin: 0; font: 600 1.35rem/1.2 var(--serif); color: #fff; font-variant-numeric: lining-nums; }
@media (max-width: 520px) {
  .vitals { grid-template-columns: 1fr 1fr; }
  .vitals div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .vitals div:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .1); }
}
.profile-head__family { font: italic 500 1.3rem/1.45 var(--serif); color: var(--on-ink); max-width: 56ch; margin: 0 0 1.6rem; }
.profile-head__family p { margin: 0; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.profile-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(28px, 5vw, 64px); padding: clamp(48px, 6vw, 80px) 0; align-items: start; }
@media (max-width: 980px) { .profile-body { grid-template-columns: 1fr; } }

.record { margin-bottom: 44px; }
.record h2 { display: flex; align-items: center; gap: 14px; font-size: 1.9rem; margin-bottom: 16px; }
.record h2::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.record-list { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.record-list > div { display: grid; grid-template-columns: 12rem 1fr; gap: 6px 24px; padding: 14px 20px; }
.record-list > div + div { border-top: 1px solid var(--line); }
.record-list dt { font: 700 .75rem/1.5 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--bronze); padding-top: 3px; }
.record-list dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.record-list dd small { display: block; color: var(--text-3); font-size: .9375rem; }
.record-list ul { margin: 0; padding: 0; list-style: none; }
.record-list li + li { margin-top: 4px; }
.record-list p { margin: 0 0 .5em; } .record-list p:last-child { margin: 0; }
@media (max-width: 600px) { .record-list > div { grid-template-columns: 1fr; padding: 14px 16px; } }

.note { display: flex; gap: 14px; padding: 18px 20px; background: var(--paper-2); border-left: 3px solid var(--bronze-2); border-radius: 0 var(--radius) var(--radius) 0; color: var(--text-2); }
.note p { margin: 0; }
.note .icon { color: var(--bronze); margin-top: 3px; }

.relatives { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.relative { display: flex; align-items: center; gap: 14px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; transition: border-color .2s, box-shadow .2s; }
a.relative:hover { border-color: var(--line-2); box-shadow: var(--shadow); color: inherit; }
.relative__photo { width: 56px; height: 72px; flex: none; border-radius: 3px; overflow: hidden; background: var(--paper-2); display: grid; place-items: center; }
.relative__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.relative__photo .poppy { width: 26px; height: 26px; }
.relative__rel { display: block; font: 700 .6875rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--bronze); margin-bottom: 4px; }
.relative__name { display: block; font: 600 1.25rem/1.15 var(--serif); color: var(--ink); }
a.relative:hover .relative__name { color: var(--bronze); }
.relative__meta { display: block; font-size: .8125rem; color: var(--text-3); margin-top: 3px; }
.relative--text { color: var(--text-2); font-size: .9375rem; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.gallery button { padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); cursor: zoom-in; aspect-ratio: 3 / 4; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.gallery button:hover img { transform: scale(1.04); }

.aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.aside-card h2 { font-size: 1.5rem; margin-bottom: .5em; }
.aside-card p { font-size: .96875rem; color: var(--text-2); }
.aside-card--ink { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.aside-card--ink h2 { color: #fff; }
.aside-card--ink p { color: var(--on-ink-2); }
.aside-card .btn { width: 100%; }
.aside-panel { display: grid; grid-template-columns: 76px 1fr; gap: 16px; align-items: center; color: inherit; text-decoration: none; }
.aside-panel img { width: 76px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.aside-panel strong { display: block; font: 600 1.3rem/1.15 var(--serif); color: var(--ink); }
.aside-panel span { font-size: .9375rem; color: var(--text-3); }
a.aside-panel:hover strong { color: var(--bronze); }
.aside-links { margin: 0; padding: 0; list-style: none; }
.aside-links li + li { border-top: 1px solid var(--line); }
.aside-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; font-weight: 600; text-decoration: none; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: clamp(56px, 7vw, 88px); }
.pager a { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: inherit; transition: border-color .2s, box-shadow .2s; }
.pager a:hover { border-color: var(--line-2); box-shadow: var(--shadow); color: inherit; }
.pager a:hover .pager__name { color: var(--bronze); }
.pager__next { justify-content: flex-end; text-align: right; }
.pager small { display: block; font: 700 .6875rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.pager__name { font: 600 1.3rem/1.15 var(--serif); color: var(--ink); }
.pager .icon { color: var(--bronze); width: 22px; height: 22px; }
@media (max-width: 600px) { .pager { grid-template-columns: 1fr; } .pager__next { justify-content: space-between; } }

/* ==========================================================================
   About, panels, contact, acknowledgements
   ========================================================================== */

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5.25rem; top: 10px; bottom: 10px; width: 1px; background: var(--line-2); }
.timeline li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0 2.5rem; padding: 0 0 32px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: calc(5.25rem - 5px); top: 12px; width: 11px; height: 11px; border-radius: 50%; background: var(--paper); border: 2px solid var(--bronze-2); }
.timeline__year { font: 600 1.7rem/1.2 var(--serif); color: var(--bronze); text-align: right; font-variant-numeric: lining-nums; }
.timeline h3 { font-size: 1.45rem; margin: 2px 0 6px; }
.timeline p { margin: 0; color: var(--text-2); }
.section--alt .timeline li::before { background: var(--paper-2); }

.chapter { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.chapter + .chapter { margin-top: clamp(64px, 8vw, 104px); }
@media (max-width: 860px) { .chapter { grid-template-columns: 1fr; } }
.document { margin: 0; background: #fff; padding: 14px; border: 1px solid var(--line); border-radius: 3px; box-shadow: var(--shadow); }
.document button { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; width: 100%; }
.document figcaption { margin-top: 12px; font-size: .875rem; color: var(--text-3); }
.document--narrow { max-width: 380px; }

.dl-facts { margin: 1.4rem 0 0; border-top: 1px solid var(--line); }
.dl-facts div { display: grid; grid-template-columns: 10rem 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.dl-facts dt { font: 700 .75rem/1.6 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--bronze); }
.dl-facts dd { margin: 0; color: var(--text-2); }
@media (max-width: 520px) { .dl-facts div { grid-template-columns: 1fr; gap: 2px; } }

.panel-feature { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(40px, 5vw, 56px) 0; border-top: 1px solid var(--line); }
.panel-feature:first-of-type { border-top: 0; }
@media (max-width: 760px) { .panel-feature { grid-template-columns: 1fr; } }
.panel-feature__img { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--ink-3); border-radius: 6px; overflow: hidden; cursor: zoom-in; box-shadow: var(--shadow-lg); }
.panel-feature__img img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; transition: transform .6s var(--ease); }
.panel-feature__img:hover img { transform: scale(1.025); }
.panel-feature__hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: rgba(20, 22, 25, .82); color: #fff; font-weight: 600; font-size: .875rem; white-space: nowrap; }
.panel-feature h2 { margin-bottom: .2em; }
.panel-feature__years { font: italic 500 1.5rem/1.2 var(--serif); color: var(--bronze); margin-bottom: 1rem; }
.panel-feature__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }
.inscription { margin: 1.2rem 0 0; padding: 24px 28px; background: var(--ink-3); color: #e9dcc2; border-radius: 4px; font: 500 1.3rem/1.6 var(--serif); letter-spacing: .12em; text-transform: uppercase; text-align: center; box-shadow: inset 0 0 0 1px rgba(207, 174, 116, .25), inset 0 0 40px rgba(0, 0, 0, .4); }
.inscription span { display: block; }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(28px, 5vw, 64px); align-items: start; padding: clamp(48px, 6vw, 80px) 0; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow-sm); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; margin-bottom: 7px; font-size: .96875rem; }
.field label span { color: var(--text-3); font-weight: 400; }
.input, .textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--paper);
  font: 400 1.0625rem var(--sans); color: var(--text); outline: none; transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.input:focus, .textarea:focus { border-color: var(--bronze-2); background: #fff; box-shadow: 0 0 0 3px rgba(168, 131, 75, .18); }
.textarea { min-height: 180px; resize: vertical; }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 22px; }
.form-foot small { color: var(--text-3); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.alert { padding: 14px 18px; border-radius: var(--radius); margin: 0 0 22px; border: 1px solid; }
.alert ul { margin: 6px 0 0 18px; padding: 0; }
.alert--success { background: #e8f1ea; border-color: #b9d5bf; color: #1f4d2b; }
.alert--error { background: #f8e9e7; border-color: #e5bdb7; color: #7a231a; }
.contact-list { margin: 0; padding: 0; list-style: none; }
.contact-list li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.contact-list .icon { color: var(--bronze); margin-top: 3px; }
.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li { display: flex; gap: 10px; padding: 6px 0; color: var(--on-ink-2); font-size: .96875rem; }
.checklist .icon { color: var(--bronze-3); margin-top: 4px; }

.letter { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: clamp(28px, 6vw, 64px); box-shadow: var(--shadow); position: relative; }
.letter p { font-size: 1.125rem; color: var(--text-2); }
.letter__sign { margin-top: 2rem; font: italic 500 1.4rem/1.4 var(--serif); color: var(--ink); }
.letter__sign small { display: block; font: 400 .9375rem/1.5 var(--sans); font-style: normal; color: var(--text-3); }

.credits { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 40px; }
.credit { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.credit h3 { font-size: 1.35rem; margin-bottom: .3em; }
.credit p { margin: 0; font-size: .96875rem; color: var(--text-2); }

.not-found { text-align: center; padding: clamp(72px, 10vw, 140px) 0; }
.not-found .poppy { width: 56px; height: 56px; margin: 0 auto 24px; }
.not-found form { margin: 28px auto 0; }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: var(--on-ink-2); font-size: .96875rem; }
.site-footer a { color: var(--on-ink); text-decoration: none; }
.site-footer a:hover { color: var(--bronze-3); text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr 1.1fr; gap: 40px; padding: clamp(56px, 7vw, 80px) 0 48px; }
@media (max-width: 980px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .site-footer__grid { grid-template-columns: 1fr; gap: 32px; } }
.brand--footer { color: var(--on-ink); margin-bottom: 22px; }
.site-footer__quote { font: italic 500 1.5rem/1.3 var(--serif); color: var(--on-ink); margin: 0 0 6px; }
.site-footer__small { font-size: .875rem; margin: 0; }
.site-footer__title { font: 700 .75rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--bronze-3); margin: 6px 0 16px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer address { margin-bottom: 14px; line-height: 1.6; }
.site-footer__contact li { display: flex; align-items: center; gap: 10px; }
.site-footer__contact .icon { color: var(--bronze-3); }
.site-footer__base { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 22px 0 28px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .875rem; }
.site-footer__base p { margin: 0; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ==========================================================================
   Image viewer (panels & photographs)
   ========================================================================== */

.viewer { position: fixed; inset: 0; z-index: 1000; background: rgba(12, 13, 15, .96); display: flex; flex-direction: column; color: #fff; opacity: 0; transition: opacity .2s; }
.viewer.is-open { opacity: 1; }
.viewer__stage { position: relative; flex: 1; overflow: hidden; touch-action: none; cursor: grab; }
.viewer__stage.is-dragging { cursor: grabbing; }
.viewer__img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; will-change: transform; }
.viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px var(--gutter); background: rgba(0, 0, 0, .5); border-top: 1px solid rgba(255, 255, 255, .08); }
.viewer__caption { margin: 0; font: 600 1.25rem/1.2 var(--serif); }
.viewer__caption small { display: block; font: 400 .8125rem/1.3 var(--sans); color: #b6b0a6; margin-top: 3px; }
.viewer__tools { display: flex; gap: 6px; }
.viewer__tools button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 6px; background: rgba(255, 255, 255, .05); color: #fff; cursor: pointer; }
.viewer__tools button:hover { background: rgba(255, 255, 255, .14); }
.viewer__tools .icon { width: 20px; height: 20px; }
.viewer__hint { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); padding: 7px 14px; border-radius: 999px; background: rgba(0, 0, 0, .6); font-size: .8125rem; color: #ddd; pointer-events: none; transition: opacity .4s; white-space: nowrap; }
.viewer__spinner { position: absolute; inset: 0; display: grid; place-items: center; font-size: .875rem; color: #aaa; pointer-events: none; }
body.viewer-open { overflow: hidden; }

/* ---------- Motion & print ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .finder, .az, .profile-actions, .aside-card--ink, .pager, .skip-link, .cta-band, .portrait__zoom { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .profile-head, .page-head { background: #fff !important; color: #000; padding: 0 0 16pt; }
  .profile-head h1, .profile-head__service, .profile-head__family, .vitals dd, .page-head h1 { color: #000 !important; }
  .vitals, .vitals div + div { border-color: #ccc !important; }
  .vitals dt, .record-list dt { color: #555 !important; }
  .breadcrumb { display: none; }
  .portrait__frame { box-shadow: none; border: 1px solid #ccc; }
  .portrait figcaption { color: #555; }
  .profile-body { grid-template-columns: 1fr; padding-top: 12pt; }
  .record, .aside-card { break-inside: avoid; }
  .record-list, .aside-card, .relative { border-color: #ccc; }
  a { color: #000; text-decoration: none; }
  .print-url { display: block !important; margin-top: 16pt; font-size: 9pt; color: #555; }
}
.print-url { display: none; }
