/* Living Tanach shared nav. Self-contained: story pages ship their own
   palettes, so this never reads page-level custom properties. */
.lt-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 5vw;
  background: #2a2117;
  font-family: 'Cormorant Garamond', serif;
}
/* Story pages pin their beats with ScrollTrigger; a sticky bar would sit on
   top of a pinned scene, so there the nav scrolls away with the page. */
.lt-nav--static { position: static; }

.lt-nav-wordmark { display: block; line-height: 0; }
.lt-nav-wordmark img { height: 1.5rem; width: auto; display: block; }

.lt-nav-menu { display: flex; align-items: center; gap: 1.8rem; }
.lt-nav-menu a, .lt-nav-menu button {
  font-family: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(246, 241, 230, 0.75);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}
.lt-nav-menu a:hover, .lt-nav-menu button:hover, .lt-nav-menu a[aria-current="page"] { color: #c9a45c; }
.lt-nav-menu a[aria-current="page"] { border-bottom: 1px solid #c9a45c; padding-bottom: 0.15rem; }

.lt-nav-subscribe, .lt-nav-menu a.lt-nav-subscribe {
  display: inline-block;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  background: #f6f1e6;
  border: 1px solid #f6f1e6;
  color: #2a2117;
  font-weight: 600;
}
.lt-nav-menu a.lt-nav-subscribe:hover { color: #2a2117; opacity: 0.8; }

.lt-nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(246, 241, 230, 0.35);
  border-radius: 999px;
  color: rgba(246, 241, 230, 0.85);
  font-family: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .lt-nav { padding: 1.1rem 5vw; }
  .lt-nav-wordmark img { height: 1.1rem; }
  .lt-nav-toggle { display: inline-block; }
  .lt-nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #2a2117;
    border-top: 1px solid rgba(246, 241, 230, 0.12);
    padding: 0.4rem 5vw 1rem;
  }
  .lt-nav.lt-nav--static { position: relative; }
  .lt-nav-menu.open { display: flex; }
  .lt-nav-menu a, .lt-nav-menu button { padding: 0.8rem 0; text-align: left; border-bottom: 1px solid rgba(246, 241, 230, 0.08); }
  .lt-nav-menu a.lt-nav-subscribe { margin-top: 0.8rem; text-align: center; border-bottom: 0; }
}

/* Search overlay: covers the page, field large and centred near the top. */
.lt-search {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #f6f1e6;
  overflow-y: auto;
  padding: 10vh 6vw 8vh;
  font-family: 'Cormorant Garamond', serif;
  color: #2a2117;
}
.lt-search[hidden] { display: none; }
.lt-search-close {
  position: absolute;
  top: 1.4rem;
  right: 6vw;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: rgba(42, 33, 23, 0.62);
  cursor: pointer;
}
.lt-search-close:hover { color: #2a2117; }
.lt-search-field {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: min(760px, 100%);
  margin: 0 auto;
  border-bottom: 1px solid rgba(42, 33, 23, 0.3);
}
.lt-search-field:focus-within { border-bottom-color: #5b2c6b; }
.lt-search-icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; color: rgba(42, 33, 23, 0.62); }
.lt-search-input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  font-weight: 500;
  background: none;
  border: none;
  color: #2a2117;
  padding: 0.4rem 0 0.6rem;
}
.lt-search-input:focus { outline: none; }
.lt-search-input::placeholder { color: rgba(42, 33, 23, 0.4); font-style: italic; font-weight: 400; }
.lt-search-input::-webkit-search-cancel-button, .lt-search-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.lt-search-results { width: min(1100px, 100%); margin: 2.5rem auto 0; }
.lt-search-results[hidden] { display: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Search results. Moved from home.css with the custom properties resolved,
   because story pages never load home.css. */
.story-results {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 6vw 12vh;
}

.story-result-count {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(42, 33, 23, 0.62);
  margin-bottom: 0.9rem;
}

.story-result {
  display: block;
  text-decoration: none;
  color: #2a2117;
  background: #fbf8f1;
  border: 1px solid rgba(42, 33, 23, 0.14);
  border-radius: 10px;
  padding: 1.1rem 1.4rem;
  margin-bottom: 0.5rem;
  transition: border-color 0.2s ease;
}

.story-result:hover {
  border-color: #5b2c6b;
}

.story-result-top {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5b2c6b;
  margin-bottom: 0.45rem;
}

/* why a result is here when the match was on a tag the reader never saw */
.story-result-why {
  color: rgba(42, 33, 23, 0.62);
  letter-spacing: 0.12em;
}

.story-result-line {
  font-size: 1.12rem;
  line-height: 1.35;
  margin-bottom: 0.25rem;
}

.story-result-hook {
  color: rgba(42, 33, 23, 0.62);
  font-size: 0.98rem;
}

.story-result-he {
  font-family: 'Frank Ruhl Libre', serif;
  direction: rtl;
  unicode-bidi: isolate;
  font-size: 1.08rem;
  line-height: 1.7;
  color: rgba(42, 33, 23, 0.62);
}

.story-result mark {
  background: rgba(201, 164, 92, 0.34);
  color: inherit;
  border-radius: 2px;
}

.story-search-empty {
  background: #fbf8f1;
  border: 1px dashed rgba(42, 33, 23, 0.14);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  color: rgba(42, 33, 23, 0.62);
}

.story-search-empty strong {
  display: block;
  margin-bottom: 0.3rem;
  color: #2a2117;
  font-weight: 500;
}
