/* Patch notes page (js/patch-notes.js): the current client strip and the entries on a timeline. */

/* The banner reuses the Info page's archive art until a page-patchnotes image is generated
   (tools/generate-art.mjs, docs/branding.md). */
.art-patchnotes { --art: url("/img/brand/page-info.jpg"); }

/* --- current client ----------------------------------------------------------------------- */
.pn-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px 24px;
    padding: 1.25rem 1.5rem;
}
.pn-current-main { display: flex; align-items: center; gap: 14px; }
.pn-current-main img { flex-shrink: 0; }
.pn-current-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-hi);
}
.pn-current-version {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.25;
    color: #fff;
}
.pn-current-version .muted { font-family: var(--font); font-size: 0.9rem; font-weight: 400; }
.pn-current-note { font-size: 0.85rem; margin-top: 2px; }
.pn-current-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* --- coming up (upcoming.json) -------------------------------------------------------------- */
.pn-up-intro { margin: -0.4rem 0 1rem; font-size: 0.9rem; }
.pn-up-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.pn-up-item {
    padding: 14px 16px;
    border: 1px dashed rgba(252, 211, 77, 0.28);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
}
.pn-up-img {
    display: block;
    width: calc(100% + 32px);
    max-width: none;
    height: auto;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    margin: -14px -16px 12px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.pn-up-title {
    margin: 0 0 4px;
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    color: #fff;
}
.pn-up-text { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }

/* --- entries ------------------------------------------------------------------------------- */
.pn-list { position: relative; margin-top: 20px; padding-left: 28px; }
.pn-list::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent-line), rgba(143, 123, 255, 0.04));
}
.pn-entry { scroll-margin-top: calc(var(--header-h) + 16px); transition: border-color 0.3s, box-shadow 0.3s; }
/* the entry's dot on the timeline */
.pn-entry::after {
    content: "";
    position: absolute;
    left: -25px;
    top: 2.2rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}
.pn-entry.is-upcoming { border-style: dashed; border-color: rgba(252, 211, 77, 0.28); }
.pn-entry.is-upcoming::after { border-color: #fcd34d; box-shadow: none; }
.pn-entry.is-target {
    border-color: var(--accent-line);
    box-shadow: var(--shadow), 0 0 0 1px var(--accent-line), 0 0 44px rgba(143, 123, 255, 0.16);
}

/* The entry's picture (releases.json "image"): across the top of the card, in a 12:5 frame (2:1 on phones). */
.pn-image {
    display: block;
    width: calc(100% + 4rem);
    max-width: none;
    height: auto;
    aspect-ratio: 12 / 5;
    object-fit: cover;
    margin: -2rem -2rem 1.4rem;
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: 1px solid var(--line);
    background: var(--panel-solid);
}

.pn-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--faint);
}
.pn-title {
    margin: 12px 0 6px;
    text-align: left;
    font-size: 1.35rem;
    line-height: 1.3;
}
.pn-title a { color: #fff; }
.pn-title a:hover { color: var(--accent-hi); text-decoration: none; }
.pn-summary { margin: 0; color: var(--muted); line-height: 1.6; }

/* One change per row: the tags share a column, so the texts line up. */
.pn-changes {
    list-style: none;
    margin: 18px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 12px 14px;
    align-items: baseline;
}
.pn-changes li { display: contents; }
.pn-tag { justify-self: start; }
.pn-text { line-height: 1.6; }

@media (max-width: 600px) {
    .pn-current { padding: 1.1rem 1.1rem; }
    .pn-current-links { width: 100%; }
    .pn-current-links .btn { flex: 1; text-align: center; }
    .pn-list { padding-left: 0; }
    .pn-list::before,
    .pn-entry::after { display: none; }
    .pn-title { font-size: 1.2rem; }
    .pn-image { width: calc(100% + 2.5rem); margin: -1.25rem -1.25rem 1.1rem; aspect-ratio: 2 / 1; }
    .pn-up-list { grid-template-columns: 1fr; }
    .pn-changes { display: block; }
    .pn-changes li { display: block; margin: 0 0 12px; }
    .pn-changes li:last-child { margin-bottom: 0; }
    .pn-tag { margin-right: 6px; vertical-align: 1px; }
}
