/* Content pages with Astra's transparent masthead need the header in the page flow. */
body.page.ast-plain-container.ast-theme-transparent-header:not(.ast-page-builder-template):is(.bp-editorial-reading, :has(.bp-tutorials-v2)) #masthead {
    position: relative;
}

#ast-mobile-header .menu-toggle:focus-visible,
#primary :where(input, textarea, select, summary, button, a[href]):focus-visible {
    outline: 3px solid #256a9b;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px white;
}

/* Use the entire disclosure row as a keyboard and touch target. */
.bp-editorial-reading #primary .bp-reader-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .45rem;
    margin-block-end: 1rem;
}
.bp-editorial-reading #primary .bp-reader-trail ol {
    margin: 0;
    font-size: .84rem;
    line-height: 1.45;
}
.bp-editorial-reading #primary .bp-reader-trail li {
    margin: 0;
}
.bp-editorial-reading #primary .bp-reader-trail a {
    color: #28583e;
    text-underline-offset: .2em;
}
.bp-editorial-reading #primary .bp-reader-toc {
    margin: 0;
    padding: 0;
    background: #f3f7f3;
    border: 1px solid #cbdccd;
    border-radius: .55rem;
}
.bp-editorial-reading #primary .bp-reader-toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: .55rem .9rem;
    color: #214c34;
    list-style: none;
    font-size: .95rem;
    line-height: 1.35;
}
.bp-reader-toc summary::-webkit-details-marker { display: none; }
.bp-editorial-reading #primary .bp-reader-toc summary::after {
    content: "";
    width: .5rem;
    height: .5rem;
    margin-inline: .35rem;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: translateY(-2px) rotate(45deg);
}
.bp-editorial-reading #primary .bp-reader-toc[open] summary::after {
    transform: translateY(2px) rotate(225deg);
}
.bp-editorial-reading #primary .bp-reader-toc[open] nav {
    padding: .4rem 1rem .65rem;
    border-top: 1px solid #d8e4d9;
}
.bp-editorial-reading #primary .bp-reader-toc nav ul { margin: 0; padding: 0 0 0 1em; }
.bp-editorial-reading #primary .bp-reader-toc nav a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    line-height: 1.4;
}

/* Plain WordPress guides have no authored layout. Give their text a readable measure. */
.bp-editorial-reading.ast-plain-container #primary .entry-content:has(> article:not([class])) {
    box-sizing: border-box;
    width: min(100%, 58rem);
    margin-inline: auto;
}
.bp-editorial-reading #primary .entry-content > article:not([class]) > h1 {
    margin: 0 0 1.05rem;
    color: #142b32;
    font-size: clamp(2rem, 4.2vw, 3.15rem);
    line-height: 1.12;
    letter-spacing: -.028em;
    text-wrap: balance;
}
.bp-editorial-reading #primary .entry-content > article:not([class]) h2 {
    margin-block: 1.65em .45em;
    color: #17333a;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    line-height: 1.2;
    letter-spacing: -.018em;
}
.bp-editorial-reading #primary .entry-content > article:not([class]) :is(p, li, td, th) a:not([class]) {
    color: #236444;
    text-decoration: underline;
    text-underline-offset: .17em;
}
.bp-editorial-reading #primary .entry-content > article:not([class]) table th {
    background-color: #eef4f0;
    color: #193b32;
    text-align: start;
}
.bp-editorial-reading #primary .entry-content > article:not([class]) table :is(td, th) {
    border-color: #d6e2da;
    padding: .65rem .8rem;
    line-height: 1.5;
}
@media (min-width: 780px) {
    .bp-editorial-reading.ast-plain-container:has(.entry-content > article:not([class])) #content {
        background: #f5f7f5;
    }
    .bp-editorial-reading.ast-plain-container #primary .entry-content:has(> article:not([class])) {
        margin-block: .5rem 2.5rem;
        padding: clamp(1.75rem, 4vw, 3.4rem);
        background: #fff;
        border: 1px solid #dce5dd;
        border-radius: 1rem;
    }
    .bp-editorial-reading #primary .entry-content > article:not([class]) :is(p, ul, ol):not([class]) {
        max-inline-size: 75ch;
    }
}
@media (max-width: 600px) {
    #ast-mobile-header button.menu-toggle { min-width: 44px; min-height: 44px; }
    .bp-editorial-reading #primary .bp-reader-toc nav a { min-height: 44px; }
    .bp-editorial-reading #primary .entry-content > article:not([class]) { line-height: 1.65; }

    /* Keep search close to the title while preserving native tab order. */
    #primary .bp-tutorials-v2 { width: 100%; padding-top: 0; }
    #primary .bp-tut-hero { gap: 1rem; padding: 1.1rem; border-radius: 1rem; }
    #primary .bp-tut-hero h1 {
        margin: 0 0 .5rem;
        font-size: clamp(1.95rem, 7.8vw, 2.7rem);
        line-height: 1.08;
    }
    #primary .bp-tut-hero .bp-tut-lead { margin: 0 0 .85rem; font-size: 1rem; line-height: 1.48; }
    #primary .bp-tut-hero .bp-tut-eyebrow,
    #primary .bp-tut-search-panel__icon { display: none !important; }
    #primary .bp-tut-hero .bp-tut-actions { flex-flow: row wrap; gap: .45rem; }
    #primary .bp-tut-hero .bp-tut-button {
        width: auto; min-height: 44px; padding: .5rem .75rem; font-size: .92rem;
    }
    #primary .bp-tut-search-panel { padding: .85rem; border-radius: .65rem; }
    #primary .bp-tut-search-panel p { margin: .2rem 0 .6rem; }
    #primary .bp-tut-search-panel input { min-height: 46px; font-size: 16px; }

    .proxy-tester .proxy-tester__hero-panel {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: .25rem .55rem;
        align-items: baseline;
        min-height: 0;
        padding: .7rem .9rem;
    }
    .proxy-tester .proxy-tester__hero-panel strong { margin: 0; font-size: 1.4rem; line-height: 1.2; }
    .proxy-tester .proxy-tester__hero-panel span { margin: 0; }
    .proxy-tester .proxy-tester__hero-panel small { grid-column: 1 / -1; margin: 0; }
}
