/* ——— Library stats page (loads after styles.css) ——— */

.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; text-underline-offset: 3px; }

.stats {
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .tiles, .panel-wide { grid-column: 1 / -1; }
  /* The console list is the long one; the other three stack beside it. */
  .panel-tall { grid-row: span 3; }
}

/* headline tiles */

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 720px) {
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.tile, .panel {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
}
.tile { padding: 14px 16px; }
.tile p { margin: 0; }
.tile-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.tile-value {
  margin: 4px 0 2px !important;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
}
.tile-sub { font-size: 12.5px; color: var(--ink-dim); }

/* panels */

.panel { padding: 18px 20px 20px; min-width: 0; }
.panel-head { margin-bottom: 14px; }
.panel h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 21px;
  font-weight: 600;
}
.panel-sub { margin: 2px 0 0; font-size: 13px; color: var(--ink-faint); }

/* release timeline */

.tl-plot {
  position: relative;
  height: 220px;
  margin: 8px 0 26px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.tl-grid {
  position: absolute;
  left: 0; right: 0;
  height: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.tl-grid span {
  position: absolute;
  right: calc(100% + 8px);
  translate: 0 -50%;
  font-size: 11px;
  color: var(--ink-faint);
}
.tl-cols {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  gap: 2px;
}
.tl-col {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: default;
}
.tl-col:hover, .tl-col:focus-visible { background: rgba(255, 255, 255, 0.04); outline: none; border-radius: 4px 4px 0 0; }
.tl-bar {
  position: absolute;
  left: 50%; bottom: 0;
  translate: -50% 0;
  width: min(100%, 18px);
  border-radius: 4px 4px 0 0;
  background: var(--brass);
  opacity: 0.85;
}
.tl-col:hover .tl-bar, .tl-col:focus-visible .tl-bar { opacity: 1; }
.tl-peak {
  position: absolute;
  left: 50%;
  translate: -50% -4px;
  font-size: 11px;
  color: var(--ink-dim);
  white-space: nowrap;
}
.tl-year {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  translate: -50% 0;
  font-size: 11px;
  color: var(--ink-faint);
}
@media (max-width: 599px) { .tl-year.minor { display: none; } }

.tip {
  position: absolute;
  z-index: 10;
  max-width: 260px;
  padding: 9px 12px;
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-sm);
  background: #1b2030;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  font-size: 12.5px;
  color: var(--ink-dim);
  pointer-events: none;
}
.tip strong { color: var(--ink); }
.tip ul { margin: 6px 0 0; padding-left: 16px; }
.tip p { margin: 4px 0 0; color: var(--ink-faint); }

.table-view { margin-top: 4px; font-size: 13px; color: var(--ink-dim); }
.table-view summary { cursor: pointer; color: var(--ink-faint); }
.table-view table { margin-top: 10px; border-collapse: collapse; columns: 2; }
.table-view td, .table-view th { padding: 2px 16px 2px 0; text-align: left; font-weight: 400; }
.table-view th { color: var(--ink-faint); }

/* horizontal bars */

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bar-group {
  margin-top: 8px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.bar-group:first-child { margin-top: 0; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 38%) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
}
.bar-label {
  color: var(--ink-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-label a { color: inherit; text-decoration: none; }
.bar-label a:hover { color: var(--brass); text-decoration: underline; text-underline-offset: 3px; }
.bar-track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bar {
  height: 14px;
  border-radius: 0 4px 4px 0;
  background: var(--brass);
  opacity: 0.85;
}
.bar-value { flex-shrink: 0; font-size: 12.5px; color: var(--ink-dim); }
