/* An editorial reading layout, shared by the four parish history pages. */
@font-face {
  font-family: 'Source Serif 4 Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/source-serif-4/source-serif-4-display-regular.woff2') format('woff2');
}

.history-page {
  --history-green: #203c32;
  --history-ink: #283b32;
  --history-muted: #506056;
  --history-brass: #886b38;
  --history-line: #dce2d7;
  --history-paper: #f8f7f1;
  --history-serif: 'Source Serif 4 Display', georgia, serif;

  padding-bottom: clamp(52px, 7vw, 96px);
  color: var(--history-ink);
  background: var(--history-paper);
  font-size: 1.1563rem;
  line-height: 1.75;
}

.history-page :where(h1, h2, h3, p, figure, ol, ul, dl, dd) {
  margin: 0;
}

.history-page :where(h1, h2, h3) {
  color: var(--history-green);
  font-family: var(--history-serif);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.history-page :where(p, li, dd) {
  color: var(--history-muted);
  font-size: inherit;
  line-height: inherit;
}

.history-page :where(strong, b) {
  color: var(--history-ink);
  font-weight: 650;
}

.history-page :where(a) {
  color: var(--history-green);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.history-page :where(a:focus-visible) {
  outline: 3px solid var(--history-brass);
  outline-offset: 5px;
  box-shadow: 0 0 0 3px var(--history-paper);
}

.history-page :where([id]) {
  scroll-margin-top: 32px;
}

.history-hero {
  padding-block: clamp(20px, 3.5vw, 44px) clamp(30px, 4vw, 52px);
  background:
    radial-gradient(ellipse at 0 10%, #ede8d94d, transparent 58%),
    var(--history-paper);
}

.history-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: clamp(28px, 4.5vw, 64px);
  align-items: stretch;
}

.history-hero__copy {
  min-width: 0;
  padding-block: 4px;
}

.history-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
  margin-bottom: clamp(18px, 2.5vw, 30px);
  color: var(--history-muted);
  font-size: 1rem;
  line-height: 1.45;
}

.history-breadcrumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--history-muted);
}

.history-kicker,
.history-page .eyebrow,
.history-section__index {
  margin-bottom: 12px;
  color: var(--history-brass);
  font-family: var(--font-sans);
  font-size: 0.9688rem;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: 0.045em;
  text-transform: none;
}

.history-hero h1 {
  margin-bottom: 18px;
  font-size: clamp(2.6rem, 4.5vw, 4.15rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.history-hero h1 span {
  display: block;
  color: #58674f;
}

.history-hero__subtitle {
  max-width: 33ch;
  margin-bottom: 16px;
  color: var(--history-ink);
  font-size: clamp(1.1875rem, 1.65vw, 1.375rem);
  line-height: 1.45;
  text-wrap: balance;
}

.history-hero__lead {
  max-width: 49ch;
  font-size: 1.125rem;
  line-height: 1.7;
}

.history-hero__actions,
.history-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin-top: 26px;
}

.history-button,
.history-text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  max-width: 100%;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.history-button {
  padding: 12px 21px;
  border: 1px solid var(--history-green);
  border-radius: 8px;
  color: #fffef7;
  background: var(--history-green);
  text-align: center;
  text-decoration: none;
}

.history-button:hover {
  border-color: #315c48;
  color: #fff;
  background: #315c48;
}

.history-text-link {
  padding-block: 10px;
  color: var(--history-green);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.history-text-link:hover {
  color: var(--history-brass);
}

.history-hero__media {
  position: relative;
  min-width: 0;
  min-height: 450px;
  max-height: 580px;
  overflow: hidden;
  border-radius: 12px;
  background: #dbe2d5;
  isolation: isolate;
}

.history-hero__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% top;
  transform-origin: 60% top;
  transition: transform 800ms ease;
}

.history-hero__caption {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 3px;
  padding: 48px 24px 21px;
  color: #fffef8;
  background: linear-gradient(180deg, #142d2200, #142d22d9 55%, #142d22f5);
  font-size: 1.0625rem;
  line-height: 1.4;
}

.history-hero__caption span:last-child {
  color: #e2e9dd;
  font-size: 0.9688rem;
}

.history-milestones {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--history-line);
}

.history-milestone {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  min-height: 108px;
  padding: 23px clamp(16px, 2.8vw, 36px);
  border-inline-end: 1px solid var(--history-line);
  text-decoration: none;
  transition: background-color 180ms ease;
}

.history-milestone:first-child {
  padding-inline-start: 0;
}

.history-milestone:last-child {
  border-inline-end: 0;
}

.history-milestone:hover {
  background: #e9eee35c;
}

.history-milestone:focus-visible {
  outline-offset: -4px;
  box-shadow: none;
}

.history-milestone__date {
  color: var(--history-green);
  font-family: var(--history-serif);
  font-size: clamp(1.625rem, 2.5vw, 2rem);
  line-height: 1.2;
}

.history-milestone__label {
  color: var(--history-muted);
  font-size: 1.0625rem;
  line-height: 1.4;
}

.history-shell {
  padding-top: clamp(42px, 6vw, 76px);
}

.history-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 760px);
  justify-content: space-between;
  align-items: start;
  gap: clamp(36px, 6vw, 84px);
  max-width: 1100px;
}

.history-sidebar {
  position: sticky;
  top: 32px;
  min-width: 0;
}

.history-toc h2 {
  margin-bottom: 18px;
  font-size: 1.5rem;
  line-height: 1.3;
}

.history-toc__list {
  display: grid;
  gap: 5px;
  padding: 0;
  list-style: none;
}

.history-toc__list a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  min-height: 46px;
  padding: 10px 9px 10px 12px;
  border-inline-start: 1px solid var(--history-line);
  color: var(--history-muted);
  font-size: 1.0625rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.history-toc__number {
  color: var(--history-brass);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.history-toc__list a:hover {
  border-color: var(--history-brass);
  color: var(--history-green);
  background: #e9eee36b;
}

.history-toc__visit {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  margin-top: 24px;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
}

.history-article {
  min-width: 0;
}

.history-article :where(p) {
  max-width: 70ch;
  margin-bottom: 20px;
}

.history-intro > p:not(.history-kicker),
.history-section > p:not(.history-section__index),
.history-card__body > p,
.history-current__body > p:not(.history-kicker),
.history-finale > p {
  max-width: none;
  text-align: start;
  text-align-last: start;
  hyphens: manual;
  overflow-wrap: break-word;
  word-break: normal;
}

.history-article :where(h2) {
  max-width: 29ch;
  margin-bottom: 22px;
  font-size: clamp(1.875rem, 3vw, 2.5rem);
  line-height: 1.23;
}

.history-article :where(h3) {
  margin-bottom: 12px;
  font-size: 1.5rem;
  line-height: 1.3;
}

.history-article :where(p:last-child) {
  margin-bottom: 0;
}

.history-article .history-kicker {
  margin-bottom: 12px;
}

.history-intro {
  padding-bottom: 4px;
}

.history-epigraph {
  margin-top: 34px;
  padding: 28px 0;
  border-block: 1px solid var(--history-line);
}

.history-epigraph p:not(.history-kicker) {
  max-width: 48ch;
  color: var(--history-green);
  font-family: var(--history-serif);
  font-size: clamp(1.375rem, 2vw, 1.625rem);
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.history-section {
  margin-top: clamp(38px, 5vw, 56px);
  padding-top: clamp(32px, 4vw, 44px);
  border-top: 1px solid var(--history-line);
}

.history-epigraph + .history-section {
  margin-top: 0;
  padding-top: 36px;
  border-top: 0;
}

.history-section:target {
  border-color: #b4aa8a;
}

.history-shell:focus,
.history-section:focus {
  outline: none;
  box-shadow: none;
}

.history-section:focus-visible h2,
.history-shell:focus-visible .history-intro h2 {
  text-decoration: underline;
  text-decoration-color: #baa777;
  text-decoration-thickness: 1px;
  text-underline-offset: 8px;
}

.history-section .history-section__index {
  margin-bottom: 12px;
}

.history-accent {
  color: inherit;
}

.history-highlight {
  color: var(--history-green);
  font-weight: 650;
}

.history-card {
  margin-block: 27px;
  border-inline-start: 2px solid #bca775;
  border-radius: 0 8px 8px 0;
  background: #efefe5;
}

.history-card__body {
  padding: 22px 26px;
}

.history-quote {
  margin-block: 28px;
  padding: 4px 0 4px 22px;
  border-inline-start: 2px solid #bca775;
}

.history-quote p:not(.history-kicker) {
  color: var(--history-green);
  font-family: var(--history-serif);
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  line-height: 1.6;
}

.history-timeline {
  display: grid;
  gap: 26px;
  margin-block: 32px;
  margin-inline-start: 5px;
  padding: 0 0 0 25px;
  border-inline-start: 1px solid #c4cbb8;
  list-style: none;
}

.history-timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 7px 18px;
}

.history-timeline__item::before {
  content: '';
  position: absolute;
  top: 9px;
  left: -31px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--history-paper);
  border-radius: 50%;
  background: var(--history-brass);
  box-shadow: 0 0 0 1px #bca775;
}

.history-timeline__period {
  grid-row: 1 / span 2;
  color: var(--history-brass);
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.55;
  font-variant-numeric: lining-nums;
}

.history-timeline .history-timeline__title {
  margin: 0;
  font-size: 1.375rem;
  line-height: 1.35;
}

.history-timeline__description {
  grid-column: 2;
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.65;
}

.history-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-block: 30px;
  padding: 25px 20px;
  border-block: 1px solid var(--history-line);
  background: #f0f1e9;
}

.history-comparison__card {
  min-width: 0;
  text-align: center;
}

.history-comparison__label {
  margin-bottom: 9px;
  color: var(--history-brass);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.history-comparison .history-comparison__name {
  margin: 0;
  color: var(--history-green);
  font-family: var(--history-serif);
  font-size: 1.5625rem;
  line-height: 1.25;
  text-wrap: balance;
}

.history-comparison .history-comparison__meaning {
  margin: 10px 0 0;
  font-size: 1.0625rem;
  line-height: 1.5;
}

.history-comparison__arrow {
  color: var(--history-brass);
  font-size: 1.625rem;
  line-height: 1;
  text-align: center;
}

.history-reference {
  display: grid;
  gap: 24px;
  margin-top: 42px;
}

.history-facts,
.history-current {
  border: 1px solid var(--history-line);
  border-radius: 10px;
  background: #f0f2eb;
}

.history-current {
  background: #fdfcf7;
}

.history-facts__body,
.history-current__body {
  padding: clamp(22px, 3vw, 30px);
}

.history-facts__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 28px;
  padding: 0;
}

.history-facts__item {
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid var(--history-line);
}

.history-facts__item dt {
  margin-bottom: 5px;
  color: var(--history-muted);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.history-facts__item dd {
  color: var(--history-ink);
  font-size: 1.125rem;
  line-height: 1.6;
}

.history-current__list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-inline-start: 22px;
  list-style: disc;
}

.history-current__list li {
  padding-inline-start: 4px;
}

.history-current__list li::marker {
  color: var(--history-brass);
}

.history-finale {
  margin-top: 42px;
  padding-block: clamp(30px, 4vw, 42px);
  border-block: 1px solid var(--history-line);
}

.history-finale h2 {
  max-width: 26ch;
}

.history-cta {
  margin-top: 36px;
  padding: clamp(26px, 4vw, 38px);
  border-radius: 12px;
  color: #fffef8;
  background:
    radial-gradient(ellipse at 100% 0, #3a5844 0, transparent 68%),
    var(--history-green);
}

.history-cta h2 {
  color: #fffef8;
  font-size: clamp(1.75rem, 2.75vw, 2.25rem);
}

.history-cta p {
  color: #e0e8dc;
}

.history-cta .history-kicker,
.history-cta .eyebrow {
  color: #e1c68d;
}

.history-cta .history-button {
  border-color: #ead8ad;
  color: var(--history-green);
  background: #ead8ad;
}

.history-cta .history-button:hover {
  border-color: #f8e7bf;
  background: #f8e7bf;
}

.history-cta .history-text-link {
  color: #fffef8;
}

.history-cta .history-text-link:hover {
  color: #ead8ad;
}

.history-cta a:focus-visible {
  outline-color: #f0d194;
  box-shadow: 0 0 0 3px var(--history-green);
}

.history-cta__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin-top: 26px;
  padding-top: 19px;
  border-top: 1px solid #e0e8dc33;
  color: #e0e8dc;
  font-size: 1.0625rem;
  line-height: 1.55;
}

.history-cta__meta a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #fffef8;
  font-weight: 600;
  white-space: nowrap;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .history-hero__media:hover img {
    transform: scale(1.025);
  }
}

@media (width <= 1100px) {
  .history-hero h1 {
    font-size: clamp(2.5rem, 4.5vw, 3.25rem);
  }

  .history-grid {
    grid-template-columns: 215px minmax(0, 1fr);
    gap: 40px;
  }

  .history-timeline__item {
    grid-template-columns: 108px minmax(0, 1fr);
    column-gap: 16px;
  }
}

@media (width <= 960px) {
  .history-hero__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .history-hero__copy {
    max-width: 680px;
  }

  .history-hero h1 {
    font-size: clamp(2.5rem, 5.5vw, 3.5rem);
  }

  .history-hero__subtitle,
  .history-hero__lead {
    max-width: 56ch;
  }

  .history-hero__media {
    min-height: 0;
    height: clamp(240px, 43vw, 360px);
  }

  .history-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    max-width: 790px;
  }

  .history-sidebar {
    position: static;
  }

  .history-toc {
    padding-bottom: 26px;
    border-bottom: 1px solid var(--history-line);
  }

  .history-toc__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
  }

  .history-toc__visit {
    margin-top: 15px;
  }
}

@media (width <= 600px) {
  .history-page {
    font-size: 1.125rem;
  }

  .history-hero {
    padding-block: 12px 28px;
  }

  .history-breadcrumbs {
    margin-bottom: 16px;
  }

  .history-hero h1 {
    font-size: clamp(2.375rem, 8.5vw, 3rem);
    line-height: 1.08;
  }

  .history-hero__subtitle {
    font-size: 1.1875rem;
  }

  .history-hero__lead {
    line-height: 1.65;
  }

  .history-hero__actions {
    gap: 8px 20px;
    margin-top: 21px;
  }

  .history-hero__media {
    height: clamp(215px, 55vw, 280px);
    border-radius: 8px;
  }

  .history-hero__caption {
    gap: 2px;
    padding: 40px 16px 15px;
    font-size: 1rem;
  }

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

  .history-milestone {
    min-height: 102px;
    padding: 19px 18px;
  }

  .history-milestone:nth-child(odd) {
    padding-inline-start: 0;
  }

  .history-milestone:nth-child(even) {
    padding-inline-end: 0;
    border-inline-end: 0;
  }

  .history-milestone:nth-child(-n + 2) {
    border-bottom: 1px solid var(--history-line);
  }

  .history-milestone__date {
    font-size: 1.6875rem;
  }

  .history-milestone__label {
    font-size: 1rem;
  }

  .history-shell {
    padding-top: 34px;
  }

  .history-toc__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 10px;
  }

  .history-toc__list a {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 7px;
    padding-inline: 8px 4px;
    font-size: 1rem;
  }

  .history-article :where(h2) {
    font-size: 1.9375rem;
  }

  .history-epigraph {
    margin-top: 26px;
    padding-block: 24px;
  }

  .history-card__body {
    padding: 20px;
  }

  .history-quote {
    padding-inline-start: 18px;
  }

  .history-timeline__item {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 5px;
  }

  .history-timeline__period {
    grid-row: auto;
  }

  .history-timeline__description {
    grid-column: auto;
  }

  .history-comparison {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 24px 18px;
  }

  .history-comparison__arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .history-facts__list {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-cta {
    padding: 26px 22px;
  }

  .history-cta h2 {
    font-size: 1.875rem;
  }

  .history-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .history-cta__meta {
    gap: 7px;
    margin-top: 20px;
    padding-top: 16px;
  }
}

@media (width <= 360px) {
  .history-toc__list {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-hero h1 {
    font-size: 2.1875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .history-page *,
  .history-page *::before,
  .history-page *::after {
    animation: none;
    transition: none;
  }
}

/* ── Sources, photographs and per-section attribution ─────────────────────── */

.history-sources-note {
  margin-top: 18px;
  font-size: 0.9375rem;
  color: #5e6a60;
}

.history-photo {
  margin: 28px 0;
}

.history-photo a {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(32, 60, 50, 0.14);
  box-shadow: 0 14px 34px rgba(24, 40, 32, 0.12);
}

.history-photo img {
  width: 100%;
  height: auto;
}

.history-photo figcaption {
  margin-top: 10px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #5e6a60;
}

.history-sources__list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding-left: 1.4em;
}

.history-sources__list li {
  line-height: 1.6;
}

.history-sources__list .history-text-link {
  display: inline;
  min-height: 0;
  padding: 0;
  font-size: inherit;
}

.history-section p .history-text-link {
  display: inline;
  min-height: 0;
  padding: 0;
  font-size: inherit;
}

/* ── Authored study page ─────────────────────────────────────────────────── */

.history-author {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 18px;
  font-size: 1rem;
}

.history-author__name {
  font-weight: 650;
  color: var(--history-ink, #1e2d25);
}

.history-author__role {
  color: #5e6a60;
}

.history-hero__note {
  margin-top: 12px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #5e6a60;
}

.history-facts__list--inline {
  margin: 22px 0;
}
