:root {
  color-scheme: light;
  --ink: #1d211f;
  --muted: #646660;
  --paper: #f5f0e6;
  --paper-deep: #e7decb;
  --white: #fffdf8;
  --blue: #6b1f2b;
  --blue-soft: #852f3d;
  --gold: #c79a42;
  --gold-light: #e0c27d;
  --red: #9b3f2d;
  --green: #425f52;
  --line: rgba(29, 33, 31, 0.16);
  --shadow: 0 18px 50px rgba(74, 20, 30, 0.16);
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.62;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(107, 31, 43, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107, 31, 43, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 58rem);
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  transform: translateY(-200%);
  padding: 0.65rem 1rem;
  border-radius: 0.25rem;
  background: var(--white);
  color: var(--blue);
  font-family: var(--sans);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) auto minmax(12rem, 1fr);
  align-items: center;
  gap: 1.5rem;
  min-height: 5rem;
  padding: 0.8rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(107, 31, 43, 0.96);
  color: var(--white);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  width: fit-content;
  text-decoration: none;
  line-height: 1.15;
}

.brand img {
  flex: 0 0 auto;
  width: auto;
  height: 3.25rem;
  padding: 0.12rem;
  border-radius: 0.15rem;
  background: #fff;
}

.brand span {
  display: grid;
  gap: 0.14rem;
}

.brand strong {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.brand small {
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 650;
}

.site-header nav a {
  position: relative;
  padding: 0.55rem 0;
  text-decoration: none;
}

.site-header nav a::after {
  position: absolute;
  right: 0;
  bottom: 0.25rem;
  left: 0;
  height: 2px;
  content: "";
  transform: scaleX(0);
  background: var(--gold);
  transition: transform 180ms ease;
}

.site-header nav a:hover::after {
  transform: scaleX(1);
}

.access-label {
  justify-self: end;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(224, 194, 125, 0.5);
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.archive-console {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  min-height: 42rem;
  background: var(--blue);
  color: var(--white);
}

.console-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: clamp(3.2rem, 8vw, 7rem) clamp(1.25rem, 6vw, 7.5rem);
}

.console-copy::before,
.console-copy::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.console-copy::before {
  top: -10rem;
  right: -10rem;
  width: 28rem;
  height: 28rem;
  border: 1px solid rgba(224, 194, 125, 0.25);
  transform: rotate(45deg);
}

.console-copy::after {
  bottom: -16rem;
  left: -14rem;
  width: 30rem;
  height: 30rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  transform: rotate(45deg);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--red);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.archive-console .eyebrow {
  color: var(--gold-light);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.08;
}

h1 {
  max-width: 10ch;
  margin-bottom: 1.15rem;
  font-size: clamp(3.2rem, 7.3vw, 7rem);
  font-weight: 500;
  letter-spacing: -0.052em;
}

.lede {
  max-width: 47rem;
  margin-bottom: 2.25rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
}

.archive-search {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  margin-bottom: 1.1rem;
}

.archive-search > label {
  display: block;
  margin-bottom: 0.45rem;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-field {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 4rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.16);
}

.search-field svg {
  width: 1.35rem;
  margin-left: 1.15rem;
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-width: 1.7;
}

.search-field input {
  min-width: 0;
  height: 100%;
  padding: 0 1rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
}

.search-field input::placeholder {
  color: #7f827f;
}

.search-field button {
  align-self: stretch;
  padding: 0 1rem;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 750;
}

.filter-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-width: 52rem;
}

.filter-chip {
  min-height: 2.5rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--blue);
}

.archive-stats {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-top: 2rem;
}

.archive-stats div {
  display: grid;
  grid-template-columns: auto;
  align-content: start;
}

.archive-stats strong {
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: 1.7rem;
  line-height: 1;
}

.archive-stats span {
  margin-top: 0.3rem;
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.feature-figure {
  position: relative;
  min-height: 34rem;
  margin: 0;
  overflow: hidden;
  background: #3d1119;
}

.feature-figure::before {
  position: absolute;
  inset: 1.5rem;
  z-index: 2;
  content: "";
  border: 1px solid rgba(224, 194, 125, 0.55);
  pointer-events: none;
}

.feature-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.88) contrast(1.03);
}

.feature-figure::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(38, 9, 15, 0.84), transparent 52%);
}

.feature-figure figcaption {
  position: absolute;
  right: 3rem;
  bottom: 3rem;
  left: 3rem;
  z-index: 3;
  color: var(--white);
  font-size: 1.25rem;
}

.feature-figure figcaption span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.result-banner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1.25rem, 6vw, 7.5rem);
  border-bottom: 1px solid var(--line);
  background: var(--white);
  font-family: var(--sans);
  font-size: 0.86rem;
}

.result-banner p {
  margin: 0;
}

.result-banner strong {
  color: var(--red);
}

.result-banner p:last-child {
  color: var(--muted);
}

.page-section {
  max-width: 92rem;
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 8rem) clamp(1.25rem, 5vw, 5rem);
}

.section-heading {
  max-width: 50rem;
  margin-bottom: 2.8rem;
}

.section-heading h2,
.preservation-section h2 {
  margin-bottom: 0.75rem;
  color: var(--blue);
  font-size: clamp(2.25rem, 4.4vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.042em;
}

.section-heading > p:last-child,
.section-heading-row > div > p:last-child,
.preservation-section > div > p:last-child {
  color: var(--muted);
  font-size: 1.07rem;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  max-width: none;
}

.section-heading-row > div {
  max-width: 52rem;
}

.timeline-section {
  position: relative;
}

.timeline-section::before {
  position: absolute;
  top: 0;
  right: max(1.25rem, 5vw);
  width: clamp(5rem, 12vw, 11rem);
  height: 0.45rem;
  content: "";
  background: repeating-linear-gradient(90deg, var(--gold) 0 1.15rem, transparent 1.15rem 1.55rem);
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.timeline::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  content: "";
  background: var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  min-height: 12rem;
  padding: 2rem;
  border-bottom: 1px solid var(--line);
}

.timeline-item:nth-child(odd) {
  padding-left: 0;
  padding-right: 2.5rem;
}

.timeline-item:nth-child(even) {
  padding-left: 2.5rem;
  padding-right: 0;
}

.timeline-item time {
  color: var(--gold);
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 850;
}

.timeline-tag {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.18rem 0.45rem;
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.timeline-tag.parish {
  background: var(--blue);
}

.timeline-tag.school {
  background: var(--red);
}

.timeline-tag.records {
  background: var(--green);
}

.timeline-item h3 {
  margin-bottom: 0.45rem;
  color: var(--blue);
  font-size: 1.35rem;
  font-weight: 600;
}

.timeline-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.source-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--gold);
  background: rgba(255, 253, 248, 0.72);
  font-family: var(--sans);
  font-size: 0.8rem;
}

.source-note strong {
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.source-note a {
  color: var(--blue-soft);
}

.collections-section {
  max-width: none;
  background: var(--blue);
  color: var(--white);
}

.collections-section .section-heading {
  max-width: 82rem;
  margin-right: auto;
  margin-left: auto;
}

.collections-section .eyebrow {
  color: var(--gold-light);
}

.collections-section h2 {
  color: var(--white);
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 82rem;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.collection-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 23rem;
  padding: 2rem;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  text-align: left;
  transition: background 180ms ease, transform 180ms ease;
}

.collection-card:last-child {
  border-right: 0;
}

.collection-card:hover {
  z-index: 2;
  transform: translateY(-0.35rem);
  background: var(--blue-soft);
  box-shadow: var(--shadow);
}

.collection-number {
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.collection-card h3 {
  max-width: 10ch;
  margin: auto 0 0.8rem;
  font-size: clamp(1.75rem, 2.2vw, 2.5rem);
  font-weight: 500;
}

.collection-card p {
  color: rgba(255, 255, 255, 0.67);
  font-size: 0.98rem;
}

.collection-action {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.17);
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sort-control {
  display: grid;
  gap: 0.4rem;
  min-width: 13.5rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sort-control select {
  min-height: 2.8rem;
  padding: 0 2.4rem 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.9rem;
  text-transform: none;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.document-card {
  display: grid;
  grid-template-rows: 16rem auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(20, 31, 34, 0.05);
  transition: transform 170ms ease, box-shadow 170ms ease;
}

.document-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow);
}

.document-preview {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(107, 31, 43, 0.09), transparent 55%),
    var(--paper-deep);
}

.document-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 260ms ease;
}

.document-card:hover .document-preview img {
  transform: scale(1.02);
}

.document-preview::after {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  padding: 0.28rem 0.5rem;
  content: attr(data-type);
  background: var(--blue);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.document-body {
  display: flex;
  flex-direction: column;
  padding: 1.35rem;
}

.document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.7rem;
  color: var(--red);
  font-family: var(--sans);
  font-size: 0.69rem;
  font-weight: 780;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.document-body h3 {
  margin-bottom: 0.65rem;
  color: var(--blue);
  font-size: 1.45rem;
  font-weight: 600;
}

.document-body p {
  color: var(--muted);
  font-size: 0.95rem;
}

.document-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 780;
}

.document-actions a:first-child {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0.55rem 0.85rem;
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
}

.document-actions a:last-child {
  color: var(--blue);
}

.images-section {
  max-width: none;
  background: #ded4c0;
}

.images-section > * {
  max-width: 82rem;
  margin-right: auto;
  margin-left: auto;
}

.gallery-count {
  flex: 0 0 auto;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.82rem;
}

.gallery-count strong {
  color: var(--red);
  font-size: 1.4rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 0.75rem;
}

.gallery-card {
  position: relative;
  grid-column: span 3;
  min-height: 16rem;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--blue);
  cursor: zoom-in;
  text-align: left;
}

.gallery-card:nth-child(11n + 1),
.gallery-card:nth-child(11n + 7) {
  grid-column: span 6;
  grid-row: span 2;
  min-height: 32.75rem;
}

.gallery-card:nth-child(11n + 4) {
  grid-column: span 3;
  grid-row: span 2;
  min-height: 32.75rem;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 280ms ease, filter 280ms ease;
}

.gallery-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(45, 11, 18, 0.9), transparent 58%);
}

.gallery-card:hover img {
  transform: scale(1.035);
  filter: saturate(1.05);
}

.gallery-card span {
  position: absolute;
  right: 1rem;
  bottom: 0.95rem;
  left: 1rem;
  z-index: 2;
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 740;
  line-height: 1.35;
}

.gallery-card span small {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--gold-light);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.empty-state {
  padding: 4rem 1.5rem;
  border: 1px dashed rgba(107, 31, 43, 0.3);
  text-align: center;
}

.empty-state h3 {
  margin-bottom: 0.5rem;
  color: var(--blue);
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

.preservation-section {
  display: grid;
  grid-template-columns: auto minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.preservation-mark {
  display: grid;
  place-items: center;
  width: clamp(6rem, 11vw, 9rem);
  aspect-ratio: 1;
  border: 2px solid var(--gold);
  transform: rotate(45deg);
}

.preservation-mark span {
  position: relative;
  width: 52%;
  height: 52%;
  border: 1px solid var(--blue);
}

.preservation-mark span::before,
.preservation-mark span::after {
  position: absolute;
  content: "";
  background: var(--red);
}

.preservation-mark span::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
}

.preservation-mark span::after {
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
}

.preservation-section dl {
  margin: 0;
  border-top: 1px solid var(--line);
}

.preservation-section dl div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.preservation-section dt {
  color: var(--red);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.preservation-section dd {
  margin: 0;
  color: var(--muted);
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.25rem clamp(1.25rem, 5vw, 5rem);
  background: #42131b;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--sans);
  font-size: 0.78rem;
}

footer > div {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

footer p {
  margin: 0;
}

footer strong {
  color: var(--white);
}

footer a {
  color: var(--gold-light);
}

.altars-section {
  max-width: none;
  background: linear-gradient(180deg, #f8f3e9 0%, #eee3d2 100%);
}

.altars-section > * {
  max-width: 82rem;
  margin-right: auto;
  margin-left: auto;
}

.evidence-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.72);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.8rem;
}

.evidence-key b,
.evidence-code {
  display: inline-grid;
  width: 1.6rem;
  height: 1.6rem;
  margin-right: 0.3rem;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.68rem;
}

.archive-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
}

.archive-table {
  width: 100%;
  min-width: 52rem;
  border-collapse: collapse;
}

.archive-table caption {
  padding: 1.3rem 1.5rem;
  background: var(--blue);
  color: var(--white);
  font-size: 1.55rem;
  text-align: left;
}

.archive-table th,
.archive-table td {
  padding: 1.15rem 1.25rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.archive-table thead th {
  background: #eadbc5;
  color: var(--blue);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.archive-table tbody th {
  width: 18%;
  color: var(--blue);
  font-size: 1.03rem;
}

.archive-table td {
  color: var(--muted);
  font-size: 0.92rem;
}

.altar-history-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.75fr);
  gap: 2rem;
  margin-top: 3rem;
}

.altar-history-grid h3 {
  margin-bottom: 1.25rem;
  color: var(--blue);
  font-size: 2rem;
}

.history-register {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.history-register li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.history-register time {
  color: var(--red);
  font-family: var(--sans);
  font-weight: 800;
}

.history-register p {
  margin: 0;
  color: var(--muted);
}

.source-panel {
  padding: 2rem;
  background: var(--blue);
  color: rgba(255, 255, 255, 0.76);
}

.people-main,
.institutions-main {
  width: min(100% - 2rem, 92rem);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 6rem) 0;
}

.people-intro,
.institutions-intro {
  max-width: 58rem;
  margin-bottom: 3rem;
}

.people-intro h1,
.institutions-intro h1 {
  margin: 0.25rem 0 1rem;
  color: var(--blue);
  font-size: clamp(2.7rem, 7vw, 5.8rem);
  line-height: 0.94;
}

.people-intro p,
.institutions-intro p {
  max-width: 48rem;
  color: var(--muted);
  font-size: 1.12rem;
}

.person-grid,
.institution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
}

.person-card,
.institution-card {
  padding: 1.6rem;
  border-top: 0.3rem solid var(--gold);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(74, 20, 30, 0.1);
}

.person-card h3,
.institution-card h3 {
  margin: 0 0 0.65rem;
  color: var(--blue);
  font-size: 1.35rem;
}

.person-card p,
.institution-card p {
  margin: 0.45rem 0;
  color: var(--muted);
}

.record-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--red);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.record-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.record-links a {
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(107, 31, 43, 0.22);
  color: var(--blue);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.record-links a:hover {
  background: var(--blue);
  color: var(--white);
}

.people-section,
.institutions-section {
  margin-top: 4rem;
}

.people-section > h2,
.institutions-section > h2 {
  margin-bottom: 0.65rem;
  color: var(--blue);
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.people-count {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.8rem 1.4rem;
  padding: 1rem 1.25rem;
  border-left: 0.3rem solid var(--gold);
  background: var(--white);
  font-family: var(--sans);
}

.people-count strong {
  color: var(--blue);
}

.people-count span,
.status-line,
.evidence-small,
.photo-note,
.search-count {
  color: var(--muted);
  font-size: 0.9rem;
}

.people-search {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 0.25rem;
  color: var(--blue);
  font-family: var(--sans);
  font-weight: 750;
}

.people-search input {
  width: min(100%, 24rem);
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  background: var(--white);
  color: var(--ink);
}

.search-count {
  margin: 0.15rem 0 1rem;
  font-family: var(--sans);
}

.status-line {
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
}

.person-more,
.back-link {
  display: inline-block;
  margin-top: 0.65rem;
  color: var(--blue);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 750;
}

.unresolved-register {
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.uncertain-list {
  columns: 2 24rem;
  gap: 2rem;
  padding-left: 1.25rem;
}

.uncertain-list li {
  break-inside: avoid;
  margin: 0 0 0.65rem;
}

.uncertain-list a {
  color: var(--blue);
  font-weight: 700;
}

.uncertain-list span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.people-profile {
  width: min(100% - 2rem, 68rem);
  margin: 0 auto;
  padding: clamp(2.2rem, 6vw, 5rem) 0;
}

.profile-heading {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 4vw, 3rem);
  margin: 1rem 0 2.5rem;
}

.profile-heading h1 {
  margin: 0.2rem 0 0.5rem;
  color: var(--blue);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1;
}

.profile-heading > div {
  min-width: 0;
}

.photo-note {
  max-width: 16rem;
  margin: 0;
  padding: 0.8rem;
  border-left: 0.2rem solid var(--paper-deep);
  font-size: 0.82rem;
}

.profile-photo {
  width: min(100%, 19rem);
}

.person-photo {
  flex: 0 0 13rem;
  width: 13rem;
  margin: 0;
  padding: 0.5rem;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(74, 20, 30, 0.13);
}

.person-photo img {
  width: 100%;
  max-height: 19rem;
  object-fit: contain;
  background: var(--paper-deep);
}

.person-photo figcaption {
  padding: 0.5rem 0.2rem 0.15rem;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.35;
}

.profile-block {
  max-width: 58rem;
  margin: 1rem 0;
  padding: 1.4rem 1.6rem;
  background: var(--white);
  border-left: 0.25rem solid var(--gold);
}

.profile-block h2 {
  margin: 0 0 0.5rem;
  color: var(--blue);
  font-size: 1.35rem;
}

.profile-block p {
  margin: 0.35rem 0;
}

.profile-block.attributed {
  border-left-color: var(--red);
}

.profile-block.unresolved {
  border-left-color: var(--green);
}

.profile-sources {
  margin: 0;
  padding-left: 1.2rem;
}

.profile-sources li {
  margin: 0.45rem 0;
}

.profile-sources a {
  color: var(--blue);
  overflow-wrap: anywhere;
}

@media (max-width: 620px) {
  .profile-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .person-photo {
    width: min(100%, 16rem);
    flex-basis: auto;
  }
}

.section-lede {
  max-width: 56rem;
  margin: 0 0 1.6rem;
  color: var(--muted);
}

.source-panel .eyebrow,
.source-panel h3 {
  color: var(--gold-light);
}

.official-link {
  display: block;
  margin-top: 1.4rem;
  padding: 0.8rem 1rem;
  background: var(--gold);
  color: #351017;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
}

.official-link.secondary {
  margin-top: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  color: var(--white);
}

.altar-photo-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 3rem;
}

.altar-photo-strip figure {
  margin: 0;
  background: var(--blue);
}

.altar-photo-strip img {
  display: block;
  width: 100%;
  height: 18rem;
  object-fit: cover;
}

.altar-photo-strip figcaption {
  padding: 0.85rem 1rem;
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.78rem;
}

.lightbox {
  width: min(92vw, 88rem);
  max-width: none;
  height: min(90vh, 60rem);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #270c12;
  color: var(--white);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.55);
}

.lightbox::backdrop {
  background: rgba(24, 5, 9, 0.86);
  backdrop-filter: blur(8px);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 4;
  min-height: 2.7rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(39, 12, 18, 0.88);
  color: var(--white);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 750;
}

.lightbox-stage {
  display: grid;
  place-items: center;
  height: calc(100% - 8rem);
  padding: 2rem;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%);
  background-size: 28px 28px;
}

.lightbox-stage img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.lightbox-caption {
  height: 8rem;
  padding: 1rem 4.5rem 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.lightbox-caption .eyebrow {
  margin-bottom: 0.25rem;
  color: var(--gold-light);
}

.lightbox-caption h2 {
  margin-bottom: 0.25rem;
  font-size: 1.35rem;
  font-weight: 500;
}

.lightbox-caption p:last-child {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.87rem;
}

@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-header nav {
    display: none;
  }

  .archive-console {
    grid-template-columns: 1fr 0.75fr;
  }

  .console-copy {
    padding-right: 3rem;
    padding-left: 3rem;
  }

  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collection-card:nth-child(2) {
    border-right: 0;
  }

  .collection-card:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .collection-card:nth-child(3),
  .collection-card:nth-child(4) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .altar-photo-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-card {
    grid-column: span 4;
  }

  .gallery-card:nth-child(11n + 1),
  .gallery-card:nth-child(11n + 7) {
    grid-column: span 8;
  }

  .gallery-card:nth-child(11n + 4) {
    grid-column: span 4;
  }
}

@media (max-width: 780px) {
  .site-header {
    min-height: 4.5rem;
    padding: 0.65rem 1rem;
  }

  .brand small,
  .access-label {
    display: none;
  }

  .archive-console {
    grid-template-columns: 1fr;
  }

  .console-copy {
    min-height: 38rem;
    padding: 4rem 1.25rem 3rem;
  }

  h1 {
    font-size: clamp(3.3rem, 15vw, 5.7rem);
  }

  .feature-figure {
    min-height: 25rem;
  }

  .feature-figure figcaption {
    right: 2rem;
    bottom: 2rem;
    left: 2rem;
  }

  .result-banner {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.9rem 1.25rem;
  }

  .page-section {
    padding: 4.5rem 1.25rem;
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    display: none;
  }

  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    grid-template-columns: 4.25rem 1fr;
    min-height: auto;
    padding: 1.5rem 0;
  }

  .collection-grid,
  .document-grid {
    grid-template-columns: 1fr;
  }

  .collection-card,
  .collection-card:nth-child(2) {
    min-height: 18rem;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .collection-card:last-child {
    border-bottom: 0;
  }

  .section-heading-row {
    align-items: stretch;
    flex-direction: column;
  }

  .altar-history-grid {
    grid-template-columns: 1fr;
  }

  .history-register li {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .altar-photo-strip {
    grid-template-columns: 1fr;
  }

  .sort-control {
    max-width: 18rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-card,
  .gallery-card:nth-child(11n + 1),
  .gallery-card:nth-child(11n + 7),
  .gallery-card:nth-child(11n + 4) {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 14rem;
  }

  .gallery-card:nth-child(7n + 1) {
    grid-column: span 2;
    min-height: 20rem;
  }

  .preservation-section {
    grid-template-columns: 1fr;
  }

  .preservation-mark {
    width: 6rem;
    margin: 1rem 0 2rem 1rem;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .lightbox {
    width: 96vw;
    height: 92vh;
  }
}

@media (max-width: 480px) {
  .brand strong {
    font-size: 0.92rem;
  }

  .archive-stats {
    gap: 1.1rem;
  }

  .archive-stats strong {
    font-size: 1.4rem;
  }

  .filter-chip {
    flex: 1 1 44%;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card,
  .gallery-card:nth-child(7n + 1) {
    grid-column: span 1;
    min-height: 18rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Source inventory and evidence controls */
.evidence-label { font-weight: 700; color: #6b1f2b; border-left: 3px solid #6b1f2b; padding-left: .65rem; }
.audit-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin: 1.5rem 0; }
.audit-summary > div { padding: 1.2rem; background: #f5edf0; border-top: 3px solid #6b1f2b; }
.audit-summary strong { display:block; font-size:1.8rem; color:#6b1f2b; }
.audit-summary span { display:block; font-size:1rem; }
.audit-detail { padding:1rem; border:1px solid #d5c4c8; margin:1rem 0; }
.audit-detail summary { font-weight:700; cursor:pointer; }
.register-links { display:flex; gap:1rem 1.5rem; flex-wrap:wrap; margin:1.5rem 0; }
.register-links a { font-weight:700; color:#6b1f2b; text-underline-offset:3px; }
.register-controls { display:grid; grid-template-columns:2fr 1fr 1fr; gap:1rem; margin-top:1.5rem; }
.register-controls label { font-size:1rem; font-weight:700; }
.register-controls input, .register-controls select { display:block; width:100%; margin-top:.5rem; padding:.75rem; border:1px solid #b9a8ad; background:white; border-radius:4px; color:#30272a; font:inherit; min-width:0; }
.source-table { font-size:.95rem; width:100%; table-layout:fixed; }
.source-table th:first-child { width:20%; }
.source-table th:nth-child(2) { width:28%; }
.source-table th:last-child { width:10%; }
.source-table td, .source-table th { overflow-wrap:anywhere; }
.source-table small { display:block; margin-top:.45rem; font-size:.875rem; font-weight:400; line-height:1.5; }
.register-pages { display:flex; justify-content:space-between; align-items:center; gap:1rem; margin-top:1rem; }
.register-pages button { padding:.7rem 1rem; background:#6b1f2b; color:#fff; border:0; border-radius:4px; font:inherit; cursor:pointer; }
.register-pages button:disabled { opacity:.45; cursor:default; }
#source-register > p, #windows .source-note { font-size:1rem; line-height:1.65; }
@media(max-width:760px) { .register-controls,.audit-summary { grid-template-columns:1fr; } .source-table { min-width:850px; } .register-pages { flex-wrap:wrap; } }
