/* SWANDEX news: what the News page and its items add to articles/css/article.css (colours, type and
   the masthead come from there). */

/* ---------- the list: illustrated entries and briefs, one rule between them ---------- */
.cards.news { gap: 0; }
.cards.news .card { padding: 1.75rem 0; border-top: 1px solid var(--rule); }
.cards.news .card:first-child { padding-top: 0; border-top: 0; }
.cards.news .card[hidden] { display: none; }
.cards.news .card.brief h2 { margin-top: 0; }
.cards.news .card h2 { text-wrap: balance; }
.cards.news .card p.sum { max-width: 40rem; text-wrap: pretty; }
.card .topic { color: var(--link); }
.card p.src {
  margin: 0 0 0.45rem; font-family: var(--display); font-size: 0.8rem; line-height: 1.45; color: var(--faint);
}
.cards.news .card .links { margin: 0.7rem 0 0; }

/* ---------- topics: shown by the page's script once there are two or more ---------- */
.topics {
  display: flex; flex-wrap: wrap; gap: 0.2rem 1.15rem; margin: 0 0 1.75rem; padding: 0.5rem 0;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
}
.topics[hidden] { display: none; }
.topics button {
  appearance: none; -webkit-appearance: none; margin: 0; padding: 0.3rem 0 0.2rem; border: 0;
  border-bottom: 0.14rem solid transparent; border-radius: 0; background: none; cursor: pointer;
  font-family: var(--display); font-weight: 500; font-size: 0.74rem; line-height: 1.3; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.topics button:hover { color: var(--ink); }
.topics button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.topics button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- an item's page ---------- */
.dek { font-style: normal; }
.references li .t a.url { display: block; margin-top: 0.1rem; }
.article-body + .references { margin-top: 2rem; }

/* ---------- earlier news: a plain list ---------- */
.archive { list-style: none; margin: 0; padding: 0; }
.archive li {
  display: grid; grid-template-columns: 9.5rem 1fr auto; gap: 0.2rem 1rem; align-items: baseline;
  padding: 0.6rem 0; border-top: 1px solid var(--rule);
}
.archive time, .archive .topic {
  font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--faint);
}
.archive a { color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 600; }
.archive a:hover { color: var(--link); }

/* ---------- the preview kept in _news/preview (never on the site) ---------- */
.preview-note {
  margin: 0 0 1.75rem; padding: 0.7rem 0.95rem; background: var(--panel); border-left: 0.2rem solid var(--accent);
  border-radius: 0 0.3rem 0.3rem 0; font-size: 0.9rem; line-height: 1.55; color: var(--ink);
}
.preview-note code { font-family: var(--mono); font-size: 0.82em; overflow-wrap: anywhere; }
.card p.waiting {
  margin: 0 0 0.5rem; font-family: var(--display); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: #9a5b00;
}
.card a.thumb + p.waiting { margin-top: 0.8rem; }
.card p.waiting + h2 { margin-top: 0; }

@media screen and (max-width: 560px) {
  .archive li { grid-template-columns: 1fr auto; }
  .archive li a { grid-column: 1 / -1; grid-row: 2; }
}
