/* Podcastlijstje: plain CSS, no build step */

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --text: #1d1b19;
  --muted: #6b655e;
  --line: #e7e2db;
  --accent: #d9480f;
  --accent-soft: #fdebe2;
  --up: #2b8a3e;
  --down: #c92a2a;
  --radius: 10px;
  --wrap: 72rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161412;
    --surface: #1f1c19;
    --text: #f1ede8;
    --muted: #a39b92;
    --line: #34302b;
    --accent: #ff8a4c;
    --accent-soft: #3a2519;
    --up: #69db7c;
    --down: #ff8787;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration-color: var(--line);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

h1,
h2 {
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.25rem;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1rem;
}

main.wrap {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 40rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header and footer */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

.brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 1.25rem;
}

.site-nav a {
  text-decoration: none;
  font-weight: 600;
}

.search {
  margin-left: auto;
  flex: 1 1 14rem;
  max-width: 20rem;
}

.search input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

@media (max-width: 40rem) {
  .search {
    margin-left: 0;
    max-width: none;
    flex-basis: 100%;
  }
}

.search input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  margin-bottom: 1rem;
}

/* Charts */

.intro {
  margin-bottom: 2rem;
}

.charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1.5rem;
}

.chart,
.chart-page .chart {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.chart-page {
  max-width: 44rem;
}

.chart__header {
  margin-bottom: 0.75rem;
}

.chart__header p {
  margin: 0;
  font-size: 0.875rem;
}

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

.chart-entry {
  display: grid;
  grid-template-columns: 2rem 56px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
}

.chart-entry:first-child {
  border-top: 0;
}

.chart-entry__rank {
  font-weight: 800;
  font-size: 1.125rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.chart-entry__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chart-entry__text .muted {
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-entry__name {
  font-weight: 600;
  text-decoration: none;
}

.move {
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  min-width: 2.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.move--up {
  color: var(--up);
}

.move--down {
  color: var(--down);
}

.move--same {
  color: var(--muted);
}

.move--new {
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
}

.more {
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
}

.artwork {
  display: block;
  border-radius: 6px;
  background: var(--line);
  object-fit: cover;
}

.artwork--large {
  width: 200px;
  height: 200px;
  border-radius: var(--radius);
}

/* Podcast lists */

.crumbs {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.feed-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 0.75rem;
}

.feed-item {
  display: flex;
  gap: 0.875rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  min-width: 0;
}

.feed-item > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.feed-item .muted {
  font-size: 0.875rem;
}

.feed-item__title {
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.pagination a {
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
}

/* Podcast detail */

.feed__header {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.feed__header > div {
  flex: 1 1 18rem;
}

.feed__people {
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.badge {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  text-decoration: none;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

.button {
  display: inline-block;
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}

.button:hover {
  background: var(--accent);
  color: #fff;
}

.button--quiet {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.feed__description {
  max-width: 44rem;
  font-size: 1.0625rem;
  overflow-wrap: anywhere;
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.5rem;
  max-width: 44rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
}
