/* ---------------------------------------------------
   Listing pages, Oct 2026: podcast (/episodes/), blog, poems, reflections.
   Built by build.py (listing_page + LISTING), filtering in js/listings.js.
   Loaded after style.css and post.css. Its own look on purpose, so these don't feel like the home page.

     1. Top        Cloud background. Title + intro on the left (podcast: Apple / Spotify / YouTube bar),
                   featured post on the right (computer: big photo; phone: compact white card)
     2. Tools      tabs + search under a navy line (pages that have them)
     3. Cards      phone: one per line, wide photo on top
                   computer: .layout-list   photo left, text right   (podcast, blog)
                             .layout-grid   three across             (poems: opening lines)
                             .layout-series big number, photo, text  (reflections, read in order)
     4. See More
   No dates anywhere: the posts are evergreen.
--------------------------------------------------- */
.lp { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter) 90px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lp [hidden] { display: none !important; }

/* ---- 1. top ---- */
.lp-head { display: grid; gap: 28px; padding: 44px 0 40px;
  background: var(--cloud); box-shadow: 0 0 0 100vmax var(--cloud); clip-path: inset(0 -100vmax); }   /* Cloud runs edge to edge */
.lp-head h1 { font-size: clamp(32px, 4vw, 44px); font-weight: 700; letter-spacing: -.03em; line-height: 1.04; }
.lp-head p { font-size: 17px; line-height: 1.6; color: var(--muted); margin-top: 14px; max-width: 540px; }
.lp-head p a { color: var(--blue); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.lp-listen { display: flex; border: 1px solid var(--navy); border-radius: 4px; overflow: hidden; margin-top: 24px; }
.lp-listen a { flex: 1; text-align: center; padding: 11px 8px; font-size: 14px; font-weight: 600; transition: background .15s, color .15s; }
.lp-listen a + a { border-left: 1px solid var(--navy); }
.lp-listen a:hover { background: var(--navy); color: #fff; }
.lp-feat { display: block; position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--navy); }
.lp-feat img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .6; transition: opacity .2s; }
.lp-feat:hover img { opacity: .7; }
.lp-feat .ov { position: absolute; inset: auto 0 0 0; padding: 22px; color: #fff; background: linear-gradient(transparent, rgba(7,8,79,.92)); }
.lp-feat .lbl { font-size: 12px; font-weight: 600; color: var(--light); letter-spacing: .08em; text-transform: uppercase; }
.lp-feat h2 { font-size: 21px; font-weight: 600; line-height: 1.25; margin-top: 6px; }
.lp-feat .meta { font-size: 13px; opacity: .85; margin-top: 6px; }

/* ---- 2. tools ---- */
.lp-tools { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between;
  padding: 18px 0; border-bottom: 1px solid var(--rule); }
.lp-tabs { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.lp-tabs button { background: none; border: 0; padding: 4px 0; font-size: 14px; font-weight: 500; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; }
.lp-tabs button.on { color: var(--navy); border-bottom-color: var(--navy); }
.lp-tabs button:hover { color: var(--navy); }
.lp-search { position: relative; flex: 1 1 220px; max-width: 280px; }
.lp-search input { width: 100%; font: inherit; font-size: 16px; color: var(--navy); padding: 8px 0 8px 28px; border: 0;
  border-bottom: 1px solid rgba(7,8,79,.3); background: none; border-radius: 0; -webkit-appearance: none; appearance: none; }
.lp-search input:focus { outline: none; border-bottom-color: var(--blue); }
.lp-search svg { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.lp-count { font-size: 14px; color: var(--muted); padding-top: 18px; }
.lp-none { padding: 32px 0; color: var(--muted); }
.lp-none a { color: var(--blue); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* ---- 3. cards (phone: one per line, wide photo on top) ---- */
.lp-list { display: grid; padding-top: 26px; }
.card-item { display: flex; flex-direction: column; padding-bottom: 26px; margin-bottom: 26px; border-bottom: 1px solid var(--rule); }
.ci-img { display: block; aspect-ratio: 2 / 1; border-radius: 6px; overflow: hidden; background: var(--cloud); margin-bottom: 12px; }
.ci-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ci-label { font-size: 12px; font-weight: 600; color: var(--blue); }
.card-item h3 { font-size: 18px; font-weight: 600; line-height: 1.3; margin-top: 4px; }
.card-item h3 a:hover { color: var(--blue); }
.card-item p { font-size: 14px; line-height: 1.55; color: var(--muted); margin-top: 6px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.card-item p.verse { white-space: pre-line; -webkit-line-clamp: 4; font-size: 15px; line-height: 1.6; }   /* poems: opening lines */
.ci-num { display: none; }
.ci-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ci-tags button { font: inherit; font-size: 12px; font-weight: 500; color: var(--blue); background: none; padding: 3px 9px;
  border: 1px solid rgba(21,155,195,.45); border-radius: 4px; cursor: pointer; }
.ci-tags button:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ---- 4. see more ---- */
.lp-more { display: block; margin: 14px auto 0; font: inherit; font-size: 14px; font-weight: 600; padding: 11px 26px; border-radius: 4px;
  border: 1px solid var(--navy); background: #fff; color: var(--navy); cursor: pointer; }
.lp-more:hover { background: var(--navy); color: #fff; }

/* ---- phone ---- */
@media (max-width: 860px) {
  .lp-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;   /* one row that swipes sideways */
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); width: calc(100% + var(--gutter) * 2); }
  .lp-tabs::-webkit-scrollbar { display: none; }
  .lp-tabs button { flex: none; }
  .lp-search { max-width: none; order: -1; flex-basis: 100%; }
  /* latest post: a compact white card inside the Cloud top */
  .lp-head { padding: 28px 0 24px; gap: 22px; }
  .lp-feat { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: center; aspect-ratio: auto;
    background: #fff; border-radius: 8px; padding: 12px; }
  .lp-feat img { width: 88px; height: 88px; opacity: 1; border-radius: 6px; }
  .lp-feat:hover img { opacity: 1; }
  .lp-feat .ov { position: static; background: none; padding: 0; color: var(--navy); }
  .lp-feat .lbl { color: var(--blue); }
  .lp-feat h2 { font-size: 17px; margin-top: 4px; }
  .lp-feat .meta { color: var(--muted); opacity: 1; margin-top: 4px; }
  /* series: the number sits on the label line on phones */
}

/* ---- computer ---- */
@media (min-width: 861px) {
  .lp-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 56px; padding: 60px 0 48px; }
  .lp-listen { max-width: 420px; }
  .lp-more { margin-top: 40px; }

  /* list: one per row, photo left, text right */
  .layout-list .lp-list { padding-top: 8px; }
  .layout-list .card-item { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 0 32px; align-items: center; padding: 28px 0; margin: 0; }
  .layout-list .ci-img { margin: 0; }
  .layout-list .card-item h3 { font-size: 20px; }
  .layout-list .card-item p { font-size: 15px; max-width: 720px; }

  /* grid: three across, photo on top */
  .layout-grid .lp-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 28px; padding-top: 32px; }
  .layout-grid .card-item { padding: 0; margin: 0; border: 0; }
  .layout-grid .ci-img { margin-bottom: 14px; aspect-ratio: 3 / 2; }
  .layout-grid .card-item h3 { font-size: 18px; }
  .layout-grid .card-item p { -webkit-line-clamp: 3; }
  .layout-grid .card-item p.verse { -webkit-line-clamp: 4; }

  /* series: big number, photo, text - read in order */
  .layout-series .lp-list { padding-top: 8px; }
  .layout-series .card-item { display: grid; grid-template-columns: 64px 240px minmax(0, 1fr); gap: 0 32px; align-items: center; padding: 28px 0; margin: 0; }
  .layout-series .ci-num { display: block; font-size: 48px; font-weight: 300; color: var(--blue); line-height: 1; font-variant-numeric: tabular-nums; }
  .layout-series .ci-img { margin: 0; }
  .layout-series .ci-label { display: none; }   /* the big number says it */
  .layout-series .card-item h3 { font-size: 20px; margin: 0; }
  .layout-series .card-item p { font-size: 15px; max-width: 680px; }
}

/* ---- "page not found" (404.html, build.py) ---- */
.nf .lp-head { grid-template-columns: 1fr; padding-bottom: 44px; }
.nf-k { font-size: 13px; font-weight: 700; letter-spacing: .1em; color: var(--blue); }
.nf h1 { margin-top: 6px; }
.nf-home { display: inline-block; margin-top: 22px; background: var(--navy); color: #fff; font-size: 14px; font-weight: 600; padding: 11px 18px; border-radius: 4px; }
.nf-home:hover { background: var(--blue); }
.nf-grid { display: grid; gap: 12px; padding-top: 32px; }
.nf-card { display: block; padding: 18px 20px; border: 1px solid var(--rule); border-radius: 8px; }
.nf-card:hover { border-color: var(--navy); }
.nf-card h3 { font-size: 18px; font-weight: 600; }
.nf-card span { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
@media (min-width: 861px) { .nf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
/* computer: keep the search on the same line as a long row of tabs (blog has 10) */
@media (min-width: 861px) {
  .lp-tools { flex-wrap: nowrap; }
  .lp-tabs { gap: 6px 16px; }
  .lp-search { flex: 0 1 200px; min-width: 150px; }
}

/* Podcast topics: dropdown on desktop, swipe row of buttons on phones (Oct 16, 2026) */
.lp-dd { display: none; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--navy); }
.lp-dd select { font: inherit; font-size: 15px; font-weight: 500; color: var(--navy); min-width: 220px; cursor: pointer;
  padding: 9px 36px 9px 12px; border: 1px solid rgba(7,8,79,.25); border-radius: 4px; appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2307084f' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center; }
.lp-dd select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,155,195,.15); }
@media (min-width: 861px) {
  .lp-podcast .lp-tabs { display: none; }
  .lp-podcast .lp-dd { display: flex; }
}
