.timeline-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding: 28px 28px 24px;
  background:
    radial-gradient(circle at top right, rgba(132, 146, 166, 0.12), transparent 26%),
    linear-gradient(180deg, #fbfaf7 0%, #f5f3ee 100%);
  border: 1px solid #e1ddd2;
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.05);
}

.timeline-page-eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7b8190;
  margin-bottom: 10px;
}

.timeline-page-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.15;
  color: #161d27;
}

.timeline-page-description {
  margin-top: 10px;
  max-width: 720px;
  color: #566172;
}

.timeline-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #d8d2c4;
  border-radius: 999px;
  color: #1f2937;
  background: #fffefb;
  text-decoration: none;
  white-space: nowrap;
}

.timeline-summary-panel,
.timeline-toolbar-panel,
.timeline-results-panel,
.timeline-admin-panel {
  background: #faf9f6;
  border: 1px solid #e4e3dc;
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.timeline-summary-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  margin-bottom: 18px;
}

.timeline-summary-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-summary-copy strong {
  color: #121926;
  font-size: 1rem;
}

.timeline-summary-copy span {
  color: #637083;
  font-size: 0.95rem;
}

.timeline-summary-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.timeline-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #566172;
}

.timeline-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.timeline-legend-dot-filled {
  background: #1f2937;
}

.timeline-legend-dot-empty {
  border: 1px solid #b8bfca;
  background: transparent;
}

.timeline-toolbar-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  margin-bottom: 18px;
}

.timeline-view-toggle {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #e2ddd2;
  background: #fffdfa;
}

.timeline-view-btn {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #475569;
  font-weight: 700;
  cursor: pointer;
}

.timeline-view-btn.active {
  background: #1f2937;
  color: #fff;
}

.timeline-filter-panel {
  flex: 1;
  min-width: 0;
}

.timeline-filter-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.timeline-filter-block {
  min-width: 0;
}

.timeline-filter-block-compact {
  flex: 0 0 auto;
}

.timeline-filter-label {
  margin-bottom: 10px;
  color: #4b5563;
  font-size: 0.92rem;
  font-weight: 700;
}

.timeline-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-filter-btn {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #ddd7cb;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 0.9rem;
  cursor: pointer;
}

.timeline-filter-btn.active {
  background: #e9eef6;
  border-color: #c9d2df;
  color: #132238;
  font-weight: 700;
}

.timeline-existing-toggle {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #d6dde7;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.timeline-existing-toggle.active {
  background: #18202d;
  border-color: #18202d;
  color: #ffffff;
}

.timeline-results-panel {
  padding: 22px;
  overflow: visible;
}

.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  min-width: 0;
}

.timeline-year-block {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 24px;
}

.timeline-year-heading {
  position: sticky;
  top: 88px;
  align-self: start;
  padding-top: 6px;
}

.timeline-year-number {
  font-size: clamp(2.1rem, 4vw, 4rem);
  font-weight: 900;
  line-height: 0.95;
  color: #18202d;
  letter-spacing: -0.05em;
}

.timeline-year-label {
  margin-top: 8px;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8d95a3;
}

.timeline-year-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.timeline-month-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  scroll-snap-align: start;
}

.timeline-month-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  padding-top: 14px;
}

.timeline-month-number {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1f2937;
}

.timeline-month-count {
  display: inline-flex;
  min-width: 28px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e8edf5;
  color: #2e3a4d;
  font-size: 0.8rem;
  font-weight: 700;
}

.timeline-month-content {
  min-width: 0;
  border-left: 2px solid #d9dce2;
  padding-left: 18px;
  position: relative;
}

.timeline-month-content::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 20px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #1f2937;
  box-shadow: 0 0 0 6px #f7f6f2;
}

.timeline-month-row.is-empty .timeline-month-content::before {
  background: #f7f6f2;
  border: 1px solid #aab2bd;
}

.timeline-month-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 248, 243, 0.95)),
    radial-gradient(circle at top right, rgba(123, 149, 184, 0.08), transparent 36%);
  border: 1px solid #e3dfd5;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.04);
  min-width: 0;
}

.timeline-month-row.is-empty .timeline-month-shell {
  border-style: dashed;
  background: linear-gradient(180deg, #fffdfa 0%, #f8f6f1 100%);
  box-shadow: none;
}

.timeline-month-empty {
  color: #8c94a2;
  font-size: 0.95rem;
}

.timeline-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  overflow: visible;
}

.timeline-issue-card {
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid #ddd8cc;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.timeline-issue-card:hover {
  z-index: 20;
  transform: translateY(-2px);
  border-color: #c7bfaf;
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.09);
}

.timeline-issue-card:focus-within {
  z-index: 20;
}

.timeline-issue-card.is-manual-only {
  cursor: default;
  border-style: dashed;
  background: linear-gradient(180deg, #f8fafc 0%, #f3f4f6 100%);
}

.timeline-issue-card.is-manual-only:hover {
  transform: none;
  border-color: #d5dce5;
  box-shadow: none;
}

.timeline-issue-cover,
.timeline-issue-cover-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
}

.timeline-issue-cover {
  object-fit: cover;
  background: #e5e7eb;
}

.timeline-issue-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ece8de;
  color: #7a8392;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-issue-body {
  min-width: 0;
}

.timeline-issue-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #667085;
}

.timeline-issue-title {
  margin-top: 2px;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.35;
  color: #101828;
  word-break: keep-all;
}

.timeline-issue-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #5f6b7e;
  font-size: 0.84rem;
}

.timeline-issue-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf1f6;
  color: #334155;
}

.timeline-issue-chip-muted {
  background: #eef2f7;
  color: #5b6470;
}

.timeline-supplement-hover-wrap {
  position: relative;
  display: inline-flex;
  z-index: 1;
}

.timeline-supplement-hover-wrap:hover,
.timeline-supplement-hover-wrap:focus-within {
  z-index: 30;
}

.timeline-issue-chip-link {
  text-decoration: none;
}

.timeline-issue-chip-link:hover {
  text-decoration: none;
  background: #dfe7f1;
  color: #1f2937;
}

.timeline-supplement-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 12;
  min-width: 210px;
  max-width: 280px;
  padding: 10px 11px;
  border: 1px solid #d7deea;
  border-radius: 10px;
  background: rgba(250, 252, 255, 0.98);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.14);
  color: #334155;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  pointer-events: none;
}

.timeline-supplement-popover::before {
  content: '';
  position: absolute;
  left: 14px;
  top: -6px;
  width: 10px;
  height: 10px;
  background: rgba(250, 252, 255, 0.98);
  border-left: 1px solid #d7deea;
  border-top: 1px solid #d7deea;
  transform: rotate(45deg);
}

.timeline-supplement-hover-wrap:hover .timeline-supplement-popover,
.timeline-supplement-hover-wrap:focus-within .timeline-supplement-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.timeline-supplement-popover-head {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #1e3a5f;
}

.timeline-supplement-popover-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}

.timeline-supplement-popover-line,
.timeline-supplement-popover-more {
  display: block;
  font-size: 0.83rem;
  line-height: 1.45;
  color: #516072;
  word-break: keep-all;
}

.timeline-supplement-popover-more {
  color: #6b7280;
}

.timeline-issue-notes {
  margin-top: 10px;
  color: #5b6470;
  font-size: 0.84rem;
  line-height: 1.55;
}

.timeline-horizontal-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.timeline-horizontal-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 72vh;
}

.timeline-horizontal-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: max-content;
  width: 100%;
}

.timeline-horizontal-table th,
.timeline-horizontal-table td {
  border-bottom: 1px solid #e8edf5;
  border-right: 1px solid #eef2f7;
  vertical-align: top;
}

.timeline-horizontal-corner,
.timeline-horizontal-corner-sub,
.timeline-horizontal-series-cell {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fbfaf7;
}

.timeline-horizontal-corner,
.timeline-horizontal-year-band {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f4f1ea;
}

.timeline-horizontal-corner-sub,
.timeline-horizontal-month-head {
  position: sticky;
  top: 43px;
  z-index: 4;
  background: #fbfaf7;
}

.timeline-horizontal-corner,
.timeline-horizontal-corner-sub,
.timeline-horizontal-series-cell {
  min-width: 180px;
  padding: 12px;
  text-align: left;
}

.timeline-horizontal-year-band,
.timeline-horizontal-month-head,
.timeline-horizontal-cell {
  min-width: 108px;
}

.timeline-horizontal-year-band,
.timeline-horizontal-month-head {
  padding: 10px 8px;
  text-align: center;
  color: #475569;
  font-weight: 800;
}

.timeline-horizontal-month-head.is-year-start,
.timeline-horizontal-cell.is-year-start {
  border-left: 2px solid #cfd8e3;
}

.timeline-horizontal-series-name {
  font-weight: 800;
  color: #111827;
}

.timeline-horizontal-series-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  color: #667085;
  font-size: 0.82rem;
}

.timeline-horizontal-priority {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e8edf5;
  color: #243446;
}

.timeline-horizontal-cell {
  padding: 6px;
  background: #fff;
}

.timeline-horizontal-issues {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-horizontal-issue {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  background: #f3f6fb;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  max-width: 84px;
  margin: 0 auto;
}

.timeline-horizontal-issue.is-manual-only {
  cursor: default;
  border-style: dashed;
  background: #f8fafc;
  opacity: 0.9;
}

.timeline-horizontal-issue-cover {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.timeline-horizontal-issue-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.45;
  background:
    linear-gradient(135deg, rgba(226, 232, 240, 0.85), rgba(241, 245, 249, 0.95));
}

.timeline-horizontal-empty {
  min-height: 22px;
}

.timeline-empty-message,
.timeline-unscheduled {
  color: #64748b;
}

.timeline-unscheduled {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.timeline-unscheduled h3 {
  margin-bottom: 12px;
  color: #111827;
}

.timeline-unscheduled-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.timeline-unscheduled-item {
  padding: 12px 14px;
  border: 1px solid #dbe1ea;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.timeline-unscheduled-item.is-manual-only {
  cursor: default;
  border-style: dashed;
  background: #f8fafc;
}

.timeline-unscheduled-item strong {
  display: block;
  color: #111827;
}

.timeline-unscheduled-item span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 0.9rem;
}

.timeline-unscheduled-meta {
  margin-top: 8px;
  font-weight: 700;
}

@media (max-width: 960px) {
  .timeline-page-header,
  .timeline-summary-panel,
  .timeline-toolbar-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-page-header {
    padding: 22px 22px 18px;
    gap: 16px;
  }

  .timeline-page-header h1 {
    font-size: clamp(1.9rem, 6vw, 2.35rem);
  }

  .timeline-page-description {
    max-width: none;
  }

  .timeline-summary-panel,
  .timeline-toolbar-panel {
    padding: 16px 18px;
  }

  .timeline-view-toggle {
    width: 100%;
  }

  .timeline-view-btn {
    flex: 1;
  }

  .timeline-filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .timeline-filter-block-compact {
    width: 100%;
  }

  .timeline-existing-toggle {
    width: 100%;
  }

  .timeline-year-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .timeline-year-heading {
    position: sticky;
    top: 72px;
    z-index: 2;
    display: block;
    margin-left: -18px;
    margin-right: -18px;
    padding: 12px 18px 8px;
    background: #faf9f6;
    border-bottom: 1px solid #ece7db;
    box-shadow: 0 -10px 0 #faf9f6;
  }

  .timeline-year-number {
    font-size: clamp(1.9rem, 7vw, 2.9rem);
  }

  .timeline-year-body {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .timeline-page-header {
    padding: 18px 18px 16px;
    border-radius: 14px;
  }

  .timeline-page-eyebrow {
    font-size: 0.74rem;
    margin-bottom: 8px;
  }

  .timeline-page-header h1 {
    font-size: clamp(1.7rem, 7vw, 2.05rem);
    line-height: 1.18;
  }

  .timeline-page-description {
    margin-top: 8px;
    font-size: 0.96rem;
  }

  .timeline-back-link {
    min-height: 40px;
  }

  .timeline-summary-panel,
  .timeline-toolbar-panel,
  .timeline-results-panel {
    border-radius: 14px;
  }

  .timeline-results-panel {
    padding: 12px;
  }

  .timeline-summary-panel,
  .timeline-toolbar-panel {
    padding: 14px;
  }

  .timeline-summary-copy strong {
    font-size: 0.95rem;
  }

  .timeline-summary-copy span,
  .timeline-legend-item {
    font-size: 0.84rem;
  }

  .timeline-summary-legend {
    gap: 10px;
  }

  .timeline-filter-btn,
  .timeline-existing-toggle {
    min-height: 36px;
    font-size: 0.84rem;
  }

  .timeline-year-block {
    gap: 8px;
  }

  .timeline-year-heading {
    top: 64px;
    margin-left: -12px;
    margin-right: -12px;
    padding: 10px 12px 6px;
    box-shadow: 0 -8px 0 #faf9f6;
  }

  .timeline-year-label {
    margin-top: 4px;
  }

  .timeline-year-number {
    font-size: clamp(1.65rem, 8vw, 2.25rem);
  }

  .timeline-month-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .timeline-month-label {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding-top: 0;
  }

  .timeline-month-number {
    font-size: 1rem;
  }

  .timeline-month-count {
    min-width: 24px;
    min-height: 24px;
    font-size: 0.74rem;
  }

  .timeline-month-content {
    padding-left: 12px;
    width: 100%;
  }

  .timeline-month-content::before {
    left: -7px;
    width: 12px;
    height: 12px;
  }

  .timeline-month-shell {
    padding: 14px;
    width: 100%;
    overflow: hidden;
  }

  .timeline-month-row.is-empty {
    gap: 6px;
  }

  .timeline-month-row.is-empty .timeline-month-content {
    padding-left: 10px;
  }

  .timeline-month-row.is-empty .timeline-month-content::before {
    top: 14px;
    width: 11px;
    height: 11px;
    box-shadow: 0 0 0 4px #f7f6f2;
  }

  .timeline-month-row.is-empty .timeline-month-shell {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .timeline-month-row.is-empty .timeline-month-empty {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .timeline-card-grid,
  .timeline-unscheduled-list {
    grid-template-columns: 1fr;
  }

  .timeline-issue-card {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    width: 100%;
    min-width: 0;
  }

  .timeline-issue-title {
    font-size: 0.92rem;
  }

  .timeline-issue-meta {
    margin-top: 6px;
    font-size: 0.78rem;
  }

  .timeline-supplement-popover {
    max-width: min(280px, calc(100vw - 48px));
  }

  .timeline-horizontal-wrap {
    margin-left: -12px;
    margin-right: -12px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .timeline-horizontal-scroll {
    max-height: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .timeline-horizontal-corner,
  .timeline-horizontal-corner-sub,
  .timeline-horizontal-series-cell {
    min-width: 104px;
    padding: 10px 8px;
  }

  .timeline-horizontal-year-band,
  .timeline-horizontal-month-head,
  .timeline-horizontal-cell {
    min-width: 66px;
  }

  .timeline-horizontal-year-band,
  .timeline-horizontal-month-head {
    padding: 8px 4px;
    font-size: 0.8rem;
  }

  .timeline-horizontal-corner-sub,
  .timeline-horizontal-month-head {
    top: 39px;
  }

  .timeline-horizontal-series-name {
    font-size: 0.88rem;
    line-height: 1.25;
  }

  .timeline-horizontal-series-meta {
    margin-top: 4px;
    gap: 4px;
    font-size: 0.72rem;
  }

  .timeline-horizontal-cell {
    padding: 4px;
  }

  .timeline-horizontal-issues {
    gap: 4px;
  }

  .timeline-horizontal-issue {
    max-width: 54px;
    border-radius: 7px;
  }

  .timeline-horizontal-issue-placeholder {
    font-size: 0.68rem;
    padding: 6px;
  }

  .timeline-unscheduled {
    margin-top: 22px;
    padding-top: 16px;
  }
}
