/* HRUG reading refinements */
html[data-hrug-mode] .home.page #page .entry-content > p:first-child {
    max-inline-size: 65ch;
    text-wrap: pretty;
}

html[data-hrug-mode] .single-post #page h1.entry-title {
    font-size: clamp(36px, 4.15vw, 60px);
    line-height: 1.1;
    letter-spacing: -.03em;
}
html[data-hrug-mode] .single-post #page .entry-content > p:not(.alignwide, .alignfull) {
    max-inline-size: 69ch;
    text-wrap: pretty;
}
html[data-hrug-mode] .single-post #page .entry-meta time {
    font-variant-numeric: tabular-nums;
}

#masthead .hrug-appearance :is(.hrug-sun, .hrug-moon) {
    width: 20px;
    height: 20px;
}
@media (max-width: 768px) {
    html[data-hrug-mode] #masthead .menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }
    html[data-hrug-mode] #masthead .menu-toggle .icon-menu-bars svg {
        width: 18px;
        height: 18px;
    }
    html[data-hrug-mode] #masthead .main-navigation .main-nav > ul > li > a {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    /* Change the paper and ink together so the text keeps its contrast. */
    html[data-hrug-mode] :is(body.wp-theme-generatepress, #masthead, .site-info, #page .widget, #page a),
    #masthead .hrug-appearance, #masthead .hrug-appearance button {
        transition: none;
    }
    #masthead .hrug-appearance::before {
        transition: transform 190ms cubic-bezier(.2, .75, .25, 1);
    }
    #masthead .hrug-appearance button :is(.hrug-sun, .hrug-moon) {
        transition: transform 150ms cubic-bezier(.2, .75, .25, 1);
    }
    #masthead .hrug-appearance button[aria-pressed="false"] :is(.hrug-sun, .hrug-moon) {
        transform: scale(.93);
    }
    #masthead .hrug-appearance button:active :is(.hrug-sun, .hrug-moon) {
        transform: scale(.88);
        transition-duration: 85ms;
    }
}
@media (forced-colors: active) {
    #masthead .hrug-appearance :is(.hrug-sun, .hrug-moon) {
        forced-color-adjust: none;
        background-color: ButtonText;
    }
    #masthead .hrug-appearance button[aria-pressed="true"] {
        outline: 1px solid Highlight;
        outline-offset: -3px;
    }
    #masthead .hrug-appearance button:focus-visible {
        outline: 2px solid Highlight;
        outline-offset: 2px;
    }
}

/* Display the original HRUG artwork on both reading backgrounds. */
#masthead .site-logo img.header-image[src*="hrug-logo-day"] {
    width: 116px;
    height: auto;
}

:root[data-hrug-mode="dark"] #masthead .site-logo img.header-image[src*="hrug-logo-day"] {
    content: url("/wp-content/uploads/2026/11/hrug-logo-night.png");
}

@media (max-width: 768px) {
    #masthead .site-logo img.header-image[src*="hrug-logo-day"] {
        width: 88px;
    }
}