/*
 * The page heading.
 *
 * WEB-1. These rules were written out three times -- identically, byte for
 * byte, in rankings.css, weekly.css and chart.css -- so changing the heading
 * meant changing it in three places and any page that got missed silently
 * drifted.
 *
 * The nav bar lived here too until WEB-12 moved it to nav.css: only four pages
 * load this sheet, and the nav is on every page.
 *
 * Loaded FIRST by the pages that use it, so a page sheet can still override.
 * That reordering is the risk this change carries and it was measured rather
 * than assumed -- see `test_no_rendered_element_matches_both_sides_of_a_
 * reordered_collision`.
 */

h1 {
    text-align: center;
    color: #ffffff;
    font-size: 3em;
    margin-bottom: 15px;
    text-shadow: 0 4px 8px rgba(0,0,0,0.4);
    font-weight: 200;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 20px 0;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.2em;
        letter-spacing: 1px;
        /* Side padding, not zero: the help button is `position: fixed` at the
           top right, and a title long enough to reach it -- "Lattice vs the
           Opening Line - 2025" is, on a phone -- runs underneath it. The
           padding is symmetric so the heading stays centred. */
        padding: 15px 56px;
    }

    h1::after {
        width: 100px;
        height: 2px;
    }
}

@media (max-width: 480px) {
    /* Smaller type buys back the lines the side padding above costs: the
       longest heading on the site fits the same three rows it did before the
       help button was cleared. */
    h1 {
        font-size: 1.9em;
        padding: 12px 48px;
    }
}
