
:root {
  color-scheme: light;
  --bg: #faf7f2;
  --card-bg: #ffffff;
  --ink: #2b241c;
  --muted: #7a6f60;
  --accent: #8a5a3b;
  --border: #e7ded2;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  padding-bottom: 3rem;
}
header.site-header {
  padding: 2rem 1.25rem 1.25rem;
  text-align: center;
  position: relative;
}
.search-icon-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}
.search-icon-btn:active {
  background: #f3ede3;
}
.search-wrap[hidden] {
  display: none;
}
header.site-header h1 {
  font-size: 1.6rem;
  margin: 0 0 0.35rem;
}
header.site-header p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}
main {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 1rem;
}
a.back-link {
  display: inline-block;
  margin: 1rem 0;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}
a.back-link:active { opacity: 0.6; }
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 0.5rem;
}
@media (min-width: 520px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}
.card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  min-height: 64px;
  display: flex;
  align-items: center;
}
.card:active { background: #f3ede3; }
h2.subheading {
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}
.track {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.5rem;
}
.track-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.track-title .title-en {
  margin-bottom: 0.1rem;
}
.track-title .title-he {
  font-weight: 500;
  color: var(--muted);
}
.track-tags {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.sub-accordion {
  margin-bottom: 0.5rem;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.sub-accordion > summary {
  padding: 0.5rem 0.1rem;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border);
}
.sub-accordion .accordion-body {
  padding: 0.6rem 0 0;
}
.tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}
.tag:not(:last-child)::after {
  content: "\00b7";
  margin-left: 0.4rem;
}
.track-group .track-part {
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
  margin-top: 0.6rem;
}
.track-group .track-part:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.part-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}
.part-label {
  font-weight: 600;
}
.part-he {
  color: var(--muted);
}
audio {
  width: 100%;
  display: block;
  height: 32px;
  margin-top: 0.15rem;
}
details.transcript {
  margin-top: 0.5rem;
}
details.transcript summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
}
details.transcript p {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-wrap;
}
.pdf-link {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.6rem 0.9rem;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
footer.note {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2.5rem;
}

/* --- generated: search & nav additions --- */

.site-title {
  margin: 0 0 0.25rem;
  text-align: center;
}
.site-title a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}
.search-wrap {
  max-width: 480px;
  margin: 1rem auto 0;
}
#search-box {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
  background: var(--card-bg);
  color: var(--ink);
}
#search-results {
  margin-top: 0.75rem;
  text-align: left;
}
#search-results:empty {
  margin-top: 0;
}
.search-empty {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}
main.search-active > *:not(.always-visible) {
  display: none;
}
.tagline {
  text-align: center;
  color: var(--muted);
  margin: 0.5rem 0 0;
}
.browse-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 1.25rem 0;
}
@media (min-width: 520px) {
  .browse-nav {
    flex-direction: row;
  }
  .browse-nav .nav-button {
    flex: 1;
  }
}
.nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
}
.nav-button:active {
  opacity: 0.8;
}
.section-count {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.85rem;
}

/* --- generated: home page hierarchy + two-step tag browsing --- */

.section-label {
  margin-top: 2rem;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}
.section-explainer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}
.card-grid-secondary .card-secondary {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.7rem 1rem;
  min-height: 44px;
  box-shadow: none;
  background: transparent;
}
button.card.tag-card {
  width: 100%;
  border: 1px solid var(--border);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.tag-group[hidden],
.tag-index[hidden] {
  display: none;
}
a.back-to-list {
  font-weight: 600;
}
a.back-link[hidden] {
  display: none;
}
.finder {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1.25rem;
}
/* The main thing on the home page — bigger box, bigger everything */
.finder-hero {
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.finder-hero .finder-sentence {
  font-size: 1.5rem;
}
.finder-hero .finder-sentence select {
  font-size: 1.35rem;
  padding: 0.4rem 0.6rem;
}
.finder-sentence {
  font-size: 1.15rem;
  line-height: 2.4;
  text-align: center;
  margin: 0;
}
.finder-sentence select {
  font-size: 1.05rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--accent);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  margin: 0 0.15rem;
}
#finder-results {
  margin-top: 0.75rem;
}
.finder-empty {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  margin: 0;
}
.grid-scroll {
  overflow-x: auto;
  margin: 1rem 0;
  -webkit-overflow-scrolling: touch;
}
table.grid-finder {
  border-collapse: collapse;
  font-size: 0.78rem;
  white-space: nowrap;
}
table.grid-finder th,
table.grid-finder td {
  padding: 0.4rem 0.55rem;
  text-align: center;
  border: 1px solid var(--border);
}
table.grid-finder thead th {
  position: sticky;
  top: 0;
  background: var(--bg);
  font-weight: 600;
  color: var(--muted);
}
table.grid-finder tbody th {
  position: sticky;
  left: 0;
  background: var(--bg);
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
td.cell-active {
  background: var(--card-bg);
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}
td.cell-active:active {
  background: #f3ede3;
}
td.cell-empty {
  background: transparent;
  color: var(--border);
}
/* --- accordion sections (kept for the transcript details/summary pattern) --- */
.accordion-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
  overflow: hidden;
}
.accordion-item summary {
  cursor: pointer;
  padding: 0.9rem 1.1rem;
  font-weight: 600;
  list-style: none;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary .label-en,
.accordion-item summary .label-he {
  display: inline;
}
.accordion-item summary .label-he {
  margin-left: 0.4rem;
}
.accordion-body {
  padding: 0 1.1rem 1rem;
}

/* --- sidebar view --- */
/* This view needs real desktop width for a side-by-side layout to make sense —
   override the site-wide 520px cap that every other (single-column) page uses.
   Belt-and-suspenders: a plain class selector (guaranteed to work) plus :has()
   as a backup in case a page forgets the body class. */
body.wide-page main,
body:has(.sidebar-layout) main {
  max-width: 1300px;
}
.sidebar-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
/* Single column, top to bottom, in the order the content was actually placed
   in — a multi-column layout was tried here and made it harder to tell what
   was grouped with what, so this stays simple on purpose. */
.accordion-body,
.sidebar-panel {
  max-width: 640px;
}
.accordion-body > .track,
.accordion-body > .track-group,
.sidebar-panel > .track,
.sidebar-panel > .track-group {
  margin-bottom: 0.6rem;
}
.sidebar-nav {
  flex: 0 0 180px;
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.sidebar-nav-item {
  text-align: left;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  color: var(--ink);
}
.sidebar-nav-item.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.sidebar-nav-item .label-he {
  display: block;
  font-size: 0.85em;
  opacity: 0.8;
}
.sidebar-content {
  flex: 1;
  min-width: 0;
}
@media (max-width: 560px) {
  .sidebar-layout { flex-direction: column; }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    position: static;
    flex: none;
  }
}

html { scroll-behavior: smooth; }

h3.sub-subheading {
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.label-en, .label-he {
  display: block;
}
.label-he {
  font-weight: 400;
  font-size: 0.85em;
  color: var(--muted);
}
button.card.tag-card {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}
