:root {
  --ink: #292519;
  --muted: #6b6250;
  --paper: #faf8f1;
  --surface: #ffffff;
  --line: #ded6c2;
  --pine: #574a2c;
  --pine-dark: #30291b;
  --clay: #79602d;
  --gold: #d3bd7f;
  --sky: #eee6d1;
  --rose: #f0ded6;
  --shadow: 0 18px 50px rgba(28, 39, 35, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 116px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 52px);
  background: rgba(250, 248, 241, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
  text-decoration: none;
}

.brand-mark {
  flex: 0 0 64px;
  width: 64px;
  height: 76px;
  background: url("./assets/upper-room-sequim-logo.png") 50% 31% / 280px 280px no-repeat;
  border-radius: 32px 32px 4px 4px;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 500;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.875rem;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #49412f;
  font-size: 0.94rem;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--pine-dark);
  background: var(--sky);
  outline: none;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
  padding: clamp(24px, 4vw, 60px);
  overflow: hidden;
  background: #f0ead9;
  border-bottom: 1px solid var(--line);
}

.hero-logo {
  display: block;
  width: 100%;
  max-width: 540px;
  height: auto;
  justify-self: center;
  border-radius: 6px;
  box-shadow: 0 14px 38px rgba(48, 41, 27, 0.12);
}

.hero-copy {
  position: relative;
  width: min(760px, 100%);
  color: var(--ink);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--clay);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  max-width: 720px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.28rem);
  line-height: 1.65;
}

.hero-actions,
.card-actions,
.discussion-actions,
.resource-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.card-actions button,
.discussion-actions button,
.merch-body button,
.resource-chip,
.topic-chip {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 17px;
  font-weight: 800;
  text-decoration: none;
}

.button:hover,
.card-actions button:hover,
.discussion-actions button:hover,
.merch-body button:hover,
.resource-chip:hover,
.topic-chip:hover {
  transform: translateY(-1px);
}

.primary {
  color: #fff;
  background: var(--clay);
}

.secondary {
  color: var(--pine-dark);
  border-color: #9b8963;
  background: transparent;
}

.overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.overview article {
  min-height: 126px;
  padding: 24px clamp(20px, 4vw, 52px);
  border-right: 1px solid var(--line);
}

.overview article:last-child {
  border-right: 0;
}

.metric {
  display: block;
  color: var(--pine);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.6rem;
  line-height: 1;
}

.overview p {
  margin: 8px 0 0;
  color: var(--muted);
}

.shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(48px, 8vw, 88px) 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: 26px;
  align-items: end;
  margin-bottom: 30px;
}

.section-heading.compact {
  display: block;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.65rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.library-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.filters {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(28, 39, 35, 0.06);
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: #58503f;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.field input,
.field select,
.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid #d7cdb6;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.field input,
.field select {
  min-height: 44px;
  padding: 0 12px;
}

.field input:focus,
.field select:focus,
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--pine);
  outline: 3px solid rgba(121, 96, 45, 0.2);
}

.quick-topic {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-chip {
  padding: 8px 12px;
  color: var(--pine-dark);
  background: #f1ecdd;
}

.topic-chip.active {
  color: #fff;
  background: var(--pine);
}

.teaching-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.teaching-card,
.discussion-panel,
.prompt-panel,
.song-intro,
.song-card,
.resource-card,
.merch-note,
.merch-card,
.roadmap-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(28, 39, 35, 0.06);
}

.teaching-card {
  display: grid;
  min-height: 288px;
  overflow: hidden;
}

.card-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 16px;
  color: #fff;
  background: var(--pine);
}

.format-pill {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--ink);
  background: var(--gold);
  font-size: 0.77rem;
  font-weight: 900;
}

.teaching-card-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.teaching-card h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.24;
}

.teaching-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.text-link {
  display: inline-flex;
  margin: 2px 0 14px;
  color: var(--pine-dark);
  font-weight: 900;
}

.tag {
  padding: 5px 8px;
  border-radius: 999px;
  color: #58503f;
  background: #f1ecdd;
  font-size: 0.76rem;
  font-weight: 800;
}

.card-actions {
  margin-top: auto;
}

.card-actions button,
.discussion-actions button {
  padding: 10px 13px;
  color: #fff;
  background: var(--pine);
}

.detail-band {
  background: linear-gradient(180deg, #f4f0e4 0%, #ffffff 100%);
  border-block: 1px solid var(--line);
}

.selected-teaching {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(320px, 1.05fr);
  gap: 30px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(44px, 7vw, 76px) 0;
}

.media-box {
  min-height: 360px;
  border-radius: 8px;
  overflow: hidden;
  background: #292519;
  box-shadow: var(--shadow);
}

.media-box iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}

.media-placeholder {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 32px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(87, 74, 44, 0.96), rgba(121, 96, 45, 0.78)),
    url("https://storage1.snappages.site/QGXD9M/assets/images/7271935_1080x1080_500.png") center / cover;
}

.media-placeholder strong {
  display: block;
  max-width: 400px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.05;
}

.teaching-detail h2 {
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 700;
}

.summary {
  color: #49412f;
  font-size: 1.05rem;
  line-height: 1.7;
}

.note-block {
  margin-top: 22px;
  padding: 18px;
  border-left: 5px solid var(--gold);
  background: #fff7e8;
  border-radius: 6px;
}

.note-block h3 {
  margin-bottom: 8px;
}

.linked-songs {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.linked-songs h3 {
  margin: 0;
}

.linked-song-list {
  display: grid;
  gap: 10px;
}

.linked-song {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid #ded6c2;
  border-radius: 7px;
  background: #fbf8ef;
}

.linked-song strong {
  color: var(--pine-dark);
}

.linked-song small {
  color: var(--muted);
  font-weight: 700;
}

.song-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.music-scopes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.music-scope {
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--pine-dark);
  font-weight: 700;
  cursor: pointer;
}

.music-scope[aria-pressed="true"] {
  background: var(--pine);
  border-color: var(--pine);
  color: #fff;
}

.music-scope:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 3px;
}

.song-results {
  min-width: 0;
}

.music-artist {
  margin: 0 0 12px;
}

.music-artist img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.music-artist figcaption {
  margin-top: 12px;
  color: var(--pine-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.4;
}

@media (max-width: 960px) {
  .music-artist {
    display: flex;
    align-items: center;
    gap: 18px;
  }

  .music-artist img {
    width: 112px;
    flex: 0 0 112px;
  }

  .music-artist figcaption {
    margin: 0;
  }
}

.music-playlist {
  margin-bottom: 24px;
  padding: clamp(14px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.music-playlist h3 {
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  line-height: 1.2;
}

.music-playlist-byline,
.music-playlist-help {
  color: var(--muted);
  line-height: 1.5;
}

.music-playlist iframe {
  display: block;
  width: 100%;
  height: 352px;
  border: 0;
  border-radius: 12px;
  background: var(--paper);
  margin: 18px 0;
}

.music-playlist-help {
  margin-bottom: 0;
  font-size: 0.875rem;
}

.music-shortcut {
  justify-self: start;
  border: 0;
  cursor: pointer;
}

#musicCount {
  color: var(--muted);
  line-height: 1.5;
}

.music-sample-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.song-intro {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.song-intro h3 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  line-height: 1.1;
}

.song-intro p {
  color: var(--muted);
  line-height: 1.6;
}

.song-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.song-card {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 14px;
  padding: 20px;
}

.song-artwork {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.song-card audio {
  width: 100%;
  min-width: 0;
}

.song-grid + #musicPlaylists:not(:empty) {
  margin-top: 24px;
}

.song-card h3 {
  margin-bottom: 0;
  font-size: 1.24rem;
}

.song-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.song-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.song-links a,
.song-links span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--pine-dark);
  background: #f1ecdd;
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
}

.song-links span {
  color: #756d5b;
  background: #f2efe7;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 24px;
  align-items: start;
}

.discussion-panel,
.prompt-panel {
  padding: 22px;
}

.thread-list {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.thread {
  padding: 16px;
  border: 1px solid #ded6c2;
  border-radius: 7px;
  background: #fdfbf5;
}

.thread strong {
  display: block;
  margin-bottom: 6px;
}

.thread p {
  margin-bottom: 10px;
  color: #58503f;
  line-height: 1.55;
}

.thread small {
  color: var(--muted);
  font-weight: 700;
}

.comment-form {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.comment-form .form-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
}

.comment-form input,
.comment-form textarea {
  padding: 12px;
}

.comment-form textarea {
  min-height: 118px;
  resize: vertical;
}

.prompt-panel h3 {
  margin-bottom: 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
}

.prompt-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prompt-list li {
  padding: 14px;
  border-radius: 7px;
  background: #f4efe1;
  line-height: 1.48;
}

.resource-band {
  background: #eee8d8;
  border-block: 1px solid var(--line);
}

.resource-shell {
  padding-block: clamp(44px, 7vw, 74px);
}

.resource-tools {
  margin-bottom: 18px;
}

.resource-chip {
  padding: 8px 12px;
  color: var(--pine-dark);
  background: #fdfbf5;
}

.resource-chip.active {
  color: #fff;
  background: var(--pine);
}

.resource-grid,
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.resource-card,
.roadmap-grid article {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.resource-card a {
  color: var(--pine-dark);
  font-weight: 900;
}

.resource-card small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.resource-card p,
.roadmap-grid p {
  color: var(--muted);
  line-height: 1.55;
}

.merch-section {
  padding-top: clamp(48px, 8vw, 88px);
}

.merch-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.merch-note {
  display: grid;
  gap: 12px;
  padding: 22px;
  background: #fff;
}

.merch-note h3 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  line-height: 1.1;
}

.merch-note p {
  color: var(--muted);
  line-height: 1.6;
}

.merch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.merch-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
}

.merch-art {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: #fff;
  background:
    radial-gradient(circle at 30% 20%, rgba(214, 168, 66, 0.35), transparent 34%),
    linear-gradient(145deg, var(--pine), #514630);
}

.merch-art span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 112px;
  border-radius: 8px 8px 20px 20px;
  color: var(--pine-dark);
  background: #f4f0e9;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.merch-body {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
}

.merch-body h3 {
  margin-bottom: 0;
  font-size: 1.18rem;
}

.merch-body p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.merch-body button {
  justify-self: start;
  padding: 10px 13px;
  color: var(--pine-dark);
  border-color: #d7cdb6;
  background: #fbf8ef;
}

.roadmap-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.roadmap-grid span {
  color: var(--clay);
  font-weight: 900;
}

.roadmap-grid h3 {
  margin-bottom: 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(18px, 4vw, 52px);
  color: #fff;
  background: var(--pine-dark);
}

.footer a {
  color: #f3c15d;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 30px;
  border: 1px dashed #c5b995;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-logo {
    max-width: 400px;
  }

  .hero-copy {
    justify-self: center;
  }

  section[id] {
    scroll-margin-top: 190px;
  }

  .topbar,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading,
  .library-layout,
  .selected-teaching,
  .song-layout,
  .merch-layout,
  .two-column {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

  .teaching-list,
  .song-grid,
  .merch-grid,
  .resource-grid,
  .roadmap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview {
    grid-template-columns: 1fr;
  }

  .overview article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 30px 18px;
  }

  .nav {
    justify-content: flex-start;
  }

  .brand {
    min-width: 0;
  }

  .teaching-list,
  .song-grid,
  .merch-grid,
  .resource-grid,
  .roadmap-grid {
    grid-template-columns: 1fr;
  }

  .merch-card {
    grid-template-columns: 1fr;
  }

  .merch-art {
    min-height: 170px;
  }

  .comment-form .form-row {
    grid-template-columns: 1fr;
  }

  .media-box,
  .media-box iframe,
  .media-placeholder {
    min-height: 270px;
  }
}
