/* New CSS for every page. The old /css files are byte copies and stay untouched (Q-17). Numbers are measured, never
   copied from the old CSS: see docs/acceptance/chrome.md for each measurement. */

/* D-14: the shared header pads body by its bar plus a 15px gap (header-dark.css `body.has-stardock-header`:
   calc(33px + 15px), calc(44px + 15px) at 850px and below). Here the gap showed as a black strip between the bar and
   the page art, so body is padded by the bar alone. If header/v1 changes its bar height, change these two numbers
   and the background-position and scroll-padding values below with it. */
body.has-stardock-header {
    padding-top: 33px;
}

@media (max-width: 850px) {
    body.has-stardock-header {
        padding-top: 44px;
    }
}

/* D-02 + Q-10. The old chrome is absolutely positioned against body (left:50% plus a negative margin). The shared
   header is fixed and pads body (33px; 44px at 850px and below, D-14 above), but absolute boxes ignore their
   containing block's padding, so the form becomes the containing block: everything moves down by exactly the
   header's padding and keeps its positions relative to each other. min-width 948 is the frame's width
   (div.container, chrome.md CHROME-14): below it the old page cut off its left side and could not be scrolled to
   (CHROME-02); now the whole frame shows and the page scrolls sideways instead, so the GAMEPLAY dropdown is reachable. */
body > form {
    position: relative;
    min-width: 948px;
}

/* The page art (html, fixed, centre top, CHROME-10) moves down with the logo so the two still line up.
   #anchor jumps (/store#outlaw_sectors from the DLC nav link, and the other store anchors) land just below the fixed
   header bar (and the sale banner, Q-25) instead of under them: the old site put the target at the top of the window
   (store, 1600, getBoundingClientRect top -0.4px); the bar is 33px tall, 44px at 850px and below (.header-container, measured at 1600/1059/851 and 850/768/390). */
html {
    background-position: 50% calc(33px + var(--sale-banner-h, 0px));
    scroll-padding-top: calc(33px + var(--sale-banner-h, 0px));
}

@media (max-width: 850px) {
    html {
        background-position: 50% calc(44px + var(--sale-banner-h, 0px));
        scroll-padding-top: calc(44px + var(--sale-banner-h, 0px));
    }
}

/* TRIAGE "Fix": the GameSpot review link 404s, so its name is plain text. Colour, display and spacing of the
   review links (chrome.md CHROME-32: rgb(255, 154, 0), block, margin-bottom 2px), without a link's underline. */
#rebellion_reviews .review-source {
    color: #ff9a00;
    display: block;
    margin-bottom: 2px;
}

/* Q-25: the estate sale banner (CHROME-78, fixed, top 0, z-index 1000 in its own CSS) sits directly below the shared
   header (33px; 44px at 850px and below), under the header's menus, and the page moves down by its height while it
   shows (--sale-banner-h, set by sins1-shell.js; 0 when closed). body > raises specificity over the banner's CSS,
   which is added later. */
body > #notification-message {
    top: 33px;
    z-index: 999;
}

body > form {
    margin-top: var(--sale-banner-h, 0px);
}

@media (max-width: 850px) {
    body > #notification-message {
        top: 44px;
    }
}

/* D-15: a large heading inside a post must not overlap itself when it wraps. site.css sets body { line-height: 1.33em },
   which computes once at 13px (17.29px) and is inherited as that fixed value, so a 32px heading's lines sat 23px apart
   (measured 2026-10-30 on the home page, post "Stardock Launches Expanded Publishing Program with Crimson Freedom",
   old site and new alike). Headings inside post content, and everything inside them, now take 1.2 of their OWN font
   size, never less than the old 17.29px. Body text, post titles (header) and footers keep the old spacing. */
article > :not(header):not(footer) :is(h1, h2, h3, h4, h5, h6),
article > :not(header):not(footer) :is(h1, h2, h3, h4, h5, h6) *,
article > :is(h1, h2, h3, h4, h5, h6):not(header *),
article > :is(h1, h2, h3, h4, h5, h6):not(header *) * {
    line-height: max(1.2em, 17.29px);
}
