.archive-page {
  min-width: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 14rem, rgba(101, 78, 40, 0.13), transparent 30rem),
    #07090d;
}

.archive-site-header {
  background: linear-gradient(to bottom, rgba(3, 4, 7, 0.92), rgba(3, 4, 7, 0.3), transparent);
}

.archive-hero {
  position: relative;
  min-height: 82svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: 9rem clamp(1.25rem, 6vw, 6rem) 6rem;
  background:
    linear-gradient(180deg, rgba(7, 9, 13, 0.2), #07090d 96%),
    radial-gradient(circle at 50% 43%, rgba(91, 68, 35, 0.2), transparent 25rem),
    linear-gradient(135deg, #050609, #0b0f17 50%, #050609);
}

.archive-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.18;
  background-image:
    repeating-linear-gradient(115deg, transparent 0 9px, rgba(255,255,255,0.025) 10px 11px),
    radial-gradient(circle at center, transparent 0 32%, #000 84%);
}

.archive-hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: -1;
  width: 1px;
  height: 8rem;
  background: linear-gradient(to bottom, transparent, rgba(201, 162, 82, 0.48));
}

.archive-hero-rings {
  position: absolute;
  z-index: -1;
  width: min(72vw, 43rem);
  aspect-ratio: 1;
  border: 1px solid rgba(221, 188, 106, 0.055);
  border-radius: 50%;
  box-shadow:
    0 0 0 4rem rgba(221, 188, 106, 0.016),
    0 0 0 9rem rgba(221, 188, 106, 0.01);
}

.archive-hero-inner {
  width: min(100%, 72rem);
  margin-inline: auto;
  text-align: center;
  animation: archive-intro 700ms ease both;
}

.archive-kicker,
.uncertain-date,
.timeline-kind {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.23em;
  font: 0.7rem/1.4 Arial, sans-serif;
}

.archive-hero h1 {
  max-width: 12ch;
  margin: 0.6rem auto 1.5rem;
  color: var(--bone);
  font-size: clamp(3.2rem, 8vw, 7.4rem);
  font-weight: normal;
  line-height: 0.94;
  text-wrap: balance;
}

.archive-introduction {
  max-width: 48rem;
  margin: 0 auto;
  color: #beb5a4;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.72;
}

.archive-sections {
  width: min(100%, 50rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: clamp(3rem, 7vw, 5rem) auto 0;
  border-top: 1px solid rgba(218, 185, 104, 0.2);
  border-bottom: 1px solid rgba(218, 185, 104, 0.13);
}

.archive-sections a,
.archive-sections span {
  min-width: 0;
  min-height: 3.7rem;
  display: grid;
  place-items: center;
  padding: 0.8rem 0.6rem;
  border-right: 1px solid rgba(218, 185, 104, 0.11);
  color: #6f695e;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font: 0.7rem/1.3 Arial, sans-serif;
}

.archive-sections > :last-child { border-right: 0; }

.archive-sections .archive-section-active {
  color: var(--gold-bright);
  background: linear-gradient(180deg, rgba(201, 162, 82, 0.08), transparent);
}

.chronology {
  position: relative;
  padding: 0 clamp(1.25rem, 6vw, 6rem) clamp(7rem, 12vw, 11rem);
  background:
    radial-gradient(circle at 38% 24%, rgba(71, 58, 39, 0.12), transparent 28rem),
    linear-gradient(180deg, #07090d, #090b10 60%, #07090d);
}

.uncertain-era {
  position: relative;
  width: min(100%, 76rem);
  min-height: 34rem;
  display: grid;
  place-items: end center;
  margin-inline: auto;
  overflow: hidden;
  padding: 12rem 1rem 6rem;
}

.uncertain-era::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, #07090d 0%, rgba(7,9,13,0.88) 23%, rgba(7,9,13,0.2) 72%, transparent),
    repeating-linear-gradient(115deg, transparent 0 14px, rgba(255,255,255,0.018) 15px 16px);
}

.uncertain-era::after {
  content: "";
  position: absolute;
  left: calc(25% + 1.5rem);
  bottom: 0;
  width: 1px;
  height: 74%;
  background: linear-gradient(to bottom, transparent, rgba(177, 146, 84, 0.06) 35%, rgba(201, 162, 82, 0.38));
}

.uncertain-mist {
  position: absolute;
  inset: 8% 3% 14%;
  opacity: 0.45;
  filter: blur(32px);
  background:
    radial-gradient(ellipse at 50% 32%, rgba(126, 119, 103, 0.16), transparent 42%),
    radial-gradient(ellipse at 38% 64%, rgba(139, 116, 75, 0.11), transparent 36%);
}

.uncertain-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 42rem);
  margin-left: 27%;
  padding-left: clamp(2rem, 5vw, 5rem);
}

.uncertain-copy h2 {
  margin: 0.5rem 0 1rem;
  color: #aaa18f;
  font-size: clamp(2.7rem, 6vw, 5.4rem);
  font-weight: normal;
  line-height: 0.95;
  text-transform: uppercase;
}

.uncertain-copy > p:last-child {
  max-width: 35rem;
  margin: 0;
  color: #8c8579;
  font-size: 1.08rem;
  line-height: 1.72;
}

.timeline {
  position: relative;
  width: min(100%, 76rem);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(25% + 1.5rem);
  width: 1px;
  background: linear-gradient(to bottom, rgba(201, 162, 82, 0.5), rgba(201, 162, 82, 0.2) 88%, transparent);
}

.timeline-entry {
  position: relative;
  min-height: 15rem;
  display: grid;
  grid-template-columns: minmax(8rem, 25%) 3rem minmax(0, 1fr);
  align-items: start;
  animation: archive-entry 650ms ease both;
}

.timeline-entry:nth-child(3n + 2) { animation-delay: 60ms; }
.timeline-entry:nth-child(3n) { animation-delay: 120ms; }

.timeline-date {
  padding: 0.1rem clamp(1rem, 3vw, 2.6rem) 0 0;
  text-align: right;
}

.timeline-date span {
  display: block;
  margin-bottom: 0.2rem;
  color: #756e61;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font: 0.64rem/1.3 Arial, sans-serif;
}

.timeline-date strong {
  display: block;
  color: var(--gold-bright);
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  font-weight: normal;
  line-height: 1;
}

.timeline-date-range strong {
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  letter-spacing: 0.02em;
}

.timeline-axis {
  position: relative;
  min-height: inherit;
  display: flex;
  justify-content: center;
}

.timeline-axis span {
  position: relative;
  z-index: 2;
  width: 0.72rem;
  height: 0.72rem;
  margin-top: 0.48rem;
  border: 1px solid rgba(238, 216, 139, 0.75);
  border-radius: 50%;
  background: #0a0c11;
  box-shadow: 0 0 0 0.4rem rgba(201, 162, 82, 0.055);
}

.timeline-period { min-height: 23rem; }

.timeline-period .timeline-axis span {
  border-radius: 1px;
  background: var(--gold);
}

.timeline-period .timeline-axis i {
  position: absolute;
  z-index: 1;
  top: 1.8rem;
  bottom: 2.2rem;
  width: 0.32rem;
  border: 1px solid rgba(201, 162, 82, 0.48);
  border-radius: 2px;
  background: linear-gradient(to bottom, rgba(201, 162, 82, 0.26), rgba(201, 162, 82, 0.04));
}

.timeline-content {
  min-width: 0;
  margin-left: clamp(1rem, 3vw, 2.6rem);
  padding: 0 0 3rem;
  border-top: 1px solid rgba(218, 185, 104, 0.16);
}

.timeline-kind { margin: 1rem 0 0.85rem; }

.timeline-content h2,
.timeline-content h3 {
  margin: 0 0 1rem;
  color: var(--bone);
  font-weight: normal;
  line-height: 1.02;
}

.timeline-content h2 { font-size: clamp(2.5rem, 5vw, 4.7rem); }
.timeline-content h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.timeline-content h4 {
  margin: 0;
  color: var(--bone);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: normal;
  line-height: 1.1;
}

.timeline-content > p:last-child {
  max-width: 42rem;
  margin: 0;
  color: #aaa293;
  font-size: 1.04rem;
  line-height: 1.7;
}

.timeline-content em { color: #d6cbb8; }

.timeline-origin {
  min-height: 23rem;
  padding-top: 4rem;
  background: linear-gradient(90deg, transparent 22%, rgba(86, 50, 31, 0.13), transparent 86%);
  border-top: 1px solid rgba(218, 185, 104, 0.24);
  border-bottom: 1px solid rgba(218, 185, 104, 0.1);
}

.timeline-origin .timeline-axis span {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.25rem;
  background: #8d3b25;
  border-color: var(--gold-bright);
  box-shadow:
    0 0 0 0.55rem rgba(137, 70, 39, 0.13),
    0 0 2rem rgba(164, 77, 43, 0.26);
}

.timeline-origin .timeline-date strong { font-size: clamp(2.6rem, 5vw, 4.4rem); }
.timeline-origin .timeline-kind { color: #b57c55; }
.timeline-origin .timeline-content { border-top-color: rgba(190, 107, 67, 0.35); }
.timeline-origin .timeline-content h2 {
  color: #f0d7b9;
  font-size: clamp(3.2rem, 6vw, 5.4rem);
  text-shadow: 0 0 2.2rem rgba(164, 77, 43, 0.18);
}

.timeline-conflict .timeline-axis i {
  border-color: rgba(166, 90, 59, 0.58);
  background: linear-gradient(to bottom, rgba(142, 63, 43, 0.35), rgba(87, 43, 36, 0.06));
}

.timeline-conflict .timeline-kind { color: #aa7456; }
.timeline-conflict .timeline-content { border-top-color: rgba(177, 101, 65, 0.27); }

.timeline-foundation .timeline-axis span {
  width: 0.68rem;
  height: 0.68rem;
  border-radius: 1px;
  background: rgba(201, 162, 82, 0.7);
  transform: rotate(45deg);
}

.timeline-foundation .timeline-kind,
.timeline-imperial-foundation .timeline-kind { color: #d0aa5d; }

.timeline-rebellion .timeline-axis span,
.timeline-conflict-point .timeline-axis span {
  border-radius: 1px;
  border-color: rgba(185, 112, 74, 0.8);
  box-shadow: 0 0 0 0.36rem rgba(132, 63, 46, 0.06);
}

.timeline-rebellion .timeline-kind,
.timeline-conflict-point .timeline-kind { color: #a96f53; }

.timeline-epidemic .timeline-axis span {
  border-color: rgba(167, 169, 145, 0.72);
  box-shadow:
    0 0 0 0.28rem rgba(151, 157, 135, 0.05),
    inset 0 0 0 0.14rem #0a0c11;
  background: #747965;
}

.timeline-epidemic .timeline-kind { color: #929780; }
.timeline-political .timeline-kind { color: #a99a78; }

.timeline-embedded {
  position: relative;
  display: grid;
  grid-template-columns: minmax(5.8rem, 8rem) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.4rem);
  margin-top: clamp(2.6rem, 5vw, 4.2rem);
  padding: 1.5rem 0 0 1.4rem;
  border-top: 1px solid rgba(218, 185, 104, 0.13);
  border-left: 2px solid rgba(201, 162, 82, 0.42);
}

.timeline-embedded::before {
  content: "";
  position: absolute;
  top: -0.28rem;
  left: -0.3rem;
  width: 0.48rem;
  height: 0.48rem;
  border: 1px solid rgba(238, 216, 139, 0.65);
  border-radius: 50%;
  background: #0a0c11;
}

.timeline-embedded-date {
  margin: 0.08rem 0 0;
  color: var(--gold-bright);
  font-size: 1.18rem;
  line-height: 1.25;
}

.timeline-embedded .timeline-kind { margin: 0 0 0.55rem; }

.timeline-brothers-war { min-height: 26rem; }

.timeline-imperial-foundation {
  min-height: 22rem;
  padding-top: 3.5rem;
  background: linear-gradient(90deg, transparent 22%, rgba(201, 162, 82, 0.09), transparent 88%);
  border-top: 1px solid rgba(218, 185, 104, 0.25);
  border-bottom: 1px solid rgba(218, 185, 104, 0.1);
}

.timeline-imperial-foundation .timeline-axis span {
  width: 0.94rem;
  height: 0.94rem;
  margin-top: 0.34rem;
  border-radius: 1px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 0 0.45rem rgba(201, 162, 82, 0.08);
}

.timeline-imperial-foundation .timeline-content {
  border-top-color: rgba(218, 185, 104, 0.4);
}

.timeline-imperial-foundation .timeline-content h2 {
  font-size: clamp(2.7rem, 4.5vw, 4.15rem);
}

.timeline-imperial {
  min-height: 18rem;
}

.timeline-imperial .timeline-axis span {
  width: 0.66rem;
  height: 0.66rem;
  border-radius: 50% 50% 2px 2px;
  background: rgba(201, 162, 82, 0.78);
}

.timeline-imperial .timeline-axis i {
  width: 0.22rem;
  border-color: rgba(220, 184, 99, 0.38);
  background: linear-gradient(to bottom, rgba(201, 162, 82, 0.28), rgba(201, 162, 82, 0.08));
}

.timeline-imperial .timeline-content {
  border-top-color: rgba(218, 185, 104, 0.27);
}

.timeline-imperial .timeline-kind { color: #bd9c58; }

.imperial-titles {
  color: #c4b8a2 !important;
}

.timeline-present {
  min-height: 19rem;
  padding-top: 4rem;
  border-top: 1px solid rgba(218, 185, 104, 0.22);
}

.timeline-present .timeline-axis span {
  width: 0.95rem;
  height: 0.95rem;
  margin-top: 0.35rem;
  background: var(--gold);
  box-shadow: 0 0 0 0.5rem rgba(201, 162, 82, 0.11);
}

.archive-footer {
  min-height: 16rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 4rem clamp(1.25rem, 6vw, 6rem);
  border-top: 1px solid rgba(218, 185, 104, 0.14);
  background: #05070a;
}

.archive-footer p {
  margin: 0;
  color: #6f695e;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font: 0.68rem/1.4 Arial, sans-serif;
}

.archive-footer a {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--gold);
  color: var(--gold-bright);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font: 0.7rem/1.3 Arial, sans-serif;
}

.archive-footer a:hover,
.archive-footer a:focus-visible { color: var(--bone); }

@keyframes archive-intro {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes archive-entry {
  from { opacity: 0; transform: translateY(0.8rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 840px) {
  .archive-hero { min-height: 76svh; padding-top: 8rem; }
  .archive-hero h1 { max-width: 11ch; }
  .uncertain-era::after,
  .timeline::before { left: calc(28% + 1.25rem); }
  .uncertain-copy { margin-left: 30%; }
  .timeline-entry { grid-template-columns: minmax(7rem, 28%) 2.5rem minmax(0, 1fr); }
  .timeline-content { margin-left: 1rem; }
}

@media (max-width: 640px) {
  .archive-hero { min-height: auto; padding: 8.5rem 1rem 5rem; }
  .archive-kicker { letter-spacing: 0.18em; }
  .archive-hero h1 { font-size: clamp(3rem, 14vw, 4.9rem); }
  .archive-sections { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .chronology { padding-inline: 1rem; }
  .uncertain-era {
    min-height: 30rem;
    place-items: end start;
    padding: 11rem 1rem 4.5rem 3rem;
  }
  .uncertain-era::after,
  .timeline::before { left: 0.7rem; }
  .uncertain-copy { width: 100%; margin-left: 0; padding-left: 0; }
  .uncertain-copy h2 { font-size: clamp(2.6rem, 14vw, 4.2rem); }

  .timeline-entry {
    min-height: 0;
    display: block;
    padding: 0 0 5rem 3rem;
  }
  .timeline-origin,
  .timeline-present,
  .timeline-imperial-foundation { padding-top: 3.5rem; }
  .timeline-origin { min-height: 0; }
  .timeline-period { min-height: 22rem; }
  .timeline-date { padding: 0 0 1rem; text-align: left; }
  .timeline-date span { margin-bottom: 0.3rem; }
  .timeline-axis {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 1.4rem;
    min-height: 0;
  }
  .timeline-axis span { margin-top: 0.48rem; }
  .timeline-origin .timeline-axis span { margin-top: 0.22rem; }
  .timeline-period .timeline-axis i { bottom: 3rem; }
  .timeline-content { margin-left: 0; padding-bottom: 0; }
  .timeline-kind { margin-top: 0.9rem; letter-spacing: 0.17em; }
  .timeline-content h2 { font-size: clamp(2.35rem, 12vw, 3.6rem); }
  .timeline-content h3 { font-size: clamp(1.75rem, 8vw, 2.35rem); }
  .timeline-origin .timeline-content h2 { font-size: clamp(3rem, 14vw, 4.2rem); }
  .timeline-imperial-foundation .timeline-content h2 { font-size: clamp(2.5rem, 11vw, 3.45rem); }
  .timeline-embedded {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding-left: 1rem;
  }
  .timeline-embedded-date { font-size: 1.08rem; }
  .archive-footer { min-height: 13rem; align-items: flex-start; flex-direction: column; justify-content: center; }
}

@media (max-width: 480px) {
  .archive-page .site-header { padding-inline: 0.75rem; }
  .archive-introduction { font-size: 1.02rem; }
  .archive-sections a,
  .archive-sections span { min-height: 3.5rem; font-size: 0.64rem; }
  .uncertain-copy > p:last-child,
  .timeline-content > p:last-child { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .archive-hero-inner,
  .timeline-entry { animation: none; }
}
