@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Source+Serif+4:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

html {
  text-size-adjust: 100%;
  tab-size: 4;
  line-height: 1.5;
}

*, ::after, ::before, ::backdrop {
    box-sizing: border-box;
    border-width: 0px;
    border-style: solid;
    border-color: currentcolor;
    border-image: none;
    margin: 0px;
    padding: 0px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: 'Source Serif 4', Georgia, serif;
}

.app-shell {
  --ink: #1e2a45;
  --ink-70: #4a5573;
  --brass: #a8823e;
  --brass-15: rgba(168, 130, 62, 0.15);
  --garnet: #7c2d3b;
  --paper: #f5f2e9;
  --paper-raised: #fcfaf3;
  --rule: #dbd5c3;
  --text: #333a46;
  --text-muted: #6b7280;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --radius: 3px;
  --radius-lg: 6px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--text);
}

.hide { display: none; }

.top-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper-raised) 88%, white 12%);
  backdrop-filter: blur(6px);
}

.top-nav-inner {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 26px var(--space-5) 22px;
}

.search-area {
  position: relative;
  width: min(100%, 780px);
  margin: 0 auto;
}

#search-input {
  width: 100%;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 17px;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1.5px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 18px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

#search-input::placeholder {
  color: var(--text-muted);
}

#search-input:focus {
  border-color: var(--brass);
  box-shadow: 0 0 0 3px var(--brass-15);
}

#search-results {
  position: absolute;
  z-index: 20;
  margin-top: var(--space-2);
  max-height: 40rem;
  width: 100%;
  overflow: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-raised);
  padding: var(--space-3);
  box-shadow: 0 18px 34px rgba(30, 42, 69, 0.14);
}

.results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.result-card:not(:hover) + .result-card {
  border-top: 1px solid var(--rule);
}

.result-card {
  position: relative;
  background: var(--paper-raised);
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0;
}

.result-card:hover {
  background: var(--paper);
  border-color: var(--rule);
}

.result-button {
  width: 100%;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: transparent;
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
}

.result-speaker {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}

.result-title {
  color: var(--ink-70);
  font-size: 15.5px;
}

.result-desc {
  margin: var(--space-2) 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.result-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.songs-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.content-grid {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(19rem, 35rem) minmax(0, 1fr);
  gap: var(--space-6);
  padding: 0 var(--space-5);
}

.talk-panel {
  position: sticky;
  top: 6.4rem;
  align-self: start;
  padding-top: 1.5rem;
}

.talk-card {
  display: block;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-raised);
  padding: 20px;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.talk-card:hover {
  border-color: var(--brass);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(30, 42, 69, 0.1);
}

.talk-title {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 24px;
  line-height: 1.2;
  color: var(--ink);
}

.talk-speaker {
  margin: var(--space-2) 0 0;
  color: var(--ink-70);
  font-size: 15px;
}

.talk-description {
  margin: var(--space-4) 0 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}

.hymn-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.hymn-list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: 1.5rem;
}

.hymn-item {
  margin: 0;
}

.hymn-link {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.hymn-link:hover {
  border-color: var(--brass);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(30, 42, 69, 0.1);
}

.hymn-plate {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: #247225;
  color: #ebffe6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.hymn-name {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 17px;
  color: var(--ink);
}

.hymn-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }

  .talk-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .top-nav-inner,
  .content-grid,
  .empty-state-wrap {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .top-nav-inner {
    padding-top: var(--space-5);
    padding-bottom: var(--space-4);
  }

  .talk-title {
    font-size: 21px;
  }

  .hymn-name {
    font-size: 16px;
  }

  .empty-copy {
    font-size: 16px;
  }
}