@font-face {
  font-family: Oswald;
  src: url("fonts/Oswald.ttf") format("truetype");
  font-display: swap;
  font-weight: 200 700;
}

@font-face {
  font-family: "PT Serif";
  src: url("fonts/PTSerif-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "PT Serif";
  src: url("fonts/PTSerif-Italic.ttf") format("truetype");
  font-display: swap;
  font-style: italic;
}

:root {
  color-scheme: light;

  --paper: #f4efe1;
  --paper-dark: #e3dcc6;
  --ink: #1d1b16;
  --ink-soft: #5a5446;
  --red: #c4161c;
  --yellow: #ffe14d;
  --photo: #8b8574;
  --channel: #1d1b16;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
}

body {
  margin: 0;
  font:
    15px/1.4 "PT Serif",
    Georgia,
    serif;
}

#tv-guide {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 0.4rem;
}

.masthead h1 {
  margin: 0;
  font:
    500 2.4rem/1 Oswald,
    "Arial Narrow",
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.brand {
  color: var(--red);
}

.issue,
.watch {
  margin: 0;
  font:
    400 0.95rem Oswald,
    "Arial Narrow",
    sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.weeks,
.days,
.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.6rem 0 0;
}

.weeks button,
.days button,
.jump button {
  flex: none;
  border: 0;
  background: var(--paper-dark);
  padding: 0.2rem 0.7rem;
  font:
    400 0.9rem Oswald,
    "Arial Narrow",
    sans-serif;
  text-transform: uppercase;
}

.weeks button[aria-pressed="true"],
.days button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.status {
  font-family: Oswald, "Arial Narrow", sans-serif;
  color: var(--red);
}

.status:empty {
  display: none;
}

.cover {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1rem;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 1rem;
}

.lead {
  position: relative;
  margin: 0;
}

.cover-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--photo);
}

.lead figcaption {
  margin-top: 0.3rem;
}

.lead-name {
  display: block;
  font-style: italic;
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--red);
}

.lead-about {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.85rem;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.cover h2 {
  margin: 0 0 0.4rem;
  font:
    500 2rem/1.05 Oswald,
    "Arial Narrow",
    sans-serif;
  text-transform: uppercase;
}

.kicker,
.strip {
  display: block;
  background: var(--yellow);
  font:
    500 0.85rem Oswald,
    "Arial Narrow",
    sans-serif;
  letter-spacing: 0.08em;
  padding: 0.1rem 0.4rem;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.headline {
  margin-top: 1rem;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 1rem;
}

.strip {
  margin: 0 0 0.6rem;
}

.story-box {
  display: flex;
  gap: 1rem;
}

.story-photo {
  flex: none;
  width: 14rem;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 20%;
  background: var(--photo);
}

.story-body {
  flex: 1;
  min-width: 0;
}

.story-title {
  margin: 0.4rem 0 0.2rem;
  font:
    500 2.6rem/0.95 Oswald,
    "Arial Narrow",
    sans-serif;
  text-transform: uppercase;
}

.story-text {
  columns: 2 16rem;
  column-gap: 1.4rem;
  column-rule: 1px solid var(--paper-dark);
  text-align: justify;
  hyphens: auto;
}

.badge {
  display: inline-flex;
  flex-direction: column;
  margin: 0;
  background: var(--red);
  color: #fff;
  padding: 0.15rem 0.4rem;
  font-family: Oswald, "Arial Narrow", sans-serif;
  line-height: 1.05;
  text-align: center;
}

.badge-day {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-time {
  font-size: 1.2rem;
  font-weight: 500;
}

.badge-channel {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.details,
.cast,
.summary {
  margin: 0.2rem 0;
}

.meta,
.cast {
  font-style: italic;
  color: var(--ink-soft);
}

.source {
  font-size: 0.85rem;
}

.age {
  display: inline-block;
  min-width: 1.35em;
  margin-left: 0.3em;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font:
    500 0.7rem/1.2 Oswald,
    "Arial Narrow",
    sans-serif;
  text-align: center;
  vertical-align: 0.1em;
}

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.column {
  min-width: 0;
  scroll-margin-top: 0.5rem;
}

.channel {
  margin: 0 0 0.4rem;
  background: var(--channel);
  color: #fff;
  padding: 0.15rem 0.5rem;
  font:
    500 1rem Oswald,
    "Arial Narrow",
    sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.row {
  margin: 0 0 0.3rem;
  font-size: 0.85rem;
}

.time {
  font:
    500 0.95rem Oswald,
    "Arial Narrow",
    sans-serif;
}

.kind-film .title {
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
}

.dot {
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  margin-right: 0.3em;
  border-radius: 50%;
  background: var(--red);
}

.on-air .title {
  font-weight: 700;
}

.empty {
  margin: 0;
  font-style: italic;
  color: var(--ink-soft);
}

.jump button {
  background: var(--channel);
  color: #fff;
}

.story-text .summary {
  margin-top: 0.4rem;
}

.story-text .summary::first-letter {
  float: left;
  margin: 0.3rem 0.35rem 0 0;
  font:
    500 3.4rem/0.8 Oswald,
    "Arial Narrow",
    sans-serif;
  color: var(--red);
}

.pick {
  display: flow-root;
  margin: 0.4rem -0.35rem 0.6rem;
  border: 1.5px solid var(--ink);
  background: var(--yellow);
  padding: 0.45rem;
}

.pick-label {
  display: table;
  margin-bottom: 0.35rem;
  background: var(--ink);
  color: var(--yellow);
  padding: 0 0.35rem;
  font:
    500 0.7rem Oswald,
    "Arial Narrow",
    sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pick-photo {
  float: left;
  width: 4.5rem;
  aspect-ratio: 4 / 5;
  margin: 0 0.5rem 0.3rem 0;
  border: 1.5px solid var(--ink);
  object-fit: cover;
  object-position: 50% 20%;
  background: var(--photo);
}

.pick .time,
.pick .title {
  font-size: 1.1rem;
}

.pick .meta,
.pick .cast {
  color: var(--ink);
}

.pick .summary {
  display: -webkit-box;
  overflow: hidden;
  clear: left;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
}

.channel-1 {
  --channel: #c4161c;
}

.channel-2 {
  --channel: #1565a8;
}

.channel-3 {
  --channel: #1f7a3a;
}

.channel-4 {
  --channel: #8a3e9b;
}

.channel-5 {
  --channel: #c46a00;
}

.channel-6 {
  --channel: #00727a;
}

.channel-7 {
  --channel: #8a2b2b;
}

.channel-8 {
  --channel: #3d4f8f;
}

.channel-9 {
  --channel: #5b5b5b;
}

@media (width <= 40rem) {
  .masthead h1 {
    font-size: 1.8rem;
  }

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

  .lead {
    max-width: 14rem;
  }

  .story-box {
    flex-direction: column;
  }

  .story-photo {
    width: min(100%, 14rem);
  }

  .story-title {
    font-size: 2rem;
  }
}
