.timeline-page {
  --timeline-paper: #f2f0e8;
  --timeline-paper-deep: #ece7dc;
  --timeline-ink: #34281f;
  --timeline-ink-soft: #6a5543;
  --timeline-accent: #8f5e3b;
  --timeline-accent-deep: #6f472d;
  --timeline-accent-soft: #c9a27c;
  --timeline-line-color: #d6c1aa;
  --timeline-card: rgba(255, 251, 245, 0.84);
  min-height: calc(100vh - 8rem);
  background:
    radial-gradient(circle at top left, rgba(159, 110, 70, 0.08), transparent 30%),
    radial-gradient(circle at right 18%, rgba(201, 162, 124, 0.05), transparent 24%),
    linear-gradient(180deg, var(--timeline-paper) 0%, var(--timeline-paper-deep) 100%);
}

.timeline-shell {
  max-width: 1120px;
  margin: 0 auto;
}

.timeline-page-header {
  margin: 0 auto 3rem;
  max-width: 720px;
  text-align: center;
}

.timeline-page-title {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--timeline-ink);
}

.timeline-page-subtitle {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(52, 40, 31, 0.58);
}

.timeline-wrapper {
  --timeline-axis-left: 4rem;
  --timeline-axis-width: 2px;
  --timeline-content-offset: 8.55rem;
  --month-node-size: 0.9rem;
  --day-dot-size: 0.78rem;
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding: 1.5rem 0 0 var(--timeline-content-offset);
}

.timeline-line {
  position: absolute;
  left: var(--timeline-axis-left);
  top: 2.9rem;
  bottom: 4.5rem;
  width: var(--timeline-axis-width);
  background: linear-gradient(180deg, #ccb298 0%, var(--timeline-line-color) 52%, #c6ab8f 100%);
}

.timeline-start,
.timeline-end {
  position: absolute;
  left: 2.75rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 3px solid rgba(255, 248, 239, 0.95);
  background: linear-gradient(135deg, #9b6740 0%, var(--timeline-accent-deep) 100%);
  box-shadow: 0 12px 26px rgba(111, 71, 45, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.timeline-start {
  top: 0;
}

.timeline-end {
  bottom: 0;
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  padding-top: 2rem;
}

.timeline-month-group {
  position: relative;
  padding-top: 2rem;
}

.month-node {
  position: absolute;
  left: calc(
    var(--timeline-axis-left) - var(--timeline-content-offset) +
      (var(--timeline-axis-width) / 2) - (var(--month-node-size) / 2)
  );
  top: 0.72rem;
  width: var(--month-node-size);
  height: var(--month-node-size);
  border-radius: 999px;
  border: 3px solid rgba(255, 248, 239, 0.95);
  background: var(--timeline-accent);
  box-shadow: 0 0 0 5px rgba(143, 94, 59, 0.12);
  z-index: 2;
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    background-color 0.28s ease;
}

.month-tag {
  position: absolute;
  left: -14.35rem;
  top: 0.08rem;
  min-width: 7.6rem;
  padding: 0.36rem 0.9rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(111, 71, 45, 0.12);
  background: linear-gradient(135deg, var(--timeline-accent) 0%, var(--timeline-accent-deep) 100%);
  box-shadow: 0 10px 22px rgba(111, 71, 45, 0.14);
  color: #fff8ef;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: center;
  white-space: nowrap;
  z-index: 2;
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    background-color 0.28s ease;
}

.article-cards {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.article-card {
  position: relative;
  border: 1px solid rgba(111, 71, 45, 0.08);
  border-radius: 0.7rem;
  background: var(--timeline-card);
  box-shadow:
    0 1px 2px rgba(72, 50, 35, 0.03);
  transition:
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    background-color 0.28s ease;
}

.article-card::before {
  content: "";
  position: absolute;
  left: -0.32rem;
  top: 50%;
  width: 0.64rem;
  height: 0.64rem;
  border-left: 1px solid rgba(111, 71, 45, 0.1);
  border-bottom: 1px solid rgba(111, 71, 45, 0.1);
  background: rgba(255, 250, 243, 0.96);
  transform: translateY(-50%) rotate(45deg);
  transform-origin: center;
  z-index: 1;
  transition:
    background-color 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease;
}

.day-dot {
  position: absolute;
  left: calc(
    var(--timeline-axis-left) - var(--timeline-content-offset) +
      (var(--timeline-axis-width) / 2) - (var(--day-dot-size) / 2)
  );
  top: 50%;
  width: var(--day-dot-size);
  height: var(--day-dot-size);
  transform: translateY(-50%);
  border-radius: 999px;
  border: 2px solid rgba(255, 248, 239, 0.95);
  background: var(--timeline-accent-soft);
  box-shadow: 0 0 0 3px rgba(201, 162, 124, 0.16);
  z-index: 2;
  transition:
    transform 0.28s ease,
    background-color 0.28s ease,
    box-shadow 0.28s ease;
}

.article-header {
  display: grid;
  grid-template-columns: 2.7rem minmax(0, 1fr);
  align-items: center;
  gap: 0.82rem;
  padding: 0.38rem 0.68rem 0.38rem 0.86rem;
  transition: transform 0.28s ease;
}

.article-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 1.95rem;
  border-radius: 0.52rem;
  border: 1px solid rgba(143, 94, 59, 0.12);
  background: linear-gradient(180deg, rgba(143, 94, 59, 0.12) 0%, rgba(143, 94, 59, 0.05) 100%);
  transition:
    background-color 0.28s ease,
    border-color 0.28s ease,
    transform 0.28s ease;
}

.day-num {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--timeline-accent-deep);
  line-height: 1;
  transition: color 0.28s ease;
}

.article-title {
  display: block;
  color: var(--timeline-ink);
  font-size: 0.91rem;
  line-height: 1.32;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.28s ease;
}

.article-card + .article-card {
  margin-top: -1px;
}

.timeline-month-group:hover .month-tag {
  transform: translateX(3px);
  background: linear-gradient(135deg, #825333 0%, #603b26 100%);
  box-shadow: 0 12px 22px rgba(96, 59, 38, 0.18);
}

.timeline-month-group:hover .month-node {
  transform: scale(1.08);
  background: #7a4e30;
  box-shadow: 0 0 0 5px rgba(122, 78, 48, 0.16);
}

.article-card:hover {
  border-color: rgba(111, 71, 45, 0.14);
  background: rgba(255, 252, 247, 0.96);
  box-shadow:
    0 5px 12px rgba(72, 50, 35, 0.06);
}

.article-card:hover::before {
  border-color: rgba(111, 71, 45, 0.16);
  background: rgba(255, 248, 240, 0.98);
  box-shadow: -1px 1px 4px rgba(72, 50, 35, 0.06);
}

.article-card:hover .day-dot {
  transform: translateY(-50%);
  background: var(--timeline-accent);
  box-shadow:
    0 0 0 4px rgba(143, 94, 59, 0.14),
    0 0 10px rgba(143, 94, 59, 0.18);
}

.article-card:hover .article-header {
  transform: translateX(4px);
}

.article-card:hover .article-day {
  transform: translateY(-1px);
  border-color: rgba(111, 71, 45, 0.18);
  background: linear-gradient(180deg, rgba(143, 94, 59, 0.18) 0%, rgba(143, 94, 59, 0.08) 100%);
}

.article-card:hover .article-title {
  color: var(--timeline-accent-deep);
}

.timeline-empty {
  margin-left: -1rem;
  border: 1px dashed rgba(143, 94, 59, 0.24);
  border-radius: 1rem;
  padding: 4rem 1.5rem;
  background: rgba(255, 249, 241, 0.78);
  color: #8f7863;
  text-align: center;
}

.timeline-wrapper .pager-form {
  margin-top: 3rem;
  padding-left: 0.5rem;
}

@media (max-width: 768px) {
  .timeline-page {
    min-height: auto;
  }

  .timeline-page-header {
    margin-bottom: 2.25rem;
  }

  .timeline-page-title {
    letter-spacing: 0.12em;
  }

  .timeline-page-subtitle {
    letter-spacing: 0.18em;
  }

  .timeline-wrapper {
    --timeline-axis-left: 1rem;
    --timeline-content-offset: 2.85rem;
    --day-dot-size: 0.85rem;
    padding: 0 0 0 var(--timeline-content-offset);
  }

  .timeline-line {
    top: 2.25rem;
    bottom: 4rem;
  }

  .timeline-start,
  .timeline-end {
    left: -0.2rem;
    width: 2.2rem;
    height: 2.2rem;
  }

  .timeline-content {
    gap: 1.45rem;
    padding-top: 1.65rem;
  }

  .timeline-month-group {
    padding-top: 1.95rem;
  }

  .month-node {
    left: calc(
      var(--timeline-axis-left) - var(--timeline-content-offset) +
        (var(--timeline-axis-width) / 2) - (var(--month-node-size) / 2)
    );
  }

  .month-tag {
    left: -0.2rem;
    min-width: 6rem;
    padding-inline: 0.75rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  .day-dot {
    left: calc(
      var(--timeline-axis-left) - var(--timeline-content-offset) +
        (var(--timeline-axis-width) / 2) - (var(--day-dot-size) / 2)
    );
  }

  .article-header {
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: 0.68rem;
    padding: 0.4rem 0.58rem 0.4rem 0.74rem;
  }

  .article-day {
    width: 2.4rem;
    height: 1.8rem;
    border-radius: 0.5rem;
  }

  .article-title {
    font-size: 0.89rem;
    line-height: 1.3;
  }
}
