:root {
  --bg: #0b0f19;
  --bg-elevated: #131a2a;
  --bg-card: #172033;
  --bg-card-hover: #1d2840;
  --border: #26334d;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #0284c7;
  --key-badge: #2563eb;
  --ppt-badge: #d97706;
  --pdf-badge: #059669;
  --radius: 12px;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.container {
  max-width: 1460px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background: radial-gradient(circle at 20% 0%, #1e293b 0%, #0b0f19 75%);
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem 2.5rem;
}

.header-inner {
  max-width: 1460px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

.brand {
  max-width: 760px;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.brand h1 {
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 0.85rem;
}

.stat-card {
  background: rgba(23, 32, 51, 0.8);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.15;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Controls Panel */
.controls-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.75rem 0 2rem;
  box-shadow: var(--shadow);
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.search-input-wrap {
  position: relative;
  flex: 1 1 420px;
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

#searchInput {
  width: 100%;
  padding: 0.75rem 2.4rem 0.75rem 2.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
}

#searchInput:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.clear-btn {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.sort-wrap select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 0.88rem;
}

/* Category Tabs */
.filter-tabs-row {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.9rem;
  margin-bottom: 0.9rem;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tab-btn {
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--text);
  border-color: #3b4d71;
}

.tab-btn.active {
  background: var(--accent-strong);
  color: #fff;
  border-color: var(--accent);
}

/* Filter Pills */
.filter-pills-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.pill-group-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding-top: 0.3rem;
  min-width: 78px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1;
}

.pill {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
}

.pill.active {
  background: rgba(56, 189, 248, 0.18);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.reset-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.86rem;
  text-decoration: underline;
}

/* Year Sections & Cards Grid */
.year-section {
  margin-bottom: 2.75rem;
}

.year-heading {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}

.year-count {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.25rem;
}

.talk-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.talk-card:hover {
  transform: translateY(-2px);
  border-color: #3e547d;
  background: var(--bg-card-hover);
}

.card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0f1624;
  overflow: hidden;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-overlays {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  right: 0.6rem;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(4px);
}

.badge-fmt-KEY {
  background: rgba(37, 99, 235, 0.9);
  color: #fff;
}

.badge-fmt-PPT,
.badge-fmt-PPTX {
  background: rgba(217, 119, 6, 0.9);
  color: #fff;
}

.badge-fmt-PDF {
  background: rgba(5, 150, 105, 0.9);
  color: #fff;
}

.card-body {
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-venue {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.card-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.35;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-snippet {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  margin-bottom: 0.85rem;
}

.tag-chip {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.42rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  transition: all 0.15s ease;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-primary {
  background: var(--accent-strong);
  border-color: var(--accent);
  color: #fff;
  flex: 1;
}

.btn-primary:hover {
  background: #0369a1;
  color: #fff;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.84);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-dialog {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
  max-width: 1320px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

.modal-header {
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.modal-badges {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-venue {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  flex: 1;
  min-height: 0;
}

.modal-pdf-pane {
  background: #090d16;
  height: 100%;
}

.modal-pdf-pane iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-meta-pane {
  padding: 1.25rem;
  border-left: 1px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.meta-section h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.download-list,
.draft-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.snippet-box {
  font-size: 0.84rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.notes-link {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
}

.notes-link:hover {
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

@media (max-width: 900px) {
  .modal-body {
    grid-template-columns: 1fr;
  }
  .modal-pdf-pane {
    min-height: 50vh;
  }
}

/* Curation Mode Styles */
.curation-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
  border: 1px solid #38bdf8;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.curation-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.curation-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1rem;
  color: #f8fafc;
}

.curation-counts {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.curation-stat-pill {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--border);
  cursor: pointer;
}

.curation-stat-pill.active {
  outline: 2px solid var(--accent);
}

.pill-keep {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.45);
}

.pill-exclude {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.45);
}

.curation-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.talk-card.is-excluded {
  opacity: 0.52;
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(30, 15, 20, 0.55);
}

.talk-card.is-kept {
  border-color: rgba(16, 185, 129, 0.4);
}

.curation-card-bar {
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem 0.8rem;
  background: rgba(9, 13, 22, 0.85);
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.btn-keep {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  flex: 1;
}

.btn-keep.is-active,
.btn-keep:hover {
  background: #059669;
  border-color: #10b981;
  color: #fff;
}

.btn-exclude {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  flex: 1;
}

.btn-exclude.is-active,
.btn-exclude:hover {
  background: #dc2626;
  border-color: #ef4444;
  color: #fff;
}

.btn-danger {
  background: #b91c1c;
  border-color: #ef4444;
  color: #fff;
}

.btn-danger:hover {
  background: #991b1b;
  color: #fff;
}

.modal-curation-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Two-Column Archive Layout & Sticky Left-Hand Timeline Rail */
.archive-layout {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  position: relative;
}

.timeline-rail {
  width: 245px;
  flex: 0 0 245px;
  position: sticky;
  top: 1.25rem;
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(19, 26, 42, 0.94) 0%, rgba(15, 22, 36, 0.94) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 0.9rem;
  box-shadow: var(--shadow);
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

.timeline-rail[hidden] {
  display: none !important;
}

.rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.65rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.rail-title {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.rail-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.rail-chapter {
  position: relative;
  margin-bottom: 1rem;
  padding-bottom: 0.35rem;
}

.rail-chapter:last-child {
  margin-bottom: 0;
}

.rail-chapter-header {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid var(--era-color, var(--accent));
  border-radius: 6px;
  padding: 0.42rem 0.6rem;
  margin-bottom: 0.45rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.rail-chapter-header:hover {
  background: rgba(255, 255, 255, 0.07);
}

.rail-chapter-years {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--era-color, var(--accent));
}

.rail-chapter-inst {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.rail-years-list {
  position: relative;
  padding-left: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.rail-years-list::before {
  content: "";
  position: absolute;
  left: 0.36rem;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 2px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 2px;
}

.rail-year-item {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr 26px;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.28rem 0.45rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.rail-year-item::before {
  content: "";
  position: absolute;
  left: -0.66rem;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #334155;
  border: 1.5px solid var(--bg-elevated);
  transition: all 0.18s ease;
}

.rail-year-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.rail-year-item:hover::before {
  background: var(--era-color, var(--accent));
  transform: translateY(-50%) scale(1.2);
}

.rail-year-item.is-active {
  color: #fff;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.32);
  font-weight: 700;
}

.rail-year-item.is-active::before {
  background: var(--era-color, var(--accent));
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25), 0 0 8px var(--era-color, var(--accent));
  transform: translateY(-50%) scale(1.3);
}

.rail-bar-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.rail-bar-fill {
  height: 100%;
  background: var(--era-color, var(--accent));
  border-radius: 999px;
  opacity: 0.65;
  transition: opacity 0.15s ease, width 0.25s ease;
}

.rail-year-item.is-active .rail-bar-fill,
.rail-year-item:hover .rail-bar-fill {
  opacity: 1;
}

.rail-year-count {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text-muted);
}

.rail-year-item.is-active .rail-year-count {
  color: var(--era-color, var(--accent));
  font-weight: 700;
}

/* Main Timeline Spine & Institution Chapter Banners */
.talks-timeline {
  flex: 1;
  min-width: 0;
}

.chapter-banner {
  position: relative;
  background: linear-gradient(135deg, rgba(23, 32, 51, 0.92) 0%, rgba(15, 22, 36, 0.96) 100%);
  border: 1px solid var(--border);
  border-left: 4px solid var(--era-color, var(--accent));
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
  margin: 0.5rem 0 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.chapter-banner-main {
  max-width: 780px;
}

.chapter-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--era-color, var(--accent));
  margin-bottom: 0.25rem;
}

.chapter-title {
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.chapter-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.chapter-stats {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.chapter-stat-pill {
  background: rgba(11, 15, 25, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.chapter-stat-pill strong {
  color: var(--text);
  font-weight: 800;
}

/* Vertical Timeline Spine on Year Sections */
.year-section {
  position: relative;
  padding-left: 1.65rem;
  margin-bottom: 2.75rem;
  scroll-margin-top: 1.25rem;
}

.year-section::before {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 0.6rem;
  bottom: -2rem;
  width: 2px;
  background: linear-gradient(
    180deg,
    var(--era-color, var(--accent)) 0%,
    rgba(56, 189, 248, 0.18) 100%
  );
  border-radius: 2px;
}

.year-section:last-child::before {
  bottom: 0;
}

.year-node-dot {
  position: absolute;
  left: 0;
  top: 0.48rem;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--era-color, var(--accent));
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

.year-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.55rem;
  margin-bottom: 1.25rem;
}

.year-badge-num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.year-era-chip {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--era-color, var(--accent));
}

.year-meta-pills {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.year-meta-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
}

@media (max-width: 1024px) {
  .archive-layout {
    flex-direction: column;
  }
  .timeline-rail {
    position: static;
    width: 100%;
    flex: none;
    max-height: none;
  }
  .rail-years-list {
    flex-direction: row;
    flex-wrap: wrap;
    padding-left: 0;
  }
  .rail-years-list::before,
  .rail-year-item::before {
    display: none;
  }
  .rail-year-item {
    width: auto;
    grid-template-columns: auto auto;
  }
  .rail-bar-track {
    display: none;
  }
}


