/* Messages site - public sermon archive (ADR-0006).
 *
 * Light-default with a dark toggle (the operator app is the opposite,
 * dark-first). Brand palette is a tasteful placeholder; the exact colors
 * are pulled from unityofwalnutcreek.org as an open input (#148). Keep the
 * variable names; swap the values when the real palette lands.
 */

:root {
  --brand: #2f6f4f;          /* PLACEHOLDER UWC green - replace from brand */
  --brand-contrast: #ffffff;
  --bg: #ffffff;
  --surface: #f6f7f6;
  --text: #1c2421;
  --muted: #5c6b63;
  --border: #e2e6e3;
  --link: #1f6a46;
  --radius: 10px;
  --maxw: 64rem;
}

[data-theme="dark"] {
  --brand: #4f9e76;
  --brand-contrast: #0c130f;
  --bg: #10140f;
  --surface: #1a201b;
  --text: #e7ece8;
  --muted: #9bab9f;
  --border: #2a322b;
  --link: #7fc6a0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--link); }

.site-header {
  background: var(--brand);
  color: var(--brand-contrast);
}
.site-header__inner,
.site-main,
.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.25rem;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-header a { color: var(--brand-contrast); text-decoration: none; }
.brand { font-weight: 700; font-size: 1.15rem; }

.theme-toggle {
  background: transparent;
  border: 1px solid var(--brand-contrast);
  color: var(--brand-contrast);
  border-radius: var(--radius);
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  font: inherit;
}

.search {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.year-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.year-nav button {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}
.year-nav button[aria-pressed="true"] {
  background: var(--brand);
  color: var(--brand-contrast);
  border-color: var(--brand);
}

.episode-list { list-style: none; padding: 0; margin: 0; }
.episode-list li { border-bottom: 1px solid var(--border); }
.episode-list a {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.9rem;
  align-items: baseline;
  padding: 0.8rem 0.2rem;
  text-decoration: none;
  color: var(--text);
}
.episode-list a:hover { background: var(--surface); }
.episode-list .date { color: var(--muted); font-variant-numeric: tabular-nums; }
.episode-list .title { font-weight: 600; color: var(--link); }
.episode-list .speaker { color: var(--muted); }

.year-heading {
  margin: 1.4rem 0 0.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.pagination {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.summary { background: var(--surface); padding: 1rem; border-radius: var(--radius); }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  color: var(--muted);
}
.site-footer a { color: var(--link); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.muted { color: var(--muted); }
.hidden { display: none !important; }
