/*
  The patch notes page (/fr/nouveautes/, /whats-new/, scripts/build_patch_notes.ts). Phone first: one column, the
  topics in a row that scrolls; from 900 px the filters stand in a column of their own beside the updates. Every
  colour is a token of styles.css, set in both themes: a change's type reads from the game's own inks (the live
  green for a new thing, the Feed's sky for an improvement, grey for a fix).
*/
.pn { padding-bottom: 8px; }
.pn ul { list-style: none; margin: 0; padding: 0; }
.pn h1, .pn h2, .pn h3, .pn h4 { color: var(--heading); font-weight: 900; text-align: left; }
/* The site centres its section titles, pads every section and balances every list item: this page reads from one
   left edge, sets its own gaps, and lets running text fill its lines. */
.pn .pn-sec, .pn .pn-end { padding: 0; }
.pn li, .pn p { text-wrap: pretty; }

/* ---- head ---- */
.pn-head { padding: 28px 0 0; }
.pn-eyebrow { margin: 0; color: var(--gold-text); font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.pn-head h1 { margin: 6px 0 8px; font-size: clamp(30px, 8vw, 48px); line-height: 1.08; text-wrap: balance; }
.pn-lead { margin: 0 0 4px; color: var(--muted); font-size: 17px; line-height: 1.45; text-wrap: pretty; }
.pn-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 520px; margin: 14px 0 0; }
.pn-stats li { padding: 10px 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 700; line-height: 1.2; text-align: center; }
.pn-stats b { display: block; margin-bottom: 2px; font-size: 26px; font-weight: 900; line-height: 1.1; }
.pn-stat-new b { color: var(--live-ink); }
.pn-stat-improved b { color: var(--feed-want); }
.pn-stat-fixed b { color: var(--text); }
/* « En bref »: the period in five lines, before its updates. */
.pn-brief { max-width: 720px; margin: 18px 0 6px; padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 14px; background: var(--surface); }
.pn .pn-brief h2 { margin: 0 0 6px; color: var(--muted); font-size: 13px; font-style: normal; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.pn .pn-brief ul { display: grid; gap: 6px; padding-left: 20px; list-style: disc; }
.pn-brief li { color: var(--text); font-size: 16px; font-weight: 700; line-height: 1.45; }
.pn-brief li::marker { color: var(--gold); }
.pn .btn.pn-play { display: inline-flex; align-items: center; justify-content: center; width: auto; min-height: 52px; margin: 0; padding: 0 34px; font-size: 20px; text-decoration: none; }
.pn-jump { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--gold-text); font-size: 16px; font-weight: 800; text-decoration: none; }
.pn-down { width: 18px; height: 18px; }

/* ---- sections ---- */
.pn-sec { margin-top: 44px; }
.pn-sec > h2 { margin: 0 0 4px; font-size: clamp(24px, 6vw, 32px); line-height: 1.15; }
.pn-sub { margin: 0 0 16px; color: var(--muted); font-size: 16px; line-height: 1.45; }

/* ---- the new games: two a row on a phone, four on a computer ---- */
.pn-games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 721px) { .pn-games { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.pn-game { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: inherit; text-decoration: none; }
.pn-game:active { transform: translateY(1px); }
.pn-game-art { position: relative; display: block; aspect-ratio: 7 / 5; overflow: hidden; background: var(--surface-2); }
.pn-game-art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.pn-game-art img.cover { object-fit: cover; }
.pn-game-art img.contain { object-fit: contain; padding: 8px; box-sizing: border-box; }
.pn-game-txt { display: flex; flex: 1; flex-direction: column; gap: 3px; padding: 10px 12px 12px; }
.pn-game-txt b { color: var(--heading); font-size: 17px; font-weight: 900; line-height: 1.2; }
.pn-game-txt span { color: var(--muted); font-size: 14px; line-height: 1.38; }
.pn-game-txt small { margin-top: auto; padding-top: 6px; color: var(--gold-text); font-size: 12px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }

/* ---- the headlines: one a row on a phone, the Card War across the whole width ---- */
.pn-feats { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 721px) { .pn-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
.pn-feat > a { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; height: 100%; box-sizing: border-box; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: inherit; text-decoration: none; }
.pn-feat > a:active { transform: translateY(1px); }
.pn-icon { display: block; width: 64px; height: 64px; }
.pn-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pn-feat-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pn-tag { color: var(--gold-text); font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.pn-feat-txt > b { color: var(--heading); font-size: 18px; font-weight: 900; line-height: 1.25; text-wrap: balance; }
.pn-feat-body { color: var(--muted); font-size: 15px; line-height: 1.45; }
.pn-go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; color: var(--gold-text); font-size: 15px; font-weight: 900; }
.pn-arrow { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.pn-feat-big { grid-column: 1 / -1; }
.pn-feat-big > a { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 12px 12px 18px; }
.pn-shot { display: flex; justify-content: center; padding: 16px; border-radius: 14px; background: var(--surface-2); }
.pn-shot img { display: block; width: auto; height: 340px; max-width: 100%; object-fit: contain; border: 1px solid var(--line); border-radius: 18px; }
.pn-feat-big .pn-feat-txt { padding: 0 6px; }
.pn-feat-big .pn-feat-txt > b { font-size: clamp(22px, 5.6vw, 28px); }
.pn-feat-big .pn-feat-body { font-size: 16px; }
.pn-points { display: grid; gap: 6px; margin: 8px 0 0; }
.pn-points li { position: relative; padding-left: 26px; color: var(--text); font-size: 15px; font-weight: 700; line-height: 1.35; }
.pn-points li::before { content: ""; position: absolute; left: 4px; top: 3px; width: 6px; height: 11px; border: solid var(--live-ink); border-width: 0 3px 3px 0; border-radius: 1px; transform: rotate(45deg); }
@media (min-width: 721px) {
  .pn-feat-big > a { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px; padding: 24px 24px 24px 28px; }
  .pn-feat-big .pn-shot { order: 2; }
  .pn-feat-big .pn-feat-txt { padding: 0; }
  .pn-shot img { height: 380px; }
}

/* ---- every update ---- */
.pn-log { scroll-margin-top: 110px; }
@media (min-width: 861px) { .pn-log { scroll-margin-top: 76px; } }
.pn-filters { margin: 0 0 14px; }
.pn-fgroup + .pn-fgroup { margin-top: 12px; }
.pn-flabel { margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.pn-row { display: flex; gap: 8px; }
.pn-kinds { flex-wrap: wrap; }
/* The topics are many: on a phone their row scrolls, the page does not. */
.pn-areas { overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scroll-padding-inline: 16px; scrollbar-width: none; }
.pn-areas::-webkit-scrollbar { display: none; }
.pn-chip { display: inline-flex; flex: none; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.pn-chip:active { transform: translateY(1px); }
.pn-n { color: var(--muted); font-size: 13px; font-weight: 700; }
.pn-chip[aria-pressed="true"] { border-color: var(--active-bg); background: var(--active-bg); color: var(--active-ink); }
.pn-chip[aria-pressed="true"] .pn-n { color: var(--active-ink); }
/* A choice that would show nothing: still there, drawn as what cannot be used. */
.pn-chip.is-zero:not([aria-pressed="true"]) { border-style: dashed; background: none; color: var(--muted); }
@media (hover: hover) {
  .pn-game:hover, .pn-feat > a:hover { border-color: var(--muted); }
  .pn-jump:hover, .pn-chip:not([aria-pressed="true"]):hover { border-color: var(--muted); }
}
@media (min-width: 900px) {
  .pn-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
  .pn-filters { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; margin: 0; }
  /* Beside the list the filters read as a menu: one choice a line, its count at the end. */
  .pn-row, .pn-areas { flex-direction: column; gap: 4px; overflow: visible; margin: 0; padding: 0; }
  .pn-chip { justify-content: space-between; width: 100%; }
}

.pn-count { margin: 0 0 8px; color: var(--muted); font-size: 15px; font-weight: 700; }
.pn-count b { color: var(--text); font-weight: 900; }
.pn-empty { margin-top: 12px; padding: 28px 16px; border: 1px dashed var(--line); border-radius: 16px; text-align: center; }
.pn-empty p { margin: 0 0 12px; color: var(--muted); font-weight: 700; }

/* An update, as a game's patch notes print one: its date, its name, then its changes by [TOPIC], one line each. */
.pn-day { border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 14px; background: var(--surface); }
.pn-recent { padding: 18px 16px 6px; }
.pn-recent + .pn-recent { margin-top: 14px; }
.pn-recent:first-of-type { border-left-color: var(--gold); }
.pn-date { display: block; margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.pn-recent h3 { margin: 4px 0 6px; font-size: clamp(20px, 5vw, 24px); line-height: 1.2; }
.pn-cat { margin: 14px 0; }
.pn .pn-cat h4 { margin: 0 0 6px; color: var(--muted); font-size: 14px; font-weight: 900; letter-spacing: .06em; }
.pn .pn-cat ul { display: grid; gap: 8px; padding-left: 20px; list-style: disc; }
.pn-item { color: var(--text); font-size: 16px; line-height: 1.5; }
.pn-item::marker { color: var(--muted); }
.pn-item.pn-new::marker { color: var(--live-ink); }
.pn-item b { color: var(--heading); font-weight: 800; }
.pn-new-tag { display: inline-block; margin-right: 2px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--live-ink) 16%, transparent); color: var(--live-ink); font-size: 11px; font-weight: 900; letter-spacing: .05em; line-height: 1.6; text-transform: uppercase; vertical-align: 2px; }

/* The earlier updates fold under their title: the whole list reads at a glance, an update opens with one tap. */
.pn-old + .pn-old { margin-top: 8px; }
.pn-old > summary { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px 10px 16px; cursor: pointer; list-style: none; }
.pn-old > summary::-webkit-details-marker { display: none; }
.pn-sum { display: grid; gap: 2px; min-width: 0; }
.pn-sum b { color: var(--heading); font-size: 17px; font-weight: 900; line-height: 1.25; }
.pn-day-n { margin-left: auto; color: var(--muted); font-size: 14px; font-weight: 700; white-space: nowrap; }
.pn-chev { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.pn-old[open] .pn-chev { transform: rotate(180deg); }
.pn-day-body { padding: 0 16px 6px; border-top: 1px solid var(--line); }
@media (hover: hover) { .pn-old > summary:hover .pn-day-n { color: var(--text); } }

/* ---- the way back to the game ---- */
.pn .pn-end { margin: 48px 0 16px; padding: 28px 20px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); text-align: center; }
.pn-end h2 { text-align: center; margin: 0 0 6px; font-size: clamp(22px, 5.6vw, 28px); line-height: 1.2; text-wrap: balance; }
.pn-end p { margin: 0 0 16px; color: var(--muted); }
