/* News: /news and /news/<name>, made by tool/site_news.dart.
   The page, its fonts, colours, top bar and footer come from home.css, as on
   the home page; these are the parts only the news pages have. */

/* "News" in the top bar, marked as the page you are on. */
header nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--hl);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

main.news, main.news-post { padding-top: 40px; padding-bottom: 88px; }

/* ── The list ────────────────────────────────────────────────────────────── */

main.news h1 {
  font-weight: 800;
  font-size: clamp(44px, 6vw, 68px);
  line-height: 1.05;
  margin: 12px 0 10px;
}
.news-sub { color: var(--muted); font-size: 19px; margin: 0 0 44px; }
.news-empty { color: var(--muted); font-size: 17px; }

.news-list { list-style: none; margin: 0; padding: 0; }
.news-item { border-top: 1px solid color-mix(in srgb, var(--line) 22%, transparent); }
.news-item:last-child { border-bottom: 1px solid color-mix(in srgb, var(--line) 22%, transparent); }

/* One post per row: the words on the left, the picture (if any) on the right.
   The whole row is the link. */
.news-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 32px 0;
  color: var(--ink);
  text-decoration: none;
}
.news-link.has-picture { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); }
.news-text { max-width: 640px; }
.news-meta { color: var(--muted); font-size: 14.5px; margin: 0 0 10px; }
.news-title {
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.2;
  margin: 0 0 10px;
}
.news-link:hover .news-title,
.news-link:focus-visible .news-title {
  text-decoration: underline;
  text-decoration-color: var(--hl);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}
.news-link:focus-visible { outline: 3px solid var(--hl); outline-offset: 4px; border-radius: 6px; }
.news-summary { color: var(--muted); font-size: 17px; margin: 0; }
.news-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-radius: var(--radius);
  border: 2px solid var(--line);
}

/* A phone: the picture above the words. */
@media (max-width: 640px) {
  .news-link.has-picture { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .news-link.has-picture .news-thumb { order: -1; }
}

/* ── A post ──────────────────────────────────────────────────────────────── */

/* A comfortable reading width, inside the home page's side padding. */
main.news-post { max-width: 768px; }
.news-back { margin: 0 0 28px; font-size: 15px; }
.news-back a { color: var(--muted); text-decoration: none; }
.news-back a:hover { color: var(--ink); }
main.news-post h1 {
  font-weight: 800;
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.08;
  margin: 0 0 14px;
}
.news-standfirst { color: var(--muted); font-size: 20px; line-height: 1.5; margin: 0 0 32px; }

.news-post figure { margin: 32px 0; }
.news-post figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 2px solid var(--line);
}

.news-body { font-size: 17.5px; line-height: 1.65; }
.news-body h2 { font-size: 27px; margin: 40px 0 10px; }
.news-body h3 { font-size: 21px; margin: 30px 0 8px; }
.news-body p, .news-body ul, .news-body blockquote { margin: 0 0 18px; }
.news-body ul { padding-left: 24px; }
.news-body li { margin-bottom: 8px; }
.news-body a {
  overflow-wrap: anywhere;
  text-decoration-color: var(--hl);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.news-body code { background: var(--accent-soft); border-radius: 6px; padding: 1px 6px; font-size: .9em; }
.news-body blockquote { border-left: 4px solid var(--hl); padding-left: 18px; margin-left: 0; color: var(--muted); }
