/* FlawlessFormat news (/news/ and /news/<slug>/). Loaded after ff.css and guides.css and built only from their
   tokens: the news pages are guide pages with a 16:9 image, a shorter body and a list instead of hub sections.
   Every class here starts with nw-. Pages are written by tools/news.mjs render (tools/README-news.md). */

/* ---------- article head: a news headline is shorter than a guide title, so a step smaller ---------- */
.nw-h1 { font-size: clamp(32px, 4.6vw, 46px); line-height: 1.06; }

/* ---------- the 16:9 image, framed like the guide figures, with its credit underneath ---------- */
.nw-hero { margin-top: 36px; }
.nw-frame {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--radius);
  background: #f0f0f0; box-shadow: 0 0 0 1px var(--line), var(--shadow-card);
}
.nw-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nw-hero > figcaption { margin-top: 10px; font: 500 12px/1.5 var(--mono); letter-spacing: 0; color: var(--ink-3); text-align: right; }
.nw-hero > figcaption a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
/* the credit links get a taller hit area without changing the line height */
.nw-hero > figcaption a { padding-block: 8px; }
@media (hover: hover) and (pointer: fine) { .nw-hero > figcaption a:hover { color: var(--ink); text-decoration-color: var(--ink); } }
.nw-article > p:first-of-type { margin-top: 36px; }
.nw-article > p + p { margin-top: 14px; }

/* ---------- "What this means for your thesis": the section that matters most, marked by its blue section number ---------- */
.nw-article > section.nw-means > h2 > .n { color: var(--blue); }
.nw-guides { margin-top: 22px; }
.nw-guides.one { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 680px) { .nw-guides:not(.one) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- news cards (More news): the guide card with a 16:9 thumbnail on top ---------- */
.nw-card { padding-top: 14px; }
.nw-card .nw-card-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: calc(var(--radius) - 6px); background: #f0f0f0; box-shadow: 0 0 0 1px var(--line); }
.nw-card .top { align-items: flex-start; }
.nw-card .top time { white-space: nowrap; }
/* very narrow phones: a slightly smaller, tighter kicker keeps the category and the date on one line even in the
   narrower More news cards inside an article; the date drops below only as a last resort, never the kicker in two */
@media (max-width: 359px) {
  .nw-card .top { flex-wrap: wrap; gap: 4px 8px; font-size: 10.5px; letter-spacing: 0; }
  .nw-card .top .kind { white-space: nowrap; }
}
/* two or one other stories: the cards fill the column, as the three guide cards do */
@media (min-width: 680px) { .gd-cards.nw-more2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gd-cards.nw-more1 { grid-template-columns: minmax(0, 1fr); max-width: 450px; } }

/* ---------- the index: newest first, one row per story ---------- */
.nw-list { display: grid; margin-top: 44px; border-bottom: 1px solid var(--line); }
.nw-item { position: relative; display: grid; gap: 16px; padding: 26px 0; border-top: 1px solid var(--line); }
/* the whole row is the link's hit area: <a class="stretch"> on the title, as on the guide cards */
.nw-item a.stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.nw-item a.stretch:focus-visible { outline: none; }
.nw-item:has(a.stretch:focus-visible) { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 4px; }
@media (min-width: 760px) { .nw-item { grid-template-columns: 248px minmax(0, 1fr); gap: 28px; align-items: start; } }
.nw-item-img { display: block; overflow: hidden; aspect-ratio: 16 / 9; border-radius: calc(var(--radius) - 4px); background: #f0f0f0; box-shadow: 0 0 0 1px var(--line); }
.nw-item-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease-out); }
.nw-item-top { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 500 12px/1.4 var(--mono); letter-spacing: .02em; text-transform: uppercase; color: var(--ink-3); }
.nw-item-top .kind { color: var(--blue-ink); }
.gd-article .nw-item-h { margin: 8px 0 0; font-size: clamp(20px, 2.2vw, 23px); line-height: 1.25; font-weight: 600; letter-spacing: -.025em; text-wrap: balance; }
.gd-article .nw-item-h a:not(.btn) { color: var(--ink); text-decoration: none; transition: color 150ms ease; }
.gd-article .nw-item p { margin-top: 8px; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) {
  .gd-article .nw-item:hover .nw-item-h a:not(.btn) { color: var(--blue-ink); }
  .nw-item:hover .nw-item-img img { transform: scale(1.02); }
}

/* ---------- pages ---------- */
.nw-pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; font-size: 15px; }
.nw-pager a { font-weight: 500; color: var(--blue-ink); text-decoration: none; }
.nw-pager-n { font: 500 12px/1 var(--mono); color: var(--ink-3); }
.nw-index .gd-close { margin-top: 72px; }
