/* News page (/news/). Loads after site.css and pages.css and uses only the shared tokens,
   so light and dark follow the site theme switch. Cards are rendered by news.js from /news/data.json. */

.nw-toc { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 6px; }
.nw-toc a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill);
  background: var(--track); color: var(--ink); font-size: 14px; font-weight: 550; text-decoration: none;
}
.nw-toc a:hover { background: var(--hairline-2); }

.nw { padding-bottom: 0; }
.nw-sec { padding-top: clamp(36px, 6vw, 72px); scroll-margin-top: 72px; }
.nw-h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 650; letter-spacing: -0.03em; line-height: 1.12; }

/* ---------- Feed with a side column of filters ---------- */
.nw-layout { display: grid; grid-template-columns: minmax(220px, 260px) minmax(0, 1fr); gap: clamp(20px, 3.4vw, 44px); align-items: start; }
.nw-side { position: sticky; top: 76px; display: grid; gap: 18px; }
.nw-search { display: grid; gap: 6px; }
.nw-search label { font-size: 14px; font-weight: 600; color: var(--ink); }
.nw-search input {
  width: 100%; min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink); font: 400 15px/1.2 var(--sans);
  box-shadow: inset 0 0 0 1px var(--hairline-2);
}
.nw-search input::placeholder { color: var(--muted); opacity: 1; }
.nw-search input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.nw-filters { display: grid; gap: 4px; }
.nw-filter {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-thumb); cursor: pointer;
  background: transparent; color: var(--body); font-size: 15px; font-weight: 550; text-align: left;
  transition: background-color .2s, color .2s;
}
.nw-filter:hover { background: var(--track); color: var(--ink); }
.nw-filter[aria-pressed="true"] { background: var(--btn-primary-bg); color: var(--btn-primary-ink); font-weight: 650; }
.nw-filter__n { font-size: 13px; font-weight: 600; opacity: .85; }

.nw-count { font-size: 14px; color: var(--muted); font-weight: 550; min-height: 22px; margin-bottom: 12px; }
.nw-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.nw-item { padding: clamp(18px, 2.6vw, 26px); box-shadow: var(--sh-card); border-radius: var(--r-card); }
.nw-item[hidden] { display: none; }
.nw-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 14px; color: var(--muted); font-weight: 550; }
.nw-tag {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--track); color: var(--ink-2); font-size: 13px; font-weight: 600;
}
.nw-item__title { margin-top: 10px; font-size: clamp(18px, 2vw, 21px); font-weight: 650; letter-spacing: -0.02em; line-height: 1.3; text-wrap: balance; }
.nw-item__sum { margin-top: 8px; font-family: var(--serif); font-size: 16px; line-height: 1.75; color: var(--body); max-width: 66ch; }
.nw-item__more { margin-top: 10px; font-size: 15px; color: var(--body); }
.nw-item__more summary { cursor: pointer; color: var(--link); font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.nw-item__more ul { margin: 6px 0 0; padding-left: 1.2em; line-height: 1.6; }
.nw-item__more li + li { margin-top: 4px; }
.nw-item__foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hairline); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 18px; align-items: center; }
.nw-item__src { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.nw-item__src a { font-weight: 600; text-underline-offset: 3px; }
.nw-stamp { font-size: 13px; color: var(--muted); font-weight: 550; }
.nw-empty { padding: 22px; display: grid; gap: 14px; justify-items: start; color: var(--body); }
.nw-empty[hidden] { display: none; }

/* ---------- Labs and coming-soon cards ---------- */
.nw-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 20px); }
.nw-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nw-card { padding: clamp(18px, 2.6vw, 24px); display: flex; flex-direction: column; gap: 10px; border-radius: var(--r-card); box-shadow: var(--sh-card); }
.nw-card__kicker { font-size: 13px; color: var(--muted); font-weight: 600; }
.nw-card__title { font-size: 18px; font-weight: 650; letter-spacing: -0.018em; line-height: 1.3; text-wrap: balance; }
.nw-card__facts { font-size: 14px; color: var(--body); display: flex; flex-wrap: wrap; gap: 2px 8px; }
.nw-dot { color: var(--muted); }
.nw-card__note { font-family: var(--serif); font-size: 15.5px; line-height: 1.7; color: var(--body); }
.nw-card__links { margin-top: auto; padding-top: 6px; align-items: center; }
.nw-card__links .btn { min-height: 44px; padding: 0 16px; font-size: 14px; }
.nw-card__explorer[hidden] { display: none; }
.nw-card--featured {
  grid-column: 1 / -1; padding: clamp(22px, 3.2vw, 32px);
  box-shadow: var(--sh-panel), inset 0 0 0 1px var(--hairline-2), inset 4px 0 0 var(--cyan);
}
.nw-card--featured .nw-card__title { font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -0.025em; }
.nw-card--soon { box-shadow: inset 0 0 0 1px var(--hairline-2); background: var(--surface-2); }
.nw-pill--wip { background: transparent; box-shadow: inset 0 0 0 1px var(--hairline-2); color: var(--ink); }
.nw-none { color: var(--muted); font-size: 15px; }

@media (max-width: 960px) {
  .nw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .nw-layout { grid-template-columns: minmax(0, 1fr); }
  .nw-side { position: static; }
  .nw-filters { display: flex; flex-wrap: wrap; gap: 6px; }
  .nw-filter { width: auto; border-radius: var(--r-pill); background: var(--track); padding: 0 14px; }
  .nw-filter__n { margin-left: 2px; }
}
@media (max-width: 620px) {
  .nw-grid, .nw-grid--2 { grid-template-columns: minmax(0, 1fr); }
}
