/* Article list — text rows + bottom-sheet filters (library section). */

.al-wrap { max-width: 820px; }

.sec { padding: 64px 0; }
.sec .head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.sec .head .eyebrow { color: var(--accent); }
.sec .head .ttl { font-family: var(--serif-fa); font-weight: 500; font-size: 32px; line-height: 1.2; letter-spacing: -0.6px; margin: 8px 0 0; color: var(--ink); }
[dir="ltr"] .sec .head .ttl { font-family: var(--serif); }

.al-filter-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--ink-2); cursor: pointer; transition: border-color 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.al-filter-btn:hover { border-color: var(--accent); color: var(--accent-deep); }
.al-filter-btn.on { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-tint); }
.al-filter-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
}
.al-filter-badge[hidden] { display: none; }

.articles-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
/* Before JS boots, only show the first page so the giant list doesn't flash. */
[data-article-list]:not(.is-ready) .article-card:nth-child(n+25) { display: none !important; }
.article-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 0 22px 12px;
  border-bottom: 1px solid var(--line);
  border-inline-start: 3px solid transparent;
  cursor: pointer; transition: border-color 0.15s, padding 0.15s, opacity 0.15s;
  align-items: center; text-decoration: none;
}
.article-card:hover {
  border-inline-start-color: var(--accent);
  padding-inline-start: 18px;
}
.article-card:hover .a-ttl { color: var(--accent-deep); }
.article-card[hidden] { display: none !important; }
.article-card__body { min-width: 0; flex: 1; }
.article-card__chev { flex-shrink: 0; color: var(--ink-4); }

.article-card .meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 11px; color: var(--ink-3); letter-spacing: 0.3px; margin: 0 0 8px;
  text-transform: uppercase; font-weight: 700;
}
.article-card .meta .author { color: var(--accent); }
.article-card .meta .readtime { color: var(--accent); letter-spacing: 0.6px; }
.article-card .meta .dot { width: 3px; height: 3px; border-radius: 999px; background: var(--ink-4); }
.article-card .a-ttl {
  font-family: var(--serif-fa); font-size: 24px; font-weight: 500; line-height: 1.35;
  color: var(--ink); margin: 0; letter-spacing: -0.3px; transition: color 0.15s;
}
[dir="ltr"] .article-card .a-ttl { font-family: var(--serif); }
.article-card .a-by { font-size: 12px; color: var(--ink-3); margin: 8px 0 0; }

.wt-empty { padding: 40px 16px; text-align: center; color: var(--ink-3); font-size: 15px; }

.al-pager {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-top: 28px; padding-top: 8px;
}
.al-pager[hidden] { display: none !important; }
.al-pager-btn {
  appearance: none; border: 1px solid var(--line); background: #fff;
  color: var(--ink-2); font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 16px; border-radius: 12px; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.al-pager-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-deep); }
.al-pager-btn:disabled { opacity: 0.4; cursor: default; }
.al-pager-status {
  min-width: 4.5em; text-align: center;
  font-size: 13px; font-weight: 700; color: var(--ink-3); letter-spacing: 0.04em;
}

/* Bottom sheet — same motion pattern as bible chapter picker. */
.al-filter-scrim {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(20, 24, 30, 0.42);
  opacity: 0; pointer-events: none; transition: opacity 0.22s ease;
}
.al-filter-scrim.open { opacity: 1; pointer-events: auto; }

.al-filter-sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 251;
  width: min(720px, 100%);
  max-height: min(86vh, 100dvh - 24px);
  transform: translate(-50%, 100%);
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
  display: flex; flex-direction: column;
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}
.al-filter-sheet.open { transform: translate(-50%, 0); }
.al-filter-sheet .grabber {
  width: 36px; height: 4px; border-radius: 999px; background: var(--line);
  margin: 8px auto 0; flex-shrink: 0;
}

.al-filter-head {
  display: grid; grid-template-columns: 72px 1fr 44px; align-items: center;
  padding: 6px 12px 10px; gap: 6px; flex-shrink: 0;
}
.al-filter-head .title {
  text-align: center; font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--ink);
}
[dir="rtl"] .al-filter-head .title { font-family: var(--serif-fa); font-weight: 600; }
.al-filter-clear {
  justify-self: start; background: transparent; border: none; padding: 8px 4px;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--accent-deep); cursor: pointer;
}
.al-filter-close {
  width: 36px; height: 36px; border-radius: 999px; border: none; background: var(--paper-2);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2);
}

.al-filter-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin: 0 16px 12px; padding: 4px; border-radius: 999px; background: var(--paper-2);
  flex-shrink: 0;
}
.al-filter-tabs button {
  border: none; background: transparent; border-radius: 999px;
  padding: 10px 12px; font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--ink-3); cursor: pointer; transition: background 0.15s, color 0.15s;
}
.al-filter-tabs button.on { background: var(--accent-tint); color: var(--accent-deep); }

.al-filter-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  -webkit-overflow-scrolling: touch; padding: 0 16px 24px;
}
.al-filter-pane { display: none; }
.al-filter-pane.on { display: block; }
.al-filter-axis {
  font-size: 11px; font-weight: 800; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px;
}
.al-filter-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.al-filter-pill {
  display: block; width: 100%; text-align: start;
  padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: #fff;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.35;
  color: var(--ink); cursor: pointer; transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.al-filter-pill:hover { border-color: var(--accent); color: var(--accent-deep); }
.al-filter-pill.on { background: var(--accent); color: #fff; border-color: var(--accent); }

body.al-filter-open { overflow: hidden; }

@media (max-width: 720px) {
  .sec { padding: 40px 0; }
  .sec .head { align-items: flex-start; flex-direction: column; gap: 16px; }
  .al-filter-btn { align-self: stretch; justify-content: center; }
  .article-card .a-ttl { font-size: 20px; }
  .al-filter-grid { grid-template-columns: 1fr; }
}
