/* =============================================
   Binge Boss — title pages (/watch/<slug>-<id>/)
   Poster card rules come from /pages/cards.css, sources from /pages/blog.css.
   ============================================= */

.title-page {
  max-width: 860px;
}

.title-header {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 32px;
}

.title-poster .show-card {
  animation: none;
}

.title-header h1 {
  margin-bottom: 8px;
}

.title-year {
  font-weight: 400;
  color: var(--text-muted);
}

.title-header .subtitle {
  margin-bottom: 16px;
  font-style: italic;
}

.title-overview {
  line-height: 1.6;
}

.title-open {
  margin-top: 20px;
}

.article table.title-facts {
  margin: 0 0 8px;
}

.article table.title-facts th {
  width: 34%;
  background: none;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-weight: 600;
  vertical-align: top;
}

.article table.title-facts tr:hover td {
  background: none;
}

.title-where-note {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.title-similar .blog-cards-grid {
  margin-top: 16px;
}

.title-similar-links {
  margin-top: 16px;
  font-size: 0.9rem;
}

.article a {
  color: var(--mint-400);
}

.article a.btn-cta {
  color: #000;
}

.article a:focus-visible {
  outline: 2px solid var(--mint-400);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .title-header {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .title-poster {
    max-width: 200px;
  }

  .article table.title-facts th {
    width: 40%;
  }
}

/* ── the list at /watch/ ───────────────────────────────────────────────── */

.title-index .blog-search {
  margin-top: 8px;
}

.article .title-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article .title-list-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

/* Movie or Series, fixed width so the titles line up. */
.title-kind {
  flex: 0 0 64px;
  margin-top: 2px;
  padding: 2px 0;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
  border: 1px solid currentColor;
}

.title-kind--movie {
  color: #f0b86e;
}

.title-kind--tv {
  color: var(--mint-400);
}

.title-list-text {
  min-width: 0;
}

.title-list-item a {
  display: block;
  font-weight: 600;
  text-decoration: none;
}

.title-list-item a:hover {
  text-decoration: underline;
}

/* Movie titles take the label's orange; series keep the mint link colour. */
.article .title-list-item--movie a {
  color: #f0b86e;
}

.title-list-meta {
  display: block;
  margin-top: 2px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.title-list-count {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* A–Z bar: stays at the top while scrolling, below the app banner when shown. */
.title-az {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0 0 8px;
  padding: 8px 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.has-app-promo-banner .title-az {
  top: var(--app-promo-h);
}

.has-app-promo-banner {
  --az-top: var(--app-promo-h);
}

.title-az a,
.title-az span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
}

.article .title-az a {
  color: var(--mint-400);
  text-decoration: none;
}

.title-az a:hover {
  background: var(--bg-elevated);
}

.title-az span,
.title-az a.is-empty {
  color: var(--text-muted);
  opacity: 0.45;
  pointer-events: none;
}

.article .title-letter-heading {
  margin: 24px 0 4px;
  padding: 0;
  border-top: none;
  font-size: 1rem;
  color: var(--text-muted);
  /* Land below the sticky bar (and banner), not under it. The bar's height
     wraps with the width, so title-filter.js measures it into --az-h. */
  scroll-margin-top: calc(var(--az-top, 0px) + var(--az-h, 48px) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.title-az) {
    scroll-behavior: smooth;
  }
}

@media (max-width: 640px) {
  .title-az a,
  .title-az span {
    min-width: 26px;
    height: 28px;
    font-size: 0.8rem;
  }
}
