/* [2026-11-01] Patch note page: numbered topics + a sticky "in this patch" rail, in the handbook's parchment palette. */
body.patchnote-body { overflow-x: clip; overflow-y: visible; }
.patchnote-body .header-container--compact { height: 95px; }
.patchnote-body .breadcrumbs { padding: 18px 42px; background: #13110fde; font-size: 13px; }
.patchnote-body .content { padding: 38px 36px 52px; }
.patchnote-body .content p { margin-bottom: 0; }

.pn-page { --pn-wine: #773843; --pn-ink: #463321; --pn-gold: #b58b49; --pn-new: #3f6b3a; --pn-improve: #a0772b; --pn-fix: #773843; --pn-other: #7b6446;
    display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.pn-page--single { grid-template-columns: minmax(0, 1fr); }
[data-kind='new'] { --pn-kind: var(--pn-new); }
[data-kind='improve'] { --pn-kind: var(--pn-improve); }
[data-kind='fix'] { --pn-kind: var(--pn-fix); }
[data-kind='other'] { --pn-kind: var(--pn-other); }

/* rail */
.pn-rail { position: sticky; top: 85px; max-height: calc(100dvh - 105px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #b79b65 transparent;
    background: linear-gradient(135deg, #dfcd9b77, #e6d5ad66); border: 1px solid #b79b655e; border-top: 2px solid #b18a48; border-radius: 4px; }
.pn-rail summary { cursor: pointer; list-style: none; }
.pn-rail summary::-webkit-details-marker { display: none; }
.pn-rail-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding: 16px 17px 14px; border-bottom: 1px solid transparent; }
.pn-rail-box[open] > .pn-rail-head { border-bottom-color: #aa83464d; }
.pn-rail-title { color: #523d26; font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.pn-rail-count { color: #93764a; font-size: 11px; }
.pn-chevron { margin-left: auto; color: #8b6835; font-size: 19px; line-height: 1; transition: transform .18s; }
.pn-rail-box[open] > summary > .pn-chevron { transform: rotate(180deg); }
.pn-rail-body { padding: 12px 9px 14px; }
.pn-toc, .pn-toc-sub, .pn-rail-more ul { list-style: none; margin: 0; padding: 0; }
.pn-toc { display: grid; gap: 2px; }
.pn-toc-link { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px; border: 1px solid transparent; border-radius: 3px; color: #604d34; font-size: 13px; font-weight: 600; line-height: 1.55; text-decoration: none; overflow-wrap: anywhere; transition: background .15s; }
.pn-toc-num { flex: 0 0 22px; color: var(--pn-kind, #aa8040); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pn-toc-link:hover { background: #fff6dc80; color: var(--pn-wine); }
.pn-toc-link[aria-current] { color: #fff0cd; border-color: #a57a48; background: linear-gradient(110deg, #81444c, #612f39); box-shadow: 0 3px 7px #67411e26; }
.pn-toc-link[aria-current] .pn-toc-num { color: #ddba76; }
.pn-toc-sub { margin: 2px 0 6px 41px; border-left: 1px solid #aa834640; }
.pn-toc-sublink { display: block; padding: 5px 8px 5px 12px; margin-left: -1px; border-left: 2px solid transparent; color: #6f5a3f; font-size: 12px; line-height: 1.5; text-decoration: none; overflow-wrap: anywhere; }
.pn-toc-sublink:hover { color: var(--pn-wine); }
.pn-toc-sublink[aria-current] { color: var(--pn-wine); font-weight: 600; border-left-color: var(--pn-wine); background: #7838420b; }
.pn-rail-more { margin-top: 16px; padding-top: 14px; border-top: 1px solid #aa834633; }
.pn-rail-group { display: flex; align-items: center; gap: 10px; margin: 0 9px 8px; color: #826438; font-size: 11px; font-weight: 700; letter-spacing: .5px; }
.pn-rail-group::after { content: ''; flex: 1; height: 1px; background: #aa834636; }
.pn-rail-more a { display: grid; gap: 2px; padding: 7px 10px; border-radius: 3px; color: #604d34; font-size: 12px; line-height: 1.5; text-decoration: none; }
.pn-rail-more a:hover { background: #fff6dc80; color: var(--pn-wine); }
.pn-rail-more time { color: #93764a; font-size: 11px; }

/* article */
.pn-main { min-width: 0; }
.pn-back { display: inline-block; margin-bottom: 14px; color: #825b2b; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-decoration: none; text-transform: uppercase; }
.pn-back:hover { color: var(--pn-wine); }
.pn-header { padding-bottom: 20px; margin-bottom: 22px; border-bottom: 1px solid #ab834745; }
.patchnote-body .content .pn-eyebrow { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin: 0 0 6px; color: #825b2b; font-size: 11px; font-weight: 700; letter-spacing: 1.6px; }
.pn-eyebrow span { color: var(--pn-gold); font-size: 8px; }
.pn-header h1 { margin: 0; color: var(--pn-ink); font-size: clamp(26px, 3vw, 36px); font-weight: 700; line-height: 1.35; text-wrap: balance; }
.patchnote-body .content .pn-meta { display: flex; flex-wrap: wrap; gap: 4px 9px; margin-top: 10px; color: #826c4e; font-size: 13px; }
.pn-hero { margin: 0 0 22px; padding: 6px; border: 1px solid #b8975959; border-radius: 4px; background: #eaddbd60; }
.pn-hero img { display: block; width: 100%; height: auto; max-height: 380px; object-fit: cover; border-radius: 2px; }
.patchnote-body .content .pn-lead { margin: 0 0 24px; padding: 15px 17px; border-left: 3px solid #a88449; background: #ead8a845; color: #755733; font-size: 15px; font-weight: 500; line-height: 1.8; }

.pn-doc { color: #53412e; font-size: 15px; line-height: 1.85; overflow-wrap: anywhere; }
.patchnote-body .pn-doc p { margin: 0 0 14px; }
.patchnote-body .pn-doc p:last-child { margin-bottom: 0; }
.pn-doc .pn-intro { margin-bottom: 20px; }
.pn-sec { margin: 0 0 30px; padding: 22px 24px 24px; background: linear-gradient(115deg, #fffbee, #fbf4e0); border: 1px solid #baa16e5e; border-top: 3px solid var(--pn-kind); border-radius: 4px; box-shadow: 0 6px 18px #755b2910; }
.pn-doc h2 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid #b8965745; color: #613b2f; font-size: 21px; font-weight: 700; line-height: 1.5; scroll-margin-top: 100px; }
.pn-num { flex: 0 0 auto; color: var(--pn-kind, #ad8647); font-size: 23px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pn-doc > h2:not(:first-child) { margin-top: 34px; }
.pn-doc h3 { margin: 0 0 6px; color: #684633; font-size: 16px; font-weight: 700; line-height: 1.6; scroll-margin-top: 100px; }
.pn-doc > h3 { margin-top: 22px; }
.pn-sec-body { display: grid; gap: 12px; }
.pn-item { padding: 13px 16px 14px; background: #fffdf5; border: 1px solid #d7c49a80; border-left: 3px solid var(--pn-kind); border-radius: 3px; scroll-margin-top: 100px; }
.pn-item p { color: #5b4731; font-size: 14.5px; }
.pn-list, .pn-doc ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pn-list li, .pn-doc ul li { position: relative; padding-left: 20px; font-size: 14.5px; line-height: 1.8; }
.pn-list li::before, .pn-doc ul li::before { content: '◆'; position: absolute; left: 2px; top: 1px; color: var(--pn-kind, #b89353); font-size: 8px; }
.pn-doc ol { margin: 0 0 14px; padding-left: 22px; }
/* [2026-11-01] "| a | b |" lines in an item = a table (skill changes) */
.pn-item p + .pn-table-wrap, .pn-table-wrap + p { margin-top: 10px; }
.pn-table-wrap { margin-top: 4px; overflow-x: auto; border: 1px solid #d7c49a; border-radius: 3px; }
.pn-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.pn-table th, .pn-table td { padding: 7px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid #e6d8b5; }
.pn-table thead th { background: #efe2c2; color: #5c4128; font-size: 13px; font-weight: 700; white-space: nowrap; border-bottom: 2px solid #cdb27a; }
.pn-table tbody th { color: #4a2f22; font-weight: 600; white-space: nowrap; }
.pn-table td { color: #5b4731; }
.pn-table tbody tr:nth-child(even) > * { background: #fbf3df; }
.pn-table tbody tr:last-child > * { border-bottom: 0; }
.pn-table td:last-child { color: #4a2f22; font-weight: 700; }
/* [11-07] before / after numbers never break mid-number ("48 / 8%") on narrow screens: the 3rd column on is kept whole,
   the wrap scrolls sideways instead */
.pn-table tr > td:nth-child(n+3) { white-space: nowrap; }
.pn-item { min-width: 0; }	/* grid item: without it a wide table stretches the item past the section instead of scrolling */
.pn-doc img { max-width: 100%; height: auto; border-radius: 3px; }
.pn-doc figure { margin: 14px 0; text-align: center; }
.pn-doc strong { color: #4a2f22; }
.pn-doc a { color: var(--pn-wine); text-decoration: underline; }

.pn-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 30px; padding-top: 20px; border-top: 1px solid #ab834745; }
.pn-footer-link { color: #825b2b; font-size: 13px; font-weight: 600; text-decoration: none; }
.pn-footer-link:hover { color: var(--pn-wine); }

.pn-page a:focus-visible, .pn-page summary:focus-visible { outline: 2px solid #8b4350; outline-offset: 3px; }
.pn-doc [tabindex='-1']:focus { outline: none; }

@media (max-width: 1100px) {
    .patchnote-body .content { padding: 32px 26px 40px; }
    .pn-page { grid-template-columns: 215px minmax(0, 1fr); gap: 20px; }
    .pn-sec { padding: 20px; }
}
@media (max-width: 900px) {
    .pn-page { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .pn-rail { position: static; max-height: none; }
    .pn-rail-box[open] .pn-rail-body { max-height: 55dvh; overflow-y: auto; }
    .pn-rail-head { padding: 13px 17px; }
    .pn-toc-link { min-height: 42px; }
    .pn-toc-sublink { padding-top: 8px; padding-bottom: 8px; }
    /* Above the article and folded (patchnote.js), so the title is still the first thing on a phone. */
    .pn-rail { position: sticky; top: 76px; z-index: 5; box-shadow: 0 6px 14px #3a28141f; background: linear-gradient(135deg, #e8dab2f2, #efe2c0f2); }
}
@media (max-width: 560px) {
    .patchnote-body .header-container--compact { height: 76px; }
    .patchnote-body .breadcrumbs { padding: 14px 18px; }
    .patchnote-body .breadcrumbs .back { display: none; }
    .patchnote-body .content { padding: 26px 14px 30px; }
    .pn-header h1 { font-size: 25px; }
    .pn-hero img { max-height: 220px; }
    .pn-doc { font-size: 14px; }
    .pn-sec { padding: 16px 14px 18px; margin-bottom: 22px; }
    .pn-doc h2 { font-size: 18px; gap: 8px; }
    .pn-num { font-size: 20px; }
    .pn-item { padding: 11px 12px 12px; }
    .pn-table { font-size: 13px; }
    .pn-table th, .pn-table td { padding: 6px 9px; }
    .pn-footer { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .pn-page * { transition: none !important; } }
html:has(body.patchnote-body) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:has(body.patchnote-body) { scroll-behavior: auto; } }
