/****
This is custom-style.less => custom-style.css, needed for registering custom CSS into WordPress.
****/

@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.0/css/all.min.css");

:root {
    --header-bg: #002b5c;
    --nav-bg: #003a70;
    --logo-box-bg: #00ADEF;
    --accent-blue: #00ADEF;
    --white: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Shared look-and-feel tokens — keep in sync with job-openings.css
       (--job-openings-*) and the Jobs/News/Learn/Software/Fonts pages. */
    --brand-navy: #002b5c;
    --brand-blue: #0056b3; /* mid brand blue (≈ the requested #005CB9); ~7:1 on white */
    --brand-blue-deep: #004a99; /* CTA/icon blue used by hero-actions .btn-download and mission-card icons */
    --text-body: #1e293b;
    --text-muted-dark: #64748b;
    --border-soft: #e2e8f0;
    --border-medium: #cbd5e1;
    --page-bg-soft: #F8FAFC;
    /* News/Learn type-tag chips on the homepage Recent Posts. A single NEUTRAL grey
       treatment for both types — the solid icon + uppercase word carry the News-vs-
       Learn distinction, so no chip colour is needed (an earlier cyan/navy colour
       pair read too loud). Text + icon are navy (--brand-navy) for contrast. Cool
       grey drawn to sit with --border-soft / --page-bg-soft. */
    --tag-bg:     #eef2f7; /* cool grey-100, a touch bluer than --page-bg-soft */
    --tag-border: #d7e0ea; /* one step down from --border-medium */
    --tag-text:   #556273; /* muted slate for the resting tag label; darkens to navy
                              on direct hover (reads "bolder" without a weight/reflow
                              change), like .job-tech-tag. ~5.3:1 on --tag-bg (AA pass);
                              a bit darker than --text-muted-dark, which fails on this bg */
    --tag-hover-soft: rgba(0, 173, 239, 0.45); /* soft teal for the tag's card-hover
                              border (the intermediate of its 3 states); matches the raw
                              value in job-openings.css .job-card:hover .job-tech-tag */
    --font-sans: "Noto Sans", "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


.pdfdroplet_steps td {
    vertical-align: middle !important;
}

.up::before,
.up::after {
    content: "»";
    display: inline-block;
    margin: 0 6px;
    padding-bottom: 4px;
    -ms-transform: rotate(-90deg);
    -webkit-transform: rotate(-90deg);
    transform: rotate(-90deg);
}

.btn-donate {
    font-size: 17px;
    font-weight: bold;
    background-color: #0168A7;
    color: white;
    border-style: solid;
    border-width: 2px;
    border-radius: 14px;
    border-color: #0168A7;
    padding: 3px 15px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-donate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 43, 92, 0.2);
}

.wp-caption-text {
    text-align: center;
}

.grecaptcha-badge {
    visibility: hidden;
}

/*
.products .custom-logo {
	max-width: 80px !important;
}*/

.news-buttons {
    overflow-wrap: normal !important;
    word-break: keep-all !important;
}

a.no-bold {
    font-weight: normal !important;
}

.top.border,
div.top,
.top {
    display: none;
}

p.desc a,
a.read-more {
    display: none;
}

.navbar-default {
    background: var(--header-bg);
    border-radius: 0px;
}

.navbar-default .navbar-nav>li>a,
.navbar-default .navbar-nav>li>a:focus {
    color: var(--text-muted);
}

.navbar-default .navbar-nav>li>a:hover {
    color: var(--white);
}

.nav {
    margin-bottom: 0;
}

/* Shared "simple content page" header — matches the Jobs/News/Learn/Software
   Products header typography (bold navy H1, soft gray divider) for plain
   prose pages that keep their own sidebar/TOC instead of a filter bar.
   Used via views/page-{slug}.twig (currently Support, About). */
.simple-page-wrap {
    padding: 24px 0 0;
}

h1.simple-page-h1 {
    font-size: 36px;
    font-weight: 800;
    color: #002b5c;
    letter-spacing: -0.02em;
    line-height: 1.1;
    /* !important: h1.article-h1 (further down this file) sets margin-top/
       bottom: 1em — same specificity, later in source, so it wins the tie and
       silently adds its own 1em (= 36px, at THIS h1's own font-size) on top
       of the .simple-page-wrap padding above, doubling the gap above the
       title. Same mistake as the earlier Jobs/Software page-header fixes —
       always check for a same-specificity margin rule later in the file. */
    margin: 0 0 20px !important;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

@media (max-width: 759px) {
    h1.simple-page-h1 {
        font-size: 28px;
    }
}

/* Sidebar — minimal background refresh only (Round 1 of a broader look-and-
   feel pass, deferred). Swaps the flat grey #eee card for a white bordered
   card matching the Jobs/News/Software Products design tokens (border
   #e2e8f0, soft shadow). */
#sidebar_main {
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border-radius: 14px;
}

/* Indent + heading treatment, migrated here from the "Sidebar Modification"
   Custom CSS & JS snippet (wp-admin → Custom CSS & JS, post ID 13070) —
   that snippet only ever existed on the root site (each site's Custom CSS &
   JS posts are per-site, not shared), so subsite sidebars never got this
   same treatment even though the sidebar card itself looks the same
   everywhere. Centralizing it here in the theme standardizes root and every
   subsite on one copy instead of a per-site DB snippet that has to be
   manually replicated. See scripts/deploy/ for the migration that empties
   the now-redundant DB copy on the root site. */
#sidebar_main .menu {
    padding: 15px 0 0 15px;
}

/* margin-top trimmed from the original snippet's 1.75em: the card's own
   padding already establishes space above its content, so the full 1.75em
   floated the heading with more gap than intended — most noticeable when a
   logo image sits above it too. Mirrors the smaller 0.4em already used for
   the mobile "Helpful Links" disclosure panel just below (a few rules down),
   tuned separately for that narrower card. */
#sidebar_main h2 {
    position: relative;
    padding-bottom: 20px;
    margin-bottom: 10px;
    margin-top: 0.5em;
    text-align: center;
}

#sidebar_main h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 1px;
    background-color: var(--border-medium);
}

#page-title,
#page-site-name {
    background: #004789;
}

h1.page-header,
h2.page-header,
#page-site-lang-tech h2,
#page-breadcrumbs h2 {
    margin-left: 0px;
}

h1.page-header a {
    color: white;
    font-weight: normal;
}

h2.page-header>div.textwidget>p {
    margin: 0px;
}

.home-box-contents {
    background: #FFF;
}

.sub-site-home-box-contents {
    margin-left: 0px;
    margin-right: 0px;
    line-height: 28px;
}

h1.sub-site-title {
    text-align: center;
    margin-top: 0px;
    margin-bottom: 0.75em;
}

.blue-box-text {
    background: #004789;
    color: #FFF;
    padding: 15px;
    font-size: 12px;
    border-radius: 7px;
    font-style: initial;
}

.blue-box-text h2 {
    color: #FFF;
    margin: 0 0 10px 0;
    font-style: initial;
}

#home-sidebar {
    background-color: #004789;
}

#home-sidebar h3 {
    color: white;
}

@media (max-width: 991px) {
    #home-sidebar {
        margin-left: 0px;
    }
}

#page-site-lang-tech,
#page-breadcrumbs {
    background: #004789;
}

@media (max-width: 991px) {

    #page-site-lang-tech,
    #page-breadcrumbs {
        display: none !important;
    }
}

a {
    color: #0056b3;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: color 0.1s, text-decoration-color 0.1s;
    outline: none;
}

a:visited {
    color: #0056b3;
    /* rgba(255,255,255,0) = white once browser strips the alpha (privacy restriction) → invisible on white backgrounds */
    text-decoration-color: rgba(255, 255, 255, 0);
}

a:hover {
    color: #00ADEF;
    text-decoration-color: #00ADEF;
}

/* Holds hover appearance while the browser applies :visited styles on click.
   !important needed because the browser's :visited rendering pass uses a
   separate paint pass that ignores normal cascade ordering. */
a.clicked-link,
a.clicked-link:visited {
    color: #00ADEF !important;
    text-decoration-color: #00ADEF !important;
}

a:focus {
    color: #0056b3;
    text-decoration-color: transparent;
    outline: none;
}

a:focus-visible {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

span.browseNewsPosts,
span.browseTitle {
    color: #004789 !important;
}

a.customize-unpreviewable {
    color: #004789;
}

/* Headings — deep navy + bold, matching the Jobs/News/Learn/Software/Fonts
   pages, with a slight negative tracking that Noto Sans wears well at
   display sizes. */
h1,
h2,
h3,
h4,
.textwidget h3 {
    color: var(--brand-navy);
}

h1,
h2 {
    font-weight: 700;
    letter-spacing: -0.01em;
}

h3,
h4 {
    font-weight: 600;
}

#home_primary h2,
#home_secondary h2 {
    font-weight: bold;
    font-style: normal;
}

body {
    font-family: var(--font-sans);
}

div.trifold {
    text-align: center;
    line-height: 27px;
}

img.rl-image-widget-image,
div.trifold img {
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    height: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: none;
}

.trio-widget > div:first-child {
    padding: 0 !important;
    background: transparent !important;
    border-radius: 12px;
}

/* Image fills its container's own width exactly — no separate hardcoded
   max-width here, so it can't silently drift out of sync with the container
   size again (this replaced a 585px container holding a 300px image, leaving
   a visibly empty gap — the root homepage's photos are high-resolution
   enough that filling the container doesn't upscale/blur them). */
.trio-widget > div > .rl-image-widget-image {
    max-width: 100%;
}

@media (max-width: 991px) {
    img.rl-image-widget-image {
        max-width: 400px;
    }
}

@media (max-width: 759px) {
    img.rl-image-widget-image {
        max-width: 100%;
    }
}

#testimonial {
    /* Navy scrim over the photo keeps the quote readable at any image */
    background:
        linear-gradient(rgba(0, 33, 66, 0.65), rgba(0, 33, 66, 0.65)),
        url(../images/testimonial-bg.jpg) center / cover no-repeat;
    color: #ffffff;
    padding: 34px 0;
}

#testimonial p,
#testimonial .textwidget {
    font-size: 20px;
    font-style: italic;
    font-weight: 400;
    line-height: 1.6;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}


#home_secondary {
    background-color: white;
}

#home_secondary h2 {
    text-align: center;
    color: var(--brand-navy);
    font-weight: 700;
    /* Zeroed (matches .mission-cards-section .section-title's own
       margin-top:0) so #home_secondary's own padding-top below is the WHOLE
       gap, not a starting point that Bootstrap's default 21px h2 margin-top
       then adds on top of — that compounding is exactly what made the gap
       balloon to 77px total and read as "too much" empty space. */
    margin-top: 0;
    /* Bootstrap's default h2 margin-bottom (10.5px) read as cramped against
       the body text right below it — every other redesigned section (mission
       cards, trio) gives its heading noticeably more room to breathe. */
    margin-bottom: 18px;
}

/* Desktop AND mobile: #home_secondary carried NO top padding at all
   (style.css's base rule only sets a 15px bottom), so "Software & Standards" /
   "Recent Posts" sat only ~21px below the testimonial card above — cramped
   next to mission-cards-section's dedicated 80px transition. 40px matches the
   value already established by .trio-widget's own mobile top padding —
   deliberately less than mission-cards' 80px (this is a plainer, lower-
   emphasis pair of widgets, not a featured section) but still a real,
   generous transition. Same value at both sizes now that the h2's own
   margin-top is zeroed above, so there's no separate compounding to account
   for between desktop and mobile. */
#home_secondary {
    padding-top: 40px;
    /* Contain the stacked-layout full-bleed background band below (its ::before
       uses `width: 100vw; margin-left: -50vw` to reach the viewport edges, which
       overhangs by the scrollbar width and would add a horizontal scrollbar).
       `clip` (not `hidden`) trims that overhang without creating a scroll
       container, so it can't break sticky positioning; the band still spans the
       full visible width. */
    overflow-x: clip;
}

/* Phones: the two columns stack (col-sm-12) — see the background-band rule
   just below for how the two stacked widgets ("Software & Standards" /
   "Recent Posts") get a visible seam between them. */
@media (max-width: 991px) {

    /* A full-bleed background band (not a border line) distinguishes the
       stacked "Recent Posts"/"Training Resources" column from "Software &
       Standards" above it — matches the sitewide convention (established on
       another branch) of using color rather than horizontal rules to
       separate major sections. The ::before + 50vw/-50vw trick bleeds the
       background to the true viewport edges regardless of this column's own
       inset, without needing to track the container's padding value at each
       breakpoint (which itself differs: 15px vs the 20px introduced above). */
    #home_secondary .row > div + div {
        position: relative;
        z-index: 0;
        margin-top: 32px;
        padding-top: 32px;
        padding-bottom: 32px;
    }

    #home_secondary .row > div + div::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        width: 100vw;
        margin-left: -50vw;
        background: var(--page-bg-soft);
        z-index: -1;
    }
}

/* ── Homepage "FAQ Leader" (e.g. "Software & Standards") + "Recent Posts"
   widgets: pre-redesign typography/spacing refresh — GH issue #38 ──────────
   Both widgets render raw, unstyled admin-entered content (register_sidebar()
   in functions.php only wraps them in a bare <div>/<h2>), so they still carry
   Bootstrap-default paragraph/list spacing instead of the redesign's more
   generous body-copy feel used elsewhere (e.g. .mission-card p). */
#home_secondary .textwidget > p,
#home_secondary .textwidget > ul {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted-dark);
}

/* FAQ question headings — most subsites use <h4> for these (e.g. Andika:
   "What is new in version 7?"), but at least one (PTXprint) uses <h3>
   instead; both need the same fix. Bootstrap's default margin (10.5px, same
   top and bottom) made a question read as barely distinct from its own
   answer paragraph — every gap on the page was the same 10.5px rhythm, so
   nothing marked "a new question starts here" versus "this is still the same
   Q&A pair". Fixed with spacing, not weight/color: more margin ABOVE (clearly
   separates from the previous answer) than below (keeps the question closely
   paired with its own answer) — deliberately NOT bolder, since several of
   these headings already use an inline <strong> on one word for emphasis
   (e.g. "Who **else** can make use of this tool?"); making the whole heading
   bolder would erase that existing distinction rather than fix this one.
   Scoped to #home_secondary specifically so this doesn't touch the Recent
   Posts card's OWN <h3> (the source+date meta row, styled separately with
   its own margin:0 rule elsewhere, which is more specific and wins).

   font-weight is also forced here: style.css's old .textwidget h3 rule
   (meant for a different, unrelated purple/italic sidebar-widget style)
   sets font-weight:400 with higher specificity than the sitewide
   `h3, h4 { font-weight:600 }`, so PTXprint's <h3> questions were rendering
   NOT bold — same 400-weight as their own answer paragraph, which is why
   they read as barely distinguishable even after the margin fix above.
   Subsites using <h4> were unaffected (no equivalent .textwidget h4 rule
   exists) — this only restores the bold weight <h3> already should have
   had. See the near-identical .rssItem h3 font-size override a few lines
   down for the same underlying .textwidget h3 specificity problem. */
#home_secondary h3,
#home_secondary h4 {
    margin-top: 24px;
    margin-bottom: 10px;
    font-weight: 600;
}

#home_secondary h3:first-of-type,
#home_secondary h4:first-of-type {
    margin-top: 0;
}

/* Several subsites don't use a real <h3>/<h4> for the FAQ question at all —
   an audit across all subsites (2026-07-22) found the question authored as
   plain inline emphasis instead, in three variants: a whole <p> containing
   only a <b>/<strong>/<i>/<em> (audioprojectmanager, siltranscriber,
   onestoryeditor), or that same emphasis as the first thing in a <p>
   immediately followed by a <br> before the answer text on the same line
   (silkin, phonologyassistant, xlingpaper, pathway, taiheritage, asheninka,
   scriptureforge, labeler, illustrations). Either way the question renders
   in the muted body-text color/weight, indistinguishable from a real
   heading. The real fix is a content migration to <h4> — same as PTXprint's
   Training Resources migration (scripts/deploy/2026-07-22-ptxprint-training-
   resources-headings.php) — tracked as a follow-up; this is a CSS-only
   safety net restoring the same visual distinction in the meantime.
   Scoped tightly (only-child, or first-child immediately before a <br>) so
   it can't catch a genuine inline emphasis used mid-sentence elsewhere in
   these same widgets. */
#home_secondary .textwidget > p:has(> b:only-child),
#home_secondary .textwidget > p:has(> strong:only-child),
#home_secondary .textwidget > p:has(> i:only-child),
#home_secondary .textwidget > p:has(> em:only-child),
#home_secondary .textwidget > p:has(> b:first-child + br),
#home_secondary .textwidget > p:has(> strong:first-child + br),
#home_secondary .textwidget > p:has(> i:first-child + br),
#home_secondary .textwidget > p:has(> em:first-child + br) {
    margin-top: 24px;
    margin-bottom: 10px;
}

#home_secondary .textwidget > p:first-child:has(> b:only-child),
#home_secondary .textwidget > p:first-child:has(> strong:only-child),
#home_secondary .textwidget > p:first-child:has(> i:only-child),
#home_secondary .textwidget > p:first-child:has(> em:only-child),
#home_secondary .textwidget > p:first-child:has(> b:first-child + br),
#home_secondary .textwidget > p:first-child:has(> strong:first-child + br),
#home_secondary .textwidget > p:first-child:has(> i:first-child + br),
#home_secondary .textwidget > p:first-child:has(> em:first-child + br) {
    margin-top: 0;
}

#home_secondary .textwidget > p > b:only-child,
#home_secondary .textwidget > p > strong:only-child,
#home_secondary .textwidget > p > i:only-child,
#home_secondary .textwidget > p > em:only-child,
#home_secondary .textwidget > p > b:first-child:has(+ br),
#home_secondary .textwidget > p > strong:first-child:has(+ br),
#home_secondary .textwidget > p > i:first-child:has(+ br),
#home_secondary .textwidget > p > em:first-child:has(+ br) {
    color: var(--brand-navy);
    font-weight: 600;
}

#home_secondary .textwidget > ul {
    /* Restores the original ~40px browser-default <ul> indent (nothing in
       style.css resets it) — an earlier pass here shrank it to 1.3em (~21px),
       under-indenting the bullets versus how they looked before this refresh. */
    padding-left: 40px;
    margin-bottom: 16px;
}

#home_secondary .textwidget > ul > li {
    margin-bottom: 8px;
}

#home_secondary .textwidget > ul > li::marker {
    /* var(--accent-blue) (teal, #00ADEF) was only ~2.5:1 against white — this
       project already treats that as failing accessible-contrast bar for any
       meaningful UI mark (see job-openings.css's --job-openings-link-blue,
       created for the same reason). A bullet marker isn't literally "text"
       under WCAG 1.4.3, so it's a gray area rather than a hard failure, but a
       marker users are meant to actually see shouldn't be this faint — navy
       matches the headings above and is unambiguously visible. */
    color: var(--brand-navy);
}

#home_secondary .sil-button-container {
    margin-top: 20px;
}

/* "Recent Posts" (.rssItem, the LTNewsUpdates shortcode's output) — reworked
   to read like the News feed's card list (.feed-item in feed.css) instead of
   the old floated-logo layout: logo aside, source+date meta row, title,
   excerpt. feed.css isn't loaded on the homepage, so this reuses custom-
   style.css's own equivalent design tokens (--brand-navy/--accent-blue/
   --border-soft/--text-muted-dark match --feed-navy/--feed-cyan/--feed-border/
   --feed-text-muted — see CLAUDE.md's "Color tokens" note on the duplication).
   Grid (not flex) because .custom-logo-link/h3/.title/.desc are separate
   siblings in the shortcode's markup, not wrapped in a "body" container — grid
   lets the logo span every row via grid-row without needing that wrapper. */
#home_secondary .rssItem {
    position: relative; /* anchor for .rssItem-link below */
    /* Query container for the header layout: whether the source+date sit inline or
       stack (see the @container rule after the chip styles) keys off THIS card's own
       width, not the viewport. The card's width isn't monotonic with the viewport —
       Bootstrap's fixed .container steps make the 2-column card NARROWER at
       viewport 992-1199 (~455px) than the stacked card at 768-991 (~720px) — so a
       viewport media query can't cleanly catch every crowded case; the card's own
       width can, and makes every card flip together. */
    container-type: inline-size;
    display: grid;
    grid-template-columns: 56px 1fr;
    column-gap: 16px;
    row-gap: 4px;
    align-items: start;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 18px 20px;
    margin: 0 0 16px !important; /* overrides style.css's 1em 2em 2em 0 / 2.5em block spacing */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#home_secondary .rssItem:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 8px 20px -6px rgba(0, 43, 92, 0.12);
    transform: translateY(-2px);
}

/* Whole-card click target (see the rssItem-link anchor added in
   LTNewsUpdates2(), functions.php) — same stretched-link pattern as
   .feed-item-link in feed.css. The logo/blogname/title links still work as
   their own distinct destinations by sitting above the overlay (z-index 2). */
#home_secondary .rssItem .rssItem-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

#home_secondary .rssItem .custom-logo-link,
#home_secondary .rssItem h3 .blogname a,
#home_secondary .rssItem .title a {
    position: relative;
    z-index: 2;
}

#home_secondary .rssItem .custom-logo-link {
    grid-column: 1;
    /* Explicit span (not `1 / -1`): in an implicit grid, spanning to the -1
       line while the meta/title/desc rows below rely on auto-placement is
       unreliable — it inserted a large, inconsistent gap between the meta row
       and the title in testing. Naming all 3 rows explicitly (here and on the
       three siblings below) removes the ambiguity entirely. */
    grid-row: 1 / span 3;
    float: none !important; /* .textwidget .custom-logo-link in style.css floats it */
}

#home_secondary .rssItem .custom-logo-link > img,
#home_secondary .rssItem img.custom-logo {
    margin-right: 0 !important; /* grid's column-gap handles spacing now */
}

/* Card header: source + date sit inline on line 1, with the type chip pinned to
   the right and centred on that line. Below the width breakpoint further down,
   the date drops to its own second line so a long source name never collides with
   the chip — a width-based switch (every card flips together), not per-card. */
#home_secondary .rssItem h3 {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px 10px;
    margin: 0;
    font-size: 13px;
}

/* Source + date, inline. */
#home_secondary .rssItem h3 .rss-meta {
    display: flex;
    align-items: baseline;
    gap: 2px 10px;
    min-width: 0;
}

#home_secondary .rssItem h3 .blogname {
    min-width: 0; /* allow a long source name to shrink/wrap rather than shove the chip */
}

#home_secondary .rssItem h3 .blogname,
#home_secondary .rssItem h3 .blogname a,
#home_secondary .rssItem h3 .blogname a:visited {
    /* The visible text is the <a> INSIDE .blogname, not .blogname itself — a
       plain `.blogname { color }` rule never reaches it: the anchor gets its
       own color from the global `a { color: #0056b3 }` rule, which directly
       targets the <a> and so wins over a rule that only targets its parent.
       Target the anchor (and its :visited state) directly, matching how the
       real News feed's equivalent (.feed-source) is a class ON the <a> itself. */
    color: var(--brand-navy);
    font-weight: 700;
    text-transform: none;
}

#home_secondary .rssItem h3 .date {
    color: var(--text-muted-dark);
    font-weight: 400;
    text-transform: none;
    font-size: 12px;
}

/* News / Learn type tag: a neutral grey pill with the uppercase word only
   ("NEWS" / "LEARN"). An icon at chip size reads poorly at normal (1x) zoom, so
   the word alone names the type; both types share one neutral colour (an earlier
   cyan/navy pair read too loud). The label is uppercased in CSS (not the markup)
   so it stays translatable. flex-shrink:0 keeps the pill intact beside a long
   source name. */
#home_secondary .rssItem h3 .rss-type,
#home_secondary .rssItem h3 a.rss-type:visited {
    flex-shrink: 0;
    display: inline-block;
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
    color: var(--tag-text); /* muted at rest; beats the global `a { color:#0056b3 }` + a:visited */
    /* inset box-shadow (not border) so the 1px edge doesn't change the pill's size */
    background: var(--tag-bg);
    box-shadow: inset 0 0 0 1px var(--tag-border);
    /* sit above the card's stretched .rssItem-link (z-index:1) so the chip is its
       own click target — all News / all Learn — like the source and title links */
    position: relative;
    z-index: 2;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

/* The pill is a compact ~21px tall (to sit level with the source/date line, like
   .job-tech-tag), but it's a real link — extend just the tap target to ~25px (WCAG
   2.2 SC 2.5.8, 24px min) with a transparent overlay, without enlarging the pill. */
#home_secondary .rssItem h3 a.rss-type::before {
    content: "";
    position: absolute;
    inset: -2px 0;
}

/* Card hover (anywhere on the card, tag not yet hovered): a soft teal border hints
   the tag is interactive — the middle of the Jobs page's three tag states (rest →
   card-hover soft teal → direct-hover full teal; see .job-card:hover .job-tech-tag).
   The direct-hover rule below wins on both specificity and source order. */
#home_secondary .rssItem:hover a.rss-type {
    box-shadow: inset 0 0 0 1px var(--tag-hover-soft);
}

/* Clickable chip hover: keep the navy label, turn the border teal — the same
   accessible "navy text + teal accent" move the Jobs page uses on .job-tech-tag
   (teal as text on white fails WCAG AA, teal as a border accent does not). */
#home_secondary .rssItem h3 a.rss-type:hover,
#home_secondary .rssItem h3 a.rss-type:focus-visible {
    color: var(--brand-navy); /* darkens from the muted resting slate */
    text-shadow: 0 0 0.4px currentColor; /* the tiny crisp-up .job-tech-tag uses so it reads bolder, no reflow */
    box-shadow: inset 0 0 0 1px var(--accent-blue);
}

/* Keyboard focus needs a clearly visible ring (the teal border alone isn't enough
   for WCAG 2.4.7). Use the accessible brand blue (~7:1), not the teal accent. */
#home_secondary .rssItem h3 a.rss-type:focus-visible {
    outline: 2px solid var(--brand-blue);
    outline-offset: 2px;
}

/* Once a card gets narrow enough that the source + date + chip would crowd on one
   line, stack the date under the source and top-align the chip with the source
   line. Keyed to the CARD's width (container query), not the viewport, so it fires
   in every crowded case — the narrow 2-column desktop card (~455px, viewport
   992-1199) as well as small phones — and every card flips at the same width.
   Threshold measured: gap ≈ cardWidth − 444, so a ~490px content box leaves a
   comfortable ~90px gap before stacking; the ≥1200px desktop card (~515px content)
   stays comfortably inline. Older browsers without @container support fall back to
   inline, which is the harmless default. */
@container (max-width: 490px) {
    #home_secondary .rssItem h3 {
        align-items: flex-start;
    }
    #home_secondary .rssItem h3 .rss-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1px;
    }
}

#home_secondary .rssItem .title {
    grid-column: 2;
    grid-row: 2;
    clear: none;
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

#home_secondary .rssItem .title a {
    /* No text-decoration override: inherit the global link mechanism (an underline
       that is always present but transparent, revealed in teal on hover). Setting
       `text-decoration: none` here made the underline pop in NAVY for one frame
       before the 0.1s transition faded it to teal — the flash. Using the same
       mechanism as the source-name link (which never flashed) removes it. */
    color: var(--brand-navy);
}

#home_secondary .rssItem .title a:hover {
    /* Keep the text navy — the global `a:hover` would turn it teal (which fails
       WCAG AA on white, 2.55:1); the teal underline still comes from that global
       rule's text-decoration-color. */
    color: var(--brand-navy);
}

#home_secondary .rssItem .desc {
    grid-column: 2;
    grid-row: 3;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted-dark);
    /* Cap the excerpt at 3 lines — this card's text column is roughly half
       the width of the real News feed's (this widget sits 2-up in
       #home_secondary vs. the feed page's single full-width column), so the
       same excerpt text wraps to noticeably more lines here than there.
       Standard `line-clamp` has broad support now; -webkit- covers the rest. */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

/* No "read more" link here on purpose: it only ever shows for excerpts short
   enough to fit inside the 3-line clamp above, so some cards would show it and
   others wouldn't — an inconsistent, arbitrary-feeling difference between
   cards. The generic `p.desc a { display: none }` rule (this file, near the
   top) already hides it; nothing further to do here. The 3-line-clamped
   excerpt + the title link are enough to get to the full post. */

/*
.footer-top-bg {
    background: url(../images/footer-top-bg.jpg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}*/

.footer-top-bg #license {
    background: transparent;
    padding: 24px 0;
    font-size: 15px;
    line-height: 1.7;
}

.footer-top-bg #license a {
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.35);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s ease;
}

.footer-top-bg #license a:hover {
    text-decoration-color: #fff;
}

.footer-top-bg #donate {
    background: transparent;
    color: #ffffff;
    padding: 15px 0;
}

/* License band — same navy family as the header so the page closes on
   brand color instead of a brighter one-off blue. */
.footer-top-bg {
    background: linear-gradient(135deg, #002b5c 0%, #004789 100%);
    position: relative;
    overflow: hidden;
}

.footer-top-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

#license {
    background: #1161AB;
}

#donate {
    background: #095690;
}

#license a,
#license a:hover,
#donate a,
#donate a:hover,
#testimonial a,
#testimonial h2 {
    color: white;
}

#testimonial h2 {
    color: white;
    font-weight: bold;
    margin-top: 0px;
}

.footer-top,
.footer-bottom {
    background: #011C2F;
    color: #8da3b3;
}

.footer-top {
    padding: 14px 0 22px;
}

.footer-top a,
.footer-bottom a {
    color: #8da3b3;
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-top h2 {
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 14px;
}

.footer-top ul.menu li {
    margin-bottom: 7px;
}

.footer-top a:hover,
.footer-bottom a:hover,
.footer-bottom li.leaf.active a:hover {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    border-top-style: solid;
    border-top-color: #617785;
    border-top-width: 1px;
}

.footer-bottom li.leaf.active a {
    color: #617785;
}

.nav-horizontal>li {
    border-right-color: #617785;
}

.form-control {
    background-color: #011C2F;
    color: #C2C8C2;
}

button.btn-default {
    background-color: #011C2F;
    color: #C2C8C2;
}

button.btn-default:hover,
button.btn-default:active,
button.btn-default:focus {
    background-color: #011C2F;
    color: white;
    border-color: #C2C8C2;
}

a.btn-download,
a.btn-download-v2,
a.btn-contact {
    color: white;
    background-color: #004789;
    border-radius: 14px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    will-change: transform; /* must be always-on — toggling on :hover causes GPU re-rasterize that reads as a snap/shrink */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.btn-download:hover,
a.btn-download:active,
a.btn-download:focus,
a.btn-download-v2:hover,
a.btn-download-v2:active,
a.btn-download-v2:focus,
a.btn-contact:hover,
a.btn-contact:active,
a.btn-contact:focus {
    color: white;
    box-shadow: 0 8px 28px rgba(0, 43, 92, 0.2);
    transform: translateY(-2px);
}

a.btn-download:active,
a.btn-download-v2:active,
a-btn-contact:active {
    transform: translateY(0px);
    transition: transform 34ms;
}

#fonts-button.btn-download {
    background-color: #00A7E0;
}

section.download-section>a.btn-download {
    display: inline-block;
    width: 200px;
    padding-left: 0;
    padding-right: 0;
    margin: 0 auto;
}

section.download-section>a.btn-download {
    margin-top: 2em;
    margin-bottom: 2em;
}

a.btn-download {
    display: inline-block;
    width: 200px;
    padding-left: 0;
    padding-right: 0;
    margin: 0% 15%;
}

section.download-section {
    border: 4px solid #004789;
    padding: 20px;
    text-align: center;
    border-radius: 5px;
    background: #eeeeee;
    margin: 1em;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.5);
}

section.download-section>h2 {
    font-weight: 700;
    margin-top: 0px;
    margin-bottom: 1em;
}

@media screen and (max-width: 759px) {
    a.btn-download {
        width: 200px;
        margin: 0% 10%;
    }
}

div.download-name {
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.5em;
}

.filemeta {
    font-weight: normal;
}

i.fa-download-style {
    margin-left: 0.75em;
}

p.postmeta>strong {
    font-weight: normal;
}

p.posttitle {
    font-weight: 700;
    font-size: 120%;
    margin-top: 1em;
}

span.postmetadate {
    color: #999999;
    text-transform: uppercase;
}

span.postmetadate::after {
    content: " — ";
}

.rssItem h3 .date {
    font-weight: normal;
}

.rssItem h3 .blogname {
    font-weight: bold;
}

div.rssItem {
    margin-bottom: 2.5em;
}

/* Pin all logos in news feed items to a consistent 56px square on all pages.
   !important is needed to beat:
     - .article-body / .textwidget rules in style.css setting width/height: auto
     - their max-width: 80% / 70% rules, which otherwise clamp the rendered width
       below 56px (max-width applies independently of width)
     - their negative right margins (-1em on news, -0.5em on home), which were
       designed around a smaller variable logo width and now overlap text at 56px
   External feed logos also carry inline styles as a belt-and-suspenders guarantee
   (see functions.php). */
div.rssItem .custom-logo-link {
    margin: 0 !important;        /* clear the -5px top / -0.5em right on textwidget context */
}
div.rssItem .custom-logo-link > img,
div.rssItem img.custom-logo {
    width: 56px !important;
    height: 56px !important;
    max-width: none !important;
    max-height: none !important;
    margin-right: 12px !important; /* positive gap so text doesn't overlap the 56px logo */
    object-fit: contain;
    object-position: left center;
}
/* Normalize rssItem heading size across contexts.
   .textwidget h3 in style.css sets 17px, overriding the global 19px — equalise here. */
.rssItem h3 {
    font-size: 19px;
}

img.sps-sidebar-logo {
    display: block;
    margin: 0 auto;
    /* Most uploaded product/font icons happen to already be ~80px, so this
       went unnoticed until a larger image (FieldWorks Lite's featured
       image) rendered at full native size — force every sidebar logo to
       the same standard size regardless of its actual upload dimensions. */
    max-width: 80px;
    height: auto;
}

#search-box {
    display: flex;
    /* Enable flexbox */
    justify-content: flex-end;
    /* Align divs to the right */
    align-items: center;
}

a.btn-secondary {
    width: 100px;
    background: #00A7E0;
    padding-left: 0px;
    padding-right: 0px;
    text-align: center;
    line-height: 1.4;
}

@media screen and (max-width: 759px) {
    div.donate-button {
        margin-top: 0px;
        margin-bottom: 0px;
        padding: 10px;
    }

    form.navbar-form {
        border: 0;
        border-style: none;
        border-color: transparent;
        border-image: none;
        border-image-width: 0;
        margin-top: 0px;
        margin-bottom: 0px;
    }
}

p.site-description {
    font-size: 25px;
    color: white;
    line-height: 1.3;
}

p.button-para {
    padding-top: 7px !important;
}

div.page-site-banner-row {
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.3) 75%, rgba(0, 0, 0, 0) 100%);
}

.trifold-container {
    /* Full-width trio band. Was `width: 100vw`, which includes the vertical
       scrollbar's width — so on any screen tall enough to scroll (the homepage
       always is) this container overhung the content area by the scrollbar width
       (~15px) and produced a horizontal scrollbar. `100%` + `max-width: 100%`
       (the latter overrides Bootstrap `.container`'s fixed max-width) fills the
       full-width parent section edge-to-edge without counting the scrollbar. */
    width: 100%;
    max-width: 100%;
}

.trio-widget {
    display: flex;
    align-items: stretch;
    justify-content: center;
    /* Breathing room down the vertical center line between the two columns
       (on top of each column's own 15px inner padding). Reset to 0 in the
       ≤759px stacked layout so it doesn't add vertical space there. */
    gap: 40px;
    padding-top: 30px;
    padding-bottom: 30px;
}

/*Adjust trio widgets to be on top of each other and allow for wider images*/
.trio-widget>div {
    display: flex;
    /* Use flexbox to layout the image and text side by side */
    align-items: center;
    justify-content: center;
    /* Equal-width columns that do NOT grow (grow:0), so the pair stays a fixed
       960px block that the parent's `justify-content: center` centers on the
       page — and the image↔text seam lands dead-center on every row instead of
       sliding side to side. `flex-basis: auto` (not a px value) is deliberate:
       the ≤759px query flips this container to `flex-direction: column`, and a
       px basis would then be read as a HEIGHT, forcing each stacked item to a
       fixed tall box (the documented trap). Column width comes from `width`. */
    flex: 0 1 auto;
    width: 480px;
    max-width: 480px;
    padding: 15px;
}

.trio-widget>div:first-child {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    /* Container zoom styling moved to top for organization */
}

/* Image fills its (equal-width) column, and `aspect-ratio` bounds the rendered
   height so it stays close to a 3-4 line bullet block's height instead of
   stretching to fill a taller-than-needed column — keeping the paired heading
   + list from looking adrift in whitespace (GH issue #32). */
.trio-widget>div>.rl-image-widget-image {
    object-fit: cover;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
}

/* Style for the second div where the h2 and textwidget are located */
.trio-widget>div:nth-child(2) {
    display: flex;
    flex-direction: column;
    /* Stack items vertically */
    justify-content: center;
    /* Vertically centered against the now height-matched image, so the small
       leftover space is split evenly above/below rather than pooling into one
       lopsided gap. */
    align-items: center;
    /* Center the heading + list block on the column's own center line (matches
       the centered image in the other column) — everything lines up down the
       middle of each column rather than flushing to the inner seam. */
    text-align: center;
    gap: 5%;
    padding-right: 2%;
    padding-left: 2%;
}

/* Alternating band tint — the trio's own grouping cue (helps pair each image
   with its text as the image side flips row to row).

   ROOT homepage: start on WHITE (white / grey / white). The grey mission
   section sits directly above, so a white first band gives a clean colour
   change at that boundary — that's what lets the divider line come off. Scoped
   with :not(.subsite-trio-alt) so it applies to root's .trifold-container only.

   SUBSITE ?trio=new preview keeps the original grey / white / grey: there the
   content above the trio is WHITE, so a grey first band is what separates them.
   (Subsite default is the plain 3-column grid — no bands — and is untouched.) */
.trifold-container:not(.subsite-trio-alt) .trio-2 {
    background: var(--page-bg-soft);
}
.subsite-trio-alt .trio-1,
.subsite-trio-alt .trio-3 {
    background: var(--page-bg-soft);
}

.trio-2>div:nth-child(2) {
    order: 1;
}

.trio-2>div:first-child {
    order: 2;
}

/* Style for the h2 element */
.trio-widget h2,
.trio-widget .textwidget {
    /* Fill the column so the text boxes are wide (bullets wrap to ~2 lines, not
       3). Alignment is preserved: `align-items: center` on the column + the
       centered <h2> keep the block on the column's own center line — a
       full-width block is still centered on that axis, just with no side
       margin. (An earlier 85% made the boxes read as centered-with-margin but
       too narrow, forcing choppy 3-line wraps.) */
    width: 100%;
}

.trio-widget h2 {
    text-align: center;
    color: var(--brand-navy);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-top: 0;
    /* Was 6px — noticeably tighter than the 18px now used for the FAQ/Recent
       Posts headings right below this section, once those got fixed for
       feeling cramped. Matched here so heading-to-body spacing reads as
       consistent across the whole homepage, not just within one section. */
    margin-bottom: 18px;
}

.trio-widget .textwidget {
    text-align: left;
    color: var(--text-body);
    font-size: 16px;
    line-height: 1.7;
}

.trio-widget .textwidget li {
    margin-bottom: 6px;
}

/* Bullets stay left-aligned even when the stacked mobile layout centers the
   surrounding text (migrated from the Customizer's Additional CSS). */
.trio-widget li {
    text-align: left;
}

/* Media for tablet-sized screens */
@media (max-width: 991px) {
    h2.site-description {
        font-size: 1.3em;
    }

    .trio-widget {
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .trio-widget h2,
    .trio-widget .textwidget {
        width: 90%;
    }

    .trio-widget>div>.rl-image-widget-image {
        max-width: 90%;
    }

    .trio-widget>div {
        width: 45%;
        max-width: 460px;
    }
}

/*  Media Query for phone screens */
@media (max-width: 759px) {
    h2.site-description {
        font-size: 1.2em;
    }

    .trio-widget {
        flex-direction: column;
        align-items: center;
        /* No inter-column gutter when stacked — the image's own margin-bottom
           handles image→text spacing here (keeps the original mobile rhythm). */
        gap: 0;
        padding-top: 40px;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .trio-widget:last-child {
        padding-bottom: 40px;
    }

    .trio-widget h2,
    .trio-widget .textwidget {
        width: 100%;
        /* No own side padding: the column (>div) already supplies a 20px gutter,
           so a second 20px here pushed the text ~40px in from each edge (~20% of
           a phone's width) — narrower than the image above it, which only insets
           20px. Dropping it widens the text and lines its edges up with the
           image. */
        padding-left: 0;
        padding-right: 0;
        /* Stacked single-column on phones — center the heading + text to match
           the centered image above them (overrides the left-align used in the
           side-by-side desktop layout). */
        text-align: center;
    }

    .trio-widget>div {
        max-width: 100%;
        padding: 0;
        justify-content: center !important;
    }

    .trio-widget>div:first-child {
        order: 1;
        width: 100%;
        padding: 0 20px !important;
        /* Was 25px — cramped next to the more generous ~32-40px transitions
           used elsewhere on the stacked mobile homepage (e.g. #home_secondary's
           own top padding, the FAQ/Recent-posts divider). */
        margin-bottom: 32px;
    }

    .trio-widget>div:nth-child(2) {
        order: 2;
        padding: 0 20px !important;
        width: 100%;
        text-align: center;
        align-items: center;
    }

    .trio-widget>div>.rl-image-widget-image {
        height: auto;
        max-width: 100%;
    }
}

/* Standardize the homepage's main-section edge inset at 20px on phones —
   the trio blocks above already use 20px (see .trio-widget>div:first-child),
   but the hero, mission-cards, testimonial and FAQ/Recent-posts sections were
   all still on Bootstrap's base .container 15px, an unintentional mismatch
   (flagged directly: "some have 15px left and right, some have 20px... FAQ
   would look better at 20px"). Scoped to each section's OWN .container rather
   than changing .container's global default, so no other page on the site is
   affected — just these homepage sections, brought in line with the trio's
   already-established 20px. */
@media (max-width: 759px) {
    #page-site-banner .container,
    #mission-highlight .container,
    #home_secondary .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Photo credits (e.g. PTXprint's homepage, below its trio) — style.css's
   `.bannercc` predates the redesign entirely: x-small italic text, a plain
   gray link color, and an off-palette green (#007a32) for the image-title
   link unrelated to anything else on the site. Small/muted IS the right
   weight for a photo-credit caption (it's not meant to compete with real
   content), so this keeps that restraint but moves it onto the redesign's
   actual tokens instead of ad hoc one-off colors.

   Content varies per subsite (freeform admin-authored widget text) — some
   (e.g. PTXprint) use a 3-link convention: .imgtitle (which image),
   .imgauthor (photographer name), .cctitle (the actual CC license link).
   Others (e.g. Scripture Forge) are just a plain sentence with no links at
   all — the rules below only apply where those classes exist. */
.bannercc {
    font-size: 13px;
    font-style: normal;
    color: var(--text-muted-dark);
    text-align: center;
    margin: 0 auto 24px;
}

.bannercc > .title {
    color: var(--brand-navy);
}

/* .cctitle (the CC-BY-SA license link) is the ONLY one of the three that
   actually goes anywhere real. var(--accent-blue) (teal) is only ~2.5:1
   against white — fails WCAG AA for text (same reason job-openings.css has
   its own separate --job-openings-link-blue token) — so this uses
   --text-body instead: a dark slate that reads as "readable gray", not blue,
   comfortably passing AA, and still visually distinct from the lighter
   --text-muted-dark caption text around it. */
.bannercc a.cctitle {
    color: var(--text-body);
    font-weight: 600;
    text-decoration: underline;
}

.bannercc a.cctitle:hover {
    color: var(--brand-navy);
}

/* .imgtitle/.imgauthor ("Banner Image", "Mark Penny") carry a real href="" in
   the admin-authored content but don't go anywhere useful — they're labels,
   not links. Strip the link look (color/pointer/underline) so they read as
   plain text, matching what they actually are; pointer-events:none also stops
   an accidental click from reloading/anchor-jumping the page. Known gap:
   CSS can't stop keyboard focus or screen-reader "link" announcement on a
   real <a href="">  — the actual fix is stripping the href at the content
   level, same follow-up bucket as the FAQ heading content migration. */
.bannercc a.imgtitle,
.bannercc a.imgauthor {
    color: inherit;
    font-weight: inherit;
    text-decoration: none;
    pointer-events: none;
    cursor: default;
}

/* ===========================================================================
   Subsite trio — OPT-IN PREVIEW toggles (default is UNCHANGED without a param)
   ---------------------------------------------------------------------------
   Subsites DEFAULT to a plain 3-column grid (.subsite-trio-default) because
   their feature images are small, square, low-res (~200px native, shown at
   300px). Two opt-in previews (see base.twig for the ?trio= class switch):
     ?trio=new   -> root homepage's 2-column alternating layout (.subsite-trio-alt)
     ?trio=cards -> the same 3-column grid, dressed as real bordered cards
   The default is unchanged unless a param is present. TEMPORARY preview
   toggles; promote or delete once a direction is chosen.
   =========================================================================== */
.subsite-trio-alt {
    display: none;
}
html.trio-new .subsite-trio-alt {
    display: block;
}
html.trio-new .subsite-trio-default {
    display: none;
}

/* The root layout is built for large landscape photos; a subsite's square,
   low-res source can't fill its 4:3 frame without heavy upscaling + cropping.
   So in the preview, hold the image at its current 300px SQUARE size (no worse
   than the 3-column grid — no extra upscaling, no crop) rather than the root's
   upscaled-landscape treatment. Column widths are left at the root's 480px so
   the text block matches the root homepage exactly (the 300px image simply
   sits centered in its column). Getting the full root look on a subsite really
   means replacing these with larger landscape images first. */
.subsite-trio-alt .trio-widget>div>.rl-image-widget-image {
    max-width: 300px;
    aspect-ratio: 1 / 1;
}

/* --- ?trio=cards : the default 3-column grid, dressed as real cards --------
   Same grid + same widgets as the default; the .trio-card wrapper is always in
   the markup but only styled here. Answers "do we shrink the image for cards?"
   — no: at the site's width three cards are ~360px wide, and the 300px image
   fits inside with padding to spare, so it keeps its current size (no extra
   upscaling). Flex row = equal-height cards. */
html.trio-cards .subsite-trio-default .row.trifold {
    display: flex;
    flex-wrap: wrap;
}
html.trio-cards .trio-card {
    height: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 24px 20px 28px;
    text-align: center;
}
html.trio-cards .trio-card .rl-image-widget-image {
    margin: 0 auto 14px;
    /* the card supplies the elevation; drop the image's own heavy drop shadow */
    box-shadow: none;
}

/* Add SIL styling to form buttons */
input.wpcf7-submit {
    color: white;
    font-weight: bold;
    background-color: #004789;
    border-color: #004789;
    border-width: 5px;
    border-style: solid;
    border-radius: 4px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    will-change: transform; /* must be always-on — toggling on :hover causes GPU re-rasterize that reads as a snap/shrink */
    transition: transform 250ms;
}

input.wpcf7-submit:hover {
    background-color: #0F6CBD;
    border-color: #0F6CBD;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.6);
    transition: transform 250ms;
    transform: translateY(-2px);
}

input[type="reset" i] {
    border-style: solid;
    border-color: #F0F0F0;
    border-width: 5px;
    border-radius: 4px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 250ms;
}

input[type="reset" i]:hover {
    background-color: #E5E5E5;
    border-color: #E5E5E5;
}

/* Release-post announcement boxes — aligned with the canonical info-box look
   (same family as the site-wide blockquote system: soft slate bg, hairline
   border, cyan accent bar). Sets every property the legacy style.css rule
   (~8622, green border) sets, so that one stays fully shadowed. */
.announcement {
    position: relative;
    overflow: hidden;
    background-color: #f8fafc;
    border: 1px solid var(--border-soft);
    margin-top: 1em;
    margin-bottom: 1.5em;
    padding: 18px 22px 18px 28px;
    border-radius: 12px;
    color: #334155;
    box-shadow: none;
}

.announcement::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #0090c8;
}

.announcement > :last-child {
    margin-bottom: 0;
}

h1.article-h1 {
    margin-top: 1em;
    margin-bottom: 1em;
}

/* Article titles use the same soft gray divider as .simple-page-h1 and the
   Jobs/News/Software page headers (replaces the old heavy cyan underline). */
h1.article-h1:not(.no-border) {
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 20px;
}

.broken_link,
a.broken_link {
    text-decoration: initial !important;
}

.sil-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
    margin-bottom: 25px;
}

/* Shared button styles */
.sil-button {
    padding: 10px 25px;
    font-size: 17px;
    text-decoration: none;
    border-radius: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    line-height: 17px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    will-change: transform, box-shadow;
}

/* Primary button styles */
.sil-button-primary,
.sil-button-primary:focus {
    background-color: #004789;
    color: white;
}

.sil-button-primary:focus,
.sil-button-secondary:focus {
    text-decoration: none;
}

/* a:visited specificity (0,1,1) beats .sil-button-primary (0,1,0); add element selector to win */
a.sil-button-primary,
a.sil-button-primary:visited {
    color: white;
}

.sil-button-primary:hover {
    color: white;
}

/* Secondary button styles */
.sil-button-secondary,
.sil-button-secondary:focus {
    background-color: white;
    border: 2px solid #004789;
    color: #004789;
    padding: 8px 25px;
}

a.sil-button-secondary,
a.sil-button-secondary:visited {
    color: #004789;
}

.sil-button-secondary:hover {
    color: #004789;
    border-color: #004789;
}

/* Shared hover effects for all buttons */
.sil-button:hover {
    box-shadow: 0 8px 28px rgba(0, 43, 92, 0.2);
    transform: translateY(-2px);
    will-change: transform, box-shadow;
    text-decoration: none;
}

.flex-row-2-col {
    display: flex;
    justify-content: space-between;
    /* Space between the columns */
    align-items: stretch;
    /* Stretch columns to always be the same height */
    margin-bottom: 1em;
}

.home-box-contents,
#home-sidebar {
    font-size: 15px;
    border-style: solid;
    border-width: 5px;
    border-color: #004789;
    border-radius: 7px;
}

.home-box-contents h3,
#home-sidebar h3 {
    font-size: 1.8em;
    font-weight: 700;
    text-align: center;
    margin: 0px;
    margin-top: 15px;
    line-height: 1.4;
}

.dual-column {
    margin: 0px;
    padding: 10px 20px;
    width: 45%;
    box-shadow: 0px 0px 12px rgb(0 0 0 / 20%);
}

.home-box-contents {
    margin-right: 1.5em;
}

#home-sidebar {
    margin-left: 1.5em;
}

/* Tablet view adjustments */
@media (max-width: 991px) {
    .root-homepage .site-description {
        font-size: 2em;
    }

    .flex-row-2-col {
        flex-direction: column;
        /* Stack columns vertically */
        height: auto;
        /* Adjust height for content */
        justify-content: center;
        align-items: center;
    }

    .dual-column {
        width: 95%;
        /* Full width for each item */
        margin-bottom: 20px;
        /* Add space at the bottom of each column */
    }

    .home-box-contents {
        margin-right: 0;
    }

    #home-sidebar {
        margin-left: 0;
        /* Remove left margin to avoid extra space */
    }
}

/* Mobile view adjustments */
@media (max-width: 759px) {
    .root-homepage .site-description {
        font-size: 1.4em;
    }

    .flex-row-2-col {
        padding: 0 10px;
        /* Adjust padding for smaller screens */
        margin-bottom: 0px;
    }

    .dual-column {
        padding: 15px;
        /* Adjust padding for smaller screens */
        margin-bottom: 15px;
        /* Adjust margin for smaller screens */
    }

    .home-box-contents,
    #home-sidebar {
        font-size: 14px;
        /* Adjust font size for smaller screens */
    }
}

#sidebar_main .download-section {
    background: white;
}

blockquote {
    border-color: #00A7E0;
    background-color: #f1f8ff;
    font-style: italic;
    padding: 20px;
    margin-bottom: 30px
}


blockquote.info {
    font-size: inherit;
    font-style: normal;
}

blockquote li {
    margin-bottom: 8px;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Subsite "Recent Posts"/"Recent news" widget: unlike root's rssItem/card
   format (which aggregates multiple PRODUCTS and needs a logo to tell them
   apart), each subsite's own list is just its OWN posts — a plain
   `<li><a>Title</a> <span class="post-date">Date</span></li>` list (no logo
   needed, single source). style.css's base rule left this pre-redesign: a
   bold uppercase gray date and no spacing between rows. Styled here to match
   the same typography/tokens as the rssItem cards and FAQ list next to it,
   just without the card chrome a single-source list doesn't need.

   NOT every subsite uses this slot for a dated post list, though — PTXprint
   repurposes it as "Training Resources": several plain <ul>s of grouped
   links (Basic Tutorials / Slide Presentations / Videos / ...), no dates,
   no post titles, at all. Checked every other subsite with content here
   (ScriptureForge, AudioProjectManager, TagMukay, SILTranscriber, Andika,
   Gentium, Doulos, PrimerPro, Transcelerator) — PTXprint is the only one
   that repurposes this slot; everything else is a genuine dated list. The
   presence of a `.post-date` span is a reliable, structural way to tell
   the two apart, so :has(.post-date) scopes the "this is a real post" chrome
   (bold navy title, divider, no bullet) to actual dated items only —
   anything else renders as a normal bulleted link list instead, matching the
   FAQ column right next to it (plain body-blue links, real bullets), since
   that's what it actually is content-wise. */
#home_secondary .blog-posts ul:not(:has(.post-date)) {
    list-style-type: disc;
    /* 40px to match the FAQ column's own list indent exactly (see
       #home_secondary .textwidget > ul) — was 24px, a mismatch that read as
       arbitrary sitting right next to FAQ's more deeply indented bullets. */
    padding-left: 40px;
}

#home_secondary .blog-posts ul:not(:has(.post-date)) li {
    /* Overrides the 4px 0 padding below (meant for dated post rows) back to 0
       — without this, each bullet's own box was 4+4=8px taller than the FAQ
       column's matching bullets right next to it (same font-size/line-height,
       but a visibly taller row), even though the two used a similar-looking
       margin value. Padding and margin both add height; only margin should
       here, matching the FAQ list's own li (margin-bottom: 8px, no padding). */
    padding: 0;
    margin-bottom: 8px;
}

#home_secondary .blog-posts ul:has(.post-date) {
    list-style-type: none;
    padding-left: 0;
}

#home_secondary .blog-posts li {
    padding: 4px 0;
}

#home_secondary .blog-posts li:has(.post-date) {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
}

#home_secondary .blog-posts li:has(.post-date):last-child {
    border-bottom: none;
}

/* Only a genuine post TITLE gets the bold-navy headline treatment. A link
   with no .post-date sibling (PTXprint's plain resource links) is left
   unstyled here on purpose — it falls back to the sitewide default link
   color/weight, i.e. the exact same plain blue as the FAQ column's links. */
#home_secondary .blog-posts li:has(.post-date) > a {
    color: var(--brand-navy);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
}

#home_secondary .blog-posts li:has(.post-date) > a:hover {
    color: var(--accent-blue);
}

#home_secondary .blog-posts li .post-date {
    display: block;
    margin-top: 3px;
    color: var(--text-muted-dark);
    font-weight: 400;
    text-transform: none;
    font-size: 13px;
}

/* PTXprint's grouped sub-headings ("Basic Tutorials", "Slide Presentations", …)
   are hand-authored `<p><span style="text-decoration:underline"><strong>`, not
   real heading tags — flagged to the user as worth converting to real markup
   at the content level; this is the presentational half of that fix in the
   meantime. Underline reads as dated/link-like for what's meant to be a
   section label; !important is required to beat the inline style attribute. */
#home_secondary .blog-posts .textwidget span[style*="underline"] {
    text-decoration: none !important;
    color: var(--brand-navy);
    display: inline-block;
    margin-top: 18px;
}

#home_secondary .blog-posts .textwidget > p:first-child span[style*="underline"] {
    margin-top: 0;
}

.nav {
    margin-bottom: 0px;
}

.navbar-default li.nav-main-item {
    border-right: none;
    padding-top: 6px;
    padding-bottom: 6px;
}

a.nav-main-link {
    text-decoration: none;
}

.navbar-default .navbar-nav>li:hover a.nav-main-link {
    color: white;
}

.navbar-default li.nav-main-item:hover {
    background-color: #0f6cbd;
}

/* Basic styles for the sub-menu */
.sub-menu {
    display: none;
    /* Initially hide the sub-menu */
    position: absolute;
    /* Position it absolutely */
    top: 33px;
    list-style: none;
    /* Remove default list styling */
    padding: 4px 0px;
    /* Remove default padding */
    margin: 0;
    /* Remove default margin */
    border: 2px solid transparent;
    /* 2px white border */
    background-color: white;
    z-index: 999;
    /* Higher z-index to float on top */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.8);
}

/* Make the sub-menu visible when hovering over a parent item */
.nav-main-item:hover>.sub-menu {
    display: block;
    /* Show the sub-menu on hover */
}

/* Styles for sub-menu items */
.nav-sub-item {
    margin: 0;
    /* Remove margin */
    padding: 3px 0px;
    /* Add padding */
    display: block;
}

/* Link styles for sub-menu items */
.nav-sub-link {
    color: #004789;
    text-decoration: none;
    /* Remove underline */
    display: block;
    /* Make links block-level elements */
    padding: 2px 5px;
    /* Add padding */
    white-space: nowrap;
    /* Prevent text from wrapping */
}

/* Hover effect for sub-menu links */
.nav-sub-link:hover {
    text-decoration: underline;
    color: #0f6cbd;
}

li.nav-sub-item {
    border-right: none;
}

.nav-main-item.menu-item-has-children a.nav-main-link::after {
    content: none !important;
}

.nav-main-item.menu-item-has-children:hover a.nav-main-link::after {
    content: none !important;
}

/* Media query to temporarily hide sub-menu and ::after content on mobile devices */
@media (max-width: 759px) {
    .navbar-default li.nav-main-item {
        display: block;
    }

    .sub-menu,
    .nav-main-item:hover>.sub-menu {
        display: none;
        /* Hide sub-menu on mobile */
    }

    .nav-main-item.menu-item-has-children a.nav-main-link::after {
        content: none;
        /* Remove ::after content (triangle) on mobile */
    }

}

li.no-toc {
    display: none;
}

figure.wp-caption {
    max-width: 100%;
    /* Ensure it does not exceed the width of its parent container */
    width: auto;
}

.vimeo-wrapper {
    max-width: 800px;
    /* Adjust this value to your preferred max width */
    margin: 0 auto;
    /* Centers the video if desired */
}

.responsive-vimeo-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.responsive-vimeo-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 759px) {
    .vimeo-wrapper {
        max-width: 100%;
        /* Adjust the max width for mobile devices */
    }

    /* This caused issues with videos of various sizes*/
    .responsive-vimeo-container {
        height: auto;
    }
}

/* Sets the Chipp bot height */
iframe#chipp-chat-widget-full {
    height: 90vh !important;
    /* 90% of viewport */
    max-height: 800px !important;
    /* but never more than 800px tall */
    width: 500px !important;
}

/* Change chatbot color */
#chipp-chat-bubble-container {
    background: #004789 !important;
}

/* Change chatbot chat bubble color */
#chipp-chat-bubble-container svg path {
    fill: #fff !important;
    stroke: #fff !important;
}

/*Add more shadow to the chatbot bubble */
#chipp-chat-btn {
    box-shadow:
        8px 20px 25px -5px rgb(0 0 0 / 0.2),
        3px 8px 10px -6px rgb(0 0 0 / 0.15) !important;
}

#chipp-chat-btn:hover {
    transform: scale(1.1);
    box-shadow:
        10px 28px 35px -5px rgb(0 0 0 / 0.22),
        4px 14px 16px -6px rgb(0 0 0 / 0.17) !important;
}

@media (max-width: 768px) {
    #gt_float_wrapper {
        top: 60px !important;
    }
}

/* ===== Support Agent CTA (agent-namespace) ===== */
.agent-card {
    background: linear-gradient(135deg, #054E88, #00A7E1);
    color: #fff;
    border-radius: 20px;
    padding: 2rem;
    margin: 15px 0 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(5, 78, 136, .2);
}

.agent-card::before {
    content: "";
    position: absolute;
    inset: -50% -50% auto auto;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, .12) 0%, transparent 70%);
    border-radius: 50%;
}

/* Header row */
.agent-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
    /* adjusted */
}

/* Icon bubble */
.agent-avatar {
    width: 6rem;
    height: 6rem;
    /* adjusted */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    /* adjusted */
    backdrop-filter: blur(10px);
    /* from your snippet */
    color: #fff;
    /* adjusted */
}

.agent-avatar .fa-headset {
    font-size: 2rem;
    /* adjusted */
    line-height: 1;
}

/* Title + subtitle */
.agent-info {
    display: flex;
    flex-direction: column;
}

.agent-title {
    font-size: 2.4rem !important;
    font-weight: 700 !important;
    margin: 0 0 1rem 0;
    /* adjusted */
    color: #fff !important;
    line-height: 1.2 !important;
    font-style: normal !important;
}

.agent-subtitle {
    font-size: 1.4rem;
    margin: 0;
    color: #fff;
    opacity: .95;
    line-height: 1.3;
}

/* Body copy */
.agent-description {
    position: relative;
    z-index: 1;
    margin: 1rem 0 1.25rem;
    font-size: 1.5rem;
    line-height: 1.6;
    color: #fff;
}

.agent-description .agent-software {
    font-weight: 700;
}

/* CTA button */
.agent-actions {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.agent-button,
.agent-button:visited {
    --agent-ring: rgba(255, 255, 255, .25);
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    /* adjusted */
    background: rgba(255, 255, 255, .22);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem;
    /* adjusted */
    padding: 1.2rem 1.7rem;
    /* adjusted */
    border-radius: .75rem;
    border: 2px solid rgba(255, 255, 255, .35);
    will-change: transform, box-shadow; /* must be always-on — toggling on :hover causes GPU re-rasterize that reads as a snap/shrink */
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
    backdrop-filter: blur(8px);
}

.agent-button i.fa-headset {
    font-size: 1.5rem;
    /* adjusted */
}

.agent-button:hover {
    transform: translateY(-2px);
    color: white;
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
    text-decoration: none;
}

.agent-button:focus-visible {
    outline: 3px solid var(--agent-ring);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 48rem) {
    .agent-card {
        padding: 1.5rem;
    }

    .agent-title {
        font-size: 2rem;
    }

    .agent-subtitle {
        font-size: 1.1rem;
    }

    .agent-description {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {

    #chipp-chat-bubble-container,
    #chipp-close-icon-container {
        width: 65px !important;
        /* standard mobile size */
        height: 65px !important;
        border-radius: 50%;
    }

    #chipp-chat-bubble-container svg {
        width: 35px;
        /* scale icon inside */
        height: 35px;
    }

    #chipp-close-icon-container svg {
        width: 25px;
        /* scale icon inside */
        height: 25px;
    }

    /* Sets the Chipp bot height and width on mobile */
    iframe#chipp-chat-widget-full {
        height: 88vh !important;
        /* 88% of viewport on mobile*/
        width: 98% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        left: 0px !important;
        right: 0px !important;
    }
}

/* GTranslate Options */

/* keep items on one line */
.title-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    /* don't wrap to a new line */
}

/* let the title take remaining space; allow it to shrink */
.title-container .page-header,
.title-container h1 {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    /* prevent overflow issues */
}

/* pin the switcher to the right and don't let it shrink */
.gtranslate-block {
    margin-left: auto;
    flex: 0 0 auto;
    /* <-- stops squishing */
}

/* Popup panel. Sizing + scrollbar rules were migrated here from the
   Customizer's "Additional CSS" (DB post 726) — see the
   2026-07-06-gtranslate-popup-mobile-autocomplete deploy script, which
   removes the DB copies. The old fixed `height: 380px` is relaxed so the
   card grid breathes; tall lists scroll inside the panel. */
.gt_white_content {
    background-color: #ffffff !important;
    border-radius: 14px !important;
    box-shadow: 0 24px 64px rgba(0, 21, 42, 0.35) !important;
    padding: 20px !important;
    height: auto !important;
    /* Tall enough to show the whole 3-column list without scrolling on a
       normal screen; only scrolls when the viewport is genuinely short. */
    max-height: 92vh !important;
    overflow-y: auto !important;
    /* Own the panel's geometry at every size: popup.js positions it with
       inline left/top + negative margins computed from ITS width, so any
       CSS width change must also re-center — fixed + translate does both.
       margin:0 kills the inline negative-margin centering. */
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    width: min(720px, 92vw) !important;
}

/* Slim, brand-quiet scrollbar (replaces the chunky white-on-dark scrollbar
   styling that lived in the Additional CSS). */
.gt_white_content::-webkit-scrollbar {
    width: 10px !important;
}

.gt_white_content::-webkit-scrollbar-track {
    background: transparent !important;
    margin: 10px 0 !important;
}

.gt_white_content::-webkit-scrollbar-thumb {
    background: var(--border-medium) !important;
    border-radius: 10px !important;
    border: 2px solid #fff !important;
    background-clip: padding-box !important;
}

.gt_white_content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8 !important;
    background-clip: padding-box !important;
}

.gt_white_content {
    scrollbar-width: thin !important;
    scrollbar-color: var(--border-medium) transparent !important;
    /* Keep scrolling inside the language popup from chaining to the page
       behind it once you hit the panel's scroll boundary. */
    overscroll-behavior: contain !important;
}

/* While the language popup is open, freeze the page behind it so you can't
   scroll "underneath" the panel. Toggled by lockScrollForGtPopup() in
   js/site.js (the popup is injected by GTranslate's remote script, so its
   open/close is observed rather than hooked directly). */
html.gt-popup-open,
html.gt-popup-open body {
    overflow: hidden !important;
}

/* Phones: narrower panel, a bit more vertical room. (Centering itself is
   handled by the base rule above at every size.) */
@media only screen and (max-width: 759px) {
    .gt_white_content {
        width: min(92vw, 440px) !important;
        max-height: 88vh !important;
    }
}

.gt_languages a.glink span {
    color: var(--brand-navy) !important;
}

/* (removed) `.gt_white_content a { border: none !important }` — it was
   erasing the language cards' borders; the card rule below owns borders now. */

/* Remove the flag icons */
.gt_languages a.glink img {
    display: none !important;
}

/* Base link styles — two-line cards: native name over a muted uppercase
   English name (the data-gt-eng attribute is injected by
   initGtEnglishNames() in js/site.js from the data-gt-lang code;
   GTranslate's own markup only carries native names). Rendered via ::after
   + attr(), deliberately NOT an appended child <span> — GTranslate's own
   widget script clones whichever card gets clicked (`clicked.innerHTML`)
   straight into the visible toggle button, so a real child span gets
   cloned along with it (toggle showed "Tiếng Việt Vietnamese" instead of
   just "Tiếng Việt"); a pseudo-element renders visually but was never part
   of innerHTML to begin with. */
.gt_languages a.glink {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    padding: 10px 14px;
    color: var(--brand-navy) !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.3;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: #fff;
    transition: background 0.15s ease, border-color 0.15s ease;
    box-sizing: border-box;
    /* Let long native names wrap inside the card instead of overflowing the
       cell (e.g. "Bahasa Indonesia" was clipped) — GTranslate's own CSS sets
       these to nowrap. */
    white-space: normal !important;
    overflow-wrap: break-word;
}

.gt_languages a.glink span {
    white-space: normal !important;
    overflow-wrap: break-word;
}

.gt_languages a.glink[data-gt-eng]::after {
    content: attr(data-gt-eng);
    display: block;
    /* #64748b (~4.8:1 on white) meets WCAG AA; the previous #94a3b8 was 2.56:1. */
    color: var(--text-muted-dark) !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 3px;
}

/* Hover effect */
.gt_languages a.glink:hover,
.gt_languages a.glink:focus {
    background: #f8fafc;
    border-color: var(--border-medium);
    text-decoration: none !important;
}

/* Active (current) language — solid navy card so it reads at a glance */
.gt_languages a.glink.gt-current-lang {
    background: var(--brand-navy);
    border-color: var(--brand-navy);
}

.gt_languages a.glink.gt-current-lang span {
    color: #fff !important;
}

.gt_languages a.glink.gt-current-lang[data-gt-eng]::after {
    color: rgba(255, 255, 255, 0.7) !important;
}

.gt_languages a.glink.gt-current-lang:hover {
    background: var(--brand-navy);
}

/* Card grid — 3 columns in the desktop popup. (Replaces the old
   `flex-flow: column wrap` layout whose computed ~1300px height overflowed
   phone modals and needed a "scroll for more" band-aid.) A zero minimum on
   each track lets tracks shrink below a card's min-content width so long names like
   "Nederlands" never push past the panel edge. */
.gt_white_content .gt_languages {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.gt_white_content .gt_languages a.glink {
    min-width: 0;
}

@media (max-width: 759px) {
    .gt_white_content .gt_languages {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .gt_languages a.glink {
        padding: 9px 12px;
        font-size: 14px;
    }

    .gt_languages a.glink[data-gt-eng]::after {
        font-size: 10px;
    }
}

.input-container:last-child {
    background-color: white;
}

/* Base popup */
.gt_switcher-popup {
    white-space: nowrap;
    /* keep “English ▾” on one line */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #2A689A;
    /* new base background */
    border: 2px solid #5486AE;
    /* new base border */
    color: #fff !important;
    font-weight: 600;
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.gt_switcher-popup span {
    font-size: 15px !important;
    margin-right: 0 !important;
}

/* Remove flag */
.gt_switcher-popup img {
    display: none !important;
}

/* Insert Font Awesome language icon */
.gt_switcher-popup::before {
    content: "\f1ab";
    /* Font Awesome "language" icon unicode */
    font-family: "Font Awesome 7 Free";
    /* or 7 Free depending on your FA version */
    font-weight: 900;
    font-size: 14px;
    margin-right: 6px;
    color: #fff;
}

/* Arrow ▼ styling */
.gt_switcher-popup span:last-child {
    color: #fff !important;
    font-size: 10px !important;
    margin-left: 4px;
}

/* Hover + active */
.gt_switcher-popup:hover,
.gt_switcher-popup.gt-current-lang,
.gt_switcher-popup.active {
    background-color: #447AA6;
    /* lighter blue hover */
    border-color: #8EAFC9;
    /* lighter border */
}

/* Smooth fade when GTranslate flips display:none -> block */
@keyframes gtFadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.gt_black_overlay[style*="display: block"],
.gt_white_content[style*="display: block"] {
    animation: gtFadeIn .22s ease-out both;
}

/* Focus the popup by BLURRING the page behind it rather than darkening it —
   what's in focus stays sharp, the background goes soft, so the eye is drawn to
   the modal the way real depth-of-field works. Only a whisper of navy tint to
   unify. Falls back to the light tint alone where backdrop-filter is
   unsupported. */
.gt_black_overlay {
    background: rgba(0, 21, 42, 0.12) !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {

    .gt_black_overlay[style*="display: block"],
    .gt_white_content[style*="display: block"] {
        animation: none;
    }
}

@media (max-width: 759px) {
    #search-box {
        justify-content: flex-start;
        align-items: center !important;
        gap: 20px;
    }

    div.donate-button {
        padding: 0 !important;
        margin-right: 0;
    }

    a.btn-download {
        margin: 0;
    }

    .navbar-form {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .navbar-form .form-group {
        margin-bottom: 0 !important;
    }

    .navbar-form .gsc-control-searchbox-only .gsc-input {
        width: 37vw !important;
        max-width: 225px !important;
    }

    .navbar-default #nav-list {
        padding-top: 0 !important;
        padding-bottom: 8px;
    }

    .gsc-search-button-v2 {
        padding-right: 0 !important;
        padding-left: 0 !important;
        width: 50px !important;
    }

    .navbar-form .gsc-search-button-v2 svg {
        margin-left: 0 !important;
    }

    .navbar-header {
        margin-bottom: 0px;
        display: flex;
        align-items: center;
        /* vertical centering */
    }

    .spacer {
        flex: 1;
        /* take all available remaining space */
    }

    .nav-left,
    .nav-right {
        display: flex;
        align-items: center;
    }

    .nav-left {
        justify-content: flex-start;
    }

    .nav-right {
        justify-content: flex-end;
    }

    .navbar-default a.logo {
        margin-top: 0;
    }

    a.logo img {
        width: auto !important;
        max-width: 100% !important;
        height: 35px !important;
        /* Force a consistent height for the logo */
    }

    .navbar-toggle {
        margin-right: 0;
    }

    /* Remove borders and shadow from search form in the mobile menu */
    .navbar-default .navbar-form,
    .navbar-default .navbar-collapse {
        border: none !important;
        /* removes the 1‑px top and bottom borders */
        box-shadow: none !important;
        /* removes the inset shadow */
    }

    img.sps-sidebar-logo {
        width: 20vw;
    }
}

/* small-screen sizing so it fits comfortably */
@media (max-width: 480px) {
    .gt_switcher-popup {
        font-size: 13px;
        padding: 2px 10px;
    }

    .gt_switcher-popup::before {
        font-size: 13px;
    }

    .gt_switcher-popup span:last-child {
        font-size: 10px;
    }

    /* optional: scale title so both fit */
    .title-container .page-header,
    .title-container h1 {
        font-size: clamp(18px, 5.5vw, 32px);
    }
}

span.last-crumb {
    font-weight: 700;
}

/* New accordion behavior/style */
/* Hide line breaks */
.accordion>br,
.accordion>br+br {
    display: none;
}

/* Container styling - remove single border */
.accordion {
    margin: 8px 0;
    margin-bottom: 4rem;
}

/* Each accordion item gets its own border */
.accordion-title {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px 14px 56px;
    position: relative;
    user-select: none;
    background: #fafafa;
    color: #222;
    transition: background-color .32s ease, color .32s ease;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    line-height: 150%;
    margin: 16px 0 0 0;
}

.accordion-title:first-of-type {
    margin-top: 0;
}

/* Caret arrow */
.accordion-title::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
    transition: transform .32s ease;
    background: none;
    border-radius: 0;
    color: inherit;
    font-weight: normal;
    margin: 0;
    padding: 0;
}

/* Open state: header color + caret rotation */
.accordion-title[aria-expanded="true"] {
    background: #eef6ff;
    color: #0b5fcc;
    cursor: default;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.accordion-title[aria-expanded="true"]::before {
    transform: translateY(-50%) rotate(-135deg);
}

/* Accordion panels (accordion-shortcodes plugin).
   The plugin's own jQuery slideDown/slideUp does ALL the opening/closing
   animation, including padding, and sets display:none when closed. This file
   only styles the panel. Don't add a CSS height/max-height/opacity transition
   or force display:block here: a second animation fights jQuery's (it measured
   the panel as ~0px, animated to ~20px, then the CSS one took over — a visible
   jolt), and the old max-height: 1000px cap silently cut off long panels such
   as the download lists and the LB credits on /illustrations/rules/. */
.accordion-content {
    display: none; /* hidden until the plugin opens it; no flash on load */
    overflow: hidden;
    padding: 20px 20px 20px 56px;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    margin-top: -1px;
    background: #fff;
}

/* Phones: the 56px desktop indent (lining text up under the title) eats too
   much of a narrow screen. Download-table panels keep their own padding
   (the :has(.download) rule below is more specific). */
@media (max-width: 759px) {
    .accordion-title {
        padding-left: 44px;
    }
    .accordion-title::before {
        left: 16px;
    }
    .accordion-content {
        padding: 16px 16px 16px 20px;
    }
}

/* Modern styling for download table */
.download {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.download thead {
    background-color: #f8f9fa;
}

.download th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 400;
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.download tbody tr {
    transition: background-color 0.15s ease;
}

.download tbody tr:hover {
    background-color: #f8fafb;
}

.download td {
    padding: 14px 16px;
    font-size: 14px;
    color: #555;
    border-top: 1px solid #f0f0f0;
}

.download tbody tr:first-child td {
    border-top: none;
}

.getfile {
    font-weight: 600;
    color: #0056b3; /* brand link blue — was the off-palette #00537a */
    font-size: 15px;
    text-decoration: none;
}

.getfile:hover {
    color: #00ADEF; /* cyan hover, matching site-wide link hover */
    text-decoration: underline;
}

.filemeta {
    color: #888;
    font-size: 13px;
}

/* Special padding for accordion content with download tables */
.accordion-title[aria-expanded=true]+.accordion-content:has(.download),
.accordion-content:has(.download) {
    padding: 10px 27px;
}

.accordion-content .download {
    border-radius: 0px;
    box-shadow: none;
}

/* Contact Form Styling Mapping to Contact Form 7 Classes */
h2.form-heading {
    margin: 40px 0 20px 0;
    /* Soft divider + brand navy, matching the simple-page H1 pattern
       (was a 2px cyan underline with the off-palette #005a9c). */
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 8px;
    color: var(--brand-navy);
}

/* Target the p tags CF7 uses for wrapping */
.wpcf7-form p {
    margin-bottom: 25px;
}

.wpcf7-form label {
    display: block;
    font-weight: 600;
    color: #333;
}

.wpcf7-form label i {
    font-weight: 400;
    color: #666;
    font-size: 0.9em;
}

/* Styling for p tags used as labels (CF7 alternative setup) */
/* This targets p tags that do NOT contain any form controls or the submit button elements */
.wpcf7-form p:not(:has(.wpcf7-form-control-wrap)):not(:has(.wpcf7-submit)):not(:has(.wpcf7-spinner)):not(:has(.cf-turnstile)):not(:has(input)):not(:has(select)):not(:has(textarea)) {
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

/* Ensure italicized text in these p labels also follows the same style as labels */
.wpcf7-form p:not(:has(.wpcf7-form-control-wrap)):not(:has(.wpcf7-submit)):not(:has(.wpcf7-spinner)):not(:has(.cf-turnstile)):not(:has(input)):not(:has(select)):not(:has(textarea)) i {
    font-weight: 400;
    color: #666;
    font-size: 0.9em;
}

/* Target the wrapper spans CF7 uses */
.wpcf7-form-control-wrap {
    display: block;
    margin-top: 8px;
}

/* Global Input Styling */
.wpcf7-form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: normal;
}

/* Specific overrides for text areas */
.wpcf7-textarea {
    min-height: 150px;
    resize: vertical;
}

.wpcf7-form-control:focus {
    border-color: #0073e6;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 115, 230, 0.2);
}

/* Cloudflare Turnstile Styling */
.wpcf7-turnstile {
    padding: 15px;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 4px;
    display: inline-block;
}

/* Submit Button Styling */
.wpcf7-submit {
    color: white;
    padding: 8px 30px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.5rem;
    cursor: pointer;
    width: auto;
    /* Buttons shouldn't necessarily be full width */
}

/* ── Blockquote system ─────────────────────────────────────────────────────── */
/* Moved from job-openings.css — intentionally site-wide on the main site.     */

/* Standard variant — info box */
blockquote {
    background: #f8fafc;
    border: 1px solid rgba(226,232,240,0.7);
    border-radius: 40px;
    padding: 28px 32px 28px 42px;
    margin: 40px 0;
    font-style: normal;
    color: #334155;
    font-size: 16px;
    line-height: 1.625;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

/* Cyan accent bar — clips cleanly to the rounded corners via overflow:hidden */
blockquote::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background: #0090c8;
}

/* Title: use <h4> as the first element inside a standard blockquote */
blockquote > h4:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #002b5c;
}

blockquote > h4:first-child::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    content: '\f05a';
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1;
}

blockquote p:last-child,
blockquote ul:last-child,
blockquote ol:last-child {
    margin-bottom: 0;
}

/* Attribution variant: a short credit line visitors copy exactly (used on
   /illustrations/rules/). A compact callout, not the big 40px pull-quote:
   small corners, tight spacing, thin accent bar, monospace so blanks like
   "pages ___" read as fill-in text. */
blockquote.attribution {
    font-style: normal;
    font-size: 15px;
    line-height: 1.55;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    margin: 12px 0 18px;
    padding: 12px 16px 12px 20px;
    border-radius: 8px;
}

blockquote.attribution::before {
    width: 4px;
}

/* Links inside blockquotes */
blockquote a {
    color: #0056b3;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: color 0.1s, text-decoration-color 0.1s;
}

blockquote a:hover {
    color: #0090c8;
    text-decoration-color: #0090c8;
}

/* List styling inside blockquotes */
blockquote li {
    margin-bottom: 8px;
}

blockquote ul li::marker,
blockquote ol li::marker {
    color: #002b5c;
}

blockquote li > strong:first-child {
    color: #002b5c;
}

/* Impact variant — large typographic pull quote */
@keyframes blockquote-impact-in {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

blockquote.impact {
    background: none;
    border: none;
    border-radius: 0;
    overflow: visible;
    padding: 8px 0 8px 32px;
    margin: 40px 0;
    box-shadow: none;
    position: relative;
    font-size: clamp(22px, 2.5vw, 30px);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.025em;
    color: #334155;
    animation: blockquote-impact-in 0.7s ease-out both;
}

blockquote.impact::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    border-radius: 3px;
    background: #0090c8;
    box-shadow: 0 0 10px rgba(0,144,200,0.15);
}

blockquote.impact p {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    color: inherit;
    margin-bottom: 0;
}

/* --- MODERN HEADER & RESPONSIVE DESIGN --- */

.header-flex-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
}

.header-flex-container::before,
.header-flex-container::after {
    display: none !important;
}

@media (max-width: 991px) {
    .header-flex-container {
        padding: 5px 10px;
    }
}

.navbar-brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 1 auto;
}

.logo.navbar-btn {
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
}

.logo img {
    height: 42px;
    width: auto;
    display: block;
}

.header-title-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Without this, the title renders at its own natural content width
       regardless of how much room is actually left between the logo and the
       action-icon cluster — .navbar-brand-group correctly shrinks to fit
       available space (flex:1 1 auto; min-width:0 below), but a flex child
       with no min-width of its own doesn't inherit that constraint, so the
       title just overflows into the icons' territory instead of wrapping
       tighter. min-width:0 lets it actually shrink; flex:1 1 auto makes it
       consume exactly the space navbar-brand-group has available (after the
       logo), so the title always wraps to fit instead of colliding — holds a
       constant safe gap from ~320px up (verified at 320/340/360/375/414px on
       root, PTXprint, FieldWorks, and every long-name subsite; no change at
       desktop widths). Below ~300px a single long word can still overflow
       rather than break — no realistic device is that narrow, and breaking
       mid-word is explicitly ruled out (issue #36). */
    min-width: 0;
    flex: 1 1 auto;
}

@media (max-width: 991px) {
    .navbar-brand-group {
        align-items: center;
        /* Center title vertically when subtitle is hidden */
    }

    .header-site-title {
        line-height: 1;
    }
}

.header-site-title {
    margin: 0;
    padding: 0;
    line-height: 1;
}

.header-site-title a {
    color: #fff !important;
    font-weight: 700;
    font-size: clamp(16px, 3.5vw, 24px);
    letter-spacing: -0.025em;
    text-decoration: none !important;
    display: block;
}

.header-site-title a:hover,
.header-site-title a:focus {
    color: #fff !important;
    text-decoration: none !important;
}

.header-site-subtitle {
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 500;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    line-height: 1.2;
    opacity: 0.8;
}

@media (max-width: 759px) {
    .header-flex-container {
        padding: 2px 10px;
    }

    .header-site-title {
        font-size: clamp(16px, 6vw, 24px);
        line-height: 1.2;
    }

    .header-site-title a {
        white-space: normal;
        display: block;
        overflow: visible;
        /* Break only at spaces — "Language" / "Technology" as whole words —
           never mid-word. Overrides the theme's global `a { word-break:
           break-word }` (+ UA hyphens) that was splitting "Technolog / y" in
           the narrow mobile title slot. */
        word-break: normal;
        overflow-wrap: normal;
        hyphens: none;
    }

    .navbar-brand-group {
        flex: 1 1 auto;
        min-width: 0;
        gap: 8px;
    }

    .logo.navbar-btn {
        flex-shrink: 0;
        /* Tap target stays a uniform 40x40px even though the image inside it
           is smaller (min-height/min-width, not the image's own size, governs
           it) — a smaller visual mark doesn't have to mean a smaller touch
           target. */
        min-height: 40px;
        min-width: 40px;
    }

    .header-nav-actions {
        gap: 0;
    }

    /* Phone header was cramped: the brand group grew flush against the action
       icons, so the wrapped title ("Technology") collided with the search icon.
       Shrink the logo for more room and add a buffer so the title can never
       reach the icons. (Tap boxes stay a uniform 40px — shrinking them below
       that hurts touch accessibility; the cluster is condensed via the divider
       gap below instead.) Beats the `a.logo img { height:35px !important }`
       rule higher up (equal specificity, later in source). */
    a.logo img {
        height: 30px !important;   /* was 35px */
    }
    .header-mobile-actions-group {
        margin-left: 12px;
    }
}

.header-nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.header-mobile-actions-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.mobile-nav-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    /* Tightened from 8px: the divider's wide margins were the biggest gap in
       the action cluster (translate → give read as ~21px, lopsided next to the
       2px gaps elsewhere). */
    margin: 0 5px;
}

/* Ensure no gap between action icons and menu toggle */
.header-search-container,
.header-language-container,
.header-donate-container,
.header-menu-container {
    display: flex;
    align-items: center;
}

/* Sub-Navbar Styling */
.header-sub-navbar {
    background: var(--nav-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    position: relative;
    z-index: 1600;
}

.navbar-menu-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-menu-flex::before,
.navbar-menu-flex::after {
    display: none !important;
}

.header-sub-navbar .menu-item-wrapper {
    display: flex;
    align-items: center;
    height: 100%;
    cursor: pointer;
}

.header-sub-navbar .nav-main-item:hover .menu-item-wrapper,
.header-sub-navbar .nav-main-item.active .menu-item-wrapper,
.header-sub-navbar .nav-main-item.current-menu-item .menu-item-wrapper,
.header-sub-navbar .nav-main-item.current-menu-ancestor .menu-item-wrapper,
.header-sub-navbar .nav-main-item.current_page_item .menu-item-wrapper {
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 -2px 0 var(--accent-blue);
}

.header-sub-navbar .nav-main-link {
    padding: 13px 15px;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    letter-spacing: 0.025em;
    height: 100%;
    display: flex;
    align-items: center;
    transition: color 0.15s ease;
}

/* Translated menu labels (GTranslate) are often longer than the English
   original and don't fit a nav item's slot — that's fine, this bar's height
   is unconstrained and already grows to fit a wrapped 2-line label. The
   actual bug: a global `a { word-break: break-word; hyphens: auto; }` rule
   (style.css, meant for long hyperlink URLs in article body text) also hits
   nav links, so a single word that doesn't fit gets fractured mid-letter
   ("Fitur" -> "Fitu" / "r") instead of wrapping at the next space. Multi-word
   labels ("Dapatkan Bantuan") already wrap fine at the space between words —
   only single unbreakable words need this override, and letting a rare
   long single word overflow its slot slightly reads far better than
   splitting it mid-character. */
.header-sub-navbar .nav-main-link,
.off-canvas-body .nav-main-link {
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;
}

/* Centered only for the desktop pill-style nav — a wrapped 2-line label
   reads more balanced centered in its narrow item. The off-canvas drawer's
   rows are full-width and left-aligned by convention (matches the existing
   list look), so it's deliberately excluded here. */
.header-sub-navbar .nav-main-link {
    text-align: center;
}

.header-sub-navbar .submenu-toggle-btn {
    padding: 0 14px 0 0 !important;
    height: 100%;
    display: flex;
    align-items: center;
}

.header-sub-navbar .nav-main-item.has-children .nav-main-link {
    padding-right: 6px;
}

.header-language-container-nav {
    display: flex;
    align-items: center;
    border-left: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding-left: 10px;
    /* No background transition — matches the nav items, whose hover highlight snaps in. */
}

/* Hover highlight matches the nav items exactly: #0f6cbd (see
   .navbar-default li.nav-main-item:hover) with a flat 10% white overlay on top —
   the same two-layer blend the nav shows (li #0f6cbd + .menu-item-wrapper
   rgba(255,255,255,0.1)). Applying the overlay to the CONTAINER (not the popup)
   covers the full width, including the left padding/divider gap, so the whole
   pill is one uniform color with no darker strip. Cyan accent underline; no
   transition, so it snaps in like the nav rather than fading. */
.header-language-container-nav:hover {
    background-color: #0f6cbd;
    background-image: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1));
    box-shadow: inset 0 -2px 0 var(--accent-blue);
}

.header-language-container-nav .gt_switcher-popup {
    background: transparent !important;
    border: none !important;
    padding: 12px 14px !important;
    min-width: 100px !important;
    box-shadow: none !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0.025em !important;
    height: 100%;
    display: inline-flex !important;
    align-items: center !important;
    position: relative;
    transition: color 0.3s;
}

.header-language-container-nav .gt_switcher-popup:hover {
    /* Stays transparent — the hover color (and its 10% white overlay) lives on the
       container so the full pill, including the left padding, is one uniform color. */
    background-color: transparent !important;
    color: #fff !important;
}

.header-language-container-nav .gt_switcher-popup::before {
    content: "\f1ab" !important;
    font-family: "Font Awesome 7 Free" !important;
    font-weight: 900 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 15px !important;
    margin-right: 8px !important;
    position: static;
    transform: none !important;
    transition: color 0.3s;
}

.header-language-container-nav:hover .gt_switcher-popup::before,
.header-language-container-nav .gt_switcher-popup:hover::before {
    color: #fff !important;
}

.header-language-container-nav .gt_switcher-popup::after {
    display: none !important;
}

/* The dropdown triangle, mirroring the nav submenu caret (.submenu-caret):
   - the ▼ text glyph at 12px optically matches the caret's 10px Font Awesome
     chevron (the FA glyph fills more of its em box than the text triangle)
   - #7292B0, going white on hover (rule below)
   - NO transition, so it snaps to white like the nav caret rather than fading. */
.header-language-container-nav .gt_switcher-popup span:last-child {
    color: #7292B0 !important;
    font-size: 12px !important;
    margin-left: 2px !important;
}

.header-language-container-nav:hover .gt_switcher-popup span:last-child,
.header-language-container-nav .gt_switcher-popup:hover span:last-child {
    color: #fff !important;
}

.header-sub-navbar .nav-main-item {
    display: flex;
    align-items: center;
    /* Vertical alignment */
}

.header-sub-navbar ul.nav {
    display: flex;
    justify-content: flex-start;
    /* Pull left by the nav-link's own 15px padding so the FIRST item's text
       lines up with the container edge (and the breadcrumb / page H1 below it),
       instead of sitting 15px indented. The hover highlight still fills out to
       the container edge, which is the conventional look. */
    margin: 0 0 0 -15px;
    height: 100%;
}

.header-sub-navbar .nav-main-item {
    padding: 0 !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.header-sub-navbar .sub-menu {
    position: absolute !important;
    top: 100%;
    left: 0;
    min-width: 230px;
    background: #ffffff !important;
    border: 1px solid var(--border-soft) !important;
    border-top: none !important;
    box-shadow: 0 16px 36px rgba(0, 21, 42, 0.18) !important;
    padding: 8px !important;
    margin: 0 !important;
    z-index: 2000;
    border-radius: 0 0 10px 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease;
    transform: translateY(6px);
}

.header-sub-navbar .nav-main-item:hover>.sub-menu,
.header-sub-navbar .nav-main-item:focus-within>.sub-menu {
    display: block !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-sub-navbar .nav-sub-item {
    margin: 0 !important;
    padding: 0 !important;
}

.header-sub-navbar .nav-sub-link {
    color: var(--brand-navy) !important;
    font-size: 15px !important;
    padding: 9px 14px !important;
    display: block !important;
    text-transform: none !important;
    font-weight: 500 !important;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background-color 0.15s ease;
}

.header-sub-navbar .nav-sub-link:hover,
.header-sub-navbar .nav-sub-link:focus {
    color: var(--brand-navy) !important;
    background: rgba(0, 43, 92, 0.07) !important;
}

/* Donate Heart Style */
.donate-heart-link {
    background-color: var(--white);
    color: var(--header-bg) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    padding: 10px 24px !important;
    margin: 0 !important;
    border-radius: 50px !important;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    text-decoration: none !important;
}

.donate-heart-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
    color: var(--header-bg) !important;
}

.donate-heart-link i.fa-heart {
    color: #ef4444 !important;
    transition: color 0.2s ease;
}

.donate-heart-link:hover i.fa-heart {
    color: #ff2020 !important;
}

@media (max-width: 991px) {
    .header-donate-container-mobile .donate-heart-link {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        gap: 0 !important;
        color: #ef4444 !important;
        text-decoration: none !important;
        min-width: 44px;
    }

    /* .donate-text ("Donate") stays hidden on mobile; the real, translatable
       .donate-text-mobile ("Give") span below is shown instead — matching
       the hv-new treatment — so this label isn't stuck as non-translatable
       CSS ::after content for JS-disabled/?hv=0 visitors. */
    .header-donate-container-mobile .donate-text {
        display: none !important;
    }

    .header-donate-container-mobile .donate-text-mobile {
        display: block !important;
        color: #fff !important;
        text-transform: uppercase;
        margin-top: -2px;
        font-size: 10px !important;
        font-weight: 700 !important;
        letter-spacing: 0.05em;
        line-height: 1 !important;
        visibility: visible !important;
    }

    .header-donate-container-mobile i {
        font-size: 20px !important;
        margin-bottom: 2px;
    }
}

/* GTranslate Mobile Style (Icon only) */
@media (max-width: 991px) {
    .header-language-container-mobile .gt_switcher-popup {
        background: transparent !important;
        border: none !important;
        padding: 5px !important;
        min-width: unset !important;
        box-shadow: none !important;
    }

    .header-language-container-mobile .gt_switcher-popup span {
        display: none !important;
    }

    .header-language-container-mobile .gt_switcher-popup::before {
        content: "\f1ab" !important;
        font-family: "Font Awesome 7 Free", "FontAwesome", "Font Awesome 5 Free", "Font Awesome 6 Free" !important;
        font-weight: 900 !important;
        margin-right: 0 !important;
        font-size: 20px !important;
        color: rgba(255, 255, 255, 0.7) !important;
        display: inline-block !important;
        -moz-osx-font-smoothing: grayscale;
        -webkit-font-smoothing: antialiased;
        font-style: normal;
        font-variant: normal;
        text-rendering: auto;
        line-height: 1;
    }

    .header-language-container-mobile:hover .gt_switcher-popup::before {
        color: #fff !important;
    }
}

.search-toggle,
.navbar-toggle {
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
    font-size: 20px !important;
    padding: 10px !important;
    cursor: pointer;
    transition: var(--transition);
    display: block;
}

.navbar-toggle {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    padding: 8px 10px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.search-toggle:hover,
.navbar-toggle:hover {
    color: var(--white) !important;
}

.navbar-toggle:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

.header-mobile-actions {
    display: flex;
    align-items: center;
}

/* Fix GTranslate icon color to match */
.header-language-container .gt_switcher-popup::before,
.header-language-container .gt_switcher-popup span:last-child {
    color: #C2C8C2 !important;
    transition: color 0.3s;
}

.header-language-container:hover .gt_switcher-popup::before,
.header-language-container:active .gt_switcher-popup::before,
.header-language-container.active .gt_switcher-popup::before,
.header-language-container:hover .gt_switcher-popup span:last-child {
    color: #fff !important;
}

.navbar-toggle .icon-bar {
    background-color: #C2C8C2 !important;
    display: block;
    width: 22px;
    height: 2px;
    min-height: 2px;
    border-radius: 1px;
    margin: 4px auto;
    flex-shrink: 0;
}

.search-toggle:hover,
.search-toggle:active,
.search-toggle.active,
.navbar-toggle:hover,
.navbar-toggle:active,
.navbar-toggle.active,
.header-language-container:hover .gt_switcher-popup::before,
.header-language-container.active .gt_switcher-popup::before {
    color: #fff !important;
}

.navbar-toggle:hover .icon-bar,
.navbar-toggle:active .icon-bar,
.navbar-toggle.active .icon-bar {
    background-color: #fff !important;
}

.search-toggle:focus-visible,
.navbar-toggle:focus-visible,
.close-off-canvas:focus-visible,
.submenu-toggle-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 173, 239, 0.25);
}

.submenu-caret {
    color: #7292B0;
    font-size: 10px;
    margin-left: 2px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
}

.submenu-caret i {
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Off-canvas carets: bolder and navy so they're clearly visible on the white
   panel (the light-gray desktop caret would nearly disappear). */
.off-canvas-body .submenu-toggle-btn {
    color: var(--brand-navy) !important;
}

.off-canvas-body .submenu-caret {
    color: var(--brand-navy);
    font-size: 15px;
    font-weight: 900;
}

/* Desktop: flip the chevron while its dropdown is open */
.header-sub-navbar .nav-main-item:hover .submenu-caret i,
.header-sub-navbar .nav-main-item:focus-within .submenu-caret i {
    transform: rotate(180deg);
}

/* Off-canvas: flip the chevron while the accordion submenu is expanded */
.off-canvas-body .nav-main-item.submenu-active .submenu-caret i {
    transform: rotate(180deg);
}

/* Full Width Search Bar */
.full-width-search-bar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #003a70;
    padding: 14px 0;
    z-index: 1500;
    /* Between header and submenus */
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modern GSC Pill Style */
.header-search-container {
    width: 250px !important;
}

.header-search-container .navbar-form {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.header-search-container .gsc-control-cse {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    width: 100% !important;
}

table.gsc-search-box {
    margin: 0 !important;
    width: 250px !important;
    table-layout: fixed !important;
}

/* Make the input box look like our pill */
.header-search-container .gsc-input-box,
.full-width-search-bar .gsc-input-box {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50px !important;
    overflow: visible !important;
    transition: var(--transition);
    max-width: 250px;
    width: 100% !important;
    padding: 0 !important;
    position: relative !important;
}

.header-search-container .gsc-input-box-focus,
.full-width-search-bar .gsc-input-box-focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: var(--accent-blue) !important;
    box-shadow: none !important;
}

/* gsib_a: full-width cell that holds the input AND the search icon as a background */
.header-search-container .gsc-input-box td.gsib_a,
.full-width-search-bar .gsc-input-box td.gsib_a {
    width: auto !important;
    padding: 0 !important;
    background-image: url("data:image/svg+xml;utf8,<svg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M14.76 13.27L20.49 19L19 20.49L13.27 14.76C12.2 15.53 10.91 16 9.5 16C5.91 16 3 13.09 3 9.5C3 5.91 5.91 3 9.5 3C13.09 3 16 5.91 16 9.5C16 10.91 15.53 12.2 14.76 13.27ZM9.5 5C7.01 5 5 7.01 5 9.5C5 11.99 7.01 14 9.5 14C11.99 14 14 11.99 14 9.5C14 7.01 11.99 5 9.5 5Z' fill='%23ffffff' stroke='%23ffffff' stroke-width='1.4'/></svg>") !important;
    background-position: left 10px center !important;
    background-repeat: no-repeat !important;
    background-size: 18px 18px !important;
}

/* Style the text input: pad left to clear the icon, pad right to clear the X */
.header-search-container input.gsc-input,
.full-width-search-bar input.gsc-input {
    background: transparent !important;
    background-image: none !important;
    color: #fff !important;
    font-size: 14px !important;
    padding: 6px 6px 6px 36px !important;
    text-indent: 0 !important;
    text-align: left !important;
    box-sizing: border-box !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Hide native browser clear decorations */
.header-search-container input.gsc-input::-webkit-search-decoration,
.header-search-container input.gsc-input::-webkit-search-cancel-button,
.header-search-container input.gsc-input::-webkit-search-results-button,
.header-search-container input.gsc-input::-webkit-search-results-decoration {
    -webkit-appearance: none !important;
}

/* gsib_b: The cell for the clear button. We make it 0 width inside the pill and position the X absolute */
.header-search-container .gsib_b,
.full-width-search-bar .gsib_b {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    position: relative;
    overflow: visible !important;
}

/* Ensure Google's .gsst_b wrapper doesn't interfere */
.header-search-container .gsst_b,
.full-width-search-bar .gsst_b {
    position: static !important;
    display: flex !important;
    width: 0 !important;
    height: 100% !important;
}

/* Style the clear X link: Positioned absolute to sit JUST BEYOND the pill */
.header-search-container .gsst_a,
.full-width-search-bar .gsst_a {
    text-decoration: none !important;
    display: flex;
    /* No !important here so inline style="display: none" from GSC works */
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    right: -32px !important;
    /* Adjust this to sit just beyond the pill */
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 24px !important;
    height: 24px !important;
    z-index: 10;
}

/* Style the clear X SVG: hide the text '×', show SVG as full white and bolder */
.header-search-container .gscb_a,
.full-width-search-bar .gscb_a {
    font-size: 0 !important;
    color: transparent !important;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z' fill='%23ffffff' stroke='%23ffffff' stroke-width='1.4'/></svg>") center no-repeat !important;
    background-size: 16px 16px !important;
    height: 24px !important;
    width: 24px !important;
    display: inline-block !important;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.header-search-container .gsst_a:hover .gscb_a,
.full-width-search-bar .gsst_a:hover .gscb_a {
    opacity: 1;
}

/* Hide the external search button cell — it's outside the pill */
.header-search-container td.gsc-search-button,
.full-width-search-bar td.gsc-search-button {
    display: none !important;
}

/* Bring GCS Autocomplete Dropdown closer to the search bar */
table.gssb_c,
.gssb_c,
.gsc-completion-container {
    margin-top: 4px !important;
    z-index: 3000 !important;
}

/* Pin the autocomplete right under the search pill (migrated from the
   Customizer's Additional CSS — the deploy script removes the DB copy). */
.gsc-completion-container {
    position: absolute !important;
    top: calc(100% + 2px) !important;
}

.header-search-container .gsc-input-box input.gsc-input::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.header-search-container .gsc-input-box input.gsc-input::-moz-placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.header-search-container .gsc-input-box input.gsc-input:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Hide GSC default branding in header */
.header-search-container .gcsc-branding {
    display: none !important;
}

/* CSS for the rotating search text overlay — offset past the search icon */
.gcs-rotating-ph {
    position: absolute;
    left: 38px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.gcs-rotating-ph.fadeOut {
    opacity: 0;
}

.fadeIn {
    animation: fadeInPlaceholder 0.5s ease forwards;
}

@keyframes fadeInPlaceholder {
    from {
        opacity: 0;
        transform: translateY(-30%);
    }

    to {
        opacity: 1;
        transform: translateY(-50%);
    }
}

.full-width-search-bar .gsc-input {
    color: #fff !important;
    position: relative;
    z-index: 1;
}

.full-width-search-bar.active {
    display: block !important;
}

/* Mobile search: make the pill span the full bar width. The desktop pill is
   capped at 250px (rules above); inside the slide-down bar those caps are
   lifted so the input runs edge to edge of the container. */
.full-width-search-bar .container {
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
}

.full-width-search-bar .navbar-form {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.full-width-search-bar .gsc-control-cse {
    width: 100% !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.full-width-search-bar table.gsc-search-box {
    width: 100% !important;
    margin: 0 !important;
}

.full-width-search-bar .gsc-input-box {
    max-width: none !important;
}

.full-width-search-bar input.gsc-input {
    font-size: 16px !important;
    /* >=16px prevents iOS Safari from zooming the page on focus */
    padding: 9px 44px 9px 38px !important;
}

/* Make the input actually fill the full-width bar. A legacy mobile rule caps
   the GCS input at `width: 37vw; max-width: 225px` (for the old in-menu search
   box); left in place, the input stops mid-bar and the clear (X) — which sits
   right after the input cell — lands in the MIDDLE of the bar instead of at the
   right edge. This higher-specificity override lets the input span the bar so
   the X returns to the right. */
.full-width-search-bar .navbar-form .gsc-control-searchbox-only .gsc-input,
.full-width-search-bar input.gsc-input {
    width: 100% !important;
    max-width: none !important;
}

/* Clear (X) at the right edge of the full-width pill (the desktop rule parks it
   32px OUTSIDE a 250px pill, which is off-screen / mid-bar here). */
.full-width-search-bar .gsst_a {
    right: 14px !important;
}

/* Off-Canvas Menu */
.off-canvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.off-canvas-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.off-canvas-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    /* Light/white theme, matching the sidebar cards — a bright, airy panel
       rather than the heavy dark-navy slab. */
    background: #ffffff;
    z-index: 2000;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

@media (min-width: 576px) {
    .off-canvas-menu {
        width: 320px;
        left: -320px;
    }
}

@media (min-width: 768px) {
    .off-canvas-menu {
        width: 380px;
        left: -380px;
    }
}

.off-canvas-menu.active {
    left: 0 !important;
    /* Elevation shadow only while open — this element is `position:fixed` at
       full viewport height and always in the DOM (just translated offscreen
       when closed), so a shadow on the base rule bled 40px of blur into the
       left edge of every single page, at every scroll position, all the
       time: the drawer's own right edge sits flush with the viewport's left
       edge even while "closed" (`left: -100%` etc. only pushes the drawer's
       own width away, not the shadow around it). */
    box-shadow: 0 0 40px rgba(0, 21, 42, 0.25);
}

.off-canvas-header {
    padding: 14px 16px 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-soft);
}

.off-canvas-title {
    color: var(--text-muted-dark);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.close-off-canvas {
    background: transparent;
    border: none;
    color: var(--brand-navy);
    font-size: 32px;
    cursor: pointer;
    padding: 0px 12px 4px;
    border-radius: 8px;
    transition: var(--transition);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-off-canvas:hover {
    color: var(--brand-navy);
    background-color: rgba(0, 43, 92, 0.07);
}

.off-canvas-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px 28px;
}

/* Menu Components inside Off-Canvas */
.off-canvas-body ul.navbar-nav {
    display: block !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.off-canvas-body .nav-main-item {
    list-style: none;
    margin-bottom: 5px;
    display: block !important;
    width: 100% !important;
    float: none !important;
}

.menu-item-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.off-canvas-body .menu-item-wrapper {
    padding: 12px 14px;
    border-radius: 8px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.off-canvas-body .submenu-toggle-btn {
    /* Wide tap target for the accordion chevron, but NO min-height — a forced
       40px made rows with a submenu taller than plain rows. Instead stretch to
       the row's natural height (driven by the link + wrapper padding), so every
       top-level row is the same height whether or not it has a chevron. */
    min-width: 44px;
    align-self: stretch;
    margin: -12px -14px -12px 0; /* span the wrapper's padding → full-height, edge-to-edge hit area */
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Light-theme hover: a soft navy tint instead of the old solid navy fill. */
.off-canvas-body .nav-main-item:hover>.menu-item-wrapper,
.off-canvas-body .nav-main-item.active>.menu-item-wrapper,
.off-canvas-body .nav-main-item.submenu-active>.menu-item-wrapper {
    background-color: rgba(0, 43, 92, 0.07);
}

.nav-main-link {
    color: #cbd8e6 !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    /* Consistent boldness */
    text-decoration: none;
    transition: color 0.3s;
}

.nav-main-link:hover,
.nav-main-item:hover .nav-main-link,
.nav-main-item:hover .submenu-toggle-btn span {
    color: #fff !important;
    text-decoration: none;
}

/* Off-canvas (light theme): navy links + navy hover text, overriding the
   light-gray/white defaults above that were built for the old dark panel. */
.off-canvas-body .nav-main-link {
    color: var(--brand-navy) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

.off-canvas-body .nav-main-link:hover,
.off-canvas-body .nav-main-item:hover .nav-main-link,
.off-canvas-body .nav-main-item:hover .submenu-toggle-btn .submenu-caret {
    color: var(--brand-navy) !important;
}

.submenu-toggle-btn {
    background: transparent !important;
    border: none !important;
    color: #C2C8C2 !important;
    padding: 5px 10px !important;
}

.nav-main-item.submenu-active .sub-menu {
    display: block !important;
}

.sub-menu {
    display: none;
    padding-left: 20px;
    margin-top: 10px;
    position: static !important;
    /* Override absolute positioning for vertical menu */
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* On the white panel a white submenu card would vanish — use a soft gray fill
   with a thin border so it reads as a nested group, no heavy drop shadow. */
.off-canvas-body .sub-menu {
    background-color: #f1f5f9 !important;
    padding: 8px !important;
    margin-top: 2px;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    box-shadow: none;
}

.nav-sub-item {
    list-style: none;
    margin-bottom: 0;
}

.nav-sub-link {
    color: #C2C8C2 !important;
    font-size: 16px !important;
    display: block !important;
    padding: 10px 20px !important;
    transition: color 0.3s, background-color 0.3s;
    white-space: normal !important;
    line-height: 1.3 !important;
}

.off-canvas-body .nav-sub-link {
    color: var(--brand-navy) !important;
    border-radius: 6px;
    font-size: 15px !important;
    padding: 10px 14px !important;
    text-decoration: none !important;
}

.off-canvas-body .nav-sub-link:hover,
.off-canvas-body .nav-sub-link:focus {
    color: var(--brand-navy) !important;
    background-color: rgba(0, 43, 92, 0.07) !important;
}

/* Ensure no overlap for hero content */
#home_primary,
#content_primary {
    position: relative;
    z-index: 1;
    background: #fff;
    clear: both;
}

/* Modern Hero Section */
.modern-hero-section {
    padding: 120px 0;
    min-height: 500px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    margin-bottom: 0;
    clear: both;
    overflow: hidden;
}

.modern-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Same navy hues as before, but a lighter hand: strongest behind the
       headline (left), fading fast so the photo shows through, plus a thin
       bottom scrim so buttons keep contrast on busy images. */
    background:
        linear-gradient(to top, rgba(0, 21, 42, 0.35), rgba(0, 21, 42, 0) 40%),
        linear-gradient(to right, rgba(0, 43, 92, 0.72) 0%, rgba(0, 43, 92, 0.42) 45%, rgba(0, 58, 112, 0.10) 100%);
    z-index: 1;
}

.modern-hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-layout {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 20px;
}

.hero-content {
    max-width: 900px;
    margin: 0;
}

.modern-hero-section .site-description {
    font-size: clamp(32px, 5vw, 60px) !important;
    color: #fff !important;
    line-height: 1.12 !important;
    margin-bottom: 36px !important;
    text-align: left !important;
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0, 21, 42, 0.45);
    max-width: 900px;
    margin-top: 0;
    text-wrap: balance;
}

.modern-hero-section .site-description.is-long-text {
    font-size: clamp(26px, 4.5vw, 54px) !important;
    line-height: 1.2 !important;
}

.modern-hero-section .site-description.is-extra-long-text {
    font-size: clamp(24px, 4vw, 42px) !important;
    line-height: 1.2 !important;
}

.hero-content img {
    max-width: 150px;
    height: auto;
    margin-bottom: 15px;
}

/* Scriptoria's logo is a solid-black icon on a transparent PNG, with no
   built-in contrast treatment — it disappears into the busy hero photo
   without a badge behind it. Scoped to this subsite only (via the
   per-site body class from base.twig) since other subsites' logos don't
   have this problem. Rounded square, not a circle: the icon's quill
   flourish extends almost to the corners of its own canvas, so a circular
   clip cuts off the tip — a percentage border-radius keeps the corners
   safely inside at both the desktop and mobile sizes below. */
.scriptoria.home .hero-content img {
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 22%;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.hero-actions .btn-download {
    padding: 17px 44px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    width: auto;
    margin: 0;
    background-color: var(--brand-blue-deep);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: none;
}


.hero-actions.root-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
}

.hero-actions .btn-secondary-download {
    background-color: var(--accent-blue) !important;
}

/* Lock in size and suppress Bootstrap's inset focus outline on all interactive states.
   Bootstrap draws a 5px ring with outline-offset: -2px (inside the button), which
   makes the button appear shorter when hovered after a click. box-shadow already
   serves as the visible focus indicator. */
.hero-actions .btn-download:hover,
.hero-actions .btn-download:focus,
.hero-actions .btn-download:active {
    padding: 17px 44px;
    border: none;
    outline: none;
    color: white;
}


/* Responsiveness */
@media (max-width: 991px) {
    .hero-layout {
        text-align: center;
        align-items: center;
    }

    .modern-hero-section .site-description {
        text-align: center !important;
    }

    .hero-actions.root-hero-actions {
        justify-content: center;
    }
}

@media (max-width: 759px) {
    .modern-hero-section {
        min-height: 400px;
        padding: 80px 0;
    }

    .hero-layout {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 20px;
    }

    .modern-hero-section .site-description {
        font-size: clamp(28px, 6vw, 42px) !important;
        text-align: center !important;
        margin-bottom: 25px !important;
    }

    .hero-content img {
        max-width: 100px;
        margin: 0 auto 15px;
    }

    /* Scale the Scriptoria logo badge's padding down with the logo itself (100px here
       vs. 150px at desktop) so the badge keeps the same proportions at both sizes,
       instead of reading proportionally thicker on phones. */
    .scriptoria.home .hero-content img {
        padding: 5px;
    }

    .hero-actions,
    .hero-actions.root-hero-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 400px;
        margin: 15px auto 0;
        gap: 15px;
    }

    .hero-actions .btn-download {
        width: 100%;
        margin: 0;
    }
}

/* ── Search results page (Google CSE) ─────────────────────────────────────── */
/* Scope: the .gcs-results wrapper in views/search.twig. Google CSE injects its
   own stylesheets after ours, so the brand-critical properties carry
   !important. Palette/type mirror the Learn/Fonts/Jobs pages. */

.gcs-results .gsc-control-cse {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    font-family: inherit !important;
}

.gcs-results .gsc-control-cse *,
.gcs-results .gsc-table-result {
    font-family: inherit !important;
}

/* Web / Image tabs — styled like the canonical view-toggle */
.gcs-results .gsc-tabsArea {
    border-bottom: 1px solid var(--border-soft) !important;
    margin-bottom: 4px;
}

.gcs-results .gsc-tabHeader {
    border: none !important;
    background: transparent !important;
    color: var(--text-muted-dark) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 8px 14px !important;
    height: auto !important;
}

.gcs-results .gsc-tabHeader.gsc-tabhActive {
    color: var(--brand-navy) !important;
    box-shadow: inset 0 -2px 0 var(--accent-blue);
}

/* "About N results" bar — plain muted text instead of the gray slab */
.gcs-results .gsc-above-wrapper-area {
    border-bottom: none !important;
    padding: 6px 0 !important;
}

.gcs-results .gsc-result-info {
    color: var(--text-muted-dark) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-left: 0 !important;
}

.gcs-results .gsc-above-wrapper-area,
.gcs-results table.gsc-above-wrapper-area-container,
.gcs-results .gsc-result-info-container,
.gcs-results .gsc-orderby-container {
    background: transparent !important;
    border: none !important;
}

.gcs-results .gsc-orderby-label,
.gcs-results .gsc-option-selector,
.gcs-results .gsc-selected-option-container {
    color: var(--text-muted-dark) !important;
    font-size: 13px !important;
}

.gcs-results .gsc-selected-option-container {
    background: #fff !important;
    border: 1px solid var(--border-soft) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

/* Individual results — divider list, brand link colors */
.gcs-results .gsc-webResult.gsc-result {
    border-bottom: 1px solid var(--border-soft) !important;
    padding: 16px 0 !important;
    margin: 0 !important;
}

.gcs-results .gsc-webResult.gsc-result:hover {
    background: transparent !important;
    border-bottom-color: var(--border-soft) !important;
}

.gcs-results .gs-title,
.gcs-results .gs-title * {
    color: #0056b3 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    height: auto !important;
}

.gcs-results a.gs-title:hover,
.gcs-results a.gs-title:hover * {
    color: var(--accent-blue) !important;
}

.gcs-results .gsc-url-top .gs-visibleUrl,
.gcs-results .gs-visibleUrl {
    color: var(--text-muted-dark) !important;
    font-size: 13px !important;
}

.gcs-results .gs-snippet {
    color: var(--text-body) !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
}

.gcs-results .gs-image-box img.gs-image,
.gcs-results img.gs-image {
    border: 1px solid var(--border-soft) !important;
    border-radius: 8px !important;
}

/* Pagination — pill buttons, navy current page (matches .tool-pagination) */
.gcs-results .gsc-cursor-box {
    text-align: center !important;
    margin: 24px 0 8px !important;
}

/* GCS renders the 10 page pills in a non-wrapping row, which forces
   horizontal scroll at phone widths — let them wrap instead. */
.gcs-results .gsc-cursor {
    white-space: normal !important;
    display: block !important;
}

.gcs-results .gsc-cursor-page {
    /* !important: Google's stylesheet loads after ours and sets display:inline,
       whose non-wrapping padding pokes past the viewport at phone widths */
    display: inline-block !important;
    background: #fff !important;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    color: var(--brand-navy) !important;
    font-size: 14px !important;
    font-weight: 600;
    padding: 6px 12px !important;
    margin: 0 6px 6px 0 !important;
    text-decoration: none !important;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.gcs-results .gsc-cursor-page:hover {
    border-color: var(--accent-blue);
    text-decoration: none !important;
}

.gcs-results .gsc-cursor-current-page {
    background: var(--brand-navy) !important;
    border-color: var(--brand-navy);
    color: #fff !important;
}

/* "Search on Google" fallback link */
.gcs-results .gcsc-find-more-on-google {
    color: #0056b3 !important;
    font-size: 14px !important;
}

.gcs-results .gcsc-find-more-on-google-magnifier {
    fill: #0056b3 !important;
}


/* ── Archive & author listings (tease cards + pagination) ─────────────────── */
/* Category/tag/date archives and author pages (linked from every article
   byline) still rendered with pre-refresh typography. Card treatment matches
   the Learn/News feed cards; templates (tease*.twig, pagination.twig) are
   unchanged — this is presentation only. */

.article-content .tease {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 18px 22px;
    margin: 0 0 16px;
    will-change: transform; /* must be always-on — toggling on :hover causes GPU re-rasterize that reads as a snap/shrink */
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.article-content .tease:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 8px 28px rgba(0, 43, 92, 0.12);
    transform: translateY(-2px);
}

/* Titles — navy, cyan on hover (both tease variants: p.posttitle and h2) */
.tease p.posttitle {
    font-size: 20px;
    margin: 0 0 2px;
}

.tease h2 {
    font-size: 20px;
    margin: 0 0 2px;
}

.tease p.posttitle a,
.tease h2 a {
    color: var(--brand-navy);
    font-weight: 700;
    text-decoration: none;
}

.tease p.posttitle a:hover,
.tease h2 a:hover {
    color: var(--accent-blue);
}

/* Meta date — muted uppercase chip-style text, on its own line */
.tease span.postmetadate,
.tease p.postmeta,
.tease p.postmeta > strong {
    color: var(--text-muted-dark);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tease span.postmetadate {
    display: block;
    margin-bottom: 6px;
}

/* The legacy " — " separator between date and preview text is redundant now
   that the date sits on its own line. */
.tease span.postmetadate::after {
    content: none;
}

.tease .postcontent {
    color: var(--text-body);
    font-size: 15px;
    line-height: 1.65;
}

.tease p.newspost {
    margin-bottom: 0;
}

.tease img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-top: 10px;
}

/* Pagination — pill buttons matching the search-results pagination.
   Overrides the gray #e3e3e3 boxes from style.css (~8351). */
.tool-pagination {
    border-bottom: none;
    margin: 24px 0 0;
    padding-bottom: 0;
}

.tool-pagination .prev,
.tool-pagination .next,
.tool-pagination .pages a,
.tool-pagination .pages span {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    color: var(--brand-navy);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    padding: 6px 12px;
    margin: 0 4px 6px 0;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.tool-pagination .prev:hover,
.tool-pagination .next:hover,
.tool-pagination .pages a:hover {
    border-color: var(--accent-blue);
    color: var(--brand-navy);
    text-decoration: none;
}

/* Non-link span = the current page (see pagination.twig) */
.tool-pagination .pages span {
    background: var(--brand-navy);
    border-color: var(--brand-navy);
    color: #fff;
}

.tool-pagination .pages {
    display: inline;
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.tool-pagination .pages li {
    display: inline-block;
}


/* Tablet/desktop: let the (usually short) sidebar follow the scroll instead of
   leaving a tall blank column beside long article content — the "wasted space
   below the sidebar" case. Same pattern as the job single page's
   .job-sidebar-sticky (top: 24px); the header isn't sticky, so no offset math
   is needed. */
@media (min-width: 768px) {
    #sidebar_main {
        position: sticky;
        top: 24px;
    }
}

/* ── Mobile sidebar: collapsed "Helpful Links" disclosure ─────────────────── */
/* Phones only. The stacked sidebar (normally dumped below the article) moves
   ABOVE it as a compact collapsed bar labeled "Helpful Links", expanding in place.
   Deliberately an in-flow card (not a slide-in panel) so it reads as page
   furniture, distinct from the off-canvas site menu. Toggle markup lives in
   views/sidebar.twig; behavior + downloads-CTA tagging in js/site.js.
   NOTE: 767px (not the theme's usual 759px) — this must flip exactly where
   Bootstrap stacks the col-sm-* grid, or 760-767px would show the stacked
   sidebar with a hidden toggle. */

.sidebar-contents-toggle {
    display: none;
}

@media (max-width: 767px) {

    /* Let the sidebar column jump above the article. The row's children are
       already full-width stacked blocks at this size; the cols carry no
       flex-basis rules, so no flex-axis resets are needed. */
    #content_primary > .container > .row {
        display: flex;
        flex-direction: column;
    }

    .sidebar-col {
        order: -1;
    }

    .sidebar-contents-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        background: #fff;
        border: 1px solid var(--border-soft);
        border-radius: 12px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
        color: var(--brand-navy);
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        padding: 13px 16px;
        margin: 14px 0 0;
        cursor: pointer;
    }

    .sidebar-contents-toggle i {
        color: var(--accent-blue);
        font-size: 12px;
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar-col.open .sidebar-contents-toggle i {
        transform: rotate(180deg);
    }

    .sidebar-contents-toggle:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(0, 173, 239, 0.25);
    }

    /* The sidebar nav IS the collapsible panel — hidden by default (CSS, so
       there's no flash-of-expanded-sidebar before JS runs), revealed only
       when .sidebar-col.open. No empty card shell in the collapsed state
       because the whole nav is display:none, not just its children. */
    .sidebar-col:not(.open) #sidebar_main {
        display: none;
    }

    /* Open state reads as ONE card, not two stacked white boxes with a gap:
       the toggle loses its own bottom border/radius/shadow and the panel
       loses its own top radius and sits flush underneath, so the panel's
       own top border (from its base #sidebar_main rule) is the only seam
       between the "Helpful Links" label row and the link list. */
    .sidebar-col.open .sidebar-contents-toggle {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        border-bottom: none;
        box-shadow: none;
    }

    .sidebar-col.open #sidebar_main {
        margin-top: 0;
        margin-bottom: 12px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    /* A downloads CTA is a primary action, so site.js lifts .download-section
       OUT of the nav to sit here as a direct child of .sidebar-col, AFTER the
       nav (last child) — always visible regardless of the collapse state,
       without sitting between the toggle and the panel it opens. */
    .sidebar-col > .download-section {
        margin-top: 12px;
    }

    /* Slightly smaller than the 0.5em base rule above (see #sidebar_main h2) —
       tuned separately for this narrower mobile "Helpful Links" disclosure
       panel so its title doesn't float far below the card top. */
    .sidebar-col #sidebar_main h2 {
        margin-top: 0.4em;
    }
}

/* ---- 404 page: embedded search box + link tiles ---------------------------
   Replaces a bare text link ("try the search box at the top of the page")
   with a working search box, and a plain <ul> with card-style tiles matching
   the homepage's mission-card look (reuses .card-icon-wrap from style.css). */
.not-found-search {
    margin: 20px 0 28px;
}

/* Both small uppercase section labels (above the search box and above the
   tiles) share one style so they read as a consistent pair. */
.not-found-search-label,
.not-found-tiles-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(0, 43, 92, 0.6);
    margin-bottom: 10px;
}

/* The label above already provides the spacing below the box; let the
   wrapper's own bottom margin control the gap to "Or try one of these". */
.not-found-search .search-page-form {
    margin-bottom: 0;
}

/* Hide Google CSE's OWN built-in search box (baked into the <gcse:search>
   results widget). We show our own prefilled native .search-page-form instead
   (see views/search.twig). Google's box manages its own hash-based query state
   (#gsc.q=…) independently of the ?s= param that drives the page title/URL, so
   using it as the editable box left the H1 and URL stuck on the original
   query. style.css's `.article-content form.gsc-search-box { display:none }`
   already hides it; this keeps it hidden (defends against an earlier bug where
   we re-showed it). */
.gcs-results form.gsc-search-box {
    display: none !important;
}

/* On-page native search box (used by the search results page and the 404 page
   — see search-box.twig), styled to match the site's other search/filter
   inputs (Jobs/News/Software bars): a white rounded pill on the plain page
   background, with a leading magnifier. */
.search-page-form {
    position: relative;
    max-width: 360px;
    margin-bottom: 20px;
}

.search-page-form-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted-dark);
    font-size: 14px;
    pointer-events: none;
}

.search-page-input {
    width: 100%;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    padding: 9px 12px 9px 36px;
}

.search-page-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 173, 239, 0.15);
}

/* "Sort by ▾" reads as one cohesive control (matching the bordered pill
   used for view-toggle controls on News/Learn) instead of plain label text
   followed by a barely-visible empty box — Google's own selected-option box
   only wraps the tiny dropdown arrow, not the "Sort by" label beside it, so
   the shared border/background/padding has to live on their common parent. */
.gcs-results .gsc-option-menu-container {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: #fff;
    padding: 6px 12px;
}

.gcs-results .gsc-selected-option-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Search results read better at a bounded, article-like width than
   stretched across the full 1170px container now that the sidebar is gone
   on the root site — long title/snippet rows get harder to scan edge to
   edge. 800px matches this theme's existing prose-width precedent
   (chipp-agent-fullscreen.css uses the same value). */
.gcs-results {
    max-width: 800px;
}

/* .not-found-help groups the search box + tiles into a soft light card —
   reusing the homepage mission-cards section's surface (var(--page-bg-soft) +
   a soft border) — so they read as one cohesive "get back on track" unit
   rather than loosely stacked elements. Fixes GH issue #33 (was previewable
   behind a now-removed ?nf=card toggle; this is the default view). */
.not-found-help {
    background: var(--page-bg-soft);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 32px;
    max-width: 640px;
    margin: 8px auto 0;   /* centered in the column */
}

/* Centered error-page treatment: title, intro and the card all centered as one
   column. The intro sits tight under the title (reads as a subtitle) instead of
   floating with a big gap above a far-away card. Scoped to .not-found (the 404 /
   "page not available" view only) so other .article-content pages (e.g. search
   results) stay left-aligned. */
.article-content.not-found {
    text-align: center;
}

.not-found .article-h1 {
    margin-bottom: 12px;
}

.not-found .article-body > p {
    max-width: 560px;
    margin: 0 auto 20px;
    color: var(--text-muted-dark);
}

/* Center the search box within the card and cap its width; keep the typed
   text/placeholder left-aligned (the centered ancestor would otherwise center
   the input's own text). */
.not-found-help .not-found-search {
    margin: 0 auto 24px;
    max-width: 380px;
}

.not-found-help .search-page-input {
    text-align: left;
}

/* Flex-wrap + justify-content:center, not the sitewide auto-fill grid pattern —
   this card has a fixed max-width (.not-found-help), so an odd tile count (5)
   in a grid leaves a lopsided, left-aligned last row instead of a centered one.
   This is the documented exception for a centered container where a short last
   row matters (see CLAUDE.md's tile-grid convention). */
.not-found-tiles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.not-found-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 24px 16px;
    text-decoration: none !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    flex: 1 1 160px;
    max-width: 220px;
}

.not-found-tile:hover,
.not-found-tile:focus {
    /* 2px lift + a modest shadow — matches the site's standard hover movement
       (Donate button, Jobs cards, Express Interest buttons, homepage buttons
       all use translateY(-2px)); was a jumpier -4px with a heavier shadow. */
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -6px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-blue);
}

.not-found-tile .card-icon-wrap {
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
}

.not-found-tile .card-icon-wrap i {
    font-size: 22px;
}

.not-found-tile-label {
    color: var(--brand-navy);
    font-weight: 700;
    font-size: 15px;
    line-height: 1.4;
}

@media (max-width: 759px) {
    .not-found-tiles {
        flex-direction: column;
    }

    .not-found-tile {
        flex: none;
        width: 100%;
    }
}
