/* Lightweight timeline archive: date anchors + readable preview cards. */
body.site-home-page::before,
body.site-home-page::after {
  display: none !important;
  content: none !important;
}

.timeline-archive {
  position: relative;
  overflow: hidden;
  margin: 34px 0 42px;
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid rgba(36, 33, 24, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.94), rgba(247, 242, 232, 0.78)),
    radial-gradient(circle at 88% 8%, rgba(138, 90, 36, 0.08), transparent 34%);
  box-shadow: none;
}

.timeline-archive::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #8a5a24, rgba(138, 90, 36, 0.08));
  opacity: 0.5;
}

.timeline-archive-head {
  max-width: 760px;
  margin-bottom: 22px;
}

.timeline-kicker {
  margin: 0 0 8px;
  color: #8a5a24;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.timeline-archive-head h3 {
  margin: 0 0 10px;
  color: #242118;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.3;
}

.timeline-archive-head p {
  margin: 0;
  color: #6d6558;
  line-height: 1.75;
}

.timeline-month-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scrollbar-width: thin;
}

.timeline-month-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(36, 33, 24, 0.16);
  border-radius: 999px;
  padding: 8px 13px;
  background: transparent;
  color: #242118;
  font: inherit;
  cursor: pointer;
  transition: background 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out;
}

.timeline-month-pill:hover,
.timeline-month-pill:focus-visible {
  border-color: rgba(138, 90, 36, 0.62);
  outline: none;
}

.timeline-month-pill.is-active {
  border-color: #242118;
  background: #242118;
  color: #fffaf0;
}

.timeline-carousel-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.timeline-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  margin-inline: -4px;
  padding: 18px max(4px, calc((100% - min(74vw, 430px)) / 2)) 26px;
  outline: none;
}

.timeline-card {
  flex: 0 0 min(74vw, 430px);
  scroll-snap-align: center;
  opacity: 0.68;
  transform: scale(0.94);
  filter: blur(0.2px);
  transition: transform 180ms ease-out, opacity 180ms ease-out, filter 180ms ease-out;
}

.timeline-card.is-active,
.timeline-card:hover,
.timeline-card:focus-within {
  opacity: 1;
  transform: scale(1);
  filter: none;
}

.timeline-card-link {
  display: flex;
  min-height: 226px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid rgba(36, 33, 24, 0.14);
  border-radius: 14px;
  background: #fffaf0;
  color: #242118;
  text-decoration: none;
  box-shadow: none;
}

.timeline-card-link:focus-visible {
  outline: 3px solid rgba(138, 90, 36, 0.36);
  outline-offset: 3px;
}

.timeline-card time {
  color: #8a5a24;
  font-size: 0.9rem;
  font-weight: 700;
}

.timeline-card h4 {
  display: -webkit-box;
  margin: 12px 0;
  overflow: hidden;
  color: #242118;
  font-size: clamp(1.16rem, 2vw, 1.55rem);
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.timeline-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #6d6558;
  line-height: 1.72;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

.timeline-card-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.timeline-card-keywords span {
  border: 1px solid rgba(36, 33, 24, 0.12);
  border-radius: 999px;
  padding: 3px 8px;
  color: #8a5a24;
  font-size: 0.78rem;
}

.timeline-card-cta {
  display: inline-flex;
  width: fit-content;
  margin-top: 16px;
  border-bottom: 1px solid rgba(138, 90, 36, 0.45);
  color: #8a5a24;
  font-size: 0.88rem;
  font-weight: 700;
}

.timeline-arrow {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(36, 33, 24, 0.16);
  border-radius: 999px;
  background: transparent;
  color: #242118;
  cursor: pointer;
  transition: background 160ms ease-out, color 160ms ease-out;
}

.timeline-arrow:hover,
.timeline-arrow:focus-visible {
  background: #242118;
  color: #fffaf0;
  outline: none;
}

.timeline-preview-drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  align-items: end;
  background: rgba(36, 33, 24, 0);
  pointer-events: none;
  transition: background 320ms ease-out;
}

.timeline-preview-drawer.is-open {
  background: rgba(36, 33, 24, 0.32);
  pointer-events: auto;
}

.timeline-preview-panel {
  width: min(920px, calc(100vw - 24px));
  max-height: min(86vh, 620px);
  margin: 0 auto 12px;
  overflow: auto;
  border: 1px solid rgba(36, 33, 24, 0.14);
  border-radius: 22px;
  background: #fffaf0;
  color: #242118;
  box-shadow: 0 24px 80px rgba(36, 33, 24, 0.22);
  transform: translateY(110%);
  transition: transform 360ms ease-out;
}

.timeline-preview-drawer.is-open .timeline-preview-panel {
  transform: translateY(0);
}

.timeline-preview-close {
  float: right;
  width: 38px;
  height: 38px;
  margin: 16px 16px 0 0;
  border: 1px solid rgba(36, 33, 24, 0.15);
  border-radius: 999px;
  background: transparent;
  color: #242118;
  cursor: pointer;
  font-size: 1.3rem;
}

.timeline-preview-content {
  padding: clamp(26px, 5vw, 46px);
}

.timeline-preview-content time {
  color: #8a5a24;
  font-weight: 700;
}

.timeline-preview-content h3 {
  max-width: 13em;
  margin: 10px 0 14px;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.15;
}

.timeline-preview-content p {
  max-width: 760px;
  color: #5f574c;
  font-size: 1.04rem;
  line-height: 1.82;
}

.timeline-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.timeline-read-link,
.timeline-secondary-button {
  border: 1px solid #242118;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.timeline-read-link {
  background: #242118;
  color: #fffaf0;
}

.timeline-secondary-button {
  background: transparent;
  color: #242118;
}

.legacy-calendar-details {
  overflow: hidden;
  margin-top: 28px;
  border: 1px solid rgba(36, 33, 24, 0.12);
  border-radius: 14px;
  background: rgba(255, 250, 240, 0.52);
}

.legacy-calendar-details > summary {
  cursor: pointer;
  padding: 14px 18px;
  color: #6d6558;
  font-weight: 700;
}

.legacy-calendar-details .calendar-section {
  margin: 0;
  border-top: 1px solid rgba(36, 33, 24, 0.1);
}

.legacy-calendar-details:not([open]) .calendar-section {
  display: none;
}

@media (max-width: 720px) {
  .timeline-carousel-wrap { grid-template-columns: 1fr; }
  .timeline-arrow { display: none; }
  .timeline-card { flex-basis: 84vw; }
  .timeline-carousel { padding-inline: 8vw; }
  .timeline-card-link { min-height: 214px; padding: 18px; }
  .timeline-archive { margin-left: -4px; margin-right: -4px; padding: 18px 14px; }
  .timeline-preview-panel { width: calc(100vw - 16px); margin-bottom: 8px; border-radius: 18px; }
}
