/* ── Newsroom (nw-) ──────────────────────────────────────────────────────
   Home-page front page (rendered by js/newsroom.js), /news/ archive and
   /news/<slug>/ articles. Layout follows the container, not the viewport,
   so it works beside the desktop sidebar and on phones alike. */

.nw-front, .nw-article, .nw-archive {
  --nw-serif: Georgia, 'Times New Roman', serif;
  --nw-desk: var(--accent);
  container-type: inline-size;
}

/* Shared bits */
.nw-kicker {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--nw-desk); text-decoration: none;
}
a.nw-kicker:hover { text-decoration: underline; }
.nw-meta, .nw-card-meta { font-size: 12px; color: var(--text-muted); }
.nw-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg3); border-radius: 8px; }
.nw-section-h {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-family: var(--nw-serif); font-size: 21px; font-weight: 700; color: var(--text);
  margin: 0 0 14px; padding-top: 14px; border-top: 3px solid var(--text);
}
.nw-section-h a { margin-left: auto; font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.nw-section-h a:hover { text-decoration: underline; }
.nw-section-sub { margin: -6px 0 14px; color: var(--text-muted); font-size: 13.5px; }

/* ── Front page ────────────────────────────────────────────────────────── */
.nw-front { margin: 8px 0 34px; }
.nw-front[hidden] { display: none; }
.nw-front-loading { min-height: 520px; }

.nw-mast {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px;
  border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 18px;
}
.nw-mast-title { font-family: var(--nw-serif); font-size: 28px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.nw-mast-date { font-size: 13px; font-weight: 600; color: var(--text); }
.nw-mast-note { font-size: 12.5px; color: var(--text-muted); }
.nw-mast a { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.nw-mast a:hover { text-decoration: underline; }

.nw-top { display: grid; grid-template-columns: 1fr; gap: 22px; margin-bottom: 30px; }
@container (min-width: 820px) {
  .nw-top { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 28px; }
}

/* Lead story */
.nw-lead { display: block; text-decoration: none; color: var(--text); }
.nw-lead .nw-img { border-radius: 10px; }
.nw-lead-body { padding-top: 12px; }
.nw-lead-title {
  display: block; font-family: var(--nw-serif); font-size: 25px; line-height: 1.2; font-weight: 700;
  margin: 6px 0 8px; letter-spacing: -.01em;
}
@container (min-width: 820px) { .nw-lead-title { font-size: 31px; } }
.nw-lead-dek { display: block; font-size: 15px; line-height: 1.55; color: var(--text); margin-bottom: 8px; }
.nw-lead:hover .nw-lead-title, .nw-lead:focus-visible .nw-lead-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Top-stories rail */
.nw-rail-h { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 4px; color: var(--text); }
.nw-headlines { list-style: none; margin: 0; padding: 0; }
.nw-headlines li { border-bottom: 1px solid var(--border); }
.nw-headlines li:last-child { border-bottom: 0; }
.nw-hl { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; align-items: start; padding: 13px 0; text-decoration: none; color: var(--text); }
.nw-hl .nw-img { border-radius: 6px; aspect-ratio: 4 / 3; }
.nw-hl-title { display: block; font-family: var(--nw-serif); font-size: 16.5px; font-weight: 700; line-height: 1.28; margin: 3px 0 4px; }
.nw-hl:hover .nw-hl-title, .nw-hl:focus-visible .nw-hl-title { text-decoration: underline; text-underline-offset: 2px; }

/* Card grid (front page "More this week" and archive) */
.nw-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 30px; }
@container (min-width: 600px) { .nw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } }
@container (min-width: 900px) { .nw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.nw-card {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: start;
  text-decoration: none; color: var(--text);
}
.nw-card[hidden] { display: none; }
.nw-card-img img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--bg3); }
.nw-card-body { display: flex; flex-direction: column; min-width: 0; }
.nw-card-title { font-family: var(--nw-serif); font-size: 16.5px; font-weight: 700; line-height: 1.28; margin: 3px 0 4px; }
.nw-card-dek { display: none; font-size: 13.5px; line-height: 1.5; color: var(--text-muted); margin-bottom: 6px; }
.nw-card:hover .nw-card-title, .nw-card:focus-visible .nw-card-title { text-decoration: underline; text-underline-offset: 2px; }
@container (min-width: 600px) {
  .nw-card { grid-template-columns: 1fr; gap: 10px; }
  .nw-card-img img { aspect-ratio: 16 / 9; border-radius: 8px; }
  .nw-card-title { font-size: 18px; }
  .nw-card-dek { display: block; }
}

/* Desk directory */
.nw-desks { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 30px; }
@container (min-width: 600px) { .nw-desks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 900px) { .nw-desks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.nw-desk {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 14px; background: var(--card); border: 1px solid var(--border); border-top: 3px solid var(--nw-desk);
  border-radius: 8px; text-decoration: none; color: var(--text);
}
.nw-desk:hover { border-color: var(--nw-desk); }
.nw-desk-name { display: block; font-weight: 700; font-size: 14.5px; }
.nw-desk-author { display: block; font-size: 12.5px; color: var(--nw-desk); font-weight: 600; margin: 1px 0 4px; }
.nw-desk-beat { display: block; font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }

.nw-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%; background: var(--nw-desk); color: #fff;
  font-family: var(--nw-serif); font-weight: 700; font-size: 18px;
}

/* Around the Web */
.nw-web { margin-bottom: 30px; }
.nw-web-by { font-family: var(--font); font-size: 12.5px; font-weight: 500; color: var(--text-muted); }
.nw-pick {
  display: grid; grid-template-columns: 1fr; gap: 6px; padding: 16px 18px; margin-bottom: 14px;
  background: var(--bg2); border-left: 4px solid var(--accent2); border-radius: 6px; text-decoration: none; color: var(--text);
}
.nw-pick-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent2); }
.nw-pick .nw-web-title { font-size: 18px; }
.nw-pick:hover .nw-web-title { text-decoration: underline; }
.nw-web-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@container (min-width: 600px) { .nw-web-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 900px) { .nw-web-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.nw-web-item {
  display: flex; flex-direction: column; gap: 3px; padding: 13px 14px; background: var(--card);
  border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--text);
}
.nw-web-item:hover { border-color: var(--accent); }
.nw-web-item:hover .nw-web-title { text-decoration: underline; }
.nw-web-type {
  align-self: flex-start; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 3px; background: var(--bg3); color: var(--text-muted);
}
.nw-web-type--podcast { background: #efe3f3; color: #5b4a7a; }
.nw-web-type--newsletter { background: #e3edf2; color: #2f6f8f; }
.nw-web-type--video { background: #f6e3dc; color: #8a3b2e; }
.nw-web-type--blog { background: #f3ecd8; color: #7a5c10; }
.nw-web-type--journal { background: #e6efe0; color: #3a6e28; }
.nw-web-title { font-family: var(--nw-serif); font-weight: 700; font-size: 16px; line-height: 1.3; }
.nw-web-creator { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.nw-web-blurb { font-size: 13px; line-height: 1.5; color: var(--text); }

/* From the archive */
.nw-from-archive { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 0; }
.nw-from-archive li { border-bottom: 1px solid var(--border); }
.nw-from-archive a { display: block; padding: 10px 0; text-decoration: none; color: var(--text); }
.nw-from-archive a:hover .nw-fa-title { text-decoration: underline; }
.nw-fa-title { font-family: var(--nw-serif); font-weight: 700; font-size: 15.5px; }

.nw-front-foot { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* ── Article page ──────────────────────────────────────────────────────── */
.nw-article { max-width: 760px; margin: 0 auto; padding-bottom: 30px; }
.nw-art-head { margin: 14px 0 18px; }
.nw-art-title { font-family: var(--nw-serif); font-size: 30px; line-height: 1.18; font-weight: 700; margin: 8px 0 10px; letter-spacing: -.01em; color: var(--text); border: 0; padding: 0; }
@container (min-width: 640px) { .nw-art-title { font-size: 38px; } }
.nw-art-dek { font-size: 17px; line-height: 1.55; color: var(--text-muted); margin: 0 0 16px; }
.nw-byline { display: flex; align-items: center; gap: 10px; }
.nw-byline .nw-avatar { width: 36px; height: 36px; font-size: 16px; }
.nw-byline-text { display: flex; flex-direction: column; }
.nw-byline-name { font-weight: 700; font-size: 14px; }
.nw-byline-meta { font-size: 12.5px; color: var(--text-muted); }
.nw-art-figure { margin: 0 0 22px; }
.nw-art-figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--bg3); }
.nw-art-figure figcaption { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; }
.nw-art-figure figcaption a { color: inherit; }

.nw-art-body { font-size: 16.5px; line-height: 1.7; }
.nw-art-body p { margin: 0 0 1.05em; }
.nw-art-body h2 { font-family: var(--nw-serif); font-size: 23px; line-height: 1.25; margin: 1.5em 0 .5em; }
.nw-art-body h3 { font-size: 17px; margin: 1.3em 0 .4em; }
.nw-art-body ul, .nw-art-body ol { margin: 0 0 1.05em 1.3em; }
.nw-art-body li { margin: .3em 0; }
.nw-art-body a { color: var(--accent); }
.nw-art-body blockquote { margin: 1.2em 0; padding: .2em 0 .2em 1em; border-left: 3px solid var(--nw-desk); font-family: var(--nw-serif); font-style: italic; color: var(--text); }
.nw-takeaways { background: var(--bg2); border-top: 3px solid var(--nw-desk); border-radius: 6px; padding: 14px 18px 4px; margin: 0 0 22px; }
.nw-takeaways h2 { font-family: var(--font); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 6px; color: var(--nw-desk); }
.nw-takeaways ul { margin: 0 0 10px 1.1em; }
.nw-takeaways li { font-size: 15px; line-height: 1.55; }
.nw-callout { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--nw-desk); border-radius: 6px; padding: 12px 16px; margin: 1.3em 0; }
.nw-callout h3 { margin-top: 0; font-size: 15px; }
.nw-callout p:last-child { margin-bottom: 0; }
.nw-table-wrap, .nw-art-body .nw-table { display: block; overflow-x: auto; }
.nw-art-body .nw-table { border-collapse: collapse; font-size: 14px; line-height: 1.45; margin: 1.2em 0; max-width: 100%; }
.nw-art-body .nw-table th, .nw-art-body .nw-table td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; vertical-align: top; }
.nw-art-body .nw-table thead th { background: var(--bg2); }

.nw-sources, .nw-related, .nw-more { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border); }
.nw-sources h2, .nw-related h2, .nw-more h2 { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; color: var(--text); border: 0; padding: 0; }
.nw-sources ol { margin: 0 0 0 1.3em; font-size: 13.5px; line-height: 1.55; }
.nw-sources li { margin: .3em 0; overflow-wrap: anywhere; }
.nw-sources a { color: var(--accent); }
.nw-src-pub { color: var(--text-muted); }
.nw-related-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.nw-related-link { padding: 8px 13px; background: var(--bg2); border: 1px solid var(--border); border-radius: 5px; font-size: 13px; font-weight: 600; color: var(--text); text-decoration: none; }
.nw-related-link:hover { border-color: var(--accent); }
.nw-more-list { list-style: none; margin: 0; padding: 0; }
.nw-more-list li { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.nw-more-list a { color: var(--text); font-family: var(--nw-serif); font-weight: 700; text-decoration: none; }
.nw-more-list a:hover { text-decoration: underline; }
.nw-more-list time { font-size: 12px; color: var(--text-muted); margin-left: 6px; }

.nw-disclosure { margin-top: 28px; padding: 12px 14px; background: var(--bg2); border-radius: 6px; font-size: 12.5px; line-height: 1.55; color: var(--text-muted); }
.nw-disclosure strong { color: var(--text); }

/* ── Archive ───────────────────────────────────────────────────────────── */
.nw-archive { max-width: 1100px; margin: 0 auto; padding-bottom: 30px; }
.nw-archive-head h1 { font-family: var(--nw-serif); font-size: 32px; margin: 12px 0 4px; border: 0; padding: 0; }
.nw-archive-head p { color: var(--text-muted); margin: 0 0 16px; }
.nw-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.nw-filter-btn { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.nw-filter-btn:hover { border-color: var(--nw-desk, var(--accent)); }
.nw-filter-btn.is-on { background: var(--text); border-color: var(--text); color: #fff; }

@media print {
  .nw-related, .nw-more, .back-link { display: none; }
}
