/* The public library pages (/podcasts...). A file rather than inline styles:
   the CSP allows styles from 'self' only. Builds on styles.css. */

.pub-top {
  max-width: 920px; margin: 0 auto; padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.pub-top .brand { text-decoration: none; color: var(--text); }
.pub-top-link { color: var(--text-dim); text-decoration: none; font-weight: 600; }
.pub-top-link:hover { color: var(--accent); }

.pub { max-width: 920px; margin: 0 auto; padding: 8px 20px 24px; }
.pub h1 { font-family: var(--serif); font-size: clamp(26px, 5vw, 38px); line-height: 1.15; margin: 8px 0 10px; }
.pub h2 { font-family: var(--serif); font-size: 20px; margin: 32px 0 12px; }
.pub .lede { color: var(--text); font-size: 17px; line-height: 1.6; max-width: 680px; }
.pub .meta { color: var(--text-dim); font-size: 14px; }
.pub .crumb { margin: 0; font-size: 14px; }
.pub a { color: var(--accent); }
.pub audio { width: 100%; max-width: 680px; margin: 16px 0 8px; }

/* Library grid */
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.pub-card {
  display: flex; gap: 14px; padding: 12px; text-decoration: none;
  border: 1px solid var(--line-soft); background: var(--ink-2); border-radius: var(--radius);
}
.pub-card:hover { border-color: var(--accent-dim); }
.pub-card img, .pub-card-tile {
  width: 84px; height: 84px; flex: none; object-fit: cover; border-radius: 8px; background: var(--ink-3);
}
.pub-card-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pub-card-text strong { color: var(--text); line-height: 1.3; }
.pub-card-text span { color: var(--text-dim); font-size: 13px; line-height: 1.45; }
.pub-card-text small { color: var(--text-faint); font-size: 12px; }

/* Show page */
.pub-show { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.pub-cover { width: 200px; flex: none; }
.pub-cover img { width: 200px; height: 200px; object-fit: cover; border-radius: var(--radius); display: block; }
.pub-show > div:last-child { flex: 1; min-width: 260px; }
.credit { color: var(--text-faint); font-size: 12px; margin: 6px 0 0; }
.credit a { color: var(--text-dim); }

.pub-episodes { list-style: none; padding: 0; margin: 0; max-width: 720px; }
.pub-episodes li { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.pub-episodes li a { text-decoration: none; }
.pub-episodes li strong { color: var(--text); font-size: 17px; }
.pub-episodes li a:hover strong { color: var(--accent); }
.pub-episodes .meta { display: block; margin-top: 4px; }
.pub-episodes p { color: var(--text-dim); margin: 6px 0 0; font-size: 14px; line-height: 1.5; }

/* Episode page */
.pub-transcript { max-width: 680px; }
.pub-transcript p { line-height: 1.7; margin: 0 0 14px; color: var(--text); }
.pub-transcript .who { font-weight: 700; color: var(--accent); margin-right: 6px; }
.pub-sources { max-width: 680px; margin: 8px 0 24px; }
.pub-sources summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 8px 0; }
.pub ul { max-width: 680px; padding-left: 20px; }
.pub ul li { margin: 4px 0; line-height: 1.5; }

.pub-foot { max-width: 920px; margin: 0 auto; padding: 0 20px 48px; }
.pub-foot .cta {
  border: 1px solid var(--line); background: var(--ink-2);
  border-radius: var(--radius); padding: 20px; margin: 32px 0 16px; max-width: 680px;
}
.pub-foot .cta h2 { font-family: var(--serif); font-size: 18px; margin: 0 0 6px; }
.pub-foot .cta p { color: var(--text-dim); font-size: 14px; margin: 0 0 14px; }
.pub-foot .small { color: var(--text-faint); font-size: 12px; line-height: 1.6; max-width: 680px; }
.pub-foot .small a { color: var(--text-dim); }

@media (max-width: 520px) {
  .pub-cover, .pub-cover img { width: 140px; height: auto; }
  .pub-cover img { height: 140px; }
}

/* The invitation page, /r/<code>. */
.invite { max-width: 32rem; margin: 3rem auto; padding: 0 16px; text-align: center; }
.invite-code { font-size: 2rem; letter-spacing: .3rem; font-weight: 700; }
.invite-cta { display: inline-block; padding: .8rem 1.4rem; border-radius: 999px; background: #5b3df5; color: #fff; text-decoration: none; }

/* Under the 30-second preview player on an episode page. */
.pub-preview { font-size: .9rem; margin-top: .25rem; }
