:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17202a;
  background: #f7f2e9;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }

.page-shell { max-width: 1180px; margin: 0 auto; padding: 3rem 1.25rem 5rem; }
.hero { max-width: 750px; margin-bottom: 2.5rem; }
.eyebrow { color: #a1471d; font-weight: 750; letter-spacing: .08em; margin: 0 0 .65rem; text-transform: uppercase; font-size: .75rem; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.6rem, 7vw, 5rem); letter-spacing: -.045em; line-height: .94; margin: 0; }
.intro { color: #4e5860; font-size: 1.15rem; line-height: 1.55; margin: 1.25rem 0 0; }

.filters { background: #fffdf9; border: 1px solid #e5dac9; border-radius: 1rem; display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 1.15rem; }
label { color: #5a4b3e; display: grid; font-size: .78rem; font-weight: 700; gap: .35rem; }
fieldset { border: 0; margin: 0; min-width: 0; padding: 0; }
legend { color: #5a4b3e; font-size: .78rem; font-weight: 700; margin-bottom: .35rem; padding: 0; }
input:not([type="checkbox"]):not([type="range"]), select { appearance: none; background: #fff; border: 1px solid #cdbfac; border-radius: .5rem; color: #17202a; font: inherit; font-size: .95rem; font-weight: 500; min-height: 2.65rem; padding: .55rem .7rem; width: 100%; }
input:not([type="checkbox"]):not([type="range"]):focus, select:focus, input[type="checkbox"]:focus-visible { border-color: #a1471d; box-shadow: 0 0 0 3px #f8d7c7; outline: none; }
.checkbox-filter { align-items: center; align-self: end; display: flex; font-size: .82rem; gap: .55rem; min-height: 2.65rem; }
.checkbox-filter input { accent-color: #a1471d; height: 1.05rem; margin: 0; width: 1.05rem; }
.year-range { min-width: 160px; }
.year-range-values { align-items: baseline; color: #17202a; display: flex; font-size: .92rem; font-weight: 650; gap: .3rem; justify-content: space-between; }
.year-range-inputs { height: 1.7rem; margin-top: .15rem; position: relative; }
.year-range-inputs::before { background: linear-gradient(to right, #cdbfac 0 var(--range-from), #a1471d var(--range-from) var(--range-to), #cdbfac var(--range-to) 100%); border-radius: 99px; content: ""; height: .3rem; left: 0; position: absolute; right: 0; top: .65rem; }
.year-range input[type="range"] { appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; height: 1.7rem; left: 0; margin: 0; padding: 0; pointer-events: none; position: absolute; top: 0; width: 100%; }
.year-range input[type="range"]::-webkit-slider-runnable-track { background: transparent; height: .3rem; }
.year-range input[type="range"]::-moz-range-track { background: transparent; height: .3rem; }
.year-range input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; background: #fffdf9; border: 2px solid #a1471d; border-radius: 50%; box-shadow: 0 1px 2px #6d503633; height: 1rem; margin-top: -.35rem; pointer-events: auto; width: 1rem; }
.year-range input[type="range"]::-moz-range-thumb { background: #fffdf9; border: 2px solid #a1471d; border-radius: 50%; box-shadow: 0 1px 2px #6d503633; height: 1rem; pointer-events: auto; width: 1rem; }
.year-range input[type="range"]:first-child { z-index: 2; }
.year-range input[type="range"]:last-child { z-index: 1; }
.search-field { grid-column: span 2; }

.results { margin-top: 2rem; }
.results-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 1rem; }
#result-count { color: #5a4b3e; font-size: .94rem; margin: 0; }
.reset { background: none; border: 0; color: #9b3c18; cursor: pointer; font: inherit; font-weight: 700; text-decoration: underline; }
.episode-list { display: block; }
.year-separator { align-items: center; color: #a1471d; display: flex; font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; height: 54px; margin: 0; }
.episode-card { background: #fffdf9; border: 1px solid #e5dac9; border-radius: .8rem; display: grid; grid-template-columns: 164px 1fr; height: 164px; margin-bottom: 1rem; overflow: hidden; }
.episode-image-link { background: #203d49; display: block; position: relative; }
.episode-image-link img { height: 100%; object-fit: cover; position: absolute; width: 100%; }
.image-fallback { align-items: center; color: #f7f2e9; display: flex; font-family: Georgia, serif; font-size: 2rem; height: 100%; justify-content: center; }
.episode-content { display: flex; flex-direction: column; padding: 1rem 1.15rem; }
.episode-meta { color: #826e5e; display: flex; font-size: .8rem; font-weight: 700; gap: .6rem; }
.episode-meta span + span::before { content: "·"; margin-right: .6rem; }
.returning-episode .episode-meta span + span::before { content: none; margin-right: 0; }
h2 { font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; line-height: 1.08; margin: .4rem 0 .45rem; }
h2 a { text-decoration: none; }
h2 a:hover { text-decoration: underline; text-decoration-color: #b24c24; text-underline-offset: .13em; }
.summary { -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #4e5860; display: -webkit-box; line-height: 1.45; margin: 0; overflow: hidden; }
.listen-link { color: #9b3c18; font-size: .88rem; font-weight: 750; margin-top: auto; padding-top: .8rem; text-decoration: none; }
.listen-link:hover { text-decoration: underline; }
.empty-state { background: #fffdf9; border: 1px dashed #cdbfac; border-radius: .8rem; color: #5a4b3e; padding: 2.5rem; text-align: center; }

@media (max-width: 850px) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field { grid-column: span 2; }
}
@media (max-width: 520px) {
  .page-shell { padding-top: 2rem; }
  .filters { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .episode-card { grid-template-columns: 112px minmax(0, 1fr); height: 170px; }
  .episode-content { padding: .8rem .85rem .9rem; }
  .episode-meta { flex-wrap: wrap; gap: .3rem; }
  .summary { -webkit-line-clamp: 2; }
}
