/* The news page (/news): a post per week of new games, trainer updates and
   app changes. Colours come from the tokens in /styles.css only. */

.nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

.news-hero { padding: 56px 0 28px; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.news-hero h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.08; font-weight: 800; }
.news-hero .lede { margin-top: 14px; max-width: 640px; }
.news-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 26px; }

.news-body { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 48px; padding: 40px 0 72px; align-items: start; }

/* Posts */
.posts { display: grid; gap: 28px; min-width: 0; }
.post {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 30px 30px; scroll-margin-top: 88px;
}
.post.latest { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; color: var(--muted); }
.post-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 11px; border-radius: 999px;
  background: var(--primary-soft); color: var(--on-primary-soft); font-weight: 600; font-size: 13px;
}
.post-announcement .post-tag { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--text); }
.post-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.post-link { margin-left: auto; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; color: var(--muted); }
.post-link:hover { background: var(--surface-2); color: var(--text); }
.post-link.copied { color: var(--ok); }
.post-link .i { width: 18px; height: 18px; }
.post-head h2 { margin-top: 14px; font-size: clamp(22px, 3vw, 28px); line-height: 1.2; font-weight: 800; }
.post-summary { margin-top: 10px; color: var(--text-2); font-size: 16.5px; max-width: 46em; }

.post-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.post-stats div { display: flex; align-items: baseline; gap: 8px; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.post-stats b { font: 800 22px/1 var(--font-display); letter-spacing: -.02em; }
.post-stats span { color: var(--text-2); font-size: 14px; }

.post-sec { margin-top: 30px; }
.post-sec h3 { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.post-sec .count { font: 600 12px/1 var(--font); padding: 4px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }

.news-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.news-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; }
.news-card .card-title { min-height: 0; }
.card-note { margin-top: 6px; font-size: 13px; color: var(--text-2); line-height: 1.4; }
.new-tag {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  padding: 3px 8px; border-radius: 999px;
  background: var(--ok); color: #fff; font: 700 11px/1.2 var(--font); letter-spacing: .04em; text-transform: uppercase;
}
.show-all { margin-top: 14px; }

.upds { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.upd { display: flex; gap: 14px; align-items: center; padding: 10px; margin: 0 -10px; border-radius: var(--radius-sm); }
.upd:hover { background: var(--surface-2); }
.upd-thumb { flex: none; width: 108px; border-radius: 8px; }
.upd-thumb .gen span { font-size: 11px; }
.upd-text { min-width: 0; }
.upd-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.upd-title { font-weight: 600; }
.upd-title:hover { color: var(--primary); }
.upd-text p { margin-top: 2px; color: var(--text-2); font-size: 14.5px; }
.kind { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--text-2); }
.kind .i { width: 14px; height: 14px; }
.kind-cheat { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.kind-patch { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.kind-store { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }

.app-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.app-list li { display: flex; gap: 12px; color: var(--text-2); }
.app-list .i { width: 18px; height: 18px; margin-top: 3px; color: var(--muted); }

.post-prose { margin-top: 16px; display: grid; gap: 12px; color: var(--text-2); max-width: 46em; }
.post-cta { margin-top: 20px; }

/* Side column */
.news-side { position: sticky; top: 88px; display: grid; gap: 16px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.side-card h2 { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.side-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side-stats b { display: block; font: 800 26px/1.1 var(--font-display); letter-spacing: -.02em; }
.side-stats span { font-size: 13px; color: var(--text-2); }
.archive { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.archive a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; color: var(--text-2); border-top: 1px solid var(--line); }
.archive li:first-child a { border-top: 0; }
.archive a:hover { color: var(--primary); }
.archive span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive time { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.side-cta p { font-size: 14px; color: var(--text-2); margin-bottom: 14px; }

/* The landing page's band of this week's news (home-news.js) */
.news-band { padding: 56px 0; background: var(--bg-alt); border-block: 1px solid var(--line); }
.news-band-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; margin-bottom: 24px; }
.news-band-head .eyebrow { width: 100%; }
.news-band-head h2 { flex: 1 1 420px; font-size: clamp(22px, 3vw, 30px); line-height: 1.18; font-weight: 800; max-width: 760px; }
.news-band-body { display: grid; gap: 18px; }
.news-band .news-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.news-band .card-note { display: none; }
.news-band-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 16px; }
.news-band-side .upds { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 16px; }
.news-band-side .upd { margin: 0; }
.news-band-side h3 { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.news-band-side .upd-thumb { width: 84px; }
.news-band-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--primary); font-weight: 600; font-size: 14px; }
.news-band-more .i { width: 16px; height: 16px; }
.news-band-more:hover { text-decoration: underline; }
.news-band-head .btn .i { width: 16px; height: 16px; }

@media (max-width: 980px) {
  .news-band-side .upds { grid-template-columns: minmax(0, 1fr); }
  .news-body { grid-template-columns: minmax(0, 1fr); }
  .news-side { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 760px) {
  .news-band .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post { padding: 22px 18px 24px; }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .upd-thumb { width: 84px; }
  .news-bar .btn { width: 100%; justify-content: center; }
}
