/* Component styles — 02_DESIGN_SYSTEM.md component inventory, ported to real CSS. */

/* ---- Top bar: sticky, blurred, wordmark + pill nav. Height 60px. ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 60px;
  display: flex;
  align-items: center;
  background: rgba(13, 12, 10, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.wordmark {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 18px;
  color: var(--text);
}
.wordmark .gold {
  color: var(--accent);
}
.nav-pills {
  display: flex;
  gap: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
}
.nav-pills a {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--muted);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.nav-pills a:hover,
.nav-pills a[aria-current="page"] {
  color: var(--text);
  background: var(--surface3);
}

/* ---- Search: full-width input, gold focus ring. ---- */
.search-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 18px;
  transition: box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.search-input::placeholder {
  color: var(--faint);
}
.search-input:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.search-results {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  display: none;
}
.search-results.open {
  display: block;
}
.search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.search-row:last-child {
  border-bottom: none;
}
.search-row:hover {
  background: var(--surface2);
}
.search-row .title {
  font-size: 14.5px;
}
.search-row .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}
.search-miss {
  padding: 18px 16px;
  color: var(--muted);
  font-size: 14px;
}

/* ---- Stat block ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat .n {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--accent-bright);
}
.stat .l {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 4px;
}
@media (max-width: 640px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 20px;
  }
}

/* ---- Chips ---- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 13.5px;
  padding: 8px 16px;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

/* ---- Title header ---- */
.title-header {
  padding: 48px 0 28px;
  border-bottom: 1px solid var(--border);
}
.title-header h1 {
  font-size: clamp(36px, 6vw, 68px);
  margin: 0 0 10px;
}
.value-statement {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.rank-explainer {
  margin-top: 10px;
  color: var(--faint);
  font-size: 13.5px;
  max-width: 60ch;
}

/* ---- Start here hero ---- */
.hero {
  margin: 32px 0;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface2), var(--surface));
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 0 1px var(--accent-glow), 0 20px 60px -30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 22px;
}
.hero-play {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--accent-glow);
  color: var(--accent-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.hero-play:hover {
  background: var(--accent);
  color: var(--on-accent);
  transform: scale(1.04);
}
.hero-body .eyebrow {
  color: var(--accent);
}
.hero-body .pod {
  font-family: var(--font-mono);
  color: var(--accent-bright);
  font-size: 13px;
  margin-top: 6px;
}
.hero-body .ep-title {
  font-size: 19px;
  margin: 6px 0;
}
.hero-body .why {
  color: var(--muted);
  font-size: 13.5px;
}

/* ---- Episode row ---- */
.eplist {
  border-top: 1px solid var(--border);
}
.ep-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
}
.ep-play {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.ep-play:hover,
.ep-play.playing {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.ep-main {
  flex: 1 1 auto;
  min-width: 0;
}
.ep-main .ep-title {
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-main .ep-pod {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  margin-top: 2px;
}
.ep-meta {
  flex: 0 0 auto;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
}
.brief-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: var(--radius-pill);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- Also mentioned ---- */
.also-mentioned {
  margin-top: 8px;
}
.also-mentioned summary {
  cursor: pointer;
  padding: 14px 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.also-mentioned summary:hover {
  color: var(--muted);
}

/* ---- Marathon film block ---- */
.up-next {
  margin: 20px 0 32px;
  padding: 20px 22px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-glow);
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.up-next .eyebrow {
  color: var(--accent);
}
.film-block {
  display: flex;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}
.ordinal {
  font-family: var(--font-mono);
  font-size: 28px;
  color: var(--faint);
  flex: 0 0 56px;
}
.film-block-body {
  flex: 1 1 auto;
}
.film-block h3 {
  font-size: clamp(22px, 3vw, 32px);
  margin: 2px 0 10px;
}
.watched-toggle {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  padding: 6px 14px;
  font-size: 12.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.watched-toggle[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

/* ---- Gap state ---- */
.gap-state {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

/* ---- Persistent player ---- */
.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(21, 19, 16, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  display: none;
}
.player.active {
  display: block;
}
.player-progress {
  height: 2px;
  background: var(--accent);
  width: 0%;
}
.player-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.player-title {
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-pod {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
}
.player-link {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  white-space: nowrap;
}

/* ---- Stat card / marathon card on home ---- */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
}
