/* News list and news pages (news.html, news/<key>.html, written by tools/build_news.py).
   Shared tokens and components live in styles.css. */

.n-top { padding-top: 48px; padding-bottom: 8px; }
.n-top h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 700; margin: 0 0 12px; }
.n-top .lede { max-width: 56ch; }
.n-list { padding-bottom: 80px; }

/* a block per year */
.n-year { padding-top: 40px; }
.n-year h2, .n-more h2 { font-size: 28px; font-weight: 600; margin: 0 0 18px; }
.n-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.n-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; text-decoration: none; transition: border-color .15s; }
.n-card:hover { border-color: var(--navy); }
/* every card's picture fills the same 3:2 box, whatever its own shape */
.n-card-photo { display: block; position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-soft); }
.n-card-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; display: block; }
.n-card time { font-size: 13px; color: var(--ink-3); padding: 16px 20px 0; }
.n-card h3 { font-size: 19px; line-height: 1.3; font-weight: 600; color: var(--navy); padding: 4px 20px 20px; text-wrap: balance; }

/* one item: the text beside its photos */
.n-post { padding-bottom: 80px; }
.n-post-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 12px; }
.n-post-head { position: sticky; top: 96px; }
.n-date { font-size: 14px; color: var(--ink-3); margin: 0 0 8px; }
.n-post-head h1 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.1; font-weight: 600; margin: 0 0 22px; text-wrap: balance; }
.n-post-head p:not(.n-date) { font-size: 18px; line-height: 1.7; color: #22252c; margin: 0 0 16px; max-width: 60ch; }
.n-post-head a { color: var(--navy); font-weight: 600; }
.n-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.n-photo { display: block; border-radius: 14px; overflow: hidden; background: var(--bg-soft); }
.n-photo img { width: 100%; height: auto; display: block; }
/* the cover across both columns; the others two to a row, a single one across */
.n-gallery { align-items: start; }
.n-photo:first-child, .n-photo:nth-child(2):last-child { grid-column: 1 / -1; }
.n-gallery:has(.n-photo:only-child) .n-photo img { max-height: 620px; object-fit: contain; }

.n-more { margin-top: 72px; border-top: 1px solid var(--line); padding-top: 40px; }
.n-more-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.n-all { font-size: 15px; font-weight: 600; color: var(--navy); text-decoration: none; white-space: nowrap; }
.n-all:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .n-top { padding-top: 32px; }
  .n-year { padding-top: 28px; }
  .n-year h2, .n-more h2 { font-size: 24px; margin-bottom: 14px; }
  .n-grid { grid-template-columns: minmax(0, 1fr); }
  .n-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .n-card-photo { grid-row: 1 / 3; aspect-ratio: auto; min-height: 104px; }
  .n-card time { padding: 12px 14px 0; }
  .n-card h3 { font-size: 16px; padding: 2px 14px 12px; }
  .n-post-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .n-post-head { position: static; }
  .n-post-head p:not(.n-date) { font-size: 17px; }
  .n-more { margin-top: 48px; padding-top: 28px; }
}
