/* Rutherford church of Christ — podcasts library
   Dark, dense, readable. Gold used as a rule, not decoration. */

:root {
  --bg: #12100e;
  --bg-raised: #1b1814;
  --bg-hover: #242017;
  --ink: #f0eadf;
  --muted: #b3a894;
  --faint: #8a7f6e;
  --gold: #c9a35a;
  --gold-hover: #e0c07a;
  --line: #3a342a;
  --line-strong: #5a4e3a;
  --draft: #c48a5a;
  --ok: #8aaa6a;
  --focus: #e8d49a;
  --serif: Palatino, "Palatino Linotype", "Iowan Old Style", "Book Antiqua", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 52rem;
  --max-wide: 64rem;
}

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

html {
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover { color: var(--gold-hover); }
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--gold);
  color: var(--bg);
  padding: 0.4rem 0.7rem;
  z-index: 10;
}
.skip:focus { top: 0.75rem; }

.site-header, .site-footer, main {
  width: min(var(--max-wide), calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.brand {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.brand strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
}
.brand-org {
  color: inherit;
  text-decoration: none;
}
.brand-org:hover { color: var(--gold-hover); text-decoration: underline; }
.brand a { color: inherit; text-decoration: none; }
.brand a:hover { color: var(--gold-hover); }

.brand:hover { color: var(--gold-hover); }

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1rem;
  font-size: 0.95rem;
}
nav a:hover { color: var(--gold); }
nav a[aria-current="page"] { color: var(--ink); }

main { flex: 1; padding: 1.5rem 0 3rem; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1rem 0 2rem;
  color: var(--faint);
  font-size: 0.88rem;
}
.site-footer p { margin: 0.3rem 0; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
h1 { font-size: 1.85rem; margin: 0 0 0.6rem; }
h2 { font-size: 1.2rem; margin: 1.75rem 0 0.6rem; }
h3 { font-size: 1.05rem; margin: 1.25rem 0 0.4rem; }

.lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: var(--max);
  margin: 0 0 1.25rem;
}

.crumb {
  font-size: 0.85rem;
  color: var(--faint);
  margin: 0 0 1rem;
}
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--gold); }
.crumb span { margin: 0 0.35rem; color: var(--line-strong); }

.note {
  border-left: 3px solid var(--gold);
  padding: 0.55rem 0.85rem;
  background: var(--bg-raised);
  color: var(--muted);
  margin: 0 0 1.25rem;
  max-width: var(--max);
  font-size: 0.95rem;
}
.note strong { color: var(--ink); font-weight: 600; }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  color: var(--faint);
  padding: 0.1rem 0.4rem;
  vertical-align: middle;
  white-space: nowrap;
}
.badge.draft { color: var(--draft); border-color: var(--draft); }
.badge.feed { color: var(--ok); border-color: var(--ok); }
.badge.missing { color: var(--draft); border-color: var(--draft); }

/* Hub */
.show-card {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1.25rem 1.5rem;
  padding: 1.1rem 0 0.25rem;
  max-width: var(--max);
  align-items: start;
}
.show-card img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: #000;
}
.show-card h2 { margin-top: 0; }
.show-card p { margin: 0.4rem 0; color: var(--muted); }
.actions { margin: 0.8rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; }

/* Show page */
.show-hero {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1.25rem 1.75rem;
  align-items: start;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.show-hero img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}
.meta { color: var(--muted); font-size: 0.95rem; margin: 0.35rem 0 0.7rem; }
.rss {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  word-break: break-all;
}

/* Episode list */
.ep-section { margin-top: 1.75rem; }
.ep-section h2 {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35rem;
  color: var(--gold);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ep-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.ep-list li {
  display: grid;
  grid-template-columns: 3.2rem 1fr auto;
  gap: 0.35rem 0.85rem;
  padding: 0.45rem 0.35rem;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.ep-list li:hover { background: var(--bg-hover); }
.ep-list .code {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--faint);
}
.ep-list .title {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.ep-list a.title:hover { color: var(--gold); }
.ep-list .row-meta {
  grid-column: 2 / 3;
  font-size: 0.82rem;
  color: var(--faint);
  margin: 0;
}
.ep-list .flags {
  font-size: 0.78rem;
  color: var(--faint);
  text-align: right;
  white-space: nowrap;
}

/* Episode page */
.ep-head h1 { margin-bottom: 0.25rem; }
.scripture-table {
  width: 100%;
  max-width: var(--max);
  border-collapse: collapse;
  font-size: 0.95rem;
}
.scripture-table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-strong);
  padding: 0.35rem 0.6rem 0.35rem 0;
}
.scripture-table td {
  padding: 0.35rem 0.6rem 0.35rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.scripture-table .ts {
  font-family: var(--mono);
  font-size: 0.88rem;
  white-space: nowrap;
}
.scripture-table button.ts {
  background: none;
  border: 0;
  padding: 0;
  color: var(--gold);
  cursor: pointer;
  font: inherit;
  font-family: var(--mono);
  font-size: 0.88rem;
}
.scripture-table button.ts:hover { color: var(--gold-hover); text-decoration: underline; }
.scripture-table button.ts:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.scripture-embeds {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--max);
}
.scripture-embed {
  margin: 0 0 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
}
.scripture-embed:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.scripture-embed h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.85rem;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}
.scripture-embed .ts {
  font-family: var(--mono);
  font-size: 0.88rem;
  white-space: nowrap;
  color: var(--faint);
}
.scripture-embed button.ts {
  background: none;
  border: 0;
  padding: 0;
  color: var(--gold);
  cursor: pointer;
  font: inherit;
  font-family: var(--mono);
  font-size: 0.88rem;
}
.scripture-embed button.ts:hover { color: var(--gold-hover); text-decoration: underline; }
.scripture-embed button.ts:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Bible Gateway RefTagger (BGLinks) hover popup — black verse text on solid light bg.
   Site body uses light ink; without this, tooltip inherits washed-out text on white. */
.bg_popup,
.bg_popup-content,
.bg_popup-content-bible,
.bg_popup-content p,
.bg_popup-content-bible p,
.bg_popup-content-related p {
  color: #000 !important;
}
.bg_popup-content {
  background-color: #fff !important;
}
.bg_popup-header_title {
  color: #000 !important;
}
.bg_popup-content a,
.bg_popup-content a:visited {
  color: #651300 !important;
}

audio {
  width: 100%;
  max-width: var(--max);
  margin: 0.75rem 0 1rem;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.pager a { text-decoration: none; }
.pager .dir { display: block; color: var(--faint); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }

.subscribe dt {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 0.85rem;
}
.subscribe dd { margin: 0.2rem 0 0; color: var(--muted); }
.subscribe code {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink);
}

@media (max-width: 640px) {
  html { font-size: 16px; }
  .show-card, .show-hero {
    grid-template-columns: 6.5rem 1fr;
    gap: 0.85rem 1rem;
  }
  .ep-list li {
    grid-template-columns: 2.7rem 1fr;
  }
  .ep-list .flags {
    grid-column: 2;
    text-align: left;
  }
  h1 { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
