/* Show detail page: one composition for the hero, facts, guide and rail. */

.sd-hero {
  position: relative;
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  margin-bottom: 26px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: var(--bg-2);
}

.sd-hero__art {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(112deg, transparent 0 12px, color-mix(in srgb, var(--line) 70%, transparent) 12px 13px),
    var(--bg-2);
}

.sd-hero__art > img,
.sd-hero__art > div {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Without this the hero stretches its artwork to fill, which distorts the
   portrait-shaped provider images rather than cropping them. */
.sd-hero__art > img {
  object-fit: cover;
}

.sd-hero__art > img,
.sd-media-image {
  object-fit: cover;
}

.sd-media-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--bg-3);
}

.sd-media-image--episode {
  align-self: start;
}

.sd-hero__ghost {
  position: absolute;
  right: -.06em;
  bottom: -.22em;
  max-width: 100%;
  overflow: hidden;
  color: color-mix(in srgb, var(--txt-faint) 26%, transparent);
  font-family: var(--f-display);
  font-size: clamp(58px, 13vw, 150px);
  font-weight: 800;
  line-height: .8;
  letter-spacing: -.05em;
  white-space: nowrap;
  pointer-events: none;
}

.sd-hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 72%, transparent) 26%, transparent 58%),
    linear-gradient(97deg, var(--bg) 14%, color-mix(in srgb, var(--bg) 80%, transparent) 50%, color-mix(in srgb, var(--bg) 34%, transparent) 100%);
}

.sd-hero__inner {
  position: relative;
  width: 100%;
  padding: 26px 28px 22px;
}

.sd-eyebrow {
  margin: 0 0 8px;
  color: var(--txt-faint);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.sd-eyebrow--aired {
  color: var(--star);
}

.sd-eyebrow--next {
  color: var(--tally);
}

.sd-hero h1 {
  max-width: 16ch;
  margin: 0 0 10px;
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1;
}

.sd-hero__facts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sd-chip {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--txt-faint);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .1em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
}

.sd-chip--next {
  border-color: color-mix(in srgb, var(--tally) 55%, transparent);
  color: var(--tally);
}

.sd-rating {
  color: var(--txt-faint);
  font-family: var(--f-mono);
  font-size: 11px;
}

.sd-rating > span {
  color: var(--star);
}

.sd-showgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: 26px;
  align-items: start;
}

.sd-showgrid__main,
.sd-showgrid__rail {
  min-width: 0;
}

.sd-showgrid__main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sd-showgrid__rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sd-card {
  padding: 18px 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: var(--bg-2);
}

.sd-card h2 {
  margin: 0 0 12px;
  font-size: 15px;
  letter-spacing: -.01em;
}

.sd-summary p {
  max-width: 66ch;
  margin: 0;
  color: var(--txt-dim);
  font-size: 15px;
  line-height: 1.65;
}

.sd-last__body {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.sd-media-fallback {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background:
    repeating-linear-gradient(112deg, transparent 0 9px, color-mix(in srgb, var(--line) 40%, transparent) 9px 10px),
    var(--bg-3);
  color: var(--txt-faint);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.sd-last__copy {
  min-width: 0;
}

.sd-last__copy h3 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.2;
}

.sd-mono {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
}

.sd-last__copy .sd-mono {
  margin: 0;
  color: var(--txt-faint);
  font-size: 11px;
}

.sd-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sd-section-heading h2 {
  margin-bottom: 0;
}

.sd-section-heading > .sd-mono {
  color: var(--txt-faint);
  font-size: 11px;
}

.sd-seasons {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin-bottom: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  scrollbar-width: none;
}

.sd-seasons::-webkit-scrollbar {
  display: none;
}

.sd-season {
  flex: none;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--txt-dim);
  font-family: var(--f-mono);
  font-size: 11.5px;
  line-height: 1.3;
  white-space: nowrap;
  transition: background .13s, border-color .13s, color .13s;
}

.sd-season:hover {
  background: var(--bg-3);
  color: var(--txt);
}

.sd-season.is-selected,
.sd-season[aria-current="page"] {
  border-color: var(--txt);
  background: var(--txt);
  color: var(--bg);
  font-weight: 500;
}

.sd-episodes {
  display: flex;
  flex-direction: column;
}

.sd-episode {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px 30px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
}

.sd-episode:last-child {
  border-bottom: 0;
}

.sd-episode[open] {
  border-radius: var(--r-sm);
  background: var(--bg-3);
}

.sd-episode__row {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 1;
  grid-template-columns: 74px minmax(0, 1fr) 108px 52px 18px;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px 4px 10px 8px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}

.sd-episode__row::-webkit-details-marker {
  display: none;
}

.sd-episode__row::marker {
  content: "";
}

.sd-episode__row:hover {
  color: var(--txt);
}

.sd-episode__code,
.sd-episode__date,
.sd-episode__time {
  color: var(--txt-faint);
  font-size: 11.5px;
}

.sd-episode__title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sd-episode__title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sd-episode[data-next-up="true"] .sd-episode__title {
  color: var(--txt);
  font-weight: 600;
}

.sd-next-up {
  display: inline-block;
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--tally) 55%, transparent);
  border-radius: 4px;
  color: var(--tally);
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  line-height: 1.2;
  text-transform: uppercase;
  vertical-align: 1px;
  white-space: nowrap;
}

.sd-episode::details-content {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
}

.sd-episode__chevron {
  display: grid;
  place-items: center;
  color: var(--txt-faint);
  transition: transform .15s;
}

.sd-episode[open] .sd-episode__chevron {
  transform: rotate(180deg);
}

.sd-eye {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--txt-faint);
  transition: background .13s, border-color .13s, color .13s;
}

/* Hover must not borrow the watched colour: while the pointer is still on the
   button after un-watching, an identical hover style reads as "nothing happened". */
.sd-eye:hover {
  border-color: color-mix(in srgb, var(--txt-dim) 55%, transparent);
  color: var(--txt);
}

.sd-eye[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--new) 45%, transparent);
  background: color-mix(in srgb, var(--new) 16%, transparent);
  color: var(--new);
}

.sd-eye[aria-pressed="true"]:hover {
  border-color: color-mix(in srgb, var(--new) 70%, transparent);
}

.sd-eye svg {
  width: 15px;
  height: 15px;
}

.sd-eye path,
.sd-eye circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.sd-eye[aria-pressed="true"] circle {
  fill: currentColor;
}

.sd-episode__search {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--txt-faint);
  transition: background .13s, border-color .13s, color .13s;
}

.sd-episode__search:hover,
.sd-episode__search:focus-visible {
  border-color: color-mix(in srgb, var(--txt) 45%, var(--line));
  background: var(--bg-2);
  color: var(--txt);
}

.sd-episode__search svg {
  width: 15px;
  height: 15px;
}

.sd-episode__actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
}

.sd-episode__expanded {
  display: none;
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
  padding: 4px 12px 18px 8px;
}

.sd-episode[open] > .sd-episode__expanded {
  display: grid;
}

.sd-media-fallback--episode {
  align-self: start;
}

.sd-episode__copy {
  min-width: 0;
}

.sd-episode__copy h3 {
  margin: 0 0 3px;
  color: var(--txt);
  font-size: 16px;
  line-height: 1.2;
}

.sd-episode__meta {
  margin: 0 0 9px;
  color: var(--txt-faint);
  font-size: 11px;
}

.sd-episode__copy > p:not(.sd-episode__meta) {
  max-width: 62ch;
  margin: 0;
  color: var(--txt-dim);
  font-size: 13.5px;
  line-height: 1.6;
}

.sd-rating-hook {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  margin-top: 12px;
  color: var(--txt-faint);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sd-rating-star {
  width: 20px;
  height: 20px;
  padding: 1px;
  color: var(--txt-faint);
  line-height: 0;
}

.sd-rating-star svg {
  width: 18px;
  height: 18px;
}

.sd-rating-star path {
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.sd-rating-star:hover,
.sd-rating-star.is-filled {
  color: var(--star);
}

.sd-rating-star.is-filled path {
  fill: currentColor;
}

.sd-facts h2 {
  margin-bottom: 12px;
}

.sd-facts {
  padding-top: 16px;
}

.sd-facts dl {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.sd-facts dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.sd-facts dl > div:last-child {
  border-bottom: 0;
}

.sd-facts dt {
  color: var(--txt-faint);
  font-size: 12.5px;
}

.sd-facts dd {
  margin: 0;
  color: var(--txt);
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 500;
  text-align: right;
}

.sd-facts .sd-fact-big {
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.sd-follow-block {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.sd-follow {
  justify-content: center;
  width: 100%;
}

.sd-follow-status {
  min-height: 1.3em;
  margin: 8px 0 0;
  color: var(--txt-faint);
  font-family: var(--f-mono);
  font-size: 10px;
}

.sd-empty {
  margin: 0;
  padding: 32px 18px;
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
  color: var(--txt-dim);
  text-align: center;
}

.sd-episode-highlights__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sd-episode-highlight {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--bg-3);
}

.sd-episode-highlight h3 {
  overflow: hidden;
  margin: 6px 0 5px;
  font-size: 15px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sd-episode-highlight .sd-mono,
.sd-episode-highlight__empty {
  margin: 0;
  color: var(--txt-faint);
  font-size: 11px;
}

@media (max-width: 1080px) {
  .sd-showgrid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .sd-episode__row {
    grid-template-columns: 66px minmax(0, 1fr) 18px;
    gap: 10px;
  }

  .sd-episode__date,
  .sd-episode__time {
    display: none;
  }

  .sd-episode__expanded {
    grid-template-columns: minmax(0, 1fr);
  }

  .sd-media-fallback--episode {
    max-width: 280px;
  }
}

@media (max-width: 700px) {
  .sd-hero {
    min-height: 176px;
  }

  .sd-hero__inner {
    padding: 22px 22px 20px;
  }

  .sd-card {
    padding: 16px 18px;
  }
}

@media (max-width: 620px) {
  .sd-hero {
    min-height: 210px;
  }

  .sd-hero__inner {
    padding: 20px 18px 18px;
  }

  .sd-last__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .sd-episode-highlights__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sd-media-fallback--episode {
    max-width: none;
  }

  .sd-episode__expanded {
    padding-right: 8px;
    padding-left: 8px;
  }

  .sd-rating-hook {
    gap: 6px;
  }
}
