.stats-intro {
  padding-top: 2rem;
}

.section-wrap .terminal-card {
  margin-inline: auto;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.9rem;
}

.stat-card {
  background: var(--panel-light);
  border-radius: 0.9rem;
  padding: 1rem;
}

html.dark .stat-card {
  background: #2d1e44;
}

.stat-label {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-value {
  margin: 0.45rem 0 0;
  font-size: 1.9rem;
  line-height: 1;
  font-weight: 800;
  color: var(--heading-light);
}

html.dark .stat-value {
  color: #fff;
}

.sample-note {
  margin-top: 1rem;
  opacity: 0.85;
}

.token-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.token-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.5rem;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(16, 20, 28, 0.42);
  font-size: 0.95rem;
  font-weight: 700;
}

html:not(.dark) .token-chip {
  border-color: rgba(42, 27, 63, 0.12);
  background: rgba(113, 82, 153, 0.08);
}

.token-chip-tag {
  box-shadow: inset 0 0 0 1px rgba(93, 173, 255, 0.08);
}

.token-chip-keyword {
  box-shadow: inset 0 0 0 1px rgba(93, 255, 149, 0.08);
}

.token-chip-label {
  line-height: 1.2;
}

.token-chip-count {
  color: rgba(241, 233, 255, 0.7);
  font-size: 0.82rem;
  white-space: nowrap;
}

html:not(.dark) .token-chip-count {
  color: rgba(42, 27, 63, 0.6);
}

.warning-panel {
  border: 1px solid rgba(197, 92, 92, 0.45);
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
}

.analytics-panel h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.9rem;
  line-height: 1;
  font-weight: 800;
  color: var(--heading-light);
}

html.dark .analytics-panel h2 {
  color: #fff;
}

.detail-grid .analytics-panel {
  min-height: 420px;
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-panel {
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.dashboard-chart {
  margin-top: 1.2rem;
  flex: 1 1 auto;
}

.chart-frame {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}

.chart-y-axis {
  list-style: none;
  margin: 0;
  padding: 0.1rem 0 1.9rem;
  min-height: 252px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(241, 233, 255, 0.55);
}

html:not(.dark) .chart-y-axis {
  color: rgba(42, 27, 63, 0.55);
}

.chart-y-axis-rating {
  padding-bottom: 2.1rem;
  min-height: 272px;
}

.chart-scroll {
  overflow-x: auto;
  padding-bottom: 0.3rem;
}

.chart-columns {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 34px;
  gap: 0.75rem;
  min-width: max-content;
  position: relative;
}

.chart-columns::before {
  content: "";
  position: absolute;
  inset: 0 0 1.9rem;
  border-radius: 1rem;
  background:
    linear-gradient(to right, rgba(100, 50, 148, 0.08), rgba(100, 50, 148, 0.03)),
    repeating-linear-gradient(
      to top,
      rgba(241, 233, 255, 0.12) 0,
      rgba(241, 233, 255, 0.12) 1px,
      transparent 1px,
      transparent 25%
    );
  pointer-events: none;
}

html:not(.dark) .chart-columns::before {
  background:
    linear-gradient(to right, rgba(100, 50, 148, 0.05), rgba(100, 50, 148, 0.02)),
    repeating-linear-gradient(
      to top,
      rgba(42, 27, 63, 0.08) 0,
      rgba(42, 27, 63, 0.08) 1px,
      transparent 1px,
      transparent 25%
    );
}

.chart-columns-wide {
  grid-auto-columns: 32px;
}

.chart-columns-month {
  grid-auto-columns: 38px;
}

.chart-columns-week {
  grid-auto-columns: 42px;
}

.chart-columns-rating {
  grid-auto-columns: 34px;
}

.chart-columns-decade {
  grid-auto-columns: 48px;
}

.chart-column {
  display: grid;
  grid-template-rows: minmax(0, 228px) auto;
  gap: 0.55rem;
  align-items: end;
  position: relative;
  z-index: 1;
}

.chart-column-track {
  height: 228px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.chart-column-fill {
  width: 100%;
  min-height: 4px;
  border-radius: 0.42rem 0.42rem 0 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.chart-column-fill-activity {
  background: linear-gradient(180deg, #66d5ff, #4f9fd9 75%);
}

.chart-column-fill-rating {
  background: linear-gradient(180deg, #c4cfdd, #93a4b8 78%);
}

.chart-column-fill-month {
  background: linear-gradient(180deg, #47ea58, #3adf63 78%);
}

.chart-column-fill-weekday {
  background: linear-gradient(180deg, #ff334a, #f01625 78%);
}

.chart-column-fill-decade {
  background: linear-gradient(180deg, #fbfbfb, #dddddd 78%);
}

.chart-column-label {
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
}

.chart-frame-line {
  align-items: stretch;
}

.line-chart {
  min-width: 620px;
}

.line-chart-canvas {
  height: 252px;
  position: relative;
  border-radius: 1rem;
  background:
    linear-gradient(to right, rgba(100, 50, 148, 0.08), rgba(100, 50, 148, 0.03)),
    repeating-linear-gradient(
      to top,
      rgba(241, 233, 255, 0.12) 0,
      rgba(241, 233, 255, 0.12) 1px,
      transparent 1px,
      transparent 20%
    );
}

html:not(.dark) .line-chart-canvas {
  background:
    linear-gradient(to right, rgba(100, 50, 148, 0.05), rgba(100, 50, 148, 0.02)),
    repeating-linear-gradient(
      to top,
      rgba(42, 27, 63, 0.08) 0,
      rgba(42, 27, 63, 0.08) 1px,
      transparent 1px,
      transparent 20%
    );
}

.line-chart-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.line-chart-path {
  fill: none;
  stroke: #f58b0a;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-chart-point {
  fill: #f58b0a;
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 2;
}

.line-chart-labels {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.line-chart-labels li {
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.chart-footnote {
  margin: auto 0 0;
  padding-top: 0.75rem;
  font-size: 0.82rem;
  opacity: 0.9;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.fact-card {
  min-height: 144px;
  border-radius: 0.75rem;
  background: var(--panel-light);
  border: 1px solid rgba(100, 50, 148, 0.25);
  padding: 0.75rem 0.8rem;
  display: grid;
  align-items: start;
}

html.dark .fact-card {
  background: #2d1e44;
}

.fact-card-has-media {
  grid-template-columns: minmax(0, 1fr) 62px;
  gap: 0.75rem;
}

.fact-card-copy {
  min-width: 0;
}

.fact-label {
  margin: 0;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.fact-value {
  margin: 0.25rem 0 0;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--heading-light);
  overflow-wrap: anywhere;
}

html.dark .fact-value {
  color: #fff;
}

.fact-value-title {
  font-size: 1.05rem;
  line-height: 1.2;
}

.fact-detail {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  opacity: 0.88;
}

.fact-card-media {
  width: 62px;
  height: 88px;
  object-fit: cover;
  border-radius: 0.55rem;
  display: block;
  justify-self: end;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.fact-tone-accent {
  border-color: rgba(155, 205, 107, 0.48);
}

.fact-tone-calm {
  border-color: rgba(113, 221, 246, 0.45);
}

.fact-tone-energy {
  border-color: rgba(255, 84, 101, 0.45);
}

.fact-tone-highlight {
  border-color: rgba(244, 182, 79, 0.48);
}

.highlight-panel {
  background:
    radial-gradient(120px 120px at 84% 20%, rgba(155, 205, 107, 0.16), rgba(155, 205, 107, 0) 70%),
    var(--panel-light);
}

html.dark .highlight-panel {
  background:
    radial-gradient(120px 120px at 84% 20%, rgba(155, 205, 107, 0.16), rgba(155, 205, 107, 0) 70%),
    #2d1e44;
}

.showcase-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: start;
}

.showcase-films {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.showcase-film-card {
  background: rgba(22, 17, 38, 0.12);
  border: 1px solid rgba(100, 50, 148, 0.25);
  border-radius: 0.7rem;
  padding: 0.55rem;
}

html.dark .showcase-film-card {
  background: rgba(22, 17, 38, 0.35);
}

.showcase-film-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.5rem;
  display: block;
}

.showcase-film-card h3 {
  margin: 0.45rem 0 0.2rem;
  font-size: 0.96rem;
  line-height: 1.25;
}

.showcase-film-card h3 a {
  color: inherit;
  text-decoration: none;
}

.showcase-film-card h3 a:hover {
  text-decoration: underline;
}

.showcase-film-card p {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.9;
}

.showcase-year-badge {
  border-radius: 999px;
  width: 170px;
  height: 170px;
  background: radial-gradient(circle at 50% 35%, rgba(155, 205, 107, 0.26), rgba(100, 50, 148, 0.16));
  border: 1px solid rgba(155, 205, 107, 0.35);
  display: grid;
  place-content: center;
  text-align: center;
  justify-self: end;
}

.badge-year {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: #9bcd6b;
}

.badge-meta {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  opacity: 0.9;
}

.deep-dive-title {
  margin: 0;
}

.deep-dive-grid .analytics-panel h3 {
  margin: 0 0 0.9rem;
  font-size: 1.04rem;
}

.panel-meta {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  opacity: 0.86;
}

.franchise-panel {
  grid-column: 1 / -1;
}

.person-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.person-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  background: rgba(22, 17, 38, 0.12);
  border: 1px solid rgba(100, 50, 148, 0.25);
  border-radius: 0.6rem;
  padding: 0.4rem 0.5rem;
}

html.dark .person-card {
  background: rgba(22, 17, 38, 0.35);
}

.person-card img,
.person-avatar-fallback {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.person-card img {
  object-fit: cover;
  display: block;
}

.person-avatar-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7a47ad, #4f9fd9);
  color: #fff;
  font-weight: 800;
}

.person-name {
  margin: 0;
  font-weight: 700;
  line-height: 1.1;
}

.person-count {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  opacity: 0.85;
}

.franchise-browser {
  display: grid;
  gap: 0.9rem;
}

.franchise-card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.franchise-card {
  min-width: 0;
}

.franchise-card-trigger {
  width: 100%;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem 0.75rem;
  border-radius: 0.75rem;
  background: rgba(22, 17, 38, 0.16);
  border: 1px solid rgba(100, 50, 148, 0.25);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

html.dark .franchise-card-trigger {
  background: rgba(22, 17, 38, 0.36);
}

.franchise-card-trigger:hover,
.franchise-card-trigger:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(155, 205, 107, 0.42);
  outline: none;
}

.franchise-card-media,
.franchise-card-fallback,
.franchise-detail-poster,
.franchise-film-poster {
  border-radius: 0.6rem;
}

.franchise-card-media,
.franchise-card-fallback {
  width: 56px;
  height: 78px;
}

.franchise-card-media,
.franchise-detail-poster,
.franchise-film-poster {
  display: block;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.franchise-card-fallback,
.franchise-detail-poster.franchise-card-fallback,
.franchise-film-poster.franchise-card-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7a47ad, #4f9fd9);
  color: #fff;
  font-weight: 800;
}

.franchise-card-copy {
  min-width: 0;
}

.franchise-card-name {
  display: block;
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
}

.franchise-card-detail {
  display: block;
  margin: 0.28rem 0 0;
  font-size: 0.82rem;
  opacity: 0.82;
}

.franchise-modal[hidden] {
  display: none;
}

.franchise-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
}

.franchise-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(12, 8, 24, 0.76);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.franchise-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  max-height: min(88vh, 980px);
  overflow-y: auto;
  border-radius: 1.2rem;
  padding: 1.4rem;
  background:
    radial-gradient(160px 160px at 85% 16%, rgba(155, 205, 107, 0.15), rgba(155, 205, 107, 0) 72%),
    rgba(52, 34, 82, 0.96);
  border: 1px solid rgba(155, 205, 107, 0.18);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

body.franchise-modal-open {
  overflow: hidden;
}

.franchise-detail-panel {
  display: grid;
  gap: 1rem;
}

.franchise-detail-panel[hidden] {
  display: none;
}

.franchise-detail-hero {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

.franchise-detail-poster {
  width: 88px;
  height: 124px;
}

.franchise-detail-kicker {
  margin: 0;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.franchise-detail-copy h4 {
  margin: 0.25rem 0 0;
  font-size: 1.4rem;
  line-height: 1.05;
}

.franchise-detail-summary {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  opacity: 0.86;
}

.franchise-detail-close {
  border: 1px solid rgba(155, 205, 107, 0.36);
  background: rgba(155, 205, 107, 0.12);
  color: inherit;
  border-radius: 999px;
  padding: 0.6rem 0.95rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.franchise-film-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.franchise-film-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem 0.75rem;
  border-radius: 0.75rem;
  background: rgba(22, 17, 38, 0.16);
  border: 1px solid rgba(100, 50, 148, 0.22);
}

html.dark .franchise-film-card {
  background: rgba(22, 17, 38, 0.34);
}

.franchise-film-poster {
  width: 52px;
  height: 74px;
}

.franchise-film-copy {
  min-width: 0;
}

.franchise-film-title,
.franchise-film-meta {
  margin: 0;
}

.franchise-film-title {
  font-weight: 700;
  line-height: 1.2;
}

.franchise-film-title a {
  color: inherit;
  text-decoration: none;
}

.franchise-film-title a:hover {
  text-decoration: underline;
}

.franchise-film-meta {
  margin-top: 0.28rem;
  font-size: 0.8rem;
  opacity: 0.82;
}

@media (max-width: 1200px) {
  .franchise-card-grid,
  .franchise-film-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-panel {
    padding: 1.35rem;
  }

  .chart-frame {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 0.7rem;
  }

  .chart-y-axis,
  .chart-y-axis-rating {
    font-size: 0.62rem;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .trend-metrics,
  .trend-summary {
    grid-template-columns: 1fr;
  }

  .showcase-year-badge {
    justify-self: start;
  }

  .franchise-card-grid,
  .franchise-film-grid {
    grid-template-columns: 1fr;
  }

  .franchise-detail-hero {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .franchise-detail-close {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .franchise-modal-dialog {
    padding: 1rem;
    max-height: 92vh;
  }
}

@media (max-width: 640px) {
  .facts-grid {
    grid-template-columns: 1fr;
  }

  .fact-card {
    min-height: 0;
  }
}

.bar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(0, 1fr) minmax(2.8rem, auto);
  gap: 0.75rem;
  align-items: center;
}

.studio-bar-row {
  grid-template-columns: minmax(150px, 220px) 1fr 44px;
}

.bar-label {
  font-weight: 700;
  min-width: 0;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.studio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.studio-label img,
.studio-logo-fallback {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  flex: 0 0 22px;
}

.studio-label img {
  object-fit: contain;
  background: rgba(255, 255, 255, 0.82);
  padding: 2px;
}

.studio-logo-fallback {
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  background: linear-gradient(135deg, #7a47ad, #4f9fd9);
  color: #fff;
}

.bar-track {
  border-radius: 999px;
  background: rgba(100, 50, 148, 0.18);
  height: 11px;
  overflow: hidden;
  min-width: 0;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7a47ad, #9bcd6b);
}

.bar-value {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.rank-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(100, 50, 148, 0.25);
  padding-bottom: 0.35rem;
}

.trend-panel {
  display: grid;
  gap: 1rem;
}

.trend-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.trend-head h2 {
  margin-bottom: 0;
}

.trend-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.trend-pill-up {
  background: rgba(155, 205, 107, 0.16);
  color: #b8df88;
}

.trend-pill-down {
  background: rgba(255, 84, 101, 0.14);
  color: #ff9ca8;
}

.trend-pill-flat {
  background: rgba(113, 221, 246, 0.14);
  color: #8adff4;
}

.trend-metrics,
.trend-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.trend-metric-card,
.trend-summary-card {
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  background: rgba(22, 17, 38, 0.18);
  border: 1px solid rgba(100, 50, 148, 0.25);
}

html.dark .trend-metric-card,
html.dark .trend-summary-card {
  background: rgba(22, 17, 38, 0.38);
}

.trend-label,
.trend-note,
.trend-value,
.trend-delta,
.trend-mix {
  margin: 0;
}

.trend-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.82;
}

.trend-value {
  margin-top: 0.35rem;
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 800;
  color: var(--heading-light);
}

html.dark .trend-value,
html.dark .trend-delta,
html.dark .trend-mix {
  color: #fff;
}

.trend-delta,
.trend-mix {
  margin-top: 0.35rem;
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 800;
  color: var(--heading-light);
}

.trend-delta-up {
  color: #9bcd6b;
}

.trend-delta-down {
  color: #ff7a88;
}

.trend-delta-flat {
  color: #71ddf6;
}

.trend-note {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  opacity: 0.82;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

th,
td {
  text-align: left;
  padding: 0.62rem 0.55rem;
  border-bottom: 1px solid rgba(100, 50, 148, 0.26);
}

th {
  color: var(--heading-light);
}

html.dark th {
  color: #fff;
}

.timeline-scroll {
  overflow-x: auto;
  padding-bottom: 0.8rem;
}

.month-timeline {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0.4rem 0.2rem 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(52px, 52px);
  gap: 0.75rem;
  align-items: end;
  min-width: max-content;
}

.month-node {
  display: grid;
  gap: 0.3rem;
  justify-items: center;
}

.month-count {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
}

.month-bar-track {
  width: 20px;
  height: 150px;
  border-radius: 999px;
  background: rgba(100, 50, 148, 0.18);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.month-bar {
  width: 100%;
  min-height: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #9bcd6b, #7a47ad);
}

.month-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.entry-timeline {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0.2rem 0.2rem 0.4rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 220px);
  gap: 1rem;
  min-width: max-content;
  position: relative;
}

.entry-timeline::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  right: 0.2rem;
  top: 14px;
  border-top: 2px solid rgba(100, 50, 148, 0.35);
}

.entry-node {
  position: relative;
  padding-top: 1.2rem;
}

.entry-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #9bcd6b;
  border: 2px solid #6f3ea1;
  position: absolute;
  left: 0.6rem;
  top: 0.05rem;
  z-index: 1;
}

.entry-card {
  background: var(--panel-light);
  border-radius: 0.8rem;
  padding: 0.85rem;
  min-height: 430px;
}

html.dark .entry-card {
  background: #2d1e44;
}

.entry-date {
  margin: 0;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.entry-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  background: rgba(22, 17, 38, 0.12);
  border-radius: 0.55rem;
  margin-bottom: 0.55rem;
}

.entry-card h3 {
  margin: 0.4rem 0 0.3rem;
  font-size: 1rem;
  line-height: 1.25;
}

.entry-card h3 a {
  color: inherit;
  text-decoration: none;
}

.entry-card h3 a:hover {
  text-decoration: underline;
}

.entry-meta {
  margin: 0;
  font-size: 0.86rem;
}

.sparkline-scroll {
  overflow-x: auto;
  padding-bottom: 0.6rem;
}

.sparkline-list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
  gap: 0;
  width: 100%;
  min-width: 680px;
  align-items: end;
}

.sparkline-item {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  flex: 0 0 14px;
}

.sparkline-track {
  width: 14px;
  height: 96px;
  border-radius: 999px;
  background: rgba(100, 50, 148, 0.16);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.sparkline-bar {
  width: 100%;
  min-height: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #9bcd6b, #7a47ad);
}

.sparkline-label {
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.sparkline-label.muted {
  opacity: 0.35;
}

.country-heatmap-map {
  width: 100%;
  height: 500px;
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid rgba(100, 50, 148, 0.38);
  margin-top: 0.8rem;
}

.country-heatmap-panel {
  grid-column: 1 / -1;
}

.country-heatmap-map .leaflet-control-attribution {
  background: rgba(18, 11, 30, 0.75);
  color: rgba(230, 225, 247, 0.75);
}
