
/* =========================
   Base / Typography
   ========================= */
.logo h1 a { text-decoration: none; }

#headerSpan{
  font-family: Rosarivo;
  font-size: 1.1em;
  color: #14246E;
}
body.dark #headerSpan{ color: #ffffff; }

h2, h3 { font-family: 'Quicksand'; }

.exp{
  font-family: Nunito;
  font-size: 20px;
  line-height: 1.6;
}

#easteregg { text-decoration: none; }


/* =========================
   Search bar (timeline)
   ========================= */
#timelineSearch { height: 38px; }
#timelineSearch::placeholder { opacity: .7; }

/* Unified pill search bar */
.input-group{
  border-radius: 999px;
  overflow: hidden; /* keeps pill clean */
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

/* Remove individual borders so the pill looks like one piece */
.input-group > .input-group-text,
.input-group > .form-control,
.input-group > .btn{
  border: 0 !important;
  box-shadow: none !important;
}

/* Left icon */
.input-group-text{
  background: transparent;
  padding-left: 1rem;
  padding-right: .5rem;
  color: var(--bs-secondary-color);
}

/* Input field */
#timelineSearch{
  background: transparent;
  padding-left: .25rem;
}

/* Clear button (x) - keep it inside the pill, no weird box */
#clearSearch{
  background: transparent;
  padding-left: .75rem;
  padding-right: 1rem;
  color: var(--bs-secondary-color);
  border-left: 1px solid rgba(var(--bs-body-color-rgb), .12) !important; /* subtle divider */
}

#clearSearch:hover{
  color: var(--bs-body-color);
}

/* One nice focus ring on the whole pill */
.input-group:focus-within{
  border-color: rgba(var(--bs-primary-rgb), .55);
  box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .18);
}


/* =========================
   Table layout + readability
   ========================= */
.table-wrap{ max-width: 100%; }
@media (min-width: 992px){  .table-wrap{ max-width: 1100px; } }
@media (min-width: 1200px){ .table-wrap{ max-width: 1150px; } }

/* Rounded table container */
.table-responsive{
  border-radius: 14px;
  overflow: hidden;                 /* critical for rounded corners */
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  border: 1px solid var(--bs-border-color);
}

/* Dark mode adjustment */
body.dark .table-responsive{
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  border-color: rgba(255,255,255,.15);
}

/* Column behaviors */
#eventTable td:nth-child(1),
#eventTable th:nth-child(1){
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#eventTable td:nth-child(3){
  color: rgba(var(--bs-body-color-rgb), .75);
  font-size: .95em;
}

/* Event column (you asked: center) */
#eventTable td:nth-child(2),
#eventTable th:nth-child(2){
  text-align: center;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Cap event width on larger screens (prevents huge empty space) */
@media (min-width: 992px){
  #eventTable th:nth-child(2),
  #eventTable td:nth-child(2){
    max-width: 520px;
  }
}

@media (min-width: 992px){

/* Explicit column balance (desktop) */
  #eventTable th:nth-child(1){ width: 18%; }
  #eventTable th:nth-child(3){ width: 26%; }

  #eventTable th:nth-child(1),
  #eventTable td:nth-child(1) {
    font-size: 0.88rem;
  }

  /* Row separators */
  #eventTable tbody tr{
    border-top: 1px solid var(--bs-border-color);
  }
}


/* =========================
   Mobile table (NO horizontal scroll, keep all info visible)
   ========================= */
@media (max-width: 576px){
  #eventTable{
    width: 100%;
    table-layout: auto;
    font-size: 0.95rem;
  }

  /* Allow wrapping so Region doesn't get cut off */
  #eventTable th,
  #eventTable td{
    white-space: normal !important;
    word-break: break-word;
  }

  /* Remove the desktop cap on event column for mobile */
  #eventTable th:nth-child(2),
  #eventTable td:nth-child(2){
    max-width: none;
    padding-left: .5rem;
    padding-right: .5rem;
  }

  /* Tighten padding overall so 3 columns fit */
  #eventTable td{
    padding: .5rem .5rem;
  }

  /* Rebalance widths on small screens */
  #eventTable th:nth-child(1),
  #eventTable td:nth-child(1){ 
    width: 28%;
    font-size: 0.75rem;
  }

  #eventTable th:nth-child(2),
  #eventTable td:nth-child(2){ width: 40%; }

  #eventTable th:nth-child(3),
  #eventTable td:nth-child(3){ width: 32%; }
}

.meta{
  font-size: 0.8em;
}

/* =========================
   Timeline row interaction
   ========================= */
.timeline-row{
  cursor: pointer;
  transition: transform .06s ease;
}
.timeline-row:hover{
  transform: translateY(-1px);
}
.timeline-row:focus{
  outline: 2px solid var(--bs-primary);
  outline-offset: -2px;
}


/* =========================
   Flags (date prefixes)
   ========================= */
.flag-token{
  font-weight: 600;
  font-size: 0.95em;
  letter-spacing: 0.02em;
  font-style: italic;
  opacity: .85;
}

.flag-l { color: #0d6efd; }  /* blue: legendary/uncertain */
.flag-t { color: #198754; }  /* green: traditional */
.flag-a { color: #fd7e14; }  /* amber: approximate */

.date-cell { white-space: nowrap; }

/* Stub rows — article not yet written */
.stub-row{
  cursor: default;
  opacity: 0.45;
}


/* =========================
   Dark theme
   ========================= */
body.dark { background-color: #111; color: #fff; }

/* Toggle button */
.theme-toggle{
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
}
.theme-toggle { color: #333; }
body.dark .theme-toggle { color: #fff; }

/* Show/hide sun vs moon purely via CSS */
body.light #iconMoon { display: none; }
body.dark  #iconSun  { display: none; }

/* Dark theme table niceties */
body.dark .table.table-dark{
  --bs-border-color: rgba(255,255,255,0.15);
}
body.dark .table.table-dark.table-striped > tbody > tr:nth-of-type(odd) > *{
  --bs-table-accent-bg: rgba(255,255,255,0.03);
}
body.dark .table.table-dark > :not(caption) > * > *{
  border-color: rgba(255,255,255,0.12);
}

/* Event count text */
body.dark #timelineCount,body.dark #countText {
  color: rgba(255,255,255,.70);
}

/* Region column text (when table is dark) */
body.dark #eventTable.table-dark td:nth-child(3){
  color: rgba(255,255,255,.72) !important;
}
body.dark #eventTable.table-dark thead th{
  color: rgba(255,255,255,.92);
}
body.dark .input-group{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.18);
}
/* =========================
   Dark mode: fix search icon background
   ========================= */

body.dark .input-group-text{
  background: transparent;          /* remove white bubble */
  color: rgba(255,255,255,.75);
}

/* Ensure no borders sneak in */
body.dark .input-group-text,
body.dark #timelineSearch,
body.dark #clearSearch{
  border: none;
}

body.dark .input-group-text,
body.dark #clearSearch{
  color: rgba(255,255,255,.75);
}

body.dark #timelineSearch{
  color: #fff;
  background: transparent;
}

body.dark #timelineSearch::placeholder{
  color: rgba(255,255,255,.55);
}

/* =========================
   Images (general)
   ========================= */
.img-wrap { max-width: 65%; height: auto; margin: 1rem; }
.img-left { float: left; margin-right: 1rem; }
.img-right { float: right; margin-left: 1rem; }

@media (max-width: 576px){
  .img-left, .img-right{
    float: none;
    margin: 0 auto 1rem;
    display: block;
  }
}


/* =========================
   Footer
   ========================= */
.ftrtxt{ background: transparent; font-size: 1.5em; }
.subtxt1{ font-family: Rosarivo; }
.subtxt2{ font-family: Trajan Pro, Cinzel; }

.footer{
  background: #111111;
  color: white;
  padding: 2.5rem 6vw;
  border-top: 2px solid #333333;
  box-shadow: 0 0 10px rgba(0,0,0,.5);
  font-family: Arial, sans-serif;
  width: 100%;
  margin: 0;
}
@media (min-width: 768px){
  .footer{ padding: 2.5rem 12vw; }
}
@media (min-width: 1200px){
  .footer{ padding: 2.5rem 20vw; }
}
#cprtxt{ font-family: Lugrasimo; }


/* =========================
   PDF article block
   ========================= */
.pdf-article h2{
  font-family: "Times New Roman", Times, serif;
  font-weight: 700;
}
.pdf-article h4{
  font-family: "Times New Roman", Times, serif;
  font-weight: 700;
  margin-top: 1.25rem;
}

.pdf-article p{
  font-size: 20px;
}

.pdf-article ul{
  margin-top: 0.75rem;
  font-size: 20px; /* list text */
}

.pdf-figure{
  margin: 1.25rem 0;
  text-align: center;
}
.pdf-figure img{
  max-width: 70%;
  height: auto;
  border-radius: 10px;
}
.pdf-caption{
  margin-top: 0.5rem;
  font-size: 0.95rem;
  opacity: 0.85;
}


/* =========================
   Diagram area
   ========================= */
.diagram-wrap{
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.diagram-wrap svg{
  width: max-content;
  height: auto;
  display: block;
  margin: 0 auto;
  min-width: 1250px; /* adjust as needed */
}

@media (min-width: 1200px){
  .diagram-wrap svg{
    max-width: 1200px;
  }
}
/* Academic article layouts */
.essay { font-size: calc(1.04rem - 2px) !important; }
.article .masthead h1 { font-size: clamp(1.467rem, 4vw, 3rem) !important; }
.article .essay h2 { font-size: clamp(1.067rem, 2.667vw, 1.467rem) !important; }

.port-article { max-width: 1100px; margin: 0 auto; }
.port-masthead { text-align: center; padding: 3.5rem 1rem 2.5rem; border-bottom: 1px solid rgba(128,128,128,.4); }
.port-masthead h1 { max-width: 900px; margin: 0 auto; font: 600 clamp(1.467rem,4vw,3rem)/1.08 Cinzel,serif; }
.port-content { padding-top: 2.5rem; font: calc(1.04rem - 2px)/1.85 "Libre Baskerville",Georgia,serif; }
.port-intro { max-width: 850px; margin: 0 auto 2.5rem; }
.port-note { display: block; margin-top: 1.25rem; padding: 1.15rem 1.35rem; border-left: 3px solid #a77b46; background: rgba(167,123,70,.08); font-size: calc(.875rem - 2px); line-height: 1.7; }
.table-shell { overflow: hidden; border: 1px solid rgba(128,128,128,.35); border-radius: .5rem; box-shadow: 0 12px 32px rgba(0,0,0,.12); }
.port-article table { margin: 0; font: calc(1rem - 2px)/1.45 "Libre Baskerville",Georgia,serif; }
.port-article table th { padding: .85rem .75rem; font-family: Cinzel,serif; font-weight: 600; letter-spacing: .025em; }
.port-article table td { padding: .62rem .75rem; vertical-align: middle; }
.port-summary { width: fit-content; margin: 2.5rem auto 0; padding: 1.25rem 2.5rem; border-top: 2px solid #a77b46; text-align: left; font: calc(1rem - 2px)/1.8 "Libre Baskerville",Georgia,serif; }
body.dark .port-note { background: rgba(210,165,105,.1); }

@media (max-width: 767px) {
  .port-masthead { padding: 2.5rem .5rem 2rem; }
  .table-shell { overflow-x: auto; border-radius: .25rem; }
  .port-article table { min-width: 650px; }
}

/* =========================
   Historical ledger timeline
   ========================= */
.era-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0 auto 1.25rem;
}

.era-filter {
  border: 1px solid rgba(128,128,128,.35);
  border-radius: 999px;
  padding: .38rem .8rem;
  background: transparent;
  color: inherit;
  font-family: Nunito, sans-serif;
  font-size: .76rem;
  letter-spacing: .025em;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.era-filter:hover { border-color: #a77b46; transform: translateY(-1px); }
.era-filter:focus-visible { outline: 2px solid #a77b46; outline-offset: 2px; }
.era-filter.active { color: #fff; background: #8a6438; border-color: #8a6438; }
body.dark .era-filter.active { color: #15110d; background: #d2a569; border-color: #d2a569; }

.year-range-control {
  max-width: 620px;
  margin: -.25rem auto 1.5rem;
  padding: .7rem 1rem .85rem;
  border: 1px solid rgba(128,128,128,.24);
  border-radius: 9px;
  background: rgba(128,128,128,.045);
}
.year-range-control[hidden] { display: none; }
.year-range-heading { display: flex; align-items: center; gap: .75rem; margin-bottom: .45rem; font-family: Nunito,sans-serif; }
.year-range-heading > span { color: rgba(var(--bs-body-color-rgb),.58); font-size: .65rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.year-range-values { display: flex; flex: 1; align-items: center; justify-content: center; gap: .35rem; color: #79552e; }
.year-range-values input { width: 8.2rem; padding: .18rem .35rem; border: 1px solid transparent; border-radius: 4px; background: transparent; color: inherit; text-align: center; font: 750 .74rem/1.35 Nunito,sans-serif; font-variant-numeric: tabular-nums; }
.year-range-values input:hover { border-color: rgba(167,123,70,.35); }
.year-range-values input:focus { border-color: #a77b46; outline: 2px solid rgba(167,123,70,.18); background: rgba(255,255,255,.55); }
.year-range-heading button { padding: .15rem .45rem; border: 0; background: transparent; color: inherit; font-size: .68rem; opacity: .62; text-decoration: underline; text-underline-offset: 2px; }
.year-range-heading button:hover { opacity: 1; }
body.dark .year-range-heading > span { color: rgba(255,255,255,.5); }
body.dark .year-range-values { color: #d2a569; }
body.dark .year-range-values input:focus { background: rgba(255,255,255,.06); }

.dual-range { position: relative; height: 24px; }
.dual-range-track { position: absolute; top: 11px; right: 8px; left: 8px; height: 3px; border-radius: 3px; background: rgba(128,128,128,.28); }
.dual-range-track span { position: absolute; inset-block: 0; left: 0; right: 0; border-radius: inherit; background: #a77b46; }
.dual-range input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 24px;
  margin: 0;
  border: 0;
  background: transparent;
  appearance: none;
  pointer-events: none;
}
.dual-range input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: transparent; }
.dual-range input[type="range"]::-moz-range-track { height: 3px; background: transparent; }
.dual-range input[type="range"]::-webkit-slider-thumb { width: 15px; height: 15px; margin-top: -6px; border: 2px solid #fff; border-radius: 50%; background: #a77b46; box-shadow: 0 1px 5px rgba(0,0,0,.3); appearance: none; pointer-events: auto; cursor: grab; }
.dual-range input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border: 2px solid #fff; border-radius: 50%; background: #a77b46; box-shadow: 0 1px 5px rgba(0,0,0,.3); pointer-events: auto; cursor: grab; }
.dual-range input[type="range"]:focus-visible { outline: none; }
.dual-range input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid #a77b46; outline-offset: 3px; }

.table-wrap { max-width: 1440px; }
.table-wrap .table-responsive {
  border-radius: 10px;
  border-color: rgba(128,128,128,.3);
  box-shadow: 0 18px 50px rgba(33,25,16,.11);
  background: rgba(255,255,255,.72);
}
body.dark .table-wrap .table-responsive {
  background: rgba(18,18,18,.78);
  box-shadow: 0 18px 52px rgba(0,0,0,.42);
}

#eventTable {
  --ledger-gold: #a77b46;
  --ledger-line: rgba(128,128,128,.22);
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-family: Nunito, sans-serif;
  --bs-table-striped-bg: transparent;
  --bs-table-hover-bg: transparent;
}

#eventTable thead {
  position: sticky;
  top: 0;
  z-index: 5;
}

#eventTable thead th {
  padding: .9rem 1rem;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.13);
  background: #24272a;
  color: rgba(255,255,255,.9);
  font-family: Cinzel, serif;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

#eventTable thead th:first-child { text-align: right; }
#eventTable thead th:nth-child(2),
#eventTable thead th:nth-child(3) { text-align: left; }

#eventTable tbody .timeline-row { --bs-table-bg: transparent; transform: none; }
#eventTable tbody .timeline-row > td {
  padding: .86rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--ledger-line);
  background: transparent;
  transition: background-color .16s ease, color .16s ease;
}

#eventTable tbody .timeline-row:hover > td { background: rgba(167,123,70,.085); }
body.dark #eventTable tbody .timeline-row:hover > td { background: rgba(210,165,105,.09); }

#eventTable tbody .timeline-row > td:first-child {
  width: 19%;
  padding-right: 1.35rem;
  border-right: 1px solid rgba(167,123,70,.48);
  text-align: right;
  color: #79552e;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .015em;
  font-variant-numeric: tabular-nums;
}
body.dark #eventTable tbody .timeline-row > td:first-child { color: #d2a569; }

#eventTable tbody .timeline-row > td:nth-child(2) {
  width: 51%;
  max-width: none;
  padding-left: 1.35rem;
  text-align: left;
  font-weight: 650;
}

#eventTable tbody .timeline-row > td:nth-child(3) {
  width: 30%;
  text-align: left;
  font-size: .83rem;
  font-weight: 650;
  line-height: 1.45;
}

.era-divider th {
  padding: 1.15rem 1rem .65rem;
  border: 0;
  border-bottom: 1px solid rgba(167,123,70,.42);
  background: rgba(167,123,70,.075);
  color: #6f4d29;
  text-align: left;
  font-family: Cinzel, serif;
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.era-divider th span { margin-right: .75rem; }
.era-divider th small { color: rgba(var(--bs-body-color-rgb),.58); font: 600 .67rem Nunito,sans-serif; letter-spacing: .06em; }
body.dark .era-divider th { background: rgba(210,165,105,.075); color: #d2a569; }
body.dark .era-divider th small { color: rgba(255,255,255,.48); }

.row-arrow {
  float: right;
  margin-left: .75rem;
  color: #a77b46;
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity .16s ease, transform .16s ease;
}
.timeline-row:hover .row-arrow,
.timeline-row:focus .row-arrow { opacity: 1; transform: translateX(0); }
.timeline-row:focus { outline: 2px solid #a77b46; outline-offset: -2px; }
.stub-row { opacity: .5; }

@media (max-width: 700px) {
  .table-wrap .table-responsive {
    overflow-x: auto;
    border: 1px solid rgba(128,128,128,.3);
    border-radius: 8px;
    background: rgba(255,255,255,.72);
    box-shadow: 0 10px 28px rgba(33,25,16,.1);
    -webkit-overflow-scrolling: touch;
  }
  body.dark .table-wrap .table-responsive { background: rgba(18,18,18,.78); box-shadow: 0 12px 30px rgba(0,0,0,.36); }
  #eventTable { min-width: 620px; table-layout: fixed; font-size: .8rem; }
  #eventTable thead { position: static; display: table-header-group; }
  #eventTable thead th { padding: .7rem .65rem; font-size: .65rem; }
  #eventTable tbody .timeline-row { display: table-row; width: auto; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  #eventTable tbody .timeline-row > td { display: table-cell; padding: .7rem .65rem; vertical-align: middle; }
  #eventTable tbody .timeline-row > td::before { content: none; }
  #eventTable tbody .timeline-row > td:first-child { width: 22% !important; padding-right: .8rem; text-align: right; font-size: .72rem; }
  #eventTable tbody .timeline-row > td:nth-child(2) { width: 46% !important; padding-left: .8rem; font-size: .8rem; line-height: 1.35; }
  #eventTable tbody .timeline-row > td:nth-child(3) { width: 32% !important; padding: .7rem .65rem; font-size: .72rem; }
  .row-arrow { display: none; }
  .era-divider { display: table-row; width: auto; }
  .era-divider th { display: table-cell; width: auto !important; padding: .85rem .7rem .55rem; background: rgba(167,123,70,.075) !important; }
  .era-divider th span { margin-right: .55rem; white-space: normal; }
  .empty-state { display: table-row; }
  .year-range-control { margin-inline: .25rem; }
  .year-range-heading { gap: .4rem; }
  .year-range-values { gap: .15rem; }
  .year-range-values input { width: 6.6rem; font-size: .68rem; }
}

/* =========================
   Miscellaneous archive
   ========================= */
.archive-page { max-width: 1080px; }
.archive-masthead { max-width: 790px; margin: 0 auto; padding: 5.25rem 1rem 4rem; text-align: center; }
.archive-eyebrow { margin-bottom: .75rem; color: #966b38; font: 750 .7rem/1.4 Nunito,sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.archive-masthead h1 { margin: 0 0 1.2rem; font: 600 clamp(2rem,5vw,3.6rem)/1.08 Cinzel,serif; }
.archive-masthead > p:last-child { max-width: 680px; margin: 0 auto; color: rgba(var(--bs-body-color-rgb),.68); font: .92rem/1.85 "Libre Baskerville",Georgia,serif; }
body.dark .archive-masthead > p:last-child { color: rgba(255,255,255,.64); }

.archive-collection { padding: 0 0 2rem; }
.archive-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.15rem; padding-bottom: .75rem; border-bottom: 1px solid rgba(128,128,128,.3); }
.archive-section-heading h2 { margin: 0; font: 600 1rem/1.4 Cinzel,serif; letter-spacing: .055em; text-transform: uppercase; }
.archive-section-heading span { color: rgba(var(--bs-body-color-rgb),.5); font: 700 .68rem Nunito,sans-serif; letter-spacing: .08em; text-transform: uppercase; }
body.dark .archive-section-heading span { color: rgba(255,255,255,.45); }

.archive-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.1rem; }
.archive-card-featured { grid-column: 1 / -1; }
.archive-card { min-height: 100%; overflow: hidden; border: 1px solid rgba(128,128,128,.28); border-radius: 10px; background: rgba(255,255,255,.64); box-shadow: 0 12px 34px rgba(33,25,16,.08); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.archive-card:hover { border-color: rgba(167,123,70,.58); box-shadow: 0 18px 42px rgba(33,25,16,.13); transform: translateY(-3px); }
body.dark .archive-card { background: rgba(255,255,255,.035); box-shadow: 0 14px 38px rgba(0,0,0,.22); }
body.dark .archive-card:hover { box-shadow: 0 20px 48px rgba(0,0,0,.34); }
.archive-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.archive-card-link:hover { color: inherit; }
.archive-card-image { aspect-ratio: 16/7; overflow: hidden; border-bottom: 1px solid rgba(128,128,128,.22); background: #211c17; }
.archive-card-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 48%; filter: saturate(.8) contrast(1.02); transition: transform .45s ease, filter .3s ease; }
.archive-card:hover .archive-card-image img { transform: scale(1.025); filter: saturate(.95) contrast(1.02); }
.archive-card-number { display: grid; min-height: 180px; place-items: center; border-bottom: 1px solid rgba(128,128,128,.22); background: linear-gradient(145deg,rgba(167,123,70,.17),rgba(167,123,70,.035)); color: #966b38; font: 600 4.8rem/1 Cinzel,serif; }
.archive-card-monogram { font-size: 3.4rem; letter-spacing: .06em; }
body.dark .archive-card-number { color: #d2a569; background: linear-gradient(145deg,rgba(210,165,105,.14),rgba(210,165,105,.025)); }
.archive-card-body { display: flex; flex: 1; flex-direction: column; padding: 1.35rem 1.45rem 1.45rem; }
.archive-card-meta { display: flex; flex-wrap: wrap; gap: .4rem .7rem; margin-bottom: .75rem; color: #966b38; font: 750 .62rem/1.4 Nunito,sans-serif; letter-spacing: .11em; text-transform: uppercase; }
body.dark .archive-card-meta { color: #d2a569; }
.archive-card-meta span + span::before { content: "·"; margin-right: .7rem; }
.archive-card h3 { margin: 0 0 .65rem; font: 600 clamp(1.25rem,2.3vw,1.75rem)/1.25 Cinzel,serif; }
.archive-card p { margin: 0 0 1.4rem; color: rgba(var(--bs-body-color-rgb),.68); font: .82rem/1.72 "Libre Baskerville",Georgia,serif; }
body.dark .archive-card p { color: rgba(255,255,255,.62); }
.archive-card-action { margin-top: auto; color: #79552e; font: 750 .72rem Nunito,sans-serif; letter-spacing: .035em; }
body.dark .archive-card-action { color: #d2a569; }
.archive-card-action span { display: inline-block; margin-left: .3rem; transition: transform .18s ease; }
.archive-card:hover .archive-card-action span { transform: translateX(4px); }
.archive-card-link:focus-visible { outline: 2px solid #a77b46; outline-offset: -3px; }

.archive-return { margin: 2rem 0 1rem; text-align: center; }
.archive-return a { color: rgba(var(--bs-body-color-rgb),.62); font: 700 .72rem Nunito,sans-serif; text-decoration-color: rgba(167,123,70,.55); text-underline-offset: 3px; }
body.dark .archive-return a { color: rgba(255,255,255,.58); }

@media (max-width: 800px) {
  .archive-masthead { padding-top: 3.5rem; padding-bottom: 3rem; }
  .archive-grid { grid-template-columns: 1fr; }
  .archive-card-featured { grid-column: auto; }
  .archive-card-number { min-height: 140px; }
}

@media (max-width: 480px) {
  .archive-masthead { padding-inline: .25rem; }
  .archive-section-heading { align-items: center; }
  .archive-section-heading h2 { font-size: .82rem; }
  .archive-card-body { padding: 1.15rem; }
}
