/* Story lists: the Analysis and Opinion pages, each writer's page and the front page's
   "Latest stories" (markup from lib/story-list.js). Colors and sizes come from the page's own
   tokens, so light and dark mode follow the page. */

.index-list { list-style: none; margin: var(--s3) 0 0; padding: 0; border-top: 1px solid var(--line); }
.index-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3); align-items: start;
  padding-block: var(--s4); border-bottom: 1px solid var(--rule);
}
.index-text { display: grid; gap: var(--s1); align-content: start; }
.index-item .story-meta { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); align-items: center; }
.index-item h2 { font-size: var(--fs-24); line-height: 1.2; letter-spacing: -0.015em; }
.index-item h2 a:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 4px; }
/* Subheads stop at three lines with an ellipsis, so entries stay close to one height. Three
   classes, so a page's own .dek styles (loaded after this file) don't override the list's. */
.index-item .index-text .dek {
  font-size: var(--fs-16); line-height: 1.45; color: var(--text); font-style: italic;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}

/* The story's illustration beside its entry. From tablet width up it fills the entry's full
   height (cropped to fit); on phones, where the text column is narrow and tall, it stays a small 3:2. */
.index-thumb { display: block; width: 104px; aspect-ratio: 3 / 2; background: var(--wash); }
@media (min-width: 640px) {
  .index-item { align-items: stretch; }
  .index-thumb { width: 200px; aspect-ratio: auto; min-height: 133px; }
}
.index-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; filter: brightness(var(--art-brightness, 1)); }
